I have faced a really weird problem. when I want to find sin or cos of some angles, I get strange answers in python interpreter.
>>>from math import *
>>>sin(pi)
Out:1.2246467991473532e-16
>>>cos(pi)
Out:-1.0
It answered cos correctly but sin was strange. while pi/2 is reverse.
>>>sin(pi/2)
Out: 1.0
cos(pi/2)
Out: 6.123233995736766e-17
I'm confused!
Can someone explain what's happening?
BTW I use canopy and python 2.7.9