Newbie question - Advanced math functions available under Windows?

The Toad the.toad at trashcanistan.ca
Sat Jul 3 00:31:58 CEST 2004


I'm completely new to Python and just installed it on my Win 2000 
machine.  I was planning to use it for quick-and-dirty numerical 
programming.  The sort of thing people did in QuickBasic before DOS
was replaced by Windows.

When I try to use numerical functions like sqrt() or sin(), I get
error messages like

>>> x = sqrt(10)
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in -toplevel-
    x = sqrt(10)
NameError: name 'sqrt' is not defined
>>> 

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.

DB





More information about the Python-list mailing list