summary refs log tree commit diff
path: root/stdlib/fpioconst.c
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2016-11-04 09:57:27 -0200
committerGabriel F. T. Gomes <gftg@linux.vnet.ibm.com>2017-06-07 16:58:42 -0300
commit82c19bdfe39164fda779c79a925c2050b19e421b (patch)
tree0867224cd0c83e3383fde82ac3875b61e1f7480f /stdlib/fpioconst.c
parent81df4d253dc3184fb003e4737b917e8d35c341d1 (diff)
downloadglibc-82c19bdfe39164fda779c79a925c2050b19e421b.tar.gz
glibc-82c19bdfe39164fda779c79a925c2050b19e421b.tar.xz
glibc-82c19bdfe39164fda779c79a925c2050b19e421b.zip
float128: Extend the power of ten tables
Update the power of ten tables used by the common implementation when long
double is not the most expressive real type.

	* stdlib/fpioconst.h: Include bits/floatn.h.
	(FPIOCONST_HAVE_EXTENDED_RANGE): New macro for testing how big the
	power of ten table should be.
	(FPIOCONST_POW10_ARRAY_SIZE): Use larger table if above is true.
	* stdlib/fpioconst.c (__tens): Use FPIOCONST_HAVE_EXTENDED_RANGE
	to include larger tables when _Float128 support is enabled.
	(_fpioconst_pow10): Likewise.
Diffstat (limited to 'stdlib/fpioconst.c')
-rw-r--r--stdlib/fpioconst.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/fpioconst.c b/stdlib/fpioconst.c
index 7db7fa4508..a0563b9676 100644
--- a/stdlib/fpioconst.c
+++ b/stdlib/fpioconst.c
@@ -112,7 +112,7 @@ const mp_limb_t __tens[] =
   0xd2db49ef, 0x926c3f5b, 0xae6209d4, 0x2d433949, 0x34f4a3c6, 0xd4305d94,
   0xd9d61a05, 0x00000325,
 
-#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
+#if FPIOCONST_HAVE_EXTENDED_RANGE
 # define TENS_P11_IDX	(TENS_P10_IDX + TENS_P10_SIZE)
 # define TENS_P11_SIZE	215
   [TENS_P11_IDX] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -659,7 +659,7 @@ const mp_limb_t __tens[] =
   0x6d6c0267, 0x06f9c25b, 0xbd6078e0, 0xb5fcdc81, 0xd742fa41, 0xcccc2399,
   0xc691adc0, 0x215ad82c, 0xea73b0c3, 0xa511e5b0, 0xf499e0a6, 0x53e27ab0,
   0xd94440a2, 0x47752521, 0x9a6e3644, 0xab113708, 0x8f8b301d, 0x058a42a3,
-#endif	/* !__NO_LONG_DOUBLE_MATH */
+#endif	/* FPIOCONST_HAVE_EXTENDED_RANGE */
 };
 
 #elif BITS_PER_MP_LIMB == 64
@@ -748,7 +748,7 @@ const mp_limb_t __tens[] =
   0xd2db49ef47187094ull, 0xae6209d4926c3f5bull, 0x34f4a3c62d433949ull,
   0xd9d61a05d4305d94ull, 0x0000000000000325ull,
 
-#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
+#if FPIOCONST_HAVE_EXTENDED_RANGE
 # define TENS_P11_IDX	(TENS_P10_IDX + TENS_P10_SIZE)
 # define TENS_P11_SIZE	108
   [TENS_P11_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
@@ -1320,7 +1320,7 @@ const struct mp_power _fpioconst_pow10[FPIOCONST_POW10_ARRAY_SIZE] =
   { TENS_P8_IDX, TENS_P8_SIZE,  	851,	 848 },
   { TENS_P9_IDX, TENS_P9_SIZE,	 	1701,	1698 },
   { TENS_P10_IDX, TENS_P10_SIZE,	3402,	3399 },
-#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
+#if FPIOCONST_HAVE_EXTENDED_RANGE
   { TENS_P11_IDX, TENS_P11_SIZE,	6804,	6800 },
   { TENS_P12_IDX, TENS_P12_SIZE,	13607,	13604 },
   { TENS_P13_IDX, TENS_P13_SIZE,	27214,	27210 },