Java Virtual Machine (Java Series)
l2d
l2d Stack
Before | After |
| long-word1 | double-word1 |
| long-word2 | double-word2 |
| ... | ... |
Pops a long integer off of the stack, casts it into a double precision floating point number, and pushes the double back onto the stack. Notice that this can cause loss of precision (the significand in a double is 54 bits, compared to 64 bits for the long) though not loss of magnitude (since the range of a double is greater than the range of a long). Rounding is done using the IEEE 754 round-to-nearest mode.
Bytecode
Type | Description |
| u1 | l2d opcode = 0x8A (138) |
l2i, l2f
prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates
Категории