Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!orc!bbn.com!nic!chaos.cs.brandeis.edu!chaos!phils From: phils@chaos.cs.brandeis.edu (Phil Shapiro) Newsgroups: comp.sys.mac.programmer Subject: Re: Why can't the Mac add? Message-ID: Date: 25 Sep 90 22:35:55 GMT References: <45060@apple.Apple.COM> <20360@dime.cs.umass.edu> <45108@apple.Apple.COM> <1990Sep25.174006.11979@agate.berkeley.edu> Sender: @chaos.cs.brandeis.edu Organization: Symantec Corp. Lines: 26 In-Reply-To: lindahl@violet.berkeley.edu's message of 25 Sep 90 17:40:06 GMT In article <1990Sep25.174006.11979@agate.berkeley.edu> lindahl@violet.berkeley.edu (Ken Lindahl 642-0866) writes: In article <45108@apple.Apple.COM> das@Apple.COM (David Shayer) writes: >huh-HUM (throat clearing noises.) >The calculator DA can do this math correctly. If you add 0.2 fifty >times, you get 10.0. Exactly. Not 9.999999 or 10.0000001. I tried >changing my float variable to an extended, as someone suggested. No dice. >Does the calculator DA have its own special math package? (If so, the >dCad calculator does too.) No one seems to think SANE has calls which >take care of this. So why does it work in the calculator? > >David huh-HUM (throat clearing noises.) [ description of how Calculator truncates floats ] Ken Lindahl lindahl@violet.berkeley.edu I don't know if this has any bearing, but I just tried out adding .2 to itself 10 times, got '2', then subtracted '2'. The result? 2.168404E-19. Go figure :-) -phil -- Phil Shapiro phils@chaos.cs.brandeis.edu