Agreed completely; the right fix is that anything indexing an array should be an unsigned size_t (or equivalent for your language of choice).
y = a[0]*y[-1] + a[1]*y[-2] + b[0]*x[-1] + b[1]*x[-2]Of course sorting 2^63 elements would require the different calculation.