Description
Return the signed difference between two squared distances.
Weighted coordinate distances depend on whether weights multiply absolute differences or squared differences. Zero weights can make different vectors equivalent, and derivatives at a zero distance or absolute-value corner need explicit treatment.
Return the signed difference between two squared distances.
When to use this tool
Use Distance Squared Difference Of Squares when checking one weighted-axis contribution, support rule or derivative.
How to use the tool and how it works
- Enter first, second. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read squaredDifference. Use the output convention below.
Return the signed difference between two squared distances. Require nonnegative first and second; squaredDifference = (first-second)*(first+second).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Finite number; minimum 0. |
| second | Second | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| squaredDifference | first²-second²; signed and in squared length units. | Required. Finite number. |
{
"input": {
"first": 5,
"second": 3
},
"output": {
"squaredDifference": 16
}
} Limitations and assumptions
- This is first squared minus second squared, not the square of their difference.
- 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 a complete distance implementation with an explicit weighting and missing-coordinate convention for vector comparison and optimization.
References
Similar or alternative tools
- Distance: Absolute Log Ratio Distance
Return absolute logarithmic ratio distance between positive scalars.
- One Dimensional Minkowski Root Contribution
Return one powered Minkowski-distance contribution.