ldhack.h fix: move ldouble manipulation into arch specific headers long double isnan, isinf..: efficient macro versions of long double classification macros? (they are ld* representation specific) lrint: does inexact allowed on overflow? 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 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: scalb is buggy, do we need the *f and *l version? scalbn: needs a rewrite: signed int problems, wrong <-50000 check __ldexp_cexp: only complex in math/, move to cmath? j0l, y0l,..: declare long double bessel functions in math.h? uniform inexact exception raising: (int)x == 0 and huge+x > 0 are used unreachable code is not commented and hard to follow generic code fixes: int32_t -> uint32_t conversion (subtle) += 1, -= 1 -> ++, -- TWO52, one, zero, twom1000,.. -> use reasonable consts (float)1 -> 1.0f ldexp -> use scalbn internally (ldexp is a wrapper) i386 vs precision -> assume extended prec setting long double const trunc/slowness bug remove "unsupported long double format" checks sign bit (sqrt) fma: expects single 53bit rounding rewrite using long double arithmetics? log2: dekker vs long double arithmetics tgamma: missing lanczos approx as in boost/math/special_functions, python/Modules/mathmodule.c 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 Hull, Fairgrieve, Tang "Implementing the complex arcsine and arccosine functions using exception handling" 1997 boost/math/complex python/Modules/cmathmodule.c (+math, cmath tests) asm: i386, x86_64 asm versions libm test test vectors special cases from c99 F.9, G.6 randomized test using mpfr arm fenv?