Skip to content

Commit 9b572cf

Browse files
committed
Integer Exponentiation
1 parent 980fd39 commit 9b572cf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/New Operators.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ a++
4949
print(a) --> 5
5050
```
5151

52+
## Integer Exponentiation
53+
Exponentiates 2 integers, as opposed to Lua's `^` which is floating point based.
54+
```pluto
55+
print(2 ** 2) --> 4
56+
print(2 ^ 2) --> 4.0
57+
```
58+
```pluto
59+
print(30 ** 30) --> 2565992168703393792
60+
print(30 ^ 30) --> 2.0589113209465e+44
61+
```
62+
5263
## Comparison Chaining
5364
The `<`, `<=`, `>`, and `>=` operators can now be chained successively.
5465

0 commit comments

Comments
 (0)