# <span class='text-muted'>076.</span> Use d0 or \_kind to make a constant double precision.

<span style='font-size: small;' class='text-muted'>topic: {ref}`data-types`</span>

```{note}
This tip is a draft[^draft].

[^draft]: From the perspective of FortranTip Browser, "draft" means that
  it hasn't been edited for formatting,
  hasn't had corresponding Fortran programs added,
  the text content hasn't been enhanced, etc.
  Draft texts are extracted from the corresponding Tweet using the Twitter API.
```

Use d0 or _kind to make a constant double precision. Merely having many decimal places in a literal constant does not do so.

real(kind(1.0d0)) :: pi
pi = 3.14159265358979323846 ! RHS is single precision

probably does not do what the programmer intends!


---

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Use d0 or _kind to make a constant double precision. Merely having many decimal places in a literal constant does not do so.<br><br>real(kind(1.0d0)) :: pi<br>pi = 3.14159265358979323846 ! RHS is single precision<br><br>probably does not do what the programmer intends! <a href="https://t.co/T9hNCwfcE2">pic.twitter.com/T9hNCwfcE2</a></p>&mdash; FortranTip (@fortrantip) <a href="https://twitter.com/fortrantip/status/1478713534850736129?ref_src=twsrc%5Etfw">January 5, 2022</a></blockquote><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>