# `sqrt.s`

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md) › [Instructions](https://asm-editor.specy.app/documentation/mips/instruction.md)

Web page: https://asm-editor.specy.app/documentation/mips/instruction/sqrt.s

**Floating-point square root (single precision)**

Category: Floating point

Sets the first register to the square root of the single-precision value in the second, or to NaN if that value is negative.

Used in: [Floating point and Coprocessor 1](https://asm-editor.specy.app/learn/courses/mips/think-in-assembly/floating-point-and-coprocessor-1.md) (MIPS assembly)

## Forms

- `sqrt.s $f0, $f1`

## Operands

- `$f0`: Any floating-point register, `$f0` to `$f31`.
- `$f1`: A floating-point register. It may be the same register as `$f0`.

## Description

Returns NaN if $f1 is negative.

## Example

```mips
.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
```
