Skip to content

Numbat

Numbat is a statically typed programming language for scientific computations with first class support for physical dimensions and units.

You can use it for simple mathematical computations:

>>> 1920 / 16 * 9

    = 1080

>>> 2^32

    = 4_294_967_296

>>> sqrt(1.4^2 + 1.5^2) * cos(pi / 3)^2

    = 0.512957

The real strength of Numbat, however, is to perform calculations with physical units:

>>> 110 km / (1 day + 3 hours)

    = 4.07407 km/h    [Velocity]

>>> 140 € -> GBP

    = 120.768 £    [Money]

>>> atan2(30 cm, 1 m) -> deg

    = 16.6992°

>>> let ω = 2π c / 660 nm
>>> ℏ ω -> eV

    = 1.87855 eV    [Energy]

Read the tutorial to learn more about the language or look at some example programs. You can also jump directly to the