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:
double
using IEEE 754
round-to-nearest mode. If the magnitude is too large to represent as a double
,
we say the operation overflows; the result is then an infinity of appropriate sign. If the
magnitude is too small to represent as a double
, we say the operation
underflows; the result is then a zero of appropriate sign. The Java Virtual Machine requires support of gradual underflow as defined by IEEE 754. Despite the fact that overflow, underflow, division by zero, or loss of precision may occur, execution of a ddiv instruction never throws a runtime exception