Tag Archives — Math
Arbitrary Precision Maths Functions in PHP (BC Math)
Arbitrary Precision Maths Functions in PHP Function Name Function Description bcadd() Add two arbitrary precision numbers bccomp() Compare two arbitrary precision numbers bcdiv() Divide two arbitrary precision numbers bcmod() Get modulus of an arbitrary precision number bcmul() Multiply two arbitrary precision numbers bcpow() Raise an arbitrary precision number to another bcpowmod() Raise an arbitrary precision […]
Miscellaneous Maths Functions in PHP
Miscellaneous Maths Functions in PHP Function Name Function Description deg2rad() Converts the number in degrees to the radian equivalent hypot() Calculate the length of the hypotenuse of a right-angle triangle intdiv() Integer division lcg_value() Combined linear congruential generator pi() Get value of pi rad2deg() Converts the radian number to the equivalent number in degrees PHP […]
Numerical Functions in PHP
Numerical Functions in PHP Function Name Function Description abs() Absolute value ceil() Round fractions up floor() Round fractions down fmod() Returns the floating point remainder (modulo) of the division of the arguments is_finite() Finds whether a value is a legal finite number is_infinite() Finds whether a value is infinite is_nan() Finds whether a value is […]
Exponential and Logarithmic Functions in PHP
Random Number Functions Functions in PHP Function Name Function Description exp() Calculates the exponent of e expm1() Returns exp(number) – 1, computed in a way that is accurate even when the value of number is close to zero log10() Base-10 logarithm log1p() Returns log(1 + number), computed in a way that is accurate even when […]
Binary, Hexadecimal, Octal Functions in PHP
Random Number Functions Functions in PHP Function Name Function Description base_convert() Convert a number between arbitrary bases bindec() Binary to decimal decbin() Decimal to binary dechex() Decimal to hexadecimal decoct() Decimal to octal hexdec() Hexadecimal to decimal octdec() Octal to decimal PHP base_convert() Function PHP base_convert() Usage The PHP base_convert() function will convert a number […]
Trigonometric Functions in PHP
Trigonometric Functions in PHP Function Name Function Description sin() Sine cos() Cosine tan() Tangent asin() Arc sine acos() Arc cosine atan() Arc tangent atan2() Arc tangent of two variables asinh() Inverse hyperbolic sine acosh() Inverse hyperbolic cosine atanh() Inverse hyperbolic tangent deg2rad() Converts the number in degrees to the radian equivalent rad2deg() Converts the radian […]