Template:Module rating
Usage
{{#invoke:Physical constants|function_name}}
--[[
Data values are stored below. If inputting a new value, use the following format:
_name_ = {
["symbol"] = _symbol_
["val"] = _significand of value_
["un1"] = _standard uncertainty in significand of value_
["unc"] =(_standard uncertainty digits for compact form; blank if exact_)
["exp"] = _exponent of value_
["runc"] = _significand of relative standard uncertainty_
["rexp"] = _exponent of relative standard uncertainty_
["unit"] = _unit of constant_
["ref"] = _reference footnote_
},
Please note that all non-numerical values should be in quotations
--]]
local val = require('Module:Val')
local mm = require('Module:Math')
local constants = {
a0 = {
["symbol"] = "''a''<sub>0</sub>",
["val"] = 5.29177210903,
["un1"] = 0.00000000080,
["unc"] = "(80)",
["exp"] = -11,
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "m",
["ref"] = "<ref name=\"physconst-a0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0 |title=2018 CODATA Value: Bohr radius |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
alpha = {
["symbol"] = "''α''",
["val"] = 7.2973525693,
["un1"] = 0.0000000011,
["unc"] = "(11)",
["exp"] = -3,
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "",
["ref"] = "<ref name=\"physconst-alpha\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?alph |title=2018 CODATA Value: fine-structure constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
A90 = {
["symbol"] = "''A''<sub>90</sub>",
["val"] = 1.00000008887,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "A",
["ref"] = "<ref name=\"physconst-A90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?ampere90 |title=2018 CODATA Value: conventional value of ampere-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
atm = {
["symbol"] = "atm",
["val"] = 101325,
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "Pa",
["ref"] = "<ref name=\"physconst-atm\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?stdatm |title=2018 CODATA Value: standard atmosphere |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
bwien = {
["symbol"] = "''b''",
["val"] = 2.897771955,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -3,
["runc"] = 0,
["rexp"] = "",
["unit"] = "m⋅K",
["ref"] = "<ref name=\"physconst-bwien\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?bwien |title=2018 CODATA Value: Wien wavelength displacement law constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
["bwien'"] = {
["symbol"] = "''b''′",
["val"] = 5.878925757,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = 10,
["runc"] = 0,
["rexp"] = "",
["unit"] = "Hz⋅K<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-bwienf\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?bpwien |title=2018 CODATA Value: Wien frequency displacement law constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
c = {
["symbol"] = "''c''",
["val"] = 299792458,
["un1"] = "",
["unc"] = "",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "m/s",
["ref"] = "<ref name=\"physconst-c\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?c |title=2018 CODATA Value: speed of light in vacuum |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
c1 = {
["symbol"] = "''c''<sub>1</sub>",
["val"] = 3.741771852,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -16,
["runc"] = 0,
["rexp"] = "",
["unit"] = "W⋅m<sup>2</sup>",
["ref"] = "<ref name=\"physconst-c1\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?c11strc |title=2018 CODATA Value: first radiation constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
c1L = {
["symbol"] = "''c''<sub>1L</sub>",
["val"] = 1.191042972,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -16,
["runc"] = 0,
["rexp"] = "",
["unit"] = "W⋅m<sup>2</sup>⋅sr<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-c1L\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?c1l |title=2018 CODATA Value: first radiation constant for spectral radiance |month= |date=20 May 2019|work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
c2 = {
["symbol"] = "''c''<sub>2</sub>",
["val"] = 1.438776877,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -2,
["runc"] = 0,
["rexp"] = "",
["unit"] = "m⋅K",
["ref"] = "<ref name=\"physconst-c2\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?c22ndrc |title=2018 CODATA Value: second radiation constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
C90 = {
["symbol"] = "''C''<sub>90</sub>",
["val"] = 1.00000008887,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "C",
["ref"] = "<ref name=\"physconst-C90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?charge90 |title=2018 CODATA Value: conventional value of coulomb-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
DnuCs = {
["symbol"] = "Δ''ν''(<sup>133</sup>Cs)<sub>hfs</sub>",
["val"] = 9192631770,
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "Hz",
["ref"] = "<ref name=\"physconst-DnuCs\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?nucs |title=2018 CODATA Value: hyperfine transition frequency of Cs-133 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-08-18}}</ref>",
},
e = {
["symbol"] = "''e''",
["val"] = 1.602176634,
["un1"] = "",
["unc"] ="",
["exp"] = -19,
["runc"] = 0,
["rexp"] = "",
["unit"] = "C",
["ref"] = "<ref name=\"physconst-e\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?e |title=2018 CODATA Value: elementary charge |month= |date=20 May 2019| work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
Eh = {
["symbol"] = "''E''<sub>h</sub>",
["val"] = 4.3597447222071,
["un1"] = 0.0000000000085,
["unc"] = "(85)",
["exp"] = -18,
["runc"] = 1.9,
["rexp"] = -12,
["unit"] = "J",
["ref"] = "<ref name=\"physconst-Eh\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?hr |title=2018 CODATA Value: Hartree energy |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
EheV = {
["symbol"] = "''E''<sub>h</sub>",
["val"] = 27.211386245988,
["un1"] = 0.0000000000053,
["unc"] = "(53)",
["exp"] = "",
["runc"] = 1.9,
["rexp"] = -12,
["unit"] = "eV",
["ref"] = "<ref name=\"physconst-EheV\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?hrev |title=2018 CODATA Value: Hartree energy in eV |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-09-01}}</ref>",
},
eps0 = {
["symbol"] = "''ε''<sub>0</sub>",
["val"] = 8.8541878128,
["un1"] = 0.0000000013,
["unc"] = "(13)",
["exp"] = -12,
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "F⋅m<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-eps0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?ep0 |title=2018 CODATA Value: vacuum electric permittivity |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
eV = {
["symbol"] = "eV",
["val"] = 1.602176634,
["un1"] = "",
["unc"] ="",
["exp"] = -19,
["runc"] = 0,
["rexp"] = "",
["unit"] = "J",
["ref"] = "<ref name=\"physconst-eV\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?evj |title=2018 CODATA Value: electron volt |month= |date=20 May 2019|work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
["-e/me"] = {
["symbol"] = "−''e''/''m''<sub>e</sub>",
["val"] = -1.75882001076,
["un1"] = 0.00000000053,
["unc"] = "(53)",
["exp"] = 11,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "C⋅kg<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-e/me\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?esme |title=2018 CODATA Value: electron charge to mass quotient |month= |date=20 May 2019|work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-10-22}}</ref>",
},
F = {
["symbol"] = "''F''",
["val"] = 96485.33212,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "C⋅mol<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-F\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?f |title=2018 CODATA Value: Faraday constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
F90 = {
["symbol"] = "''F''<sub>90</sub>",
["val"] = 0.99999998220,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "F",
["ref"] = "<ref name=\"physconst-F90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?capacitance90 |title=2018 CODATA Value: conventional value of farad-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
G = {
["symbol"] = "''G''",
["val"] = 6.67430,
["un1"] = 0.00015,
["unc"] = "(15)",
["exp"] = -11,
["runc"] = 2.2,
["rexp"] = -5,
["unit"] = "m<sup>3</sup>⋅kg<sup>−1</sup>⋅s<sup>−2</sup>",
["ref"] = "<ref name=\"physconst-G\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?bg |title=2018 CODATA Value: Newtonian constant of gravitation |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
G0 = {
["symbol"] = "''G''<sub>0</sub>",
["val"] = 7.748091729,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -5,
["runc"] = 0,
["rexp"] = "",
["unit"] = "S",
["ref"] = "<ref name=\"physconst-G0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?conqu2e2sh |title=2018 CODATA Value: conductance quantum |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
g0 = {
["symbol"] = "''g''<sub>0</sub>",
["val"] = 9.80665,
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "m⋅s<sup>−2</sup>",
["ref"] = "<ref name=\"physconst-g0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?gn |title=2018 CODATA Value: standard acceleration of gravity |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
ge = {
["symbol"] = "''g''<sub>e<sup>−</sup></sub>",
["val"] = -2.00231930436256,
["un1"] = 0.00000000000035,
["unc"] = "(35)",
["exp"] = "",
["runc"] = 1.7,
["rexp"] = -13,
["unit"] = "",
["ref"] = "<ref name=\"physconst-ge\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?gem |title=2018 CODATA Value: electron g factor |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2020-03-13}}</ref>",
},
["GF/hbarc3"] = {
["symbol"] = "''G''<sub>F</sub>/''ħc''<sup>3</sup>",
["val"] = 1.1663787,
["un1"] = 0.0000006,
["unc"] = "(6)",
["exp"] = -5,
["runc"] = 5.1,
["rexp"] = -7,
["unit"] = "GeV<sup>−2</sup>",
["ref"] = "<ref name=\"physconst-GF\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?gf |title=2018 CODATA Value: Fermi coupling constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
gmu = {
["symbol"] = "''g''<sub>μ</sub>",
["val"] = -2.0023318418,
["un1"] = 0.0000000013,
["unc"] = "(13)",
["exp"] = "",
["runc"] = 6.3,
["rexp"] = -10,
["unit"] = "",
["ref"] = "<ref name=\"physconst-gmu\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?gmum |title=2018 CODATA Value: muon g factor |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
gp = {
["symbol"] = "''g''<sub>p</sub>",
["val"] = 5.5856946893,
["un1"] = 0.0000000016,
["unc"] = "(16)",
["exp"] = "",
["runc"] = 2.9,
["rexp"] = -10,
["unit"] = "",
["ref"] = "<ref name=\"physconst-gp\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?gp |title=2018 CODATA Value: proton g factor |month= |date=June 2015 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-03-08 }}</ref>",
},
h = {
["symbol"] = "''h''",
["val"] = 6.62607015,
["un1"] = "",
["unc"] ="",
["exp"] = -34,
["runc"] = 0,
["rexp"] = "",
["unit"] = "J⋅s",
["ref"] = "<ref name=\"physconst-h\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?h |title=2018 CODATA Value: Planck constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
H90 = {
["symbol"] = "''H''<sub>90</sub>",
["val"] = 1.00000001779,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "H",
["ref"] = "<ref name=\"physconst-H90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?inductance90 |title=2018 CODATA Value: conventional value of henry-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
hbar = {
["symbol"] = "''ħ''",
["val"] = 1.054571817,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -34,
["runc"] = 0,
["rexp"] = "",
["unit"] = "J⋅s",
["ref"] = "<ref name=\"physconst-hbar\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?hbar |title=2018 CODATA Value: reduced Planck constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-08-28}}</ref>",
},
["h/2me"] = {
["symbol"] = "''h''/2''m''<sub>e</sub>",
["val"] = 3.6369475516,
["un1"] = 0.0000000011,
["unc"] = "(11)",
["exp"] = -4,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "m<sup>2</sup>⋅s<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-h/2me\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?qucirchs2me |title=2018 CODATA Value: quantum of circulation |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
invalpha = {
["symbol"] = "1/''α''",
["val"] = 137.035999084,
["un1"] = 0.000000021,
["unc"] = "(21)",
["exp"] = "",
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "",
["ref"] = "<ref name=\"physconst-invalpha\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?alphinv |title=2018 CODATA Value: inverse fine-structure constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
invG0 = {
["symbol"] = "''G''<sub>0</sub><sup>−1</sup>",
["val"] = 12906.40372,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "Ω",
["ref"] = "<ref name=\"physconst-invG0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?invconqu |title=2018 CODATA Value: inverse of conductance quantum |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
k = {
["symbol"] = "''k''",
["val"] = 1.380649,
["un1"] = "",
["unc"] ="",
["exp"] = -23,
["runc"] = 0,
["rexp"] = "",
["unit"] = "J⋅K<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-k\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?k |title=2018 CODATA Value: Boltzmann constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
ke = {
["symbol"] = "''k''<sub>e</sub>",
["val"] = 8.9875517923,
["un1"] = 0.0000000014,
["unc"] = "(14)",
["exp"] = 9,
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "kg⋅m<sup>3</sup>⋅s<sup>−4</sup>⋅A<sup>−2</sup>",
["ref"] = "<ref name=\"physconst-ke\">Derived from ''k''<sub>e</sub> = 1/(4''πε''<sub>0</sub>) – {{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?ep0 |title=2018 CODATA Value: vacuum electric permittivity |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
KJ = {
["symbol"] = "''K''<sub>J</sub>",
["val"] = 483597.8484,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = 9,
["runc"] = 0,
["rexp"] = "",
["unit"] = "Hz⋅V<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-KJ\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?kjos |title=2018 CODATA Value: Josephson constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
KJ90 = {
["symbol"] = "''K''<sub>J-90</sub>",
["val"] = 483597.9,
["un1"] = "",
["unc"] ="",
["exp"] = 9,
["runc"] = 0,
["rexp"] = "",
["unit"] = "Hz⋅V<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-KJ90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?kj90 |title=2018 CODATA Value: conventional value of Josephson constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
lP = {
["symbol"] = "''l''<sub>P</sub>",
["val"] = 1.616255,
["un1"] = 0.000018,
["unc"] = "(18)",
["exp"] = -35,
["runc"] = 1.1,
["rexp"] = -5,
["unit"] = "m",
["ref"] = "<ref name=\"physconst-lP\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?plkl |title=2018 CODATA Value: Planck length |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
MC12 = {
["symbol"] = "''M''(<sup>12</sup>C)",
["val"] = 11.9999999958,
["un1"] = 0.0000000036,
["unc"] = "(36)",
["exp"] = -3,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "kg⋅mol<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-MC12\">{{cite web |url=https://physics.nist.gov/cgi-bin/cuu/Value?mm12c |title=2018 CODATA Value: molar mass of carbon-12 |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
me = {
["symbol"] = "''m''<sub>e</sub>",
["val"] = 9.1093837015,
["un1"] = 0.0000000028,
["unc"] = "(28)",
["exp"] = -31,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-me\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?me |title=2018 CODATA Value: electron mass |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
mmu = {
["symbol"] = "''m''<sub>μ</sub>",
["val"] = 1.883531627,
["un1"] = 0.000000042,
["unc"] = "(42)",
["exp"] = -28,
["runc"] = 2.2,
["rexp"] = -8,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-mmu\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mmu |title=2018 CODATA Value: muon mass |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
mn = {
["symbol"] = "''m''<sub>n</sub>",
["val"] = 1.67492749804,
["un1"] = 0.00000000095,
["unc"] = "(95)",
["exp"] = -27,
["runc"] = 5.7,
["rexp"] = -10,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-mn\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mn |title=2018 CODATA Value: neutron mass |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-08-23}}</ref>",
},
mnDa = {
["symbol"] = "''m''<sub>n</sub>",
["val"] = 1.00866491595,
["un1"] = 0.00000000049,
["unc"] = "(49)",
["exp"] = "",
["runc"] = 3.8,
["rexp"] = -10,
["unit"] = "Da",
["ref"] = "<ref name=\"physconst-mnDa\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mnu |title=2018 CODATA Value: neutron mass in u |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-08-23}}</ref>",
},
mP = {
["symbol"] = "''m''<sub>P</sub>",
["val"] = 2.176435,
["un1"] = 0.000024,
["unc"] = "(24)",
["exp"] = -8,
["runc"] = 1.1,
["rexp"] = -5,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-mP\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?plkm |title=2018 CODATA Value: Planck mass |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
mp = {
["symbol"] = "''m''<sub>p</sub>",
["val"] = 1.67262192369,
["un1"] = 0.00000000051,
["unc"] = "(51)",
["exp"] = -27,
["runc"] = 3.1,
["rexp"] = -10,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-mp\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mp |title=2018 CODATA Value: proton mass |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
mpome = {
["symbol"] = "''m''<sub>p</sub>/''m''<sub>e</sub>",
["val"] = 1836.15267343,
["un1"] = 0.00000011,
["unc"] = "(11)",
["exp"] = "",
["runc"] = 6.0,
["rexp"] = -11,
["unit"] = "",
["ref"] = "<ref name=\"physconst-mpome\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mpsme |title=2018 CODATA Value: proton-electron mass ratio |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
mtau = {
["symbol"] = "''m''<sub>τ</sub>",
["val"] = 3.16754,
["un1"] = 0.00021,
["unc"] = "(21)",
["exp"] = -27,
["runc"] = 6.8,
["rexp"] = -5,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-mtau\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mtau |title=2018 CODATA Value: tau mass |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
Mu = {
["symbol"] = "''M''<sub>u</sub>",
["val"] = 0.99999999965,
["un1"] = 0.00000000030,
["unc"] = "(30)",
["exp"] = -3,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "kg⋅mol<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-Mu\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mu |title=2018 CODATA Value: molar mass constant |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
mu = {
["symbol"] = "''m''<sub>u</sub>",
["val"] = 1.66053906660,
["un1"] = 0.00000000050,
["unc"] = "(50)",
["exp"] = -27,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "kg",
["ref"] = "<ref name=\"physconst-mu\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?u |title=2018 CODATA Value: atomic mass constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
muc2 = {
["symbol"] = "''m''<sub>u</sub>''c''<sup>2</sup>",
["val"] = 1.49241808560,
["un1"] = 0.00000000045,
["unc"] = "(45)",
["exp"] = -10,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "J",
["ref"] = "<ref name=\"physconst-muc2\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?uj |title=2018 CODATA Value: atomic mass constant energy equivalent |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-07-21}}</ref>",
},
mueV = {
["symbol"] = "''m''<sub>u</sub>''c''<sup>2</sup>",
["val"] = 931.49410242,
["un1"] = 0.0000000028,
["unc"] = "(28)",
["exp"] = "",
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "MeV",
["ref"] = "<ref name=\"physconst-muc2eV\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?muc2mev |title=2018 CODATA Value: atomic mass constant energy equivalent in MeV |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-07-21}}</ref>",
},
mu0 = {
["symbol"] = "''μ''<sub>0</sub>",
["val"] = 1.25663706212,
["un1"] = 0.00000000019,
["unc"] = "(19)",
["exp"] = -6,
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "N⋅A<sup>−2</sup>",
["ref"] = "<ref name=\"physconst-mu0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mu0 |title=2018 CODATA Value: vacuum magnetic permeability |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
muB = {
["symbol"] = "''μ''<sub>B</sub>",
["val"] = 9.2740100783,
["un1"] = 0.0000000028,
["unc"] = "(28)",
["exp"] = -24,
["runc"] = 3.0,
["rexp"] = -10,
["unit"] = "J⋅T<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-muB\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mub |title=2018 CODATA Value: Bohr magneton |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
muN = {
["symbol"] = "''μ''<sub>N</sub>",
["val"] = 5.0507837461,
["un1"] = 0.0000000015,
["unc"] = "(15)",
["exp"] = -27,
["runc"] = 3.1,
["rexp"] = -10,
["unit"] = "J⋅T<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-muN\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mun |title=2018 CODATA Value: nuclear magneton |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
["mW/mZ"] = {
["symbol"] = "''m''<sub>W</sub>/''m''<sub>Z</sub>",
["val"] = 0.88153,
["un1"] = 0.00017,
["unc"] = "(17)",
["exp"] = "",
["runc"] = 1.9,
["rexp"] = -4,
["unit"] = "",
["ref"] = "<ref name=\"physconst-mW/mZ\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?rmwmz |title=2018 CODATA Value: W to Z mass ratio |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-12-21}}</ref>",
},
NA = {
["symbol"] = "''N''<sub>A</sub>",
["val"] = 6.02214076,
["un1"] = "",
["unc"] ="",
["exp"] = 23,
["runc"] = 0,
["rexp"] = "",
["unit"] = "mol<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-NA\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?na |title=2018 CODATA Value: Avogadro constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
NAh = {
["symbol"] = "''N''<sub>A</sub>''h''",
["val"] = 3.990312712,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -10,
["runc"] = 0,
["rexp"] = "",
["unit"] = "J⋅Hz<sup>−1</sup>⋅mol<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-NAh\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?nah |title=2018 CODATA Value: molar Planck constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
ohm90 = {
["symbol"] = "''Ω''<sub>90</sub>",
["val"] = 1.00000001779,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "Ω",
["ref"] = "<ref name=\"physconst-ohm90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?ohm90 |title=2018 CODATA Value: conventional value of ohm-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
Phi0 = {
["symbol"] = "''Φ''<sub>0</sub>",
["val"] = 2.067833848,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -15,
["runc"] = 0,
["rexp"] = "",
["unit"] = "Wb",
["ref"] = "<ref name=\"physconst-Phi0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?flxquhs2e |title=2018 CODATA Value: magnetic flux quantum |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
R = {
["symbol"] = "''R''",
["val"] = 8.314462618,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "J⋅mol<sup>−1</sup>⋅K<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-R\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?r |title=2018 CODATA Value: molar gas constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
re = {
["symbol"] = "''r''<sub>e</sub>",
["val"] = 2.8179403262,
["un1"] = 0.0000000013,
["unc"] = "(13)",
["exp"] = -15,
["runc"] = 4.5,
["rexp"] = -10,
["unit"] = "m",
["ref"] = "<ref name=\"physconst-re\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?re |title=2018 CODATA Value: classical electron radius |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
Rinf = {
["symbol"] = "''R''<sub>∞</sub>",
["val"] = 10973731.568160,
["un1"] = 0.000021,
["unc"] = "(21)",
["exp"] = "",
["runc"] = 1.9,
["rexp"] = -12,
["unit"] = "m<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-Rinf\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?ryd |title=2018 CODATA Value: Rydberg constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
RK = {
["symbol"] = "''R''<sub>K</sub>",
["val"] = 25812.80745,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "Ω",
["ref"] = "<ref name=\"physconst-RK\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?rk |title=2018 CODATA Value: von Klitzing constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
RK90 = {
["symbol"] = "''R''<sub>K-90</sub>",
["val"] = 25812.807,
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "Ω",
["ref"] = "<ref name=\"physconst-RK90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?rk90 |title=2018 CODATA Value: conventional value of von Klitzing constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
sigma = {
["symbol"] = "''σ''",
["val"] = 5.670374419,
["un1"] = "",
["unc"] ="",
["end"] = "...",
["exp"] = -8,
["runc"] = 0,
["rexp"] = "",
["unit"] = "W⋅m<sup>−2</sup>⋅K<sup>−4</sup>",
["ref"] = "<ref name=\"physconst-sigma\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?sigma |title=2018 CODATA Value: Stefan–Boltzmann constant |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
sigmae = {
["symbol"] = "''σ''<sub>e</sub>",
["val"] = 6.6524587321,
["un1"] = 0.0000000060,
["unc"] = "(60)",
["exp"] = -29,
["runc"] = 9.1,
["rexp"] = -10,
["unit"] = "m<sup>2</sup>",
["ref"] = "<ref name=\"physconst-sigmae\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?sigmae |title=2018 CODATA Value: Thomson cross section |month= |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
TP = {
["symbol"] = "''T''<sub>P</sub>",
["val"] = 1.416785,
["un1"] = 0.000016,
["unc"] = "(16)",
["exp"] = 32,
["runc"] = 1.1,
["rexp"] = -5,
["unit"] = "K",
["ref"] = "<ref name=\"physconst-TP\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?plktmp |title=2018 CODATA Value: Planck temperature |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
tP = {
["symbol"] = "''t''<sub>P</sub>",
["val"] = 5.391247,
["un1"] = 0.000060,
["unc"] = "(60)",
["exp"] = -44,
["runc"] = 1.1,
["rexp"] = -5,
["unit"] = "s",
["ref"] = "<ref name=\"physconst-tP\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?plkt |title=2018 CODATA Value: Planck time |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-05-20}}</ref>",
},
V90 = {
["symbol"] = "''V''<sub>90</sub>",
["val"] = 1.00000010666,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "V",
["ref"] = "<ref name=\"physconst-V90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?volt90 |title=2018 CODATA Value: conventional value of volt-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
VmSi = {
["symbol"] = "''V''<sub>m</sub>(Si)",
["val"] = 1.205883199,
["un1"] = 0.000000060,
["unc"] = "(60)",
["exp"] = -5,
["runc"] = 4.9,
["rexp"] = -8,
["unit"] = "m<sup>3</sup>⋅mol<sup>−1</sup>",
["ref"] = "<ref name=\"physconst-VmSi\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?mvolsil |title=2018 CODATA Value: molar volume of silicon |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-23}}</ref>",
},
W90 = {
["symbol"] = "''W''<sub>90</sub>",
["val"] = 1.00000019553,
["end"] = "...",
["un1"] = "",
["unc"] ="",
["exp"] = "",
["runc"] = 0,
["rexp"] = "",
["unit"] = "W",
["ref"] = "<ref name=\"physconst-W90\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?power90 |title=2018 CODATA Value: conventional value of watt-90 |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-06-01}}</ref>",
},
Z0 = {
["symbol"] = "''Z''<sub>0</sub>",
["val"] = 376.730313668,
["un1"] = 0.000000057,
["unc"] = "(57)",
["exp"] = "",
["runc"] = 1.5,
["rexp"] = -10,
["unit"] = "Ω",
["ref"] = "<ref name=\"physconst-Z0\">{{cite web |url=http://physics.nist.gov/cgi-bin/cuu/Value?z0 |title=2018 CODATA Value: characteristic impedance of vacuum |date=20 May 2019 |work=The NIST Reference on Constants, Units, and Uncertainty |publisher=[[National Institute of Standards and Technology|NIST]] |accessdate=2019-10-31}}</ref>",
},
}
local function stripToNil(text)
-- If text is a string, return its trimmed content, or nil if empty.
-- Otherwise return text (which may, for example, be nil).
if type(text) == 'string' then
text = text:match('(%S.-)%s*$')
end
return text
end
local function physconst(args)
local constantIn = stripToNil(args[1]) or error("No parameter given.")
local constantVals = constants(constantIn)
local symbolIn = stripToNil(args.symbol)
local roundIn = stripToNil(args.round)
local unitIn = stripToNil(args.unit)
local refIn = stripToNil(args.ref)
local afterIn = stripToNil(args.after)
local runcIn = stripToNil(args.runc)
local outputText = ""
--Values to be passed to Module:Val
local values = {}
local unit_spec = {}
local options = {}
-- If ref=only, return only ref
if refIn == "only" then
return constantVals.ref
end
-- relative uncertainty (runc)
if runcIn == "yes" then
-- Symbol
if symbolIn == "yes" then
outputText = outputText .. "''u''<sub>r</sub>(" .. constantVals.symbol .. ") = "
end
-- Append value
values.number.value = constantVals.runc
unit_spec.u = constantVals.unit
options.e = constantVals.rexp
outputText = outputText .. val._main(values, unit_spec, options)
-- Full value, with or without options
else
-- Symbol
if symbolIn == "yes" then
outputText = outputText .. constantVals.symbol
if roundIn ~= "" then
outputText = outputText .. " ≈ "
else
outputText = outputText .. " = "
end
end
-- Value
--- Rounding
if roundIn ~= "" then
values.number.value = mm._round(constantVals.val, roundIn)
else
values.number.value = constantVals.val
end
unit_spec.u = constantVals.unit
options.e = constantVals["exp"]
values.number.nend = constantVals["end"]
outputText = outputText .. val._main(values, unit_spec, options)
end
-- Append anything between text and ref
outputText = outputText .. afterIn
-- Add ref if desired
if refIn ~= "no" then
outputText = outputText .. constantVals.ref
end
return outputText
end
local function main(frame)
return physconst(frame.args)
end