Contact

GAMMALN.PRECISE Function (LibreOffice Calc)

Statistical Intermediate LibreOffice Calc LibreOffice 4.3

Use GAMMALN.PRECISE in LibreOffice Calc for log-gamma values, large-factorial calculations and stable probability formulas, with an explicit positive-input domain.

Verification status: Official release source and independently calculated examples checked. No new LibreOffice application execution is claimed for this guide. How formula examples are checked

Quick answer: =GAMMALN.PRECISE(1) has independent reference value 0.

Availability and version history

  • Introduced: LibreOffice 4.3, explicitly stated in function-specific Help.
  • Supported in: LibreOffice 26.8.1.1; this is not a final supported version.
  • Scope: Desktop Calc with English semicolon-separated formulas. Locale and other-product contracts may differ.
  • Checked: October 14, 2026. Official release source and independently calculated examples checked. No new LibreOffice application execution is claimed for this guide.

What GAMMALN.PRECISE returns

GAMMALN.PRECISE returns the natural logarithm of the gamma function for a positive input. It computes ln(Γ(x)), not Γ(ln(x)) and not a base-10 logarithm. For a positive integer n, the result is ln((n−1)!), connecting the function to factorial and combinatorial calculations. Release implementation.

Syntax and arguments

=GAMMALN.PRECISE(Number)

Exactly one numeric argument is required, and the inspected evaluator accepts it only when Number>0. Zero and negative values are invalid, including negative nonintegers for which GAMMA itself may have a finite signed result. This function is not a general log-absolute-gamma extension on the negative axis.

The pinned dispatcher sends GAMMALN and GAMMALN.PRECISE to the same evaluator in this release. The PRECISE name therefore does not promise extra numerical precision over GAMMALN. The numeric helper supplies the corresponding endpoint and evaluation branches.

Reproducible reference examples

Values below are rounded to twelve decimal places. These are independent mathematical references, not newly captured LibreOffice application outputs.

Formula Independent reference
=GAMMALN.PRECISE(0.5) 0.572364942925
=GAMMALN.PRECISE(1) 0
=GAMMALN.PRECISE(1.5) -0.120782237635
=GAMMALN.PRECISE(2) 0
=GAMMALN.PRECISE(3) 0.69314718056
=GAMMALN.PRECISE(5) 3.178053830348
=GAMMALN.PRECISE(10) 12.801827480081
=GAMMALN.PRECISE(200) 857.933669825857

Practical worksheet

For an integer factorial, use =GAMMALN.PRECISE(n+1) to calculate its natural logarithm. The value at 5 is ln(4!), approximately 3.178053830348. The values at 1 and 2 are both 0 because Γ(1)=Γ(2)=1.

The value at 200 is approximately 857.933669825857. Directly calculating 199! would exceed ordinary double-precision numeric range, while its logarithm remains a manageable number. Keep the log result if that is what the subsequent calculation needs; exponentiating it immediately recreates the original range problem.

Advanced interpretation and checks

For positive a and b, the logarithm of the beta function is =GAMMALN.PRECISE(a)+GAMMALN.PRECISE(b)-GAMMALN.PRECISE(a+b). At a=2 and b=3 it is approximately −2.484906649788. Exponentiating that moderate value gives 1/12 without separately multiplying and dividing large gamma values.

A log binomial mass for an integer 0≤k≤n and 0<p<1 can be assembled as GAMMALN.PRECISE(n+1)−GAMMALN.PRECISE(k+1)−GAMMALN.PRECISE(n−k+1)+k×LN(p)+(n−k)×LN(1−p). For n=10, k=2 and p=0.2, exponentiating the result gives 0.301989888. Handle p=0 or 1 separately, because the log expression contains LN(0) even where the limiting binomial probability is well defined.

Boundaries and troubleshooting

The implementation explicitly rejects nonpositive inputs. It does not compute LN(ABS(GAMMA(x))) for negative nonintegers. A log-gamma value may itself be negative for a positive input: GAMMALN.PRECISE(1.5) is approximately −0.120782237635, because Γ(1.5) lies between 0 and 1.

Log-domain arithmetic reduces some overflow risks but is not a universal accuracy guarantee. Subtracting two nearly equal large logarithms can still lose digits. For very large inputs, closely spaced parameters or extreme probability tails, use additional numerical checks. Keep full cell precision through the calculation and round only the final displayed result.

Evidence and checking scope

The reviewed scope is the pinned release source and independent mathematical examples. No new application execution is claimed for this guide. Other releases, locales and extreme-value limits were not established by these ordinary calculations.