Skip to content

Commit 8c5462c

Browse files
committed
bigint __unm
1 parent 9b572cf commit 8c5462c

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
@@ -66,6 +66,14 @@ local bigint = require "pluto:bigint"
6666
print(new bigint(10) % new bigint(3)) --> 1
6767
```
6868

69+
---
70+
### `__unm`
71+
Returns a new bigint with the sign bit flipped.
72+
```pluto
73+
local bigint = require "pluto:bigint"
74+
print(-new bigint(10)) --> -10
75+
```
76+
6977
---
7078
### `bigint.pow`, `__pow`
7179
Performs expontentiation on two bigints. Returns a new bigint.

0 commit comments

Comments
 (0)