From: Bruno Haible <bruno@clisp.org>
Date: Sat, 10 Mar 2012 23:38:11 +0000 (+0100)
Subject: math tests: Small simplification.
X-Git-Tag: v0.1~873
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f4766fa950bb6f1e10354a4546ab229f463ef2e5;p=gnulib.git

math tests: Small simplification.

* tests/test-exp.h (test_function): Use the same err_bound for
'double' on platforms with sizeof (long double) == sizeof (double)
than on platforms with sizeof (long double) > sizeof (double).
* tests/test-exp2.h (test_function): Likewise.
* tests/test-expm1.h (test_function): Likewise.
* tests/test-log.h (test_function): Likewise.
---

diff --git a/ChangeLog b/ChangeLog
index 039f54b99a..2deb869ea4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-03-10  Bruno Haible  <bruno@clisp.org>
+
+	math tests: Small simplification.
+	* tests/test-exp.h (test_function): Use the same err_bound for
+	'double' on platforms with sizeof (long double) == sizeof (double)
+	than on platforms with sizeof (long double) > sizeof (double).
+	* tests/test-exp2.h (test_function): Likewise.
+	* tests/test-expm1.h (test_function): Likewise.
+	* tests/test-log.h (test_function): Likewise.
+
 2012-03-10  Bruno Haible  <bruno@clisp.org>
 
 	Fix some comments.
diff --git a/tests/test-exp.h b/tests/test-exp.h
index c2609b72db..b87c84de3b 100644
--- a/tests/test-exp.h
+++ b/tests/test-exp.h
@@ -33,7 +33,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
           precision in the compiler but 64 bits of precision at runtime.  See
@@ -62,7 +62,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        L_(2400.0)
 #else
diff --git a/tests/test-exp2.h b/tests/test-exp2.h
index daec29841e..f34260382d 100644
--- a/tests/test-exp2.h
+++ b/tests/test-exp2.h
@@ -73,7 +73,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
           precision in the compiler but 64 bits of precision at runtime.  See
@@ -102,7 +102,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        L_(2300.0)
 #else
diff --git a/tests/test-expm1.h b/tests/test-expm1.h
index c73e798b00..4b38494c3d 100644
--- a/tests/test-expm1.h
+++ b/tests/test-expm1.h
@@ -55,7 +55,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
           precision in the compiler but 64 bits of precision at runtime.  See
@@ -84,7 +84,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        L_(1536.0)
 #else
diff --git a/tests/test-log.h b/tests/test-log.h
index 65ae833641..76218725bf 100644
--- a/tests/test-log.h
+++ b/tests/test-log.h
@@ -43,7 +43,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
           precision in the compiler but 64 bits of precision at runtime.  See
@@ -72,7 +72,7 @@ test_function (void)
   {
     /* Error bound, in ulps.  */
     const DOUBLE err_bound =
-      (sizeof (DOUBLE) == sizeof (long double) ?
+      (sizeof (DOUBLE) > sizeof (double) ?
 #if defined __i386__ && defined __FreeBSD__
        /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of
           precision in the compiler but 64 bits of precision at runtime.  See