Math / Topic guide

Exact arithmetic and number theory tools

Integer and rational arithmetic are valuable when floating-point approximation would lose digits. Use exact fractions for ratios and prime factors for multiplicative structure.

Worked example

For 84 and 30, Euclid’s algorithm gives GCD 6. Their LCM is 84×30/6 = 420. To add 2/3 and 5/6, rewrite the first fraction as 4/6 and obtain 9/6 = 3/2.

Limitations

Factorization uses bounded trial division rather than a general large-integer factorization algorithm. Combination counts are limited to n ≤ 1000.

Working calculators