lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Luiz has written four arbitrary precision bindings:
> lbc, lbn, lmapm and lqd.
> 
> Does anyone know what their respective strengths and
> weaknesses are? Which one should we preferably use
> for computation with large integers (aka bignum-s)?

lbn is apparently highly optimized but is integer-only. It depends on
OpenSSL, which you probably already have installed. It has support
for basic cryptography, such as modular operations and prime number
generation. The RSA example in test.lua is much faster than the one in lbc.

lbc is simple, self-contained, and can handle decimals, but is not fast.
It also contains GPL code.

lmapm is complete: contains all elementary functions. I don't know how
fast it is. It seems fast enough.

lqd is not arbitrary precision, just extended precision (4 times the
precision of IEEE double).

If your needs are integer-only and you can use OpenSSL, I suggest lbn.

Of course, the above report are my impressions. I'd be very interested
in other opinions and also in suggestions for other libraries.

Besides my bindings, there's also LGMP by Wim Couwenberg which binds
GMP, a very good arbitrary precision library:
	http://members.chello.nl/~w.couwenberg/