next up previous contents index
Next: 5.2 Standard Module rand Up: 5 Miscellaneous Services Previous: 5 Miscellaneous Services

5.1 Built-in Module math

This module is always available. It provides access to the mathematical functions defined by the C standard. They are: ,

acos(x)
,asinx ,atanx ,atan2x, y ,ceilx ,cosx ,coshx ,expx ,fabsx ,floorx ,fmodx, y ,frexpx ,hypotx, y ,ldexpx, y ,logx ,log10x ,modfx ,powx, y ,sinx ,sinhx ,sqrtx ,tanx ,tanhx

, acos(x), asin(x), atan(x), atan2(x, y), ceil(x), cos(x), cosh(x), exp(x), fabs(x), floor(x), fmod(x, y), frexp(x), hypot(x, y), ldexp(x, y), log(x), log10(x), modf(x), pow(x, y), sin(x), sinh(x), sqrt(x), tan(x), tanh(x). ,

Note that frexp and modf have a different call/return pattern than their C equivalents: they take a single argument and return a pair of values, rather than returning their second return value through an `output parameter' (there is no such thing in Python).

The module also defines two mathematical constants: ,

pi
,e

, pi and e. ,



guido@cnri.reston.va.us