This question already has an answer here:
- Is floating point math broken? 18 answers
Today my coworker stumbled on this:
$s = floatval("307.03"); $s = $s * 100; echo intval($s); //30702
float value or round($s) return 30703 as expected.
I guess it's a problem connected with float to int approximation but why does this happen exactly ?