Math Input » History » Version 2
Adam Klama, 06/21/2026 03:15 PM
| 1 | 1 | Adam Klama | # Math Input |
|---|---|---|---|
| 2 | |||
| 3 | ## Overview |
||
| 4 | A **Math Input** combines **two inputs** with a single maths or bitwise |
||
| 5 | operation and reports the result as a new input. Despite the name it can divide, |
||
| 6 | multiply, add, subtract, or do bitwise AND / OR / XOR. Use it to derive a value — |
||
| 7 | a ratio, a sum, a difference — from two existing channels. |
||
| 8 | |||
| 9 | ## Prerequisites & hardware |
||
| 10 | You need: |
||
| 11 | - A **first operand** input (the dividend) — referenced by alias. |
||
| 12 | - A **second operand** input (the divider) — referenced by alias. |
||
| 13 | |||
| 14 | 2 | Adam Klama | Either operand can point at a [Constant Value Input](Constant_Value_Input) if |
| 15 | 1 | Adam Klama | one side is a fixed number. |
| 16 | |||
| 17 | ## Add it in the app |
||
| 18 | 1. Add a new input and choose **Math / Divide Input** as the type. |
||
| 19 | 2. Choose the **two source inputs**. |
||
| 20 | 3. Give it a clear **alias** (e.g. `Gear Ratio`). |
||
| 21 | 4. Pick the **operation**, set the **multiplier**, and set the **infinity value**. |
||
| 22 | |||
| 23 | ## Settings reference |
||
| 24 | |||
| 25 | | Setting | Meaning | Unit | Range / values | Notes | |
||
| 26 | |---|---|---|---|---| |
||
| 27 | | **First operand** | The first input (the dividend in a divide) | — | an existing input (by alias) | Left-hand side of the operation. | |
||
| 28 | | **Second operand** | The second input (the divider in a divide) | — | an existing input (by alias) | Right-hand side of the operation. | |
||
| 29 | | **Operation** | The maths/bitwise operation applied | — | `Divide`, `Multiply`, `Add`, `Subtract`, `And`, `Or`, `Xor` | `And` / `Or` / `Xor` are **bitwise**, not logical. | |
||
| 30 | | **Multiplier** | The result is multiplied by this | — | sint32 | Use it to keep integer precision — e.g. `100` to express a ratio as hundredths. Set `1` for no scaling. | |
||
| 31 | | **Infinity value** | Value returned instead of dividing by zero | result's unit | sint32 | Used when the second operand is `0` in a `Divide`. Guards against divide-by-zero. | |
||
| 32 | |||
| 33 | **Formula:** the result is `(first OP second) * multiplier`. For example with |
||
| 34 | `Divide` and a **multiplier** of `100`, dividing `3000` by `1500` reports `200` |
||
| 35 | (i.e. 2.00). |
||
| 36 | |||
| 37 | ## Common settings |
||
| 38 | 2 | Adam Klama | Math / Divide Input also uses the shared setting — alias. See [Common IO Settings](Common_IO_Settings). |
| 39 | 1 | Adam Klama | |
| 40 | ## Example — engine-to-output speed ratio |
||
| 41 | 1. Type **Math / Divide Input**, alias `Speed Ratio`. |
||
| 42 | 2. **First operand** = `Engine Speed`, **Second operand** = `Output Speed`. |
||
| 43 | 3. **Operation** `Divide`. |
||
| 44 | 4. **Multiplier** `100` so the ratio is reported in hundredths (2.50 reads as |
||
| 45 | `250`). |
||
| 46 | 5. **Infinity value** `0` so a stationary output (divider = 0) reports `0` |
||
| 47 | instead of faulting. |
||
| 48 | |||
| 49 | ## Troubleshooting |
||
| 50 | - **Result is always the infinity value:** the second operand is `0` (or near it) |
||
| 51 | in a divide — check that source input. |
||
| 52 | - **Result looks rounded / always whole:** these are integer maths; raise the |
||
| 53 | **multiplier** (e.g. `*100`) to keep fractional precision. |
||
| 54 | - **And / Or / Xor gives odd numbers:** remember they operate **bit by bit**, not |
||
| 55 | 2 | Adam Klama | as true/false — use a [Compare Input](Compare_Input) for logical conditions. |
| 56 | 1 | Adam Klama | |
| 57 | ## Related |
||
| 58 | 2 | Adam Klama | - [Constant Value Input](Constant_Value_Input) — supply a fixed operand. |
| 59 | - [Map Input](Map_Input) — reshape a single input through a curve. |
||
| 60 | - [Compare Input](Compare_Input) — turn a derived value into a true/false. |