Mathematic Operations and Functions
Positron16 · Revision 1.1.3.5 · PDF pages 73–74
Mathematic Operations and Functions

Text in this figure or table
Mathematic Operations and Functions
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: -
Topics
Standard operatorsPDF page 74Logical operatorsPDF page 74Positron16 operatorsPDF page 74Trigonometry functionsPDF page 75AbsPDF page 89fAbsPDF page 90dAbsPDF page 91AcosPDF page 92dAcosPDF page 93AsinPDF page 94dAsinPDF page 95AtanPDF page 96dAtanPDF page 97Atan2PDF page 98dAtan2PDF page 99CeilPDF page 100dCeilPDF page 101CosPDF page 102dCosPDF page 103DcdPDF page 104Dig '?'PDF page 105ExpPDF page 106dExpPDF page 107FloorPDF page 108dFloorPDF page 109fRoundPDF page 110dRoundPDF page 111ISinPDF page 112ICosPDF page 113IsqrPDF page 114LogPDF page 115dLogPDF page 116Log10PDF page 117dLog10PDF page 118ModfPDF page 119ModdPDF page 120NcdPDF page 121PowPDF page 122dPowPDF page 123Rev '@'PDF page 124SinPDF page 125dSinPDF page 126SqrPDF page 127dSqrPDF page 128TanPDF page 129dTanPDF page 130

