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 skrah
Recipients mark.dickinson, rhettinger, skrah
Date 2010-02-22.20:05:43
SpamBayes Score 7.994654e-09
Marked as misclassified No
Message-id <1266869146.73.0.563853655749.issue7049@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-02-22 20:05:46skrahsetrecipients: + skrah, rhettinger, mark.dickinson
2010-02-22 20:05:46skrahsetmessageid: <1266869146.73.0.563853655749.issue7049@psf.upfronthosting.co.za>
2010-02-22 20:05:44skrahlinkissue7049 messages
2010-02-22 20:05:43skrahcreate