Positron Compiler Documentation

Mathematic Operations and Functions

Source: Positron8 Compiler User Manual, PDF page 78
Mathematic Operations and Functions chapter divider

Mathematic

Operations

and

Functions

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: -

Subtopics