# div (sm4 - asm)

Component-wise divide.

ItemDescription

dest

[in] The result of the operation.

src0

[in] The dividend.

src1

[in] The divisor.

## Remarks

The following table shows the results obtained when executing the instruction with various classes of numbers, assuming that neither overflow or underflow occurs.

You should note the two allowed implementations of divide: a/b and a*(1/b).

One outcome of this is that there are exceptions to the table below for large denominator values (greater than 8.5070592e+37), where 1/denominator is a denorm. Because implementations may perform divide as a*(1/b), instead of a/b directly, and 1/[large value] is a denorm that could get flushed, some cases in the table would produce different results. For example, (+/-)INF / (+/-)[value > 8.5070592e+37] may produce NaN on some implementations, but (+/-)INF on other implementations

In this table F means finite-real number.

 src0 src1 -> -inf -F -denorm -0 +0 +denorm +F +inf nan -inf -inf -inf -inf -inf -inf -inf -inf NaN nan -F -inf -F src0 src0 src0 src0 +-F or +-0 +inf nan -denorm -inf src1 -0 -0 +0 +0 src1 +inf nan -0 -inf src1 -0 -0 +0 +0 src1 +inf nan +0 -inf src1 +0 +0 +0 +0 src1 +inf nan +denorm -inf src1 +0 +0 +0 +0 src1 +inf nan +F -inf +-F or +-0 src0 src0 src0 src0 +F +inf nan +inf nan +inf +inf +inf +inf +inf +inf +inf nan NaN nan NaN NaN NaN NaN NaN NaN NaN nan

This instruction applies to the following shader stages:

xxx

This function is supported in the following shader models.

Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no