Home > PHP > Extension > Math

Math

math

Description

Mathematical Functions
  • abs (number) - Absolute value
  • acos (arg) - Arc cosine
  • acosh (arg) - Inverse hyperbolic cosine
  • asin (arg) - Arc sine
  • asinh (arg) - Inverse hyperbolic sine
  • atan (arg) - Arc tangent
  • atan2 (y, x) - Arc tangent of two variables
  • atanh (arg) - Inverse hyperbolic tangent
  • base_convert (number, frombase, tobase) - Convert a number between arbitrary bases
  • bindec (binary_string) - Binary to decimal
  • ceil (value) - Round fractions up
  • cos (arg) - Cosine
  • cosh (arg) - Hyperbolic cosine
  • decbin (number) - Decimal to binary
  • dechex (number) - Decimal to hexadecimal
  • decoct (number) - Decimal to octal
  • deg2rad (number) - Converts the number in degrees to the radian equivalent
  • exp (arg) - Calculates the exponent of e
  • expm1 (arg) - Returns exp(number) - 1, computed in a way that is accurate even when the value of number is close to zero
  • floor (value) - Round fractions down
  • fmod (x, y) - Returns the floating point remainder (modulo) of the division of the arguments
  • getrandmax (x, y) - Show largest possible random value
  • hexdec (hex_string) - Hexadecimal to decimal
  • hypot (x, y) - Calculate the length of the hypotenuse of a right-angle triangle
  • is_finite (val) - Finds whether a value is a legal finite number
  • is_infinite (val) - Finds whether a value is infinite
  • is_nan (val) - Finds whether a value is not a number
  • lcg_value (val) - Combined linear congruential generator
  • log (arg, base) - Natural logarithm
  • log10 (arg) - Base-10 logarithm
  • log1p (number) - Returns log(1 + number), computed in a way that is accurate even when the value of number is close to zero
  • max (values, value1, value2, value3..., values, value1, value2, value3...) - Find highest value
  • min (values, value1, value2, value3..., values, value1, value2, value3...) - Find lowest value
  • mt_getrandmax (values, value1, value2, value3..., values, value1, value2, value3...) - Show largest possible random value
  • mt_rand (values, value1, value2, value3..., values, value1, value2, value3...) - Generate a better random value
  • mt_srand (seed) - Seed the better random number generator
  • octdec (octal_string) - Octal to decimal
  • pi (octal_string) - Get value of pi
  • pow (base, exp) - Exponential expression
  • rad2deg (number) - Converts the radian number to the equivalent number in degrees
  • rand (number) - Generate a random integer
  • round (val, precision, mode) - Rounds a float
  • sin (arg) - Sine
  • sinh (arg) - Hyperbolic sine
  • sqrt (arg) - Square root
  • srand (seed) - Seed the random number generator
  • tan (arg) - Tangent
  • tanh (arg) - Hyperbolic tangent