-   Math (
-   -   Converting big numbers to and from binary and decimal (

Quantum Skyline 2002-12-20 00:42

Converting big numbers to and from binary and decimal

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

cperciva 2002-12-20 03:56

The standard algorithm is binary splitting; it takes O(n (log n)^2) time. You'll find it in Knuth's volume 2.

battlemaxx 2002-12-21 01:10

I was wondering if you'd work with "big numbers" via unicode or strings as opposed to int, or long...

battlemaxx 2002-12-21 03:10

Quantum Skyline 2002-12-21 22:38


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

battlemaxx 2002-12-27 19:23

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

All times are UTC. The time now is 01:06.

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