0376b3b6515cddf11da20d7c23db42b05a0d6964
[libm] / TODO
1 long double:
2         drop ld128 support? and move ldshape union to arch/
3         (at least rename ieeel2 union and use the same union in all *l.c)
4 volatile fix:
5         -ffloat-store or -fexcess-precision=standard probably fixes most volatile issues (and strict_assign)
6         volatile const may need different treatment
7 rounding functions:
8         floor, ceil.. probably can be improved
9 math.h:
10         nan 0/0 raises invalid
11         signbit >>63 or !!
12 exceptions:
13         uniform inexact/invalid exception raising:
14                 (int)x == 0 and huge+x > 0 are used
15                 (unreachable code is not commented and hard to follow)
16 log2:
17         dekker vs long double arithmetics
18 ldhack.h fix:
19         move ldouble manipulation into arch specific headers
20 long double isnan, isinf..:
21         efficient macro versions of long double classification macros?
22         (they are ld* representation specific)
23 round:
24         no inexact exception (or fix lround)
25 rint:
26         use +0x1.8p52 or asm
27 trigonometric functions:
28         __rem_pio_large: is returning 2 bits enough?
29         __tan: 3rd arg semantics is probably not optimal
30         sinf,cosf: return sindf(-y) vs -sindf(y)?
31         __sin,__cos,..: z,w,.. -> x2,x4,.. so degree is easier to see
32         __rem_pio2*: rounding trick: simply use the low 32 bits of fn?
33         use long double pi in long double code? (casin, cacos,..)
34 scalbf:
35         scalb is buggy, do we need the *f and *l version?
36 generic code fixes:
37         int32_t -> uint32_t conversion (subtle)
38         += 1, -= 1 -> ++, --
39         TWO52, twom1000 vs tiny
40         remove "unsupported long double format" checks
41         remove overflow thresholds (sinh, cosh) when result overflows anyway?
42         sign bit checking convention (sqrt.c)
43 missing:
44         sqrtl
45         tgamma, tgammaf
46         (long double bessel)
47         nextafterf on ld64
48 tgamma:
49         lanczos approx as in boost/math/special_functions and python/Modules/mathmodule.c
50         or bsd tgamma
51 complex
52         optimizable creal cimag (libm.h macro for internal code?)
53         include <math.h> and <complex.h> instead of libm.h (once there are efficient creal etc.)
54         cpack(x,y) vs x+I*y vs union .a[0]=x, .a[1]=y
55         fix casin[h], cacos[h], catan[h] (complex arith cornercases)
56         add missing long double versions
57         Kahan, W. "Branch Cuts for Complex Elementary Functions, or Much Ado About Nothing's Sign Bit." 1987
58         Hull, Fairgrieve, Tang "Implementing complex elementary functions using exception handling" 1994
59         Hull, Fairgrieve, Tang "Implementing the complex arcsine and arccosine functions using exception handling" 1997
60         boost/math/complex
61         python/Modules/cmathmodule.c
62 asm:
63         x86_64 asm versions
64 libm test
65         test vectors (see if python has good math+cmath tests)
66         special cases from c99 F.9, G.6
67         randomized test using mpfr and mdc for complex
68 udiv:
69         add udiv.s
70
71
72 bugfixes:
73         code depends on signed int right shift behaviour
74
75         pow*(1,nan or inf) == 1 special case
76         nan check in modf
77         fmal ldexp vs ldexpl
78         fma* x == 0 should be after the isfinite check
79         invalid ldexp optimizaion
80         lrint* inexact clearing was optimized away
81         scalbn(0x1p1023, -2097)==0x1p-1074 was incorrect
82         ilogbl was incorrect on ld80 (implicit bit was not taken into account)