Math::GSL::Sys(3pm)

πŸ’– Math::GSL::Sys(3pm) β€” the perl doc you're reading rn πŸ’–

okay bestie, so this is the User Contributed Perl Documentation page for Math::GSL::Sys, and it's literally the little grab-bag module of math functions that the standard libraries just… didn't give you?? iconic of it honestly 🫢


✨ NAME ✨

Math::GSL::Sys β€” Misc Math Functions 🌈

(yes that's it, that's the whole name, it's giving "no notes" πŸ’…)


✨ SYNOPSIS ✨

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

one line and you've got the whole toolbox, periodt ✨


✨ DESCRIPTION ✨

So this module is like the friend who shows up with various useful math functions that standard libraries do NOT usually hand you. Very much main character energy πŸ‘‘

Here's the whole lineup, no skipping, we don't do that here:

  • gsl_log1p($x) β€” computes the value of \log(1+$x), but in a way that stays accurate for small $x. It's the alternative to the BSD math function log1p(x). πŸ“
  • gsl_expm1($x) β€” computes the value of \exp($x)-1, again accurate for small $x. Alternative to the BSD math function expm1(x). ✨
  • gsl_hypot($x, $y) β€” computes the value of \sqrt{$x^2 + $y^2} in a way that avoids overflow. Alternative to the BSD math function hypot($x,$y). πŸ¦‹
  • gsl_hypot3($x, $y, $z) β€” computes the value of \sqrt{$x^2 + $y^2 + $z^2} and yeah, it also avoids overflow. three-arg icon πŸ’…
  • gsl_acosh($x) β€” computes the value of \arccosh($x). Alternative to the standard math function acosh($x).
  • gsl_asinh($x) β€” computes the value of \arcsinh($x). Alternative to the standard math function asinh($x).
  • gsl_atanh($x) β€” computes the value of \arctanh($x). Alternative to the standard math function atanh($x).
  • gsl_isnan($x) β€” returns 1 if $x is not-a-number. that's the whole job bestie.
  • gsl_isinf($x) β€” returns +1 if $x is positive infinity, -1 if $x is negative infinity, and 0 otherwise. three moods πŸŽ€
  • gsl_finite($x) β€” returns 1 if $x is a real number, and 0 if it's infinite or not-a-number. vibe check: passed or not passed πŸ’€
  • gsl_posinf β€” …
  • gsl_neginf β€” …
  • gsl_fdiv β€” …
  • gsl_coerce_double β€” …
  • gsl_coerce_float β€” …
  • gsl_coerce_long_double β€” …
ngl bestie, those last six are listed on the page with zero description, just the bare names, so I am NOT about to invent lore for them πŸ™ˆ that's the whole listing, fr fr.
  • gsl_ldexp($x, $e) β€” computes the value of $x * 2**$e. Alternative to the standard math function ldexp($x,$e). πŸ”₯
  • gsl_frexp($x) β€” splits the number $x into its normalized fraction f and exponent e, such that $x = f * 2^e and 0.5 <= f < 1. The function returns f and then the exponent in e. If $x is zero, both f and e are set to zero. It's the alternative to the standard math function frexp(x, e). ✨
  • gsl_fcmp($x, $y, $epsilon) β€” this one determines whether $x and $y are approximately equal to a relative accuracy $epsilon. The relative accuracy is measured using an interval of size 2 \delta, where \delta = 2^k \epsilon and k is the maximum base-2 exponent of $x and $y as computed by the function frexp. If $x and $y lie within this interval, they're considered approximately equal and the function returns 0. Otherwise, if $x < $y it returns -1, or if $x > $y it returns +1.
⚠️ ok important: $x and $y are compared to relative accuracy, so this function is NOT suitable for testing whether a value is approximately zero. read that again bestie, it matters 😭

The implementation is based on the package fcmp by T.C. Belding. (shoutout 🫢)


If you want the deep lore on all of these functions, the page sends you straight 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 two queens who made this happen πŸ‘‘πŸ‘‘


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.

(so like, go wild, but the same terms as Perl itself, okay? πŸ’–)


and that's a wrap on Math::GSL::Sys(3pm) from the User Contributed Perl Documentation collection, this version rendered by perl v5.42.3 on 2026-08-20 β€” thanks for reading to the end bestie, you ate that πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from