title: scala range precision for float step
body: <p>I intend to generate an array from 0.05 to 0.95 with step 0.05, just like <code>0.05, 0.1, 0.15, 0.2, ...</code>. But the following code has some precision problems:</p>
  
  <pre><code>scala&gt; 0.05 to 0.95 by 0.05
  res11: scala.collection.immutable.NumericRange[Double] = NumericRange(0.05, 0.1, 0.15000000000000002, 0.2, 0.25, 0.3, 0.35, 0.39999999999999997, 0.44999999999999996, 0.49999999999999994, 0.5499999999999999, 0.6, 0.65, 0.7000000000000001, 0.7500000000000001, 0.8000000000000002, 0.8500000000000002, 0.9000000000000002)
  </code></pre>
  
  <p>Could anyone give me some idea on how to solve this problem? Thanks.</p>