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
- Enter credits, quantum. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| credits | Credits | Required. Array of finite number; minimum 0; maximum items 256. |
| quantum | Positive credit-rounding increment; half ties use JavaScript rounding. | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| sumOfRounded | Sum Of Rounded | Required. Finite number. |
| roundedSum | Rounded Sum | Required. Finite number. |
| gap | Signed difference from the stated reference, using compatible units. | Required. Finite number. |
{
"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
Similar or alternative tools
- Course Credit Weighted Drop One Term
remainingAverage = (weightedTotal-removedScore*removedCredits)/(credits-removedCredits).
- Attendance Partial Session Minute Credit
credit = sessionCredit*attendedMinutes/sessionMinutes.