Answer
double frame = (y*y - 7*y + 4.0)/9.0;