[PATCHv3,07/11] Replace M_El with lit_e in libm-test.inc
diff mbox

Message ID 7d91e6c3ff37776f85d0e9a7055dc5f242a7365a.1464297421.git.murphyp@linux.vnet.ibm.com
State New
Headers show

Commit Message

Paul E. Murphy May 26, 2016, 9:42 p.m. UTC
This is useful in situations where the long double type is
less precise than the type under test.

    	* libm-test.inc: Replace usage of M_El with
    	(lit_e): New macro.
---
 math/libm-test.inc | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Joseph Myers May 27, 2016, 1:35 p.m. UTC | #1
On Thu, 26 May 2016, Paul E. Murphy wrote:

> This is useful in situations where the long double type is
> less precise than the type under test.
> 
>     	* libm-test.inc: Replace usage of M_El with
>     	(lit_e): New macro.

OK.
Paul E. Murphy May 27, 2016, 5:13 p.m. UTC | #2
On 05/27/2016 08:35 AM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> This is useful in situations where the long double type is
>> less precise than the type under test.
>>
>>     	* libm-test.inc: Replace usage of M_El with
>>     	(lit_e): New macro.
> 
> OK.
> 

Committed as f64f68f.

Patch
diff mbox

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 38f03bd..874b6b8 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -328,6 +328,11 @@  struct ulp_data
 /* pi */
 #define lit_pi			LITM (M_PI)
 
+/* Other useful constants.  */
+
+/* e */
+#define lit_e			LITM (M_E)
+
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
 static int output_ulps;		/* Should ulps printed?  */
@@ -7104,7 +7109,7 @@  static const struct test_f_f_data fabs_test_data[] =
     TEST_f_f (fabs, -min_value, min_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (fabs, -max_value, max_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (fabs, 38.0, 38.0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_f_f (fabs, -M_El, M_El, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_f (fabs, -lit_e, lit_e, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
   };
 
 static void
@@ -7940,7 +7945,7 @@  hypot_test (void)
 static const struct test_f_i_data ilogb_test_data[] =
   {
     TEST_f_i (ilogb, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_f_i (ilogb, M_El, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_i (ilogb, lit_e, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, 1024, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, -2000, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_i (ilogb, 0.5, -1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED);
@@ -9112,7 +9117,7 @@  static const struct test_f_f_data logb_test_data[] =
     TEST_f_f (logb, -snan_value, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
 
     TEST_f_f (logb, 1, 0, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
-    TEST_f_f (logb, M_El, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
+    TEST_f_f (logb, lit_e, 1, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, 1024, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
     TEST_f_f (logb, -2000, 10, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),