This is the mail archive of the 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 ldbl-128 powl sign of result in overflow / underflow cases (bug 17097)

On 06/27/2014 11:52 PM, Joseph S. Myers wrote:
> This patch fixes bug 17097, ldbl-128 powl producing overflowing /
> underflowing results with positive sign when the result should have
> been negative.  This was shown up by the tests in non-default rounding
> modes added by my patch for bug 16315, but isn't actually limited to
> non-default rounding modes: rather, when rounding to nearest the
> wrappers produced a result with the correct sign and so always hid the
> bug unless -lieee was used to disable the wrappers.  The problem is
> that in the cases where Y is large enough that the result overflows or
> underflows for X not very close to 1, but not large enough to overflow
> or underflow for all X != ± 1 (in the latter case Y is always an
> even integer), a positive overflowing / underflowing result is always
> returned, rather than one with the correct sign.  This patch moves the
> relevant part of computation of the sign earlier and returns a result
> of the correct sign.

 Andreas Jaeger aj@{,} 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]