Contents | Prev | Next | Index

i2f

Operation
Convert int to float

i2f

Forms
i2f = 134 (0x86)

Stack
..., value ..., result

Description
The value on the top of the operand stack must be of type int. It is popped from the operand stack and converted to the float result using IEEE 754 round-to-nearest mode. The result is pushed onto the operand stack.

Notes
The i2f instruction performs a widening primitive conversion (§2.6.2), but may result in a loss of precision because type float has only 24 mantissa bits.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com