math module broken?

Paul Rubin http
Fri Jul 23 09:15:37 CEST 2004


frank at chagford.com (Frank Millman) writes:
> sin(32) -
>     Python    0.55142668
>     Microsoft 0.52991926

Python's number is the sin of 32 radians which is the same as the sin
of 0.584 radians.  Microsoft's is the sin of 32 degrees which is 0.558
radians, so the results are coincidentally fairly close to one
another.  Math libraries usually take args in radians while
calculators usually let you select between radians and degrees.

> cos(32) -
>     Python    0.83422336
>     Microsoft 0.84804809
> 
> tan(32) -
>     Python    0.66100604
>     Microsoft 0.62486935

Same thing.



More information about the Python-list mailing list