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. $length is 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. $length is 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. $length is how many elements are inside @values. And, iconic behaviour, $length is 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, $x1 and $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 equation x**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, $x1 and $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 a gsl_poly_complex_workspace struct, plus a workspace suitable for solving a polynomial with $n coefficients using the routine gsl_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 (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