+++ This bug was initially created as a clone of Bug #13658 +++ sincosl() is inaccurate for large inputs on x86_64: with glibc 2.13, #define _GNU_SOURCE #include <stdio.h> #include <math.h> int main (void) { volatile long double x = 1.0e22; long double s1, s2, c1; sincosl (x, &s1, &c1); s2 = sinl (x); printf ("s1 = %.17Lg\n", s1); printf ("s2 = %.17Lg\n", s2); return 0; } outputs: s1 = -0.63300455357085282 s2 = -0.63300455357085282 Correct output would be: 0.85220084976718879
This applies to sinl, cosl, tanl and sincosl.
sinl, cosl, sincosl fixed by: commit 8848d99dce1e57168a492d146f5e72195c7665a5 Author: Joseph Myers <joseph@codesourcery.com> Date: Fri Mar 16 12:28:25 2012 +0000 Implement ldbl-96 sinl / cosl / sincosl (bug 13851). tanl will need a separate fix.
tanl fixed by: commit 11b90b9f504df5b2da91ce3a06c1657d99e4a95f Author: Joseph Myers <joseph@codesourcery.com> Date: Fri Mar 16 20:05:04 2012 +0000 Fix tan, tanl for large inputs.