Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread mm
Joao Morais a écrit : Daniël Mantione wrote: And, as said before, no datastructure is adequate for storing a mathematical real number. Not even if you have infinite memory. Nope. If infinite memory was tangible, you would be able to store any real number. How many time would it take to stor

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Joao Morais
Daniël Mantione wrote: And, as said before, no datastructure is adequate for storing a mathematical real number. Not even if you have infinite memory. Nope. If infinite memory was tangible, you would be able to store any real number. -- Joao Morais __

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ? (GMP)

2007-10-29 Thread mm
Tom Verhoeff a écrit : In fact, the GMP (GNU Multiple Precision Arithmetic Library ) offers this and more. Unfortunately, there does not seem to be a complete FreePascal interface for it. Maybe it is easy to adapt (if necessary?) the GNU Pascal interface for GMP

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Daniël Mantione
Op Mon, 29 Oct 2007, schreef L: > > Same as ansistring.. it can be dangerous to hide all the intricate details > > of > a > > pchar/bytearray, which is what ansistring does. But ansistrings are really > > useful for 'every day' use. > > > > Wrong. A string can be represented "alphadequate", as

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread L
> Same as ansistring.. it can be dangerous to hide all the intricate details of a > pchar/bytearray, which is what ansistring does. But ansistrings are really > useful for 'every day' use. > > Wrong. A string can be represented "alphadequate", as it is called; an > > ansistring can handle any stri

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread L
> It means it displays 10 and has 2 additional digits for internal use. As I > said, the easiest way to check this is to push the pi button and subtract > the number you see in the display. > > Probably -4*10-10 :) Yes, that's what happens on mine. > > Unfortunatly I don't use calculators that m

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ? (GMP)

2007-10-29 Thread Tom Verhoeff
On Mon, Oct 29, 2007 at 06:36:11PM +0100, Micha Nelissen wrote: > > It's possible to create a type that stores the numerator and > denominator, but then you would need to "simplify" to extract common > factors on every calculation, otherwise it would quickly run out of > range (Integer or whatever

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Florian Klaempfl
Daniël Mantione schrieb: > > Op Mon, 29 Oct 2007, schreef L: > >>> Your Casio doesn't do comparisons. Just round to 10 digits before you >>> compare and it'll work just as fine as on your Casio. >>> >>> Daniël >> >> And some off topic trivia: >> >> My casio says "10 + 2 digits" near the model num

Re: [fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 11:42, Tobias Giesen wrote: Yes, add the -CX- -X- command line options. Or better: turn off all smart linking related options in Lazarus. Thanks! I did both, but somehow the error is still there. All the units compile fine, only the last step where the .dpr file is comp

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Florian Klaempfl
L schrieb: >> It's just one more funny thing one must realize, >> when comparing real numbers with some exact >> real constants. After this, I will try to never >> compare doubles directly, but using tricks like >> above. Because, in this digital world >> 1 + 0.4 - 0.4 <> 1. > > My opinion: > This

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Micha Nelissen
Stephen Dickason wrote: > In binary that is 0001 + 0.0110011001100 - 0.0110011001100 because > we hit recurring decimals a lot more in binary than decimal. I wonder why we > don't have a standard format (maybe we do?) that factors in the remainder as > part of the number also? It's po

RE: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Daniël Mantione
Op Mon, 29 Oct 2007, schreef Stephen Dickason: > > It's just one more funny thing one must realize, > > when comparing real numbers with some exact > > real constants. After this, I will try to never > > compare doubles directly, but using tricks like > > above. Because, in this digital world >

RE: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Stephen Dickason
> It's just one more funny thing one must realize, > when comparing real numbers with some exact > real constants. After this, I will try to never > compare doubles directly, but using tricks like > above. Because, in this digital world > 1 + 0.4 - 0.4 <> 1. In binary that is 0001 + 0.01100110

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Daniël Mantione
Op Mon, 29 Oct 2007, schreef L: > Same as ansistring.. it can be dangerous to hide all the intricate details of > a > pchar/bytearray, which is what ansistring does. But ansistrings are really > useful for 'every day' use. Wrong. A string can be represented "alphadequate", as it is called; an

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread L
> > > > The end user is using a high level language and should not care whether the > > computer is digital or analog. > > Unfortunately, there is a problem. One can try to hide it (as calculators > attempt to do), but in the longer run that is going to be unsuccessful > and even dangerous. Same

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Tom Verhoeff
On Mon, Oct 29, 2007 at 07:30:03AM -0700, L wrote: > > It's just one more funny thing one must realize, > > when comparing real numbers with some exact > > real constants. After this, I will try to never > > compare doubles directly, but using tricks like > > above. Because, in this digital world >

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Daniël Mantione
Op Mon, 29 Oct 2007, schreef L: > > Your Casio doesn't do comparisons. Just round to 10 digits before you > > compare and it'll work just as fine as on your Casio. > > > > Daniël > > > And some off topic trivia: > > My casio says "10 + 2 digits" near the model number. > > Does this mean it d

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Michael Van Canneyt
On Mon, 29 Oct 2007, L wrote: > > > The programmer definitely should care. He has to make the right choice > > in what type he chooses, so he must be aware of any 'quircks' of the type > > he is using, and that includes how things are rounded and how they are > > stored in memory. That's why th

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread L
> Your Casio doesn't do comparisons. Just round to 10 digits before you > compare and it'll work just as fine as on your Casio. > > Daniël And some off topic trivia: My casio says "10 + 2 digits" near the model number. Does this mean it displays 10 digits and stores 2 in the background, or that

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Daniël Mantione
Op Mon, 29 Oct 2007, schreef L: > > It's just one more funny thing one must realize, > > when comparing real numbers with some exact > > real constants. After this, I will try to never > > compare doubles directly, but using tricks like > > above. Because, in this digital world > > 1 + 0.4 - 0.4

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 15:30, L wrote: It's just one more funny thing one must realize, when comparing real numbers with some exact real constants. After this, I will try to never compare doubles directly, but using tricks like above. Because, in this digital world 1 + 0.4 - 0.4 <> 1. My opinion:

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread L
> The programmer definitely should care. He has to make the right choice > in what type he chooses, so he must be aware of any 'quircks' of the type > he is using, and that includes how things are rounded and how they are > stored in memory. That's why there are IEEE references for this. > > It's

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread Michael Van Canneyt
On Mon, 29 Oct 2007, L wrote: > > It's just one more funny thing one must realize, > > when comparing real numbers with some exact > > real constants. After this, I will try to never > > compare doubles directly, but using tricks like > > above. Because, in this digital world > > 1 + 0.4 - 0.4 <

Re: [fpc-pascal] Re: Why this evaluates on "if" wrong ?

2007-10-29 Thread L
> It's just one more funny thing one must realize, > when comparing real numbers with some exact > real constants. After this, I will try to never > compare doubles directly, but using tricks like > above. Because, in this digital world > 1 + 0.4 - 0.4 <> 1. My opinion: This is ludicrous. The end

Re: [fpc-pascal] FPC and JAVA

2007-10-29 Thread L
> >> Also, all those icons in the menus look pretty weird (very few Mac > >> apps have that, and none that I currently use does), Also, on Windows I found the spacing was a bit big but not sure if this is normal MS OFfice style look and feel since I don't use that software much. For example it lo

Re: [fpc-pascal] FPC and JAVA

2007-10-29 Thread Mattias Gaertner
On Mon, 29 Oct 2007 11:36:44 +0100 (CET) Daniël Mantione <[EMAIL PROTECTED]> wrote: > > > Op Mon, 29 Oct 2007, schreef Jonas Maebe: > > > > > On 27 Oct 2007, at 17:22, Mattias Gaertner wrote: > > > > > > Also, all those icons in the menus look pretty weird (very few > > > > Mac apps have that

Re: [fpc-pascal] FPC and JAVA

2007-10-29 Thread Michael Van Canneyt
On Mon, 29 Oct 2007, Daniël Mantione wrote: > > > Op Mon, 29 Oct 2007, schreef Jonas Maebe: > > > > > On 27 Oct 2007, at 17:22, Mattias Gaertner wrote: > > > > > > Also, all those icons in the menus look pretty weird (very few Mac > > > > apps have that, and none that I currently use does),

Re: [fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Tobias Giesen
> Yes, add the -CX- -X- command line options. > Or better: turn off all smart linking related options in Lazarus. Thanks! I did both, but somehow the error is still there. All the units compile fine, only the last step where the .dpr file is compiled fails. The .s file of the main program remain

Re: [fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 11:36, Mattias Gaertner wrote: Yes, add the -CX- -X- command line options. Dead code stripping is not supported by the 10.3 assembler/linker. The compiler has however no clue on which OS version it is running, so if Lazarus tells it to generate smart linkable code, it will do

Re: [fpc-pascal] FPC and JAVA

2007-10-29 Thread Daniël Mantione
Op Mon, 29 Oct 2007, schreef Jonas Maebe: > > On 27 Oct 2007, at 17:22, Mattias Gaertner wrote: > > > > Also, all those icons in the menus look pretty weird (very few Mac > > > apps have that, and none that I currently use does), > > > > Should they be hidden? > > In general, I would say: ye

Re: [fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Mattias Gaertner
On Mon, 29 Oct 2007 11:08:48 +0100 Jonas Maebe <[EMAIL PROTECTED]> wrote: > > On 29 Oct 2007, at 11:03, Tobias Giesen wrote: > > > I am now trying the latest Lazarus snapshots on OS X 10.3 on a > > powerpc Mac. The application compiles 99% fine but at the end it > > fails with the > > following

Re: [fpc-pascal] Compiling / Make problems, latest SVN

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 11:26, Tobias Giesen wrote: thanks for the new Makefiles! I am now at SVN rev. 8988 and when I enter cd fpc/compiler make cycle CPU_TARGET=powerpc I get: Makefile:125: *** Compiler ppcrossppc not found. Stop. I don't know what's happening. In this step, I do not want to c

Re: [fpc-pascal] FPC and JAVA

2007-10-29 Thread Jonas Maebe
On 27 Oct 2007, at 17:22, Mattias Gaertner wrote: Also, all those icons in the menus look pretty weird (very few Mac apps have that, and none that I currently use does), Should they be hidden? In general, I would say: yes. Maybe it should be an option which by default is off, or so. Jo

Re: [fpc-pascal] Compiling / Make problems, latest SVN

2007-10-29 Thread Tobias Giesen
Hello, thanks for the new Makefiles! I am now at SVN rev. 8988 and when I enter cd fpc/compiler make cycle CPU_TARGET=powerpc I get: Makefile:125: *** Compiler ppcrossppc not found. Stop. I don't know what's happening. In this step, I do not want to crosscompile. I want to _make_ the cross-c

Re: [fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 11:08, Jonas Maebe wrote: unknown section attribute: no_dead_strip [...] Error while assembling Exit Code 1 Is there a solution for this problem? Yes, add the -CX- -X- command line options. Or better: turn off all smart linking related options in Lazarus. Jonas ___

Re: [fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 11:03, Tobias Giesen wrote: I am now trying the latest Lazarus snapshots on OS X 10.3 on a powerpc Mac. The application compiles 99% fine but at the end it fails with the following errors (from the assembler, I assume): unknown section attribute: no_dead_strip [...] Error

[fpc-pascal] no_dead_strip not recognized by OS X 10.3 assembler

2007-10-29 Thread Tobias Giesen
Hello, I am now trying the latest Lazarus snapshots on OS X 10.3 on a powerpc Mac. The application compiles 99% fine but at the end it fails with the following errors (from the assembler, I assume): unknown section attribute: no_dead_strip [...] Error while assembling Exit Code 1 Is there a solu

Re: [fpc-pascal] Compiling / Make problems, latest SVN

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 09:35, Jonas Maebe wrote: Fatal: Can't find unit process used by pkgglobals How can I fix this? That's a bug in the current svn sources (which breaks compilation on virtually all platforms), and will probably be fixed somewhere today. Should be fixed now. Jonas ___

Re: [fpc-pascal] Compiling / Make problems, latest SVN

2007-10-29 Thread Vincent Snijders
Jonas Maebe schreef: On 29 Oct 2007, at 07:54, Tobias Giesen wrote: I am trying to compile the latest FPC 2.3 SVN on OS X i386 with CPU_TARGET=powerpc. The crosscompiling guide on the freepascal web site says to do a: make cycle make cycle only works in the compiler subdirectory. But cycl

Re: [fpc-pascal] Compiling / Make problems, latest SVN

2007-10-29 Thread Jonas Maebe
On 29 Oct 2007, at 07:54, Tobias Giesen wrote: I am trying to compile the latest FPC 2.3 SVN on OS X i386 with CPU_TARGET=powerpc. The crosscompiling guide on the freepascal web site says to do a: make cycle make cycle only works in the compiler subdirectory. But cycle seems to be no longe