Skip to main content

Module traits

Module traits 

Source
Expand description

Traits for constants.

Traits§

CatalansConstant
Provides Catalan’s constant, $G=\sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)^2}$.
ChampernowneConstant
Provides the Champernowne constant in base 10, $0.123456789101112\ldots$, formed by concatenating the decimal representations of the positive integers.
CopelandErdosConstant
Provides the Copeland–Erdős constant in base 10, $0.235711131719\ldots$, formed by concatenating the decimal representations of the primes.
DottieNumber
Provides the Dottie number, the unique real fixed point of the cosine: the $d$ with $\cos d = d$, about 0.739.
EulersConstant
Provides Euler’s constant (also known as the Euler–Mascheroni constant), $\gamma=\lim_{n\to\infty}\left(\sum_{k=1}^n\frac{1}{k}-\log n\right)$.
GaussConstant
Provides Gauss’s constant, $G=1/\mathrm{AGM}(1,\sqrt{2})$.
GelfondSchneiderConstant
Provides the Gelfond–Schneider constant, $2^{\sqrt 2}$.
GelfondsConstant
Provides Gelfond’s constant, $e^\pi$.
I
Provides the constant i, the imaginary unit.
Infinity
Provides the constant (positive) Infinity.
LemniscateConstant
Provides the lemniscate constant $\varpi=\pi G$, where $G$ is Gauss’s constant.
LiouvillesConstant
Provides Liouville’s constant in base 10, $\sum_{n=1}^{\infty} 10^{-n!}$, whose decimal expansion has a 1 at every position that is a factorial and a 0 everywhere else.
Ln2
Provides $\ln 2$.
Ln10
Provides $\ln 10$.
Log2E
Provides $\log_2 e$.
Log10E
Provides $\log_{10} e$.
Log102
Provides $\log_{10} 2$.
Log210
Provides $\log_2 10$.
NaN
Provides the constant NaN.
NegativeI
Provides the constant -i, the negative of the imaginary unit.
NegativeInfinity
Provides the constant -Infinity.
NegativeOne
Provides the constant -1.
NegativeZero
Provides the constant -0.
One
Provides the constant 1.
OneHalf
Provides the constant 1/2.
OneOverPi
Provides $1/\pi$.
OneOverSqrtPi
Provides $1/\sqrt{\pi}$.
OneOverSqrtTau
Provides $1/\sqrt{\tau}=1/\sqrt{2\pi}$.
Phi
Provides $\varphi$, the golden ratio.
Pi
Provides $\pi$.
PiOver2
Provides $\pi/2$.
PiOver3
Provides $\pi/3$.
PiOver4
Provides $\pi/4$.
PiOver6
Provides $\pi/6$.
PiOver8
Provides $\pi/8$.
PrimeConstant
Provides the prime constant, whose $n$th bit (starting from $n=1$) is true if and only if $n$ is prime.
ProuhetThueMorseConstant
Provides the Prouhet-Thue-Morse constant, whose bits are the Thue-Morse sequence.
RamanujansConstant
Provides Ramanujan’s constant, $e^{\pi\sqrt{163}}$.
Sqrt2
Provides $\sqrt{2}$.
Sqrt3
Provides $\sqrt{3}$.
Sqrt5
Provides $\sqrt{5}$.
Sqrt2Over2
Provides $\sqrt{2}/2=\sqrt{1/2}=1/\sqrt{2}$.
Sqrt3Over3
Provides $\sqrt{3}/3=\sqrt{1/3}=1/\sqrt{3}$.
Sqrt5Over5
Provides $\sqrt{5}/5=\sqrt{1/5}=1/\sqrt{5}$.
SqrtPi
Provides $\sqrt{\pi}$.
Tau
Provides $\tau=2\pi$.
Two
Provides the constant 2.
TwoOverPi
Provides $2/\pi$.
TwoOverSqrtPi
Provides $2/\sqrt{\pi}$.
Zero
Provides the constant 0.