gcd problem / really bignums for exponents



>>>>> "Raymond" == Raymond Toy <raymond.toy at ericsson.com> writes:

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

FWIW, I tested gcl with

(defun foo (x y)
  (declare (optimize (safety 3)))
  (the fixnum (+ (the fixnum x) (the fixnum y))))

(foo x y) produces the wrong answer if x and y are bigger than
fixnums.  The safety setting doesn't have an affect.

Moral:  Don't lie to the compiler.

Ray