Contact

BETALN Function (Gnumeric)

Math Beginner Gnumeric

BETALN returns the natural logarithm of the absolute value of Euler’s beta function: ln|B(x,y)|.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Availability and version history

  • Introduced: Documented by 1.12.62; original introduction not established.
  • Availability: Supported in Gnumeric 1.12.62, based on the function-specific registration.
  • Scope: Desktop; the fn-math function module must be included and enabled.
  • Checked: October 14, 2026. Official source and independent mathematical examples checked; Gnumeric 1.12.62 was not run.

What BETALN does

BETALN returns the natural logarithm of the absolute value of Euler’s beta function: ln|B(x,y)|. The absolute-value detail matters for Gnumeric’s real extensions, where BETA can be negative. Official function reference.

For positive x,y, ln B(x,y)=ln Γ(x)+ln Γ(y)−ln Γ(x+y). Computing in log space can avoid forming an extremely large or small intermediate beta value. The result is a logarithmic normalization constant, not a probability.

Syntax and arguments

=BETALN(x,y)
Argument Meaning
x First real argument; use positive parameters for ordinary statistical models.
y Second real argument; use positive parameters for ordinary statistical models.

Every argument shown is required. Use numeric inputs or cell references. The examples follow English Gnumeric’s comma-separated notation and decimal points; localized separators can differ. Release-pinned argument help and evaluator.

Reproducible examples

Enter each formula in an unused worksheet cell. These are independently calculated mathematical reference values rounded to twelve decimal places. Keep full stored precision in later formulas rather than retyping a rounded display.

Formula Expected result, approximately
=BETALN(1,1) 0
=BETALN(2,3) -2.484906649788
=BETALN(3,2) -2.484906649788
=BETALN(0.5,0.5) 1.144729885849
=BETALN(2,2) -1.791759469228
=BETALN(1,4) -1.38629436112
=BETALN(0.5,1.5) 0.451582705289
=BETALN(-0.5,1.5) 1.144729885849

Worked worksheet applications

Build a log-density

For a=2, b=3 and t=0.4, compute:

=(2-1)*LN(0.4)+(3-1)*LN(1-0.4)-BETALN(2,3)

The expected result is 0.546964670382, the logarithm of density 1.728. Applying EXP recovers that density. This formula requires 0<t<1 and positive shape parameters; endpoint log terms need separate limiting treatment.

Compare two normalizations

=EXP(BETALN(3,3)-BETALN(2,3)) has expected value 0.4. It forms a ratio through a difference of logarithms, which is often more stable than dividing two underflowed values. Avoid exponentiating an enormous final logarithm unless you actually need the ordinary-scale result.

Release-specific errors and cautions

The release calls gnm_lbeta3 and discards its separately computed sign, confirming the absolute-value contract. Zero or negative integer individual arguments lead to a numeric error. When x+y is a nonpositive integer while neither argument is a pole, BETA’s helper yields zero; ln|0| is nonfinite and BETALN consequently maps to #NUM!. Pinned evaluator. Beta-domain and continuation implementation. Nonfinite numeric result handling.

Advanced check and numerical interpretation

For x=−0.5 and y=1.5, BETA equals −π but BETALN equals ln π, approximately 1.144729885849. Therefore =EXP(BETALN(-0.5,1.5)) reconstructs π, not −π. Keep sign information separately if a non-statistical model uses the real extension. Positive beta-distribution shape parameters avoid that ambiguity.