105.

prev next contents
l2f

convert long to float

Jasmin Syntax
     l2f 
Stack

Before

After
long-word1
float
long-word2
...
...

Description

Pops a long integer off of the stack, casts it into a single precision floating point number, and pushes the single float back onto the stack. Notice that this can cause loss of precision (the significand in a float is 24 bits, compared to 64 bits for the long) though not loss of magnitude (since the range of a float is greater than the range of a long). Rounding is done using the IEEE 754 round-to-nearest mode.

Bytecode

Type

Description
u1
l2f opcode = 0x89 (137)
See Also

l2i, l2d


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates


Java Virtual Machine
Java Virtual Machine (Java Series)
ISBN: 1565921941
EAN: 2147483647
Year: 1996
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net