Ubersite
Home - About Us - Contact
"I have never let my schooling interfere with my education." - Mark Twain
Welcome to Ubersite!
Search Ubersite
Search for:

Most Recently Reviewed
  1. Uber showdown: Jack McCull...
  2. Wife Carrying Championships
  3. OH Christmas Tree...,,,OH ...
  4. Microsoft: The Next 25 Years
  5. Can I be a Boozehound?
  6. Happy Birthday, Dad
  7. Don't Make it Sound so Awful
  8. Attitude No. 14 in C-Sharp...
  9. My Pecker Would Not Work T...
  10. Help! This job application...
more...
Most Heated
  1. The Long & Short of it... (116 heat)
  2. OH Christmas Tree...,,,OH ... (80 heat)
  3. Can I be a Boozehound? (43 heat)
  4. Happy Birthday, Dad (38 heat)
  5. You Can Take Your Virgin J... (37 heat)
  6. Attitude (36 heat)
  7. Don't Make it Sound so Awful (36 heat)
  8. german drivers licence (32 heat)
  9. Uber Helpline: Lodges & Clubs (29 heat)
  10. Ubercontest: Which one is ... (28 heat)
more...
Most Viewed Messages
  1. The Ultimate MS Paint: It... (1151650 hits)
  2. "If I cum now, will it be ... (710422 hits)
  3. Exploiting Peer-to-Peer Ne... (388743 hits)
  4. How To Pick Up Chicks (329659 hits)
  5. Motivating the Weekend (311476 hits)
  6. Knockoff porn movie titles (304911 hits)
  7. My J-Date Misadventure (288911 hits)
  8. Licking A Bum's Ass (253281 hits)
  9. Badass Australian Cows (249124 hits)
  10. Totally Useless Facts (234225 hits)
more...
Most Viewed Authors
  1. Bart Cilfone (1476531 hits)
  2. Stanley Moore (1454347 hits)
  3. Razor (1419276 hits)
  4. JMG114 (1395863 hits)
  5. MickGinny (1300439 hits)
  6. loki (1073075 hits)
  7. Jonukah (990289 hits)
  8. Most Hated (939481 hits)
  9. weeeeep (937360 hits)
  10. Cat Crooner Extraordinaire (897817 hits)
  11. Ubersite needs me! (892167 hits)
  12. Abortions Tickle (889424 hits)
  13. Tom (841251 hits)
  14. Sideburns, MUHFUCKA (820366 hits)
  15. Liar Below (778379 hits)
  16. T+I+G+E+R (766942 hits)
  17. oy vey (766138 hits)
  18. Sorrell (754009 hits)
  19. Quitter™ (699418 hits)
  20. Satan is my Motor (698471 hits)
  21. RON PAUL 2008! (694613 hits)
  22. HIDDEN101 (693506 hits)
  23. User Blocked (652972 hits)
  24. Phil Phone (650674 hits)
  25. TTOM88 (639845 hits)
  26. iddqd (629982 hits)
  27. comicbookguy (615066 hits)
  28. kaos-king (614405 hits)
  29. ♥ (591297 hits)
  30. O (586362 hits)
Click here to return to the list of messages.

A bit of Maths and Computational Frustration (376 hits)

Category: None

Rating: 0.4 on 13 reviews (Rate this item) (V)
Labels:

Submitted by Lee & Tan (View user info) at 2006-09-27 15:04:27 EDT


I started my weekend contemplating on an experiment to program a calculator that will be able to manipulate large numbers. By large, I was trying to go beyond the 32 bit (4.29 billion) limit for integers. I was hoping for an initial target of 30 digits, well beyond the abilities of an average computer. With the proposed algorithm, the mechanism can be easily expanded to 100 digits, 500 digits, 1000 digits…

Consider our brain. It cannot explicitly handle large numbers. Its limit is probably 10, but with various methods developed in primary school, we can easily manipulate multiple digit numbers. 34562 + 764356, for example. This large number problem is easily solved by doing lining the numbers up and doing the operations column by column. The problem is simplified, although it is a bit more tedious. Nevertheless, it is perfectly reasonable to expect it to be solved in a minute. Similarly, by simplifying a long number into a series of small numbers, I can expect the computer to add numbers of a hundred digits.

It is easy to see that 537 is equivalent to 5×100 + 3×10 + 7×1. Since a computer can work with large numbers, there was no reason to limit it to base-10. Working with larger bases would significantly reduce the number of operations involved. For example, the large number 1,234,567,890 can be expressed as 1×1,000,000,000 + 234×1,000,000 + 567×1000 + 890×1. By expressing it in base-1000, it has been simplified from a 10 digit number to a 4 'digit' number. However, these 'digits' are large- 1, 234, 567 & 890.

To add 2 large numbers, they are lined up in columns, with the 'digits' added, and the excess 1000s carried over to the next column as a 1s. Here, 2 arbitrary large numbers are added:

235921634 + 56365275 = 292286909

235 921 634
+ 56 365 275
292 286 909

Here is the operation detailed in steps. Add the 'digits' of the right most column: 634 + 275 = 909, write 909. Add the 'digits' of the second column: 921 + 365 = 1286, write 286 and carry the excess 1000 over to the next column as a 1. Add the 'digits' of the third column, including any carried 1s: 1 + 235 + 56 = 299.

With this in mind, I proceeded to design my calculator. It will need to take user inputs as a sentence of number symbols, not as a real number. Remember, the computer cannot cope with large numbers. These strings of numeric symbols will be then partitioned into groups like the above example, and then the individual groups converted into numbers. By now, 292 should really mean two hundred and ninety two, not 3 unidentified smears on my monitor.

Here was the major problem of a computer. A human can partition the numbers easily. We draw a line, imaginary or otherwise, across the numbers every 3 digits, right to left. We go on and on, to the 50th digit, 125th digit, 784th digit, till the end. For a computer, you would need to count how long was the user input to establish when you stop partitioning. After that, the individual symbols in the groups had to be converted to numbers, and the relationship between the position and the digit clearly established. In 53154, the 1 is clearly a 100, not 100000. However, this subtle fact is not visible to your average computer. Hence I have to tell it.

So far, Im still stuck with finding a way of telling the facts to the idiot, in an efficient manner.

That said, I must say that 100 digits is nothing big. While it is doubtful that banks will need 100 digit addition in the near future, mathematics has been on huge numbers for a while. Mathematicians talk of finding billion or trillion digit prime numbers. A particularly interesting number that cropped up in the past is e^e^e^79. It is a number of 10^billion trillion trillion digits. Again, 10^billion trillion trillion is not the number. It is the number of digits in the number. This number is known as Skewes Number, the largest number ever to emerge in natural mathematics at the time of its discovery (1933). In contrast, the number of atoms in the cosmos is estimated to be only of the order of 80 digits. (Derbyshire, 236)

Submit to Digg Submit to StumbleUpon

User Reviews


Submitted by fclo002 (user info) at 2006-12-21 12:54:00 EST (#)
Ranking: -2

No Comment

Submitted by CaptainThorns (user info) at 2006-09-28 08:22:55 EDT (#)
Ranking: 1

Umm...uhh...

My cat's breath smells like cat food.

Submitted by Beano312003 (user info) at 2006-09-28 06:28:01 EDT (#)
Ranking: 0

Submitted by OdwinOddball (user info) at 2006-09-27 16:56:07 (#)
Ranking: 0

You're over complicating this.

Don't treat the input as a number, treat it as a string. So the user can just input the number, however long it is, and its stored as a null terminated string. Then, loop thru the string, from right to left, removing the last 3 digits and storing them as their base 1000 counterpart.
Store them in an array of ints. store them in order from 1000 on up. So array entry 1 would be 1000, entry 2 would be 1000x1000, and so on. Thus the array index becomes your exponent when figuring out the number later on.
----------
I was about to say that.

Submitted by JonnyX (user info) at 2006-09-27 18:09:38 EDT (#)
Ranking: 2

you asian guys are smart

Submitted by drgoatcabin (user info) at 2006-09-27 17:09:39 EDT (#)
Ranking: 0

Thanks for reminding me why I fucking HATE math.

Submitted by OdwinOddball (user info) at 2006-09-27 16:56:07 EDT (#)
Ranking: 0

You're over complicating this.

Don't treat the input as a number, treat it as a string. So the user can just input the number, however long it is, and its stored as a null terminated string. Then, loop thru the string, from right to left, removing the last 3 digits and storing them as their base 1000 counterpart.
Store them in an array of ints. store them in order from 1000 on up. So array entry 1 would be 1000, entry 2 would be 1000x1000, and so on. Thus the array index becomes your exponent when figuring out the number later on.




Submitted by COMountain (user info) at 2006-09-27 15:47:30 EDT (#)
Ranking: 0

are you still in remedial math?

...this is child's play.


AND IT'S CALLED A DARK & TAN, DAMNIT.

Submitted by Samo (user info) at 2006-09-27 15:38:39 EDT (#)
Ranking: 0

Wait, I see.

I'm trying to automate this motherfucker, this is the end result:

z13s
z16r
x83i
417
x91y
y23q
y51u
y92f
b7me
313
z23g
z15a
x53d
x52i
b8ze
z18t
z25r
x12a
438
y81e
y21p
b4ku
a4oo
414
x13w
x16s
xyri

Submitted by Gingerly (user info) at 2006-09-27 15:26:28 EDT (#)
Ranking: 2

EXCELLENT post.

... it seems to me that any number above that one which represents the total count of atoms in the cosmos is a completely inconsequential one.

Ok, perhaps not *completely*, but listen to reason:

Because a number is merely a cognitive label and not a *real* entity (though Pythagoras would take issue here), any number above the 80-digit long one you reference above, wouldn't represent anything.

How could it?

Even if you say that it might represent different classifications or 'orders' of all the atoms in existence, the number would then still be smaller than the 80 digit one.



Ok I'm done.

Submitted by Samo (user info) at 2006-09-27 15:23:54 EDT (#)
Ranking: 0

I don't see why you can't just start from the end and check to see if there are three, if so then store the output and move to the next three until the system checking finds only one or two?

Submitted by Wrightcopy (user info) at 2006-09-27 15:20:16 EDT (#)
Ranking: 1

...

<head explodes>

Submitted by retrospect (user info) at 2006-09-27 15:16:46 EDT (#)
Ranking: 0

who hasnt done that?

Submitted by Amontillado (user info) at 2006-09-27 15:08:11 EDT (#)
Ranking: 2

good luck


You want the truth? You want the truth? You can't handle the truth!
'Cause when you reach over and put your hand into a pile of goo that
used to be your best friend's face, you'll know what to do!

-- Homer Simpson
Secrets of a Successful Marriage