From 293384feec3bfdecc87d248aba4d00c2d696ac3a Mon Sep 17 00:00:00 2001 From: nsz Date: Wed, 21 Mar 2012 12:58:02 +0100 Subject: [PATCH] TODO update --- LICENSES | 19 ++++++++----- README | 7 +++-- TODO | 85 +++++++++++++++++++++++++++++++++----------------------- 3 files changed, 67 insertions(+), 44 deletions(-) diff --git a/LICENSES b/LICENSES index a52ca3e..9095589 100644 --- a/LICENSES +++ b/LICENSES @@ -158,7 +158,6 @@ math/log1pf.c math/log2f.c math/logf.c math/modf.c -math/modff.c math/modfl.c math/nextafter.c math/nextafterf.c @@ -170,10 +169,9 @@ math/remainderf.c math/rint.c math/rintf.c math/scalbf.c -math/scalbn.c -math/scalbnf.c -math/scalbnl.c math/sin.c +math/sincos.c +math/sincosf.c math/sinf.c math/sinhf.c math/sinhl.c @@ -293,8 +291,6 @@ math/exp2l.c math/fma.c math/fmaf.c math/fmal.c -math/lrint.c -math/lround.c math/modfl.c math/rintl.c @@ -329,7 +325,7 @@ math/powl.c math/tgammal.c -/* public domain */ +/* musl code (or public domain) */ cmath/cabs.c cmath/cabsf.c cmath/cabsl.c @@ -379,6 +375,8 @@ cmath/ctan.c cmath/ctanf.c cmath/ctanl.c internal/ldhack.h +math/i386/* +math/x86_64/* math/__fpclassify.c math/__fpclassifyf.c math/__fpclassifyl.c @@ -420,10 +418,13 @@ math/llroundl.c math/logb.c math/logbf.c math/logbl.c +math/lrint.c math/lrintf.c math/lrintl.c +math/lround.c math/lroundf.c math/lroundl.c +math/modff.c math/nearbyint.c math/nearbyintf.c math/nearbyintl.c @@ -432,5 +433,9 @@ math/remainderl.c math/scalbln.c math/scalblnf.c math/scalblnl.c +math/scalbn.c +math/scalbnf.c +math/scalbnl.c math/signgam.c +math/sincosl.c math/sqrtl.c diff --git a/README b/README index 1e7ed86..a33044a 100644 --- a/README +++ b/README @@ -8,13 +8,14 @@ openbsd (missing long double functions) freebsd /lib/msun svn checkout svn://svn.freebsd.org/base/head/lib/msun -revision 231614 -2012-02-13 22:27:12+01:00 +revision 233103 +2012-03-18 00:27:12+01:00 openbsd /src/lib/libm cvs -d anoncvs@anoncvs.eu.openbsd.org:/cvs get src/lib/libm -2012-02-13 22:27:12+01:00 +2012-03-18 00:27:12+01:00 headers and various aux files are from musl http://www.etalabs.net/musl/ + diff --git a/TODO b/TODO index f2c0cfc..0376b3b 100644 --- a/TODO +++ b/TODO @@ -1,13 +1,29 @@ +long double: + drop ld128 support? and move ldshape union to arch/ + (at least rename ieeel2 union and use the same union in all *l.c) +volatile fix: + -ffloat-store or -fexcess-precision=standard probably fixes most volatile issues (and strict_assign) + volatile const may need different treatment +rounding functions: + floor, ceil.. probably can be improved +math.h: + nan 0/0 raises invalid + signbit >>63 or !! +exceptions: + uniform inexact/invalid exception raising: + (int)x == 0 and huge+x > 0 are used + (unreachable code is not commented and hard to follow) +log2: + dekker vs long double arithmetics 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 +round: + no inexact exception (or fix lround) +rint: + use +0x1.8p52 or asm trigonometric functions: __rem_pio_large: is returning 2 bits enough? __tan: 3rd arg semantics is probably not optimal @@ -15,51 +31,52 @@ trigonometric functions: __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 -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 + TWO52, twom1000 vs tiny 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 + remove overflow thresholds (sinh, cosh) when result overflows anyway? + sign bit checking convention (sqrt.c) +missing: + sqrtl + tgamma, tgammaf + (long double bessel) + nextafterf on ld64 tgamma: - missing - lanczos approx as in boost/math/special_functions, python/Modules/mathmodule.c + lanczos approx as in boost/math/special_functions and python/Modules/mathmodule.c or bsd tgamma complex optimizable creal cimag (libm.h macro for internal code?) + include and instead of libm.h (once there are efficient creal etc.) cpack(x,y) vs x+I*y vs union .a[0]=x, .a[1]=y - fix casin[h], cacos[h], catan[h] + fix casin[h], cacos[h], catan[h] (complex arith cornercases) 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) + python/Modules/cmathmodule.c asm: - i386, x86_64 asm versions + x86_64 asm versions libm test - test vectors + test vectors (see if python has good math+cmath tests) special cases from c99 F.9, G.6 - randomized test using mpfr -arm fenv? + randomized test using mpfr and mdc for complex +udiv: + add udiv.s + + +bugfixes: + code depends on signed int right shift behaviour + + pow*(1,nan or inf) == 1 special case + nan check in modf + fmal ldexp vs ldexpl + fma* x == 0 should be after the isfinite check + invalid ldexp optimizaion + lrint* inexact clearing was optimized away + scalbn(0x1p1023, -2097)==0x1p-1074 was incorrect + ilogbl was incorrect on ld80 (implicit bit was not taken into account) -- 2.20.1