A new approach to infinite precision integer arithmetic
暂无分享,去创建一个
A new algorithm for integer Greatest Common Divisor calculations has recently been proposed. Although the algorithm can be applied to integers in any base b > 2, it is conjectured to be optimal for b=30, when embedded in a system for symbol manipulation. Representation of the digits in factored form further facilitates the GCD procedure. When choosing the set of residues mod 30 symmetrically with respect to 0, in only 8 out of 29 elements a factor occurs which is different from 2, 3 and 5, the prime divisors of 30. A multiplication and addition table built on the distinction of these two classes of digits will be the intermediary in finding the product in a small number of steps, each involving comparison of 1 or 2 bit quantities. Multiplication in this fashion requires 1/3 of the number of bit manipulations as compared with standard procedures on IBM System/360 and 370, if the latter would be applied to equivalent (i.e. 5-bit) entities. Future implementation of long-integer multiplication is suggested in analogy with an algorithm for multivariate polynomial multiplication. An outline for division on this new basis is included.