PHP / PHP Math predefined Functions

Function Returns
abs() Absolute (positive) value of a number.
sin() sine of a number.
sinh() Hyperbolic sine of a number.
asin() Convert sine of a number.
asinh() Inverse hyperbolic sine of a number.
cos() Cosine of a number.
cosh() cosh of a number.
acos() Cosine of a number.
acosh() inverse hyperbolic cosine of a number.
tan() Tangent of a number.
tanh() Hyperbolic tangent of a number.
atan() Arc tangent of a number in radians.
atan2() Arc tangent of two variables x and y.
atanh() inverse hyperbolic tangent of a number.
base_convert() Convert a number from one number base to another.
bindec() Convert a binary number to a decimal number.
ceil() Round a number up to the nearest integer.
pi() Approximation value of PI.
decbin() Decimal number to a binary number.
dechex() Decimal number to a hexadecimal number.
decoct() octal number
deg2rad() Converts a degree value to a radian value.
rad2deg() Converts a radian value to a degree value.
exp() uexponent of e.
expm1() exp(x) - 1.
floor() Converts round a number down to the nearest integer.
fmod() the remainder of x/y.
getrandmax() largest possible value returned by rand().
hexadec() Used to convert a hexadecimal number to a decimal number.
hypot() Calculate the hypotenuse of a right-angle triangle.
is_fine() To check whether a value is fine or not.
is_infine() Check whether a value is infine or not.
is_nan() Check whether a value is 'not-a-number'.
lcg_value() a pseudo random number in a range between 0 and 1.
log() natural logarhm of a number.
log10() base-10 logarhm of a number.
log1p() log(1+number).
max() highest value in an array, or the highest value of several specified values.
min() lowest value in an array, or the lowest value of several specified values.
getrandmax() maximum value by using rand().
mt_getrandmax() largest possible value returned by mt_rand().
mt_rand() Generates a random integer using Mersenne Twister algorhm.
mt_srand() Seeds the Mersenne Twister random number generator.
octdec() Converts an octal number to a decimal number.
pow() return x raised to the power of y.
intdiv integer quotient of the division of dividend by divisor.
rand() Generates a random integer.
round() Round a floating-point number.
fmod() floating point remainder of the division of the Argument.
sqrt() square root of a number.


Home     Back