summaryrefslogtreecommitdiff
path: root/gnulib-tests/test-isnanl.h
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
commit71cd8e3a743046573744123777061b64881bf372 (patch)
tree82522befe647f4fff186a5630cad0cad33f8ef53 /gnulib-tests/test-isnanl.h
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'gnulib-tests/test-isnanl.h')
-rw-r--r--gnulib-tests/test-isnanl.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/gnulib-tests/test-isnanl.h b/gnulib-tests/test-isnanl.h
index 015b0864..2e65afae 100644
--- a/gnulib-tests/test-isnanl.h
+++ b/gnulib-tests/test-isnanl.h
@@ -1,5 +1,5 @@
/* Test of isnanl() substitute.
- Copyright (C) 2007-2014 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ main ()
# ifdef WORDS_BIGENDIAN
# define LDBL80_WORDS(exponent,manthi,mantlo) \
{ ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
- ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
(unsigned int) (mantlo) << 16 \
}
# else
@@ -98,37 +98,31 @@ main ()
{ LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
ASSERT (isnanl (x.value));
}
- /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
- Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
- Intel IA-64 Architecture Software Developer's Manual, Volume 1:
- Application Architecture.
- Table 5-2 "Floating-Point Register Encodings"
- Figure 5-6 "Memory to Floating-Point Register Data Translation"
- */
+ /* isnanl should return something for noncanonical values. */
{ /* Pseudo-NaN. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Pseudo-Infinity. */
static memory_long_double x =
{ LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Pseudo-Zero. */
static memory_long_double x =
{ LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Unnormalized number. */
static memory_long_double x =
{ LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
{ /* Pseudo-Denormal. */
static memory_long_double x =
{ LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
- ASSERT (isnanl (x.value));
+ ASSERT (isnanl (x.value) || !isnanl (x.value));
}
#endif