multi precision arithmetic
Marc Ernst Eddy van Woerkom
Tue Apr 15 13:33:24 CEST 2003
I have a task which involves writing a small arithmetics lib
(+ - * / < = >) that should be able to calculate exact results
for a given number of digits behind the radix point and is
able to handle digits from different (integer) bases.
Correctness is more important than speed or efficient memory
To my big surprise I found no existing lib or package so far
that meets these requirements. (See references for what I looked
at) In some cases I was not really sure, because I had trouble
to understand the available docs.
The existing software has a strong bias on efficiency or
efficent memory usage (to handle as large numbers as possible).
Most applications seem to be from cryptology or algorithmic
Another surprise was to find such software included in the web
scripting language PHP, obviously I paid no close attention to
the term "base64 encoding" :)
One of systems I had a quick look at was Erlang, because
of the example of calculation n! with obvious more than
standard precision in the introduction.
tell me that what I look for is a bignum.
Where can I find some docs on what is implemented in the
present Erlang/OTP releases?
Knuth, Vol. 2, Kapitel 4
More information about the erlang-questions