In Haskell&#x2F;GHC it depends on what representation you chose. Default is Double, which exhibits this problem. But if I force it to Float I get the &#x27;correct&#x27; result. Or if I use the &#x27;Scientific&#x27; data type (which has arbitrary precision). Just like &#x27;Int&#x27; vs &#x27;Integer&#x27;, where the former is restricted by the machine&#x27;s word size, while the later is unbounded.<p><pre><code>    Prelude&gt; 0.1 + 0.2 :: Float
    0.3
    Prelude&gt; 0.1 + 0.2 :: Double
    0.30000000000000004
    Prelude&gt; :m +Data.Scientific
    Prelude Data.Scientific&gt; 0.1 + 0.2 :: Scientific
    0.3</code></pre>