077. Use integer powers when possible.#

topic: Basics

Note

This tip is a draft1.

Use integer powers when possible, writing x2 instead of x2.0, since depending on the compiler option used, the latter may be computed as exp(2*log(x)), which is slower.



1

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.