Math::GSL::Poly(3pm)
π NAME π
Math::GSL::Poly β bestie, this is the module that solves and evaluates polynomials. That's the whole vibe. Periodt. β¨
π¦ SYNOPSIS π¦
okay so here's the little taste test, literally copy-paste core:
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";
look at that. immaculate. π«Ά
π DESCRIPTION π
here's the full roster of everything this module hands you, no gatekeeping:
gsl_poly_eval(@values, $length, $x)β evaluates a polynomial with real coefficients for the real variable$x.$lengthis how many elements are chillin' inside@values. The function returns a complex number. πgsl_poly_complex_eval(@values, $length, $z)β evaluates a polynomial with real coefficients for the complex variable$z.$lengthis how many elements are inside@valuesi. (yes, that's literally how it's written in the source docs, don't come for me π) The function returns a complex number.gsl_complex_poly_complex_eval(@values, $length, $z)β evaluates a polynomial with real coefficients for the complex variable$z.$lengthis how many elements are inside@values. And, iconic behaviour,$lengthis how many elements are inside@values. The function returns a complex number.gsl_poly_dd_initβ no extra notes given, she's mysterious like that π§gsl_poly_dd_evalβ same energy, no description attached β¨gsl_poly_dd_taylorβ also just vibing here with no write-up πΈgsl_poly_solve_quadratic( $a, $b, $c, \$x0, \$x1)β finds the real roots of the quadratic equation$a*x**2+$b*x+$c = 0. It returns the number of real roots (either zero, one or two), and the real roots come back through$x0,$x1and$x2, which are dereferenced. πgsl_poly_complex_solve_quadraticβ listed, no description given, she's booked and busy πgsl_poly_solve_cubic($a, $b, $c, \$x0, \$x1, \$x2)β finds the real roots of the cubic equationx**3+$a*x**2+$b*x+$c = 0. It returns the number of real roots (either one or three), and the real roots come back through$x0,$x1and$x2, which are dereferenced. π₯gsl_poly_complex_solve_cubicβ listed, no description given, that's the whole lore βgsl_poly_complex_workspace_alloc($n)β allocates space for agsl_poly_complex_workspacestruct, plus a workspace suitable for solving a polynomial with$ncoefficients using the routinegsl_poly_complex_solve. πgsl_poly_complex_workspace_free($w)β frees all the memory associated with the workspace$w. be a good citizen and call this, bestie, memory doesn't free itself πgsl_poly_complex_solve()β listed, no description given. lowkey the main character of the workspace functions above, but okay, we move π
for more info on the functions, we refer you to the GSL official documentation: http://www.gnu.org/software/gsl/manual/html_node/ π
π AUTHORS π
Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> β the legends fr fr π«Ά
π COPYRIGHT AND LICENSE π
Copyright (C) 2008-2024 Jonathan "Duke" Leto and Thierry Moisan
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. slay. β¨
and that's a wrap, bestie π this whole page dropped as Math::GSL::Poly(3pm), version perl v5.42.3, dated 2026-08-20. stan. π
π¦ where this page comes from
- ubuntu stonking: libmath-gsl-perl 0.49-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms