Skip to content

Commit

Permalink
Improve Poly POD
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Oct 10, 2011
1 parent 452d346 commit e9c6a27
Showing 1 changed file with 40 additions and 28 deletions.
68 changes: 40 additions & 28 deletions pod/Poly.pod
Expand Up @@ -23,67 +23,79 @@ __END__

=head1 NAME

Math::GSL::Poly - Functions for evaluating and solving polynomials
Math::GSL::Poly - Solve and evaluate polynomials

=head1 SYNOPSIS

use Math::GSL::Poly qw/:all/;
use Math::GSL::Poly qw/:all/;
my ($a,$b,$c) = (1,6,9);
my ($x0, $x1) = (0,0);
my $num_roots = gsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1);
print "${a}*x**2 + ${b}*x + $c contains $num_roots roots which are $x0 and $x1. \n";

=head1 DESCRIPTION

Here is a list of all the functions included in this module :

=over

=item * gsl_poly_eval(@values, $length, $x) - This function evaluates a polynomial with real coefficients for the real variable $x. $length is the number of elements inside @values. The function returns a complex number.
=item * gsl_poly_eval(@values, $length, $x)

=item * gsl_poly_complex_eval(@values, $length, $z) - This function evaluates a polynomial with real coefficients for the complex variable $z. $length is the number of elements inside @valuesi. The function returns a complex number.
This function evaluates a polynomial with real coefficients for the real
variable $x. $length is the number of elements inside @values. The function
returns a complex number.

=item * gsl_complex_poly_complex_eval(@values, $length, $z) - This function evaluates a polynomial with real coefficients for the complex variable $z. $length is the number of elements inside @values. $length is the number of elements inside @values. The function returns a complex number.
=item * gsl_poly_complex_eval(@values, $length, $z)

This function evaluates a polynomial with real coefficients for the complex
variable $z. $length is the number of elements inside @valuesi. The function
returns a complex number.

=item * gsl_complex_poly_complex_eval(@values, $length, $z)

This function evaluates a polynomial with real coefficients for the complex
variable $z. $length is the number of elements inside @values. $length is the
number of elements inside @values. The function returns a complex number.

=item * gsl_poly_dd_init

=item * gsl_poly_dd_eval

=item * gsl_poly_dd_taylor

=item * gsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1) - find the real roots of the quadratic equation $a*x**2+$b*x+$c = 0, return the number of real root (either zero, one or two) and the real roots are returned by $x0, $x1 and $x2 which are deferenced.
=item * gsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1)

Find the real roots of the quadratic equation $a*x**2+$b*x+$c = 0, return the
number of real root (either zero, one or two) and the real roots are returned
by $x0, $x1 and $x2 which are deferenced.

=item * gsl_poly_complex_solve_quadratic

=item * gsl_poly_solve_cubic($a, $b, $c, \$x0, \$x1, \$x2) - find the real roots of the cubic equation x**3+$a*x**2+$b*x+$c = 0, return the number of real root (either one or three) and the real roots are returned by $x0, $x1 and $x2 which are deferenced.
=item * gsl_poly_solve_cubic($a, $b, $c, \$x0, \$x1, \$x2)

find the real roots of the cubic equation x**3+$a*x**2+$b*x+$c = 0, return the
number of real root (either one or three) and the real roots are returned by
$x0, $x1 and $x2 which are deferenced.

=item * gsl_poly_complex_solve_cubic

=item * gsl_poly_complex_workspace_alloc($n) - This function allocates space for a gsl_poly_complex_workspace struct and a workspace suitable for solving a polynomial with $n coefficients using the routine gsl_poly_complex_solve.
=item * gsl_poly_complex_workspace_alloc($n)

=item * gsl_poly_complex_workspace_free($w) - This function frees all the memory associated with the workspace w.
This function allocates space for a gsl_poly_complex_workspace struct and a
workspace suitable for solving a polynomial with $n coefficients using the
routine gsl_poly_complex_solve.

=item * gsl_poly_complex_solve
=item * gsl_poly_complex_workspace_free($w)

This function frees all the memory associated with the workspace $w.

=item * gsl_poly_complex_solve()

=back

For more informations on the functions, we refer you to the GSL offcial documentation:
L<http://www.gnu.org/software/gsl/manual/html_node/>

Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want

=head1 EXAMPLES

=over 1

=item C<use Math::GSL::Poly qw/:all/;>

=item C<my ($a,$b,$c) = (1,6,9);>

=item C<my ($x0, $x1) = (0,0);>

=item C<my $num_roots = gsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1);>

=item C<print "${a}*x**2 + ${b}*x + $c contains $num_roots roots which are $x0 and $x1. \n";>

=back

=head1 AUTHORS

Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
Expand Down

0 comments on commit e9c6a27

Please sign in to comment.