GAMMALN in Collabora Office: Work With Gamma Values on a Logarithmic Scale
Use Collabora GAMMALN to calculate log-factorials and gamma ratios while preserving the distinction between logs and original-scale results.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =GAMMALN(6) has independently expected result approximately 4.787491743, the natural logarithm of GAMMA(6)=120. It does not return 120 itself.
Syntax and domain
=GAMMALN(Number)
Number is the required input. Collabora’s dedicated help describes the natural logarithm of the gamma function and gives GAMMALN(2)=0. For the real-valued usage documented here, use Number>0. The current Collabora source’s ScLogGamma routine also explicitly requires a positive argument.
Natural logarithms use base e. GAMMALN(x) means LN(GAMMA(x)) mathematically on this positive domain; it does not mean GAMMA(LN(x)). Those compositions are different operations and generally produce different values.
A logarithmic value can be negative even when the original gamma value is positive. When 0<GAMMA(x)<1, its natural logarithm is negative. A negative GAMMALN result is therefore not automatically an error.
Example 1: build a log-factorial table
Put 1, 2, 3, 5, 6 in A2:A6. In B2 enter =GAMMALN(A2) and fill down. Independent targets are approximately 0, 0, 0.693147181, 3.178053830 and 4.787491743.
In C2 enter =LN(FACT(A2-1)) and fill down. These small positive-integer cases should match mathematically. GAMMALN(n+1) is the log of n!, so a count n belongs one argument step above its factorial index.
For n=5, =GAMMALN(5+1) targets LN(120), not LN(24). Keep the original count and the transformed argument visible in a teaching worksheet to avoid a silent one-off error.
Example 2: inspect a negative log value
=GAMMALN(1.5) has independent target approximately −0.120782238, because GAMMA(1.5) is approximately 0.886226925, below one.
Use =EXP(GAMMALN(1.5)) to recover that positive gamma value mathematically. Similarly, EXP(GAMMALN(6)) targets 120. These are checks on moderate inputs, not proof that exponentiating an arbitrarily large logarithm will fit in floating-point range.
Advanced application: compute a binomial coefficient through logs
For positive integers n=10 and k=3, the log combination count is =GAMMALN(11)-GAMMALN(4)-GAMMALN(8). Its independent target is LN(120), approximately 4.787491743.
Applying EXP to that expression targets 120, matching the exact small combination count. This demonstrates replacing multiplication and division of factorials with addition and subtraction of log-factorials.
A computed result might display 119.999999999999 rather than an exact integer because of floating-point arithmetic. Do not mistake a rounded display for a proof of exact combinatorics. For small valid integer combinations, a dedicated combination function is usually clearer.
Advanced application: form a beta normalization constant
With a=2 and b=3, enter =GAMMALN(2)+GAMMALN(3)-GAMMALN(5). The independent result is approximately −2.484906650. Exponentiating gives 1/12, the same mathematical constant as GAMMA(2)*GAMMA(3)/GAMMA(5).
For large parameters, this form can avoid overflowing individual gamma values before they cancel in a ratio. It does not guarantee arbitrary-precision accuracy: subtracting similar large logs can lose precision, and the final exponential can still underflow or overflow.
Errors and troubleshooting
Use positive inputs. Do not generalize a scientific library’s log-absolute-gamma function to this worksheet function for negative arguments; that is a different domain contract. Current Collabora source confirms the positive-domain guard, while the actual desktop error display has not been tested here.
If the answer looks too small, check whether it is still on the log scale. If it is negative, compare the corresponding gamma value with one before diagnosing an error. Check the factorial offset and use LN rather than LOG10 when manually verifying the definition.
Availability and verification
The exact function is documented in Collabora Office 26.04 desktop help. The snapshot was retrieved on 2026-10-13 and hash-verified on October 15, 2026. Desktop help is not proof of Online or mobile availability. First introduced release and last functioning version are unknown; the dedicated source does not establish them.
No native Collabora or WPS execution occurred. Numerical values are independent mathematical expectations, not certification of application errors or all numerical limits. Formulas use English names and semicolon separators.
A current Collabora interpreter source snapshot retrieved October 15, 2026 corroborates the described domain or parameter roles. It is from the moving main branch, not a pinned 26.04 binary, and is not an application execution.