about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/e_atan2l.c
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-09-02 11:01:07 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-09-13 15:33:59 -0500
commit02bbfb414f367c73196e6f23fa7435a08c92449f (patch)
tree5f70a6d722dbdb1d716f6cf4b34fd7ca50e62c80 /sysdeps/ieee754/ldbl-128/e_atan2l.c
parentfd37b5a78ab215ea2599250ec345e25545410bce (diff)
downloadglibc-02bbfb414f367c73196e6f23fa7435a08c92449f.tar.gz
glibc-02bbfb414f367c73196e6f23fa7435a08c92449f.tar.xz
glibc-02bbfb414f367c73196e6f23fa7435a08c92449f.zip
ldbl-128: Use L(x) macro for long double constants
This runs the attached sed script against these files using
a regex which aggressively matches long double literals
when not obviously part of a comment.

Likewise, 5 digit or less integral constants are replaced
with integer constants, excepting the two cases of 0 used
in large tables, which are also the only integral values
of the form x.0*E0L encountered within these converted
files.

Likewise, -L(x) is transformed into L(-x).

Naturally, the script has a few minor hiccups which are
more clearly remedied via the attached fixup patch.  Such
hiccups include, context-sensitive promotion to a real
type, and munging constants inside harder to detect
comment blocks.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/e_atan2l.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_atan2l.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_atan2l.c b/sysdeps/ieee754/ldbl-128/e_atan2l.c
index 520900705f..faecd1a63b 100644
--- a/sysdeps/ieee754/ldbl-128/e_atan2l.c
+++ b/sysdeps/ieee754/ldbl-128/e_atan2l.c
@@ -44,12 +44,12 @@
 #include <math_private.h>
 
 static const _Float128
-tiny  = 1.0e-4900L,
+tiny  = L(1.0e-4900),
 zero  = 0.0,
-pi_o_4  = 7.85398163397448309615660845819875699e-01L, /* 3ffe921fb54442d18469898cc51701b8 */
-pi_o_2  = 1.57079632679489661923132169163975140e+00L, /* 3fff921fb54442d18469898cc51701b8 */
-pi      = 3.14159265358979323846264338327950280e+00L, /* 4000921fb54442d18469898cc51701b8 */
-pi_lo   = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74020bbea64 */
+pi_o_4  = L(7.85398163397448309615660845819875699e-01), /* 3ffe921fb54442d18469898cc51701b8 */
+pi_o_2  = L(1.57079632679489661923132169163975140e+00), /* 3fff921fb54442d18469898cc51701b8 */
+pi      = L(3.14159265358979323846264338327950280e+00), /* 4000921fb54442d18469898cc51701b8 */
+pi_lo   = L(8.67181013012378102479704402604335225e-35); /* 3f8dcd129024e088a67cc74020bbea64 */
 
 _Float128
 __ieee754_atan2l(_Float128 y, _Float128 x)
@@ -86,8 +86,8 @@ __ieee754_atan2l(_Float128 y, _Float128 x)
 		switch(m) {
 		    case 0: return  pi_o_4+tiny;/* atan(+INF,+INF) */
 		    case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
-		    case 2: return  3.0L*pi_o_4+tiny;/*atan(+INF,-INF)*/
-		    case 3: return -3.0L*pi_o_4-tiny;/*atan(-INF,-INF)*/
+		    case 2: return  3*pi_o_4+tiny;/*atan(+INF,-INF)*/
+		    case 3: return -3*pi_o_4-tiny;/*atan(-INF,-INF)*/
 		}
 	    } else {
 		switch(m) {
@@ -103,8 +103,8 @@ __ieee754_atan2l(_Float128 y, _Float128 x)
 
     /* compute y/x */
 	k = (iy-ix)>>48;
-	if(k > 120) z=pi_o_2+0.5L*pi_lo;	/* |y/x| >  2**120 */
-	else if(hx<0&&k<-120) z=0.0L;		/* |y|/x < -2**120 */
+	if(k > 120) z=pi_o_2+L(0.5)*pi_lo;	/* |y/x| >  2**120 */
+	else if(hx<0&&k<-120) z=0;		/* |y|/x < -2**120 */
 	else z=__atanl(fabsl(y/x));		/* safe to do y/x */
 	switch (m) {
 	    case 0: return       z  ;	/* atan(+,+) */