Path: utzoo!attcan!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.c Subject: Re: DIV and MOD ( was: Something IBM did right ) Message-ID: <7712@boring.cwi.nl> Date: 11 Nov 88 21:07:22 GMT References: <972@goofy.megatest.UUCP> <643@quintus.UUCP> <328@sdti.UUCP> <664@quintus.UUCP> Organization: CWI, Amsterdam Lines: 16 In article <664@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: > Well, programming language designers mostly copy other languages. And way > back there we find Fortran. And Fortran's designers either ruled the way > they did because they were convinced that it was the most useful definition > for Fortran's then envisaged applications, or because it suited the > hardware well, and in the latter case the designers of the 704 or whatever > presumably had what _they_ thought were good reasons for their choice. > I do not think that earlier versions of Fortran gave a precise specification of the semantics of DIV (earlier versions of Fortran were not precise enough anyway). And yes, truncating to zero matched machines best in those times, with 9's complement or sign-magnitude. -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax