Math::GSL(3pm)
๐ Math::GSL โ the Perl glow-up for the GNU Scientific Library ๐
okay bestie, so this is the Math::GSL manual page, and honestly? it's giving "User Contributed Perl Documentation" with main character energy โจ. If you've ever wanted the whole GNU Scientific Library (GSL) to talk Perl to you instead of C, this is your girl. Periodt. ๐
โจ NAME โจ
Math::GSL โ a Perl interface to the GNU Scientific Library (GSL) ๐ง
๐ธ VERSION ๐ธ
Version 0.49 ๐
๐ฆ SYNOPSIS ๐ฆ
Here's the vibe, literally copy-paste-able:
use Math::GSL::Matrix;
my $matrix = Math::GSL::Matrix->new(5,5); # 5x5 zero matrix
# note that columns and rows are zero-based
$matrix->set_col(0, [1..5]) # set *first* column to 1,2,3,4,5
->set_row(2, [5..9]); # set *third* column to 5,6,7,8,9
my @matrix = $matrix->as_list; # matrix as Perl list
my $gsl_matrix = $matrix->raw; # underlying GSL object
use Math::GSL::RNG;
my $rng = Math::GSL::RNG->new;
my @random_numbers = $rng->get(1000);
use Math::GSL::Deriv qw/:all/;
my $function = sub { my $x=shift; sin($x**2) };
my ($status,$val,$err) = gsl_deriv_central($function, 5, 0.01 );
use Math::GSL qw/gsl_version/;
# get a version object for the version of the underlying GSL library,
# which will stringify to a version number
my $gsl_version = gsl_version();
okay so every GSL subsystem gets its own lil module, no cap. The random number generator subsystem? That's Math::GSL::RNG ๐ฒ. And a ton of these subsystems come with a more Perlish, object-oriented frontend you can actually use, exactly like the example above shows ๐ซถ. The raw GSL object is your backstage pass for the low-level GSL functions โ and for the Matrix subsystem specifically, those look like gsl_matrix_*. Every module has its own further documentation covering both the low-level C functions and how to use the more intuitive (but lowkey slightly slower ๐ญ) object-oriented interface. iykyk.
๐ SUBSYSTEMS ๐
the full roster, alphabetically iconic:
Math::GSL::BLASโ Linear Algebra Functions ๐ฅMath::GSL::BSplineโ BSplines โจMath::GSL::CBLASโ Linear Algebra Functions ๐ฅMath::GSL::CDFโ Cumulative Distribution Functions ๐Math::GSL::Chebyshevโ Chebyshev Polynomials ๐Math::GSL::Combinationโ Combinatoric Functions ๐ฒMath::GSL::Complexโ Complex Numbers ๐Math::GSL::Constโ Various Constants โญMath::GSL::DHTโ Discrete Hankel Transforms ๐Math::GSL::Derivโ Numerical Derivative ๐Math::GSL::Eigenโ Eigenvalues and Eigenvectors ๐Math::GSL::Errnoโ Error Handling ๐จMath::GSL::FFTโ Fast Fourier Transform โกMath::GSL::Fitโ Curve Fitting ๐Math::GSL::Heapsortโ Sorting Heaps ๐๏ธMath::GSL::Histogramโ Histograms ๐Math::GSL::Histogram2Dโ 2D Histograms ๐Math::GSL::Integrationโ Numerical Integration โซMath::GSL::Interpโ Interpolation ๐งMath::GSL::Linalgโ Linear Algebra ๐งฎMath::GSL::Machineโ Machine Specific Information ๐ปMath::GSL::Matrixโ NxM Matrices ๐ขMath::GSL::Minโ Minimization ๐ฏMath::GSL::Monteโ Monte Carlo Integrations ๐ฐMath::GSL::Multifitโ Multivariable Fitting ๐Math::GSL::Multiminโ Multivariable Minimization ๐ฏMath::GSL::Multirootsโ Muiltvariable Root Finding ๐ฑMath::GSL::NTupleโ N Tuples ๐งบMath::GSL::ODEIVโ Ordinary Differential Equation Solvers (Initial Value Problems) ๐Math::GSL::Permutationโ Permutations ๐Math::GSL::Polyโ Polynmials ๐Math::GSL::PowIntโ Integer Power Functions ๐ฅMath::GSL::QRNGโ Quasi-Random Number Generators ๐ฒMath::GSL::RNGโ Random Number Generators ๐ฒMath::GSL::Randistโ Random Number Distributions ๐Math::GSL::Rootsโ Root Finding Algorithms ๐ฑMath::GSL::Rstatโ Running Statistics ๐Math::GSL::SFโ Special Functions ๐Math::GSL::Simanโ Simulated Annealing ๐ฅMath::GSL::Sortโ Sorting ๐๏ธMath::GSL::SparseMatrixโ Sparse Matrices ๐ธ๏ธMath::GSL::Splineโ Splines ๐ขMath::GSL::Statisticsโ Statistics Functions ๐Math::GSL::Sumโ Summation โMath::GSL::Sysโ System utility functions ๐ ๏ธMath::GSL::Vectorโ N-dimensional Vectors โก๏ธMath::GSL::Waveletโ Basic Wavelets ๐Math::GSL::Wavelet2Dโ 2D Wavelets ๐
๐ AUTHORS ๐
Jonathan "Duke" Leto, <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> ๐ซถ
๐ญ BUGS ๐ญ
ngl, this software is still in active development, and we live for your detailed bug reports and documentation patches ๐. Please report any bugs or feature requests to <https://github.com/hakonhagland/perl-math-gsl/issues>.
๐ DEVELOPMENT ๐
If you wanna help develop Math::GSL, come hang out with us on Github <https://github.com/hakonhagland/perl-math-gsl/issues> and fork, send Pull Requests and/or create issues. literally the more the merrier ๐ซถ
To view the latest source code online, go to <https://github.com/hakonhagland/perl-math-gsl> โจ
๐๏ธ DEDICATION ๐๏ธ
This Perl module is dedicated in memory of Nick Ing-Simmons. ๐
๐ COPYRIGHT & LICENSE ๐
Copyright (C) 2008-2024 Jonathan "Duke" Leto, Thierry Moisan all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page bestie, go forth and do science ๐ โจ no cap, you're gonna slay.
signing off from the Math::GSL(3pm) manual page, served up by perl v5.42.3, dated 2026-08-20 ๐ธ โ mwah, ilysm, go run some numbers ๐ซถ๐
๐ฆ 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