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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!