This is more a comparison of output routines than anything else.  In PHP, one of the languages that gives the &quot;correct&quot; result:<p><pre><code>    php &gt; echo .1 + .2;
    0.3
    php &gt; if (.1 + .2 === .3) { echo &quot;equal&quot;; } else { echo &quot;not equal&quot;; }
    not equal</code></pre>