[fpc-devel] Pure function Wiki page
Max Nazhalov
stein_nospam at mail.ru
Wed Jul 11 13:12:40 CEST 2018
Tue, 10 Jul 2018 03:36:01 +1000 Thorsten Engler wrote:
>> -----Original Message-----
>> From: fpc-devel <fpc-devel-bounces at lists.freepascal.org> On Behalf Of
>> Max Nazhalov via fpc-devel
>> Sent: Tuesday, 10 July 2018 02:25
>>
>> Just one question: doesn't all this new stuff introduce another kind
>> of mess during cross-compiling?
>>
>> E.g. some complex nested const.expr. "sin(cos(0.12345))" evaluated by
>> the compiler on x64 (double precision) is not the same as if it would
>> be evaluated by the compiled program itself running on some x32
>> (float80), or some future float128 alikes..
> How would that be any different from floating point consts
> currently that are defined with an expression involving calculations?
Intermediate results may fall out of the compiler range capabilities,
or introduce lost of precision in generated constant (e.g. Win64->Win32
cross-compiler is able to do only double-precision calculations, however
the resulting program is fully float80-capable).
(Hopefully compiling will just fail with over/underflow, but I cannot
check this right now).
In any case, I see no other but softfloat solution, as Florian already
mention, and this would be a big performance impact, I suspect.. :(
--
Best regards,
Max mailto:stein_nospam at mail.ru
More information about the fpc-devel
mailing list