Fraction Base Termination Check
Check exact rational termination in an explicit integer radix 2–36 by removing denominator factors shared with that radix.
Description
Check exact rational termination in an explicit integer radix 2–36 by removing denominator factors shared with that radix.
A reduced fraction terminates in a base when its remaining denominator factors can all be supplied by powers of that base.
When to use this tool
Check exact rational termination in an explicit integer radix 2–36 by removing denominator factors shared with that radix.
- Prepare the supplied numerator, denominator, base fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter numerator, denominator, base. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.terminates. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Normalize numerator/denominator, require base from 2 to 36, and repeatedly divide the denominator by its greatest common divisor with base until that divisor is one. terminates is true if the remaining denominator is one.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| numerator | Exact signed decimal integer text; denominator fields must be nonzero. | Optional + or - and 1 to 256 decimal digits |
| denominator | Exact signed decimal integer text; denominator fields must be nonzero. | Optional + or - and 1 to 256 decimal digits |
| base | base. | Integer from 2 to 36 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.terminates | Flag for terminates under the exact condition described above. |
{
"input": {
"numerator": "1",
"denominator": "8",
"base": 2
},
"output": {
"result": {
"terminates": true
}
}
} Limitations and assumptions
- No expansion digits are generated. The denominator must be nonzero, and inputs are exact decimal integer strings.
- Numerator and denominator fields use exact decimal integer strings of at most 256 digits with an optional sign. Fractions are reduced with a positive denominator before the stated operation.
- All declared input fields are required and unexpected top-level fields are rejected. Numbers must be finite; lists are limited to 128 entries and ordinary text fields to 8,192 UTF-16 code units, with tighter limits where stated.
- JSON text inputs must parse within bounded nesting and size limits. Numeric outputs outside the safe finite range are rejected; large exact integer results use decimal strings. Indexes and half-open spans are zero-based unless a rank is explicitly described as one-based.
Alternative or Complementary methods
Use exact numerator/denominator operations when equality and boundary decisions matter. Convert to a decimal display only with an explicit rounding policy; a rounded display should not replace the exact result.
References
Similar or alternative tools
- Fraction Decimal Termination Check
Report exact canonical fraction base-ten termination from reduced denominator factors, not approximate decimal expansion.
- Exact Fraction Addition
Exact rational addition using decimal integer text and coprime output; no IEEE-754 precision loss.