Description
Return signedDifference = first-second and relativeDifference = 2*(first-second)/(abs(first)+abs(second)).
Environmental measurements can require background subtraction, recovery correction, calibration or a common reference basis. Corrected values can be signed; a numerical correction is separate from detection, analytical validity and health interpretation.
Return signedDifference = first-second and relativeDifference = 2*(first-second)/(abs(first)+abs(second)).
When to use this tool
Use Ambient Monitor Collocation Relative Gap when checking a supplied measurement correction, comparison or calibration term.
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 signedDifference, relativeDifference. Use the output convention below.
Require abs(first)+abs(second) > 0. Return signedDifference = first-second and relativeDifference = 2*(first-second)/(abs(first)+abs(second)). Both readings share one unit; relativeDifference is a signed fraction and is not multiplied by 100.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Finite number. |
| second | Second | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| signedDifference | Signed Difference | Required. Finite number. |
| relativeDifference | Signed symmetric fraction 2*(first-second)/(abs(first)+abs(second)); not a percent. | Required. Finite number. |
{
"input": {
"first": 12,
"second": 8
},
"output": {
"signedDifference": 4,
"relativeDifference": 0.4
}
} Limitations and assumptions
- Both zero readings are rejected. This signed symmetric gap differs from an absolute relative percent difference; negative readings remain permitted, and the tool does not select a collocation acceptance criterion.
- 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 relevant analytical method, quality-control records and uncertainty model before classifying a corrected measurement.
References
Similar or alternative tools
- Blank Corrected Sample Difference
Compute firstCorrected = firstSample-firstBlank, secondCorrected = secondSample-secondBlank and difference = firstCorrected-secondCorrected.
- Environmental Sample Holding Time Explicit Gap Tool
Calculate environmental sample holding time explicit gap from explicit caller-supplied inputs.