Some numbers in php round can be processed, and some numbers will have a lot of decimal places when they are rounded.

round(1654654956.82,2); //:1654654956.8199999
round(785548121.11,2); //:785548121.11000001
round(55448.126.82,2); //:55448.129999999997
round(785548121.11.82,2); //:785548121.11000001
round(5456489.15,2); //:5456489.1500000004

from the output result, we don"t keep two decimal places as agreed. Ask
, but some numbers are fine. For example, the output result of 5.5448126 is 5.54

.
Php
Mar.02,2021

reference to the cause of the problem: https://www.cnblogs.com/xiezh.

solution: http://www.php.net/manual/zh/.


Direct round can't have this. This only happens in calculation, and then what are the two dots in you

Menu