What do you think the result should be if you calculate:
2.6666666666666665 + -4.6666666666666661 + 2.0
Those are the partial results from your calculation:
narray[y] = (a * (frac[y] * frac[y])) + (b * (frac[y] * -1)) + c;
I find that the result should be zero - but because of rounding errors, you get a "very small number" - this is perfectly normal when using floating point calculations, especially subtracting or adding the result of other calculations.
Remember, floating point (double or float) calculations are approximations - not exact results.
Edit: I'm pretty sure it's more efficient to use -frac[y] instead of frac[y] * -1...
--
Mats