Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!ix.netcom.com!netcom.com!NewsWatcher!user
From: ethridge@netcom.com (Allen Ethridge)
Subject: Re: Substraction Problems :-(
Message-ID: <ethridge-0403952236100001@192.0.2.1>
Sender: ethridge@netcom10.netcom.com
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <3ivu79$hsc@panix3.panix.com> <3j5kh2$a6f@news1.delphi.com> <3j7iog$l6h@crchh327.bnr.ca> <denatale-0303951906050001@grail918.nando.net>
Date: Sun, 5 Mar 1995 04:36:10 GMT
Lines: 34

In article <denatale-0303951906050001@grail918.nando.net>,
denatale@nando.net (Rick DeNatale) wrote:

> In article <3j7iog$l6h@crchh327.bnr.ca>, Allen Ethridge
<ethridge@bnr.ca> wrote:
> 
> > digit after the decimal point and adjust accordingly.  Isn't the
> > size of an integer in Smalltalk limited only by available memory?
> > If so, why are floating point calculations not equally unrestricted?
> > 
> 
> Allen,
> 
> There is a fundamental difference between integers and floats that is
> language independent.
> 
> 
> Floats are best used for scientific processing where you are aware that
> the numbers are really approximations. There is a whole sub-discipline of
> computer science, Numerical Analysis which studies the properties of
> floating point algorithms.

Which is what i really meant to get at.  It's not that i think the size
of floats should be unrestricted so much as having the rules of numerical
analysis applied by the computer (hardware or software).  If i remember my
numerical analysis (from years ago) correctly, in the calculation of
100.9 - 100.0 there can be no more than one significant digit to the right
of the decimal point.  Why then would a computer produce a result that
implied five significant digits - 0.90002.  It seems that this would force
anyone writing programs with floating point numbers to right extra code
to check all the intermediate results for the correct number of significant
digits.  Why can't this be done automatically by the language/system/hardware?

   allen
