Calculate arcsin from arctan?

Aug 25, 2006 2 Replies

I'm using the IQmath library on a TMS320F2812 device from Texas Instruments. I need an arcsin function but there isn't one. But there is an arctan function.



How can I calculate the arcsin?


Instruments.

arcsin(x) = arctan( x/sqrt(1-x*x) )

|x| < 1

but without knowing you problem domain, range and accuracy required it difficult to go beyond that - so what precision do you need, what argument range, speed?

Peter

Yep, that's the right algorithm. I'd put in a test on x. If x -- 1, just return pi/2 (or -pi/2). I like to test for x >= 1, but some purists might argue111/ that this could mask a true error.

Jack

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required