History log of /seL4-camkes-master/projects/musllibc/src/math/i386_sel4/exp.s
Revision Date Author Comments
# 8ed66ecb 18-Apr-2015 Rich Felker <dalias@aerifal.cx>

remove the last of possible-textrels from i386 asm

none of these are actual textrels because of ld-time binding performed
by -Bsymbolic-functions, but I'm changing them with the goal of making
ld-time binding purely an optimization rather than relying on it for
semantic purposes.

in the case of memmove's call to memcpy, making it explicit that the
memmove asm is assuming the forward-copying behavior of the memcpy asm
is desirable anyway; in case memcpy is ever changed, the semantic
mismatch would be apparent while editing memmcpy.s.


# 07039ed8 05-Sep-2013 Szabolcs Nagy <nsz@port70.net>

math: fix exp2l asm on x86 (raise underflow correctly)

there were two problems:
* omitted underflow on subnormal results: exp2l(-16383.5) was calculated
as sqrt(2)*2^-16384, the last bits of sqrt(2) are zero so the down scaling
does not underflow eventhough the result is in subnormal range
* spurious underflow for subnormal inputs: exp2l(0x1p-16400) was evaluated
as f2xm1(x)+1 and f2xm1 raised underflow (because inexact subnormal result)

the first issue is fixed by raising underflow manually if x is in
(-32768,-16382] and not integer (x-0x1p63+0x1p63 != x)

the second issue is fixed by treating x in (-0x1p64,0x1p64) specially

for these fixes the special case handling was completely rewritten


# 31c5fb80 15-Aug-2013 Szabolcs Nagy <nsz@port70.net>

math: fix x86 asin, atan, exp, log1p to raise underflow

underflow is raised by an inexact subnormal float store,
since subnormal operations are slow, check the underflow
flag and skip the store if it's already raised


# a8f73bb1 14-Dec-2012 Szabolcs Nagy <nsz@port70.net>

math: fix i386/expl.s with more precise x*log2e

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


# 1fb01691 08-Aug-2012 nsz <nsz@port70.net>

math: fix exp.s on i386 and x86_64 so the exception flags are correct

exp(inf), exp(-inf), exp(nan) used to raise wrong flags


# acb74492 19-Mar-2012 Rich Felker <dalias@aerifal.cx>

fix exp asm

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.


# 02db27d9 19-Mar-2012 Rich Felker <dalias@aerifal.cx>

optimize exponential asm for i386

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).


# aa1b4dff 18-Mar-2012 Rich Felker <dalias@aerifal.cx>

fix broken exponential asm

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.


# 6f26cf3d 18-Mar-2012 Rich Felker <dalias@aerifal.cx>

asm exponential functions for i386