spigot – command-line exact real calculator

spigot is a command-line streaming exact real calculator.

A normal calculating program, given a mathematical expression to evaluate, will want to know in advance how many digits of output are needed (if it even has that option), and if the expression includes more than one successive operation, then rounding errors will build up so that the last few digits are potentially wrong, or perhaps more in some cases (e.g. if significance loss occurs).

spigot, by contrast, does not output any digit of the answer until it’s sure that the digit is right, and it will keep generating digits until you tell it to stop.

Also, spigot is ‘streaming’ in the sense that if you tell it to do computations on a number you’ve previously stored in a file (perhaps to very high precision) or a number it’s reading from a pipe, then it will begin producing output as soon as it’s read enough of the input to know how the output starts.

The downside is that spigot is very slow compared to the usual kind of computer arithmetic. But it can be useful if you really need a lot of digits for some reason (e.g. a large number of digits of mathematical constants are sometimes incorporated into cryptographic algorithms), or as a cross-check on other calculating systems.

Website: www.chiark.greenend.org.uk/~sgtatham/spigot
Support:
Developer: Simon Tatham
License: MIT License

Help for spigot

spigot is written in C++. Learn C++ with our recommended free books and free tutorials.


Related Software

Terminal-Based Calculators
GeniusDesktop calculator, an educational tool in mathematics, and for research
NumbatHigh precision scientific calculator supporting physical units
kalkerCalculator with math syntax
calcC-style arbitrary precision calculator
concalcParser-algorithm of extcalc
wcalcUses intuitive expressions and implicit multiplication
pcalcTerminal calculator made for programmers
bcalStorage expression calculator
numrText calculator for natural language expressions
kalcComplex numbers, 2d/3d graphing, arbitrary precision calculator
clacStack-based calculator with postfix notation
CalcPyCalculator and advanced math solver using Python, IPython and SymPy
fortbitePowerful mathematical calculator leveraging Fortran’s strengt
abacusSimple interactive calculator CLI
DaisyGeneral-purpose TUI scientific calculator
QuichJust an advanced terminal calculator
orpiecurses-based RPN calculator
SquiidAdvanced calculator supporting both RPN and algebraic input
mucalcConvenient calculator for the command line
HIP35HP-35 RPN calculator emulator
cscAll calculations are done using 64 bit binary floating point arithmetic
RCalcReverse Polish Notation calculator
ecRPN calculator with array operations and quotations
coriolinus-calcCLI calculator app and library
spigotStreaming exact real calculator

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments