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 pow in non-default rounding modes (bug 3976)


On Friday, March 02, 2012 23:30:39 Joseph S. Myers wrote:
> Similar to the patches for other functions, this patch fixes problems
> with pow producing wild results (or crashing) in non-default rounding
> modes by making it save and restore the rounding mode and do
> computations in round-to-nearest.
> 
> Unlike the other functions, pow is structured so that only a small
> part of the function, with a single return does any significant
> computations; the rest does special cases where the computations are
> at most a single multiplication or division and so it's fine (indeed
> best) for the rest to operate in the rounding mode with which the
> function was called.  Thus, this patch only saves and restores the
> rounding mode within that one block, making the patch much simpler
> than the others.
> 
> Tested on x86_64 and x86 and ULPs updated based on those tests.
> 
> This completes fixing the cases reported in bug 3976 of wild results
> from functions in non-default rounding modes.

Great!

This is ok, thanks,
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]