# Builtin Constants

Builtin constants are predefined identifiers available in all expressions. They cannot be redefined. The names match the constants defined in the Verilog-A `constants.vams` header.

## Mathematical constants

| Constant | Value | Description |
|----------|-------|-------------|
| `M_E` | $e$ | Euler's number, $e = \exp(1)$ |
| `M_LOG2E` | $\log_2 e$ | Base-2 logarithm of $e$ |
| `M_LOG10E` | $\log_{10} e$ | Base-10 logarithm of $e$ |
| `M_LN2` | $\ln 2$ | Natural logarithm of 2 |
| `M_LN10` | $\ln 10$ | Natural logarithm of 10 |
| `M_PI` | $\pi$ | Pi |
| `M_TWO_PI` | $2\pi$ | Two times pi |
| `M_PI_2` | $\pi/2$ | Pi over 2 |
| `M_PI_4` | $\pi/4$ | Pi over 4 |
| `M_1_PI` | $1/\pi$ | Reciprocal of pi |
| `M_2_PI` | $2/\pi$ | Two over pi |
| `M_2_SQRTPI` | $2/\sqrt{\pi}$ | Two over square root of pi |
| `M_SQRT2` | $\sqrt{2}$ | Square root of 2 |
| `M_SQRT1_2` | $1/\sqrt{2}$ | Reciprocal of square root of 2 |
| `M_DEGPERRAD` | $180/\pi$ | Degrees per radian |

## Physical constants

| Constant | Value | Unit | Description |
|----------|-------|------|-------------|
| `P_Q` | $1.6021918 \times 10^{-19}$ | C | Elementary charge |
| `P_C` | $2.997924562 \times 10^{8}$ | m/s | Speed of light in vacuum |
| `P_K` | $1.3806226 \times 10^{-23}$ | J/K | Boltzmann's constant |
| `P_H` | $6.6260755 \times 10^{-34}$ | J·s | Planck's constant |
| `P_EPS0` | $8.854187924 \times 10^{-12}$ | F/m | Permittivity of vacuum |
| `P_U0` | $4\pi \times 10^{-7}$ | H/m | Permeability of vacuum |
| `P_CELSIUS0` | $273.15$ | K | Zero Celsius in Kelvin |

## Constant names are reserved

Note that you cannot create a variable or a parameter that would have the same name as a constant and by that shadow it. 
