title: precision of Double and Decimal (in .NET)
body: <p>As far as I understand now, Decimal is 2 times bigger than Double (128 bits vs 64 bits). So it can represent numbers with bigger precision. But it also uses numeric system with base 10, instead of binary. Maybe the last trait of Decimal affects the following results?</p>
  
  <pre><code>Microsoft (R) F# Interactive version 11.0.60610.1
  Copyright (c) Microsoft Corporation. All Rights Reserved.
  
  For help type #help;;
  
  &gt; let x = 1.0m / 3.0m ;;
  val x : decimal = 0.3333333333333333333333333333M
  
  &gt; x * 3.0m ;;
  val it : decimal = 0.9999999999999999999999999999M
  
  &gt; let y = 1.0 / 3.0 ;;
  val y : float = 0.3333333333
  
  &gt; y * 3.0 ;;
  val it : float = 1.0
  
  &gt; it = 1.0 ;;
  val it : bool = true
  </code></pre>
  
  <p>As you can see, Double prints as 1.0 again after division and multiplication by 3.0. I tried different divisors, and the situation is the same.<br>
  (note for ones who don't know F# - <code>float</code> is basically synonym for <code>double</code> in F#)</p>