﻿ poldiv | Enterprise Architect User Guide

#### Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

 Prev Next

# poldiv

Polynomial Division

SYNOPSIS:

int maxpol, na, nb, nc;
double a[], b[], c[];

nc = na + nb
polini( MAXPOL );
i = poldiv( a, na, b, nb, c );

DESCRIPTION:

i = poldiv( a, na, b, nb, c );  c = b / a,  nc = MAXPOL

returns i = the degree of the first nonzero coefficient of a.
The computed quotient c must be divided by x^i.
An error message is printed if a is identically zero.

a, b, c are polynomials of degree na, nb, nc respectively.
The degree of a polynomial cannot exceed a run-time value MAXPOL.
An operation that attempts to use or generate a polynomial of higher degree may produce a result that suffers truncation at degree MAXPOL.
The value of MAXPOL is set by calling the function
polini( MAXPOL );

Each polynomial is represented by an array containing its coefficients, together with a separately declared integer equal to the degree of the polynomial.
The coefficients appear in ascending order; that is,

2                      na
a(x)  =  a  +  a * x  +  a * x   +  ...  +  a[na] * x  .