Large Integer Arithmetic
BlitzMax Forums/BlitzMax Programming/Large Integer Arithmetic
| ||
Does anyone have a type or a set of functions for large integer arithmetic like bignum (http://en.wikipedia.org/wiki/Bignum) or something alike? Couldn't find any from the code archives. |
| ||
There's a module which can handle numbers with up to 2,147,483,647 digits : http://code.google.com/p/maxmods/wiki/MapmModule That qualifies for a reasonably large integer. |
| ||
Thanks! Exactly what I was looking for. |
| ||
Does that mod use a whole byte just to store one digit? |
| ||
I believe so, yes. It was the best non-GPL'd library I could find. You are always free to write your own, of course :-) |
| ||
Dude, that's 2 *BILLION* digits! I can imagine that my virtual memory page swapping would go into overdrive handling that number! ;) Thanks for wrapping the code, though, Brucey! (BRL should have you on their payroll, if you ask me...) Russell |
| ||
I can imagine that my virtual memory page swapping would go into overdrive handling that number! ;) It's only about 2GB :) |