SPVM::Math(3)
π¦ SPVM::Math π¦
okay bestie, this is SPVM::Math(3) β a User Contributed Perl Documentation page, and it's literally the Math class. no cap. π
πΈ NAME πΈ
SPVM::Math β Mathematical Calculations. that's the name and the whole vibe. β¨
π§ DESCRIPTION π§
The Math class in SPVM has methods for mathematical calculations defined in math.h and complex.h in the C language. it's giving "C math but make it SPVM," and honestly? obsessed. π«Ά
π USAGE π
okay so here's the demo the page gives you:
use Math;
my $sin = Math->sin(Math->PI / 4);
my $cos = Math->cos(Math->PI / 4);
my $tan = Math->tan(Math->PI / 4);
# 1 + 2i
my $z = Math->complex(1, 2);
# i
my $i = Math->complex(0, 1);
# Euler's equation
my $euler_left = Math->cexp(Math->cmul($i, $z));
my $euler_right = Math->ccos($z) + Math->cmul($i, Math->csin($z));
π CLASS METHODS π
these are the class methods, bestie. signatures stay exactly as written, URLs stay exactly as linked. iykyk π
abs
static method abs : int ($x : int);
Calculates the absolute value of $x and returns it. (the original page spells it "abusolute" β iconic typo, but the math is still absolute value π
)
acos
static method acos : double ($x : double);
Calls the native acos function defined in math.h in the C language (https://linux.die.net/man/3/acos) and returns its return value. trig queen behavior β¨
acosf
static method acosf : float ($x : float);
Calls the native acosf function defined in math.h in the C language (https://linux.die.net/man/3/acosf) and returns its return value. float edition π
acosh
static method acosh : double ($x : double);
Calls the native acosh function defined in math.h in the C language (https://linux.die.net/man/3/acosh) and returns its return value. hyperbolic slay π
acoshf
static method acoshf : float ($x : float);
Calls the native acoshf function defined in math.h in the C language (https://linux.die.net/man/3/acoshf) and returns its return value. float hyperbolic era π
asin
static method asin : double ($x : double);
Calls the native asin function defined in math.h in the C language (https://linux.die.net/man/3/asin) and returns its return value. inverse trig main character π¦
asinf
static method asinf : float ($x : float);
Calls the native asinf function defined in math.h in the C language (https://linux.die.net/man/3/asinf) and returns its return value. float inverse trig π
asinh
static method asinh : double ($x : double);
Calls the native asinh function defined in math.h in the C language (https://linux.die.net/man/3/asinh) and returns its return value. inverse hyperbolic moment β
asinhf
static method asinhf : float ($x : float);
Calls the native asinhf function defined in math.h in the C language (https://linux.die.net/man/3/asinhf) and returns its return value. float inverse hyperbolic π
atan
static method atan : double ($x : double);
Calls the native atan function defined in math.h in the C language (https://linux.die.net/man/3/atan) and returns its return value. arctangent ate π
atan2
static method atan2 : double ($y : double, $x : double);
Calls the native atan2 function defined in math.h in the C language (https://linux.die.net/man/3/atan2) and returns its return value. two-argument icon π
atan2f
static method atan2f : float ($y : float, $x : float);
Calls the native atan2f function defined in math.h in the C language (https://linux.die.net/man/3/atan2f) and returns its return value. float two-argument icon π
atanf
static method atanf : float ($x : float);
Calls the native atanf function defined in math.h in the C language (https://linux.die.net/man/3/atanf) and returns its return value. float arctangent π
atanh
static method atanh : double ($x : double);
Calls the native atanh function defined in math.h in the C language (https://linux.die.net/man/3/atanh) and returns its return value. inverse hyperbolic tangent π
atanhf
static method atanhf : float ($x : float);
Calls the native atanhf function defined in math.h in the C language (https://linux.die.net/man/3/atanhf) and returns its return value. float inverse hyperbolic tangent π
cabs
static method cabs : double ($z : Complex_2d);
Calls the native cabs function defined in complex.h in the C language (https://linux.die.net/man/3/cabs) and returns its return value. complex math era π¦
cabsf
static method cabsf : float ($z : Complex_2f);
Calls the native cabsf function defined in complex.h in the C language (https://linux.die.net/man/3/cabsf) and returns its return value. float complex era π
cacos
static method cacos : Complex_2d ($z : Complex_2d);
Calls the native cacos function defined in complex.h in the C language (https://linux.die.net/man/3/cacos) and returns its return value. complex inverse cosine π
cacosf
static method cacosf : Complex_2f ($z : Complex_2f);
Calls the native cacosf function defined in complex.h in the C language (https://linux.die.net/man/3/cacosf) and returns its return value. float complex inverse cosine π
cacosh
static method cacosh : Complex_2d ($z : Complex_2d);
Calls the native cacosh function defined in complex.h in the C language (https://linux.die.net/man/3/cacosh) and returns its return value. complex inverse hyperbolic cosine π
cacoshf
static method cacoshf : Complex_2f ($z : Complex_2f);
Calls the native cacoshf function defined in complex.h in the C language (https://linux.die.net/man/3/cacoshf) and returns its return value. float complex inverse hyperbolic cosine π
cadd
static method cadd : Complex_2d ($z1 : Complex_2d, $z2 : Complex_2d);
Performs the addition operation on $z1 and $z2, and returns the resulting value. add it up π
caddf
static method caddf : Complex_2f ($z1 : Complex_2f, $z2 : Complex_2f);
Performs the addition operation on $z1 and $z2, and returns the resulting value. float add it up π
carg
static method carg : double ($z : Complex_2d);
Calls the native carg function defined in complex.h in the C language (https://linux.die.net/man/3/carg) and returns its return value. complex argument moment β
cargf
static method cargf : float ($z : Complex_2f);
Calls the native cargf function defined in complex.h in the C language (https://linux.die.net/man/3/cargf) and returns its return value. float complex argument π₯
casin
static method casin : Complex_2d ($z : Complex_2d);
Calls the native casin function defined in complex.h in the C language (https://linux.die.net/man/3/casin) and returns its return value. complex inverse sine π
casinf
static method casinf : Complex_2f ($z : Complex_2f);
Calls the native casinf function defined in complex.h in the C language (https://linux.die.net/man/3/casinf) and returns its return value. float complex inverse sine π¦
casinh
static method casinh : Complex_2d ($z : Complex_2d);
Calls the native casinh function defined in complex.h in the C language (https://linux.die.net/man/3/casinh) and returns its return value. complex inverse hyperbolic sine π
casinhf
static method casinhf : Complex_2f ($z : Complex_2f);
Calls the native casinhf function defined in complex.h in the C language (https://linux.die.net/man/3/casinhf) and returns its return value. float complex inverse hyperbolic sine π
catan
static method catan : Complex_2d ($z : Complex_2d);
Calls the native catan function defined in complex.h in the C language (https://linux.die.net/man/3/catan) and returns its return value. complex inverse tangent π
catanf
static method catanf : Complex_2f ($z : Complex_2f);
Calls the native catanf function defined in complex.h in the C language (https://linux.die.net/man/3/catanf) and returns its return value. float complex inverse tangent π
catanh
static method catanh : Complex_2d ($z : Complex_2d);
Calls the native catanh function defined in complex.h in the C language (https://linux.die.net/man/3/catanh) and returns its return value. complex inverse hyperbolic tangent π
catanhf
static method catanhf : Complex_2f ($z : Complex_2f);
Calls the native catanhf function defined in complex.h in the C language (https://linux.die.net/man/3/catanhf) and returns its return value. float complex inverse hyperbolic tangent π
cbrt
static method cbrt : double ($x : double);
Calls the native cbrt function defined in math.h in the C language (https://linux.die.net/man/3/cbrt) and returns its return value. cube root queen β
cbrtf
static method cbrtf : float ($x : float);
Calls the native cbrtf function defined in math.h in the C language (https://linux.die.net/man/3/cbrtf) and returns its return value. float cube root queen π₯
ccos
static method ccos : Complex_2d ($z : Complex_2d);
Calls the native ccos function defined in complex.h in the C language (https://linux.die.net/man/3/ccos) and returns its return value. complex cosine π
ccosf
static method ccosf : Complex_2f ($z : Complex_2f);
Calls the native ccosf function defined in complex.h in the C language (https://linux.die.net/man/3/ccosf) and returns its return value. float complex cosine π¦
ccosh
static method ccosh : Complex_2d ($z : Complex_2d);
Calls the native ccosh function defined in complex.h in the C language (https://linux.die.net/man/3/ccosh) and returns its return value. complex hyperbolic cosine π
ccoshf
static method ccoshf : Complex_2f ($z : Complex_2f);
Calls the native ccoshf function defined in complex.h in the C language (https://linux.die.net/man/3/ccoshf) and returns its return value. float complex hyperbolic cosine π
cdiv
static method cdiv : Complex_2d ($z1 : Complex_2d, $z2 : Complex_2d);
Performs the division operation on $z1 and $z2, and returns the resulting value. (the original spells it "divison" β iconic, we love her π) divide era π
cdivf
static method cdivf : Complex_2f ($z1 : Complex_2f, $z2 : Complex_2f);
Performs the division operation on $z1 and $z2, and returns the resulting value. float divide era π
ceil
static method ceil : double ($x : double);
Calls the native ceil function defined in math.h in the C language (https://linux.die.net/man/3/ceil) and returns its return value. round it up, bestie π
ceilf
static method ceilf : float ($x : float);
Calls the native ceilf function defined in math.h in the C language (https://linux.die.net/man/3/ceilf) and returns its return value. float round it up π
cexp
static method cexp : Complex_2d ($z : Complex_2d);
Calls the native cexp function defined in complex.h in the C language (https://linux.die.net/man/3/cexp) and returns its return value. complex exponential β
cexpf
static method cexpf : Complex_2f ($z : Complex_2f);
Calls the native cexpf function defined in complex.h in the C language (https://linux.die.net/man/3/cexpf) and returns its return value. float complex exponential π₯
clog
static method clog : Complex_2d ($z : Complex_2d);
Calls the native clog function defined in complex.h in the C language (https://linux.die.net/man/3/clog) and returns its return value. complex logarithm π
clogf
static method clogf : Complex_2f ($z : Complex_2f);
Calls the native clogf function defined in complex.h in the C language (https://linux.die.net/man/3/clogf) and returns its return value. float complex logarithm π¦
cmul
static method cmul : Complex_2d ($z1 : Complex_2d, $z2 : Complex_2d);
Performs the multiplication operation on $z1 and $z2, and returns the resulting value. multiply era π
cmulf
static method cmulf : Complex_2f ($z1 : Complex_2f, $z2 : Complex_2f);
Performs the multiplication operation on $z1 and $z2, and returns the resulting value. float multiply era π
complex
static method complex : Complex_2d ($re : double, $im : double);
Creates a double complex value given the real number $re and the imaginary number $im and returns it. complex main character energy π
complexf
static method complexf : Complex_2f ($re : float, $im : float);
Creates a float complex value given the real number $re and the imaginary number $im and returns it. float complex main character energy π
conj
static method conj : Complex_2d ($z : Complex_2d);
Calls the native conj function defined in complex.h in the C language (https://linux.die.net/man/3/conj) and returns its return value. conjugate cutie π
conjf
static method conjf : Complex_2f ($z : Complex_2f);
Calls the native conjf function defined in complex.h in the C language (https://linux.die.net/man/3/conjf) and returns its return value. float conjugate cutie π
copysign
static method copysign : double ($x : double, $y : double);
Calls the native copysign function (docs: https://linux.die.net/man/3/copysign) defined in math.h in the C language, and returns its return value. π
Straight-up C math, zero extra drama.
copysignf
static method copysignf : float ($x : float, $y : float);
The float version of the above: calls native copysignf (docs: https://linux.die.net/man/3/copysignf) defined in math.h in the C language, and returns its return value. π«Ά
cos
static method cos : double ($x : double);
Calls the native cos function (docs: https://linux.die.net/man/3/cos) defined in math.h in the C language, and returns its return value. Trig but make it C. β¨
cosf
static method cosf : float ($x : float);
Calls the native cosf function (docs: https://linux.die.net/man/3/cosf) defined in math.h in the C language, and returns its return value. π¦
cosh
static method cosh : double ($x : double);
Calls the native cosh function (docs: https://linux.die.net/man/3/cosh) defined in math.h in the C language, and returns its return value. Hyperbolic behavior, honestly iconic. π
coshf
static method coshf : float ($x : float);
Calls the native coshf function (docs: https://linux.die.net/man/3/coshf) defined in math.h in the C language, and returns its return value. π
cpow
static method cpow : Complex_2d ($z1 : Complex_2d, $z2 : Complex_2d);
Calls the native cpow function (docs: https://linux.die.net/man/3/cpow) defined in complex.h in the C language, and returns its return value. Complex-number era. π
cpowf
static method cpowf : Complex_2f ($z1 : Complex_2f, $z2 : Complex_2f);
Calls the native cpowf function (docs: https://linux.die.net/man/3/cpowf) defined in complex.h in the C language, and returns its return value. π«
csin
static method csin : Complex_2d ($z : Complex_2d);
Calls the native csin function (docs: https://linux.die.net/man/3/csin) defined in complex.h in the C language, and returns its return value. Complex sine, no cap. πΈ
csinf
static method csinf : Complex_2f ($z : Complex_2f);
Calls the native csinf function (docs: https://linux.die.net/man/3/csinf) defined in complex.h in the C language, and returns its return value. π§
csinh
static method csinh : Complex_2d ($z : Complex_2d);
Calls the native csinh function (docs: https://linux.die.net/man/3/csinh) defined in complex.h in the C language, and returns its return value. π¦
csinhf
static method csinhf : Complex_2f ($z : Complex_2f);
Calls the native csinhf function (docs: https://linux.die.net/man/3/csinhf) defined in complex.h in the C language, and returns its return value. π
csqrt
static method csqrt : Complex_2d ($z : Complex_2d);
Calls the native csqrt function (docs: https://linux.die.net/man/3/csqrt) defined in complex.h in the C language, and returns its return value. π
csqrtf
static method csqrtf : Complex_2f ($z : Complex_2f);
Calls the native csqrtf function (docs: https://linux.die.net/man/3/csqrtf) defined in complex.h in the C language, and returns its return value. β¨
csub
static method csub : Complex_2d ($z1 : Complex_2d, $z2 : Complex_2d);
Performs the subtraction operation on $z1 and $z2, and returns the resulting value. Subtraction but complex, periodt. π
csubf
static method csubf : Complex_2f ($z1 : Complex_2f, $z2 : Complex_2f);
Performs the subtraction operation on $z1 and $z2, and returns the resulting value. Same subtraction energy, float edition. π«Ά
cneg
static method cneg : Complex_2d ($z : Complex_2d);
Negates the sign of $z and returns it. Flip the sign, keep the vibe. π
cnegf
static method cnegf : Complex_2f ($z : Complex_2f);
Negates the sign of $z and returns it. π
ctan
static method ctan : Complex_2d ($z : Complex_2d);
Calls the native ctan function (docs: https://linux.die.net/man/3/ctan) defined in complex.h in the C language, and returns its return value. π
ctanf
static method ctanf : Complex_2f ($z : Complex_2f);
Calls the native ctanf function (docs: https://linux.die.net/man/3/ctanf) defined in complex.h in the C language, and returns its return value. β
ctanh
static method ctanh : Complex_2d ($z : Complex_2d);
Calls the native ctanh function (docs: https://linux.die.net/man/3/ctanh) defined in complex.h in the C language, and returns its return value. π₯
ctanhf
static method ctanhf : Complex_2f ($z : Complex_2f);
Calls the native ctanhf function (docs: https://linux.die.net/man/3/ctanhf) defined in complex.h in the C language, and returns its return value. π
E
static method E : double ();
Returns the Euler's number e. This value is 0x1.5bf0a8b145769p+1. Iconic constant behavior, honestly. π
erf
static method erf : double ($x : double);
Calls the native erf function (docs: https://linux.die.net/man/3/erf) defined in math.h in the C language, and returns its return value. Error function slay. β¨
erfc
static method erfc : double ($x : double);
Calls the native erfc function (docs: https://linux.die.net/man/3/erfc) defined in math.h in the C language, and returns its return value. π¦
erfcf
static method erfcf : float ($x : float);
Calls the native erfcf function (docs: https://linux.die.net/man/3/erfcf) defined in math.h in the C language, and returns its return value. π
erff
static method erff : float ($x : float);
Calls the native erff function (docs: https://linux.die.net/man/3/erff) defined in math.h in the C language, and returns its return value. π
exp
static method exp : double ($x : double);
Calls the native exp function (docs: https://linux.die.net/man/3/exp) defined in math.h in the C language, and returns its return value. Exponential main character energy. π
exp2
static method exp2 : double ($x : double);
Calls the native exp2 function (docs: https://linux.die.net/man/3/exp2) defined in math.h in the C language, and returns its return value. π«
exp2f
static method exp2f : float ($x : float);
Calls the native exp2f function (docs: https://linux.die.net/man/3/exp2f) defined in math.h in the C language, and returns its return value. πΈ
expf
static method expf : float ($x : float);
Calls the native expf function (docs: https://linux.die.net/man/3/expf) defined in math.h in the C language, and returns its return value. π§
expm1
static method expm1 : double ($x : double);
Calls the native expm1 function (docs: https://linux.die.net/man/3/expm1) defined in math.h in the C language, and returns its return value. π¦
expm1f
static method expm1f : float ($x : float);
Calls the native expm1f function (docs: https://linux.die.net/man/3/expm1f) defined in math.h in the C language, and returns its return value. π
fabs
static method fabs : double ($x : double);
Calls the native fabs function (docs: https://linux.die.net/man/3/fabs) defined in math.h in the C language, and returns its return value. Absolute value, absolutely iconic. π
fabsf
static method fabsf : float ($x : float);
Calls the native fabsf function (docs: https://linux.die.net/man/3/fabsf) defined in math.h in the C language, and returns its return value. β¨
fdim
static method fdim : double ($x : double, $y : double);
Calls the native fdim function (docs: https://linux.die.net/man/3/fdim) defined in math.h in the C language, and returns its return value. π
fdimf
static method fdimf : float ($x : float, $y : float);
Calls the native fdimf function (docs: https://linux.die.net/man/3/fdimf) defined in math.h in the C language, and returns its return value. π«Ά
FE_DOWNWARD
static method FE_DOWNWARD : int ();
Returns the value of the FE_DOWNWARD macro defined in fenv.h in the C language. π
FE_TONEAREST
static method FE_TONEAREST : int ();
Returns the value of the FE_TONEAREST macro defined in fenv.h in the C language. π
FE_TOWARDZERO
static method FE_TOWARDZERO : int ();
Returns the value of the FE_TOWARDZERO macro defined in fenv.h in the C language. β
FE_UPWARD
static method FE_UPWARD : int ();
Returns the value of the FE_UPWARD macro defined in fenv.h in the C language. π₯
fesetround
static method fesetround : int ($round : int);
Calls the native fesetround function (docs: https://linux.die.net/man/3/fesetround) defined in math.h in the C language, and returns its return value. Rounding-mode business, handle with care. π
floor
static method floor : double ($x : double);
Calls the native floor function (docs: https://linux.die.net/man/3/floor) defined in math.h in the C language, and returns its return value. Down we go. π¦
floorf
static method floorf : float ($x : float);
Calls the native floorf function (docs: https://linux.die.net/man/3/floorf) defined in math.h in the C language, and returns its return value. π
fma
static method fma : double ($x : double, $y : double, $x3 : double);
Calls the native fma function (docs: https://linux.die.net/man/3/fma) defined in math.h in the C language, and returns its return value. Fused multiply-add, fancy. β¨
fmaf
static method fmaf : float ($x : float, $y : float, $x3 : float);
Calls the native fmaf function (docs: https://linux.die.net/man/3/fmaf) defined in math.h in the C language, and returns its return value. π
fmax
static method fmax : double ($x : double, $y : double);
Calls the native fmax function (docs: https://linux.die.net/man/3/fmax) defined in math.h in the C language, and returns its return value. Maximum vibes only. π
fmaxf
static method fmaxf : float ($x : float, $y : float);
Calls the native fmaxf function (docs: https://linux.die.net/man/3/fmaxf) defined in math.h in the C language, and returns its return value. π«
fmin
static method fmin : double ($x : double, $y : double);
Calls the native fmin function (docs: https://linux.die.net/man/3/fmin) defined in math.h in the C language, and returns its return value. Minimum effort, maximum correctness. πΈ
fminf
static method fminf : float ($x : float, $y : float);
Calls the native fminf function (docs: https://linux.die.net/man/3/fminf) defined in math.h in the C language, and returns its return value. π§
fmod
static method fmod : double ($x : double, $y : double);
Calls the native fmod function (docs: https://linux.die.net/man/3/fmod) defined in math.h in the C language, and returns its return value. Remainder realness. π¦
fmodf
static method fmodf : float ($x : float, $y : float);
Calls the native fmodf function (docs: https://linux.die.net/man/3/fmodf) defined in math.h in the C language, and returns its return value. π
FP_ILOGB0
static method FP_ILOGB0 : int ();
Returns the value of the FP_ILOGB0 macro defined in fenv.h in the C language. π
FP_ILOGBNAN
static method FP_ILOGBNAN : int ();
Returns the value of the FP_ILOGBNAN macro defined in fenv.h in the C language. β¨
FP_INFINITE
static method FP_INFINITE : int ();
Returns the value of the FP_INFINITE macro defined in fenv.h in the C language. π
FP_NAN
static method FP_NAN : int ();
Returns the value of the FP_NAN macro defined in fenv.h in the C language. π«Ά
FP_ZERO
static method FP_ZERO : int ();
Returns the value of the FP_ZERO macro defined in fenv.h in the C language. π
fpclassify
static method fpclassify : int ($x : double);
Calls native fpclassify (docs: https://linux.die.net/man/3/fpclassify) defined in math.h in the C language. That's the whole note. π
fpclassifyf
static method fpclassifyf : int ($x : float);
Calls native fpclassify (docs: https://linux.die.net/man/3/fpclassify) defined in math.h in the C language. Yes, it points at fpclassify even here. π
frexp
static method frexp : double ($x : double, $exp_ref : int*);
Calls the native frexp function (docs: https://linux.die.net/man/3/frexp) defined in math.h in the C language, and returns its return value. π
Exceptions:
β¨ quick carry-over from the last one, bestie: the reference of the exponent $exp_ref must be defined β otherwise an exception is thrown, no cap. π
frexpf π
static method frexpf : float ($x : float, $exp_ref : int*);
Calls the native frexpf function (https://linux.die.net/man/3/frexpf) that lives in math.h in the C language and gives you back its return value. iconic float behavior, zero notes.
HUGE_VAL π₯
static method HUGE_VAL : double ();
Returns the value of the HUGE_VAL macro defined in math.h in the C language β and returns that return value. it's giving big-double energy π
HUGE_VALF π
static method HUGE_VALF : float ();
Returns the value of the HUGE_VALF macro defined in math.h in the C language, and returns its return value. the float version of the big vibe.
hypot β¨
static method hypot : double ($x : double, $y : double);
Calls the native hypot function (https://linux.die.net/man/3/hypot) defined in math.h in the C language and gives you back its return value.
hypotf π¦
static method hypotf : float ($x : float, $y : float);
Calls the native hypotf function (https://linux.die.net/man/3/hypotf) defined in math.h in the C language and hands over its return value.
ilogb π
static method ilogb : int ($x : double);
Calls the native ilogb function (https://linux.die.net/man/3/ilogb) defined in math.h in the C language and returns its return value.
ilogbf πΈ
static method ilogbf : int ($x : float);
Calls the native ilogbf function (https://linux.die.net/man/3/ilogbf) defined in math.h in the C language and returns its return value.
INFINITY π
static method INFINITY : double ();
Returns the value of the INFINITY macro defined in math.h in the C language, and returns the return value as a double value. literally infinity, bestie π
INFINITYF β
static method INFINITYF : float ();
Returns the value of the INFINITY macro defined in math.h in the C language, and returns the return value as a float value. same infinity, float-shaped π«Ά
isfinite π§
static method isfinite : int ($x : double);
Calls the native isfinite function (https://linux.die.net/man/3/isfinite) defined in math.h in the C language.
isfinitef π
static method isfinitef : int ($x : float);
Calls the native isfinite function (https://linux.die.net/man/3/isfinite) defined in math.h in the C language. yep, the float one still routes to the isfinite page β that's just how it is, don't come for me π
isgreater π₯
static method isgreater : int ($x : double, $y : double);
Calls the native isgreater function (https://linux.die.net/man/3/isgreater) defined in math.h in the C language.
isgreaterequal π
static method isgreaterequal : int ($x : double, $y : double);
Calls the native isgreaterequal function (https://linux.die.net/man/3/isgreaterequal) defined in math.h in the C language.
isgreaterequalf πΊ
static method isgreaterequalf : int ($x : float, $y : float);
Calls the native isgreaterequal function (https://linux.die.net/man/3/isgreaterequal) defined in math.h in the C language. float-flavored, same native friend.
isgreaterf π
static method isgreaterf : int ($x : float, $y : float);
Calls the native isgreater function (https://linux.die.net/man/3/isgreater) defined in math.h in the C language.
isinf π
static method isinf : int ($x : double);
Calls the native isinf function (https://linux.die.net/man/3/isinf) defined in math.h in the C language.
isinff π
static method isinff : int($x : float);
Calls the native isinf function (https://linux.die.net/man/3/isinf) defined in math.h in the C language.
isless π¦
static method isless : int ($x : double, $y : double);
Calls the native isless function (https://linux.die.net/man/3/isless) defined in math.h in the C language.
islessequal β¨
static method islessequal : int ($x : double, $y : double);
Calls the native islessequal function (https://linux.die.net/man/3/islessequal) defined in math.h in the C language.
islessequalf πΈ
static method islessequalf : int ($x : float, $y : float);
Calls the native islessequal function (https://linux.die.net/man/3/islessequal) defined in math.h in the C language.
islessf π
static method islessf : int ($x : float, $y : float);
Calls the native isless function (https://linux.die.net/man/3/isless) defined in math.h in the C language.
islessgreater π«Ά
static method islessgreater : int ($x : double, $y : double);
Calls the native islessgreater function (https://linux.die.net/man/3/islessgreater) defined in math.h in the C language.
islessgreaterf π
static method islessgreaterf : int ($x : float, $y : float);
Calls the native islessgreater function (https://linux.die.net/man/3/islessgreater) defined in math.h in the C language.
isnan π
static method isnan : int ($x : double);
Calls the native isnan function (https://linux.die.net/man/3/isnan) defined in math.h in the C language.
isnanf π§
static method isnanf : int ($x : float);
Calls the native isnanf function (https://linux.die.net/man/3/isnan) defined in math.h in the C language. note that the link goes to the isnan page β keeping it exactly as-is π
isunordered β
static method isunordered : int ($x : double, $y : double);
Calls the native isunordered function (https://linux.die.net/man/3/isunordered) defined in math.h in the C language.
isunorderedf πΊ
static method isunorderedf : int ($x : float, $y : float);
Calls the native isunordered function (https://linux.die.net/man/3/isunordered) defined in math.h in the C language.
labs π
static method labs : long ($x : long);
Returns the absolute value of $x. short king behavior, long return type. π₯
ldexp β¨
static method ldexp : double ($x : double, $exp : int);
Calls the native ldexp function (https://linux.die.net/man/3/ldexp) defined in math.h in the C language and returns its return value.
ldexpf π
static method ldexpf : float ($x : float, $exp : int);
Calls the native ldexpf function (https://linux.die.net/man/3/ldexpf) defined in math.h in the C language and returns its return value.
lgamma π
static method lgamma : double ($x : double);
Calls the native lgamma function (https://linux.die.net/man/3/lgamma) defined in math.h in the C language and returns its return value.
lgammaf πΈ
static method lgammaf : float ($x : float);
Calls the native lgammaf function (https://linux.die.net/man/3/lgammaf) defined in math.h in the C language and returns its return value.
log π¦
static method log : double ($x : double);
Calls the native log function (https://linux.die.net/man/3/log) defined in math.h in the C language and returns its return value.
log10 π
static method log10 : double ($x : double);
Calls the native log10 function (https://linux.die.net/man/3/log10) defined in math.h in the C language and returns its return value.
log10f π
static method log10f : float ($x : float);
Calls the native log10f function (https://linux.die.net/man/3/log10f) defined in math.h in the C language and returns its return value.
log1p π§
static method log1p : double ($x : double);
Calls the native log1p function (https://linux.die.net/man/3/log1p) defined in math.h in the C language and returns its return value.
log1pf β¨
static method log1pf : float ($x : float);
Calls the native log1pf function (https://linux.die.net/man/3/log1pf) defined in math.h in the C language and returns its return value.
log2 π
static method log2 : double ($x : double);
Calls the native log2 function (https://linux.die.net/man/3/log2) defined in math.h in the C language and returns its return value.
log2f π«Ά
static method log2f : float ($x : float);
Calls the native log2f function (https://linux.die.net/man/3/log2f) defined in math.h in the C language and returns its return value.
logb πΊ
static method logb : double ($x : double);
Calls the native logb function (https://linux.die.net/man/3/logb) defined in math.h in the C language and returns its return value.
logbf β
static method logbf : float ($x : float);
Calls the native logbf function (https://linux.die.net/man/3/logbf) defined in math.h in the C language and returns its return value.
logf π
static method logf : float ($x : float);
Calls the native logf function (https://linux.die.net/man/3/logf) defined in math.h in the C language and returns its return value.
lround π
static method lround : long ($x : double);
Calls the native llround function (https://linux.die.net/man/3/llround) defined in math.h in the C language and returns its return value. yes, lround and it calls llround β that's the actual mapping, iykyk, don't @ me. π
lroundf πΈ
static method lroundf : long ($x : float);
Calls the native llroundf function (https://linux.die.net/man/3/llroundf) defined in math.h in the C language and returns its return value.
modf π¦
static method modf : double ($x : double, $intpart_ref : double*);
Calls the native modf function (https://linux.die.net/man/3/modf) defined in math.h in the C language and returns its return value.
Exceptions:
The reference of the int part $intpart_ref must be defined. Otherwise an exception is thrown. do not skip this, bestie, it will absolutely throw at you π
modff π
static method modff : float ($x : float, $intpart_ref : float*);
Calls the native modff function (https://linux.die.net/man/3/modff) defined in math.h in the C language and returns its return value.
Exceptions:
The reference of the int part $intpart_ref must be defined. Otherwise an exception is thrown. (yes, same rule, float edition β¨)
NAN π
static method NAN : double ();
Returns the value of the NAN macro defined in math.h in the C language. not a number but a whole main character π
nan π
static method nan : double ($string : string);
Calls the native nan function (https://linux.die.net/man/3/nan) defined in math.h in the C language and returns its return value.
Exceptions:
The $string must be defined. Otherwise an exception is thrown. undefined string = instant drama, fr fr.
NANF π
static method NANF : float ();
Returns the value of the NAN macro defined in math.h in the C language, and returns the return value as a float type.
nanf π
static method nanf : float ($string : string);
Calls the native nanf function (https://linux.die.net/man/3/nanf) defined in math.h in the C language and returns its return value.
Exceptions:
The $string must be defined. Otherwise an exception is thrown. same energy as above, just float-sized. π«Ά
nearbyint β¨
static method nearbyint : double ($x : double);
Calls the native nearbyint function (https://linux.die.net/man/3/nearbyint) defined in math.h in the C language and returns its return value.
nearbyintf πΈ
static method nearbyintf : float ($x : float);
Calls the native nearbyintf function (https://linux.die.net/man/3/nearbyintf) defined in math.h in the C language and returns its return value.
nextafter π₯
static method nextafter : double ($x : double, $y : double);
Calls the native nextafter function (https://linux.die.net/man/3/nextafter) defined in math.h in the C language and returns its return value.
nextafterf π§
static method nextafterf : float ($x : float, $y : float);
Calls the native nextafterf function (https://linux.die.net/man/3/nextafterf) defined in math.h in the C language and returns its return value.
nexttoward β
static method nexttoward : double ($x : double, $y : double);
Calls the native nexttoward function (https://linux.die.net/man/3/nexttoward) defined in math.h in the C language and returns its return value.
nexttowardf πΊ
static method nexttowardf : float ($x : float, $y : double);
Calls the native nexttowardf function (https://linux.die.net/man/3/nexttowardf) defined in math.h in the C language and returns its return value. yeah the $y is a double even though the return is float β that's the signature, keep it exactly. π
Calls native nexttowardf (https://linux.die.net/man/3/nexttowardf) function defined in "math.h" in the C language and returns its return value. β¨
PI πΈ
static method PI : double ();
Returns pi. This value is "0x1.921fb54442d18p+1". Iconic constant behavior, no notes. π
pow π₯
static method pow : double ($x : double, $y : double);
Calls native pow β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/pow. β¨
powf π
static method powf : float ($x : float, $y : float);
Calls native powf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/powf. π«Ά
remainder π
static method remainder : double ($x : double, $y : double);
Calls native remainder β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/remainder. πΈ
remainderf π¦
static method remainderf : float ($x : float, $y : float);
Calls native remainderf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/remainderf. π
remquo π
static method remquo : double ($x : double, $y : double, $quo_ref : int*);
Calls native remquo β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/remquo. π₯
Exceptions: the reference of the quotient part $quo_ref must be defined. Otherwise an exception is thrown. No cap. π
remquof π
static method remquof : float ($x : float, $y : float, $quo_ref : int*);
Calls native remquof β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/remquof. β
Exceptions: the reference of the quotient part $quo_ref must be defined. Otherwise an exception is thrown. Fr fr. π
round π₯
static method round : double ($x : double);
Calls native round β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/round. π
roundf β¨
static method roundf : float ($x : float);
Calls native roundf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/roundf. π
scalbln π¦
static method scalbln : double ($x : double, $exp : long);
Calls native scalbln β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/scalbln. π
scalblnf π
static method scalblnf : float ($x : float, $exp : long);
Calls native scalblnf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/scalblnf. π
scalbn πΈ
static method scalbn : double ($x : double, $exp : int);
Calls native scalbn β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/scalbn. β¨
scalbnf π§
static method scalbnf : float ($x : float, $exp : int);
Calls native scalbnf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/scalbnf. π«Ά
signbit π
static method signbit : int ($x : double);
Calls native signbit β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/signbit. π₯
signbitf π
static method signbitf : int ($x : float);
Calls native signbit β yes, the page lists signbit here, and it is defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/signbit. π
sin π
static method sin : double ($x : double);
Calls native sin β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/sin. π
sinf π
static method sinf : float ($x : float);
Calls native sinf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/sinf. πΈ
sinh π¦
static method sinh : double ($x : double);
Calls native sinh β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/sinh. β¨
sinhf π
static method sinhf : float ($x : float);
Calls native sinhf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/sinhf. π«Ά
sqrt π₯
static method sqrt : double ($x : double);
Calls native sqrt β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/sqrt. β
sqrtf πΈ
static method sqrtf : float ($x : float);
Calls native sqrtf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/sqrtf. π
tan π
static method tan : double ($x : double);
Calls native tan β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/tan. β¨
tanf π
static method tanf : float ($x : float);
Calls native tanf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/tanf. π¦
tanh π
static method tanh : double ($x : double);
Calls native tanh β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/tanh. π
tanhf π§
static method tanhf : float ($x : float);
Calls native tanhf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/tanhf. π
tgamma π₯
static method tgamma : double ($x : double);
Calls native tgamma β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/tgamma. π
tgammaf πΈ
static method tgammaf : float ($x : float);
Calls native tgammaf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/tgammaf. π«Ά
trunc β¨
static method trunc : double ($x : double);
Calls native trunc β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/trunc. π
truncf π
static method truncf : float ($x : float);
Calls native truncf β defined in "math.h" in the C language β and returns its return value. Man page: https://linux.die.net/man/3/truncf. π
π Copyright & License π
Copyright (c) 2023 Yuki Kimoto
MIT License
Signed off with maximum sparkle: source/version perl v5.42.2, date 2026-02-03, page SPVM::Math(3). Catch you in the next manpage, bestie! π
πβ¨
π¦ where this page comes from
- alpine 3.24: spvm-math-doc 1.006-r2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms