Convert float
to double
Bytecode
Type | Description |
u1 | f2d opcode = 0x8D (141) |
Stack ..., value => ..., result.word1, result.word2
Description
Pops a single precision float off of the stack, casts it to a double, and pushes the
double-precision floating point number back onto the stack. This conversion is done in
accordance with IEEE 754 specifications. Note that nothing is lost in this conversion. If
the original value is NaN, the result will be NaN. Similarly, if the original value is an
infinity, the result will be the same infinity.
The value on the top of the operand stack must be of type float
.
It is popped from the operand stack and converted to a double
. The result
is pushed onto the operand stack.
The f2d instruction performs a widening primitive
conversion. Because all values of type float
are exactly representable by
type double
, the conversion is exact.