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: Fix catan, catanh inaccuracy through use of log (bug 15394)


On 04/24/2013 06:42 PM, Joseph S. Myers wrote:
Bug 15394 is inaccuracy of catan and catanh for certain arguments
where they involve computing log of a number close to 1 (or in the
case of catanh, subtracting logs of similar arguments, which could
lead to worse results in some cases than computing the log of their
ratio, through large cancellation even when the ratio isn't that close
to 1).

This patch fixes this inaccuracy by using log1p except in the cases
where log of a number close to 0 is involved, when use of log1p of a
number close to -1 would yield worse results than log and so log of a
ratio is used instead.

Tested x86_64 and x86 and ulps updated accordingly.

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


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