Skip to content

Commit 31f7271

Browse files
committed
bigint.abs
1 parent 8c5462c commit 31f7271

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/Runtime Environment/Bigint.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ local bigint = require "pluto:bigint"
7474
print(-new bigint(10)) --> -10
7575
```
7676

77+
---
78+
### `bigint.abs`
79+
Returns a new bigint with the sign bit zeroed.
80+
```pluto
81+
local bigint = require "pluto:bigint"
82+
print(new bigint(-10):abs()) --> 10
83+
```
84+
7785
---
7886
### `bigint.pow`, `__pow`
7987
Performs expontentiation on two bigints. Returns a new bigint.

0 commit comments

Comments
 (0)