Tcl Library Source Code

Documentation
Login


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

NAME

math::polynomials - Polynomial functions

Table Of Contents

SYNOPSIS

package require Tcl ?8.3?
package require math::polynomials ?1.0.1?

::math::polynomials::polynomial coeffs
::math::polynomials::polynCmd coeffs
::math::polynomials::evalPolyn polynomial x
::math::polynomials::addPolyn polyn1 polyn2
::math::polynomials::subPolyn polyn1 polyn2
::math::polynomials::multPolyn polyn1 polyn2
::math::polynomials::divPolyn polyn1 polyn2
::math::polynomials::remainderPolyn polyn1 polyn2
::math::polynomials::derivPolyn polyn
::math::polynomials::primitivePolyn polyn
::math::polynomials::degreePolyn polyn
::math::polynomials::coeffPolyn polyn index
::math::polynomials::allCoeffsPolyn polyn

DESCRIPTION

This package deals with polynomial functions of one variable:

PROCEDURES

The package defines the following public procedures:

REMARKS ON THE IMPLEMENTATION

The implementation for evaluating the polynomials at some point uses Horn's rule, which guarantees numerical stability and a minimum of arithmetic operations. To recognise that a polynomial definition is indeed a correct definition, it consists of a list of two elements: the keyword "POLYNOMIAL" and the list of coefficients in descending order. The latter makes it easier to implement Horner's rule.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category math :: polynomials of the Tcllib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.

When proposing code changes, please provide unified diffs, i.e the output of diff -u.

Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar.

KEYWORDS

math, polynomial functions

CATEGORY

Mathematics

COPYRIGHT

Copyright © 2004 Arjen Markus