Stefan Krah <stefan-use...@bytereef.org> added the comment: I've tried to pinpoint exactly what I don't like about the current behavior, and the main reason is that it violates my mental model of how the functions in the specification generally behave:
1) Functions take arbitrary precision input. 2) Functions try to preserve as much of the exponent information of the input as possible. With these in mind, it's easy to specify powmod() as: (a ** b) % c, calculated with unlimited precision. Raises if the final result does not fit in the current precision. It is not totally clear to me why the result should have exponent 0 because it is an integer. Decimal("1E3").to_integral() also preserves the exponent information. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7049> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com