[Tutor] in-built square root function

Norvell Spearman norvell@houseofspearman.org
Thu Feb 20 00:31:02 2003


On Wednesday, 2003.02.19, 17:15:37 -0500, Timothy M. Brauch wrote:
> >>> print pow.__doc__
> pow(x, y[, z]) -> number
> 
> With two arguments, equivalent to x**y.  With three arguments,
> equivalent to (x**y) % z, but may be more efficient (e.g. for longs).

I'm still in the process of learning Python so this may seem like a
silly question.  I can use the built-in pow function for possibly more
efficient modulo division of longs, but isn't it then limited to only
dividends which can be expressed by x**y, both x and y integers?  For
example, for (45**89)%3 I could use the built-in pow, but not for
(45**89 + 1)%3.  Thanks in advance for answers and patience.

-- 
Norvell Spearman