Equals
systemic:core-eqLogicfunction1 crInputs
| Name | Type | Description |
|---|---|---|
| First Value | floatarray | The first numeric series for comparison. |
| Second Value | floatarray | The second numeric series for comparison. |
Outputs
| Name | Type | Description |
|---|---|---|
| EQ | booleanarray | The element-wise equality result. |
The Equals module compares two numeric series element-wise and outputs true wherever values are identical.
| A | B | A == B |
|---|---|---|
| 10 | 10 | true |
| 10 | 11 | false |
| 5.5 | 5.5 | true |
| 0 | 0.001 | false |
Missing Data
If either input is missing (null) at a position — a data gap or a closed-market day — the comparison at that position is null. Two simultaneous gaps are not "equal": null == null is null, never true. The module never invents a comparison result for missing data.
| A | B | A == B |
|---|---|---|
| 10 | null | null |
| null | 10 | null |
| null | null | null |
Equality itself has no undefined cases: any two present values — including infinities — compare to a real true/false, so missing inputs are the only source of nulls in the output.
In live execution the module returns exactly one datapoint — the newest position — which is null when either input is missing there.
Floating-Point Precision
⚠️ Critical: Floating-point numbers may have tiny precision differences that cause unexpected results.
| Expression | Expected | Actual Result |
|---|---|---|
| 0.1 + 0.2 == 0.3 | true | false |
| 1.0000001 == 1.0 | false | false |
Why? Computers store decimals in binary, which can't perfectly represent all fractions. The value 0.1 + 0.2 is stored as 0.30000000000000004, not exactly 0.3.
Workaround: For approximate comparisons, subtract the values and check if the absolute difference is below a small threshold (e.g., |A - B| < 0.0001).
Input Alignment
When inputs have different lengths or frequencies, Systemic automatically aligns them:
| Scenario | Behavior |
|---|---|
| Different lengths | Shorter series is padded by repeating its last value |
| Different frequencies | Lower-frequency series is upsampled to match |
| Constant vs series | Constant is broadcast to all time points |
Practical Example
State detection: Check if RSI exactly equals 50 to detect the neutral zone—though due to floating-point precision, you may prefer using a range check (49.9 < RSI < 50.1) for reliability.
Related Modules
- NEQ — Not Equal (true when values differ)
- GTR / LST — Greater than / Less than comparisons
- GTRE / LSTE — Inclusive comparisons (≥ and ≤)