## 3.2 Mathematical constants

Constants are represented as functions with no arguments and must be called as such. For instance, the mathematical constant $$\pi$$ must be written in a Stan program as pi().

real pi()
$$\pi$$, the ratio of a circle’s circumference to its diameter
Available since 2.0

real e()
$$e$$, the base of the natural logarithm
Available since 2.0

real sqrt2()
The square root of 2
Available since 2.0

real log2()
The natural logarithm of 2
Available since 2.0

real log10()
The natural logarithm of 10
Available since 2.0