[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Arbitrary Precision Arithmetic Package for Common Lisp
I suspect that the problem being reported with (expt 2 40000) is one
of printing it, not with constructing it. I found it necessary to
increase the stacks, e.g., (setq si::*multiply-stacks* 4), to print
(expt 2 40000) in AKCL 1-615 on a Sun-3. Here are some relevant
entries in AKCL 1-615 doc/DOC.
*MULTIPLY-STACKS*
Variable in SI package:
If this variable is set to a positive fixnum, then the next time through the
TOP-LEVEL loop, the loop will be exited. The size of the stacks will be
multiplied by the value of *multiply-stacks*, and the TOP-LEVEL will be called
again. Thus to double the size of the stacks:
>(setq si::*multiply-stacks* 2)
[exits top level and reinvokes it, with the new stacks in place]
>
We must exit TOP-LEVEL, because it and any other lisp functions
maintain many pointers into the stacks, which would be incorrect when the
stacks have been moved. Interrupting the process of growing the stacks,
can leave you in an inconsistent state.
MULTIPLY-BIGNUM-STACK
Function in the SI package:
Args: (n)
Increase the internal bignum stack by a factor of N. Normally space on this
stack is recovered after each complete lisp expression is evaluated. However
if you are dealing with large integers, you may need to use this function
to increase the stack.