mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2002-12-20, 00:42   #1
Quantum Skyline
 
Dec 2002

2 Posts
Default Converting big numbers to and from binary and decimal

Hi,

I hope you guys can answer this, here seems to be the place for discussing math dealing with huge numbers...

Does anybody know of any fast algorithms that can be used to convert big integers (several million digits) from binary to decimal? Any recommendations on how to program this? Any suggestions will be helpful - languages, data structures, etc. I'm basically looking to not do a brute force conversion that I did in high school.

Thank you,

Quantum Skyline
Quantum Skyline is offline   Reply With Quote
Old 2002-12-20, 03:56   #2
cperciva
 
Oct 2002

43 Posts
Default

The standard algorithm is binary splitting; it takes O(n (log n)^2) time. You'll find it in Knuth's volume 2.
cperciva is offline   Reply With Quote
Old 2002-12-21, 01:10   #3
battlemaxx
 
battlemaxx's Avatar
 
Nov 2002

2B16 Posts
Default

I was wondering if you'd work with "big numbers" via unicode or strings as opposed to int, or long...
battlemaxx is offline   Reply With Quote
Old 2002-12-21, 03:10   #4
battlemaxx
 
battlemaxx's Avatar
 
Nov 2002

1010112 Posts
Default

http://home.earthlink.net/~usondermann/progtip.html#Top
battlemaxx is offline   Reply With Quote
Old 2002-12-21, 22:38   #5
Quantum Skyline
 
Dec 2002

2 Posts
Default

Quote:
Originally Posted by battlemaxx
http://home.earthlink.net/~usondermann/progtip.html#Top
Thanks for the web site...I'm going to check it out.

Now let's see if my library has a copy of Knuth's books (and if I still have my library card).

Quantum Skyline
Quantum Skyline is offline   Reply With Quote
Old 2002-12-27, 19:23   #6
battlemaxx
 
battlemaxx's Avatar
 
Nov 2002

43 Posts
Default

I have the three volumes, I think they are original editions. So if you need something from one of them, let me know.
battlemaxx is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is every product of distinct Fermat numbers symmetrical in binary? only_human Puzzles 9 2015-06-26 10:30
very long binary representation to decimal davar55 Programming 24 2014-12-07 00:19
How to convert 5495-bit binary number to decimal? Stargate38 Software 12 2012-02-07 21:19
Square numbers and binary representation ET_ Miscellaneous Math 40 2010-06-06 12:55
decimal-binary prime pairs ixfd64 Math 2 2003-10-16 13:40

All times are UTC. The time now is 19:55.

Wed Apr 14 19:55:18 UTC 2021 up 6 days, 14:36, 0 users, load averages: 3.37, 3.02, 2.65

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.