Positron Compiler Documentation

Mathematic Operations and Functions

Positron8 · Revision 4.0.6.5 · PDF pages 78–79

Mathematic Operations and Functions

Original diagram or table from Positron8, PDF page 78
Original figure / layout · PDF page 78
Text in this figure or table

Mathematic Operations and Functions

View original PDF page 78Open page in PDFOriginal PDF page 78

The Positron8 compiler performs all mathematic operations in full hierarchal order. Which means that there is precedence to the operators. For example, multiplies and divides are performed before adds and subtracts. To ensure the operations are carried out in the correct order use parenthesis to group the operations: -

A = (( B - C ) * ( D + E )) / F

All math operations are signed or unsigned depending on the variable type used, and performed with 8-bit, 16-bit, 24-bit, or 32-bit or floating point precision, again, depending on the variable types and constant values used within the expression. The operators supported are: -

View original PDF page 79Open page in PDFOriginal PDF page 79

Topics