Date: Sun, 23 Jan 2005 18:54:34 +0000 From: Ceri Davies <ceri@submonkey.net> To: David Schultz <das@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/msun/src s_nextafter.c s_nextafterf.c Message-ID: <20050123185434.GE98128@submonkey.net> In-Reply-To: <200501231546.j0NFkMuo058888@repoman.freebsd.org> References: <200501231546.j0NFkMuo058888@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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.)
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQFB8/LqocfcwTS3JF8RAoT2AJ4pNtuueglDBx9vRwfmwk/66CnEbgCeN+id
iIbjEPg0kLeaNiDQXUvbjE8=
=TwRV
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050123185434.GE98128>
