mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
dce5f3abed
Both IEEE-754 2008 and ISO/IEC TS 18661-4 define the half-cycle trignometric functions cospi, sinpi, and tanpi. The attached patch implements cospi[fl], sinpi[fl], and tanpi[fl]. Limited testing on the cospi and sinpi reveal a max ULP less than 0.89; while tanpi is more problematic with a max ULP less than 2.01 in the interval [0,0.5]. The algorithms used in these functions are documented in {ks}_cospi.c, {ks}_sinpi.c, and s_tanpi.c. Note. I no longer have access to a system with ld128 and adequate support to compile and test the ld128 implementations of these functions. Given the almost complete lack of input from others on improvements to libm, I doubt that anyone cares. If someone does care, the ld128 files contain a number of FIXME comments, and in particular, while the polynomial coefficients are given I did not update the polynomial algorithms to properly use the coefficients. PR: 218514 MFC after: 2 weeks |
||
---|---|---|
.. | ||
e_lgammal_r.c | ||
e_powl.c | ||
e_rem_pio2l.h | ||
invtrig.c | ||
invtrig.h | ||
k_cosl.c | ||
k_cospil.h | ||
k_expl.h | ||
k_sinl.c | ||
k_sinpil.h | ||
k_tanl.c | ||
s_cospil.c | ||
s_erfl.c | ||
s_exp2l.c | ||
s_expl.c | ||
s_logl.c | ||
s_nanl.c | ||
s_sinpil.c | ||
s_tanpil.c |