Source: http://www.lyc-monnet-lqly.ac-versailles.fr/IMG/pdf/1s_-_fonctions_trinmes_et_homographiques_-_corrig.pdf