home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky sci.math:11398 comp.lang.misc:3065 comp.lang.fortran:3547 comp.std.c:2622 comp.lang.c:13633
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!gatech!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
- From: hrubin@pop.stat.purdue.edu (Herman Rubin)
- Newsgroups: sci.math,comp.lang.misc,comp.lang.fortran,comp.std.c,comp.lang.c
- Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
- Message-ID: <BuKKKH.MFM@mentor.cc.purdue.edu>
- Date: 14 Sep 92 13:09:52 GMT
- References: <MEISSNER.92Sep11164441@curley.osf.org> <BuJ4Es.49w@mentor.cc.purdue.edu> <PRENER.92Sep14014510@prener.watson.ibm.com>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University Statistics Department
- Lines: 31
-
- In article <PRENER.92Sep14014510@prener.watson.ibm.com> prener@watson.ibm.com (Dan Prener) writes:
-
- >In article <BuJ4Es.49w@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
-
- >[... deletion ... (topic was obtaining long long product of two longs) ]
-
- >> And it still is
- >>not quite adequate. One should be able to have the option of overloading
- >>the * operator so that if c is long long, and a and b are long, this can
- >>be written as c = a * b.
-
- >While that could be done, it goes very much against the spirit of most
- >languages' expression evaluation, in which a * b has a value that is
- >well defined without reference to the context in which it is used, in
- >this case the type of the target of the assignment.
-
- Now before the HLLs, the great bulk of computers were word oriented,
- a word varying from 32-68 bits, and the general understanding was that
- for integers a * b was some version of nxn -> 2n, and a/b was 2n/n
- yielding quotient and remainder. From that standpoint, it is the
- usual integer arithmetic which should be considered aberrant, and
- the reduction to nxn -> n being a casting of the result.
-
- Unfortunately, the hardware has been influenced by the languages, so
- the logically natural computations now become a major programming
- problem to do efficiently at all.
- --
- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
- Phone: (317)494-6054
- hrubin@pop.stat.purdue.edu (Internet, bitnet)
- {purdue,pur-ee}!pop.stat!hrubin(UUCP)
-