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


On 03/11/2014 09:59 PM, Joseph S. Myers wrote:
> ISO C requires the result of nextafter to be independent of the
> rounding mode, even when underflow or overflow occurs.  This patch
> fixes the bug in various nextafter implementations that, having done
> an overflowing computation to force an overflow exception (correct),
> they then return the result of that computation rather than an
> infinity computed some other way (incorrect, when the overflowing
> result of arithmetic with that sign and rounding mode is finite but
> the correct result is infinite) - generally by falling through to
> existing code to return a value that in fact is correct for this case
> (but was computed by an integer increment and so without generating
> the exceptions required).  Having fixed the bug, the previously
> deferred conversion of nextafter testing in libm-test.inc to
> ALL_RM_TEST is also included.

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]