about summary refs log tree commit diff
path: root/sysdeps/alpha/fpu/s_isnan.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-07-01 08:27:49 -0700
committerRichard Henderson <rth@twiddle.net>2014-07-01 09:54:29 -0700
commit631021e0aaefbf9fde4b4472e4ec1d51fffb9bbd (patch)
treeadbde954b9fc983591973944e92dbedd5aafaad8 /sysdeps/alpha/fpu/s_isnan.c
parenta1ac3184fad4e7f28a85dee91825fc85bfaef89a (diff)
downloadglibc-631021e0aaefbf9fde4b4472e4ec1d51fffb9bbd.tar.gz
glibc-631021e0aaefbf9fde4b4472e4ec1d51fffb9bbd.tar.xz
glibc-631021e0aaefbf9fde4b4472e4ec1d51fffb9bbd.zip
alpha: Fix isnan
The isunordered formulation raises SIGFPE for SNaN.
Diffstat (limited to 'sysdeps/alpha/fpu/s_isnan.c')
-rw-r--r--sysdeps/alpha/fpu/s_isnan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/alpha/fpu/s_isnan.c b/sysdeps/alpha/fpu/s_isnan.c
index adfb4ccf36..d664f0cb10 100644
--- a/sysdeps/alpha/fpu/s_isnan.c
+++ b/sysdeps/alpha/fpu/s_isnan.c
@@ -31,7 +31,9 @@
 int
 __isnan (double x)
 {
-  return isunordered (x, x);
+  uint64_t ix;
+  EXTRACT_WORDS64 (ix, x);
+  return ix * 2 > 0xffe0000000000000ul;
 }
 
 hidden_def (__isnan)