smoothing formula