title: Truncate a floating-point number to the leading N decimal digits
body: <p>Which is the most optimal way to get the <em>n</em> leftmost non-zero digits of a floating point number (number >= 0.0).</p>
  
  <p>For example,</p>
  
  <p>if n = 1:</p>
  
  <ul>
  <li>0.014568 -> 0.01</li>
  <li>0.246456 -> 0.2</li>
  </ul>
  
  <p>if n = 2:</p>
  
  <ul>
  <li>0.014568 -> 0.014</li>
  <li>0.246456 -> 0.24</li>
  </ul>
  
  <p>After @schil227 comment:
  Currently I am doing multiplications and divisions (by 10) as necessary in order to have the <em>n</em> digits at the decimal number field.</p>