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]

Bug is recent math library changes


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]