sqrt.s
Floating-point square root (single precision)
Sets $f0 to the square root of $f1 in single precision, or NaN if $f1 is negative.
Used in
- Floating point and Coprocessor 1MIPS assembly
Forms
sqrt.s ,
Operands
$f0- Any floating-point register,
$f0to$f31. $f1- A floating-point register. It may be the same register as
$f0.
Returns NaN if $f1 is negative.
.data
value: .float 2.25
.text
# Take sqrt of 2.25. Inspect $f0: 1.5 (raw bits 0x3FC00000).
l.s $f2, value
sqrt.s $f0, $f2