As we all know, floating point arithmetic is not always completely accurate, but how do you deal with its inconsistencies?
As an example, in PHP 5.2.9: (this doesn't happen in 5.3)
echo round(14.99225, 4); // 14.9923
echo round(15.99225, 4); // 15.9923
echo round(16.99225, 4); // 16.9922 ??
echo round(17.99225, 4); // 17.9922 ??
echo round(25.99225, 4); // 25.9922 ??
echo round(26.99225, 4); // 26.9923
How would you work around this?