Question: Using the code below, what is an idea I can use to get the quotient and remainder seperately. The method below is synthetic division. Degree
Using the code below, what is an idea I can use to get the quotient and remainder seperately. The method below is synthetic division. Degree and coefs are already initialized in the class Polynomial that we were given. I don't need code. I just need an explanation or design.
public double [] syntheticDivision( double x ) { double [] qr = new double[ degree + 1 ]; double value = coefs[ degree ]; qr[ degree ] = value; for ( int i = degree - 1; i >= 0; i-- ) { value = x * value + coefs[ i ]; qr[ i ] = value; } return qr;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
