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

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

Category: Floating point

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

## Forms

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

Works by clearing the sign bit. Does not raise exceptions for NaN or infinity.

## Example

```mips
.data
a: .float -1.5
.text
# Apply abs.s to an initialized value; inspect $f0: raw bits 0x3FC00000.
l.s $f1, a
abs.s $f0, $f1
```
