checking the calcul of the error in Savitzky Golay