An infinite-precision calculator and function library for Miranda
At least two other arbitrary-precision calculating systems are included in "standard" Unix: bc and perl both of which make you specify the required precision of the result in advance, and both of which make you wait for the whole calculation to complete before they will tell you any digits of the result.
For example, to calculate 200 decimal places of "pi" as four times the arctangent of one:
$ bc -l scale=200 4 * a(1)Authors:
To calculate the square root of two to 2000 decimal places, you can say:
$ perl -Mbignum=p,-2000 -le 'print sqrt 2'An interesting sister package by the same author is bigrat, which works in, and gives its results as, vulgar fractions. For example:
$ perl -Mbigrat -le 'print 1/3 + 1/4' 7/12This nicely solves the "sum of three thirds" problem for which bc and perl -Mbignum give .999999999... and which just gives bignum/bigfloat a terminal headache.
Author: Tels, http://bloodgate.com, early 2002.