The result may be "interesting," but it is not "wrong."Nermal said:Calculator (v3.1) just gave me an interesting result.
10339.01 + 66231.9 = 76570.90999999999
![]()
jared_kipe said:Oh no, not a repost, please save us all of you who can do searches. It isn't that big of a deal, if you don't like the reposts then don't read them. But yes, calculator is crafty some times.
MisterMe said:The result may be "interesting," but it is not "wrong."
Nermal said:Care to explain how that is not wrong? Sure, it's correct if you round it, but if you don't round it then it certainly is wrong!
Freg3000 is on the right track. What you see as a bug is merely the age-old artifact of doing floating-point decimal math in binary. Hardware calculators usually do math in binary-coded decimal. Computer-based calculator emulators usually do math in binary and then convert the result to decimal. This conversion step may introduce the string of 9's. Apple's programmers have chosen not to round-off the result, but the answer is correct to the proper number of significant figures.Nermal said:....
Care to explain how that is not wrong? Sure, it's correct if you round it, but if you don't round it then it certainly is wrong!
MisterMe said:Freg3000 is on the right track. What you see as a bug is merely the age-old artifact of doing floating-point decimal math in binary. Hardware calculators usually do math in binary-coded decimal. Computer-based calculator emulators usually do math in binary and then convert the result to decimal. This conversion step may introduce the string of 9's. Apple's programmers have chosen not to round-off the result, but the answer is correct to the proper number of significant figures.
Handheld calculators have much less available memory than just about any computer-based calculator.kingjr3 said:Yes, those numbers are represented in binary in memory, but the inaccuracy is not the fault of binary arithmetic. It has to do with the fact that a calculater/computer only have a fixed (finite) amount of memory to represent a floating point number, so some precision is lost.
MisterMe said:Handheld calculators have much less available memory than just about any computer-based calculator.