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

is it SUPPOSED to do this?



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?