Mathematical Constants
| pi # circle constant |
3.1415927 |
| e # Euler's number |
2.7182818 |
| phi # golden ratio |
1.6180340 |
| gamma # Euler-Mascheroni constant |
0.57721566 |
| zeta3 # Apéry's constant = ζ(3) |
1.2020569 |
Source: Wikipedia article
List of mathematical constants
.
Physical Constants
| c # speed of light in vacuum |
2.9979246e8 m/s |
| g # standard gravity |
9.80665 m/s2 |
| G # Newtonian constant of gravity |
6.6743e-11 m3/(kg*s2) |
| R # molar gas constant |
8.3144626 J/(mol*K) |
| N_A # Avogadro constant |
6.0221408e23 1/mol |
| k_B # Boltzmann constant |
1.380649e-23 J/K |
| h # Planck constant |
6.6260702e-34 J*s |
| h_bar # reduced Planck constant (ħ = h / 2π) |
1.0545718e-34 J*s |
| eps0 # vacuum permittivity (electric constant) |
8.8541878e-12 F/m |
| mu0 # vacuum permeability (magnetic constant) |
1.2566371e-6 N/A2 |
| Q_e # elementary charge |
1.6021766e-19 C |
| m_e # electron mass |
9.1093837e-31 kg |
| m_p # proton mass |
1.6726219e-27 kg |
| m_n # neutron mass |
1.6749275e-27 kg |
| alpha # fine-structure constant |
0.0072973526 |
| Ry # Rydberg constant (energy form) |
2.1798724e-18 J |
| sigma # Stefan-Boltzmann constant |
5.6703744e-8 W/(m2*K4) |
| b_wien # Wien's displacement constant |
0.0028977720 m*K |
Source: Wikipedia article
List of physical constants
.
Backup
If you assign a new value to a predefined constant, the original value
remains available through a backup variable prefixed with an underscore
(_pi, _c, ...).
| g = 9.81 m/s^2 # if you prefer this value |
9.81 m/s2 |
| _g # there is a
backup
|
9.80665 m/s2 |
Modifying and Restoring
| Constants are normal variables. |
|
| You may assign new values: |
|
| pi = 3 |
3 |
| (5 m)^2*pi |
75 m2 |
| |
|
| All constants have a backup starting with '_': |
|
| _pi |
3.1415927 |
| (5 m)^2*_pi |
78.539816 m2 |
| |
|
| Restore: |
|
| pi = _pi |
3.1415927 |