GAMMA(3pm)
π GAMMA π
aka PDL::GSLSF::GAMMA β PDL interface to GSL Special Functions π¦
β¨ DESCRIPTION β¨
Okay bestie, so here's the tea β: this is literally an interface to the Special Function package that lives inside the GNU Scientific Library. That's it, that's the vibe. π
πΈ FUNCTIONS πΈ
π gsl_sf_lngamma
Signature: (double x(); double [o]y(); double [o]s(); double [o]e())
So this one gives you Log[Gamma(x)], and heads up: x can not be a negative integer, okay? It uses the real Lanczos method. For x < 0 it figures out the sign of Gamma[x] and Log[|Gamma[x]|], so you get Gamma[x] = sgn * Exp[result_lg]. Two for one, iconic. π
π«Ά gsl_sf_lngamma does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_gamma
Signature: (double x(); double [o]y(); double [o]e())
Gamma(x), and again bestie, x is not a negative integer. Rules are rules. π
π«Ά gsl_sf_gamma does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_gammastar
Signature: (double x(); double [o]y(); double [o]e())
The Regulated Gamma Function, for x > 0. It goes like:
Gamma^*(x) = Gamma(x)/(Sqrt[2Pi] x^(x-1/2) exp(-x)) = (1 + 1/(12x) + ...), x->Inf
Look at that asymptotic expansion, it's giving β¨mathematicsβ¨.
π«Ά gsl_sf_gammastar does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_gammainv
Signature: (double x(); double [o]y(); double [o]e())
Literally just 1/Gamma(x). Short. Sweet. Ate. π
π«Ά gsl_sf_gammainv does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_lngamma_complex
Signature: (double zr(); double zi(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye())
Log[Gamma(z)] but for z complex, and (say it with me) z is not a negative integer. What it actually calculates:
lnr = log|Gamma(z)|arg = arg(Gamma(z))in(-Pi, Pi]
Complex numbers really said "main character energy". π
π«Ά gsl_sf_lngamma_complex does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_taylorcoeff
Signature: (double x(); double [o]y(); double [o]e(); int n)
x^n / n! β Taylor coefficients, we love her. π
π«Ά gsl_sf_taylorcoeff does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_fact
Signature: (x(); double [o]y(); double [o]e())
n! π the classic, the legend, the one everybody knows.
π«Ά gsl_sf_fact does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_doublefact
Signature: (x(); double [o]y(); double [o]e())
n!! = n(n-2)(n-4) β double factorial, double the drama, double the slay. βοΈ
π«Ά gsl_sf_doublefact does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_lnfact
Signature: (x(); double [o]y(); double [o]e())
ln n! β same energy, but logarithmic so your numbers stop being unhinged. π
π«Ά gsl_sf_lnfact does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_lndoublefact
Signature: (x(); double [o]y(); double [o]e())
ln n!! β the log of the double factorial. Yes she's real, yes she's here. π
π«Ά gsl_sf_lndoublefact does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_lnchoose
Signature: (n(); m(); double [o]y(); double [o]e())
log(n choose m) β combinatorics, but make it logarithmic. π₯
π«Ά gsl_sf_lnchoose does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_choose
Signature: (n(); m(); double [o]y(); double [o]e())
n choose m. Periodt. π
π«Ά gsl_sf_choose does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_lnpoch
Signature: (double x(); double [o]y(); double [o]s(); double [o]e(); double a)
Logarithm of the Pochammer (Apell) symbol, and it comes with sign information because we're thorough like that:
result = log( |(a)_x| )sgn = sgn( (a)_x )
where (a)_x := Gamma[a + x]/Gamma[a]. Bestie the notation is giving π΅ but the vibes are immaculate.
π«Ά gsl_sf_lnpoch does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_poch
Signature: (double x(); double [o]y(); double [o]e(); double a)
The Pochammer (Apell) symbol itself: (a)_x := Gamma[a + x]/Gamma[x]. No log, no extra paperwork, just the symbol. β¨
π«Ά gsl_sf_poch does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_pochrel
Signature: (double x(); double [o]y(); double [o]e(); double a)
The Relative Pochammer (Apell) symbol: ((a,x) - 1)/x where (a,x) = (a)_x := Gamma[a + x]/Gamma[a]. It's the Pochammer symbol's relative, iykyk. πΈ
π«Ά gsl_sf_pochrel does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_gamma_inc_Q
Signature: (double x(); double [o]y(); double [o]e(); double a)
The Normalized Incomplete Gamma Function:
Q(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,x,Infinity} ]
Look at her, integrating all the way out to infinity like it's nothing. π
π«Ά gsl_sf_gamma_inc_Q does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_gamma_inc_P
Signature: (double x(); double [o]y(); double [o]e(); double a)
The Complementary Normalized Incomplete Gamma Function:
P(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,0,x} ]
Same integral but from 0 to x instead. They're sisters, don't make them compete. π«Ά
π«Ά gsl_sf_gamma_inc_P does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_lnbeta
Signature: (double a(); double b(); double [o]y(); double [o]e())
Logarithm of the Beta Function: Log[B(a,b)]. Bet. π
π«Ά gsl_sf_lnbeta does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π gsl_sf_beta
Signature: (double a(); double b();double [o]y(); double [o]e())
The Beta Function B(a,b), in all her unlogged glory. β
π«Ά gsl_sf_beta does not process bad values. It will set the bad-value flag of all output ndarrays if the flag is set for any of the input ndarrays.
π AUTHOR π
This file is copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it>. All rights reserved. There is no warranty. π You are allowed to redistribute this software / documentation under certain conditions β for the details, go look at the file COPYING in the PDL distribution. And if this file ever gets separated from the PDL distribution, the copyright notice should come with it, like a little name tag bestie. π·οΈ
Also, the GSL SF modules were written by G. Jungman. Respect. π«‘
Okay so this whole page comes from the User Contributed Perl Documentation, and it's chilling at perl v5.38.2, dated 2024-04-10. That's the whole vibe, bestie β go compute something gorgeous. πβ¨π
π¦ where this page comes from
- ubuntu noble: pdl 1:2.085-1ubuntu1 Β· 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