Abscissa Tech Home Design Coding Media Server
Tutorials Courses Forums Resources
  Home
 
  Member Options
    Sign Up
  Log In
 
  Tools
    PowerHTML
    Teacher's Lounge
  References
  HTML
  PHP
  CSS
 
  Search
 
 
    Legalese
    Contact Us
    Privacy Policy
    About Abscissa

XXVIII. Mathematical functions

Introduction

These math functions will only handle values within the range of the long and double types on your computer. If you need to handle bigger numbers, take a look at the arbitrary precision math functions.

Math constants

The following values are defined as constants in PHP by the math extension:

Table 1. Math constants

ConstantValueDescription
M_PI3.14159265358979323846The value of ¶ (pi)

Table of Contents
Abs — absolute value
Acos — arc cosine
Asin — arc sine
Atan — arc tangent
Atan2 — arc tangent of two variables
base_convert — convert a number between arbitrary bases
BinDec — binary to decimal
Ceil — round fractions up
Cos — cosine
DecBin — decimal to binary
DecHex — decimal to hexadecimal
DecOct — decimal to octal
Exp — e to the power of...
Floor — round fractions down
getrandmax — show largest possible random value
HexDec — hexadecimal to decimal
Log — natural logarithm
Log10 — base-10 logarithm
max — find highest value
min — find lowest value
mt_rand — generate a better random value
mt_srand — seed the better random number generator
mt_getrandmax — show largest possible random value
number_format — format a number with grouped thousands
OctDec — octal to decimal
pi — get value of pi
pow — exponential expression
rand — Generate a random value
round — Rounds a float.
Sin — sine
Sqrt — square root
srand — seed the random number generator
Tan — tangent

This PHP manual is Copyright © 1997, 1998, 1999, 2000 the PHP Documentation Group. It has been licensed under the GPL. Permission granted for display on the Abscissa Tech web site on March 9, 2000. The most recent PHP documentation is available at http://www.php.net/.