From ddc3ed9d3d646311f47a50cf80efc680fbc32a84 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 21 Dec 2000 04:17:49 +0000 Subject: Update. 2000-12-20 Ulrich Drepper * 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. --- sysdeps/i386/fpu/s_nextafterl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/i386/fpu/s_nextafterl.c b/sysdeps/i386/fpu/s_nextafterl.c index 2943a61..89adf04 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; } } } -- cgit v1.1