acos.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_acos.c |
3810 |
acosf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_acosf.c |
2218 |
acosh.rs |
0x3fe62e42, 0xfefa39ef |
867 |
acoshf.rs |
|x| < 2, invalid if x < 1 or nan |
823 |
asin.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_asin.c |
4288 |
asinf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_asinf.c |
2054 |
asinh.rs |
0x3fe62e42, 0xfefa39ef |
1162 |
asinhf.rs |
asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) |
1133 |
atan.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_atan.c |
5774 |
atan2.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_atan2.c |
4355 |
atan2f.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_atan2f.c |
2894 |
atanf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_atanf.c |
3149 |
atanh.rs |
atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) |
970 |
atanhf.rs |
atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) |
968 |
cbrt.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_cbrt.c |
4343 |
cbrtf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_cbrtf.c |
2149 |
ceil.rs |
|
2333 |
ceilf.rs |
|
1750 |
copysign.rs |
|
403 |
copysignf.rs |
|
406 |
cos.rs |
|x| ~< pi/4 |
2255 |
cosf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_cosf.c |
2438 |
cosh.rs |
|x| |
993 |
coshf.rs |
|x| |
910 |
erf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_erf.c |
12633 |
erff.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_erff.c |
7586 |
exp.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_exp.c |
5099 |
exp2.rs |
|
16436 |
exp2f.rs |
Filter out exceptional cases. |
4725 |
exp10.rs |
fabs(n) < 16 without raising invalid on nan |
754 |
exp10f.rs |
fabsf(n) < 8 without raising invalid on nan |
735 |
expf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_expf.c |
3032 |
expm1.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_expm1.c |
4321 |
expm1f.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_expm1f.c |
3951 |
expo2.rs |
exp(x)/2 for x >= log(DBL_MAX), slightly better than 0.5*exp(x/2)*exp(x/2) |
568 |
fabs.rs |
|
1189 |
fabsf.rs |
|
1302 |
fdim.rs |
|
470 |
fdimf.rs |
|
471 |
fenv.rs |
Dummy functions for archs lacking fenv implementation |
478 |
floor.rs |
y = int(x) - x, where int(x) is an integer neighbor of x |
2333 |
floorf.rs |
|
1783 |
fma.rs |
normalize so top 10bits and last bit are 0 |
6968 |
fmaf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_fmaf.c |
4135 |
fmax.rs |
|
771 |
fmaxf.rs |
|
772 |
fmin.rs |
|
771 |
fminf.rs |
|
772 |
fmod.rs |
normalize x and y |
1637 |
fmodf.rs |
normalize x and y |
1649 |
frexp.rs |
|
492 |
frexpf.rs |
|
485 |
hypot.rs |
arrange |x| >= |y| |
1780 |
hypotf.rs |
|
1000 |
ilogb.rs |
subnormal x |
726 |
ilogbf.rs |
subnormal x |
716 |
j0.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_j0.c |
15469 |
j0f.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_j0f.c |
10448 |
j1.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_j1.c |
14881 |
j1f.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_j1f.c |
10641 |
jn.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_jn.c |
10179 |
jnf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_jnf.c |
6930 |
k_cos.rs |
0x3FA55555, 0x5555554C |
2985 |
k_cosf.rs |
origin: FreeBSD /usr/src/lib/msun/src/k_cosf.c |
1132 |
k_expo2.rs |
k is such that k*ln2 has minimal relative error and x - kln2 > log(FLT_MIN) |
566 |
k_expo2f.rs |
k is such that k*ln2 has minimal relative error and x - kln2 > log(FLT_MIN) |
542 |
k_sin.rs |
0xBFC55555, 0x55555549 |
2470 |
k_sinf.rs |
origin: FreeBSD /usr/src/lib/msun/src/k_sinf.c |
1137 |
k_tan.rs |
3FD55555, 55555563 |
4236 |
k_tanf.rs |
origin: FreeBSD /usr/src/lib/msun/src/k_tan.c |
1924 |
ldexp.rs |
|
124 |
ldexpf.rs |
|
126 |
lgamma.rs |
|
133 |
lgamma_r.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_lgamma_r.c |
12707 |
lgammaf.rs |
|
136 |
lgammaf_r.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_lgammaf_r.c |
8573 |
log.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_log.c |
4552 |
log1p.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_log1p.c |
4769 |
log1pf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_log1pf.c |
2836 |
log2.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_log2.c |
3225 |
log2f.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_log2f.c |
2378 |
log10.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_log10.c |
3767 |
log10f.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_log10f.c |
2561 |
logf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_logf.c |
2076 |
mod.rs |
|
8036 |
modf.rs |
no fractional part |
730 |
modff.rs |
no fractional part |
739 |
nextafter.rs |
|
886 |
nextafterf.rs |
|
920 |
pow.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_pow.c |
21546 |
powf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_powf.c |
10039 |
rem_pio2.rs |
0x3FE45F30, 0x6DC9C883 |
7501 |
rem_pio2_large.rs |
origin: FreeBSD /usr/src/lib/msun/src/k_rem_pio2.c |
20354 |
rem_pio2f.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_rem_pio2f.c |
2323 |
remainder.rs |
|
158 |
remainderf.rs |
|
160 |
remquo.rs |
normalize x and y |
2462 |
remquof.rs |
normalize x and y |
2159 |
rint.rs |
|
1186 |
rintf.rs |
|
1193 |
round.rs |
|
635 |
roundf.rs |
|
775 |
scalbn.rs |
make sure final n < -53 to avoid double
rounding in the subnormal range |
964 |
scalbnf.rs |
|
807 |
sin.rs |
High word of x. |
2803 |
sincos.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_sin.c |
3569 |
sincosf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_sinf.c |
5286 |
sinf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_sinf.c |
2647 |
sinh.rs |
|x| |
1261 |
sinhf.rs |
|x| |
693 |
sqrt.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_sqrt.c |
8841 |
sqrtf.rs |
origin: FreeBSD /usr/src/lib/msun/src/e_sqrtf.c |
4418 |
tan.rs |
|x| ~< pi/4 |
2248 |
tanf.rs |
origin: FreeBSD /usr/src/lib/msun/src/s_tanf.c |
2411 |
tanh.rs |
tanh(x) = (exp(x) - exp(-x))/(exp(x) + exp(-x))
= (exp(2*x) - 1)/(exp(2*x) - 1 + 2)
= (1 - exp(-2*x))/(exp(-2*x) - 1 + 2)
|
1360 |
tanhf.rs |
x = |x| |
902 |
tgamma.rs |
"A Precision Approximation of the Gamma Function" - Cornelius Lanczos (1964)
"Lanczos Implementation of the Gamma Function" - Paul Godfrey (2001)
"An Analysis of the Lanczos Gamma Approximation" - Glendon Ralph Pugh (2004)
approximation method:
(x - 0.5) S(x)
Gamma(x) = (x + g - 0.5) * ----------------
exp(x + g - 0.5)
with
a1 a2 a3 aN
S(x) ~= [ a0 + ----- + ----- + ----- + ... + ----- ]
x + 1 x + 2 x + 3 x + N
with a0, a1, a2, a3,.. aN constants which depend on g.
for x < 0 the following reflection formula is used:
Gamma(x)*Gamma(-x) = -pi/(x sin(pi x))
most ideas and constants are from boost and python
|
5518 |
tgammaf.rs |
|
142 |
trunc.rs |
|
962 |
truncf.rs |
|
1078 |