Path: utzoo!attcan!uunet!bu.edu!snorkelwacker!apple!das From: das@Apple.COM (David Shayer) Newsgroups: comp.sys.mac.programmer Subject: Re: Why can't the Mac add? Message-ID: <45108@apple.Apple.COM> Date: 25 Sep 90 02:00:53 GMT References: <45060@apple.Apple.COM> <20360@dime.cs.umass.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 20 Let's try this one more time, then I promise to go away and stop bothering all you nice people. I know what happens when you convert 0.2 to binary. I know literally how precision is lost in the base conversion. I know what a mantissa and an exponent are. That's not my question. I know that the sample program I posted is bad programming style, but it illustrates the question well. So stop flaming me about it. (I don't usually write code like that, I promise.) 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