1.4.3.17 _LIBQ_Q2_29_asin_Q31 Function
Calculates the value of asin(x).
Description
_Q2_29 _LIBQ_Q2_29_asin_Q31 (_Q31 x);
Calculates the asin(x), where x is of type _Q31 and the resulting value is of type _Q2_29. The output value will be in radians the range pi >= result >= -pi.
Preconditions
None.
Parameters
x The _Q31 input value from which to calculate asin(x).
Returns
_LIBQ_Q2_29_asin_Q31 returns the _Q2_29 fixed point result from the calculation asin(x).
Remarks
The functions _LIBQ_Q2_29_asin_Q31_Fast and_LIBQ_Q31_sin_Q2_29 are called by this routine and thus must be linked into the executable image.
Execution Time (cycles): 2525 typical (286 to 4330)
Program Memory 138 bytes
Error <= 0.0000000019 (accurate to least significant _Q2_29 bit for the range -0.9993..0.9993)
Error <= 0.0000000346 (accurate to 5th least significant _Q2_29 bit for the range -1.0 .. -0.9993 and 0.9993 .. 1.0)
A faster version of this function exists with modestly reduced accuracy, see _LIBQ_Q2_29_asin_Q31_Fast
Example
_Q2_29 resultAsin; resultAsin = _LIBQ_Q2_29_asin_Q31 ((_Q31)0x7fe50658); _// _LIBQ_Q2_29_asin_Q31( 0.9991767816)_ _= 1.5302172359 (0x30f78a23)_
C
_Q2_29 _LIBQ_Q2_29_asin_Q31 (_Q31 x );