Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!hplabs!hplextra!hplb!tgg
From: tgg@hplb.hpl.hp.com ()
Subject: Re: Anything better than Float?
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Message-ID: <CxnKIC.2IB@hplb.hpl.hp.com>
Date: Fri, 14 Oct 1994 07:51:47 GMT
References: <37akc6$4ur$1@melbourne.dialix.oz.au> <CxL98z.GMs@world.std.com> <tms-131094092318@stambaugh.tiac.net>
Nntp-Posting-Host: thegnome.hpl.hp.com
Organization: Hewlett-Packard Laboratories, Bristol, England
X-Newsreader: TIN [version 1.2 PL0.7]
Lines: 21

I'd just  like to reiterate what "tms@stambaugh.com Tom Stambaugh at Stambaugh
Engineering"  has  noted:  there are some realy subtle potential problems with
floating  point  numbers. For  a start, the normal arithmetic  operations  are
_not_ commutative _nor_ associative. 

I suspect Fractions are a reasonable  way of representing currency, but  don't
forget that not all numbers can be represented as a Fraction:  Pi  and sqrt(2)
come to mind.

The  difficulty of  "rolling  your own"  numeric classes clear; a corollary is
that it  may  be difficult to verify that classes "rolled by someone else" are
satisfactory.

--
===============================================================================
  Tom Gardner                 Hewlett Packard Laboratories, Filton Rd, 
  tgg@hplb.hpl.hp.com	      Stoke Gifford, Bristol, Avon, BS12 6QZ, ENGLAND.
  Fax: +44 1179 228920        Tel: +44 1179 799910 ext. 28192
            Too many Heritage Centres make you go blind.
===============================================================================

