Source: http://mathematiques.ac-bordeaux.fr/pedaclg/dosped/fonctions/fonc_clg.pdf