Source: https://introlab.3it.usherbrooke.ca/papers/MemoireCloutier.pdf