PDIV performs polynomial division of any degree (within available memory
of the calculator).


I originally wrote PDIV for the TI-85 about 3 years ago (December 92).
Essentially the two programs are the same but some things had to be changed
due to the way the TI-85 and the TI-82 implement list names and variable
names.

PDIV performs polynomial division for polynomials of any degree.
The coefficients of each polynomial are entered in list form.  For
example the polynomial:

       X^4 + 8X^3 - X + 1

is represented by the list  { 1, 8, 0, -1, 1 }.   Note well that a
zero is in place of the missing "X^2" element.

Running PDIV:
The program prompts you for two lists (L1 and L2).  The first list
is the numerator and the second is the denominator.  At the L1 prompt
enter the list of coefficients for the numerator and press ENTER.
Now enter the list of the coeffecients for the denominator polynomial
and again press ENTER.  What returns is the coefficient quotient and
remainder, both in list form.

Example
-------
Suppose you want to perform the following division:

            2X^3 - 5X^2 + X - 7
           ---------------------
               X^2 + 8X + 23


Execute the PDIV program.  At the L1 prompt enter the list
{ 2, -5, 1, -7 } and press ENTER.

The second prompt, "L2?", will appear.  Enter the list { 1, 8, 23 }
and press ENTER.

The quotient is the first list { 2, -21 } and the remainder,
{ 0, 0, 123, 476 } is the second list.  These two lists represent
the polynomial

        2X - 21  with a remainder of  123X + 476



If the lists are too large to view on the screen, you CANNOT use the
cursor keys to view the rest of the coefficients.  Instead, you must
recall the list(s) on the screen and then use the cursor keys.
The quotient can be found in list L3 and the remainder can be found in
list L4.




NOTE:
The degree of the polynomial in the numerator must be equal to or
larger than the degree of the polynomial in the denominator.  You
will receive an error otherwise.

Additionally, each polynomial must be ordered the same for proper and
correct answers (ie: the order of variables and decending exponential
values must correspond between the numerator and the denominator).

I wrote these programs as utilities and did not include user friendliness.  If you want user friendly prompts...include them...just give me credit where credit is due.



Variables used in the PDIV program:
        Lists: L1   the numerator list
               L2   the denominator list
               L3   the quotient list
               L4   the remainder list
               L5   a "dummy" list used for scratch work

        Reals: N    the size of the numerator list
               D    the size of the denominator list
               Q    the size of quotient list
               M    a scratch variable for temporary storage.
               I,J  loop counters

Final note:
This program is Freeware and can be used in any fashion as long as I get
credit for creating them.  Thanks.

Any comments, questions, or suggestions for improvement can be directed to
rjhomard@tenet.edu

Richard Homard


