# Convert double to quad precision without junk in high digits

**URL:** <https://fortran-lang.discourse.group/t/convert-double-to-quad-precision-without-junk-in-high-digits/3821>\
**Category:** Help\
**Created:** [June 23, 2022, 5:45am UTC](https://fortran-lang.discourse.group/t/convert-double-to-quad-precision-without-junk-in-high-digits/3821 "2022-06-23T05:45:02Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![Harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@Harper](https://fortran-lang.discourse.group/u/Harper)\
**Post date:** [June 23, 2022, 10:59pm UTC](https://fortran-lang.discourse.group/t/convert-double-to-quad-precision-without-junk-in-high-digits/3821/19 "2022-06-23T22:59:53Z")

</div>

FortranFan’s program does not need its keyword impure because the only I/O in subroutine dp\_to\_qp is to and from an internal file s which is local to the subroutine, by the f2018 standard C1598 in  
section 15.7. I tried it successfully with both gfortran and ifort both after changing that keyword to pure and after removing it altogether. Of course the keyword pure was superfluous, by the f2018 standard 15.6.2.1 paragraph 4.

---

_[View the full topic](https://fortran-lang.discourse.group/t/convert-double-to-quad-precision-without-junk-in-high-digits/3821)._
