Use of C99 extra long double math functions after r236148
Peter Jeremy
peter at rulingia.com
Sun Aug 12 23:01:33 UTC 2012
On 2012-Jul-22 16:10:56 -0700, Steve Kargl <sgk at troutmask.apl.washington.edu> wrote:
>The above isn't necessarily true. The Fortran standards from
>2003 and 2008, very care about NaN. Under certain conditions,
>if one has something like
>
> x = sin(NaN)
>
>in Fortran, then the returned NaN must be the one in the function
>call.
Even if it was a SNaN? My understanding is that SNaN should be
quietened if they are used in any further floating point operations.
> Having libm, do
>
> if (x == NaN)
> return (x + x);
>
>does/may not return the correct NaN.
I presume you mean
if (isnan(x))
return (x + x);
Do you have a test case that shows that? As far as I can tell, all
the FPUs I have access to will return a quietened variant of the
input NaN in this case (ie, only the signalling bit is altered).
--
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/1029dd18/attachment.pgp
More information about the freebsd-numerics
mailing list