[fpc-pascal] Floating point question

Bart bartjunk64 at gmail.com
Sat Jan 27 17:03:15 CET 2024


On Sat, Jan 27, 2024 at 1:40 PM Thomas Kurz via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:


> My problems are:
>
> 1. The "writeln" in line 32 correctly prints "0.0000" when (cross-) compiling to win64, but "39.375" when compiling to win32 (with ppc386).
On Win64 all math is done with double precision, on win32 all literal
floating point values in your code will be interpreted as Extended.
Cast everything to Double and the result will be the same on Win64 and Win32.


-- 
Bart


More information about the fpc-pascal mailing list