3-arg float pow()

David C. Ullrich ullrich at math.okstate.edu
Tue Sep 4 10:17:17 EDT 2001


On Mon, 3 Sep 2001 17:06:09 -0400, "Tim Peters" <tim.one at home.com>
wrote:

>[David C. Ullrich]
>> Seems like pow(3., 500., 7.) can't possibly do anything except just
>> 3.**500. % 7(???), hence the random nature of the result and the utter
>> uselessness.
>
>[Markus Schaber]
>> The trick is that it is a exponential function with large result modulo
>> a small number. (such operations are e. G. used in the RSA crypto
>> algorithm)
>> ... [and an explanation of the modular square-and-multiply method] ...
>
>I'm sure David knows all that. 

I was pretty sure I knew all that - if _you_'re 
sure I did then I'm certain I did...<g>. 
Could be telepathy, could be the fact that
I mentioned the algorithm in my post, who knows.

Regarding what you said about what I said:
Never mind then - certainly didn't mean to
say that you shouldn't make the change you had
in mind, was just curious about exactly what
you meant.

> He's responding specifically to that these
>are not integers, but floating-point numbers.


David C. Ullrich



More information about the Python-list mailing list