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>
Or... if you wanted JavaScript to behave the same as PHP, use this:
function phpRound(number) { if(number < 0) return 0 - Math.round(0 - number); return Math.round(number); }