Convert double
to float
Bytecode
Type | Description |
u1 | d2f opcode = 0x90 (144) |
Stack ..., value.word1, value.word2 => ..., result
The value on the top of the operand stack must be of type double
.
It is popped from the operand stack and converted to a float
result
using IEEE 754 round-to-nearest mode. The result is pushed onto the operand stack.
A finite value too small to be represented as a float
is converted to a zero of the same sign; a finite value too large to be represented
as a float
is converted to an infinity of the same sign. A double
NaN is converted to a float
NaN.
This instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value and may also lose precision.