Skip to content

Main content

Digit Reversal Fixed Point Tool

Compare a fixed-width uppercase digit string to its reversal, preserving leading zeroes.

Loading tool…

Description

Compare a fixed-width uppercase digit string to its reversal, preserving leading zeroes.

A positional representation depends on its radix, digit range, sign convention, and treatment of leading zeros. Ordinary bases use digits from zero through radix minus one, while negative and bijective bases have different conversion rules. A single carry, borrow, or denominator step is distinct from formatting a complete number.

Compare a fixed-width uppercase digit string to its reversal, preserving leading zeroes.

When to use this tool

Use Digit Reversal Fixed Point when you need this digit, carry, borrow, sign, width, or denominator component for an explicit radix convention.

How to use the tool and how it works

  1. Enter digits, base. 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 reversed, fixedPoint. Inspect fixedPoint before interpreting the associated values.

For base in 2..36 require nonempty uppercase digits 0-9/A-Z all below the base. Reverse the literal digit sequence and return reversed and fixedPoint on exact equality.1

Input fieldMeaning and unitsAccepted input
digitsUppercase positional digit text with leading zeros preserved.Required. Text; maximum UTF-16 length 8192.
baseBaseRequired. Safe integer; minimum 2; maximum 36.
Output fieldInterpretationReturned shape
reversedReversedRequired. Text; maximum UTF-16 length 8192.
fixedPointFixed PointRequired. Boolean.
json
{
  "input": {
    "digits": "12021",
    "base": 10
  },
  "output": {
    "reversed": "12021",
    "fixedPoint": true
  }
}

Limitations and assumptions

  • Leading zeros are preserved and symbol case is strict. This is a representation palindrome check rather than a numeric reversal invariant after dropping leading zeros or a conversion into another radix.
  • 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

Choose the full conversion or formatting workflow for the intended representation. Keep radix, digit alphabet, leading-zero width, signed-zero handling, and terminating/repeating-fraction assumptions explicit.

References

  1. Calculation and input contract: number/digit-reversal-fixed-point — tool.io

Similar or alternative tools