devela::num

Trait ExtFloatConst

Source
pub trait ExtFloatConst: Sized {
Show 84 associated constants and 0 method const ONE: Self; const ZERO: Self; const NEG_ONE: Self; const NEG_ZERO: Self; const NAN: Self; const INFINITY: Self; const NEG_INFINITY: Self; const MIN: Self; const MIN_POSITIVE: Self; const MAX: Self; const MIN_EXP: i32; const MAX_EXP: i32; const MIN_10_EXP: i32; const MAX_10_EXP: i32; const EPSILON: Self; const LOW_MARGIN: Self; const MEDIUM_MARGIN: Self; const HIGH_MARGIN: Self; const RADIX: u32; const DIGITS: u32; const MANTISSA_DIGITS: u32; const PI: Self; const FRAC_PI_2: Self; const FRAC_PI_3: Self; const FRAC_PI_4: Self; const FRAC_PI_6: Self; const FRAC_PI_8: Self; const SQRT_PI: Self; const FRAC_1_PI: Self; const FRAC_1_SQRT_PI: Self; const FRAC_1_SQRT_2PI: Self; const FRAC_2_PI: Self; const FRAC_2_SQRT_PI: Self; const TAU: Self; const FRAC_TAU_2: Self; const FRAC_TAU_3: Self; const FRAC_TAU_4: Self; const FRAC_TAU_5: Self; const FRAC_TAU_6: Self; const FRAC_TAU_8: Self; const FRAC_TAU_9: Self; const FRAC_TAU_12: Self; const FRAC_TAU_16: Self; const FRAC_TAU_24: Self; const FRAC_TAU_72: Self; const FRAC_TAU_360: Self; const FRAC_360_TAU: Self; const SQRT_TAU: Self; const FRAC_1_TAU: Self; const FRAC_1_SQRT_TAU: Self; const FRAC_2_TAU: Self; const FRAC_2_SQRT_TAU: Self; const ARC_DEGREE: Self; const ARC_MINUTE: Self; const ARC_SECOND: Self; const PHI: Self; const SQ_PHI: Self; const FRAC_1_PHI: Self; const NEG_FRAC_1_PHI: Self; const SQRT_PHI: Self; const FRAC_1_SQRT_PHI: Self; const TRIBONACCI: Self; const SQRT_2: Self; const FRAC_1_SQRT_2: Self; const SQRT_3: Self; const FRAC_1_SQRT_3: Self; const SQRT_5: Self; const SQRT_6: Self; const SQRT_7: Self; const SQRT_8: Self; const SQRT_10: Self; const SQRT_11: Self; const SQRT_12: Self; const CBRT_2: Self; const CBRT_3: Self; const FRAC_1_CBRT_3: Self; const E: Self; const EGAMMA: Self; const LOG2_E: Self; const LOG2_10: Self; const LOG10_E: Self; const LOG10_2: Self; const LN_2: Self; const LN_10: Self;
}
Expand description

Extension trait for floating-point types. Associated constants.

§Constants

Required Associated Constants§

Source

const ONE: Self

The multiplicative identity 1.

Source

const ZERO: Self

The additive identity 0.

Source

const NEG_ONE: Self

The negative of the multiplicative identity -1.

Source

const NEG_ZERO: Self

The negative of the additive identity -0.

Source

const NAN: Self

Not a Number (NaN).

Source

const INFINITY: Self

Infinity (∞).

Source

const NEG_INFINITY: Self

Negative infinity (-∞).

Source

const MIN: Self

Smallest finite value.

Source

const MIN_POSITIVE: Self

Smallest positive normal value.

Source

const MAX: Self

Largest finite value.

Source

const MIN_EXP: i32

One greater than the minimum possible normal power of 2 exponent.

Source

const MAX_EXP: i32

Maximum possible power of 2 exponent.

Source

const MIN_10_EXP: i32

Minimum x for which 10x is normal.

Source

const MAX_10_EXP: i32

Maximum x for which 10x is normal.

Source

const EPSILON: Self

Machine epsilon value.

This is the smallest difference detectable between 1.0 and the next representable number in the floating-point format.

Source

const LOW_MARGIN: Self

Allows for minimal deviation; use for high precision needs..

Source

const MEDIUM_MARGIN: Self

Accommodates moderate deviation; balances precision and flexibility.

Source

const HIGH_MARGIN: Self

Permits generous deviation; suitable for less precise scenarios.

Source

const RADIX: u32

The radix or base of the internal representation.

Source

const DIGITS: u32

Approximate number of significant digits in base 10.

Source

const MANTISSA_DIGITS: u32

Number of significant digits in base 2.

Source

const PI: Self

$ π = \frac{1}{2} τ = 180º $ (A000796) ≈ 3.14159265…

The ratio of the circumference to the diameter, a half-turn.

Source

const FRAC_PI_2: Self

$ π/2 = τ/4 = 90º $ (A019669) ≈ 1.57079632…

Source

const FRAC_PI_3: Self

$ π/3 = τ/6 = 60º $ (A019670) ≈ 1.04719755…

Source

const FRAC_PI_4: Self

$ π/4 = τ/8 = 45º $ (A003881) ≈ 0.78539816…

Source

const FRAC_PI_6: Self

$ π/6 = τ/12 = 30º $ (A019673) ≈ 0.52359877…

Source

const FRAC_PI_8: Self

$ π/8 = τ/16 = 22.5º $ (A019675) ≈ 0.39269908…

Source

const SQRT_PI: Self

$ \sqrt{π} = \sqrt{\frac{1}{2} τ} $ (A002161) ≈ 1.77245385…

Source

const FRAC_1_PI: Self

$ 1/π = 2/τ $ (A049541) ≈ 0.31830988…

Source

const FRAC_1_SQRT_PI: Self

$ 1/\sqrt{π} = 1/\sqrt{τ/2} $ (A087197) ≈ 0.56418958…

Source

const FRAC_1_SQRT_2PI: Self

$ 1/\sqrt{2π} = 1/\sqrt{τ} $ (A231863) ≈ 0.39894228…

Source

const FRAC_2_PI: Self

$ 2/π $ (A060294) ≈ 0.63661977…

Buffon’s constant.

Source

const FRAC_2_SQRT_PI: Self

$ 2/\sqrt{π} $ (A190732) ≈ 1.12837916…

Source

const TAU: Self

$ τ = 2π = 360º $ (A019692) ≈ 6.28318530…

The ratio of the circumference to the radius, a full-turn.

Source

const FRAC_TAU_2: Self

$ τ/2 = π = 180º $ (A000796) ≈ 3.14159265…

Source

const FRAC_TAU_3: Self

$ τ/3 = 2π/3 = 120º $ (A019693) ≈ 2.09439510…

Source

const FRAC_TAU_4: Self

$ τ/4 = π/2 = 90º $ (A019693) ≈ 1.57079632…

Source

const FRAC_TAU_5: Self

$ τ/5 = 2π/5 = 72º $ (A019694) ≈ 1.25663706…

Source

const FRAC_TAU_6: Self

$ τ/6 = π/3 = 60º $ (A019670) ≈ 1.04719755…

Source

const FRAC_TAU_8: Self

$ τ/8 = π/4 = 45º $ (A003881) ≈ 0.78539816…

Source

const FRAC_TAU_9: Self

$ τ/9 = 2π/9 = 40º $ (A019696) ≈ 0.69813170…

Source

const FRAC_TAU_12: Self

$ τ/12 = π/6 = 30º $ (A019673) ≈ 0.52359877…

Source

const FRAC_TAU_16: Self

$ τ/16 = π/8 = 22.5º $ (A019675) ≈ 0.39269908…

Source

const FRAC_TAU_24: Self

$ τ/24 = π/12 = 15º $ (A019679) ≈ 0.26179938…

Source

const FRAC_TAU_72: Self

$ τ/72 = π/36 = 5º $ ≈ 0.08726646…

Source

const FRAC_TAU_360: Self

$ τ/360 = π/180 = 1º $ arc degree (A019685, wikipedia) ≈ 0.01745329…

Source

const FRAC_360_TAU: Self

$ 360/τ = 180/π $ (A072097) ≈ 57.2957795…

Source

const SQRT_TAU: Self

$ \sqrt{τ} = \sqrt{2π} $ (A019727) ≈ 2.50662827…

Source

const FRAC_1_TAU: Self

$ 1/τ = 1/2π $ (A086201) ≈ 0.15915494…

Source

const FRAC_1_SQRT_TAU: Self

$ 1/\sqrt{τ} = 1/\sqrt{2π} $ (A231863) ≈ 0.39894228…

Source

const FRAC_2_TAU: Self

$ 2/τ = 1/π $ (A049541) ≈ 0.31830988…

Source

const FRAC_2_SQRT_TAU: Self

$ 2/\sqrt{τ} = \sqrt{2/π} $ (A076668) ≈ 0.79788456…

Source

const ARC_DEGREE: Self

$ τ/360 = π/180 = 1º $ arc degree (A019685, wikipedia) ≈ 0.01745329…

Source

const ARC_MINUTE: Self

$ τ/(360*60) = 1’ $ arc minute (wikipedia) ≈ 0.00029088…

Source

const ARC_SECOND: Self

$ τ/(360 * 60 * 60) = 1’’ $ arc second (wikipedia) ≈ 0.00000484…

Source

const PHI: Self

$ φ = (1+\sqrt{5})/2 $ (A001622) ≈ 1.61803398…

The golden ratio.

Continued fraction: $ [1;1,1,1,…] $

Source

const SQ_PHI: Self

$ φ^2 = φ+1 = (3+\sqrt{5})/2 $ (A104457) ≈ 2.61803398…

Source

const FRAC_1_PHI: Self

$ 1/φ = φ-1 $ (A094214) ≈ 0.61803398…

The reciprocal of φ.

Source

const NEG_FRAC_1_PHI: Self

$ -1/φ = 1-φ $ ≈ -0.61803398…

The negative reciprocal of φ and its conjugate in $ x^2-x-1 $.

Source

const SQRT_PHI: Self

$ \sqrt{φ} $ (A139339) ≈ 1.27201964…

Source

const FRAC_1_SQRT_PHI: Self

$ 1/\sqrt{φ} = \sqrt{φ/φ^2} = \sqrt{φ^2-2} $ (A197762) ≈ 0.78615137…

Source

const TRIBONACCI: Self

(A058265) ≈ 1.83928675…

The tribonacci constant.

Source

const SQRT_2: Self

$ \sqrt{2} $ (A002193, wikipedia) ≈ 1.41421356…

Source

const FRAC_1_SQRT_2: Self

$ 1/\sqrt{2} = \sqrt{1/2} $ (A010503, wikipedia) ≈ 0.70710678…

Source

const SQRT_3: Self

$ \sqrt{3} $ (A002194, wikipedia) ≈ 1.73205080…

Source

const FRAC_1_SQRT_3: Self

$ 1/\sqrt{3} = \sqrt{1/3} $ (A020760, ≈ 0.57735026…

Source

const SQRT_5: Self

$ \sqrt{5} $ (A002163, wikipedia) ≈ 2.23606797…

Source

const SQRT_6: Self

$ \sqrt{6} $ (A010464) ≈ 2.44948974…

Source

const SQRT_7: Self

$ \sqrt{7} $ (A010465) ≈ 2.64575131…

Source

const SQRT_8: Self

$ \sqrt{8} $ (A010466) ≈ 2.82842712…

Source

const SQRT_10: Self

$ \sqrt{10} $ (A010467) ≈ 3.16227766…

Source

const SQRT_11: Self

$ \sqrt{11} $ (A010468) ≈ 3.31662479…

Source

const SQRT_12: Self

$ \sqrt{12} $ (A010469) ≈ 3.46410161…

Source

const CBRT_2: Self

$ \sqrt[\small 3]{2} $ (A002580, wikipedia) ≈ 1.25992104…

Source

const CBRT_3: Self

$ \sqrt[\small 3]{3} $ (A002581) ≈ 1.44224957…

Source

const FRAC_1_CBRT_3: Self

$ 1/\sqrt[\small 3]{3} = (\normalsize\frac{1}{3})^{\small\frac{1}{3}} $ (A072365) ≈ 0.69336127…

Source

const E: Self

$ e $ (A001113) ≈ 2.71828182…

The Euler number or Napier’s constant.

Continuous fraction: $ [2;1,2,1,1,4,1,1,6,1,…,1,2n,1,…] $

Source

const EGAMMA: Self

$ γ $ (A001620) ≈ 0.57721566…

Gamma, or the Euler-Mascheroni constant.

Source

const LOG2_E: Self

$ \log_2{e} $ (A007525) ≈ 1.44269504…

Source

const LOG2_10: Self

log2(10) (A020862) ≈ 3.32192809…

Source

const LOG10_E: Self

log10(e) (A002285) ≈ 0.43429448…

Source

const LOG10_2: Self

log10(2) (A007524) ≈ 0.30102999…

Source

const LN_2: Self

ln(2) (A002162) ≈ 0.69314718…

Source

const LN_10: Self

ln(10) (A002392) ≈ 2.30258509…

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ExtFloatConst for f16

Available on crate feature nightly_float only.

§Mathematical constants

.
Source§

const ONE: f16 = 1f16

Source§

const ZERO: f16 = 0f16

Source§

const NEG_ONE: f16 = -1f16

Source§

const NEG_ZERO: f16 = -0f16

Source§

const NAN: f16 = NaN_f16

Source§

const INFINITY: f16 = +Inf_f16

Source§

const NEG_INFINITY: f16 = -Inf_f16

Source§

const EPSILON: f16 = 9.7656E-4f16

Source§

const LOW_MARGIN: f16 = 1.0002E-4f16

Source§

const MEDIUM_MARGIN: f16 = 0.0010004f16

Source§

const HIGH_MARGIN: f16 = 0.010002f16

Source§

const RADIX: u32 = 2u32

Source§

const DIGITS: u32 = 3u32

Source§

const MANTISSA_DIGITS: u32 = 11u32

Source§

const MIN: f16 = -65504f16

Source§

const MIN_POSITIVE: f16 = 6.1035E-5f16

Source§

const MAX: f16 = 65504f16

Source§

const MIN_EXP: i32 = -13i32

Source§

const MAX_EXP: i32 = 16i32

Source§

const MIN_10_EXP: i32 = -4i32

Source§

const MAX_10_EXP: i32 = 4i32

Source§

const PI: f16 = 3.1406f16

Source§

const FRAC_PI_2: f16 = 1.5703f16

Source§

const FRAC_PI_3: f16 = 1.0469f16

Source§

const FRAC_PI_4: f16 = 0.78515f16

Source§

const FRAC_PI_6: f16 = 0.52344f16

Source§

const FRAC_PI_8: f16 = 0.39258f16

Source§

const SQRT_PI: f16 = 1.7725f16

Source§

const FRAC_1_PI: f16 = 0.31836f16

Source§

const FRAC_1_SQRT_PI: f16 = 0.56396f16

Source§

const FRAC_1_SQRT_2PI: f16 = 0.39893f16

Source§

const FRAC_2_PI: f16 = 0.63672f16

Source§

const FRAC_2_SQRT_PI: f16 = 1.1279f16

Source§

const TAU: f16 = 6.2813f16

Source§

const FRAC_TAU_2: f16 = 3.1406f16

Source§

const FRAC_TAU_3: f16 = 2.0938f16

Source§

const FRAC_TAU_4: f16 = 1.5703f16

Source§

const FRAC_TAU_5: f16 = 1.2568f16

Source§

const FRAC_TAU_6: f16 = 1.0469f16

Source§

const FRAC_TAU_8: f16 = 0.78515f16

Source§

const FRAC_TAU_9: f16 = 0.69824f16

Source§

const FRAC_TAU_12: f16 = 0.52344f16

Source§

const FRAC_TAU_16: f16 = 0.39258f16

Source§

const FRAC_TAU_24: f16 = 0.26172f16

Source§

const FRAC_TAU_72: f16 = 0.08728f16

Source§

const FRAC_TAU_360: f16 = 0.017456f16

Source§

const FRAC_360_TAU: f16 = 57.281f16

Source§

const SQRT_TAU: f16 = 2.5059f16

Source§

const FRAC_1_TAU: f16 = 0.15918f16

Source§

const FRAC_1_SQRT_TAU: f16 = 0.39893f16

Source§

const FRAC_2_TAU: f16 = 0.31836f16

Source§

const FRAC_2_SQRT_TAU: f16 = 0.79785f16

Source§

const ARC_DEGREE: f16 = 0.017456f16

Source§

const ARC_MINUTE: f16 = 2.9087E-4f16

Source§

const ARC_SECOND: f16 = 4.828E-6f16

Source§

const PHI: f16 = 1.6182f16

Source§

const SQ_PHI: f16 = 2.6172f16

Source§

const FRAC_1_PHI: f16 = 0.61816f16

Source§

const NEG_FRAC_1_PHI: f16 = -0.61816f16

Source§

const SQRT_PHI: f16 = 1.2725f16

Source§

const FRAC_1_SQRT_PHI: f16 = 0.78613f16

Source§

const TRIBONACCI: f16 = 1.8389f16

Source§

const SQRT_2: f16 = 1.4141f16

Source§

const FRAC_1_SQRT_2: f16 = 0.70703f16

Source§

const SQRT_3: f16 = 1.7324f16

Source§

const FRAC_1_SQRT_3: f16 = 0.57715f16

Source§

const SQRT_5: f16 = 2.2363f16

Source§

const SQRT_6: f16 = 2.4492f16

Source§

const SQRT_7: f16 = 2.6465f16

Source§

const SQRT_8: f16 = 2.8281f16

Source§

const SQRT_10: f16 = 3.1621f16

Source§

const SQRT_11: f16 = 3.3164f16

Source§

const SQRT_12: f16 = 3.4648f16

Source§

const CBRT_2: f16 = 1.2598f16

Source§

const CBRT_3: f16 = 1.4424f16

Source§

const FRAC_1_CBRT_3: f16 = 0.69336f16

Source§

const E: f16 = 2.7188f16

Source§

const EGAMMA: f16 = 0.57715f16

Source§

const LOG2_E: f16 = 1.4424f16

Source§

const LOG2_10: f16 = 3.3223f16

Source§

const LOG10_E: f16 = 0.43433f16

Source§

const LOG10_2: f16 = 0.30103f16

Source§

const LN_2: f16 = 0.69336f16

Source§

const LN_10: f16 = 2.3027f16

Source§

impl ExtFloatConst for f32

§Mathematical constants

.
Source§

const ONE: f32 = 1f32

Source§

const ZERO: f32 = 0f32

Source§

const NEG_ONE: f32 = -1f32

Source§

const NEG_ZERO: f32 = -0f32

Source§

const NAN: f32 = NaN_f32

Source§

const INFINITY: f32 = +Inf_f32

Source§

const NEG_INFINITY: f32 = -Inf_f32

Source§

const EPSILON: f32 = 1.1920929E-7f32

Source§

const LOW_MARGIN: f32 = 1.00000001E-7f32

Source§

const MEDIUM_MARGIN: f32 = 9.99999997E-7f32

Source§

const HIGH_MARGIN: f32 = 9.99999974E-6f32

Source§

const RADIX: u32 = 2u32

Source§

const DIGITS: u32 = 6u32

Source§

const MANTISSA_DIGITS: u32 = 24u32

Source§

const MIN: f32 = -3.40282347E+38f32

Source§

const MIN_POSITIVE: f32 = 1.17549435E-38f32

Source§

const MAX: f32 = 3.40282347E+38f32

Source§

const MIN_EXP: i32 = -125i32

Source§

const MAX_EXP: i32 = 128i32

Source§

const MIN_10_EXP: i32 = -37i32

Source§

const MAX_10_EXP: i32 = 38i32

Source§

const PI: f32 = 3.14159274f32

Source§

const FRAC_PI_2: f32 = 1.57079637f32

Source§

const FRAC_PI_3: f32 = 1.04719758f32

Source§

const FRAC_PI_4: f32 = 0.785398185f32

Source§

const FRAC_PI_6: f32 = 0.52359879f32

Source§

const FRAC_PI_8: f32 = 0.392699093f32

Source§

const SQRT_PI: f32 = 1.7724539f32

Source§

const FRAC_1_PI: f32 = 0.318309873f32

Source§

const FRAC_1_SQRT_PI: f32 = 0.564189613f32

Source§

const FRAC_1_SQRT_2PI: f32 = 0.398942292f32

Source§

const FRAC_2_PI: f32 = 0.636619746f32

Source§

const FRAC_2_SQRT_PI: f32 = 1.12837923f32

Source§

const TAU: f32 = 6.28318548f32

Source§

const FRAC_TAU_2: f32 = 3.14159274f32

Source§

const FRAC_TAU_3: f32 = 2.09439516f32

Source§

const FRAC_TAU_4: f32 = 1.57079637f32

Source§

const FRAC_TAU_5: f32 = 1.2566371f32

Source§

const FRAC_TAU_6: f32 = 1.04719758f32

Source§

const FRAC_TAU_8: f32 = 0.785398185f32

Source§

const FRAC_TAU_9: f32 = 0.69813168f32

Source§

const FRAC_TAU_12: f32 = 0.52359879f32

Source§

const FRAC_TAU_16: f32 = 0.392699093f32

Source§

const FRAC_TAU_24: f32 = 0.261799395f32

Source§

const FRAC_TAU_72: f32 = 0.0872664601f32

Source§

const FRAC_TAU_360: f32 = 0.0174532924f32

Source§

const FRAC_360_TAU: f32 = 57.2957802f32

Source§

const SQRT_TAU: f32 = 2.50662827f32

Source§

const FRAC_1_TAU: f32 = 0.159154937f32

Source§

const FRAC_1_SQRT_TAU: f32 = 0.398942292f32

Source§

const FRAC_2_TAU: f32 = 0.318309873f32

Source§

const FRAC_2_SQRT_TAU: f32 = 0.797884583f32

Source§

const ARC_DEGREE: f32 = 0.0174532924f32

Source§

const ARC_MINUTE: f32 = 2.90888216E-4f32

Source§

const ARC_SECOND: f32 = 4.848137E-6f32

Source§

const PHI: f32 = 1.61803401f32

Source§

const SQ_PHI: f32 = 2.61803389f32

Source§

const FRAC_1_PHI: f32 = 0.618034005f32

Source§

const NEG_FRAC_1_PHI: f32 = -0.618034005f32

Source§

const SQRT_PHI: f32 = 1.27201962f32

Source§

const FRAC_1_SQRT_PHI: f32 = 0.786151349f32

Source§

const TRIBONACCI: f32 = 1.8392868f32

Source§

const SQRT_2: f32 = 1.41421354f32

Source§

const FRAC_1_SQRT_2: f32 = 0.707106769f32

Source§

const SQRT_3: f32 = 1.73205078f32

Source§

const FRAC_1_SQRT_3: f32 = 0.577350259f32

Source§

const SQRT_5: f32 = 2.23606801f32

Source§

const SQRT_6: f32 = 2.44948983f32

Source§

const SQRT_7: f32 = 2.64575124f32

Source§

const SQRT_8: f32 = 2.82842708f32

Source§

const SQRT_10: f32 = 3.1622777f32

Source§

const SQRT_11: f32 = 3.31662488f32

Source§

const SQRT_12: f32 = 3.46410155f32

Source§

const CBRT_2: f32 = 1.25992107f32

Source§

const CBRT_3: f32 = 1.44224954f32

Source§

const FRAC_1_CBRT_3: f32 = 0.693361282f32

Source§

const E: f32 = 2.71828175f32

Source§

const EGAMMA: f32 = 0.577215672f32

Source§

const LOG2_E: f32 = 1.44269502f32

Source§

const LOG2_10: f32 = 3.32192802f32

Source§

const LOG10_E: f32 = 0.434294492f32

Source§

const LOG10_2: f32 = 0.30103001f32

Source§

const LN_2: f32 = 0.693147182f32

Source§

const LN_10: f32 = 2.30258512f32

Source§

impl ExtFloatConst for f64

§Mathematical constants

.
Source§

const ONE: f64 = 1f64

Source§

const ZERO: f64 = 0f64

Source§

const NEG_ONE: f64 = -1f64

Source§

const NEG_ZERO: f64 = -0f64

Source§

const NAN: f64 = NaN_f64

Source§

const INFINITY: f64 = +Inf_f64

Source§

const NEG_INFINITY: f64 = -Inf_f64

Source§

const EPSILON: f64 = 2.2204460492503131E-16f64

Source§

const LOW_MARGIN: f64 = 9.9999999999999998E-13f64

Source§

const MEDIUM_MARGIN: f64 = 1.0000000000000001E-9f64

Source§

const HIGH_MARGIN: f64 = 9.9999999999999995E-7f64

Source§

const RADIX: u32 = 2u32

Source§

const DIGITS: u32 = 15u32

Source§

const MANTISSA_DIGITS: u32 = 53u32

Source§

const MIN: f64 = -1.7976931348623157E+308f64

Source§

const MIN_POSITIVE: f64 = 2.2250738585072014E-308f64

Source§

const MAX: f64 = 1.7976931348623157E+308f64

Source§

const MIN_EXP: i32 = -1_021i32

Source§

const MAX_EXP: i32 = 1_024i32

Source§

const MIN_10_EXP: i32 = -307i32

Source§

const MAX_10_EXP: i32 = 308i32

Source§

const PI: f64 = 3.1415926535897931f64

Source§

const FRAC_PI_2: f64 = 1.5707963267948966f64

Source§

const FRAC_PI_3: f64 = 1.0471975511965979f64

Source§

const FRAC_PI_4: f64 = 0.78539816339744828f64

Source§

const FRAC_PI_6: f64 = 0.52359877559829893f64

Source§

const FRAC_PI_8: f64 = 0.39269908169872414f64

Source§

const SQRT_PI: f64 = 1.7724538509055161f64

Source§

const FRAC_1_PI: f64 = 0.31830988618379069f64

Source§

const FRAC_1_SQRT_PI: f64 = 0.56418958354775628f64

Source§

const FRAC_1_SQRT_2PI: f64 = 0.3989422804014327f64

Source§

const FRAC_2_PI: f64 = 0.63661977236758138f64

Source§

const FRAC_2_SQRT_PI: f64 = 1.1283791670955126f64

Source§

const TAU: f64 = 6.2831853071795862f64

Source§

const FRAC_TAU_2: f64 = 3.1415926535897931f64

Source§

const FRAC_TAU_3: f64 = 2.0943951023931957f64

Source§

const FRAC_TAU_4: f64 = 1.5707963267948966f64

Source§

const FRAC_TAU_5: f64 = 1.2566370614359172f64

Source§

const FRAC_TAU_6: f64 = 1.0471975511965979f64

Source§

const FRAC_TAU_8: f64 = 0.78539816339744828f64

Source§

const FRAC_TAU_9: f64 = 0.69813170079773179f64

Source§

const FRAC_TAU_12: f64 = 0.52359877559829893f64

Source§

const FRAC_TAU_16: f64 = 0.39269908169872414f64

Source§

const FRAC_TAU_24: f64 = 0.26179938779914946f64

Source§

const FRAC_TAU_72: f64 = 0.087266462599716474f64

Source§

const FRAC_TAU_360: f64 = 0.017453292519943295f64

Source§

const FRAC_360_TAU: f64 = 57.295779513082323f64

Source§

const SQRT_TAU: f64 = 2.5066282746310007f64

Source§

const FRAC_1_TAU: f64 = 0.15915494309189535f64

Source§

const FRAC_1_SQRT_TAU: f64 = 0.3989422804014327f64

Source§

const FRAC_2_TAU: f64 = 0.31830988618379069f64

Source§

const FRAC_2_SQRT_TAU: f64 = 0.79788456080286541f64

Source§

const ARC_DEGREE: f64 = 0.017453292519943295f64

Source§

const ARC_MINUTE: f64 = 2.9088820866572158E-4f64

Source§

const ARC_SECOND: f64 = 4.8481368110953598E-6f64

Source§

const PHI: f64 = 1.6180339887498949f64

Source§

const SQ_PHI: f64 = 2.6180339887498949f64

Source§

const FRAC_1_PHI: f64 = 0.6180339887498949f64

Source§

const NEG_FRAC_1_PHI: f64 = -0.6180339887498949f64

Source§

const SQRT_PHI: f64 = 1.272019649514069f64

Source§

const FRAC_1_SQRT_PHI: f64 = 0.78615137775742328f64

Source§

const TRIBONACCI: f64 = 1.8392867552141612f64

Source§

const SQRT_2: f64 = 1.4142135623730951f64

Source§

const FRAC_1_SQRT_2: f64 = 0.70710678118654757f64

Source§

const SQRT_3: f64 = 1.7320508075688772f64

Source§

const FRAC_1_SQRT_3: f64 = 0.57735026918962573f64

Source§

const SQRT_5: f64 = 2.2360679774997898f64

Source§

const SQRT_6: f64 = 2.4494897427831779f64

Source§

const SQRT_7: f64 = 2.6457513110645907f64

Source§

const SQRT_8: f64 = 2.8284271247461903f64

Source§

const SQRT_10: f64 = 3.1622776601683795f64

Source§

const SQRT_11: f64 = 3.3166247903553998f64

Source§

const SQRT_12: f64 = 3.4641016151377544f64

Source§

const CBRT_2: f64 = 1.2599210498948732f64

Source§

const CBRT_3: f64 = 1.4422495703074083f64

Source§

const FRAC_1_CBRT_3: f64 = 0.69336127435063466f64

Source§

const E: f64 = 2.7182818284590451f64

Source§

const EGAMMA: f64 = 0.57721566490153287f64

Source§

const LOG2_E: f64 = 1.4426950408889634f64

Source§

const LOG2_10: f64 = 3.3219280948873622f64

Source§

const LOG10_E: f64 = 0.43429448190325182f64

Source§

const LOG10_2: f64 = 0.3010299956639812f64

Source§

const LN_2: f64 = 0.69314718055994529f64

Source§

const LN_10: f64 = 2.3025850929940459f64

Source§

impl ExtFloatConst for f128

Available on crate feature nightly_float only.

§Mathematical constants

.
Source§

const ONE: f128 = 1f128

Source§

const ZERO: f128 = 0f128

Source§

const NEG_ONE: f128 = -1f128

Source§

const NEG_ZERO: f128 = -0f128

Source§

const NAN: f128 = NaN_f128

Source§

const INFINITY: f128 = +Inf_f128

Source§

const NEG_INFINITY: f128 = -Inf_f128

Source§

const EPSILON: f128 = 1.92592994438723585305597794258492732E-34f128

Source§

const LOW_MARGIN: f128 = 9.99999999999999999999999999999999996E-31f128

Source§

const MEDIUM_MARGIN: f128 = 9.99999999999999999999999999999999936E-28f128

Source§

const HIGH_MARGIN: f128 = 9.99999999999999999999999999999999934E-25f128

Source§

const RADIX: u32 = 2u32

Source§

const DIGITS: u32 = 33u32

Source§

const MANTISSA_DIGITS: u32 = 113u32

Source§

const MIN: f128 = -1.18973149535723176508575932662800702E+4932f128

Source§

const MIN_POSITIVE: f128 = 3.3621031431120935062626778173217526E-4932f128

Source§

const MAX: f128 = 1.18973149535723176508575932662800702E+4932f128

Source§

const MIN_EXP: i32 = -16_381i32

Source§

const MAX_EXP: i32 = 16_384i32

Source§

const MIN_10_EXP: i32 = -4_931i32

Source§

const MAX_10_EXP: i32 = 4_932i32

Source§

const PI: f128 = 3.1415926535897932384626433832795028f128

Source§

const FRAC_PI_2: f128 = 1.5707963267948966192313216916397514f128

Source§

const FRAC_PI_3: f128 = 1.04719755119659774615421446109316766f128

Source§

const FRAC_PI_4: f128 = 0.785398163397448309615660845819875699f128

Source§

const FRAC_PI_6: f128 = 0.523598775598298873077107230546583832f128

Source§

const FRAC_PI_8: f128 = 0.39269908169872415480783042290993785f128

Source§

const SQRT_PI: f128 = 1.77245385090551602729816748334114514f128

Source§

const FRAC_1_PI: f128 = 0.318309886183790671537767526745028737f128

Source§

const FRAC_1_SQRT_PI: f128 = 0.564189583547756286948079451560772632f128

Source§

const FRAC_1_SQRT_2PI: f128 = 0.398942280401432677939946059934381874f128

Source§

const FRAC_2_PI: f128 = 0.636619772367581343075535053490057474f128

Source§

const FRAC_2_SQRT_PI: f128 = 1.12837916709551257389615890312154526f128

Source§

const TAU: f128 = 6.28318530717958647692528676655900559f128

Source§

const FRAC_TAU_2: f128 = 3.1415926535897932384626433832795028f128

Source§

const FRAC_TAU_3: f128 = 2.09439510239319549230842892218633533f128

Source§

const FRAC_TAU_4: f128 = 1.5707963267948966192313216916397514f128

Source§

const FRAC_TAU_5: f128 = 1.25663706143591729538505735331180116f128

Source§

const FRAC_TAU_6: f128 = 1.04719755119659774615421446109316766f128

Source§

const FRAC_TAU_8: f128 = 0.785398163397448309615660845819875699f128

Source§

const FRAC_TAU_9: f128 = 0.698131700797731830769476307395445045f128

Source§

const FRAC_TAU_12: f128 = 0.523598775598298873077107230546583832f128

Source§

const FRAC_TAU_16: f128 = 0.39269908169872415480783042290993785f128

Source§

const FRAC_TAU_24: f128 = 0.261799387799149436538553615273291916f128

Source§

const FRAC_TAU_72: f128 = 0.0872664625997164788461845384244306306f128

Source§

const FRAC_TAU_360: f128 = 0.0174532925199432957692369076848861285f128

Source§

const FRAC_360_TAU: f128 = 57.2957795130823208767981548141051723f128

Source§

const SQRT_TAU: f128 = 2.50662827463100050241576528481104528f128

Source§

const FRAC_1_TAU: f128 = 0.159154943091895335768883763372514368f128

Source§

const FRAC_1_SQRT_TAU: f128 = 0.398942280401432677939946059934381874f128

Source§

const FRAC_2_TAU: f128 = 0.318309886183790671537767526745028737f128

Source§

const FRAC_2_SQRT_TAU: f128 = 0.797884560802865355879892119868763747f128

Source§

const ARC_DEGREE: f128 = 0.0174532925199432957692369076848861285f128

Source§

const ARC_MINUTE: f128 = 2.90888208665721596153948461414768781E-4f128

Source§

const ARC_SECOND: f128 = 4.84813681109535993589914102357948012E-6f128

Source§

const PHI: f128 = 1.61803398874989484820458683436563816f128

Source§

const SQ_PHI: f128 = 2.61803398874989484820458683436563816f128

Source§

const FRAC_1_PHI: f128 = 0.61803398874989484820458683436563816f128

Source§

const NEG_FRAC_1_PHI: f128 = -0.61803398874989484820458683436563816f128

Source§

const SQRT_PHI: f128 = 1.27201964951406896425242246173749152f128

Source§

const FRAC_1_SQRT_PHI: f128 = 0.786151377757423286069558585842958934f128

Source§

const TRIBONACCI: f128 = 1.83928675521416113255185256465328669f128

Source§

const SQRT_2: f128 = 1.41421356237309504880168872420969798f128

Source§

const FRAC_1_SQRT_2: f128 = 0.707106781186547524400844362104848992f128

Source§

const SQRT_3: f128 = 1.73205080756887729352744634150587232f128

Source§

const FRAC_1_SQRT_3: f128 = 0.577350269189625764509148780501957409f128

Source§

const SQRT_5: f128 = 2.23606797749978969640917366873127632f128

Source§

const SQRT_6: f128 = 2.44948974278317809819728407470589124f128

Source§

const SQRT_7: f128 = 2.6457513110645905905016157536392604f128

Source§

const SQRT_8: f128 = 2.82842712474619009760337744841939597f128

Source§

const SQRT_10: f128 = 3.16227766016837933199889354443271854f128

Source§

const SQRT_11: f128 = 3.31662479035539984911493273667068682f128

Source§

const SQRT_12: f128 = 3.46410161513775458705489268301174464f128

Source§

const CBRT_2: f128 = 1.25992104989487316476721060727822834f128

Source§

const CBRT_3: f128 = 1.44224957030740838232163831078010951f128

Source§

const FRAC_1_CBRT_3: f128 = 0.69336127435063470484335227478596182f128

Source§

const E: f128 = 2.71828182845904523536028747135266231f128

Source§

const EGAMMA: f128 = 0.577215664901532860606512090082402471f128

Source§

const LOG2_E: f128 = 1.44269504088896340735992468100189204f128

Source§

const LOG2_10: f128 = 3.32192809488736234787031942948939029f128

Source§

const LOG10_E: f128 = 0.434294481903251827651128918916605096f128

Source§

const LOG10_2: f128 = 0.30102999566398119521373889472449302f128

Source§

const LN_2: f128 = 0.693147180559945309417232121458176575f128

Source§

const LN_10: f128 = 2.30258509299404568401799145468436418f128

Implementors§