Problems with representing numbers on computers, part 1

Jan 14, 2006 21:17

notnotrebecca recently pointed out to me that online calculators incorrectly calculate 111111111*111111111. It should be 12345678987654321 (any time you multiply a string of ones by itself you get a nice symmetrical answer like that), except that the online calculators she tried consistently gave 12345678987654320 instead. (Note the zero on the end.)

Here's what I found out. (It gets technical.) )

Leave a comment

Comments 5

mskala January 15 2006, 02:23:09 UTC
Most offline calculators won't even give you an answer, because those numbers are too big for their 8- or 10-digit capacity.

Reply

noam_rion January 15 2006, 02:33:43 UTC
Yup. That's why I use bc.

Reply

noam_rion January 15 2006, 02:34:02 UTC
By the way, I just added a mention of two's complement since you read it.

Reply


Serialized Adventures in Mathematics. anonymous January 15 2006, 02:52:48 UTC
Every morning I rush to the RSS reader, looking for another issue of Noam's serialized Adventures in Mathematics.

"Two thumbs up!" -The Monthly Gazette.

"Has Zing, and Zest." -The New Post.

-Tyko.

Reply


inthewall January 15 2006, 06:50:06 UTC
hey, I think tomorrow might be filled up as well as me not really being in a complete phone mood, this week or next weekend sounds really good to me though.

*hugs*

Reply


Leave a comment

Up