Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!uwm.edu!uwvax!daffy!gumby.cs.wisc.edu!upl From: upl@gumby.cs.wisc.edu (Undergrad Projects Lab) Newsgroups: comp.lang.prolog Subject: Re: Fun With Floats in Quintus Message-ID: <5050@daffy.cs.wisc.edu> Date: 15 Aug 90 14:08:13 GMT References: <3829@bingvaxu.cc.binghamton.edu> Sender: news@daffy.cs.wisc.edu Reply-To: quale@picard.cs.wisc.edu Distribution: comp Organization: U of Wisconsin CS Dept Lines: 21 In article <3829@bingvaxu.cc.binghamton.edu> vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) writes: >In article eiverson@nmsu.edu (Eric Iverson) writes: >> >>How oh how does one represent the numbers 8.1 and 5.4 in Quintus >>Prolog? I have tried everything I can think of without any luck. > >There are some real numbers which can't be represented in floating >point. The language (nor implementation) is not at fault. >For example, try to write down the representation of 0.1 (decimal) in binary. > >-Kym Horsell This is a common canard in many language implementations. The latest Scheme (R**4) has fixed this. See the 1990 ACM Conference on Program Language Design and Implementation for papers by Guy L. Steele and William Clinger on how to correctly implement -- Doug Quale picard@cs.wisc.edu