sincos (sm4 - asm)

Component-wise sin(theta) and cos(theta) for theta in radians.

sincos[_sat] destSIN[.mask], destCOS[.mask], [-]src0[_abs][.swizzle]




[in] The address of sin(src0), computed per component.


[in] The address of cos(src0), computed per component.


[in] The components for which to compute sin and cos.



If the result is not needed, you can specify destSIN and destCOS as NULL instead of specifying a register.

Theta values can be any IEEE 32-bit floating point values.

The maximum absolute error is 0.0008 in the interval from -100*Pi to +100*Pi.

The following table shows the results obtained when executing the instruction with various classes of numbers.

F means finite-real number.

destSINNaN[-1 to +1]-0-0+0+0[-1 to +1]NaNNaN
destCOSNaN[-1 to +1]+1+1+1+1[-1 to +1]NaNNaN


This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader


Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no


Related topics

Shader Model 4 Assembly (DirectX HLSL)