Description
For nonnegative integer requiredCount and availableCount, return their positive shortfall and positive surplus separately.
Stock quantities can be counted as individual units, packages, or capacity groups. Tolerance checks compare a signed discrepancy with supplied bounds; those bounds are an input policy rather than a measured certainty.
For nonnegative integer requiredCount and availableCount, return their positive shortfall and positive surplus separately.
When to use this tool
Use Protective Stock Size Shortfall when you need a packing count or quantity comparison under a supplied capacity or tolerance.
How to use the tool and how it works
- Enter requiredCount, availableCount. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read shortfall, surplus. Use the output convention below.
For nonnegative integer requiredCount and availableCount, return their positive shortfall and positive surplus separately.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| requiredCount | Required Count | Required. Safe integer; minimum 0. |
| availableCount | Available Count | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| shortfall | Shortfall | Required. Safe integer. |
| surplus | Surplus | Required. Safe integer. |
{
"input": {
"requiredCount": 25,
"availableCount": 18
},
"output": {
"shortfall": 7,
"surplus": 0
}
} Limitations and assumptions
- Counts do not establish correct sizing, protective certification, condition, suitability, or safety of equipment.
- 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 physical counts and the applicable receiving policy before resolving a stock discrepancy.
References
Similar or alternative tools
- Intervention Coverage Shortfall
Divide nonnegative coveredCount by positive targetCount for coverageFraction and floor target minus covered at zero for shortfallCount.
- Dialogue Language Access Gap
Deduplicate requestedLanguages and return the exact strings absent from supportedLanguages.