Path: utzoo!attcan!uunet!samsung!usc!trwind!gumby!wiley!scott From: scott@wiley.uucp (Scott Simpson) Newsgroups: comp.lang.lisp Subject: Re: Virtues of Lisp syntax Summary: Real programmers don't use real numbers. Keywords: floating point numbers, representations, precision Message-ID: <26F4D816.45FF@wilbur.coyote.trw.com> Date: 17 Sep 90 14:05:10 GMT References: <33709@cup.portal.com> <1990Sep10.091911.20877@hellgate.utah.edu> <3758@goanna.cs.rmit.oz.au> Sender: news@wilbur.coyote.trw.com (News Software) Reply-To: scott@wiley.UUCP (Scott Simpson) Organization: TRW Inc., Redondo Beach, CA Lines: 16 In article pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: >Anyone doing floating point arithmetic on *any* machine, IEEE standard >or Cray, has to be very very wary of assuming it is the same as >arithmetic on reals, and yet a lot of people do (and then complain that >two computers with different floating representations print utterly >different results to their programs!). Real programmers don't use real numbers. Donald Knuth did all the arithmetic in TeX in fixed point numbers he called FIXes, which are numbers raised to 2^20th (i.e., he uses the lower 20 bits for the fractional part). This gives the same results on all (32 bit or greater) machines but you still must be wary with your arithmetic. (Come to think of it, maybe he did it in scaled points (which are 2^16th). I don't have the source here. I'll have to check. My point is the same though.) Scott Simpson TRW scott@coyote.trw.com