[Tutor] raising number to a power

Wayne Werner waynejwerner at gmail.com
Thu Feb 25 19:44:21 CET 2010


2010/2/25 Ricardo Aráoz <ricaraoz at gmail.com>

>  Stefan Behnel wrote:
> So why would the coders of the math module go to the trouble of creating
> the pow function? Did they create a sum function and a subtract function?
> It seems to me the question has not been properly answered. When to use
> one, when to use the other?
> If you don't know the answer it's all right. I don't know it either.
>

Only a theory:

Perhaps for familiarities sake - many other languages (and all of them that
I know with a math library) have something like, if not, math.pow(base,
exp), so it could be they wanted to allow that similarity...

or it could just be from way back in the early days of Python?

just my thoughts on the subject,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100225/175a87ce/attachment.html>


More information about the Tutor mailing list