I found a very strange issue, the issue is the ROUND method in PHP and Javascript the calculation results are not the same!?
See the following example:
PHP>
To control it more use ceil and floor for rounding. That way you can choose which way to round
ceil
floor