Description
For leftScale and rightScale in 0..128 return commonScale=max(scales), leftZeros=common-leftScale, and rightZeros=common-rightScale.
Decimal rounding and scale alignment depend on retained places, discarded digits, tie rules, and the number of rounding stages. A decimal spacing is different from the binary floating-point spacing of a runtime number. Text-based digit operations can preserve widths that disappear when a value is parsed numerically.
For leftScale and rightScale in 0..128 return commonScale=max(scales), leftZeros=common-leftScale, and rightZeros=common-rightScale.
When to use this tool
Use Decimal Scale Alignment Zero Count when you need this specific decimal tie, scale, digit-carry, spacing, or staged-rounding check.
How to use the tool and how it works
- Enter leftScale, rightScale. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read commonScale, leftZeros, rightZeros. Use the output convention below.
For leftScale and rightScale in 0..128 return commonScale=max(scales), leftZeros=common-leftScale, and rightZeros=common-rightScale.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| leftScale | Left Scale | Required. Safe integer; minimum 0; maximum 128. |
| rightScale | Right Scale | Required. Safe integer; minimum 0; maximum 128. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| commonScale | Common Scale | Required. Safe integer. |
| leftZeros | Left Zeros | Required. Safe integer. |
| rightZeros | Right Zeros | Required. Safe integer. |
{
"input": {
"leftScale": 2,
"rightScale": 5
},
"output": {
"commonScale": 5,
"leftZeros": 3,
"rightZeros": 0
}
} Limitations and assumptions
- Scales are supplied nonnegative decimal places. This budgets coefficient zero-padding to a common scale without parsing coefficients, changing values, adding numbers, or choosing a display format.
- 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 an exact decimal representation when binary floating-point rounding is inadequate. Apply a complete rounding rule rather than treating a tie-only flag or digit-count term as the whole decision.
References
Similar or alternative tools
- Decimal Ulp At Explicit Exponent
Return decimal spacing at a supplied base-ten order and significant-digit count, not binary IEEE spacing.
- Decimal Place Carry Cascade Count
Increment a nonnegative decimal digit string while retaining its minimum width and counting trailing-nine carries.