see c99 7.12, 7.12.9.5, F.9, F.9.6.5
small file cleanups:
if libm.h internals is not needed (ldexp,..) then include math.h only
- LD64 wrap small long double functions as well
trigonometric functions:
__rem_pio_large: is returning 2 bits enough?
__tan: 3rd arg semantics is probably not optimal
sinf,cosf: return sindf(-y) vs -sindf(y)?
__sin,__cos,..: z,w,.. -> x2,x4,.. so degree is easier to see
__rem_pio2*: rounding trick: simply use the low 32 bits of fn?
+ use long double pi in long double code? (casin, cacos,..)
nan:
use strtod? c99 7.12.11.2
scalbf:
or bsd tgamma
complex
optimizable creal cimag (libm.h macro for internal code?)
+ cpack(x,y) vs x+I*y vs union .a[0]=x, .a[1]=y
+ fix casin[h], cacos[h], catan[h]
+ add missing long double versions
test? (using mdc lib, available test vectors,..)
Kahan, W. "Branch Cuts for Complex Elementary Functions, or Much Ado About Nothing's Sign Bit." 1987
Hull, Fairgrieve, Tang "Implementing complex elementary functions using exception handling" 1994
i386, x86_64 asm versions
libm test
test vectors
- special cases from c99 F.9, G
+ special cases from c99 F.9, G.6
randomized test using mpfr
arm fenv?