Encoding:

MSA

011110

110010100

df

ws

wd

2RF

011110

6

9

1

5

5

6

Format:

FRSQRT.df 

Vector Approximate Floating-Point Reciprocal of Square Root

FRSQRT.W wd,ws

MSA

Vector Approximate Floating-Point Reciprocal of Square Root

FRSQRT.D wd,ws

MSA

Vector Approximate Floating-Point Reciprocal of Square Root

Purpose:

Vector Approximate Floating-Point Reciprocal of Square Root

Vector floating-point reciprocal of square root.

Description:

wd[i] = 1.0 / sqrt(ws[i])

roots of floating-point elements in vector ws are calculated as specif ied below. The

The reciprocals of the square result is written to vector wd.

The compliant reciprocal of the square root operation is defined as 1.0 di vided by the square root of the element value, where the IEEE Standard for Floating-Point Arithmetic 754TM-2008 defined divide and square root operations are affected by the rounding mode bits RM and flush-to-zero bit FS in MSA Control and Status Register MSACSR.

The compliant reciprocals of the square roots signal all the exceptions specified by the IEEE Standard for FloatingPoint Arithmetic 754TM-2008 for the divide and square roots operations.

The reciprocal of the square root operation is allowed to be approximate. The approximation differs from the compliant reciprocal of the square root representation by no more than two units in the least significant place. Approximate reciprocal of the square root operations signal the Inexact exception if the compliant reciprocal of the square root is

Inexact or if there is a chance the appr oximated result may differ from the compliant reciprocal of the square root.

The Invalid and divide by Zero exceptions are signaled based on the IEEE Stand ard for Floating-Point Arithmetic

754TM-2008 defined divide operation.

The operands and results are values in floating-point data format df.

Restrictions:

Data-dependent exceptions are poss ible as s pecified by the I EEE Standard for Floating-Point Arithmetic 754TM2008.

Operation:

FRSQRT.W
   for i in 0 .. WRLEN/32-1
      f = SquareRootReciprocalFP(WR[ws]32i+31..32i, 32)
      WR[wd]32i+31..32i = f
   endfor
FRSQRT.D
   for i in 0 .. WRLEN/64-1
      f = SquareRootReciprocalFP(WR[ws]64i+63..64i, 64)
      WR[wd]64i+63..64i = f
   endfor
function SquareRootReciprocalFP(tt, ts, n)
   /* Implementation defined square root reciprocal operation. */
endfunction SquareRootReciprocalFP

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception, MSA Floating Point Exception.