Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Nov 20, 2020. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
Latest commit
28 lines (21 loc) · 1.25 KB
/
Copy pathREADME
File metadata and controls
28 lines (21 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
This is a big-number library for Lua 5.1. It is based on the arbitrary
precision library number.c written by Philip A. Nelson for GNU bc-1.06:
http://www.gnu.org/software/bc/
To try the library, just edit Makefile to reflect your installation of Lua and
then run make. This will build the library and run a simple test. For detailed
installation instructions, see
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/install.html
There is no manual but the library is simple and intuitive; see the summary
below. Read also test.lua, which shows the library in action.
This code is hereby placed in the public domain, except number.c and number.h,
which are subject to GPL.
Please send comments, suggestions, and bug reports to lhf@tecgraf.puc-rio.br .
-------------------------------------------------------------------------------
bc library:
__add(x,y) __pow(x,y) digits([n]) mul(x,y) sub(x,y)
__div(x,y) __sub(x,y) div(x,y) neg(x) tonumber(x)
__eq(x,y) __tostring(x) divmod(x,y) number(x) tostring(x)
__lt(x,y) __unm(x) isneg(x) pow(x,y) trunc(x,[n])
__mod(x,y) add(x,y) iszero(x) powmod(x,y,m) version
__mul(x,y) compare(x,y) mod(x,y) sqrt(x)
-------------------------------------------------------------------------------