Skip to content

Commit 6db920b

Browse files
committed
Clarify more some limitations in README
1 parent b361058 commit 6db920b

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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
44
computing with large integers.
55

66
Different from most arbitrary-precision integer libraries in pure Lua out there this one
77
uses 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

1010
The 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.
3030
All the lua arithmetic operators (+, -, *, //, /, %) and bitwise operators (&, |, ~, <<, >>)
3131
are 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

bint.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ when using the proper methods.
4848
All the lua arithmetic operators (+, -, *, //, /, %) and bitwise operators (&, |, ~, <<, >>)
4949
are implemented as metamethods.
5050
51+
The integer size must be fixed in advance and the library is designed to be efficient only when
52+
working with integers of sizes between 64-4096 bits. If you need to work with really huge numbers
53+
without size restrictions then use other library. This choice has been made to have more efficiency
54+
in that specific size range.
55+
5156
## Usage
5257
5358
First on you should require the bint file including how many bits the bint module will work with,

docs/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ <h2>Design goals</h2>
7171
<p>All the lua arithmetic operators (+, -, *, //, /, %) and bitwise operators (&amp;, |, ~, &lt;<, >>)
7272
are implemented as metamethods.</p>
7373

74+
<p>The integer size must be fixed in advance and the library is designed to be efficient only when
75+
working with integers of sizes between 64-4096 bits. If you need to work with really huge numbers
76+
without size restrictions then use other library. This choice has been made to have more efficiency
77+
in that specific size range.</p>
78+
7479
<h2>Usage</h2>
7580

7681
<p>First on you should require the bint file including how many bits the bint module will work with,
@@ -2363,7 +2368,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
23632368
</div> <!-- id="main" -->
23642369
<div id="about">
23652370
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
2366-
<i style="float:right;">Last updated 2020-07-10 10:43:35 </i>
2371+
<i style="float:right;">Last updated 2020-07-10 14:02:03 </i>
23672372
</div> <!-- id="about" -->
23682373
</div> <!-- id="container" -->
23692374
</body>

0 commit comments

Comments
 (0)