exponential smoothing in php