On Sat, 28 Apr 2018 02:48:14 +1000 "Thorsten Engler" <thorsten.eng...@gmx.net> wrote:
> For what it’s worth, Delphi simply decided to give up on doing it correctly > and silently fail if the double is too large to fit in an Int64. >[...] > WriteLn(Frac(1e15+0.5)); > > WriteLn(Frac(1e16+0.5)); > > When executed in 32bit code, returns: That means it has the Extended 80bit type, so it can handle the 1e16+0.5. http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Extended > 5.00000000000000E-0001 > > 5.00000000000000E-0001 > > > > And when executed in 64bit code, returns: That means it has only the 64bit double type, so the +0.5 is lost. > 5.00000000000000E-0001 > > 0.00000000000000E+0000 Mattias _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel