Math::Polynomial::Solve, version 2.70, 14 March 2014.
------------------------------------------------------------------------
>>> <<<
>>> As warned, set_hessenberg() and get_hessenberg() have been removed. <<<
>>> <<<
>>>NOTE: New function ascending_order() has been added to make <<<
>>> Math::Polynomial::Solve consistent with Math::Polynomial. <<<
>>> <<<
>>> When the order of the coefficients passed into and returned from <<<
>>> the Math::Polynomial objects reversed order, it left the order <<<
>>> of the coefficients of this package out sync. Flatly changing the <<<
>>> the order of the parameters to the M::P::S functions seemed a <<<
>>> little unfriendly, so an intermediate step has been created. <<<
>>> <<<
>>> Everywhere you pass in a list of coefficients, you may place <<<
>>> them in ascending power order by calling the new function <<<
>>> ascending_order(1). That is: <<<
>>> <<<
>>> # Solve x**3 + 3*X**2 + 3*x + 5 <<<
>>> <<<
>>> my @p1 = Math::Polynoial->new(5, 3, 3, 1); <<<
>>> my @roots = cubic_roots(reverse $p1->coefficients); <<<
>>> <<<
>>> can become: <<<
>>> <<<
>>> ascending_order(1); <<<
>>> my @p1 = Math::Polynoial->new(5, 3, 3, 1); <<<
>>> my @roots = cubic_roots($p1->coefficients); <<<
>>> <<<
>>> without having to worry if you used the reverse operator <<<
>>> everywhere you should have. <<<
>>> <<<
>>> The ascending_order() function will affect ALL functions in <<<
>>> Math::Polynomial::Solve that take coefficients as their arguments. <<<
>>> <<<
>>> The default order will remain descending power order until version <<<
>>> 3.00 is released, at which point ascending order will be the <<<
>>> default, and you will need to call ascending_order(0) to get the <<<
>>> old calling style. Some time after that, ascending_order() will <<<
>>> be deprecated, and some time after that it will be removed. <<<
>>> <<<
This package provides a set of functions that find the roots of
polynomials up to degree 4 using the classical methods; a function
for solving polynomials of any degree by an implementation of the
QR Hessenberg algorithm; and functions that implement Sturm's
sequence for counting the number of real, unique roots in a range.
These functions can be exported by name or by tag (:classical, :numeric,
:sturm, and :utility). The utility tag exports the functions that
are used internally and which previously were private to the module.
See the documentation for more information.
Using the classical methods, the cubic may be solved by the method
described by R. W. D. Nickalls, "A New Approach to solving the cubic:
Cardan's solution revealed," The Mathematical Gazette, 77, 354-359, 1993.
Dr. Nickalls has made his paper available at
, one of his
many publications at
The solution for the quartic is based on Ferrari's method, as described
in the web page Karl's Calculus Tutor,
.
INSTALLATION:
The usual way. Unpack the archive:
gzip -d Math-Polynomial-Solve-2.70.tar.gz
tar xvf Math-Polynomial-Solve-2.70.tar
Go into the resulting directory, and type:
perl Build.PL
Build
Run the tests:
Build test
Install the module:
Build install
Copyright (c) 2010 John M. Gamble. All rights reserved. This program is
free software; you can redistribute it and/or modify it under the same
terms as Perl itself.