Description
Return the smallest triangle-inequality slack for three distances.
Distances between intervals and bounds on metric distances describe geometric separation under declared assumptions. Touching intervals have zero gap; triangle bounds require distances that share a common endpoint in an actual metric.
Return the smallest triangle-inequality slack for three distances.
When to use this tool
Use Measured Distance Triangle Slack when checking a supplied interval gap or metric distance bound.
How to use the tool and how it works
- Enter first, second, third. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read slack, compatible. Inspect compatible before interpreting the associated values.
Return the smallest triangle-inequality slack for three distances. Require nonnegative inputs; take the minimum of a+b-c, a+c-b and b+c-a; compatible means slack >= 0.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Finite number; minimum 0. |
| second | Second | Required. Finite number; minimum 0. |
| third | Third | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| slack | Slack | Required. Finite number. |
| compatible | Compatible | Required. Boolean. |
{
"input": {
"first": 3,
"second": 4,
"third": 5
},
"output": {
"slack": 2,
"compatible": true
}
} Limitations and assumptions
- Zero permits a degenerate triangle; no coordinate construction or measurement tolerance is added.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the full point or set geometry and a suitable metric when you need an actual distance rather than a bound or local term.
References
Similar or alternative tools
- Distance Error Radius Pair Gap
Bound separation of points within two error balls.
- Metric Ball Diameter Bound
Check a necessary metric-ball separation bound.