This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use M_SQRT1_2l instead of local M_SQRT_2_2 in libm-test.inc


One of the defined constants in libm-test.inc, M_SQRT_2_2, has exactly
the same semantics as M_SQRT1_2l in math.h.  This patch changes the
test to use the macro in math.h directly instead.  Tested x86_64 and
x86.

(Not strictly needed for moving libm-test.inc to be table-based, but
noticed in the course of preparation for that.)

2013-05-09  Joseph Myers  <joseph@codesourcery.com>

	* math/libm-test.inc (M_SQRT_2_2): Remove macro.
	(csqrt_test): Use M_SQRT1_2l instead of M_SQRT_2_2.

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 8845054..c508af6 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -212,7 +212,6 @@
 #define M_PI2_LOG10El		0.682188176920920673742891812715677885L
 #define M_PI4_LOG10El		0.341094088460460336871445906357838943L
 #define M_PI_LOG10El		1.364376353841841347485783625431355770L
-#define M_SQRT_2_2		0.70710678118654752440084436210484903L /* sqrt (2) / 2 */
 
 #define ulps_file_name "ULPs"	/* Name of the ULPs file.  */
 static FILE *ulps_file;		/* File to document difference.  */
@@ -7081,7 +7080,7 @@ csqrt_test (void)
   TEST_c_c (csqrt, -2, 3, 0.89597747612983812471573375529004348L, 1.6741492280355400404480393008490519L);
   /* Principal square root should be returned (i.e., non-negative real
      part).  */
-  TEST_c_c (csqrt, 0, -1, M_SQRT_2_2, -M_SQRT_2_2);
+  TEST_c_c (csqrt, 0, -1, M_SQRT1_2l, -M_SQRT1_2l);
 
   TEST_c_c (csqrt, 0x1.fffffep+127L, 0x1.fffffep+127L, 2.026714405498316804978751017492482558075e+19L, 8.394925938143272988211878516208015586281e+18L);
   TEST_c_c (csqrt, 0x1.fffffep+127L, 1.0L, 1.844674352395372953599975585936590505260e+19L, 2.710505511993121390769065968615872097053e-20L);

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]