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

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Jul 8 11:37:09 GMT 2026



On 08/07/26 07:54, Paul Zimmermann wrote:
>        Hi Wilco,
> 
>> In all cases that is the shared range reducer which has bugs for huge inputs,
>> so you could just directly check the range reducer. Using integer arithmetic
>> like I did for float sin/cos results in a much simpler and faster range reducer.
> 
> instead of patching the range reducer, the ultimate solution is probably to
> use some correctly-rounded implementation like the one from CORE-MATH.
> Adhemerval, do you have performance figures for say sin?

Not yet, it is on my backlog to work on sin/cos/tan.


More information about the Libc-alpha mailing list