NOIP 2016提高组

愤怒的小鸟

Calculate coefficients of the quadratic equation with the following statements:

1
2
3
double d = x[i]*x[j]*(x[i]-x[j]),
a = (y[i]*x[j]-y[j]*x[i])/d,
b = (y[j]*x[i]*x[i]-y[i]*x[j]*x[j])/d;

The order of the absolute error is about 1e3 times machine error and the relative error is about 1e5 times machine error.

The maximum relative error can be achieved when a*x[j]+b ~= 0.