[fpc-devel] *** GMX Spamverdacht *** Re: Broken frac function in FPC3.1.1 / Windows x86_64

Thorsten Engler thorsten.engler at gmx.net
Fri Apr 27 19:48:09 CEST 2018


Yeah, I realized that myself and made a post about that a few minutes ago which seems to have crossed ways with yours...

I was just projecting my annoyance about the lack of precision when being forced to do math in double instead of extended... 

> -----Original Message-----
> From: fpc-devel <fpc-devel-bounces at lists.freepascal.org> On Behalf
> Of Mattias Gaertner
> Sent: Saturday, 28 April 2018 03:39
> To: fpc-devel at lists.freepascal.org
> Subject: *** GMX Spamverdacht *** Re: [fpc-devel] Broken frac
> function in FPC3.1.1 / Windows x86_64
> 
> On Sat, 28 Apr 2018 02:48:14 +1000
> "Thorsten Engler" <thorsten.engler at 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 at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list