[PATCHv3,06/11] Replace M_PI_4l with lit_pi_4_d in libm-test.inc
diff mbox

Message ID 52dd29eebc886d8c3fa0df297789b6d95c73c6f2.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_PI_4l with
	(lit_pi_4_d): New macro.
---
 math/libm-test.inc | 54 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 28 insertions(+), 26 deletions(-)

Comments

Joseph Myers May 27, 2016, 1:33 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_PI_4l with
> 	(lit_pi_4_d): New macro.

OK.
Paul E. Murphy May 27, 2016, 5:13 p.m. UTC | #2
On 05/27/2016 08:33 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_PI_4l with
>> 	(lit_pi_4_d): New macro.
> 
> OK.
> 

Committed as 9513192.

Patch
diff mbox

diff --git a/math/libm-test.inc b/math/libm-test.inc
index d81585b..38f03bd 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -323,6 +323,8 @@  struct ulp_data
 #define lit_pi_ln10_d		LIT (1.364376353841841347485783625431355770)
 /* pi / 2 */
 #define lit_pi_2_d		LITM (M_PI_2)
+/* pi / 4 */
+#define lit_pi_4_d		LITM (M_PI_4)
 /* pi */
 #define lit_pi			LITM (M_PI)
 
@@ -2000,8 +2002,8 @@  static const struct test_ff_f_data atan2_test_data[] =
     TEST_ff_f (atan2, -min_subnorm_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, -max_value, minus_infty, -lit_pi, ERRNO_UNCHANGED),
 
-    TEST_ff_f (atan2, plus_infty, plus_infty, M_PI_4l, ERRNO_UNCHANGED),
-    TEST_ff_f (atan2, minus_infty, plus_infty, -M_PI_4l, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, plus_infty, plus_infty, lit_pi_4_d, ERRNO_UNCHANGED),
+    TEST_ff_f (atan2, minus_infty, plus_infty, -lit_pi_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, plus_infty, minus_infty, lit_pi_3_m_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, minus_infty, minus_infty, -lit_pi_3_m_4_d, ERRNO_UNCHANGED),
     TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED),
@@ -2098,8 +2100,8 @@  static const struct test_c_c_data cacos_test_data[] =
     TEST_c_c (cacos, minus_infty, plus_infty, lit_pi_3_m_4_d, minus_infty),
     TEST_c_c (cacos, minus_infty, minus_infty, lit_pi_3_m_4_d, plus_infty),
 
-    TEST_c_c (cacos, plus_infty, plus_infty, M_PI_4l, minus_infty),
-    TEST_c_c (cacos, plus_infty, minus_infty, M_PI_4l, plus_infty),
+    TEST_c_c (cacos, plus_infty, plus_infty, lit_pi_4_d, minus_infty),
+    TEST_c_c (cacos, plus_infty, minus_infty, lit_pi_4_d, plus_infty),
 
     TEST_c_c (cacos, -10.0, plus_infty, lit_pi_2_d, minus_infty),
     TEST_c_c (cacos, -10.0, minus_infty, lit_pi_2_d, plus_infty),
@@ -2785,8 +2787,8 @@  static const struct test_c_c_data cacosh_test_data[] =
     TEST_c_c (cacosh, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
     TEST_c_c (cacosh, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
-    TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, M_PI_4l),
-    TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
+    TEST_c_c (cacosh, plus_infty, plus_infty, plus_infty, lit_pi_4_d),
+    TEST_c_c (cacosh, plus_infty, minus_infty, plus_infty, -lit_pi_4_d),
 
     TEST_c_c (cacosh, -10.0, plus_infty, plus_infty, lit_pi_2_d),
     TEST_c_c (cacosh, -10.0, minus_infty, plus_infty, -lit_pi_2_d),
@@ -3481,9 +3483,9 @@  static const struct test_c_f_data carg_test_data[] =
     /* carg (-inf + i y) == -pi for finite y < 0.  */
     TEST_c_f (carg, minus_infty, -10.0, -lit_pi),
 
-    TEST_c_f (carg, plus_infty, plus_infty, M_PI_4l),
+    TEST_c_f (carg, plus_infty, plus_infty, lit_pi_4_d),
 
-    TEST_c_f (carg, plus_infty, minus_infty, -M_PI_4l),
+    TEST_c_f (carg, plus_infty, minus_infty, -lit_pi_4_d),
 
     TEST_c_f (carg, minus_infty, plus_infty, lit_pi_3_m_4_d),
 
@@ -3507,10 +3509,10 @@  static const struct test_c_c_data casin_test_data[] =
     TEST_c_c (casin, 0, minus_zero, 0.0, minus_zero),
     TEST_c_c (casin, minus_zero, minus_zero, minus_zero, minus_zero),
 
-    TEST_c_c (casin, plus_infty, plus_infty, M_PI_4l, plus_infty),
-    TEST_c_c (casin, plus_infty, minus_infty, M_PI_4l, minus_infty),
-    TEST_c_c (casin, minus_infty, plus_infty, -M_PI_4l, plus_infty),
-    TEST_c_c (casin, minus_infty, minus_infty, -M_PI_4l, minus_infty),
+    TEST_c_c (casin, plus_infty, plus_infty, lit_pi_4_d, plus_infty),
+    TEST_c_c (casin, plus_infty, minus_infty, lit_pi_4_d, minus_infty),
+    TEST_c_c (casin, minus_infty, plus_infty, -lit_pi_4_d, plus_infty),
+    TEST_c_c (casin, minus_infty, minus_infty, -lit_pi_4_d, minus_infty),
 
     TEST_c_c (casin, -10.0, plus_infty, minus_zero, plus_infty),
     TEST_c_c (casin, -10.0, minus_infty, minus_zero, minus_infty),
@@ -4197,10 +4199,10 @@  static const struct test_c_c_data casinh_test_data[] =
     TEST_c_c (casinh, 0, minus_zero, 0.0, minus_zero),
     TEST_c_c (casinh, minus_zero, minus_zero, minus_zero, minus_zero),
 
-    TEST_c_c (casinh, plus_infty, plus_infty, plus_infty, M_PI_4l),
-    TEST_c_c (casinh, plus_infty, minus_infty, plus_infty, -M_PI_4l),
-    TEST_c_c (casinh, minus_infty, plus_infty, minus_infty, M_PI_4l),
-    TEST_c_c (casinh, minus_infty, minus_infty, minus_infty, -M_PI_4l),
+    TEST_c_c (casinh, plus_infty, plus_infty, plus_infty, lit_pi_4_d),
+    TEST_c_c (casinh, plus_infty, minus_infty, plus_infty, -lit_pi_4_d),
+    TEST_c_c (casinh, minus_infty, plus_infty, minus_infty, lit_pi_4_d),
+    TEST_c_c (casinh, minus_infty, minus_infty, minus_infty, -lit_pi_4_d),
 
     TEST_c_c (casinh, -10.0, plus_infty, minus_infty, lit_pi_2_d),
     TEST_c_c (casinh, -10.0, minus_infty, minus_infty, -lit_pi_2_d),
@@ -4887,10 +4889,10 @@  static const struct test_c_c_data catan_test_data[] =
     TEST_c_c (catan, 0, minus_zero, 0, minus_zero),
     TEST_c_c (catan, minus_zero, minus_zero, minus_zero, minus_zero),
 
-    TEST_c_c (catan, 1.0L, plus_zero, M_PI_4l, plus_zero),
-    TEST_c_c (catan, 1.0L, minus_zero, M_PI_4l, minus_zero),
-    TEST_c_c (catan, -1.0L, plus_zero, -M_PI_4l, plus_zero),
-    TEST_c_c (catan, -1.0L, minus_zero, -M_PI_4l, minus_zero),
+    TEST_c_c (catan, 1.0L, plus_zero, lit_pi_4_d, plus_zero),
+    TEST_c_c (catan, 1.0L, minus_zero, lit_pi_4_d, minus_zero),
+    TEST_c_c (catan, -1.0L, plus_zero, -lit_pi_4_d, plus_zero),
+    TEST_c_c (catan, -1.0L, minus_zero, -lit_pi_4_d, minus_zero),
     TEST_c_c (catan, plus_zero, 1.0L, plus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catan, minus_zero, 1.0L, minus_zero, plus_infty, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catan, plus_zero, -1.0L, plus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION),
@@ -5397,10 +5399,10 @@  static const struct test_c_c_data catanh_test_data[] =
     TEST_c_c (catanh, 1.0L, minus_zero, plus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catanh, -1.0L, plus_zero, minus_infty, plus_zero, DIVIDE_BY_ZERO_EXCEPTION),
     TEST_c_c (catanh, -1.0L, minus_zero, minus_infty, minus_zero, DIVIDE_BY_ZERO_EXCEPTION),
-    TEST_c_c (catanh, plus_zero, 1.0L, plus_zero, M_PI_4l),
-    TEST_c_c (catanh, minus_zero, 1.0L, minus_zero, M_PI_4l),
-    TEST_c_c (catanh, plus_zero, -1.0L, plus_zero, -M_PI_4l),
-    TEST_c_c (catanh, minus_zero, -1.0L, minus_zero, -M_PI_4l),
+    TEST_c_c (catanh, plus_zero, 1.0L, plus_zero, lit_pi_4_d),
+    TEST_c_c (catanh, minus_zero, 1.0L, minus_zero, lit_pi_4_d),
+    TEST_c_c (catanh, plus_zero, -1.0L, plus_zero, -lit_pi_4_d),
+    TEST_c_c (catanh, minus_zero, -1.0L, minus_zero, -lit_pi_4_d),
 
     TEST_c_c (catanh, plus_infty, plus_infty, 0.0, lit_pi_2_d),
     TEST_c_c (catanh, plus_infty, minus_infty, 0.0, -lit_pi_2_d),
@@ -6252,8 +6254,8 @@  static const struct test_c_c_data clog_test_data[] =
     TEST_c_c (clog, minus_infty, plus_infty, plus_infty, lit_pi_3_m_4_d),
     TEST_c_c (clog, minus_infty, minus_infty, plus_infty, -lit_pi_3_m_4_d),
 
-    TEST_c_c (clog, plus_infty, plus_infty, plus_infty, M_PI_4l),
-    TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -M_PI_4l),
+    TEST_c_c (clog, plus_infty, plus_infty, plus_infty, lit_pi_4_d),
+    TEST_c_c (clog, plus_infty, minus_infty, plus_infty, -lit_pi_4_d),
 
     TEST_c_c (clog, 0, plus_infty, plus_infty, lit_pi_2_d),
     TEST_c_c (clog, 3, plus_infty, plus_infty, lit_pi_2_d),