[fpc-devel] Broken frac function in FPC3.1.1 / Windows x86_64

Thorsten Engler thorsten.engler at gmx.net
Fri Apr 27 18:48:14 CEST 2018

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.





When executed in 32bit code, returns:





And when executed in 64bit code, returns:





Whoever had the *brilliant* idea to deprecate the FPU in 64bit mode should be shoot and quartered, not necessarily in that order. 64bit code is basically useless if you want to do anything meaningful with floats that are larger than fits into an int64.


From: fpc-devel <fpc-devel-bounces at lists.freepascal.org> On Behalf Of Sven Barth via fpc-devel
Sent: Saturday, 28 April 2018 01:51
To: FPC developers' list <fpc-devel at lists.freepascal.org>
Cc: Sven Barth <pascaldragon at googlemail.com>
Subject: *** GMX Spamverdacht *** Re: [fpc-devel] *** GMX Spamverdacht *** Re: Broken frac function in FPC3.1.1 / Windows x86_64


Thorsten Engler <thorsten.engler at gmx.net <mailto:thorsten.engler at gmx.net> > schrieb am Fr., 27. Apr. 2018, 17:47:

> That's true for i386. But on x86_64 cvt(t)sd2si instuctions can
> deal with int64 range, if destination register is a 64-bit one.

You are still going to be at least 960-bit short...


I've disabled the SSE variant for now again till we've decided how we want to proceed with this. 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20180428/d13c8ed2/attachment.html>

More information about the fpc-devel mailing list