How PHP implements Division

Source: Internet
Author: User
Tags rounds
PHP is actually a small value in addition to www.zhixing123.cnphp27277.html. if we use the 'operator to perform division operations, we will get a small value if we cannot perform division operations. What if I only want to get the integer part? Multiple functions are provided in the PHP mathematical function library: 1. the round function rounds the floating point number. This should best suit everyone's needs. & Lt ;? How php implements Division
Http://www.zhixing123.cn/php/27277.html
If we use the '/' operator to perform division operations, we will get a small value if we cannot perform division operations. What if I only want to get the integer part?
Multiple functions are provided in the PHP mathematical function library:
1. the round function rounds a floating point number.. This should best suit everyone's needs.
  


2. ceil function, which is rounded up by a method.
  


3. floor, the rounding method is used to get the integer, and the fractional part is removed.
 

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.