Skip to content

Main content

Fraction Whole Part Separator Choice Tool

Format nonnegative mixed-fraction components with an explicit whole/fraction separator.

Loading tool…

Description

Join a mixed fraction with space, no-break space or plus; omit a zero fractional part when the whole part is nonzero.

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.

Join a mixed fraction with space, no-break space or plus; omit a zero fractional part when the whole part is nonzero.

When to use this tool

Use Fraction Whole Part Separator Choice when you need the stated ratio or fraction presentation operation.

How to use the tool and how it works

  1. Enter wholePart, numerator, denominator, separator. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read formatted. Use the output convention below.

Require nonnegative integer wholePart and a proper fractional numerator with positive denominator. Join a mixed fraction with space, no-break space or plus; omit a zero fractional part when the whole part is nonzero.1

Input fieldMeaning and unitsAccepted input
wholePartWhole PartRequired. Safe integer; minimum 0.
numeratorNumeratorRequired. Safe integer; minimum 0.
denominatorDenominatorRequired. Safe integer; minimum 1.
separatorSeparatorRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
formattedFormattedRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "wholePart": 2,
    "numerator": 1,
    "denominator": 3,
    "separator": " "
  },
  "output": {
    "formatted": "2 1/3"
  }
}

Limitations and assumptions

  • The fraction is not reduced. Zero whole part still displays numerator/denominator, even 0/denominator; no signed mixed-number grammar is supported.
  • 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

  1. Calculation and input contract: format/fraction-whole-part-separator-choice — tool.io

Similar or alternative tools