Source: http://www.ac-grenoble.fr/disciplines/maths/pages/PM/Ressources/301/DM_Algorithmique_2nd_degre.pdf