Skip to content

Commit 9218a49

Browse files
committed
Update readme example
1 parent fcdcb04 commit 9218a49

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ Or just copy the `bint.lua` file, the library is self contained in this single f
6161
## Examples
6262

6363
```lua
64-
local bint = require 'bint'
65-
bint.scale(256) -- use 256 bit integers
64+
local bint = require 'bint'(256) -- use 256 bits integers
6665
local x = bint(1)
6766
x = x << 128
6867
print(x) -- outputs: 340282366920938463463374607431768211456
68+
assert(tostring(x) == '340282366920938463463374607431768211456')
6969
```
7070

7171
For more usage examples check the

examples/simple.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local bint = require 'bint'(256)
1+
local bint = require 'bint'(1024) -- use 256 bits integers
22
local x = bint(1)
33
x = x << 128
44
print(x) -- outputs: 340282366920938463463374607431768211456

0 commit comments

Comments
 (0)