Functions

Computes the square root of a number. There are separate functions for Q15, Q31, and floating-point data types. The square root function is computed using the Newton-Raphson algorithm. This is an iterative algorithm of the form: More...

Collaboration diagram for Square Root:

Functions

__STATIC_FORCEINLINE arm_status arm_sqrt_f32 (float32_t in, float32_t *pOut)
 Floating-point square root function. More...
 
arm_status arm_sqrt_q15 (q15_t in, q15_t *pOut)
 Q15 square root function. More...
 
arm_status arm_sqrt_q31 (q31_t in, q31_t *pOut)
 Q31 square root function. More...
 
void arm_vsqrt_f32 (float32_t *pIn, float32_t *pOut, uint16_t len)
 Vector Floating-point square root function. More...
 
void arm_vsqrt_q15 (q15_t *pIn, q15_t *pOut, uint16_t len)
 
void arm_vsqrt_q31 (q31_t *pIn, q31_t *pOut, uint16_t len)
 

Detailed Description

Computes the square root of a number. There are separate functions for Q15, Q31, and floating-point data types. The square root function is computed using the Newton-Raphson algorithm. This is an iterative algorithm of the form:

     x1 = x0 - f(x0)/f'(x0)

where x1 is the current estimate, x0 is the previous estimate, and f'(x0) is the derivative of f() evaluated at x0. For the square root function, the algorithm reduces to:

    x0 = in/2                         [initial guess]
    x1 = 1/2 * ( x0 + in / x0)        [each iteration]

Function Documentation

◆ arm_sqrt_f32()

__STATIC_FORCEINLINE arm_status arm_sqrt_f32 ( float32_t  in,
float32_t pOut 
)

Floating-point square root function.

Parameters
[in]ininput value
[out]pOutsquare root of input value
Returns
execution status

Definition at line 5849 of file arm_math.h.

◆ arm_sqrt_q15()

arm_status arm_sqrt_q15 ( q15_t  in,
q15_t pOut 
)

Q15 square root function.

Parameters
[in]ininput value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF
[out]pOutpoints to square root of input value
Returns
execution status

◆ arm_sqrt_q31()

arm_status arm_sqrt_q31 ( q31_t  in,
q31_t pOut 
)

Q31 square root function.

Parameters
[in]ininput value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF
[out]pOutpoints to square root of input value
Returns
execution status

◆ arm_vsqrt_f32()

void arm_vsqrt_f32 ( float32_t pIn,
float32_t pOut,
uint16_t  len 
)

Vector Floating-point square root function.

Parameters
[in]pIninput vector.
[out]pOutvector of square roots of input elements.
[in]lenlength of input vector.
Returns
The function returns ARM_MATH_SUCCESS if input value is positive value or ARM_MATH_ARGUMENT_ERROR if in is negative value and returns zero output for negative values.

◆ arm_vsqrt_q15()

void arm_vsqrt_q15 ( q15_t pIn,
q15_t pOut,
uint16_t  len 
)

◆ arm_vsqrt_q31()

void arm_vsqrt_q31 ( q31_t pIn,
q31_t pOut,
uint16_t  len 
)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:03