title: Why is the result of RoundTo(87.285, -2) => 87.28
body: <p>I expected that the result would be 87.29. I also tried SimpleRoundTo, but produces the same result.</p>
  
  <p>In the help there is also a "strange" example:
  ms-help://embarcadero.rs2010/vcl/Math.RoundTo.html</p>
  
  <pre><code>RoundTo(1.235, -2) =&gt; 1.24
  RoundTo(1.245, -2) =&gt; 1.24 //???
  </code></pre>
  
  <p>Does anybody know which function I need to get the result of 87.29? I mean: If the last digit >= 5 round up, if &lt; 5 round down. As taught in the school :)</p>
  
  <p>I use Delphi2010, and <code>SetRoundMode(rmNearest)</code>. I also tried with <code>rmTruncate</code>.
  The value 87.285 is stored in a <code>double</code> variable.</p>
  
  <p>Also strange:</p>
  
  <pre><code>SimpleRoundTo(87.285, -2) =&gt; 87.29
  </code></pre>
  
  <p>but</p>
  
  <pre><code>x := 87.285; //double
  SimpleRoundTo(x, -2) =&gt; 87.28
  </code></pre>