Source: http://lacim-membre.uqam.ca/~christo/Mathematiques%20algorithmiques/Ch.2.pdf