1.4.3.12 _LIBQ_Q2_13_asin_Q15 Function
Calculates the asin value of asin(x).
Description
_Q2_13 _LIBQ_Q2_13_asin_Q15 (_Q15 x);
Calculates asin(x), where x is of type _Q15 and the resulting value is of type _Q2_13. The output value will be radians in the range pi >= result >= -pi.
Preconditions
None.
Parameters
x The _Q15 input value from which to calculate asin(x).
Returns
_LIBQ_Q2_13_asin_Q15 returns the _Q2_13 fixed point result from the calculation asin(x).
Remarks
The functions _LIBQ_Q16Sqrt and _LIBQ_Q16Div are called by this routine and thus must be linked into the executable image.
Execution Time (cycles): 578 typical (22 to 656)
Program Memory 336 bytes
Error <= 0.00012207 (accurate to least significant _Q2_13 bit)
A higher resolution version of this function exists with equivalent performance, see _LIBQ_Q2_29_asin_Q31_Fast
Example
_Q2_13 resultAsin; resultAsin = _LIBQ_Q2_13_asin_Q15 ((_Q15)0x3231); _// _LIBQ_Q2_13_asin_Q15(0.392120) = 0.402954_ _(0x0ce5)_
C
_Q2_13 _LIBQ_Q2_13_asin_Q15 (_Q15 x );