Description
Round points up or down to a multiple of positive integer quantum for roundedExpiry.
Rounding to a quantum chooses a representable multiple. Upward, downward, half-even, and away-from-zero policies differ at boundaries and can change signed residuals.
Round points up or down to a multiple of positive integer quantum for roundedExpiry.
When to use this tool
Use Loyalty Expiry Rounding Credit when you need a rounding result under an explicit policy.
How to use the tool and how it works
- Enter points, quantum, roundUp. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read roundedExpiry, retained. Use the output convention below.
Round points up or down to a multiple of positive integer quantum for roundedExpiry. Return points minus that rounded amount as retained.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| points | Points | Required. Safe integer; minimum 0. |
| quantum | Quantum | Required. Safe integer; minimum 1. |
| roundUp | Round Up | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| roundedExpiry | Rounded Expiry | Required. Safe integer. |
| retained | Points minus roundedExpiry; can be negative under round-up policy. | Required. Safe integer. |
{
"input": {
"points": 103,
"quantum": 10,
"roundUp": false
},
"output": {
"roundedExpiry": 100,
"retained": 3
}
} Limitations and assumptions
- Rounding up can make retained negative; the tool reports the arithmetic rather than enforcing a loyalty balance 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 decimal or exact arithmetic when contractual decimal ties or currency rules require it.
References
Similar or alternative tools
- Forecast Error Quantum Tie Policy
Divide abs(error) by positive quantum and round to the nearest integer.
- Campaign Test Cell Allocation Rounding
Floor audience × firstFraction for first and assign the remainder to second.