I wrote a pic assembly routine to add very large numbers (64 bit, that is eight-byte numbers) And after some testing, I found a difference between my results and the result reported by the windows calculator. Even Excel yields an erroneous result!
When I add:
036530234502744800 +
071896180211344400
Excel reports a value of:
108426414714089000
As can very easily be seen, manually adding the first three digits DOES NOT match the answer reported by Excel. I've also detected the same problem when using the Windows Calculator. And then I went online to a few sites and discovered that they too report errors when dealing with numbers of this magnitude.
In fact, take a look at the following addition as shown by Excel:
00000000000000001
00000000000002816
00000000001638400
00000000050331648
00000060129542144
00219902325555200
36310271995674600
-----------------------
36530234502744800
Simply manually adding THE FIRST COLUMN DIGITS (which yields a value of 19) does not correspond to the result as it should be! What gives? Would this have to do with internal floating point operations?
When I add:
036530234502744800 +
071896180211344400
Excel reports a value of:
108426414714089000
As can very easily be seen, manually adding the first three digits DOES NOT match the answer reported by Excel. I've also detected the same problem when using the Windows Calculator. And then I went online to a few sites and discovered that they too report errors when dealing with numbers of this magnitude.
In fact, take a look at the following addition as shown by Excel:
00000000000000001
00000000000002816
00000000001638400
00000000050331648
00000060129542144
00219902325555200
36310271995674600
-----------------------
36530234502744800
Simply manually adding THE FIRST COLUMN DIGITS (which yields a value of 19) does not correspond to the result as it should be! What gives? Would this have to do with internal floating point operations?