# `sub.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/sub.d

**Floating-point subtract (double precision)**

Category: Floating point

Subtracts the third register from the second using IEEE 754 double-precision (64-bit) arithmetic and stores the difference in the first.

## Forms

- `sub.d $f2, $f4, $f6`

## 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`.
- `$f6`: An even-numbered floating-point register holding a double. It may be the same register as `$f2`.

## Description

All register numbers must be even.

## Example

```mips
.data
a: .double 1.5
b: .double 2.25
.text
# sub double 1.5 and 2.25. Inspect $f6:$f7 for -0.75 (raw bits 0xBFE8000000000000).
l.d $f2, a
l.d $f4, b
sub.d $f6, $f2, $f4
```
