This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
manual:Calculations [2019/06/17 23:59] peternlewis [Operators] |
manual:Calculations [2019/07/04 04:20] peternlewis |
||
---|---|---|---|
Line 30: | Line 30: | ||
| Arithmetic Operators\\ • Add (`+`)\\ • Subtract (`-`)\\ • Multiply (`*`)\\ • Divide (`/`) | A mathematical function that takes two operands and performs a calculation on them. | | | Arithmetic Operators\\ • Add (`+`)\\ • Subtract (`-`)\\ • Multiply (`*`)\\ • Divide (`/`) | A mathematical function that takes two operands and performs a calculation on them. | | ||
| [Modulo](https://en.wikipedia.org/wiki/Modulo_operation) (`i MOD n`) | The remainder of the division of `i` by `n`.\\ Both values (`i`, `n`) will be treated as integer.\\ `n` must not be 0.\\ the sign of the result is the same as the sign of i. | | | [Modulo](https://en.wikipedia.org/wiki/Modulo_operation) (`i MOD n`) | The remainder of the division of `i` by `n`.\\ Both values (`i`, `n`) will be treated as integer.\\ `n` must not be 0.\\ the sign of the result is the same as the sign of i. | | ||
- | | Integer division (`i DIV n`) | The integer quotient of the division of `i` by `n`.\\ Both values (`i`, `n`) will be treated as integer.\\ `n` must not be 0.\\ the sign of the result matches the sign of regular division. | | + | | Integer division (`i DIV n`) (v9.0+)| The integer quotient of the division of `i` by `n`.\\ Both values (`i`, `n`) will be treated as integer.\\ `n` must not be 0.\\ the sign of the result matches the sign of regular division. | |
| Power Operator (`^`) | exponentiation. | | | Power Operator (`^`) | exponentiation. | | ||
| Unary Prefix Operators (`√`, `-`, `( )` ) | square root, negation, sub-expressions. | | | Unary Prefix Operators (`√`, `-`, `( )` ) | square root, negation, sub-expressions. | | ||
Line 44: | Line 44: | ||
Operators and functions must be in uppercase to minimize conflict with variables. | Operators and functions must be in uppercase to minimize conflict with variables. | ||
+ | |||
===== Functions ===== | ===== Functions ===== | ||
The available functions are listed on the [[/Functions|wiki Functions page]]. | The available functions are listed on the [[/Functions|wiki Functions page]]. | ||
- | You can insert a function by name by choosing [[Menus#Insert_Function_by_Name|Insert Function by Name]] from the [[Menus#Edit|Edit menu]]. | + | You can insert a function by name by choosing from the [[Menus#Insert_Function|Edit ➤ Insert Function menu]] or choosing the [[Menus#Insert_Function_by_Name|Edit ➤ Insert Function by Name menu]]. |
===== Variables ===== | ===== Variables ===== | ||
Line 123: | Line 124: | ||
</code> | </code> | ||
- | --- | ||
- | |||
- | **KeyWords:** MOD, Modulo |