Division with precision of 10,000 decimal digits

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • polterbyte
    New Member
    • Jun 2018
    • 1

    Division with precision of 10,000 decimal digits

    Hi.

    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?)

    Thanks!
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    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".

    Comment

    Working...