[fpc-devel] *** GMX Spamverdacht *** Re: Broken frac function in FPC3.1.1 / Windows x86_64
Sven Barth
pascaldragon at googlemail.com
Fri Apr 27 16:14:26 CEST 2018
Thorsten Engler <thorsten.engler at gmx.net> schrieb am Fr., 27. Apr. 2018,
16:09:
> Highest integer that fits in a Int64:
>
> 9223372036854775808
>
> 1e20:
>
> 100000000000000000000
>
>
>
> Your Int is overflowing.
>
>
>
> You can’t implement Frac by going through an Integer, that will never
> work. Except if you have an integer that can hold 1.8E308 (which would be a
> 1024 bit integer, or thereabouts)
>
Yes, I saw that now as well, though it's even worse as the cvttsd2si
instruction in fact only works with 32-bit integers.
That additionally means that Trunc() and Round() are broken for such values
as well as they rely on the same kind of functions. Int() works because it
doesn't have an SSE version.
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180427/4d79c903/attachment.html>
More information about the fpc-devel
mailing list