Math
Common mathematical operations.
Definitions:
String Types:
- Comparison: Used when comparing values.
Commands:
- Absolute value: Remove the sign from a value and return its positive value.
- Add:value: Add two numbers and return the result.
- Decrease:[by:] Decrease a stored value and, optionally, return the new value.
- Divide:value: Divide one number by another and return the result.
- Increase:[by:] Increase a stored value and, optionally, return the new value.
- Is:matching:num:[within:] Compare two numbers.
- Is:matching:text: Compare two text values in "lexical" ( alphabetical ) order.
- Is:matching:value: Compare two values.
- Mod:value: Divide one number by another and return the remainder.
- Multiply:value: Multiply two numbers and return the result.
- Subtract:value: Subtract two numbers and return the result.
String Types
Comparison
Used when comparing values. The options are:
Commands
Remove the sign from a value and return its positive value.
Slots:
Terms:
value: | NumEval | The value to normalize. |
Add two numbers and return the result.
Slots:
Terms:
Decrease a stored value and, optionally, return the new value.
Slots:
Terms:
Divide one number by another and return the result.
Slots:
Terms:
Increase a stored value and, optionally, return the new value.
Slots:
Terms:
Compare two numbers.
Slots:
Terms:
Is: | NumEval | The first number. |
matching: | Comparison | The specific way to compare the two numbers. |
num: | NumEval | The second number. |
within: optional | Num | A positive value to indicate how close the two numbers can be. |
Compare two text values in "lexical" ( alphabetical ) order.
Slots:
Terms:
Is: | TextEval | The first text value. |
matching: | Comparison | The specific way to compare the two text values. |
text: | TextEval | The second text value. |
Compare two values. If the two values are of different types, this will attempt -- in a limited way -- to coerce the second value to match the type of the first value before comparing them.
Any value can be coerced to bool ( following the truthiness rules for [IsValue] ), and bool and num values can be coerced into text. Otherwise, the types of the values must match exactly.
Numbers are compared using an internally determined default tolerance. To control the tolerance between numbers, use [CompareNum].
Slots:
Terms:
Is: | Assignment | The first value. If needed, the second value will coerced to match the type of the first. |
matching: | Comparison | The specific way to compare the two values. |
value: | Assignment | The first value. If needed, this value will coerced to match the type of the first value. |
Divide one number by another and return the remainder.
Slots:
Terms:
Multiply two numbers and return the result.
Slots:
Terms:
Subtract two numbers and return the result.