DIV and MOD ( was: Something IBM did right )

Dik T. Winter dik at cwi.nl
Sat Nov 12 07:07:22 AEST 1988


In article <664 at quintus.UUCP> ok at 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 at cwi.nl
BITNET/EARN: dik at mcvax



More information about the Comp.lang.c mailing list