By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,207 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

Division with precision of 10,000 decimal digits

P: 1

I need to make a series of divisions with a precision of 10,000 decimal digits (or larger). I believe the best way to achieve this is with a linked list, with each node holdings six orders of magnitude more than the predecessor node, and so forth. Thus, the division of, say 1/9753, which yields a period 3250 digits long can be represented in its totality in the data structure, a few times over.

Can anyone suggest an algorithm that would work on these conditions? (Or point me in the direction of a similar solution already posted here?)

Jun 29 '18 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
There are several "big number" libraries already written that you can purchase.

Some store large values in strings and write code to do math on the strings. Others allocate memory (as you would in a string) and use the bits for the values. Again writing code to make this happen.

I recommend acquiring a commercial library rather than spending a ton of time creating one in your own vision.

Start by doing a google on "C++ very big numbers".
Jun 30 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.