summaryrefslogtreecommitdiff
path: root/src/math/i386/exp.s
AgeCommit message (Collapse)AuthorFilesLines
2012-12-14math: fix i386/expl.s with more precise x*log2eSzabolcs Nagy1-6/+0
with naive exp2l(x*log2e) the last 12bits of the result was incorrect for x with large absolute value with hi + lo = x*log2e is caluclated to 128 bits precision and then expl(x) = exp2l(hi) + exp2l(hi) * f2xm1(lo) this gives <1.5ulp measured error everywhere in nearest rounding mode
2012-08-08math: fix exp.s on i386 and x86_64 so the exception flags are correctnsz1-21/+18
exp(inf), exp(-inf), exp(nan) used to raise wrong flags
2012-03-19fix exp asmRich Felker1-23/+22
exponents (base 2) near 16383 were broken due to (1) wrong cutoff, and (2) inability to fit the necessary range of scalings into a long double value. as a solution, we fall back to using frndint/fscale for insanely large exponents, and also have to special-case infinities here to avoid inf-inf generating nan. thankfully the costly code never runs in normal usage cases.
2012-03-19optimize exponential asm for i386Rich Felker1-11/+76
up to 30% faster exp2 by avoiding slow frndint and fscale functions. expm1 also takes a much more direct path for small arguments (the expected usage case).
2012-03-18fix broken exponential asmRich Felker1-0/+9
infinities were getting converted into nans. the new code simply tests for infinity and replaces it with a large magnitude value of the same sign. also, the fcomi instruction is apparently not part of the i387 instruction set, so avoid using it.
2012-03-18asm exponential functions for i386Rich Felker1-0/+46