Originally Posted by

**snowtea** If you can choose the input, then knowing values at (1,0,0), (0,1,0), (0,0,1), (1,1,0), (0,1,1), (1,0,1), (1,1,1) will probably be the easiest way to get all coefficients.

If you cannot choose the input. In general, for polynomials where you know the maximum degree, you can write the most general form of the polynomial. For your equation, plugging in 7 points will give 7 linear equations with 7 unknown coefficients. Assuming you picked points that give linearly independent equations, you can directly solve for the coefficients.