This library gives you the ability to work with real numbers of any length. (Depending on your computer and your patience.)
It is both faster* and more versatile than previous BYOND bignum libraries. It can handle math with decimal precision and both positive and negative numbers.
For example:
Say you wanted to multiply:
13,563,757,534,732.345324 * -324,236,743.45
This library allows you to do so.
(The answer is: -4397868572007015915234.5951278)
Check out the reference here: http://files.byondhome.com/Asielen/RealBigNum.Asielen.html
Currently this library supports the four basic functions:
Add
Subtract
Multiply
Divide
as well as number comparisons, rounding, and factorials.
More functions to come in the future.
*Here is a full evaluation of the speed:
http://files.byondhome.com/Asielen/ RealBigNum%20Performance%20Profile.pdf
(full excel results:
http://files.byondhome.com/Asielen/bignumstats.xlsx )
6/11/12 - Realized the link was broken. Fixed it
7/24/12 - v111
-Fixed some bugs and added a couple features
12/31/12 – v113
–Fixed a bug that didn't let you multiply in the demo
–Couple minor features
http://byond-wiki.wikispaces.com/
ID:471185
Mar 7 2012, 10:00 pm
|
|
Jan 27 2013, 8:24 am (Edited on Jan 27 2013, 10:20 am)
|
|
Is there any way you could add a random proc for this?
|