I don't know very well because it gives me the error, I tried using number_format and float but it gives the same error.
<?php $total=6300.00; $var1=901.81; $var2=5398.19; //$subTotal == 6300.00 - 901.81 = 5398.19; $subTotal= $total - $var1; //$finTotal == 5398.19 - 5398.19 = 0; $finTotal= $subTotal - $var2; //$finTotal== ¿¿¿¿¿¿ -9.0949470177293E-13 ??????? echo $finTotal;
https://stackoverflow.com/questions/65801705/problems-with-subtracting-decimals January 20, 2021 at 09:00AM
没有评论:
发表评论