Marco van de Voort wrote:
We also have a Delphi mode, which is getting increasingly important This is valid Delphi code unfortunately. I also thought it is ugly, specially from a mathematical viewpoint. I said that on the Delphi list, and it turns out to be specified in the IEEE standard (at least according to them)
Might be, but AFAIK Pascal is not based on IEEE. But interesting to see that apparently they take the IDEE standard more importantly than the Pascal standard. :-(
As I said, you (or Borland as well) might get problems with this if you support (now or in the future) any non-IEEE platform unless you want to emulate the complete FP then ...
For those platforms you need special handling anyhow, since the predefined constants also won't work.
That's what I meant. Any way of supporting them will be at best rather difficult and inefficient to support on these.
If you want access to these special values, you might rather want to supply them as predefined constants (like MinReal, MaxReal and EpsReal) -- though there may arise problems on non-IEEE FP systems (if you support any) which may not even know those values ...
I don't know how many types exist under IEEE. Afaik there are larger types? (doesn't the Itanium have 128 bit FP types?)
I think so, but how is this related?
How many constants you have to predefine for IEEE support.
I don't understand this question. IEEE defines some FP formats which imply certain constants, of course.
The predefined constants I was referring to are these of Pascal (not of Borland Pascal, though). I think there are only these 3. So for IEEE they'll have certain values, but since Pascal is not bound to IEEE arithmetic, they can have any other (reasonable) values, and the Pascal programmer can check them.
Frank