math module broken?
frank at chagford.com
Fri Jul 23 09:01:25 CEST 2004
I was helping my niece with her trigonometry homework last night. Her
calculator's batteries were flat, so I thought I would use Python's
math module to calculate sin, cos, and tan.
I tried the example in the text book first, to ensure that I was
getting the correct result, but it did not agree. Then my wife had the
idea of using the Microsoft calculator in scientific mode, and that
one did give the correct result.
Here are some examples -
Version is Python 2.3.3. I get the same results on Linux and on
Windows 2000. I also get the same results using the cmath module.
Can someone please explain these discrepancies?
More information about the Python-list