Positron Compiler Documentation

Mathematic Operations and Functions

Positron16 · Revision 1.1.3.5 · PDF pages 73–74

Mathematic Operations and Functions

Original diagram or table from Positron16, PDF page 73
Original figure / layout · PDF page 73
Text in this figure or table

Mathematic Operations and Functions

View original PDF page 73Open page in PDFOriginal PDF page 73

The Positron16 compiler performs all maths operations in full hierarchal order. Which means that there is precedence to the operands. 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 16, 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 74Open page in PDFOriginal PDF page 74

Topics