## why is math.asin(math.sin(10)) ==10 False ?

This is the place for queries that don't fit in any of the other categories.

### why is math.asin(math.sin(10)) ==10 False ?

Code: Select all
math.asin(math.sin(10)) ==10
False

why does not the inverse sin give back 10?
Last edited by Yoriz on Thu Apr 04, 2013 5:31 am, edited 1 time in total.
Reason: Added Code tags, altered title a little
augre

Posts: 2
Joined: Thu Apr 04, 2013 12:46 am

### Re: why is math.asin(math.sin(10)) ==10 False ?

basically, the unit used in sin function is referring to radian instead of degree.

radian has a range of 0 ~ 2pi,
while degree has a range of 0 ~ 360

for example
is equal to
sin(180) #in degree.

so yeah, you need to convert it first before using it, but since it's python, we're talking about, they might already defined a function to do so.

Posts: 12
Joined: Sun Mar 31, 2013 4:48 pm

### Re: why is math.asin(math.sin(10)) ==10 False ?

siestamadokaist wrote:, but since it's python, we're talking about, they might already defined a function to do so.

http://docs.python.org/2/library/math.html#angular-conversion
setrofim

Posts: 288
Joined: Mon Mar 04, 2013 7:52 pm

### Re: why is math.asin(math.sin(10)) ==10 False ?

Thanks!
Code: Select all
from math import asin, sin, radians, degrees

10
augre

Posts: 2
Joined: Thu Apr 04, 2013 12:46 am

### Re: why is math.asin(math.sin(10)) ==10 False ?

Should be
Code: Select all
>>> from math import asin, sin, radians, degrees
10.0