[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
is it SUPPOSED to do this?
- To: bug-lisp at MIT-MC
- Subject: is it SUPPOSED to do this?
- From: Dave Touretzky at CMU-10A
- Date: Tue, 28 Oct 80 10:56:00 GMT
- Cc: David Goldberg at CMU-10A
- Original-date: 28 October 1980 0556-EST
- Reply-to: Dave Touretzky at CMU-10A
In MacLisp with *RSET set to T, BASE and IBASE set to 10.:
(setq a (^ 2 34)) => 17179869184
(+ a a) => -34359738368 ;arithmetic overflow
(* 2 a) => 0 ;huh??? doesn't 2*a = a+a?
(times 2 a) => 34359738368 ;correct answer, as a bignum
I'm kind of surprised at the disparity in answers. Doesn't *RSET
checking involve tests for bogus arithmetic operations? Is there
any other way to get such testing?