-
Notifications
You must be signed in to change notification settings - Fork 5
Integer and Float Operators
Michael Wang edited this page Sep 7, 2021
·
1 revision
Most common numerical operators are covered in this wiki article, however SuperForth doesn't support any binary operators(ie >>
, &
, |
, etc...). All the operators listed below apply to both floats and integers.
Note: SuperForth applies automatic type casting from longs to floats whenever necessary, however because casting floats to longs can result in potential data loss, implicit float to long casting without using the ceil or floor functions is not supported.
Usage | Action | Notes |
---|---|---|
+ |
Adds | |
- |
Subtracts | |
* |
Multiplies | |
/ |
Divides | |
% |
Modulo(Remainder) | |
^ |
Exponentiation | Note for longs, both operands must be positive |
Usage | Action |
---|---|
- |
Negate |
- Getting Started
- The Language and Syntax
- Type Declarations
- Primitive Values
- Collection/Object Values
- Operators
-
The Standard Library
- More docs coming soon after APs.
- FFI and Interoperability
- The Implementation