This is the mail archive of the glibc-bugs@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 math/14241] New: power (0.0, -INFINITY) produces wrong result


http://sourceware.org/bugzilla/show_bug.cgi?id=14241

             Bug #: 14241
           Summary: power (0.0, -INFINITY) produces wrong result
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: law@redhat.com
    Classification: Unclassified


#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.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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