fsqrt

Square Root

FSQRT

Computes square root of ST(0).

Pseudocode Operation

ST(0) ← sqrt(ST(0))

Encoding

Binary Layout
D9
+0
FA
+1
 
Format Legacy
Opcode D9 FA
Extension x87 FPU

Operands

Related

More in x87 FPU

Instruction Forms

Opcode Instruction Op/En 64/32-bit Mode CPUID Description
D9 FA FSQRT Valid Valid Computes square root of ST(0) and stores the result in ST(0).

Description

Computes the square root of the source value in the ST(0) register and stores the result in ST(0). The following table shows the results obtained when taking the square root of various classes of numbers, assuming that neither overflow nor underflow occurs. Table 3-39. FSQRT Results SRC (ST(0)) DEST (ST(0)) - ∞ * - F *

- 0                                                 - 0
+ 0                                                 + 0
+ F                                                 + F

+ ∞ + ∞

NaN NaN

Operation

ST(0) := SquareRoot(ST(0));

Exceptions

Protected Mode Exceptions

#NM CR0.EM[bit 2] or CR0.TS[bit 3] = 1. #MF If there is a pending x87 FPU exception. #UD If the LOCK prefix is used.

Real-Address Mode Exceptions

Same exceptions as in protected mode. FSQRT-Square Root Vol. 2A 3-384

Virtual-8086 Mode Exceptions

Same exceptions as in protected mode.

Compatibility Mode Exceptions

Same exceptions as in protected mode.

64-Bit Mode Exceptions

Same exceptions as in protected mode. FSQRT-Square Root Vol. 2A 3-385