Source: https://web4.ensiie.fr/~gacogne/ch5.pdf