Contents | Prev | Next | Index

d2f

Operation
Convert double to float

d2f

Forms
d2f = 144 (0x90)

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 a float result using IEEE 754 round-to-nearest mode. The result is pushed onto the operand stack.

A finite value too small to be represented as a float is converted to a zero of the same sign; a finite value too large to be represented as a float is converted to an infinity of the same sign. A double NaN is converted to a float NaN.

Notes
The d2f instruction performs a narrowing primitive conversion (§2.6.3). It may lose information about the overall magnitude of value and may also lose precision.


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