Monday, December 16, 2013

PHP Math Constants


Math Constants

M_E
Returns e (approx. 2.718)
M_EULER
Returns Euler's constant (approx. 0.577)
M_LNPI
Returns the natural logarithm of PI (approx. 1.144)
M_LN2
Returns the natural logarithm of 2 (approx. 0.693)
M_LN10
Returns the natural logarithm of 10 (approx. 2.302)
M_LOG2E
Returns the base-2 logarithm of E (approx. 1.442)
M_LOG10E
Returns the base-10 logarithm of E (approx. 0.434)
M_PI
Returns PI (approx. 3.14159)
M_PI_2
Returns PI/2 (approx. 1.570)
M_PI_4
Returns PI/4 (approx. 0.785)
M_1_PI
Returns 1/PI (approx. 0.318)
M_2_PI
Returns 2/PI (approx. 0.636)
M_SQRTPI
Returns the square root of PI (approx. 1.772)
M_2_SQRTPI
Returns 2/square root of PI (approx. 1.128)
M_SQRT1_2
Returns the square root of 1/2 (approx. 0.707)
M_SQRT2
Returns the square root of 2 (approx. 1.414)
M_SQRT3
Returns the square root of 3 (approx. 1.732)

PHP Math Functions

No comments:

Post a Comment