Skip to content

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.

Binary Operators

Usage Action Notes
+ Adds
- Subtracts
* Multiplies
/ Divides
% Modulo(Remainder)
^ Exponentiation Note for longs, both operands must be positive

Unary Operators

Usage Action
- Negate