summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-06-04 22:58:09 +0000
committerBruno Haible <bruno@clisp.org>2007-06-04 22:58:09 +0000
commitb16230b776af7cf76f75c483a7643786509b404f (patch)
tree2d7dbce1bf0e142bc5db4c6ded58963768eb135b /tests
parentd77c9cd8c648ec0943a951c48b181651ae00421b (diff)
downloadgnulib-b16230b776af7cf76f75c483a7643786509b404f.tar.gz
Avoid test failures on some PowerPC hardwares.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-frexpl.c8
-rw-r--r--tests/test-printf-frexpl.c9
2 files changed, 13 insertions, 4 deletions
diff --git a/tests/test-frexpl.c b/tests/test-frexpl.c
index 93cfa14434..f1446fe07d 100644
--- a/tests/test-frexpl.c
+++ b/tests/test-frexpl.c
@@ -40,10 +40,14 @@
while (0)
/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
- exponent for 'long double' is -964. For exponents below that, the
- precision may be truncated to the precision used for 'double'. */
+ exponent for 'long double' is -964. Similarly, on PowerPC machines,
+ LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+ is -968. For exponents below that, the precision may be truncated to the
+ precision used for 'double'. */
#ifdef __sgi
# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
#else
# define MIN_NORMAL_EXP LDBL_MIN_EXP
#endif
diff --git a/tests/test-printf-frexpl.c b/tests/test-printf-frexpl.c
index fe481eec85..2c1b1eb33d 100644
--- a/tests/test-printf-frexpl.c
+++ b/tests/test-printf-frexpl.c
@@ -39,11 +39,16 @@
while (0)
/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
- exponent for 'long double' is -964. For exponents below that, the
- precision may be truncated to the precision used for 'double'. */
+ exponent for 'long double' is -964. Similarly, on PowerPC machines,
+ LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+ is -968. For exponents below that, the precision may be truncated to the
+ precision used for 'double'. */
#ifdef __sgi
# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
# define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
+# define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP
#else
# define MIN_NORMAL_EXP LDBL_MIN_EXP
# define MIN_SUBNORMAL_EXP (LDBL_MIN_EXP - 100)