Source: https://www2.ift.ulaval.ca/~agamache/pageperso/LivreBDPDF/Chapitre123.pdf