[][src]Crate libm

libm in pure Rust

Usage

You can use this crate in two ways:

  • By directly using its free functions, e.g. libm::powf.

  • By importing the F32Ext and / or F64Ext extension traits to add methods like powf to the f32 and f64 types. Then you'll be able to invoke math functions as methods, e.g. x.sqrt().

Traits

F32Ext

Math support for f32

F64Ext

Math support for f64

Functions

acos
acosf
acosh
acoshf
asin
asinf
asinh
asinhf
atan
atan2
atan2f
atanf
atanh
atanhf
cbrt
cbrtf
ceil
ceilf
copysign
copysignf
cos
cosf
cosh
coshf
erf
erfc
erfcf
erff
exp
exp2
exp2f
exp10
exp10f
expf
expm1
expm1f
fabs
fabsf
fdim
fdimf
floor
floorf
fma
fmaf
fmod
fmodf
frexp
frexpf
hypot
hypotf
ilogb
ilogbf
j0
j0f
j1
j1f
jn
jnf
ldexp
ldexpf
lgamma
lgamma_r
lgammaf
lgammaf_r
log
log1p
log1pf
log2
log2f
log10
log10f
logf
modf
modff
pow
powf
remquo
remquof
round
roundf
scalbn
scalbnf
sin
sincos
sincosf
sinf
sinh
sinhf
sqrt
sqrtf
tan
tanf
tanh
tanhf
tgamma
tgammaf
trunc
truncf
y0
y0f
y1
y1f
yn
ynf