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?
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
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.