Open iralance opened 7 years ago
BC 高精确度函数库bcscale 配置程序中所有 BC 函数库的内定小数点位数。之后程序若无特别指定,则依此配置的小数点位数。
<?php //统计计算保留小数点2位 bcscale(2); echo bcadd(2.33,43.2313131); echo "<br/>"; echo bcsub(3.2222,1.2111); echo "<br/>"; echo bcmul(3.232, 9.23); echo "<br/>"; echo bcdiv(3.99111, 1.222); echo "<br/>";