Source: http://icfp.51.pagesperso-orange.fr/docmaths/longueurs.pdf