Skip to content

Main content

Credit Component Rounding Gap Tool

Compare component versus total credit rounding to an explicit quantum using nearest ties toward positive infinity.

Loading tool…

Description

Round each value as Math.round(value/quantum)*quantum and sum for sumOfRounded; separately round the unrounded total for roundedSum; gap is their difference.

Scoring rules combine points, item weights, boundaries and policies for omission, extra credit or missing items. A computed mark is meaningful only under those explicit rules; applying a rule does not establish its fairness or official status.

Round each value as Math.round(value/quantum)*quantum and sum for sumOfRounded; separately round the unrounded total for roundedSum; gap is their difference.

When to use this tool

Use Credit Component Rounding Gap when checking one supplied scoring contribution or policy boundary.

How to use the tool and how it works

  1. Enter credits, quantum. 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 sumOfRounded, roundedSum, gap. Use the output convention below.

Require positive quantum and nonnegative credits. Round each value as Math.round(value/quantum)*quantum and sum for sumOfRounded; separately round the unrounded total for roundedSum; gap is their difference.1

Input fieldMeaning and unitsAccepted input
creditsCreditsRequired. Array of finite number; minimum 0; maximum items 256.
quantumPositive credit-rounding increment; half ties use JavaScript rounding.Required. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
sumOfRoundedSum Of RoundedRequired. Finite number.
roundedSumRounded SumRequired. Finite number.
gapSigned difference from the stated reference, using compatible units.Required. Finite number.
json
{
  "input": {
    "credits": [
      0.4,
      0.4
    ],
    "quantum": 1
  },
  "output": {
    "sumOfRounded": 0,
    "roundedSum": 1,
    "gap": -1
  }
}

Limitations and assumptions

  • This uses binary floating point and JavaScript nearest rounding with nonnegative half ties upward, not decimal or institutional credit-rounding policy.
  • 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 complete approved rubric and score record for an official outcome, and examine measurement quality separately.

References

  1. Calculation and input contract: education/credit-component-rounding-gap — tool.io

Similar or alternative tools