Bug 15429

Summary: ldbl-128 cos() inaccurate new pi/2
Product: glibc Reporter: David S. Miller <davem>
Component: mathAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: carlos
Priority: P2 Flags: fweimer: security-
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description David S. Miller 2013-05-02 20:34:51 UTC
On sparc, which uses ldbl-128, the tests using cos() on pi/2 give
inaccurate results.  For example:

Test "cos (pi/2) == 0x1.cd129024e088a67cc74020bbea64p-115":
ildouble: 267676
ldouble: 267676
...
Test "sincos (pi/2, &sin_res, &cos_res) puts 0x1.cd129024e088a67cc74020bbea64p-115 in cos_res":
ildouble: 267676
ldouble: 267676
...
Function "cos":
ildouble: 267676
ldouble: 267676
...
Function "sincos":
ildouble: 267676
ldouble: 267676
Comment 1 Carlos O'Donell 2013-05-09 13:14:50 UTC
I'll be disabling this test for ldbl-128 until we fix this.
Comment 2 Joseph Myers 2013-05-09 21:31:18 UTC
Fixed for 2.18 by:

commit d0213cd0b629cae95ed9607fcf26793a3a0d686c
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Thu May 9 21:28:54 2013 +0000

    Fix ldbl-128 cos range reduction near pi/2 (bug 15429).