This is the mail archive of the glibc-bugs@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]

[Bug math/13824] exp2l(small_integer) produces rounding errors


http://sourceware.org/bugzilla/show_bug.cgi?id=13824

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-03-09 00:19:42 UTC ---
As far as I can see, there are only "real" exp2l implementations for x86, 
x86_64 and m68k.  Any platform using ldbl-128 or ldbl-128ibm gets the 
fallback __ieee754_expl (M_LN2l * x).  That will have large errors for 
some inputs where the result is near LDBL_MAX, as well as the problem 
noted here for small integers.

The approach used for exp2 could be implemented for the two affected long 
double formats - but a simpler interim fix to the fallback implementation 
would be to make it separate the integer and fractional parts of the input 
and only use __ieee754_expl on M_LN2l * (fractional part); that should 
keep errors down to a few ulp.  Obviously testcases should be added to the 
testsuite that before such a fix did show large errors for large inputs.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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