about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-21 04:17:49 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-21 04:17:49 +0000
commitddc3ed9d3d646311f47a50cf80efc680fbc32a84 (patch)
tree5fb0c370bfc5cfe42b3be4086ae626a8fca8bae0 /sysdeps/i386
parent0a4c7b18e2f2224b87b27b2d31d8f96a6ddde847 (diff)
downloadglibc-ddc3ed9d3d646311f47a50cf80efc680fbc32a84.tar.gz
glibc-ddc3ed9d3d646311f47a50cf80efc680fbc32a84.tar.xz
glibc-ddc3ed9d3d646311f47a50cf80efc680fbc32a84.zip
Update.
2000-12-20  Ulrich Drepper  <drepper@redhat.com>

	* math/test-misc.c: Add more tests for nextafter functions.

	* sysdeps/i386/fpu/s_nextafterl.c: Handle change from denormal to
	normal correctly.  Correct test for sign.
	Based on a patch by HJ Lu.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/fpu/s_nextafterl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/i386/fpu/s_nextafterl.c b/sysdeps/i386/fpu/s_nextafterl.c
index 2943a613e3..89adf04aec 100644
--- a/sysdeps/i386/fpu/s_nextafterl.c
+++ b/sysdeps/i386/fpu/s_nextafterl.c
@@ -56,7 +56,7 @@ static char rcsid[] = "$NetBSD: $";
 	    y = x*x;
 	    if(y==x) return y; else return x;	/* raise underflow flag */
 	}
-	if(esx<0x8000) {			/* x > 0 */
+	if(esx>=0) {			/* x > 0 */
 	    if(ix>iy||((ix==iy) && (hx>hy||((hx==hy)&&(lx>ly))))) {
 	      /* x > y, x -= ulp */
 		if(lx==0) {
@@ -77,7 +77,7 @@ static char rcsid[] = "$NetBSD: $";
 		lx += 1;
 		if(lx==0) {
 		    hx += 1;
-		    if (hx==0)
+		    if (hx==0 || (esx == 0 && hx == 0x80000000))
 			esx += 1;
 		}
 	    }
@@ -102,7 +102,8 @@ static char rcsid[] = "$NetBSD: $";
 		lx += 1;
 		if(lx==0) {
 		    hx += 1;
-		    if (hx==0) esx += 1;
+		    if (hx==0 || (esx == 0xffff8000 && hx == 0x80000000))
+		      esx += 1;
 		}
 	    }
 	}