PHP Version 5.3.3-7 + squeeze19
echo round (8.798768979, 2);
Result: 8.800000000000001
echo round (8.449999999999999, 2);
Result: 8.449999999999999
Why isn’t rounding up to two characters?
PHP Version 5.3.3-7 + squeeze19
echo round (8.798768979, 2);
Result: 8.800000000000001
echo round (8.449999999999999, 2);
Result: 8.449999999999999
Why isn’t rounding up to two characters?
Source: https://ru.stackoverflow.com/questions/708480/
All Articles
roundensures that this disgrace will not. KMK, most likely the problem is different - Aleksey Shimanskyrounddoes not guarantee this. The root of the problem is precisely in the features of thefloattype - rjhdby