d2fStack
Before | After |
double-word1 | float-result |
double-word2 | ... |
... |
Pops a two-word double precision floating point number off of the operand stack, casts it into a single precision float, and pushes the resulting float back onto the stack. There is a loss of precision and range in the result.
This conversion is done in accordance with IEEE 754 specifications, with rounding using IEEE 754 round-to-nearest mode.
The sign of the value if preserved. A value which is too small to be represented as a float is converted to positive or negative zero. A value that is too large to be represented as a float is converted to positive infinity or negative infinity. If the value was NaN, the result is NaN.
Bytecode Type
See Also Description u1 d2f opcode = 0x90 (144)
d2i, d2l