title: Consistent rounding of floating points in Ruby
body: <p>I understand due to the inexact representation of floating points, the following code 'feels' inconsistent.</p>
  
  <pre><code>"%.1f" % 1.14 # =&gt; 1.1
  "%.1f" % 1.15 # =&gt; 1.1
  "%.1f" % 1.16 # =&gt; 1.2
  "%.0f" % 1.4 # =&gt; 1
  "%.0f" % 1.5 # =&gt; 2
  "%.0f" % 1.6 # =&gt; 2
  </code></pre>
  
  <p>However, is there an easy way of doing consistent floating points rounding by 5? One way might be to do string manipulation explicitly. Is there an easier way or existent library?</p>