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 mark.dickinson
Recipients mark.dickinson, skrah
Date 2009-10-03.15:51:57
SpamBayes Score 7.591925e-06
Marked as misclassified No
Message-id <1254585120.04.0.727006476873.issue7049@psf.upfronthosting.co.za>
In-reply-to
Content
This behaviour was deliberate:  since the standard doesn't cover three-
argument pow, I more-or-less made up my own rules here.  :)

In this case, I (somewhat arbitrarily) decided that to ensure that any 
possible pow(a, b, m) result could be represented, m should be strictly 
less than 10**current_precision.  In general, you'd expect to make lots
of pow(a, b, m) calls with the same m and differing a and b;  it seems 
less error-prone to have them all these calls fail/pass together than 
have those with small results pass, and those with larger results fail.

Not that I expect there's a single person on this planet who's using 
three-argument pow with the Decimal type.  :)

Looking back at this, I'm not quite sure why I chose 'strictly less 
than' rather than 'less than or equal to'.
History
Date User Action Args
2009-10-03 15:52:00mark.dickinsonsetrecipients: + mark.dickinson, skrah
2009-10-03 15:52:00mark.dickinsonsetmessageid: <1254585120.04.0.727006476873.issue7049@psf.upfronthosting.co.za>
2009-10-03 15:51:58mark.dickinsonlinkissue7049 messages
2009-10-03 15:51:57mark.dickinsoncreate