problem with the 'math' module in 2.5?

mensanator at aol.com mensanator at aol.com
Sat Oct 14 23:45:20 EDT 2006


Chris wrote:
> >>> from math import *
> >>> sin(0)
> 0.0
> >>> sin(pi)
> 1.2246063538223773e-016
> >>> sin(2*pi)
> -2.4492127076447545e-016
> >>> cos(0)
> 1.0
> >>> cos(pi)
> -1.0
> >>> cos(2*pi)
> 1.0
>
> The cosine function works fine, but I'm getting weird answers for sine.
> Is this a bug? Am I doing something wrong?

What answer do you suppose you get in version 2.4?




More information about the Python-list mailing list