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 functionlog1p(x). πgsl_expm1($x)β computes the value of\exp($x)-1, again accurate for small$x. Alternative to the BSD math functionexpm1(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 functionhypot($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 functionacosh($x).gsl_asinh($x)β computes the value of\arcsinh($x). Alternative to the standard math functionasinh($x).gsl_atanh($x)β computes the value of\arctanh($x). Alternative to the standard math functionatanh($x).gsl_isnan($x)β returns1if$xis not-a-number. that's the whole job bestie.gsl_isinf($x)β returns+1if$xis positive infinity,-1if$xis negative infinity, and0otherwise. three moods πgsl_finite($x)β returns1if$xis a real number, and0if 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 functionldexp($x,$e). π₯gsl_frexp($x)β splits the number$xinto its normalized fractionfand exponente, such that$x = f * 2^eand0.5 <= f < 1. The function returnsfand then the exponent ine. If$xis zero, bothfandeare set to zero. It's the alternative to the standard math functionfrexp(x, e). β¨gsl_fcmp($x, $y, $epsilon)β this one determines whether$xand$yare approximately equal to a relative accuracy$epsilon. The relative accuracy is measured using an interval of size2 \delta, where\delta = 2^k \epsilonandkis the maximum base-2 exponent of$xand$yas computed by the functionfrexp. If$xand$ylie within this interval, they're considered approximately equal and the function returns0. Otherwise, if$x < $yit returns-1, or if$x > $yit returns+1.
β οΈ ok important:$xand$yare 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 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.
(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
- 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