.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Math::GSL::Poly 3pm"
.TH Math::GSL::Poly 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
Math::GSL::Poly \- Solve and evaluate polynomials
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 5
\& 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, \e$x0, \e$x1);
\& print "${a}*x**2 + ${b}*x + $c contains $num_roots roots which are $x0 and $x1. \en";
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
Here is a list of all the functions included in this module :
.IP \(bu 4
gsl_poly_eval(@values, \f(CW$length\fR, \f(CW$x\fR)
.Sp
This function evaluates a polynomial with real coefficients for the real
variable \f(CW$x\fR. \f(CW$length\fR is the number of elements inside \f(CW@values\fR. The function
returns a complex number.
.IP \(bu 4
gsl_poly_complex_eval(@values, \f(CW$length\fR, \f(CW$z\fR)
.Sp
This function evaluates a polynomial with real coefficients for the complex
variable \f(CW$z\fR. \f(CW$length\fR is the number of elements inside \f(CW@valuesi\fR. The function
returns a complex number.
.IP \(bu 4
gsl_complex_poly_complex_eval(@values, \f(CW$length\fR, \f(CW$z\fR)
.Sp
This function evaluates a polynomial with real coefficients for the complex
variable \f(CW$z\fR. \f(CW$length\fR is the number of elements inside \f(CW@values\fR. \f(CW$length\fR is the
number of elements inside \f(CW@values\fR. The function returns a complex number.
.IP \(bu 4
gsl_poly_dd_init
.IP \(bu 4
gsl_poly_dd_eval
.IP \(bu 4
gsl_poly_dd_taylor
.IP \(bu 4
gsl_poly_solve_quadratic( \f(CW$a\fR, \f(CW$b\fR, \f(CW$c\fR, \e$x0, \e$x1)
.Sp
Find the real roots of the quadratic equation \f(CW$a\fR*x**2+$b*x+$c = 0, return the
number of real root (either zero, one or two) and the real roots are returned
by \f(CW$x0\fR, \f(CW$x1\fR and \f(CW$x2\fR which are deferenced.
.IP \(bu 4
gsl_poly_complex_solve_quadratic
.IP \(bu 4
gsl_poly_solve_cubic($a, \f(CW$b\fR, \f(CW$c\fR, \e$x0, \e$x1, \e$x2)
.Sp
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
\&\f(CW$x0\fR, \f(CW$x1\fR and \f(CW$x2\fR which are deferenced.
.IP \(bu 4
gsl_poly_complex_solve_cubic
.IP \(bu 4
gsl_poly_complex_workspace_alloc($n)
.Sp
This function allocates space for a gsl_poly_complex_workspace struct and a
workspace suitable for solving a polynomial with \f(CW$n\fR coefficients using the
routine gsl_poly_complex_solve.
.IP \(bu 4
gsl_poly_complex_workspace_free($w)
.Sp
This function frees all the memory associated with the workspace \f(CW$w\fR.
.IP \(bu 4
\&\fBgsl_poly_complex_solve()\fR
.PP
For more information on the functions, we refer you to the GSL official documentation:
.SH AUTHORS
.IX Header "AUTHORS"
Jonathan "Duke" Leto and Thierry Moisan
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
Copyright (C) 2008\-2023 Jonathan "Duke" Leto and Thierry Moisan
.PP
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.