README
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-constant
andG
.Speed of light as
speed-of-light-vacuum
andc
. It works also as a suffix for expressing speeds, as in3c
for 3 times the speed of light.Planck constant and reduced constant in J/s as
plancks-h
orā
andplancks-reduced-h
orā
.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-constant
orK0
.Mass of an electron as
electron-mass
.Electron volt as
electron-volt
andeV
or as an operator.Elementary charge as
elementary-charge
orq
.Faraday constant as
faraday-constant
orF
.The fine structure constant as
fine-structure-constant
orĪ±
.Gas constant as
gas-constant
.Avogadro's constant as
avogadro-constant
orL
.Vacuum magnetic permeability as
magnetic-permeability
orĪ¼0
.Mass of a neutron as
neutron-mass
.Planck length as
planck-length
orlp
.Planck mass as
planck-mass
ormp
.Planck temperature as
planck-temperature
orTp
.Planck time as
planck-time
ortp
.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-gravity
org
.Vacuum electrical permittivity as
vacuum-permittivity
orĪµ0
.
Mathematical constants
Golden ratio as
phi
orĻ
.Feigenbaum constants as
alpha-feigenbaum-constant
anddelta-feigenbaum-constant
orĪ“
.ApƩry's constant as
apery-constant
.Conway's constant as
conway-constant
andĪ»
.Khinchin's constant as
khinchin-constant
andk0
.GlaisherāKinkelin constant as
glaisher-kinkelin-constant
andA
.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-gamma
andĪ³
.SierpiÅski's constant as
sierpinski-gamma
andk
.
Units
"Units" can be used as suffix; the number will be multiplied by its value
eV
, or electron-volts;1.3eV
is 1.3 divided by theeV
constant 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.