#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