[fpc-pascal] Floating point question

Tomas Hajny XHajT03 at hajny.biz
Tue Feb 20 09:19:14 CET 2024


On 2024-02-20 08:03, Sven Barth via fpc-pascal wrote:
> James Richters via fpc-pascal <fpc-pascal at lists.freepascal.org>
> schrieb am Di., 20. Feb. 2024, 04:42:
> 
>> I don't know why it would be different in Windows than on Linux.
> 
> If you're using Win64, then the answer is simple: x86_64-win64 unlike
> any other x86 target does not support Extended, so neither the
> compiler nor the code in runtime will ever calculate anything with
> that precision.

Well, this probably isn't the (sole) reason in this particular case, 
because the results posted by Michael and coming from Linux (probably 
x86_64) were equal for constants and variables, but less precise than 
the result of run-time posted for Windows (unfortunately without 
specifying whether it was i386-win32 or x86_64-win64, but I'd guess for 
the former based on the results - exactly due to the reason mentioned by 
you).

Tomas


More information about the fpc-pascal mailing list