std1.0.0-beta-7 SafeC docs

Module math

#include <std/math.h> source

Math declarations Naming convention:

_int / _ll  → integer (const-evaluable at compile time)
_f          → single-precision float  (wraps <math.h> *f variants)
_d          → double-precision double (wraps <math.h> base variants)

Functions

PI_D
E_D
LN2_D
LN10_D
SQRT2_D
INF_D
PI_F
E_F
SQRT2_F
abs_int
abs_ll
min_int
max_int
min_ll
max_ll
clamp_int
clamp_ll
abs_f
sqrt_f
cbrt_f
floor_f
ceil_f
round_f
trunc_f
pow_f
exp_f
exp2_f
log_f
log2_f
log10_f
sin_f
cos_f
tan_f
asin_f
acos_f
atan_f
atan2_f
sinh_f
cosh_f
tanh_f
hypot_f
fmod_f
copysign_f
fma_f
min_f
max_f
clamp_f
isnan_fIEEE 754: NaN is the only value not equal to itself.
isinf_fIEEE 754: inf * 2 == inf (and != 0), finite * 2 != itself.
isfinite_fFinite iff neither NaN nor inf.
abs_d
sqrt_d
cbrt_d
floor_d
ceil_d
round_d
trunc_d
pow_d
exp_d
exp2_d
log_d
log2_d
log10_d
sin_d
cos_d
tan_d
asin_d
acos_d
atan_d
atan2_d
sinh_d
cosh_d
tanh_d
hypot_d
fmod_d
copysign_d
fma_d
min_d
max_d
clamp_d
isnan_d
isinf_d
isfinite_d