Skip site navigation (1)Skip section navigation (2)
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

--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jan 23, 2005 at 03:46:22PM +0000, David Schultz wrote:
> das         2005-01-23 15:46:22 UTC
>=20
>   FreeBSD src repository
>=20
>   Modified files:
>     lib/msun/src         s_nextafter.c s_nextafterf.c=20
>   Log:
>   If x =3D=3D 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=
=2E0.

These comments should be updated too.

> | @@ -38,7 +38,7 @@ nextafter(double x, double y)
> |  	if(((ix>=3D0x7ff00000)&&((ix-0x7ff00000)|lx)!=3D0) ||   /* x is nan */
> |  	   ((iy>=3D0x7ff00000)&&((iy-0x7ff00000)|ly)!=3D0))     /* y is nan */
> |  	   return x+y;
> | -	if(x=3D=3Dy) return x;		/* x=3Dy, return x */
> | +	if(x=3D=3Dy) return y;		/* x=3Dy, return x */
> |  	if((ix|lx)=3D=3D0) {			/* x =3D=3D 0 */
> |  	    INSERT_WORDS(x,hy&0x80000000,1);	/* return +-minsubnormal */
> |  	    y =3D 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=3D=3Dy) return x;		/* x=3Dy, return x */
> | +	if(x=3D=3Dy) return y;		/* x=3Dy, return x */
> |  	if(ix=3D=3D0) {				/* x =3D=3D 0 */
> |  	    SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */
> |  	    y =3D x*x;

Ceri
--=20
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)

--CE+1k2dSO48ffgeK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFB8/LqocfcwTS3JF8RAoT2AJ4pNtuueglDBx9vRwfmwk/66CnEbgCeN+id
iIbjEPg0kLeaNiDQXUvbjE8=
=TwRV
-----END PGP SIGNATURE-----

--CE+1k2dSO48ffgeK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050123185434.GE98128>