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;