11# Lua Bint
22
3- Small portable arbitrary precision integer arithmetic library in pure Lua for
3+ Small portable arbitrary- precision integer arithmetic library in pure Lua for
44computing with large integers.
55
66Different from most arbitrary-precision integer libraries in pure Lua out there this one
77uses an array of lua integers as underlying data-type in its implementation instead of
8- using strings or large tables, so regarding that aspect this library should be more efficient.
8+ using strings or tables of digits , so regarding that aspect this library should be more efficient.
99
1010The library implementation was highly inspired by
1111[ tiny-bignum-c] ( https://github.com/kokke/tiny-bignum-c ) .
@@ -30,6 +30,11 @@ when using the proper methods.
3030All the lua arithmetic operators (+, -, * , //, /, %) and bitwise operators (&, |, ~ , <<, >>)
3131are implemented as metamethods.
3232
33+ The integer size must be fixed in advance and the library is designed to be efficient only when
34+ working with integers of sizes between 64-4096 bits. If you need to work with really huge numbers
35+ without size restrictions then use other library. This choice has been made to have more efficiency
36+ in that specific size range.
37+
3338## Features
3439
3540* Small, simple and self contained
@@ -85,8 +90,9 @@ To check if everything is working as expected under your machine run `lua tests.
8590
8691## Limitations
8792
88- It is intended only to be used in Lua 5.3 and 5.4. The library can theoretically be backported
89- to Lua 5.1/LuaJIT but there is no plan at the moment.
93+ It is intended only to be used in Lua 5.3+.
94+ The library can theoretically be backported to Lua 5.1/LuaJIT but there is no plan at the moment.
95+ The integer size is limited in advance, this is a design choice.
9096
9197## License
9298
0 commit comments