Encoding:

POOL32F

010101

ft

fs

0

fmt

SQRT.fmt

00101000

POOL32FXf

111011

6

5

5

1

1

8

6

Format:

SQRT.fmt 

Floating Point Square Root

SQRT.S ft, fs

MIPS32

Floating Point Square Root

SQRT.D ft, fs

MIPS32

Floating Point Square Root

Purpose:

Floating Point Square Root

To compute the square root of an FP value.

Description:

 FPR[ft] = SQRT(FPR[fs])

The square root of the value in FPR fs is calculated to infinite precision, rounded according to the current rounding mode in FCSR, and placed into FPR ft. The operand and result are values in format fmt.

If the value in FPR fs corresponds to - 0, the result is - 0.

Restrictions:

If the value in FPR fs is less than 0, an Invalid Operation condition is raised.

The fields fs and ft must specify FPRs valid for operands of type fmt. If the fields are not valid, the result is UNPREDICTABLE.

The operand must be a value in format fmt; if it is not, the result is UNPREDICTABLE and the value of the operand

FPR becomes UNPREDICTABLE.

Operation:

StoreFPR(ft, fmt, SquareRoot(ValueFPR(fs, fmt)))

Exceptions:

Coprocessor Unusable, Reserved Instruction

Floating Point Exceptions:

Invalid Operation, Inexact, Unimplemented Operation