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

Explore the categories of PHP mathematical functions_PHP Tutorial

Jul 15, 2016 pm 01:30 PM
abs php value function parameter exist study us Discuss math of category return

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 of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

7 PHP Functions I Regret I Didn't Know Before 7 PHP Functions I Regret I Didn't Know Before Nov 13, 2024 am 09:42 AM

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

See all articles