[fpc-pascal] Floating point question
James Richters
james.richters at productionautomation.net
Sun Feb 4 16:51:45 CET 2024
Hi Jonas,
That’s Interesting, Thank you very much for the links!! Not only an explanation but a solution.
The original is how I would expect it to work, If it's for Delphi compatibility why not only do that when in Mode Delphi? If not in mode Delphi who cares if it's compatible?
Delphi is completely wrong to do it this way.
I'm glad there is $EXCESSPRECISION I am Immediately putting that in every single program I have, because that is I always thought it would work, and I do have divisions where this can be a problem.
James
-----Original Message-----
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Jonas Maebe via fpc-pascal
Sent: Sunday, February 4, 2024 7:21 AM
To: fpc-pascal at lists.freepascal.org
Cc: Jonas Maebe <jonas at freepascal.org>
Subject: Re: [fpc-pascal] Floating point question
On 03/02/2024 18:42, James Richters via fpc-pascal wrote:
> Constants are also evaluated wrong,you don’t know what that constant
> is going to be used for, so all steps of evaluating a constant MUST be
> done in extended by the compiler, or the answer is just wrong.
See
https://wiki.freepascal.org/User_Changes_2.2.0#Floating_point_constants
and https://www.freepascal.org/daily/doc/prog/progsu19.html
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal at lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list