fsqrts

Floating Square Root Single

fsqrts FRT, FRB

Computes square root (Single).

Details

The fsqrts instruction computes the square root of a single-precision floating-point number in register FRB and places the result into register FRT. If the most significant bit of the resultant significand is not 1, the result is normalized. The result is rounded to the target precision under control of RN.

Pseudocode Operation

FRT ← √FRB
if MSB(result.significand) ≠ 1 then normalize(result)
result ← round(result, RN)
FPSCR.FPRF ← class_and_sign(result)

Programming Note

The fsqrts instruction is commonly used for calculating the square root of single-precision floating-point numbers. Ensure that the input register FRB contains a valid single-precision float; otherwise, the result may be undefined or trigger an exception. The instruction operates at user privilege level and does not require any specific ordering or alignment of data. Be aware of rounding modes controlled by RN, as they can affect the precision of the result.

Example

fsqrts f1, f3

Encoding

Binary Layout
59
0
FRT
6
0
11
FRB
16
22
21
/
31
 
Format X-form
Opcode 0xEC00002C
Extension Floating-Point
Registers Altered FPSCR

Operands

  • FRT
    Target
  • FRB
    Source