Description
For nonzero integer first and second return originalOrder=sign(first-second) and reciprocalOrder=sign((second-first)/(first*second)).
Exact integer arithmetic and finite numeric arithmetic have different range limits. A safe integer number is bounded by +/-9007199254740991, while supported decimal-integer text can represent larger values. Division and remainder also need a signed convention: truncating quotients and Euclidean nonnegative remainders can give different results.
For nonzero integer first and second return originalOrder=sign(first-second) and reciprocalOrder=sign((second-first)/(first*second)).
When to use this tool
Use Reciprocal Integer Fraction Order Witness when you need this exact stated integer sign, bound, division, comparison, or factor component.
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 originalOrder, reciprocalOrder. Use the output convention below.
For nonzero integer first and second return originalOrder=sign(first-second) and reciprocalOrder=sign((second-first)/(first*second)).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Safe integer. |
| second | Second | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| originalOrder | Original Order | Required. Safe integer. |
| reciprocalOrder | Sign of first reciprocal minus second reciprocal, not their numeric values. | Required. Safe integer. |
{
"input": {
"first": 2,
"second": 4
},
"output": {
"originalOrder": -1,
"reciprocalOrder": 1
}
} Limitations and assumptions
- Only ordering signs are returned, not reciprocal values. Opposite-sign inputs behave differently from same-sign inputs; arithmetic uses numeric operations rather than an exact rational output representation.
- 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 decimal-integer tools when the range exceeds safe numeric integers. State the division, remainder, midpoint, and zero convention before combining results from different operations.
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 Floor Ceiling Gap
Use exact integer division, lower the quotient by one for a nonintegral negative ratio, and return floor and ceiling as decimal text plus gap zero for integral ratios or one otherwise.