Physical Constants

The units library provides mathematical and physical constants as constexpr variables.

Mathematical Constants

Name Value

π

3.14159265…​

2.71828182…​

π_rad

π radians

SI Defining Constants

Name Description

c

Speed of light (299,792,458 m/s)

Planck constant

e

Elementary charge

k

Boltzmann constant

N_A

Avogadro constant

K_cd

Luminous efficacy

Derived Constants

Name Description

Reduced Planck constant

G

Gravitational constant

μ_0

Permeability of free space

ε_0

Permittivity of free space

R

Molar gas constant

F

Faraday constant

σ

Stefan-Boltzmann constant

g

Standard acceleration due to gravity (9.80665 m/s²)

m_e

Electron mass

m_p

Proton mass

Conformance

The units and fundamental constants are taken from:

"The International System of Units" 9th edition (2019).

Other physical constants are from:

Tiesinga, E., Mohr, P. J., Newell, D. B., & Taylor, B. N. (2021). CODATA recommended quantities of the fundamental physical constants: 2018. Reviews of Modern Physics, 93(2), 025010.

Any deviation from these documents shall be considered a bug.