Authors: | Dmitry Levkov |

Peter Tinyakov | |

Fedor Bezrukov |

## Calculator for dimensional quantities

## Description

The calculator expresses **dimensionful** quantity X in desired
units.

Write expression for X in the **upper** field of the calculator
and desired
units in the **lower** field. Press the button "**Compute**" and
obtain the result in the form

**X = ** number
[units]^{ power},

where "number" and "power" are computed by the calculator;
"units" are taken from the lower field.

In the fields of the calculator one uses:

- - arithmetic operations
**+**,**-**,*****,**/**; - - power-raising operation
**x**;^{y}= x**y - - brackets
**()**; - - simple functions
**sqrt()**,**exp()**,**log()**,**sin()**,**cos()**,**asin()**,**sinh()**,**cosh()**; - - units listed in the right column.

**Importantly**, the physical quantities
are represented as numbers multiplied by units. For example, energy 2 GeV
is written as "2.0*GeV". Also, one should always explicitly write the
fractional part of a number: use "1.0" for "1", "2.0" for "2", etc.

**Example 1.** To express the quantity
\( \sqrt{2\mbox{J}\cdot 3\mbox{К}}\)
in GigaElectronVolts, write "(2.0*J*3.0*K)**0.5"
in the upper field and "GeV" in the lower field. Press
"**Compute**".

**Example 2.** To compute dimensionless quantities,
one uses "1" in the lower field. In particular,
quantity \(\mbox{cm}/\mbox{s}\) is expressed in universal units
by writing "cm/s" and "1" in the upper and
lower fields, respectively.

**Warning.** The calculator cannot express the quantity with
nontrivial dimension in the system \(\hbar = c = k_B = 1\) into
dimensionless units and vise versa. Also, the arguments of functions
exp(), log(), sin(), etc., should be dimensionless, otherwise the
calculation does not make any sense. In all cases explicitly write
the fractional part of a number: "5.0" or "5.0e+01" instead of "5".