Math::GSL::Diff(3pm)

✨ NAME ✨

Math::GSL::Diff β€” numerical differentiation routines, bestie. That's it, that's the whole vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

use Math::GSL::Diff qw/:all/;

okay so literally one line and you've got the whole squad loaded in πŸ’–


🌈 DESCRIPTION 🌈

Here's the full roster of functions chillin' in this module, no gatekeeping:

🌟 gsl_diff_central

This one computes the numerical derivative of your function f at the point x using an adaptive central difference algorithm. The result comes back as an array, and the positions matter, so listen up: first slot is an error code (0 means success, slay), second slot is the derivative value, and third slot is an estimate of its absolute error. three little besties in a trench coat 🫢

my ($success, $result, $error) =
      gsl_diff_central(sub { return $_[0] ** 1.5 }, 2.0);

πŸ¦‹ gsl_diff_backward

This one computes the numerical derivative of the function f at the point x using an adaptive forward difference algorithm. (yes bestie, the name says backward and the algorithm says forward, ik, that's just how it is, don't shoot the messenger πŸ™ˆ) Its usage is similar to gsl_diff_central.

my ($success, $result, $error) =
       gsl_diff_backward(sub { return $_[0] ** 1.5 }, 0.0);

🧚 gsl_diff_forward

This one computes the numerical derivative of the function f at the point x using an adaptive backward difference algorithm. Same situation, flipped. 😭 Its usage is similar to gsl_diff_central.

my ($success, $result, $error) =
       gsl_diff_forward(sub { return $_[0] ** 1.5 }, 1.0);

πŸ’œ EXAMPLES πŸ’œ

This section is keeping the seat warm and nothing else, fr fr β€” it's empty in the original. no cap. 🌸


πŸ‘‘ AUTHORS πŸ‘‘

Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> β€” the icons who made this happen, we stan πŸ’–


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. periodt. 🌈


and that's the whole page, bestie β€” brought to you by perl v5.42.3 on 2026-08-20, mwah πŸ’‹ stay differentiating βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from