愤怒的小鸟
Calculate coefficients of the quadratic equation with the following statements:
1 | double d = x[i]*x[j]*(x[i]-x[j]), |
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.