title: How can I correct this rounding down function?
body: <p>How can I correct this rounding down function?</p>
  
  <pre><code>def round_down(num, prec):
      uod = round(num, prec)
      if uod &gt; num:
          return uod - 1/10^prec  
      return uod
  </code></pre>
  
  <p>It raises: TypeError: unsupported operand type(s) for ^: 'float' and 'int'.</p>