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/13837] New: Trig functions experience catastrophic precision loss at large argument magnitudes


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

             Bug #: 13837
           Summary: Trig functions experience catastrophic precision loss
                    at large argument magnitudes
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P2
         Component: math
        AssignedTo: unassigned@sourceware.org
        ReportedBy: bugdal@aerifal.cx
    Classification: Unclassified


On x86, glibc's sin(0x1p1023) returns:
-0.633004553570852834809556952677667140960693359375

The correct value (rounded to double precision, within 1ulp) is:
0.563127779850884024881452205590903759002685546875

Or, rounded to the DBL_DIG digits (15):
0.563127779850884

In case there's any doubt as to the true value, it agrees with Wolfram Alpha's
estimate of sin(2^1023), which is:
0.5631277798508840134529434079444683477103854907361251

Source:
http://www.wolframalpha.com/input/?i=sin%282%5E1023%29

Apparently glibc's trig functions are failing to perform argument reduction in
any sane way...

-- 
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]