Math operators
Basic arithmetic, integer division, remainder, and exponentiation.
Syntax
+ - * / div(a,b) % ^
Description
/ always returns a float (7/2=3.5). Integer division is done with div(a,b). % gives the remainder, ^ gives the power (not **).
Example
Loading editor…
Expected output
10 3.5 3 1 1024
When to use?
Calculations, even/odd checks (x % 2).
Common mistakes
- ⚠️ Power is with ^, not **; integer division is div(a,b).