number_diff/utils/consts.rs
1/// Euler's constant (sometimes called the Euler-Mascheroni constant) usually denoted as π.
2/// See [this article](https://en.wikipedia.org/wiki/Euler%27s_constant) for further information.
3pub const EULER_MASCHERONI: f64 = 0.5772156649015328606065120900824024310421_f64;
4
5/// The circle constant π is defined as the ratio between a circle's radius and its circumference.
6/// See [this article](https://en.wikipedia.org/wiki/Turn_(angle)) for further information.
7pub const TAU: f64 = 6.28318530717958647692;
8
9/// Usually denoted as π, the golden ratio is defined as the positive solution to πΒ² = π + 1.
10/// See [this article](https://en.wikipedia.org/wiki/Golden_ratio) for further information
11pub const GOLDEN_RATIO: f64 = 1.61803398874989484820_f64;
12
13/// Usually denoted as πΏβ the silver ratio is the limiting factor of the [Pell numbers](https://en.wikipedia.org/wiki/Pell_number) and is defined as 1+β2.
14/// See [this article](https://en.wikipedia.org/wiki/Silver_ratio) for further information.
15pub const SILVER_RATIO: f64 = 2.41421356237309504880_f64;
16
17/// Usually denoted as π, the supergolden ratio is defined as the unique real solution to πΒ³ = πΒ² + 1.
18/// See [this article](https://en.wikipedia.org/wiki/Supergolden_ratio) for further information.
19pub const SUPERGOLDEN_RATIO: f64 = 1.46557123187676802665_f64;
20
21/// Usually denoted as Ξ², Bernstein's constant is defined as the limit lim(nβ β)2nEββ(f) where Eβ(f)is the error to the best uniform approximation to a real funciton f(x) on the interval [-1, 1] by real polynomials of no more than degree n.
22/// See [this article](https://en.wikipedia.org/wiki/Bernstein%27s_constant) for further information
23pub const BERNSTEINS_CONSTANT: f64 = 0.28016949902386913303_f64;