Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Arbitrary-precision arithmetic unlimited size?

  • 02-12-2009 12:55am
    #1
    Registered Users, Registered Users 2 Posts: 1,190 ✭✭✭


    Are there any libraries that can hold an infinitely large number (excluding the fact that physical and virtual memory is limited of course) . I was looking through some documentation of this and it occurred to me that you could just link multiple arrays together. So for example let's say an array could only fit 3 digits. You could have an array that linked the first third of the number was contained in array 1 the second in array 2 and so on. And then when you run out of array sizes you just keep repeating this on a higher level so the original top level array becomes the first part in a bigger number.


Comments

  • Registered Users, Registered Users 2 Posts: 1,423 ✭✭✭Merrion


    I can't see how that would improve over storing the super very large numbers in a non fixed size memory chunk. (Similar to the way BSTR are stored - the first word of the variable tells you how many words the variable holds)

    However the real trick with super very large numbers is not the memory but performing mathmatical functions sufficiently efficiently to be used.


  • Closed Accounts Posts: 1,397 ✭✭✭Herbal Deity


    wolfric wrote: »
    Are there any libraries that can hold an infinitely large number (excluding the fact that physical and virtual memory is limited of course) .
    of course


Advertisement