PHP Math function questions

Source: Internet
Author: User
Tags decimal to binary square root

1. What is the function of absolute value?

2. What is the function of converting numbers between arbitrary binaries?

3. Binary conversion to decimal, decimal to Binary, 16 to decimal, decimal to 16, octal to decimal, decimal to octal, what are the functions that are converted into octets?

4. Take the value up, take down the value, what is the function of rounding?

5. What is the function of finding the maximum and minimum values in an array?

6. What are the two functions that generate a random number? Which is faster, how much faster?

7. what is the function to get pi value π?

What is the Y-order of 8.x? How does the square root of x mean?

Answer

1.number abs ( mixed $number )

2. String base_convert  (  String  $number  ,  Int  $frombase  , int   $tobase  )

3.bindec (), Decbin (), Hexdec (), Dechex (), Octdec (), Decoct ()

4.ceil ($number), Floor ($number), round ($number [, $precision)

5.max ($array), Min ($array)

6.mt_rand ($min, $max), Rand ($min, $max); Mt_rand function 4 times times faster than Rand

7.pi ();

8.pow (x, y); sqrt (x);

PHP Math function questions

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.