Description
Compute their greatest common divisor by remainders, divide both, and join with a colon.
Fractions and ratios can be displayed with several separators and sign policies. Reducing integer terms, normalizing a denominator sign and merely changing a slash glyph are different operations.
Compute their greatest common divisor by remainders, divide both, and join with a colon.
When to use this tool
Use Ratio Colon Reduction Display when you need the stated ratio or fraction presentation operation.
How to use the tool and how it works
- Enter first, second. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read text. Use the output convention below.
Require nonnegative integer first and positive integer second. Compute their greatest common divisor by remainders, divide both, and join with a colon.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Safe integer; minimum 0. |
| second | Second | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| text | Literal formatted output under the stated grammar and display convention. | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"first": 12,
"second": 18
},
"output": {
"text": "2:3"
}
} Limitations and assumptions
- Zero first reduces to 0:1. The direction and meaning of the ratio are caller supplied; numeric safe-integer limits apply.
- 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 exact rational arithmetic when mathematical equivalence and reduction matter. Choose rendering and direction-isolation behavior for the destination rather than assuming a Unicode slash produces a complete typeset fraction.
References
Similar or alternative tools
- Rational Sign Denominator Canonical Display
Move its sign to the numerator, use the denominator magnitude, and join with a slash.
- Fraction Whole Part Separator Choice
Join a mixed fraction with space, no-break space or plus; omit a zero fractional part when the whole part is nonzero.