ProductsPolynom − { Main page | Download (161 913 Bytes) }
Please note that the documentation here hasn't been updated to version 0.16. The contents below completely lacks synthetic division (Horner's scheme). The download contains a demonstration file.

The Polynom Package

Version 0.15


The polynom package implements macros for manipulating polynomials, for example it can typeset long polynomial divisions. Such long divisions can be shown step by step. The main test case and application is the polynomial ring in one variable with rational coefficients.


Donald Arseneau has contributed a lot of packages to the TeX community. In particular, he posted macros for long division on comp.text.tex, which were also published in TUGboat 18(2), June 1997, p. 75. With these definitions, one could just write \longdiv{12345}{13} to get the long division shown in Figure 1 (a). In fact, that integer long division has been typeset using the code from the location cited. The polynom package allows to do the similar job with polynomials, see Figure 1 (b). Figure 2 shows partial long divisions.

Figure 1: Integer and polynomial long division
(a) \longdiv{12345}{13} (b) \polylongdiv{X^3+X^2-1}{X-1}
Figure 2: Stepwise polynomial long division. The whole division is shown with \texttt{stage=10}. Note that other printing styles, see Figure 3, might require one more stage to put the remainder next to the result
Figure 3: A different printing style for polynomial long division. To see the third, you'll have to download the package together with its documentation.
Other applications are the Euclidean algorithm to determine a greatest common divisor of two polynomials or the factorization of a polynomial.
most recent update 2004/08/17
© 2001−2004