Favicon of numbat

numbat

Statically typed scientific computing language with physical dimensions as types, comprehensive unit conversion, and interactive REPL for accurate calculations.

Numbat is a statically typed programming language designed specifically for scientific computations with first-class support for physical dimensions and units. It combines the rigor of a strongly-typed language with the flexibility needed for real-world scientific work.

Key capabilities include:

  • Physical dimensions as types: Enforce correctness at compile time with a static type system where dimensions like Length and Time act as types, with optional type annotations and automatic inference
  • First-class units: Enter units in multiple formats (km/h, kilometer/hour, m², m^2) and convert between compatible units using the -> operator (30 km/h -> mph, 5 in + 2 ft -> cm)
  • Comprehensive standard library: Includes SI, US Customary, Imperial, Nautical, Astronomical, and Atomic units, plus mathematical and physical constants
  • Interactive REPL: Features command history, Ctrl-R search, and tab completion for quick one-off calculations
  • Strict syntax and excellent error messages: Descriptive feedback helps catch mistakes immediately
  • Modular and customizable: The entire unit system is written in Numbat itself, making it easily extensible with custom units and definitions
  • Runtime assertions: Verify exact or approximate equality with assert_eq for validation during calculations

Whether you're performing dimensional analysis, unit conversions, or complex scientific calculations, Numbat ensures your results are physically correct while remaining accessible through its intuitive interactive interface.

Install

Cargo
$ cargo install -f

Features

Scriptable

Media

Pros

4
  • Statically typed language for scientific computations
  • First-class support for physical dimensions and units
  • Interactive REPL with readline interface
  • Comprehensive standard library with physical units and constants

Cons

2
  • Not a computer algebra system for differential equations or integrals
  • No graphical user interface

Share:

Auto-fetched .

Recent releases

Similar to numbat

Favicon

 

  
 
Favicon

 

  
 
Favicon