This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author leewz
Recipients docs@python, leewz, skrah
Date 2014-04-16.17:35:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397669752.09.0.1867148711.issue21227@psf.upfronthosting.co.za>
In-reply-to
Content
Fine grained? Do you mean that the error can't be distinguished from other such errors? Or that it's difficult to attach the message to DivisionError? I thought DivisionError was always about precision.

I looked up the error in libmpdec:
"This occurs and signals invalid-operation if the integer result of a divide-integer or remainder operation had too many digits (would be longer than precision). The result is [0,qNaN]." (http://speleotrove.com/decimal/daexcep.html)

Now I'm more confused. Though it mentions precision, it is talking about the *result's* precision being too large (something which shouldn't happen with Python's unbounded ints, right?), rather than being unable to give a sane answer due to not having *enough* digits. That's also what the 2.7 error is:
    decimal.InvalidOperation: quotient too large in //, % or divmod

I'm very much content with documenting it, but if possible, I'd like to understand whether this is an issue to take up with libmpdec.

P.S.: As a side-note to others, Python floats allows float%int even when precision isn't high enough, and seems to always returns 0.0 with no warning. So behavior is inconsistent, if that's important to anyone here.
History
Date User Action Args
2014-04-16 17:35:52leewzsetrecipients: + leewz, skrah, docs@python
2014-04-16 17:35:52leewzsetmessageid: <1397669752.09.0.1867148711.issue21227@psf.upfronthosting.co.za>
2014-04-16 17:35:52leewzlinkissue21227 messages
2014-04-16 17:35:51leewzcreate