cvs commit: src/lib/msun/src s_nextafter.c s_nextafterf.c
Ceri Davies
ceri at submonkey.net
Sun Jan 23 10:54:36 PST 2005
On Sun, Jan 23, 2005 at 03:46:22PM +0000, David Schultz wrote:
> das 2005-01-23 15:46:22 UTC
>
> FreeBSD src repository
>
> Modified files:
> lib/msun/src s_nextafter.c s_nextafterf.c
> Log:
> If x == y, return y, not x. C99 (though not IEEE 754) requires that
> nextafter(+0.0, -0.0) returns -0.0 and nextafter(-0.0, +0.0) returns +0.0.
These comments should be updated too.
> | @@ -38,7 +38,7 @@ nextafter(double x, double y)
> | if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || /* x is nan */
> | ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) /* y is nan */
> | return x+y;
> | - if(x==y) return x; /* x=y, return x */
> | + if(x==y) return y; /* x=y, return x */
> | if((ix|lx)==0) { /* x == 0 */
> | INSERT_WORDS(x,hy&0x80000000,1); /* return +-minsubnormal */
> | y = x*x;
> | @@ -33,7 +33,7 @@ nextafterf(float x, float y)
> | if((ix>0x7f800000) || /* x is nan */
> | (iy>0x7f800000)) /* y is nan */
> | return x+y;
> | - if(x==y) return x; /* x=y, return x */
> | + if(x==y) return y; /* x=y, return x */
> | if(ix==0) { /* x == 0 */
> | SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */
> | y = x*x;
Ceri
--
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former. -- Einstein (attrib.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20050123/22f29cc0/attachment.bin
More information about the cvs-src
mailing list