Home >Backend Development >PHP Tutorial >php math function extension
Mathematical functions:
abs — absolute value
acos — inverse cosine
acosh — inverse hyperbolic cosine
asin — inverse sine
asinh — inverse hyperbolic sine
atan2 — arc tangent of two parameters
atan — arctangent
atanh — inverse hyperbolic tangent
base_convert — convert numbers between arbitrary bases
bindec — convert binary to decimal
ceil — round to the nearest integer
cos — cosine
cosh — Hyperbolic cosine
decbin — Convert decimal to binary
dechex — Convert decimal to hexadecimal
decoct — Convert decimal to octal
deg2rad — Convert angle to radians
exp — Calculate the exponent of e
expm1 — Returns exp(number) - 1, even when the value of number is close to zero, the accurate result can be calculated
floor — Rounding by rounding method
fmod — Returns the floating point remainder of division
getrandmax — Displays the largest random number Possible values
hexdec — Convert hexadecimal to decimal
hypot — Calculate the length of the hypotenuse of a right triangle
is_finite — Determine whether it is a finite value
is_infinite — Determine whether it is an infinite value
is_nan — Determine whether it is Legal value
lcg_value — Combined linear congruential generator
log10 — Base 10 logarithm
log1p — Returns log(1 + number), even when the value of number is close to zero, accurate results can be calculated
log — Natural logarithm
max — Find the maximum value
min — Find the minimum value
mt_getrandmax — Display the maximum possible value of a random number
mt_rand — Generate better random numbers
mt_srand — Sow the next update Good random number generator seed
octdec — Convert octal to decimal
pi — Get pi value
pow — Exponential expression
rad2deg — Convert radians to corresponding angles
rand — Generate a random integer
round — Round floating point numbers
sin — Sine
sinh — Hyperbolic sine
sqrt — Square root
srand — Seed a random number generator
tan — Tangent
tanh — Hyperbolic tangent