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


On 06/04/2014 07:50 PM, Joseph S. Myers wrote:
> This patch, relative to a tree with
> <https://sourceware.org/ml/libc-alpha/2014-06/msg00076.html> applied,
> fixes bug 16315, bad pow handling of overflow/underflow in non-default
> rounding modes.  Tests of pow are duly converted to ALL_RM_TEST to run
> all tests in all rounding modes.
> 
> There are two main issues here.  First, various implementations
> compute a negative result by negating a positive result, but this
> yields inappropriate overflow / underflow values for directed
> rounding, so either overflow / underflow results need recomputing in
> the correct sign, or the relevant overflowing / underflowing operation
> needs to be made to have a result of the correct sign.  Second, the
> dbl-64 implementation sets FE_TONEAREST internally; in the overflow /
> underflow case, the result needs recomputing in the original rounding
> mode.
> 
> Tested x86_64 and x86 and ulps updated accordingly.

Thanks, looks fine,

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]