Skip to Content

WARNING: Apple Calculator jacked all to hell

I heard some rumblings about this yesterday but Mike Davidson did some reasearch on his own and found out that if you want to do any of that crazy “math” stuff, Apple Calculator is probably not your best bet.


And so there you have it… what was once simple is now apparently difficult again, thanks to the otherwise brilliant piece of engineering that is OS X Panther. I’m sure the explanation has something to do with floating-point calculations, whatever the hell those are, but that doesn’t make this bug the least bit more acceptable. My worst nightmare is that the repeating decimal answer actually is the correct answer from a computing standpoint but most computers are smart enough to round it for us, knowing what we really want. That would really alter my perceptions of low-level computing quite a bit.

On the bright side, we finally found something PCs are better than Macs at.

Subtraction.



I heard some rumblings about this yesterday but Mike Davidson did some reasearch on his own and found out that if you want to do any of...
 

Add a Comment

*0 / 3000 Character Maximum

11 Comments

Filter by:
QQ

cool!

March 18 2005 at 3:15 AM Report abuse rate up rate down Reply
jnkendal

People I have just upgraded my Mac from 10.3.7 to 10.3.8 and now I cannot start my calculator (Apple 3.0). I have the icon in the dock, I have the Calculator listed in Applications; however, when I click on either - NADA, ZIP, BUGGER-ALL. I went to the Repair Permissions, and reloaded 10.3.8 combo Upgrade - again the same. Any thoughts/fixes? A very new and inexperience convert from PCs. Jeff

February 11 2005 at 9:03 PM Report abuse rate up rate down Reply
Voxel

Please Apple, bring back the old Calculator from the Classic Mac OS! Since the calculator market share recently has overtaken the Mac OS, we are doomed!! Nahhhh seriously, thi s is a bad looking bug they have there. But you know, a calculator is just one example of things that can be relatively easy to program, but really hard to test for bugs. They can't just try every calculation possible in beta testing...I'm not saying they shouldn't have looked this more or less common 0.1 bug, but I guess they don't teach this one in Math classes... At least it's not like the Windows calc bug which was actually due to a hardware bug in the Pentium II chip and probably required some software work arounds. This is getting common knowledge these days but did you know that Steve Jobs himself actually designed the original Calculator desk accessory layout that remained up through OS 9? That funny story,along with many very very interesting ones about the design of the original Mac/Lisa, can be read at http://www.folklore.org/StoryView.py?project=Macintosh&story=Calculator_Construction_Set.txt

August 14 2004 at 10:01 PM Report abuse rate up rate down Reply
John C. Randolph

Go to bugreporter.apple.com, and tell them you want the calculator app to use a decimal implementation. If you don't have a bug number, it's nothing but a complaint. Incidentally, the Cocoa framework includes an NSDecimalNumber class, which implements infinite-precision decimal arithmetic. -jcr

August 14 2004 at 5:56 PM Report abuse rate up rate down Reply
Michael

Simple fix is to go into "View | Precision..." and set it to "2" if you're working with typical currency calculations, or higher depending on how much accuracy you need. Do you REALLY need 12-digit precision? I think Apple's mistake was simply setting the default precision to "12." The Calculator.app works just like it should.

August 14 2004 at 1:13 PM Report abuse rate up rate down Reply
Shin Katsumata

I believe Apple used double precision in their calculator program. IEEE double precision will start to lose precision after 16 significant digits (or was it 15). As someone suggested before, BCD coding will help, but unless Apple writes its own floating point routine, hardware BCD will still lose the precision (I'm not sure if the newer PPCs still have the option). This is true for PPC or x86. Most calculations including finite element analysis will do just fine with double precision. BTW, TI calculators (at least SR50/51/52) only kept 13 digits, which is 3 digits less than 16 digits, so changing the program to round off to 10 (or 13 like TI did) significant digits is just fine (note: rounding to 2 digits after decimal point may run into problem).

August 13 2004 at 10:26 PM Report abuse rate up rate down Reply
Russell Martin

Seems like if you set the precision to something less than 12, then the problem goes away. I agree that setting it down to 2 is not a good idea, but setting to something like 10 or 8 seems very adequate.

August 13 2004 at 8:04 PM Report abuse rate up rate down Reply
Ken Richardson

10x= 9.9 repeating x = .9 repeating 10x-x = 9.99999etc - .999999etc 9x = 9 x=1 thus .99999 repeating = 1 apple should fix the display

August 13 2004 at 2:16 PM Report abuse rate up rate down Reply
A computer guy

You rarely see these errors on handheld calculators (or in programming languages where being right counts, COBOL for example) because they use Binary Coded Decimal instead of "lazy" floating point. I would say that setting the calculators precision to 2 is a bad idea because: 1. You will eventually accumulate errors at that precision, too. 2. A calculator (or any math program) should not behave this way, period. Apple should fix it.

August 13 2004 at 1:44 PM Report abuse rate up rate down Reply
Doc Griffin

The problem is common to all floating point math operations on any system -- from mainframes right down to $1.98 handheld calculators. It has to do with the fact that 0.1 is a good decimal number, but a failure as a binary floating point number because it cannot be represented, only approximated. Solution: Set your calculator's precision to 2 (The default is an unnecessarily high value of 12).

August 13 2004 at 12:40 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.