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 of negative numbers to integer exponents (bugs 369, 2678,3866)


On 03/28/2012 03:41 PM, Joseph S. Myers wrote:
This patch fixes various problems with pow of negative numbers to
integer exponents, as reported in bugs 369, 2678 and 3866 (which this
patch completes fixing).  The assembly implementations for x86 and
x86_64 needed fixing to handle these cases (as noted in bug 369, the
patch there was incorrect); powl was the most complicated case because
of the need to determine parity rather than presume that "large"
integer exponents must be even, though pow will need such
complications as well later as part of fixing bug 706.
__kernel_standard needed to handle getting the sign of zero right for
underflow.  __kernel_standard_l needed to handle pow overflow and
underflow directly itself, rather than passing to __kernel_standard,
because the sign of the result depends on the parity of an integer
exponent that may not round exactly to double.

What fun ;)


Tested x86 and x86_64.

Thanks, this is 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]