Close: 3,638 of 14,281 recorded answers differ in the last bits, worst 7 ULP
Everything else matches (14,278 in the answer bank and 3 workbook cells). Last-bit means a finite number within 16 ULP of Excel's. How we measure this · See the Rust code
Local names in 40 languages
Language
Name in Excel
Arabic
GAMMALN.PRECISE
Bulgarian
GAMMALN.PRECISE
Czech
GAMMALN.PRECISE
Danish
GAMMALN.PRECISE
German
GAMMALN.PRECISE
Greek
GAMMALN.PRECISE
English (Australia)
GAMMALN.PRECISE
English (United Kingdom)
GAMMALN.PRECISE
English (United States)
GAMMALN.PRECISE
Spanish
GAMMA.LN.EXACTO
Estonian
GAMMALN.PRECISE
Finnish
GAMMALN.TARKKA
French
LNGAMMA.PRECIS
Hebrew
GAMMALN.PRECISE
Croatian
GAMMALN.PRECISE
Hungarian
GAMMALN.PONTOS
Indonesian
GAMMALN.PRECISE
Italian
GAMMALN.PRECISE
Japanese
GAMMALN.PRECISE
Korean
GAMMALN.PRECISE
Lithuanian
GAMMALN.PRECISE
Latvian
GAMMALN.PRECISE
Norwegian
GAMMALN.PRECISE
Dutch
GAMMA.LN.NAUWKEURIG
Polish
ROZKŁAD.LIN.GAMMA.DOK
Portuguese (Brazil)
GAMMALN.PRECISE
Portuguese (Portugal)
LNGAMA.PRECISO
Romanian
GAMMALN.PRECISE
Russian
ГАММАНЛОГ.ТОЧН
Slovak
GAMMALN.PRECISE
Slovenian
GAMMALN.PRECISE
Serbian (Latin)
GAMMALN.PRECISE
Swedish
GAMMALN.EXAKT
Thai
GAMMALN.PRECISE
Turkish
GAMALN.DUYARLI
Ukrainian
GAMMALN.PRECISE
Vietnamese
GAMMALN.PRECISE
Chinese (Simplified)
GAMMALN.PRECISE
Chinese (Hong Kong)
GAMMALN.PRECISE
Chinese (Traditional)
GAMMALN.PRECISE
Names from Microsoft's support site.
What it does
GAMMALN.PRECISE(x)
GAMMALN.PRECISE(x) returns the natural logarithm of the gamma function, ln Γ(x), for x > 0.
The mathematics is set out in full on the GAMMALN page — the integral
definition, the recurrence ln Γ(x+1) = ln x + ln Γ(x), strict convexity on (0, ∞), the two zeros
at x = 1 and x = 2, the single minimum near x ≈ 1.4616, and Stirling's asymptotic series — and is
not repeated here. Microsoft's description of this surface is word-for-word the description of
the legacy one: "Returns the natural logarithm of the gamma function, Γ(x)."
The interesting content of this page is not the mathematics. It is the pair relationship, and
what the word "PRECISE" in the name does and does not promise.
Arguments
Argument
Meaning
Default
x
The value at which to evaluate ln Γ. Required.
—
Try it
Quirks
The pair, stated precisely
The .PRECISE suffix belongs to the Excel 2010 renaming of the statistical function set, and in
the general case the Handbook's rule holds: a modern dotted name is not guaranteed to be the same
computation as its legacy counterpart, and proving identity requires evidence. For this
particular pair, unusually, some of that evidence exists — upstream's, not the Handbook's — and
it is worth laying out with each claim's warrant attached.
Documented supersession. Microsoft's GammaLn page carries the replacement banner: the
function "has been replaced with one or more new functions that may provide improved accuracy
and whose names better reflect their usage", and it names GammaLn_Precise. Note the modal
verb — may provide improved accuracy. The banner is boilerplate carried by every function
in that 2010 renaming, and it promises nothing measurable.
Observed identity, upstream, on one build.EV-MATH-0014 records an Excel-versus-Excel
check in which both surfaces resolved to the same implementation and published the same
results at every probed point. The record is explicit that this is an identity check and not
a pass rate, and that the source publishes no numerator or denominator for it.
The direction of inheritance runs toward the legacy name, not away from it.EV-MATH-0013 records that both of the family's held-out tests were captured through
this spelling, so a figure measured on GAMMALN.PRECISE transfers to GAMMALN by that
argument and not the reverse. That is the opposite of the usual assumption, in which the
older, better-studied surface is the measured one.
Result and edge cases
Returns Number. The edge-case inventory is the one on the
GAMMALN page: exact zeros at x = 1 and x = 2, the
−ln x behaviour as x → 0⁺, Stirling growth at large x, and #NUM! for x ≤ 0.
Errors
Microsoft's documentation for this surface is worded differently from the legacy one, and the
difference is worth noting rather than smoothing over:
Condition
GAMMALN.PRECISE documentation
GAMMALN documentation
x is nonnumeric
"generates an error"
#VALUE!
x ≤ 0
"generates an error"
#NUM!
The modern page does not name the error values; the legacy page does. The two pages describe
the same two conditions, but only one of them tells you what lands in the cell. A reader writing
an IFERROR/IFNA guard needs the code, and the documentation for the recommended surface is
the one that omits it. Recorded as a documentation gap.
GAMMALN from 3 to 8 is a stored recurrence, and GAMMALN(3) is one unit above ln 2
With RN(v) meaning v rounded to 64 bits on the x87 unit and then stored to binary64, write x = n + y with n the integer part. For 3 < x < 8, Excel forms z = (y+2)(y+3)...(y+n-1) from the left with every product RN, and GAMMALN(x) is RN(RN(ln z) + GAMMALN(2+y)). So answers on this range carry the rounding of a value on [2,3]. x = 3 itself belongs to the band on [2,3], not to this route, and returns 0x3fe62e42fefa39f0, one unit above the stored ln 2, although GAMMALN(3) is exactly ln 2.
Explanation (inferred): That GAMMALN.PRECISE takes the same route is inferred: the 30,000 answers are GAMMALN, and the two functions agree at every shared recorded input tried, including 3.
Formula
Excel
Mathematical value
GAMMALN(3) Excel 16.0 build 20131, platform and bitness not recorded, AMD Ryzen 7 4800HInputs and reference value
Number supplied through a cell.
x: 3 0x4008000000000000
ln 2, correctly rounded.
0.6931471805599454 0x3fe62e42fefa39f0
0.6931471805599453 0x3fe62e42fefa39ef
GAMMALN.PRECISE(3) Excel 16.0 build 20131, platform and bitness not recorded, AMD Ryzen 7 4800HInputs and reference value
Number supplied through a cell.
x: 3 0x4008000000000000
ln 2, correctly rounded.
0.6931471805599454 0x3fe62e42fefa39f0
0.6931471805599453 0x3fe62e42fefa39ef
GAMMALN(2.020222407046596) Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this readingInputs and reference value
Number supplied through a cell.
x: 2.020222407046596 0x4000296a5d874ad0
0.008681034861562235 0x3f81c75cc69b54fc
—
GAMMALN(6.020222407046596) Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this readingInputs and reference value
Number supplied through a cell.
x: 6.020222407046596 0x401814b52ec3a568
mpmath loggamma at 800 bits from the binary64 input, correctly rounded.
The algorithmic content — the three-region split (recurrence for small x, minimax rational in
the middle, Stirling above a seam), the unbounded relative error in the two narrow bands around
the zeros, and the identified structure with its threshold and seam — is set out on the
GAMMALN page.
Two points belong specifically here.
"Precise" is a name, not a measurement. Nothing in Microsoft's documentation quantifies the
improvement the 2010 renaming promised, and the banner's own wording is "may provide improved
accuracy". Where a .PRECISE surface has been checked against its legacy counterpart in this
domain, the result so far has been identity rather than improvement. A reader should not choose
this spelling expecting better answers; they should choose it because it is the current name.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
No implementation has been published with a Handbook test suite for this function.
Version differences
The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.
Excel 16.0 build
Platform and CPU
Captured inputs
19929
Windows, bitness not recorded, CPU not recorded
44
20131
Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics
14,262
20228
Windows, 64-bit, CPU not recorded
16
The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.
GAMMALN.PRECISE(3) returned 0.6931471805599454 (0x3fe62e42fefa39f0). Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.
44 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.
Excel 16.0 build 20131
Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics
14,262 captured inputs are indexed for this environment. Capture dates: 2026-07-12 to 2026-07-17. This is a reading count, not a comparison with another build.
Excel 16.0 build 20228
Windows, 64-bit, CPU not recorded
16 captured inputs are indexed for this environment. Capture dates: 2026-08-09 to 2026-08-09. This is a reading count, not a comparison with another build.
Alternatives
Relationships
GAMMALN — the legacy spelling; the full pair analysis is above, and the
numerical treatment lives on that page.
GAMMA — the value rather than its logarithm, in the same module and
not on the same numeric path: upstream's landed log-gamma kernel is wired only to the two
GAMMALN surfaces. LN(GAMMA(x)) and GAMMALN.PRECISE(x) are different computations with
different domains, and the first overflows where the second does not.
GAMMA.DIST, BETA.DIST, POISSON.DIST, COMBIN, MULTINOMIAL —
consumers of log-gamma, directly or through their normalising constants.
ERF.PRECISE / ERFC.PRECISE — module siblings that carry the same .PRECISE suffix from
the same renaming. Whether those pairs are identical computations is a separate question
with its own record, and nothing about this pair transfers to them.