This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix exp2l inaccuracy (bug 13824)
On Wednesday, March 21, 2012 23:25:39 Joseph S. Myers wrote:
> I propose this patch to fix bug 13824, inaccuracy of the default exp2l
> implementation (used for ldbl-128 and ldbl-128ibm). This patch
> handles overflow and underflow (and infinity and NaN arguments) much
> as they are handled in the dbl-64 exp2, then for in-range arguments
> splits the integer and fractional parts, computes expl of M_LN2L times
> the fractional part and scales that exactly with scalbnl. This (a)
> avoids inaccurate results for integer arguments, as long as expl (0)
> is exactly 1, and (b) avoids the large errors (hundreds of ulps) for
> large arguments that arise from bits lost in the multiplication M_LN2l
> * x being significant for the mantissa after exponentiation (this
> problem arises for exponentials of large inexact numbers, not for
> numbers with small absolute value).
>
> Tested powerpc, x86 and x86_64 (the latter two in case of any ulps
> updates needed for the new tests). No ulps updates were needed for
> any of those architectures.
Thanks, this is ok,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126