div.s

Floating-point divide (single precision)

Divides the second register by the third using IEEE 754 single-precision (32-bit) arithmetic and stores the quotient in the first.

Used in

Forms

  • div.s , ,

Operands

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

Dividing by zero produces +/-Infinity according to IEEE 754.

.data
a: .float 1.5
b: .float 2.25
.text
# div single values 1.5 and 2.25. Inspect $f0: 0.6666667 (raw bits 0x3F2AAAAB).
l.s $f2, a
l.s $f4, b
div.s $f0, $f2, $f4