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

Sven Barth pascaldragon at googlemail.com
Thu May 3 07:56:39 CEST 2018

J. Gareth Moreton <gareth at moreton-family.com> schrieb am Do., 3. Mai 2018,

> Tests complete! It turns out that I was using SetExceptionMask wrong and
> subtracting rather than adding exInvalidOp.
> When exceptions are disabled, this new Frac function returns NaN when you
> pass in plus or minus infinity.  This is consistent with the specification
> as listed in Chapter 11, Section of the IntelĀ® 64 and IA-32
> Architectures Software Developer's Manual which dicates that if the cause
> is "Addition of opposite signed infinities or subtraction of like-signed
> infinities" (the last line in the procedure is SUBSD that effectively
> performs "x - Int(x)"), the result is to "Return the QNaN floating-point
> Indefinite".

Great! If you haven't done so, would you please make sure that your patch
is attached to the bug report so that I can find it? :)


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

More information about the fpc-devel mailing list