#calculator #cli #conversion #tool

app fend

Arbitrary-precision unit-aware calculator

52 releases (23 stable)

1.4.2 Jan 23, 2024
1.4.0 Dec 27, 2023
1.3.2 Nov 11, 2023
1.2.0 Jun 2, 2023
0.1.11 Nov 27, 2020

#16 in Math

Download history 54/week @ 2023-11-01 106/week @ 2023-11-08 47/week @ 2023-11-15 73/week @ 2023-11-22 214/week @ 2023-11-29 156/week @ 2023-12-06 83/week @ 2023-12-13 72/week @ 2023-12-20 156/week @ 2023-12-27 172/week @ 2024-01-03 37/week @ 2024-01-10 97/week @ 2024-01-17 192/week @ 2024-01-24 182/week @ 2024-01-31 38/week @ 2024-02-07 404/week @ 2024-02-14

883 downloads per month

GPL-3.0-or-later

405KB
13K SLoC

fend

build codecov crates.io downloads

fend is an arbitrary-precision unit-aware calculator.

Unique features:

  • Arbitrary-precision arithmetic using rational numbers
  • Full support for complex numbers
  • D&D-style dice rolls
  • Variables
  • Binary, octal, hexadecimal and all other bases between 2 and 36
  • Keep track of units, with support for SI, US and UK customary and many historical units
  • Emacs-style CLI shortcuts
  • Trigonometric functions
  • Lambda calculus

See the manual for more information.

Web Interface

fend is available on the web at printfn.github.io/fend.

Installation

The easiest way to install fend locally is via your package manager:

Package Manager Command
Homebrew brew install fend
MacPorts sudo port install fend
AUR (Arch Linux) yay -Syu aur/fend-bin
AOSC OS oma install fend
Xbps (Void Linux) xbps-install fend
Nix nix-env -iA nixpkgs.fend
Cargo cargo install fend
Windows Package Manager winget install fend
Chocolatey choco install fend
Scoop scoop install fend
Pkgx pkgx fend

Alternatively, you can manually download the latest stable binaries here.

Once fend is installed, run fend to start a REPL session:

$ fend
> 1 ft to cm
30.48 cm
>

Packages

Manual

You can find the fend manual here.

Examples

> 5'10" to cm
177.8 cm
> cos (pi/4) + i * (sin (pi/4))
approx. 0.7071067811 + 0.7071067811i
> 0b1001 + 3
0b1100
> 0xffff to decimal
65535
> 100 C to F
210 °F
> temperature = 30 °C
30 °C
> temperature to °F
86 °F
> roll d20
8
> roll 4d6
17

Projects using fend

These are some projects making use of fend:

Feel free to make a pull request to add your own!

License

fend is licensed under the GPL 3.0 (or later). See LICENSE.md for more information.

Dependencies

~7–22MB
~325K SLoC