Math::Constants
Math::Constants
Math::Constants - A few constants defined in Raku
SYNOPSIS
#!/usr/bin/env raku
use Math::Constants;
say "We have ", phi, " ", plancks-h, " ", plancks-reduced-h, " ",
c, " ", G, " and ", fine-structure-constant, " plus ",
elementary-charge, " and ", vacuum-permittivity ;
say "And also Ļ ", Ļ, " α ", α, " ā ", ā, " and ā ", ā,
" with e ", e, " and ε0 ", ε0;
say "We are flying at speed ", .1c;DESCRIPTION
Math::Constants is a collection of Math and Physics constants that will save you the trouble of defining them.
Constants included
Physical constants
All the physical constants have the CODATA 2018 recommended values. These reflect the new definitions of the kilogram and ampere as of 2019-05-20.
Gravitational constant as
gravitation-constantandG.Speed of light as
speed-of-light-vacuumandc. It works also as a suffix for expressing speeds, as in3cfor 3 times the speed of light.Planck constant and reduced constant in J/s as
plancks-horāandplancks-reduced-horā.Boltzmann constant as
boltzmann-constant. Previous versions of Math::Constants had this in eV. The value is now in standard SI units. The eV postfix operator can be used to get the previous value if needed.Coulomb constant as
coulomb-constantorK0.Mass of an electron as
electron-mass.Electron volt as
electron-voltandeVor as an operator.Elementary charge as
elementary-chargeorq.Faraday constant as
faraday-constantorF.The fine structure constant as
fine-structure-constantorα.Gas constant as
gas-constant.Avogadro's constant as
avogadro-constantorL.Vacuum magnetic permeability as
magnetic-permeabilityorμ0.Mass of a neutron as
neutron-mass.Planck length as
planck-lengthorlp.Planck mass as
planck-massormp.Planck temperature as
planck-temperatureorTp.Planck time as
planck-timeortp.Mass of a proton as
proton-mass.The quantum ratio (elementary charge / Planck constant) as
quantum-ratio.Standard acceleration due to gravity as
standard-acceleration-gravityorg.Vacuum electrical permittivity as
vacuum-permittivityorε0.
Mathematical constants
Golden ratio as
phiorĻ.Feigenbaum constants as
alpha-feigenbaum-constantanddelta-feigenbaum-constantorΓ.Apéry's constant as
apery-constant.Conway's constant as
conway-constantandĪ».Khinchin's constant as
khinchin-constantandk0.GlaisherāKinkelin constant as
glaisher-kinkelin-constantandA.GolombāDickman constant as
golomb-dickman-constant.Catalan's constant as
catalan-constant.Mill's constant as
mill-constant.Gauss's constant as
gauss-constant.EulerāMascheroni constant as
euler-mascheroni-gammaandγ.SierpiÅski's constant as
sierpinski-gammaandk.
Units
"Units" can be used as suffix; the number will be multiplied by its value
eV, or electron-volts;1.3eVis 1.3 divided by theeVconstant value.c, speed of light.g, gravitational constant.
Issues and suggestions
Please post them in GitHub. Pull requests are also welcome.
AUTHOR
JJ Merelo [email protected]
Kevin Pye [email protected]
COPYRIGHT AND LICENSE
Copyright 2016-2022 JJ Merelo
Copyright 2019 Kevin Pye
This library is free software; you can redistribute it and/or modify it under the GPL 3.0.