[fpc-pascal] fpc 32 / 64 bit / c++/ floating point question

Helmut Hartl helmut.hartl at firmos.at
Mon Nov 22 09:55:16 CET 2010


Am 21.11.10 19:02, schrieb Vinzent Höfler:
> On Sun, 21 Nov 2010 18:54:13 +0100, Helmut Hartl<helmut.hartl at firmos.at>
> wrote:
>> Running the above program gives
>> 1) C++ / FPC 64 Bit
>>    6.3846106530
>>    6.3846106530
>> 2) FPC32 Bit
>>    6.3846106530
>>    6.3846111610
>>
>> Is this explainable or wrong behaviour ?
> First suspect candidate: the intermediate results are calculated with
> the 80-bit "temporary" float of the FPU on x86-32, while this is not
> the case on the 64 bit target.
Thanks for the idea - Looking a bit (one eyed) at the generated code
this seems to be the most likely reason.
I just gave up on the idea of comparing c++ / and fpc's calculations
directly.

helmut



More information about the fpc-pascal mailing list