1.4.3.18 _LIBQ_Q2_29_asin_Q31_Fast Function

Calculates the value of asin(x). This function executes faster than the _LIBQ_Q2_29_asin_Q31 function, but is less precise.

Description

_Q2_29 _LIBQ_Q2_29_asin_Q31_Fast (_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_Fast returns the _Q2_29 fixed point result from the calculation asin(x).

Remarks

Execution Time (cycles): 507 typical (22 to 1300)

Program Memory 638 bytes

Error <= 0.000000911 (accurate to 9 least significant _Q2_29 bits)

A higher resolution version of this function exists with reduced performance, see _LIBQ_Q2_29_asin_Q31

Example

_Q2_29 resultAsin;

resultAsin = _LIBQ_Q2_29_asin_Q31_Fast ((_Q31)0x7fe50658); 

_// _LIBQ_Q2_29_asin_Q31_Fast(_ _0.9991767816) = 1.5302172359 (0x30f78a23)_

C

_Q2_29 _LIBQ_Q2_29_asin_Q31_Fast (_Q31 x );