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]

PATCH: [BZ #14803] Different ULPs depending on size of long int inGCC


Hi,

GCC generates encodes float-pointing constants slightly different,
depend on size of long int.  This patch uses hex float for one
problematic 96-bit long double constant.  Tested on x86-64 with x32
GCC and x86-64 GCC.  OK to install?

Thanks.


H.J.
--
2012-11-04  H.J. Lu  <hongjiu.lu@intel.com>

	[BZ #14803]
	* sysdeps/ieee754/ldbl-96/e_asinl.c (pio2_hi): Use hex float.

diff --git a/sysdeps/ieee754/ldbl-96/e_asinl.c b/sysdeps/ieee754/ldbl-96/e_asinl.c
index c33701f..757d25e 100644
--- a/sysdeps/ieee754/ldbl-96/e_asinl.c
+++ b/sysdeps/ieee754/ldbl-96/e_asinl.c
@@ -64,7 +64,9 @@
 static const long double
   one = 1.0L,
   huge = 1.0e+4932L,
- pio2_hi = 1.5707963267948966192021943710788178805159986950457096099853515625L,
+ /* Use hex float for 1.5707963267948966192021943710788178805159986950457096099853515625L
+    to avoid GCC PRs 21718/55145.  */
+  pio2_hi = 0xc.90fdaa22168c234p-3L,
   pio2_lo = 2.9127320560933561582586004641843300502121E-20L,
   pio4_hi = 7.8539816339744830960109718553940894025800E-1L,
 


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