Description
Compute its nonnegative Euclidean remainder and return lower=value-remainder and upper=lower when divisible or lower+multiple otherwise, as exact decimal strings.
Exact integer arithmetic and finite numeric arithmetic have different range limits. A safe integer number is bounded by +/-9007199254740991, while supported decimal-integer text can represent larger values. Division and remainder also need a signed convention: truncating quotients and Euclidean nonnegative remainders can give different results.
Compute its nonnegative Euclidean remainder and return lower=value-remainder and upper=lower when divisible or lower+multiple otherwise, as exact decimal strings.
When to use this tool
Use Integer Multiple Nearest Lower Upper when you need this exact stated integer sign, bound, division, comparison, or factor component.
How to use the tool and how it works
- Enter value, multiple. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read lower, upper. Use the output convention below.
Parse a signed decimal value and positive decimal multiple. Compute its nonnegative Euclidean remainder and return lower=value-remainder and upper=lower when divisible or lower+multiple otherwise, as exact decimal strings.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Supplied scalar or returned value under the stated operation. | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| multiple | Multiple | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| lower | Lower | Required. Text; maximum UTF-16 length 8192. |
| upper | Upper | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"value": "-7",
"multiple": "3"
},
"output": {
"lower": "-9",
"upper": "-6"
}
} Limitations and assumptions
- Negative values use mathematical lower and upper bounds, not truncation toward zero. This brackets multiples without choosing the nearer one or a midpoint 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.
Alternative or Complementary methods
Use exact decimal-integer tools when the range exceeds safe numeric integers. State the division, remainder, midpoint, and zero convention before combining results from different operations.
References
Similar or alternative tools
- Integer Nearest Multiple Tie Policy
For positive integer step compute q=floor(integer/step) and r=integer-q*step.
- Integer Ceiling Division Sign Case
Return exact ceiling quotient and remainder=numerator-quotient*denominator as decimal strings.