aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-04 04:56:36 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-04 04:56:36 +0000
commitf8da88b080504633c5442a4fcd234cb63912a7bf (patch)
tree0ab90dc0e4b87582b3c9eda396ca4aa5fd387581
parentfd8f4d46f560c594fa6ecad686f809947a67b2a6 (diff)
downloadglibc-f8da88b080504633c5442a4fcd234cb63912a7bf.zip
glibc-f8da88b080504633c5442a4fcd234cb63912a7bf.tar.gz
glibc-f8da88b080504633c5442a4fcd234cb63912a7bf.tar.bz2
Update.
* sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Hopefully fix the handling of denormalized numbers. * math/test-misc.c (main): Test for fpclassify and pseudo denormal numbers on x86. * sysdeps/i386/fpu/fpclassifyl.c: New file.
-rw-r--r--ChangeLog8
-rw-r--r--sysdeps/i386/fpu/s_nextafterl.c26
2 files changed, 28 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index bc30cc6..b083cef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
2000-12-03 Ulrich Drepper <drepper@redhat.com>
- * math/test-misc.c (main): Test for pseudo denormal numbers on x86.
- * sysdeps/i386/fpu/fpclassify.c: New file.
+ * sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Hopefully fix
+ the handling of denormalized numbers.
+
+ * math/test-misc.c (main): Test for fpclassify and pseudo denormal
+ numbers on x86.
+ * sysdeps/i386/fpu/fpclassifyl.c: New file.
* sysdeps/i386/ldbl2mpn.c (__mpn_extract_long_double): Handle the
pseudo denormal representation of LDBL_MIN.
diff --git a/sysdeps/i386/fpu/s_nextafterl.c b/sysdeps/i386/fpu/s_nextafterl.c
index bca7181..a905858 100644
--- a/sysdeps/i386/fpu/s_nextafterl.c
+++ b/sysdeps/i386/fpu/s_nextafterl.c
@@ -59,8 +59,17 @@ static char rcsid[] = "$NetBSD: $";
if(ix>iy||((ix==iy) && (hx>hy||((hx==hy)&&(lx>ly))))) {
/* x > y, x -= ulp */
if(lx==0) {
- if (hx==0) esx -= 1;
- hx -= 1;
+ if (hx <= 0x80000000) {
+ if (esx == 0)
+ hx = 0;
+ else {
+ esx -= 1;
+ hx = hx - 1;
+ if (esx > 0)
+ hx |= 0x80000000;
+ }
+ } else
+ hx -= 1;
}
lx -= 1;
} else { /* x < y, x += ulp */
@@ -75,8 +84,17 @@ static char rcsid[] = "$NetBSD: $";
if(esy>=0||(ix>iy||((ix==iy)&&(hx>hy||((hx==hy)&&(lx>ly)))))){
/* x < y, x -= ulp */
if(lx==0) {
- if (hx==0) esx -= 1;
- hx -= 1;
+ if (hx <= 0x80000000) {
+ if (esx == 0)
+ hx = 0;
+ else {
+ esx -= 1;
+ hx = hx - 1;
+ if (esx > 0)
+ hx |= 0x80000000;
+ }
+ } else
+ hx -= 1;
}
lx -= 1;
} else { /* x > y, x += ulp */