SinOne

Computes the sine of an angle.

Syntax

Intel IPP style:

IppStatus ippsqSinOne_32f(const Ipp32f* pX, Ipp32f* pSin);

IppStatus ippsqSinOneQ15_16s(const Ipp16s* pX, Ipp16s* pSin);

IppStatus ippsqSinOneQ31_32s(const Ipp32s* pX, Ipp32s* pSin);

DSP style:

float32_t ippsq_sin_f32(const float32_t X);

q15_t ippsq_sin_q15(const q15_t X);

q31_t ippsq_sin_q31(const q31_t X);

Include Files

ippsq.h

dsp.h

Parameters

pX

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

X

Source value (for DSP style).

pSin

Pointer to the result.

Description

This function computes the sine of the pX value and stores the result in pSin. In floating point flavors, the input value X is in radians. The Q15 and Q31 flavors support the source value in radians scaled in range [-1, +1), which is mapped to [-2pi, 2pi).

The following table lists functions' arguments and return values:

Degrees 30° 90° 180° 360°
F32 src 0 PI/6 PI/2 PI 2*PI
F32 sin 0 0.5 1 0 0
Q15 src 0 0x0aaa 0x2000 0x4000 0x7fff
Q15 sin 0 0x3fff 0x7fff 0 0
Q31 src 0 0x0aaaaaaa 0x20000000 0x40000000 0x7fffffff
Q31 sin 0 0x3ffffffc 0x7ffffffc 0 0

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

DSP-style APIs return the resulting value.

For more complete information about compiler optimizations, see our Optimization Notice.