Source: https://www.fil.univ-lille1.fr/~wegrzyno/portail/Codage/Doc/Cours/poly.pdf