Skip to content

Main content

Specimen Mass Unit Gap Tool

Calculate specimen mass unit gap from explicit caller-supplied inputs.

Loading tool…

Description

Multiply recordedMass by positive unitFactor, then subtract referenceMass to return the signed gap.

A conversion factor maps a quantity onto a declared reporting basis. For ratios and rates, numerator and denominator units must be made coherent before comparison.

Multiply recordedMass by positive unitFactor, then subtract referenceMass to return the signed gap.

When to use this tool

Use Specimen Mass Unit Gap when you need a transparent conversion with factors you already know.

How to use the tool and how it works

  1. Enter recordedMass, unitFactor, referenceMass. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read convertedMass, gap. Use the output convention below.

Multiply recordedMass by positive unitFactor, then subtract referenceMass to return the signed gap.1

Input fieldMeaning and unitsAccepted input
recordedMassRecorded MassRequired. Finite number; minimum 0.
unitFactorUnit FactorRequired. Finite number; strictly above 0.
referenceMassReference MassRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
convertedMassConverted MassRequired. Finite number.
gapSigned difference under the stated subtraction order.Required. Finite number.
json
{
  "input": {
    "recordedMass": 120,
    "unitFactor": 0.001,
    "referenceMass": 0.1
  },
  "output": {
    "convertedMass": 0.12,
    "gap": 0.01999999999999999
  }
}

Limitations and assumptions

  • Mass values must be nonnegative; the unit factor and any acceptable tolerance are supplied externally.
  • 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

Verify the laboratory's unit definitions and analyte-specific factors, then compare converted quantities on the same basis.

References

  1. Calculation and input contract: nephrology/specimen-mass-unit-gap — tool.io

Similar or alternative tools