# `sqrt.d`

[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.d

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

Category: Floating point

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

## Forms

- `sqrt.d $f2, $f4`

## Operands

- `$f2`: An even-numbered floating-point register, `$f0` to `$f30`. A double-precision value uses this register and the next odd-numbered register.
- `$f4`: An even-numbered floating-point register holding a double. It may be the same register as `$f2`.

## Description

Both register numbers must be even. Returns NaN if $f4 is negative.

## Example

```mips
.data
value: .double 2.25
.text
# Apply sqrt.d to 2.25; inspect $f6:$f7 for 1.5 (raw bits 0x3FF8000000000000).
l.d $f2, value
sqrt.d $f6, $f2
```
