title: Python cdecimal InvalidOperation
body: <p>I am trying to read financial data and store it. The place I get the financial data from stores the data with incredible precision, however I am only interested in 5 figures after the decimal point. Therefore, I have decided to use t = .quantize(cdecimal.Decimal('.00001'), rounding=cdecimal.ROUND_UP) on the Decimal I create, but I keep getting an InvalidOperation exception. Why is this?</p>
  
  <pre><code>&gt;&gt;&gt; import cdecimal
  &gt;&gt;&gt; c = cdecimal.getcontext()
  &gt;&gt;&gt; c.prec = 5
  &gt;&gt;&gt; s = '45.2091000080109'
  &gt;&gt;&gt; # s = '0.257585003972054' works!
  &gt;&gt;&gt; t = cdecimal.Decimal(s).quantize(cdecimal.Decimal('.00001'), rounding=cdecimal.ROUND_UP)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    cdecimal.InvalidOperation: [&lt;class 'cdecimal.InvalidOperation'&gt;]
  </code></pre>
  
  <p>Why is there an invalid operation here? If I change the precision to 7 (or greater), it works. If I set s to be '0.257585003972054' instead of the original value, that also works! What is going on?</p>
  
  <p>Thanks!</p>