PHP BC High Accuracy function library

Source: Internet
Author: User
Tags modulus square root

 #php BC Math contains: Add, compare, divide, subtract, balance, multiply, n-times, configure the default number of decimal points, squared #These functions are useful in relation to money, high precision percentagesFor example, using accurate data statistics:#comparison of two high-precision numbers #int Bccomp (String $left _operand, String $right _operand [, int $scale]) #$left = $right returns 0 #$left < $right back-1 #$left > $right return 1 #$scale the number of decimal places  #two high-precision numbers added #string Bcadd (String $left _operand, String $right _operand [, int $scale]) #$scale the number of decimal points returned  #subtract two high-precision numbers #sstring bcsub (String $left _operand, String $right _operand [, int $scale]) #$scale the number of decimal points returned  #two high-precision numbers for redundancy/modulus #string Bcmod (String $left _operand, string $modulus)  #divide two high-precision numbers #string Bcdiv (String $left _operand, String $right _operand [, int $scale]) #$scale the number of decimal places defaults to 0     #multiply two high-precision numbers #string Bcmul (String $left _operand, String $right _operand [, int $scale]) #$scale the number of decimal places defaults to 0     #the quadratic value of two high-precision numbers #string Bcpow (String $left _operand, String $right _operand [, int $scale]) #$scale the number of decimal places defaults to 0     #to find the square root of high precision number #string Bcsqrt (string $operand [, int $scale]) #$scale the number of decimal places defaults to 0   #set the number of decimal places for the BC function #bool Bcscale (int $scale) #$scale the number of decimal places defaults to 0

PHP BC High Accuracy function library

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.