Multiply two floats
Bytecode
Type | Description |
u1 | fmul opcode = 0x6A (106) |
Stack ..., value1, value2 => ..., result
Pops two single-precision floating point numbers off of the stack, multiplies them, and pushes the single precision result back onto the stack. IEEE 754 rules for floating point arithmetic are used.
Both value1 and value2 must be of type float
. The values are
popped from the operand stack. The float
result is value1 * value2.
The result is pushed onto the operand stack.
The result of an fmul instruction is governed by the rules of IEEE arithmetic:
float
, we say the
operation overflows; the result is then an infinity of appropriate sign. If the magnitude
is too small to represent as a float
, 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, or loss of precision may occur, execution of an fmul instruction never throws a runtime exception.