Fw: Error in documentation for tan(), and poor implementation of sin() and cos()

Paul Zimmermann Paul.Zimmermann@inria.fr
Wed Jul 8 09:09:48 GMT 2026


       Hi,

using convergents from the continued fraction of u/(pi/2) in the binade
[2^52*u,2^53*u) as Stefan did, I found errors even larger with GNU libc 2.43:

Checking sin with glibc-2.43/build and rndn
sin 0 -1 0x1.4c96c11134d36p+578 [102825] [1.03e+05] 102826 102825.2960633666

Checking cos with glibc-2.43/build and rndn
cos 0 -1 0x1.69eab0985179bp+246 [136921] [1.37e+05] 136921 136920.7555915861

Checking tan with glibc-2.43/build and rndn
tan 0 -1 0x1.69eab0985179bp+246 [143270] [1.44e+05] 143270 143269.8972757733

I'll now try the same method for double-extended and quadruple precision.

Paul


More information about the Libc-alpha mailing list