Salesforce Apex:<p><pre><code>  system.debug( 0.1 + 0.2 );
  09:25:37:027 USER_DEBUG [3]|DEBUG|0.3
</code></pre>
However<p><pre><code>  double a = 0.1;
  double b = 0.2;
  system.debug( a + b );
  09:26:57:043 USER_DEBUG [4]|DEBUG|0.30000000000000004</code></pre>