Is that code even supposed to work?
at
Unhandled Exception:Attemp to index array element beyond array length
at
result[x] :+(current[x - 1] + current[x + 1] - previous[x] * 3) / 4