i need help on builtin function math

Quote:

> hello !

> i want to use the sqrt() function of the builtin funtion math in that

> kind:

> import math

> ...

> a=0

> a=sqrt(whatever)

> and than a NameError: sqrt occured and i dont know why ? Is it

> depending on the OS (i use Windows98 and the pywin

> editor). Other functions, like pow(), from the math module are working.

There is a *built-in* function pow, which is not the same

as math.pow, and is no doubt what IS being executed here:

Quote:

>>> pow

<built-in function pow>

Quote:

>>> import math

>>> math.pow

<built-in function pow>

Quote:

>>> pow is math.pow

0

>>> math.pow(2, 35000)

Traceback (most recent call last):

File "<stdin>", line 1, in ?

OverflowError: math range error

Quote:

>>> pow(2, 35000)

Traceback (most recent call last):

File "<stdin>", line 1, in ?

OverflowError: integer exponentiation

Quote:

> Can anyone help me with my problem ?

Either:

import math

a=math.sqrt(whatever)

or:

from math import sqrt

a=sqrt(whatever)

Alex