Skip to content

Commit

Permalink
Add comparison with other calculators/languages
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkdp authored and David Peter committed Sep 29, 2024
1 parent b2410ca commit 9c94957
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
6 changes: 5 additions & 1 deletion book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
- [XKCD 687](./example-xkcd_687.md)
- [XKCD 2585](./example-xkcd_2585.md)
- [XKCD 2812](./example-xkcd_2812.md)
- [IDE / editor integration](./editor-integration.md)

# Numbat language reference

Expand Down Expand Up @@ -69,6 +68,11 @@

- [Type system](./type-system.md)

# Other topics

- [IDE / editor integration](./editor-integration.md)
- [Comparison with other tools](./comparison.md)

# Support

- [Contact us](./contact-us.md)
50 changes: 50 additions & 0 deletions book/src/comparison.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Comparison with other tools

The following table provides a comparison of Numbat with other scientific calculators and programming languages. This comparison
is certainly *not* objective, as we only list criteria that we consider important. If you think that a tool or language is missing
or misrepresented, please [let us know](https://github.com/sharkdp/numbat/issues).

| | Numbat | [Qalculate](https://qalculate.github.io/) | [Kalker](https://github.com/PaddiM8/kalker) | [GNU Units](https://www.gnu.org/software/units/) | [Frink](https://frinklang.org/) | [Wolfram Alpha](https://www.wolframalpha.com/) |
|----------------------------------------|-----------------|-----------|--------|-----------|-------|---------------|
| FOSS License | MIT, Apache-2.0 | GPL-2.0 | MIT | GPL-3.0 |||
| **Interfaces** | | | | | | |
| Command-line |||||||
| Web version |||||||
| Graphical ||||| (✓) ||
| **Units** | | | | | | |
| Comprehensive list of units |||||||
| Custom units |||||||
| Physical dimensions |||||||
| Currency conversions |||||||
| Date and time calculations |||||||
| **Language features** | | | | | | |
| Custom functions |||||||
| Real programming language |||||| ? |
| Strongly typed |||||||
| **Calculator features** | | | | | | |
| Symbolic calculations || (✓) ||| (✓) ||
| Hex/Oct/Bin mode |||||||
| Complex numbers | ❌ ([#180](https://github.com/sharkdp/numbat/issues/180)) ||||||
| Vectors, Matrices |||||||

## Detailed comparison

- [Qalculate](https://qalculate.github.io/) is a fantastic calculator with a strong support for units and conversions.
If you don't need the full power of a programming language, Qalculate is probably more feature-complete than Numbat.
- [Frink](https://frinklang.org/) is a special-purpose programming language with a focus on scientific calculations
and units of measurement. The language is probably more powerful than Numbat, but lacks a static type system. It's also
a imperative/OOP language, while Numbat is a functional/declarative language. Frink is not open-source.
- [GNU Units](https://www.gnu.org/software/units/) is probably the most comprehensive tool in terms of pre-defined units.
Numbat makes it very easy to define [custom units](./unit-definitions.md). If you think that a unit should be part
of the standard library, please [let us know](https://github.com/sharkdp/numbat/issues).
- [Wolfram Alpha](https://www.wolframalpha.com/) is a very powerful tool, but it's focused on single-line queries instead
of longer computations. The query language lacks a strict syntax (which some might consider a feature). The tool is not
open source and sometimes has limitations with respect to the number/size of queries you can make.

## Other interesting tools / languages

- [F#](https://fsharp.org/) is the only programming language that we know of that comes close in terms of having an
expressive type system that is based on units of measure. In fact, Numbats type system is heavily inspired by F#,
except that it uses physical dimensions instead of physical units on the type level. Both languages have feature
full [type inference](./function-definitions.md#type-inference). F# is not listed above, as it's not really suitable
as a scientific calculator.

0 comments on commit 9c94957

Please sign in to comment.