gcd problem / really bignums for exponents



>>>>> "Stavros" == Stavros Macrakis <macrakis at alum.mit.edu> writes:

    Stavros> As for the speed issue, there may be easy ways to fix it.  I don't know how
    Stavros> fixnums and f+ work on the various Lisps we run on (are fixnums allocated on
    Stavros> the heap, or encoded in the Lisp object itself?), but I remember making a

I know cmucl, sbcl, Allegro, and Lispworks encode fixnums into the
object itself, so no heap allocation is needed.

I do not know how clisp or gcl handles fixnums.

The f+ macro is (the fixnum (+ (the fixnum x) (the fixnum y))).
Without high speed or low safety, cmucl and sbcl will still check that
everything is a fixnum.  I think gcl just believes the code, and hence
produces the "wrong" answer when x or y or the result is not a fixnum.

Ray