[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shifted-0, Modular arithmetic
- To: JONL at MIT-MC (Jon L White)
- Subject: Re: Shifted-0, Modular arithmetic
- From: Guy.Steele at CMU-10A
- Date: Tue, 28 Oct 80 18:38:00 GMT
- Cc: bug-lisp at MIT-MC, Dave.Touretzky at CMU-10A, David.Goldberg at CMU-10A
- In-reply-to: JONL@MIT-MC's message of 28 Oct 80 06:25-EST
- Original-date: 28 October 1980 1338-EST (Tuesday)
Of course, part of the complaint is that the PDP-10 instruction
set doesn't even implement the ring you described, but only
an approximation to it. If it were a true ring then indeed
(* x 2) would be the same as (+ x x). However, the PDP-10
IMUL instruction does not store the 36 low-order bits,
but the 35 low-order bits plus the correct sign. That's why
(* 2 2_34.) => 0 instead of -2_35.