ddiv

Divide two doubles

Bytecode

Type Description
u1 ddiv opcode = 0x6F (111)

Stack ..., value1.word1, value1.word2, value2.word1, value2.word2 =>..., result.word1, result.word2

Description

Pops the top two double-precision floating point numbers off of the stack, divides by the top number (i.e. computes value2 / value1), and pushes the double precision quotient result back onto the stack.

Division by zero will result in an infinity result. The division is computed using IEEE 754 round-to-nearest mode and gradual underflow. Standard IEEE arithmetic rules are used for the special NaN, infinity, and zero values.

Both value1 and value2 must be of type double. The values are popped from the operand stack. The double result is value1 / value2. The result is pushed onto the operand stack.

The result of a ddiv instruction is governed by the rules of IEEE arithmetic: