More Numbers (Number Emulation)

Monkey Programming Forums/User Modules/More Numbers (Number Emulation)

Goodlookinguy(Posted 2013) [#1]
This module is for emulating gigantic integer numbers. Monkey doesn't support anything past Int32 and I needed some larger numbers. So I thought that I could either make some sort-of native hacky work-around or just make a number emulator. I took the hard path.

Now that it's been months, I finally got it in mostly working order. There are still some small bugs hidden that I even know about, but am not sure how to tackle quite yet.

You can pick up the module here:

* Int64, Int128, which can add/sub/mul/div(some)/mod(some)/shl/shr/lsr and compare greater than [equal], less than [equal], and [not] equal to. All done in binary form.
* Infinite addition, subtraction, and multiplication via strings
* Greater than [equal], and less than [equal] via strings
* Ultra complex code that's likely to trip you up unless you work with electronics.

If you wanna help with anything, go right ahead. Although I must say the code is in a bit of an odd state because half of it was written nearly a year ago and I'm not entirely sure why I did some things the way that I did them.

benmc(Posted 2013) [#2]
This looks great, does it have a license?

Goodlookinguy(Posted 2013) [#3]
I just wrote the answer on the other thread, but I'll put it here too. The module is under the WTFPL like most things I put out. Which is a strong copyleft public domain license.