[issue7048] decimal.py: logb: round the result if it is greater than prec

Mark Dickinson report at bugs.python.org
Wed Oct 7 20:02:30 CEST 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

The IEEE 754-2008 description of scaleB makes a lot more sense, IMO:
scaleB(x, N) is simply x*10**N (assuming that B=10 and N is integral), 
rounded in the usual way.

The restriction in the specification seems arbitrary and questionable.  
Presumably it's intended to aid implementation in low-level languages.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7048>
_______________________________________


More information about the Python-bugs-list mailing list