Bug is recent math library changes
Jeff Law
jeffreyalaw@gmail.com
Thu Jun 14 06:28:00 GMT 2012
This code:
/* compile with 'gcc -o powtest powtest.c -lm' */
#include <math.h>
#include <stdio.h>
int main()
{
double x = pow(0.0, -INFINITY);
printf("pow(0.0, -INFINITY) = %g (positive? %d)\n", x, x>0.0);
return 0;
}
Is currently not handled correctly by the trunk.
F9.4.4 states
pow (x, -INF) returns +INF when abs (x) < 1
However, with the head of the glibc trunk we're currently return -INF
for this case.
Git bisect blames this change:
commit 2460d3aa21f04cdf28497683bd3e29183189f779
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Mar 21 12:14:57 2012 +0000
Fix pow of zero and infinity to large powers.
More information about the Libc-alpha
mailing list