Compare two fractions and determine which is larger, smaller, or if they are equal.
Two fractions a/b and c/d can be compared exactly by cross-multiplication: if a×d > c×b then a/b is larger. This avoids floating-point errors entirely and works for any integers.
Cross-multiplication comparison
a/b compared to c/d: compare a×d with c×b
Cross-multiplication compares fractions exactly using only integer arithmetic, avoiding any floating-point rounding errors that decimal conversion might introduce.
Equal fractions cross-multiply to the same value. For example, 2/4 and 3/6 both give 2×6 = 12 and 3×4 = 12.