Math::Constants - A few constants defined in Perl6
#!/usr/bin/env perl6
use v6;
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;
Math::Constants is a collection of Math and Physics constants that will save you the trouble of defining them.
- Gravitational constant as
G
. - Speed of light as
c
. 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ℏ
. - Golden ratio as
phi
or φ. - Several electronic constants: α and the elementary charge and vacuum permittivity.
Please post them in GitHub. Pull requests are also welcome.
JJ Merelo [email protected]
Copyright 2016 JJ Merelo
This library is free software; you can redistribute it and/or modify it under the GPL 3.0.