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]

Re: PATCH: [BZ #14803] Different ULPs depending on size of long intin GCC


On Sun, 4 Nov 2012, H.J. Lu wrote:

> 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?

Did you make sure that the hex float you chose for this half-way value is 
the correct one to add to pio2_lo to create an accurate approximation to 
pi/2?  (If neither is - if pio2_lo is actually pi/2 minus the 65-bit value 
that was wrongly given for pio2_hi - then you should replace both 
constants, pio2_hi by the correct result of rounding pi/2 to 64-bit, to 
nearest, and pio2_lo by the correct result of rounding pi/2 - pio2_hi, to 
nearest.)

Also, is pio4_hi the correct value of pio2_hi/2 after your patch?  It's 
probably a good idea to replace all three constants with hex float values 
at the same time, to make sure they all match up properly.

-- 
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]