計錯數的Calculator
Published by Chainsaw February 12th, 2007 in Apple Computer, Pitfall.Mac OS X的Calculator被發現計錯數。你可以試一試嗎?我用PowerPC G4的eMac卻發現兩次計算的結果一樣。有人指出,和Intel CPU及Locale有關。
Method 1: 8511.22 * 1.19
Method 2: 8511.22 + 19%
試試Method 1和Method 2的結果是否一樣?暫時只知應不是CPU的臭蟲,因為其他軟件能計出一樣的結果,相信是軟件的臭蟲。

先不論CPU
這兩個算式根本上就寫錯了…
8511.22 * 1.19 不等於 8511.22加19%
應該改為
8511.22 * 1.19 = 8511.22 加 8511.22 * 19%
Calculator的Behaviour和一般計數不同。
8511.22加19% 不等同於 8511.22加0.19,故此答案不是8511.41。當你在Calculator輸入8511.22加19%,即是做算術時的8511.22加8511.22 * 19%。
我發現答案是一樣的:
MacBook Core 2 Duo 2.0 GHZ
將 precision set 做 11 或以下,無分別!
View Menu->Precision->11
My iBook rendered the same results in both methods.
i am using iMac G4 15′ 800 Mhz
When i try 100*1.1 and 100 10%, the answers are the same.
But when i try the above equations, different answers returned (even precision was set to 11) !!! so queer…….
Those equation are different….
19% is equal = 19/100…
if the equation is work… it should be a simple truncation error in computer i.e. round of or dump value in bin.