This is the mail archive of the 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 libc/20490] New: cos is broken for many argument values

            Bug ID: 20490
           Summary: cos is broken for many argument values
           Product: glibc
           Version: 2.23
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: mwelinder at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Gnumeric's test suite fails badly because libc's implementation of cos
is completely broken.  In the following cases, a value near 1 is produced
while the expected value is near 0 as shown.

To be clear: this isn't a matter of being a little bit off.  The results
are completely wrong.  FWIW, my remaining 20k test cases as well as 20k
test cases for sin are correct to the last bit.  (And these test cases
are all from crlibm.)

cos(1.56897934354514)   0.0018169822499879413
cos(1.57037711629437)   0.0004192104882527396
cos(1.57039030076639)   0.0004060260173532676
cos(1.57038734145267)   0.00040898533082718385
cos(1.57032382985257)   0.0004724969247491758
cos(1.57072104158461)   7.528521021193726E-05
cos(1.57070239934268)   9.39274520795412E-05
cos(1.57076411367651)   3.2213118385456906E-05
cos(1.57076933205339)   2.6994741502697283E-05
cos(1.57078730132002)   9.025474872298193E-06
cos(1.57079163285142)   4.693943473288029E-06
cos(1.57078959045523)   6.736339666534601E-06
cos(1.57079060242746)   5.724367440537163E-06
cos(1.57079416327971)   2.1635151908379425E-06
cos(1.57079314183194)   3.184962957203722E-06
cos(1.57079550219782)   8.245970777921096E-07
cos(1.57079585928157)   4.6751333077647875E-07
cos(1.53234363306502)   0.03844321834305775
cos(1.53084652624933)   0.03993917483604875
cos(1.52691385661399)   0.04386838766880302
cos(1.52337859584618)   0.047399963616231014
cos(1.52388665475757)   0.04689246967242659
cos(1.54637691289056)   0.024416987062302536
cos(1.56128512373509)   0.009511059658487897
cos(1.55986436754728)   0.010931741506636932
cos(1.55534663463731)   0.015449077542725311
cos(1.56683423429666)   0.0039620821319713145
cos(1.56419798077001)   0.0065982981450101305
cos(1.56407546523456)   0.006720810963586297
cos(1.56359178279368)   0.007204481675525458
cos(1.56726783015917)   0.003528489313931174
cos(1.56729613789186)   0.003500181756046177

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]