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-constantand- G.
- Speed of light as - speed-of-light-vacuumand- c. It works also as a suffix for expressing speeds, as in- 3cfor 3 times the speed of light.
- Planck constant and reduced constant in J/s as - plancks-hor- āand- plancks-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-constantor- K0.
- Mass of an electron as - electron-mass.
- Electron volt as - electron-voltand- eVor as an operator.
- Elementary charge as - elementary-chargeor- q.
- Faraday constant as - faraday-constantor- F.
- The fine structure constant as - fine-structure-constantor- α.
- Gas constant as - gas-constant.
- Avogadro's constant as - avogadro-constantor- L.
- Vacuum magnetic permeability as - magnetic-permeabilityor- μ0.
- Mass of a neutron as - neutron-mass.
- Planck length as - planck-lengthor- lp.
- Planck mass as - planck-massor- mp.
- Planck temperature as - planck-temperatureor- Tp.
- Planck time as - planck-timeor- tp.
- 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-gravityor- g.
- Vacuum electrical permittivity as - vacuum-permittivityor- ε0.
Mathematical constants
- Golden ratio as - phior- Ļ.
- Feigenbaum constants as - alpha-feigenbaum-constantand- delta-feigenbaum-constantor- Ī“.
- ApƩry's constant as - apery-constant.
- Conway's constant as - conway-constantand- Ī».
- Khinchin's constant as - khinchin-constantand- k0.
- GlaisherāKinkelin constant as - glaisher-kinkelin-constantand- A.
- 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-gammaand- k.
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 the- eVconstant 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.