home : bigmath

 

   [BigMath - Light Weight, Fast Code for Arbitrary Precision Arithmetic]

Based partly on Knuth's Seminumerical Algorithms (as best as I could manage), and written in C, BigMath aims to be light-weight and fast. Its original implementation was for use within a kernel extension - thus size and speed were essential.

BigMath supports only integer math, including add, sub, mul, div, mod, modpow, modinv, pow, gcd, factorial (lazy), radix conversion, scientific notation and various comparisons.

I'll be expanding the capabilities of the library as I am able. I am releasing this code under the BSD License.

You can view the source code here.

Download the latest version: BigMath-20080428-1.

   [20080428-1]

This release includes support for calculating nth roots, which puts me one step closer to fast factorial support. Also, I've added string-to-bignum support, which let's one do this sort of thing: bignum_cstr_base(mynum, 10, "1234567890", 10). Lastly, I've made a little progress on my calculator gui, which is included. It's not quite at the point of being useful yet.




© Curtis Jones, 2007 All Rights Reserved