mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
6d04e1422e
As mention previously, the minmax polynomial approximation in the kernel for cosl() seem to have a bad set of coefficients. In testing, cosl() in the interval [0.785, pi/4] for 1 million values and pi/4 written to 37 decimal digits. The old version on an aarch64 system gave % tlibm/tlibm_lmath -l -x 0.78 -X 7.85398163397448309615660845819875721e-1L cos Interval tested for cosl: [0.78,0.785398] count: 1000000 xm = 7.80213913234863919029058821396125599e-01L libm = 7.10763080972549562455058499280609083e-01L mpfr = 7.10763080972549562455058499280608983e-01L ULP = 1.04431 The max ULP exceeds 1, which is not good. So, I rinsed off a 10 year code and recomputed coefficients. The new minmax polynomial now yields % tlibm/tlibm_lmath -l -x 0.78 -X 7.85398163397448309615660845819875721e-1L cos Interval tested for cosl: [0.78,0.785398] count: 1000000 xm = 7.82916198746768272588844890973704219e-01L libm = 7.08859615479571058183956453286628396e-01L mpfr = 7.08859615479571058183956453286628469e-01L ULP = 0.75407 which is very good. PR: 218514 MFC after: 1 week |
||
---|---|---|
.. | ||
aarch64 | ||
amd64 | ||
arm | ||
bsdsrc | ||
i387 | ||
ld80 | ||
ld128 | ||
man | ||
mips | ||
powerpc | ||
riscv | ||
src | ||
tests | ||
x86 | ||
Makefile | ||
Makefile.depend | ||
Symbol.map |