This is an old version, view current version.
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
real
e
()
\(e\), the base of the natural logarithm
real
sqrt2
()
The square root of 2
real
log2
()
The natural logarithm of 2
real
log10
()
The natural logarithm of 10