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

**Floating-point absolute value (double precision)**

Category: Floating point

Sets the first register to the absolute value of the double-precision value in the second.

## Forms

- `abs.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. Works by clearing the sign bit of the high word.

## Example

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