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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e532da-44188.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e532da-44188.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?