Contact

GAMMALN Function (Calligra Sheets)

Statistical Intermediate Calligra Sheets

Use Calligra GAMMALN for positive-argument log-gamma values, with factorial identities and explicit native approximation residuals at 1 and 2.

Verification status: 17 selected formulas were executed through the Calligra Sheets 25.04.2 calculation engine library. Numerical discrepancies and nonfinite results are retained where present. Version 26.08.2 was source-checked only; no GUI-cell or import claim. How formula examples are checked

Quick answer: =GAMMALN(5) gives approximately 3.17805383033 in the tested Calligra calculation engine.

Availability and version history

  • Introduced: First release not established; the name is present in Calligra 2.4.0 source.
  • Supported in: Calligra Sheets 26.08.2, with no retirement established.
  • Scope: Desktop Sheets with the Statistical module. Examples use English semicolon-separated formulas.
  • Checked: October 14, 2026. Selected formulas ran through the official 25.04.2 engine library. Source and independent mathematics were checked. This is engine evidence, with no GUI-cell or import verification; 26.08.2 was source-checked only.

What GAMMALN returns

GAMMALN returns the natural logarithm of Gamma(x) for positive x. For a positive integer n, Gamma(n)=(n−1)!, so GAMMALN(5) corresponds to ln(24). It is not log base 10 and does not compute ln(n!). Function help.

Syntax and arguments

=GAMMALN(x)

Exactly one argument is registered. The wrapper requires x>0. Noninteger positive values are supported. The tested numeric text “3” is converted to 3, TRUE becomes 1, and invalid text is rejected by the resulting domain check. Registration and implementation.

Reproducible engine examples

The engine and mathematical columns are separate. Results are rounded to twelve decimal places, or thirteen significant digits in scientific notation for very small or large values. This is a display choice, not an accuracy guarantee. NaN and infinity are nonfinite outputs; an engine error flag is checked separately from those values.

Formula Engine result Independent mathematical reference
=GAMMALN(1) 1.054933917999E-10 0
=GAMMALN(2) 6.14415185396E-11 0
=GAMMALN(3) 0.693147180587 0.69314718056
=GAMMALN(5) 3.17805383033 3.178053830348
=GAMMALN(10) 12.80182748002 12.801827480081
=GAMMALN(.5) 0.572364942842 0.572364942925
=GAMMALN(1.5) -0.120782237553 -0.120782237635
=GAMMALN(20) 39.339884187134 39.339884187199

Practical worksheet

Products of positive gamma values can be handled in log space by adding their logarithms. For the simple factorial identity, GAMMALN(10) represents ln(9!), approximately 12.801827480081 in independent mathematics. The table preserves the separate engine value.

Do not assume that a negative log-gamma value is an error: Gamma(1.5) is less than 1, so its natural logarithm is approximately −0.120782237635. The domain concerns the input x, not the sign of the returned logarithm.

Advanced interpretation and checks

The recurrence Gamma(x+1)=x Gamma(x) implies logGamma(x+1)−logGamma(x)=ln(x) for x>0. Another check is the displayed GAMMALN(5)−LN(24), whose engine residual is about −1.80×10^−11.

Mathematically GAMMALN(1) and GAMMALN(2) are exactly zero. The tested engine returned approximately 1.05×10^−10 and 6.14×10^−11. Those small nonzero values follow the shared coefficient approximation and are deliberately not shown as exact zero. Avoid equality-to-zero tests built on this identity.

The executed advanced check was:

=GAMMALN(5)-LN(24)

Its engine result was -1.800368860071E-11.

Boundaries and troubleshooting

The source uses a short fixed-coefficient gamma approximation. The number of printed decimals should not be read as a corresponding accuracy guarantee. Zero and negative inputs return #VALUE! rather than a reflected real log-gamma extension. A valid ordinary result also does not certify arbitrary large arguments or every cancellation-sensitive difference of log-gamma values.

Formula Engine result
=GAMMALN(0) #VALUE!
=GAMMALN(-1) #VALUE!
=GAMMALN(-.5) #VALUE!
=GAMMALN("abc") #VALUE!
=GAMMALN("3") 0.693147180587
=GAMMALN(TRUE()) 1.054933917999E-10
=GAMMALN() #VALUE!
=GAMMALN(1;2) #VALUE!

Official evidence and precision scope

The statistical module and value-calculation helpers are byte-identical between the inspected 25.04.2 and 26.08.2 sources. That comparison supports the source discussion but does not establish later-version native output, every locale or arbitrary extreme-parameter accuracy.

LN.