diff options
author | Szabolcs Nagy <nsz@port70.net> | 2013-09-05 10:58:48 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013-09-05 11:30:09 +0000 |
commit | 07039ed8563b850624146c938ae201a1099d2f75 (patch) | |
tree | 2a751e8684596943be0bca4391289759b718f2b4 /src/string/strcpy.c | |
parent | 8dba5486288e719ed290cccefcd932ed32756d7c (diff) | |
download | musl-07039ed8563b850624146c938ae201a1099d2f75.tar.gz musl-07039ed8563b850624146c938ae201a1099d2f75.tar.xz musl-07039ed8563b850624146c938ae201a1099d2f75.zip |
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
Diffstat (limited to 'src/string/strcpy.c')
0 files changed, 0 insertions, 0 deletions