---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 15 Edition"
java_version: 15
chapter: "Chapter 6. The Java Virtual Machine Instruction Set"
section: "6.5.i2d"
heading: "i2d"
parent: "6.5. Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se15/html/jvms-6.html#jvms-6.5.i2d
id: "6.5.i2d"
url: https://jvm.obfuscated.software/jvms/se15/6.5.i2d.html
raw: https://jvm.obfuscated.software/jvms/se15/6.5.i2d.md
---

# i2d

## Operation

Convert `int` to `double`

## Format

```
i2d
```

## Forms

*i2d* = 135 (0x87)

## Operand 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 a `double` *result*. The *result* is pushed onto the operand stack.

## Notes

The *i2d* instruction performs a widening primitive conversion (JLS §5.1.2). Because all values of type `int` are exactly representable by type `double`, the conversion is exact.
