Source: https://www.irif.fr/~gc/papers/polydeuces-part2.pdf