Question: I'm currently trying to get something to run involving trigonometry but I've run across a hitch involving the math.asin function (it also applies to acos and atan but in those cases it less affects what I'm trying to do). The issue is best summarised by two posts from a help thread I found about it elsewhere;

> 
> Sorry, I have just tried it again and
>  found that
> 
> 
> a = sin(2)  
> 
>  b = asin(a)  
> 
>  b doesnt = 2
> 
> 
> but
> 
> 
> a = cos(2)  
> 
>  b = acos(a)  
> 
>  b DOES= 2
> 
> 
> Because y = sin(x) is a repetitive
>  function, there is more than one value
>  of x for every value of y. ie sin(2) =
>  sin(1.14) = 0.909
> 
> 
> Therefore, when you do x = asin(y),
>  you will only ever get a value between
>  -PI/2 <= x <= PI/2
> 
> 
> 

I understand mathematically why this is but I was wondering if anyone could give me a hand in finding all the solutions within a range rather than just the one it gives automatically. Thanks =]

Answer: 
All the solutions for acrsin(a) will be:

b, pi - b, 2pi + b, 2pi + (pi - b), etc.
As others have already explained in detail you picked a value for *a* that leads to indetermined results for asin() due to the (repetitive) nature of the trigonometric functions.

Nevertheless I just wanted to point out that expecting to be able to get the *exact* same result back on an invers operation with floating points will probably fail due to a more general [Floating point accuracy problem](http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems)

With floating point you can **not** guarantee that

```
a == asin(sin(a))

```

or

```
a == (a / b) * b

```

for that matter. Just be careful.