aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-04 01:27:16 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-04 01:27:16 +0000
commitfd8f4d46f560c594fa6ecad686f809947a67b2a6 (patch)
tree943662a56e339e7d16e9984330c552e247bfa75e
parent3d165855f2de19f3f5dc51d193dbe9431121a5c5 (diff)
downloadglibc-fd8f4d46f560c594fa6ecad686f809947a67b2a6.zip
glibc-fd8f4d46f560c594fa6ecad686f809947a67b2a6.tar.gz
glibc-fd8f4d46f560c594fa6ecad686f809947a67b2a6.tar.bz2
Update.
* math/test-misc.c (main): Test for pseudo denormal numbers on x86.
-rw-r--r--ChangeLog1
-rw-r--r--math/test-misc.c19
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3070399..bc30cc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
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/ldbl2mpn.c (__mpn_extract_long_double): Handle the
diff --git a/math/test-misc.c b/math/test-misc.c
index 04935dc..098695f 100644
--- a/math/test-misc.c
+++ b/math/test-misc.c
@@ -144,5 +144,24 @@ main (void)
}
#endif
+#ifdef __i386__
+ /* This is a test for the strange long doubles in x86 FPUs. */
+ {
+ union
+ {
+ char b[10];
+ long double d;
+ } u =
+ { .b = { 0, 0, 0, 0, 0, 0, 0, 0x80, 0, 0 } };
+
+ if (fpclassify (u.d) != FP_NORMAL)
+ {
+ printf ("fpclassify (0x00008000000000000000) failed: %d (%Lg)\n",
+ fpclassify (u.d), u.d);
+ result = 1;
+ }
+ }
+#endif
+
return result;
}