SqrtOne

Computes the square root of a number.

Syntax

Intel IPP style:

IppStatus ippsqSqrtOne_32f(const Ipp32f* pX, Ipp32f* pSqrt);

IppStatus ippsqSqrtOneQ15_16s(const Ipp16s* pX, Ipp16s* pSqrt);

IppStatus ippsqSqrtOneQ31_32s(const Ipp32s* pX, Ipp32s* pSqrt);

DSP style:

ippsq_status ippsq_sqrt_f32(const float32_t X, float32_t* pSqrt);

ippsq_status ippsq_sqrt_q15(const q15_t X, q15_t* pSqrt);

ippsq_status ippsq_sqrt_q31(const q31_t X, q31_t* pSqrt);

Include Files

dsp.h

ippsq.h

Parameters

pX

Pointer to the source value (for Intel IPP style).

X

Source value (for DSP style).

pSqrt

Pointer to the result.

Description

This function computes the square root of the pX value and stores the result in pSqrt. The Q15 and Q31 flavors support source values in range [0, 1): for Q15, supported source values range is [0, 7fff], for Q31 - [0, 0x7fffffff]. For example, the square root of 1/4 is 1/2, and, for Q15 format, SqrtOne(0x2000) is 0x4000.

Return Values

Intel IPP style:

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when any of the specified pointers is NULL.

ippStsSqrtNegErr

Indicates an error when the source value is negative.

DSP style:

IPPSQ_MATH_SUCCESS

Indicates no error.

IPPSQ_MATH_ARGUMENT_ERROR

Indicates an error when X is negative.
For more complete information about compiler optimizations, see our Optimization Notice.