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

# l2d

## Operation

Convert `long` to `double`

## Format

```
l2d
```

## Forms

*l2d* = 138 (0x8a)

## Operand Stack

..., *value* →

..., *result*

## Description

The *value* on the top of the operand stack must be of type `long`. It is popped from the operand stack and converted to a `double` *result* using IEEE 754 round to nearest mode. The *result* is pushed onto the operand stack.

## Notes

The *l2d* instruction performs a widening primitive conversion (JLS §5.1.2) that may lose precision because values of type `double` have only 53 significand bits.
