?/TD>
Microsoft DirectX 9.0

rcp (Vertex Shader)


Computes the reciprocal of the source scalar.

Syntax

rcp dst, src

where

Remarks

Vertex shader versions1_12_02_x2_sw3_03_sw
rcpxxxxxx

The following code fragment shows the operations performed.

float f = src0;
if(f == 0.0f)
{
    f = FLT_MAX;
}
else 
{
    if(f != 1.0)
    {
        f = 1/f;
    }
}

dest = f;

The output must be exactly 1.0 if the input is exactly 1.0. A source of 0.0 yields infinity.

Precision should be at least 1.0/(222) absolute error over the range (1.0, 2.0) because common implementations will separate mantissa and exponent.

If the source has no subscripts, the x-component is used.

Instruction Information

Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.