Description
Parse decimalToken as a bounded signed decimal integer and return safeInteger when it lies within JavaScript's inclusive safe-integer limits.
A number written as decimal text and a JavaScript binary floating-point number have different representation limits. Safe-integer range, exact representability, and adjacent floating-point values are distinct concepts. A boundary helper needs to state which one it tests and what an unavailable result means.
Parse decimalToken as a bounded signed decimal integer and return safeInteger when it lies within JavaScript's inclusive safe-integer limits.
When to use this tool
Use Integer Boundary Representability when you need the specific numerical range or representation property under the stated number convention.
How to use the tool and how it works
- Enter decimalToken. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read safeInteger. Inspect safeInteger before interpreting the associated values.
Parse decimalToken as a bounded signed decimal integer and return safeInteger when it lies within JavaScript's inclusive safe-integer limits.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| decimalToken | Decimal Token | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| safeInteger | Whether the exact integer lies within the safe-integer range; not a general exact-representability test. | Required. Boolean. |
{
"input": {
"decimalToken": "9007199254740992"
},
"output": {
"safeInteger": false
}
} Limitations and assumptions
- This tests the safe-integer range, not whether a larger particular integer happens to have an exact binary64 representation. Input syntax excludes exponent notation and decimals; no numeric conversion is returned.
- The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.
- 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. Signed zero is exported as zero.
Alternative or Complementary methods
Choose exact decimal-integer arithmetic for integer-range questions and explicit floating-point analysis for representable-neighbor questions. Match the method to the numerical property being tested.
References
Similar or alternative tools
- Numeric Open Boundary Neighbor
Return the adjacent finite binary64 value, with an explicit false flag when the next value would be infinite.
- BCP 47 Extlang Subtag Boundary
Split a language-tag-shaped string into language, up to three extlang-shaped parts, and a remainder.