SPVM::Math(3)

πŸ“¦ version 1.006, in alpine 3.24

πŸ¦‹ 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 (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