lnegStack
Before | After |
value-word1 | result-word1 |
value-word2 | result-word2 |
... | ... |
Removes the top long integer from the operand stack, negates it, and pushes the negated result back onto the stack. This is the same as multiplying the long integer by -1, which is the same as (~value) + 1.
Bytecode Type
See Also Description u1 lneg opcode = 0x75 (117)
ineg, fneg, dneg
Notes
Because of the two's-complement representation used for negative numbers, negating Long.MIN_VALUE actually produces Long.MIN_VALUE, not Long.MAX_VALUE as you might expect.