spigot: an exact real calculator
spigot is a calculating program. It supports the usual arithmetic operations, square and cube roots, trigonometric and exponential functions, and a few other special functions such as erf.
Sat Dec 31 22:24:04 2016 - permalink -
spigot differs from the average calculating program in that it is an exact real calculator. This means that it does not suffer from rounding errors; in principle, it can keep generating more and more digits of the number you asked for until it runs out of memory.
In particular, if you ask for a complex expression such as sin(sqrt(pi)), then most calculating systems would compute first pi, then sqrt(pi) and finally sin(sqrt(pi)), accumulating a rounding error at each step, so that the final result had a build-up of error and you would have to do some additional error analysis to decide how much of the output you could trust.
spigot, on the other hand, does not output any digit until it is sure that digit is correct, so if you ask for (say) 100 digits of sin(sqrt(pi)) then you can be sure they are the right 100 digits.