Subscribe to
NSLog(); Header Image

Confused Calculator

Since when does 2993 - 233 = 3000? Since 10.4.5's calculator introduces a small bug when you change the precision to 1. Or change it to 2 and try 2006-1 (you get 2000). Found at

BTW, bonus tip regarding calculations: alias uni scale=4; !:1'`units !:2 !:3` | awk '{print $1, $2, $3}' | bc -l. That'll get you handy CLI conversions like:

% uni 14 mi km


4 Responses to "Confused Calculator"

  1. I read that article at MacWorld a couple of days ago, and it's not a bug. It's just a different expectation of what "precision" means. "Precision" in the Mac OS X 10.4.5 Calculator's sense is significant figures. With 1 significant figure, 2993 - 233 does indeed equal 3000, and with two significant figures, 2006 - 1 does indeed equal 2000. "Precision" in the colloquial sense means the number of decimal places to which the result is rounded. In that case, 2993 - 233 would equal 2760.0 with 1 degree of precision, and 2006 - 1 would equal 2005.00 with 2 degrees of precision.

    I think the thing that needs to be clarified here is what the calculator means by "precision", and I guess that could be classified as an interface bug. This issue could be cleared up if the Calculator changed the word "Precision" to "Significant Figures".

    -- Simone

  2. Precision is not significant figures. And prior to 10.4.5, Calculator behaved "properly." So combining the two - the bad wording and the fact that the calculator used to behave the "other" way for a few years - I'm comfortable calling it a bug.

  3. Is the behavior identical on powerPC and intel macs both?

  4. I highly doubt it's an endian issue.