Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!julius.cs.uiuc.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.arch Subject: Re: Killer Micro II Keywords: floating point, language Message-ID: <3737@goanna.cs.rmit.oz.au> Date: 12 Sep 90 03:24:56 GMT References: <527@llnl.LLNL.GOV> <603@array.UUCP> <2482@l.cc.purdue.edu> <3785@osc.COM> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 31 In article <3785@osc.COM>, jgk@osc.COM (Joe Keane) writes: > Suppose Fortran started out with three floating-point formats, and furthermore > suppose that C also had this. Then i bet you'd see a lot of machines today > which directly support three different floating-point formats. C *has* three floating-point types: float, double, and long double. Perhaps there aren't a lot of _architectures_ with three floating-point types (although the VAX has four, and some IBM 370s have three), but a lot of _machines_ have been shipped with IEEE single, double, and extended formats (supported by a coprocessor chip). > Another example is that Common Lisp has multi-precision integers and short > floating-point types. If you look at a Lisp machine, you'll find that these > types are supported directly by the microcode. Yes, but here it is a very clear case of the language driving the machine. Bignums (integers which are whatever size they need to be, in a language where your program doesn't have to _say_ what size they'll be) are there because people were writing computer algebra programs and had a _use_ for bignums. On Xerox Lisp machines, bignums are actually handled in Lisp code, _not_ in microcode. Some models of the Xerox Lisp machines handled floating-point in Lisp, some didn't. It's an engineering tradeoff. Many "stock" architectures (/370, 680x0, 80*86, 32?32, ... provide all the primitives (add with carry, n*n -> 2n multiply, and so on) that are needed to synthesise integer arithmetic of any size. (Perhaps this is a lingering relic of COBOL?) I have never understood why Pascal compilers don't exploit this to let you declare integers of whatever size you need. -- Heuer's Law: Any feature is a bug unless it can be turned off.