Use of C99 extra long double math functions after r236148

Peter Jeremy peter at rulingia.com
Sun Aug 12 23:01:01 UTC 2012


On 2012-Jul-22 22:12:19 +1000, Peter Jeremy <peter at server.rulingia.com> wrote:
>A have simplified the default (NaN + I*NaN) return from catanh() to
>the minimun to ensure that both real & imaginary parts return as NaN.
>I've been doing some experiments on mixing NaNs using x87, SSE, SPARC64
>and ARM (last on Linux) and have come to the conclusion that there is
>no standard behaviour:  Given x & y as NaNs, (x+y) can return either
>x or y, possibly with the sign bit from the other operand. depending
>on the FPU.

I've tried running my exception test program on Solaris/SPARC using
SunStudio and it gives different results to FreeBSD/sparc64 in some
cases so it looks like the FreeBSD/sparc64 exception handling code
is also buggy.

And, when the base gcc tries to shortcut floating point expressions
and execute them at compile time, it also gets exception handling
wrong in several cases (it'll correctly detect that a constant
expression evaluates to Inf or NaN but, in many cases, the NaN it
calculates is different to the x87 or SSE evaluation of the same
arguments).

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-numerics/attachments/20120812/14263faf/attachment.pgp


More information about the freebsd-numerics mailing list