PHP Math function

Source: Internet
Author: User
Tags natural logarithm square root

Base_convert ($number, $frombase, $tobase)//Convert a number between arbitrary binaries

Ceil ($float)//Up rounding

Floor ($float)//Down rounding

EXP ($float)//calculate E's exponent

Hypot ($x, $y)//Calculate the hypotenuse length of right triangle

Is_nan ($val)//Determine if it is a valid value

Log ($arg [, $base =e])//natural logarithm

Max ($num 1, $num 2, ...)//Find out the maximum value

Max ($arr)//Find out the maximum value in the array

Min ($num 1, $num 2, ...)//Find the minimum value

RAND ([$min], $max)//Generate a random integer

Srand ([$seed])//sowing random number generator seeds

Mt_rand ([$min], $max)//Generate better random numbers

Mt_srand ($seed)//sowing a better random number generator seed

PI ()//Get PI Value

Pow ($base, $exp)//exponential expression

sqrt ($float)//Seek square root

Deg2rad ($float)//convert angle to radians

Rad2deg ($float)//Convert the number of radians to the corresponding number of angles

Round ($val [, $pre = 0])//rounding of floating-point numbers

Fmod ($x, $y)//Returns the remainder of the floating-point number for division

PHP Math function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.