musl/src/math/scalbnl.c, branch master musl - an implementation of the standard library for Linux-based systems fix scalbn when result is in the subnormal range 2017年04月21日T21:31:00+00:00 Szabolcs Nagy nsz@port70.net 2017年04月03日T00:38:13+00:00 8c44a060243f04283ca68dad199aab90336141db in nearest rounding mode scalbn could introduce double rounding error when an intermediate value and the final result were both in the subnormal range e.g. scalbn(0x1.7ffffffffffffp-1, -1073) returned 0x1p-1073 instead of 0x1p-1074, because the intermediate computation got rounded to 0x1.8p-1023. with the fix an intermediate value can only be in the subnormal range if the final result is 0 which is correct even after double rounding. (there still can be two roundings so signals may be raised twice, but that's only observable with trapping exceptions which is not supported.)
in nearest rounding mode scalbn could introduce double rounding error
when an intermediate value and the final result were both in the
subnormal range e.g.
 scalbn(0x1.7ffffffffffffp-1, -1073)
returned 0x1p-1073 instead of 0x1p-1074, because the intermediate
computation got rounded to 0x1.8p-1023.
with the fix an intermediate value can only be in the subnormal range
if the final result is 0 which is correct even after double rounding.
(there still can be two roundings so signals may be raised twice, but
that's only observable with trapping exceptions which is not supported.)
math: fix remaining old long double code (erfl, fmal, lgammal, scalbnl) 2013年09月05日T11:30:08+00:00 Szabolcs Nagy nsz@port70.net 2013年09月04日T15:52:23+00:00 34660d73bd0db29469d2758e1b48d2360edf3a2f in lgammal don't handle 1 and 2 specially, in fma use the new ldshape union instead of ld80 one.
in lgammal don't handle 1 and 2 specially, in fma use the new ldshape
union instead of ld80 one.
math: minor scalbn*.c simplification 2013年08月15日T10:07:46+00:00 Szabolcs Nagy nsz@port70.net 2013年08月15日T10:07:46+00:00 1b77b9072f374bd26eb0574b83a0d5f18d75ec60
code cleanup of named constants 2012年03月19日T22:41:19+00:00 nsz nsz@port70.net 2012年03月19日T22:41:19+00:00 0cbb65479147ecdaa664e88cc2a5a925f3de502f zero, one, two, half are replaced by const literals The policy was to use the f suffix for float consts (1.0f), but don't use suffix for long double consts (these consts can be exactly represented as double).
zero, one, two, half are replaced by const literals
The policy was to use the f suffix for float consts (1.0f),
but don't use suffix for long double consts (these consts
can be exactly represented as double).
simplify scalbn*.c implementations 2012年03月19日T09:54:07+00:00 nsz nsz@port70.net 2012年03月19日T09:54:07+00:00 8051e08e10d2b739fcfcbc6bc7466e8d77fa49f1 The old scalbn.c was wrong and slow, the new one is just slow. (scalbn(0x1p+1023,-2097) should give 0x1p-1074, but the old code gave 0)
The old scalbn.c was wrong and slow, the new one is just slow.
(scalbn(0x1p+1023,-2097) should give 0x1p-1074, but the old code gave 0)
first commit of the new libm! 2012年03月13日T05:17:53+00:00 Rich Felker dalias@aerifal.cx 2012年03月13日T05:17:53+00:00 b69f695acedd4ce2798ef9ea28d834ceccc789bd thanks to the hard work of Szabolcs Nagy (nsz), identifying the best (from correctness and license standpoint) implementations from freebsd and openbsd and cleaning them up! musl should now fully support c99 float and long double math functions, and has near-complete complex math support. tgmath should also work (fully on gcc-compatible compilers, and mostly on any c99 compiler). based largely on commit 0376d44a890fea261506f1fc63833e7a686dca19 from nsz's libm git repo, with some additions (dummy versions of a few missing long double complex functions, etc.) by me. various cleanups still need to be made, including re-adding (if they're correct) some asm functions that were dropped.
thanks to the hard work of Szabolcs Nagy (nsz), identifying the best
(from correctness and license standpoint) implementations from freebsd
and openbsd and cleaning them up! musl should now fully support c99
float and long double math functions, and has near-complete complex
math support. tgmath should also work (fully on gcc-compatible
compilers, and mostly on any c99 compiler).
based largely on commit 0376d44a890fea261506f1fc63833e7a686dca19 from
nsz's libm git repo, with some additions (dummy versions of a few
missing long double complex functions, etc.) by me.
various cleanups still need to be made, including re-adding (if
they're correct) some asm functions that were dropped.

AltStyle によって変換されたページ (->オリジナル) /