Home >Backend Development >PHP Tutorial >Explore the categories of PHP mathematical functions_PHP Tutorial

Explore the categories of PHP mathematical functions_PHP Tutorial

WBOY
WBOYOriginal
2016-07-15 13:30:55959browse

We are learningAbs
Function description: mixed abs(mixed number);
Return value: function abs returns the absolute value of the parameter number.

Acos
Function description: double acos(double number);
Return value: Function acos returns the inverse cosine of the parameter number. If the parameter number is greater than 1 or less than 1, its arccosine value is meaningless.

Acosh --
Inverse hyperbolic cosine

Asin
Function description; double asin(double number);
Return value: function asin returns the inverse sine of the parameter number value. If the parameter number is greater than 1 or less than 1, its arcsine value is meaningless.

Asinh --
Inverse hyperbolic sine

Atan
Function description: double atan(double number);
Function atan returns the arctangent value of the parameter number.

Atan2
Function description: Double atan2(double x, double y);
Return value: Function atan2 returns the radian of the angle of the coordinate point specified by the Cartesian coordinate system in the polar coordinate system value.

Atan --
Arctangent

Atanh --
Inverse hyperbolic tangent

BinDec
Function description: int bindec(string binary_number);
Return value: The function bindec returns the integer value of a string binary_number written as a binary number. PHP uses 32-bit signed integers, where the first bit of the binary number is the sign bit.

Base_convert --
Convert numbers between arbitrary bases

Ceil
Function description: int ceil(double number);
Return value: Function ceil returns greater than The smallest integer of parameter number; if number is an integer. , then returns itself.

Cos
Function description: double cos(double angle);
Return value: Function cos returns the cosine value of the angle with the size of radian as the parameter angle.

Cosh --
Hyperbolic Cosine

DecBin
The opposite of Bindec, converts decimal to binary.

DecHex (<->HexDec)
Returns hexadecimal value

DecOct (<->OctDec)
Returns octal value

Deg2rad(<->Rad2reg)
Function description: double deg2red(double angle);
Return value: Function deg2red returns the radian value corresponding to the angle number angle.

Exp
Function description: double exp(double power);
Return value: Function exp returns the power of the natural logarithm.

Expm1 --
Returns Exp(number) - 1, even when the value of number is close to zero, the accurate result can be calculated

Floor
Function description: int floor(double number);
Return value: Return the integer part of the parameter number.

Fmod --
Returns the floating point remainder of division

Getrandmax
Function description: int getrandmax();
Return value; Returns what can be returned by the function rand Maximum value

Hexdec --
Convert hexadecimal to decimal

Hypot --
Return sqrt(num1*num1 + num2*num2)

Is_finite --
Judge whether it is a finite value

Is_infinite --
Judge whether it is an infinite value

Is_nan --
Judge whether it is a legal value

Log(Log10)
Function description: Double log(double number);
Return value: Return the natural logarithm of the parameter number (return the logarithm with base 10)

Lcg_value --
Combined Linear Congruential Generator

Log10 --
Log base 10

Log1p --
Returns log(1 + number) even when Accurate results can be calculated even when the value of number is close to zero

Max (<->Min)
Function description: mixed max(mixed arg1, mixed arg2, …, mixed argn);
Return value: Returns the maximum value (minimum value) in this array. If there are floating point numbers in the parameters, all parameters will be converted into floating point numbers, and the return value will also be a floating point number; otherwise, all parameters will be converted into integers, and the return value will be an integer.

Pi
Function description: double pi();
Return value: Function pi returns the approximate value of pi.

Pow
Function description: double pow (double base, double power);
Return value: Function pow returns the power of the parameter base.

Rand
Function description: int rand (int lowest, int longest);
Description: The function rand must be activated with srand before use. Generate a random number.
Return value: The function rand returns a number between the optional parameters lowest and longest (including two parameters); if there are no parameters, the return value ranges from zero to the integer returned by getrandmax.

Rad2deg --
Convert the number of radians to the corresponding number of angles

Round
Function description: double round (double number);
Return value: function round returns The integer closest to parameter number.

Sin
Function description: double sin (double angle);
Return value: Function sin returns the sine value of an angle expressed in radians.

Sinh --
Hyperbolic sine

Sqrt
Function description: double sqrt (double number);
Explanation: In the function sqrt, the parameter number cannot be less than 0 .
Return value: The function sqrt returns the square root of the parameter number.

Srand
Function description: srand (int seed);
Description: Function srand activates the random number generator. The parameter seed is a randomly generated seed, that is, the random number obtained is obtained by a series of calculations based on the parameters.
Return value: None.

Tan
Function description: double tan (duoble angle);
Return value: Function tan returns the tangent value of the angle expressed in radians.

Tanh —
Hyperbolic tangent


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446261.htmlTechArticleWe are learning Abs function description: mixed abs(mixed number); Return value: function abs returns the absolute value of parameter number value. Acos function description: double acos(double number); Return value: function...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn