[issue7048] decimal.py: logb: round the result if it is greater than prec
Mark Dickinson
report at bugs.python.org
Wed Oct 7 19:56:12 CEST 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
I don't understand the new scaleb testcases (from Mike). They look like
this:
precision: 34
maxExponent: 999999999
minExponent: -999999999
-- integer overflow in 3.61 or earlier
scbx164 scaleb 1E-999999999 -1200000000 -> NaN Invalid_operation
-- out of range
scbx165 scaleb -1E-999999999 +1200000000 -> NaN Invalid_operation
The specification says that the second operand should be in the range
+/-2*(Emax+precision) inclusive, which in this case it is. So clearly
there are additional situations in which Invalid_operation should be
signalled. It's not clear to me what those conditions are.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7048>
_______________________________________
More information about the Python-bugs-list
mailing list