Source: https://euler.ac-versailles.fr/IMG/pdf/progr_maths_1res_techno_2019_01.pdf