smichr/sympy — comment on commit 2923279239e63b8d2bcf48beaee7b547def21729
File:  line 0
By asmeurer:

cancel() will be needed when ever the gcds of two denominators will be a polynomial with more than one term. In other words, you have something like `x**2 - 1`, which equals `(x - 1)*(x + 1)`, and this is not trivial to determine. In that case, you have to use the polynomial gcd algorithm (Euclid's algorithm) to find the common factors.