Newbie question - Advanced math functions available under Windows?

Tim Heaney theaney at
Sat Jul 3 00:59:13 CEST 2004

The Toad <the.toad at> writes:
> The math module documentation says that these math functions are "thin
> wrapers" around the platform C library funtions.  This seems to assume
> a Unix/Linux system platform.
> Does this mean that math functions like sqrt(), etc. are not available
> in Python when running on Windows based systems?   Thanks in advance.

No, you just need to import the math module.

  >>> import math
  >>> math.sqrt(10)

If you want, you can import sqrt into your namespace

  >>> from math import sqrt
  >>> sqrt(10)

Often, you see people import everything from a module into their
namespace with an asterisk

  >>> from math import *
  >>> sqrt(10)

I hope this helps,


More information about the Python-list mailing list