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
- Enter p, previousP, q, previousQ. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| p | P | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| previousP | Previous P | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| q | Q | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| previousQ | Previous Q | Required. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| determinant | Determinant | Required. Text; maximum UTF-16 length 8192. |
| unimodular | Determinant equals +/-1; not proof of a complete continued-fraction expansion. | Required. Boolean. |
{
"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
Similar or alternative tools
- Rational Signed Denominator Crossproduct Order
Compare left=a*d and right=c*b using exact integer arithmetic, then reverse the comparison if the denominator signs differ; return order=-1,0,1 for first fraction versus second.
- Rational Mediant Weighted Crosswalk
Return exact numerator=a*leftWeight+c*rightWeight and denominator=b*leftWeight+d*rightWeight as decimal strings.