Description
Return decimal spacing at a supplied base-ten order and significant-digit count, not binary IEEE spacing.
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.
Return decimal spacing at a supplied base-ten order and significant-digit count, not binary IEEE spacing.
When to use this tool
Use Decimal Ulp At Explicit Exponent 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 exponent, digits. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read ulp. Use the output convention below.
For decimal exponent in -300..300 and significant digits in 1..16 return ulp=10^(exponent-digits+1).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| exponent | Exponent | Required. Safe integer; minimum -300; maximum 300. |
| digits | Digits | Required. Safe integer; minimum 1; maximum 16. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| ulp | Decimal spacing at the supplied exponent, not runtime binary ULP. | Required. Finite number. |
{
"input": {
"exponent": 3,
"digits": 4
},
"output": {
"ulp": 1
}
} Limitations and assumptions
- This is spacing for an explicitly supplied decimal exponent/precision convention, not the binary floating-point ULP of an input value. No value is inspected and very small results use the runtime's finite floating-point approximation.
- 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 Scale Alignment Zero Count
For leftScale and rightScale in 0..128 return commonScale=max(scales), leftZeros=common-leftScale, and rightZeros=common-rightScale.
- Decimal Double Rounding Witness
Demonstrate explicit Math.round half-toward-positive-infinity decimal rounding; this tool intentionally compares rounding policies.