Calculate arcsin from arctan?

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?

Reply to
Gery
Loading thread data ...

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

Reply to
Peter Dickerson

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

Reply to
Jack Crenshaw

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.