[Tutor] raising number to a power

Steven D'Aprano steve at pearwood.info
Thu Feb 25 20:26:51 CET 2010


On Fri, 26 Feb 2010 05:34:39 am Ricardo Aráoz wrote:

> So why would the coders of the math module go to the trouble of
> creating the pow function? 

http://docs.python.org/library/math.html#math.pow
http://docs.python.org/library/functions.html#pow

The math module is mostly a thin wrapper around the native C maths 
library. The builtin pow function has more capabilities, and came 
before the ** operator.


> Did they create a sum function 

As a matter of fact they did:

http://docs.python.org/library/math.html#math.fsum



-- 
Steven D'Aprano


More information about the Tutor mailing list