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

spigot is written in C++. Learn C++ with our recommended free books and free tutorials.
Related Software
| Terminal-Based Calculators | |
|---|---|
| Genius | Desktop calculator, an educational tool in mathematics, and for research |
| Numbat | High precision scientific calculator supporting physical units |
| kalker | Calculator with math syntax |
| qalc | Symbolic maths, arbitrary precision and unit conversion |
| calc | C-style arbitrary precision calculator |
| concalc | Parser-algorithm of extcalc |
| wcalc | Uses intuitive expressions and implicit multiplication |
| pcalc | Terminal calculator made for programmers |
| bcal | Storage expression calculator |
| numr | Text calculator for natural language expressions |
| kalc | Complex numbers, 2d/3d graphing, arbitrary precision calculator |
| clac | Stack-based calculator with postfix notation |
| CalcPy | Calculator and advanced math solver using Python, IPython and SymPy |
| fortbite | Powerful mathematical calculator leveraging Fortran’s strengt |
| abacus | Simple interactive calculator CLI |
| Daisy | General-purpose TUI scientific calculator |
| Quich | Just an advanced terminal calculator |
| orpie | curses-based RPN calculator |
| val | Arbitrary-precision language with variables, functions and complex numbers |
| Squiid | Advanced calculator supporting both RPN and algebraic input |
| mucalc | Convenient calculator for the command line |
| HIP35 | HP-35 RPN calculator emulator |
| csc | Scientific maths using 64-bit floating-point arithmetic |
| RCalc | Reverse Polish Notation calculator |
| ec | RPN calculator with array operations and quotations |
| coriolinus-calc | CLI calculator app and library |
| spigot | Streaming exact real calculator |
| Rink | Provides unit conversions, arbitrary precision and dimensional analysis |
Read our verdict in the software roundup.
Explore our carefully curated directory of recommended free and open source software, covering every major software category.The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more. Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form. |


Please read our Comment Policy before commenting.