Source: https://ufrsciencestech.u-bourgogne.fr/master1/Multimedia/TD/TD5_Expr_reg_JS.pdf