Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!pitt!willett!ForthNet From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: ANS TC Magnet for Division Message-ID: <2645.UUL1.3#5129@willett.pgh.pa.us> Date: 18 Apr 91 02:57:14 GMT Organization: (n.) to be organized. But that's not important right now. Lines: 39 Category 10, Topic 17 Message 82 Wed Apr 17, 1991 R.BERKEY at 01:57 PDT Zarko Berberski writes, 91-04-09, > ..."the mathematical use of" MOD is not as an operator but as a > qualifier of equivalence statemant... From Graham, Knuth, Patashnik, _Concrete Mathametics_, Addison-Wesley Publishing Co.: 1989, p. 82, Chapter 3.4, 'MOD': THE BINARY OPERATION: x mod y = x - (y * floor(x/y)), for y <> 0. (3.21) This defines 'mod' as a binary operation, just as addition and subtraction are binary operations. Mathematicians have used mod this way informally for a long time, taking various quantities mod 10, mod 2*pi, and so on, but only in the last twenty years has it caught on formally. Old notion, new notation. > ...so there is no popular computer language that implements the MOD > the way we are using it in mathematics. This statement allows that there are some "unpopular" languages that implement the MOD. Languages implementing the MOD function on at least the positive integer domain of y include PASCAL, Modula-2, Smalltalk, APL, Ada, FORTRAN and Forth. (FORTRAN's syntax of "MOD" is something different: the name used there for the MOD operator is "MODULUS".) Robert Berkey ----- This message came from GEnie via willett. You *cannot* reply to the author using e-mail. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, etc.). Report problems to: dwp@willett.pgh.pa.us _or_ uunet!willett!dwp