Skip to content

Main content

Continued Fraction Convergent Determinant Tool

Calculate continued fraction convergent determinant from explicit caller-supplied inputs.

Loading tool…

Description

Parse exact decimal integers p,previousP,q,previousQ and return determinant=p*previousQ-previousP*q as text, with unimodular=true exactly for determinant +/-1.

A rational number is represented by an integer numerator and a nonzero integer denominator. Sign placement, reduction by a greatest common divisor, and the chosen division or rounding convention affect intermediate representations. Exact integer text preserves arithmetic that could be lost in a floating-point conversion.

Parse exact decimal integers p,previousP,q,previousQ and return determinant=p*previousQ-previousP*q as text, with unimodular=true exactly for determinant +/-1.

When to use this tool

Use Continued Fraction Convergent Determinant when you need this particular exact fraction comparison, reduction, sign, denominator, or rounding component.

How to use the tool and how it works

  1. Enter p, previousP, q, previousQ. 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 determinant, unimodular. Inspect unimodular before interpreting the associated values.

Parse exact decimal integers p,previousP,q,previousQ and return determinant=p*previousQ-previousP*q as text, with unimodular=true exactly for determinant +/-1.1

Input fieldMeaning and unitsAccepted input
pPRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
previousPPrevious PRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
qQRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
previousQPrevious QRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
Output fieldInterpretationReturned shape
determinantDeterminantRequired. Text; maximum UTF-16 length 8192.
unimodularDeterminant equals +/-1; not proof of a complete continued-fraction expansion.Required. Boolean.
json
{
  "input": {
    "p": "7",
    "previousP": "3",
    "q": "5",
    "previousQ": "2"
  },
  "output": {
    "determinant": "-1",
    "unimodular": true
  }
}

Limitations and assumptions

  • Denominators need not be nonzero or positive. A unimodular pair is only one necessary algebraic pattern for neighboring continued-fraction convergents, not proof that the inputs arise from a particular expansion.
  • 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.

Alternative or Complementary methods

Reduce fractions where the interpretation requires it and choose a consistent denominator-sign and division convention. Use a complete rational operation when one denominator or determinant term is insufficient.

References

  1. Calculation and input contract: number/continued-fraction-convergent-determinant — tool.io

Similar or alternative tools