about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/e_expl.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_expl.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_expl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_expl.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_expl.c b/sysdeps/ieee754/ldbl-128/e_expl.c
index 5de3572fc2..7924c8d35c 100644
--- a/sysdeps/ieee754/ldbl-128/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128/e_expl.c
@@ -71,51 +71,51 @@
 static const _Float128 C[] = {
 /* Smallest integer x for which e^x overflows.  */
 #define himark C[0]
- 11356.523406294143949491931077970765L,
+ L(11356.523406294143949491931077970765),
 
 /* Largest integer x for which e^x underflows.  */
 #define lomark C[1]
--11433.4627433362978788372438434526231L,
+L(-11433.4627433362978788372438434526231),
 
 /* 3x2^96 */
 #define THREEp96 C[2]
- 59421121885698253195157962752.0L,
+ L(59421121885698253195157962752.0),
 
 /* 3x2^103 */
 #define THREEp103 C[3]
- 30423614405477505635920876929024.0L,
+ L(30423614405477505635920876929024.0),
 
 /* 3x2^111 */
 #define THREEp111 C[4]
- 7788445287802241442795744493830144.0L,
+ L(7788445287802241442795744493830144.0),
 
 /* 1/ln(2) */
 #define M_1_LN2 C[5]
- 1.44269504088896340735992468100189204L,
+ L(1.44269504088896340735992468100189204),
 
 /* first 93 bits of ln(2) */
 #define M_LN2_0 C[6]
- 0.693147180559945309417232121457981864L,
+ L(0.693147180559945309417232121457981864),
 
 /* ln2_0 - ln(2) */
 #define M_LN2_1 C[7]
--1.94704509238074995158795957333327386E-31L,
+L(-1.94704509238074995158795957333327386E-31),
 
 /* very small number */
 #define TINY C[8]
- 1.0e-4900L,
+ L(1.0e-4900),
 
 /* 2^16383 */
 #define TWO16383 C[9]
- 5.94865747678615882542879663314003565E+4931L,
+ L(5.94865747678615882542879663314003565E+4931),
 
 /* 256 */
 #define TWO8 C[10]
- 256.0L,
+ 256,
 
 /* 32768 */
 #define TWO15 C[11]
- 32768.0L,
+ 32768,
 
 /* Chebyshev polynom coefficients for (exp(x)-1)/x */
 #define P1 C[12]
@@ -124,12 +124,12 @@ static const _Float128 C[] = {
 #define P4 C[15]
 #define P5 C[16]
 #define P6 C[17]
- 0.5L,
- 1.66666666666666666666666666666666683E-01L,
- 4.16666666666666666666654902320001674E-02L,
- 8.33333333333333333333314659767198461E-03L,
- 1.38888888889899438565058018857254025E-03L,
- 1.98412698413981650382436541785404286E-04L,
+ L(0.5),
+ L(1.66666666666666666666666666666666683E-01),
+ L(4.16666666666666666666654902320001674E-02),
+ L(8.33333333333333333333314659767198461E-03),
+ L(1.38888888889899438565058018857254025E-03),
+ L(1.98412698413981650382436541785404286E-04),
 };
 
 _Float128
@@ -185,7 +185,7 @@ __ieee754_expl (_Float128 x)
       ex2_u.ieee.exponent += n_i >> unsafe;
 
       /* Compute scale = 2^n_1.  */
-      scale_u.d = 1.0L;
+      scale_u.d = 1;
       scale_u.ieee.exponent += n_i - (n_i >> unsafe);
 
       /* Approximate e^x2 - 1, using a seventh-degree polynomial,