Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!rochester!crowl From: crowl@cs.rochester.edu (Lawrence Crowl) Newsgroups: comp.lang.c Subject: Re: 16x16 = 32 Message-ID: <3293@sol.ARPA> Date: Fri, 16-Oct-87 11:04:59 EDT Article-I.D.: sol.3293 Posted: Fri Oct 16 11:04:59 1987 Date-Received: Sat, 17-Oct-87 20:42:04 EDT References: <143@kesmai.COM> Reply-To: crowl@cs.rochester.edu (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 17 In article <143@kesmai.COM> dca@kesmai.COM (David C. Albrecht) writes: >The point was that [Mark Williams] claimed that eliminating the extend to long >was INCORRECT and would cause their compiler to fail acceptance testing. That >is what I think is BOGUS. ... I was trying to see if anyone knew of an >acceptance test or a VALID reason why not sign extending over the high bits is >an INVALID result. Many random number generators and hash functions rely on the result of an out of range multiplication returning a result within the range, modulo (sort of) the word size. They rely on 7 + 3 == -6 for 4-bit two's complement words. C does not provide integers, it provides words. Words happen to have some operations that are very similar to the operations we use for integers. -- Lawrence Crowl 716-275-9499 University of Rochester crowl@cs.rochester.edu Computer Science Department ...!{allegra,decvax,rutgers}!rochester!crowl Rochester, New York, 14627