1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
*/
// Universal Constants (CODATA 2022)
pub const G: f64 = 9.80665; // m s^-2 (exact)
pub const SPEED_OF_LIGHT: f64 = 299_792_458.0; // m s^-1 (exact)
use RealField;
use FromPrimitive;
/// Returns [`SPEED_OF_LIGHT`] (c) at the target real-field precision `R`.
///
/// Companion accessor that lets real-field kernels obtain the speed of light in
/// their own precision without hand-casting the `f64` value. See
/// [`crate::real_from_f64`] for the conversion contract.
/// Cosmological constant upper bound (in m⁻²)
///
/// ```text
/// Λ ≈ 1.1 × 10⁻⁵² m⁻² (from observations)
/// ```
pub const COSMOLOGICAL_CONSTANT: f64 = 1.1e-52;
/// Planck length in meters
///
/// ```text
/// l_P = √(ℏG/c³) ≈ 1.616 × 10⁻³⁵ m
/// ```
pub const PLANCK_LENGTH: f64 = 1.616255e-35;
/// Planck mass in kg
///
/// ```text
/// m_P = √(ℏc/G) ≈ 2.176 × 10⁻⁸ kg
/// ```
pub const PLANCK_MASS: f64 = 2.176434e-8;
pub const PLANCK_CONSTANT: f64 = 6.626_070_15e-34; // J Hz^-1 (exact)
pub const REDUCED_PLANCK_CONSTANT: f64 = 1.054_571_817e-34; // J s
/// Returns [`REDUCED_PLANCK_CONSTANT`] (ℏ) at the target real-field precision `R`.
///
/// Companion accessor that lets real-field kernels obtain the reduced Planck
/// constant in their own precision without hand-casting the `f64` value. See
/// [`crate::real_from_f64`] for the conversion contract.
pub const VACUUM_MAGNETIC_PERMEABILITY: f64 = 1.256_637_061_27e-6; // N A^-2
pub const VACUUM_ELECTRIC_PERMITTIVITY: f64 = 8.854_187_818_8e-12; // F m^-1
pub const NEWTONIAN_CONSTANT_OF_GRAVITATION: f64 = 6.674_30e-11; // m^3 kg^-1 s^-2