d2i

Convert double to int

Bytecode

Type Description
u1 d2i opcode = 0x8E (142)

Stack ..., value.word1, value.word2 => ..., result

Description
The value on the top of the operand stack must be of type double. It is popped from the operand stack and converted to an int. The result is pushed onto the operand stack:

The d2i instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value, and may also lose precision