资 源 简 介
NOTE: newer Haskell algorithms together with details of their implementation as PDF files are now available.
This Scala package tests out ideas about a tree-based number representation that can host gigantic numbers, for instance "towers of exponents" and sparse combinations of them, in a compressed form, while being able to perform arithmetic operations on them, efficiently.
It also provides compact representation for numbers in their close neighborhood like Mersenne and Fermat numbers as well as numbers derived from them like the "perfect numbers", equal to the sum of their proper divisors.
For instance, the largest known prime number (at the end of year 2012), the Mersenne prime
2^43112609 − 1
is represented as a small tree, in contrast with the millions of digits needed by its conventional representation.
Towards this end, we are using a "run-length" compressed bijective base-2 representation for bot