[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: (BUG LISP) at MIT-MC*Subject*: Bignum bug?*From*: RLB at MIT-MC (Richard L. Bryan)*Date*: Mon, 22 Sep 80 17:01:00 GMT*Original-date*: 22 SEP 1980 1301-EDT

Either COMPLR needs to know that GCD can cause C to be altered, or else the routine at BNLWFL shouldn't alter C. BNLWFL gets called from GCDBG4+12 ---- Date: 21 SEP 1980 2044-EDT From: FH at MIT-MC (Fred W. Helenius) If you compile the following function (which is intended to add two rational numbers given in the form (numerator . denominator)), load it into LISP, and do (eval exp) where exp is given below, LISP produces the error still further below: (defun add-rats (a b) (let (((c . d) a) ((e . f) b)) (let ((hcf (gcd d f))) (cons (plus (times c (quotient f hcf)) (times e (quotient d hcf))) (times (quotient d hcf) f))))) (setq exp '(apply 'add-rats '((716087101460491 . 1041496283283456) (103334765625 . 197568495616)))) ;(7577) NON-NUMERIC VALUE ;BKPT WRNG-TYPE-ARG I suppose this is a bug. The function works fine in the interpreter, and compiled for most arguments. For your convenience, the function definition, the result of its compilation, and the definition of exp may be found in FH;BUG DEFN, BUG FASL, and BUG EXP, respectively.

- Prev by Date:
**SFA reading gets stale data** - Next by Date:
**Bignum bug?** - Previous by thread:
**Bignum bug?** - Next by thread:
**Bignum bug?** - Index(es):