Function note

From 10 up, GAMMA is a Stirling product of stored stages, and its error grows with x

FUNC.GAMMA

FN-GAMMA-002: From 10 up, GAMMA is a Stirling product of stored stages, and its error grows with x

Excel differs from the mathematical answer · inferred · recorded 2026-11-04

From x = 10, GAMMA behaves as sqrt(2 pi) x^x exp(-x) / sqrt(x) w with stored stages: x^2, x^4, x^8 and so on by binary powering of floor(x/2), stored ln x, exponent and exponential for the fraction of x/2, stored exp(-x), an unstored square root, and each outer product stored. The first factor is the binary64 value of sqrt(2 pi), whose rounding gives every band a bias of +0.66 of 2^-53. The answers' noise grows with x, with a root mean square of about 0.225*x units of 2^-53 above 20, so near x = 160 an answer can sit 89 units from the correctly rounded value, as below.

Call and input routeInputsExcelCorrect valueRecorded in
GAMMA(10.649360706449173)
cell-value2
number: 10.649360706449173
0x40254c7901ab0368
1600316.6708269436
0x41386b3cabbb5088
1600316.6708269438
0x41386b3cabbb5089
Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading
GAMMA(160.48267465838674)
cell-value2
number: 160.48267465838674
0x40640f7212200c21
3.410909690032054e+283
0x7acd5c4d6f1f4edc
3.4109096900320908e+283
0x7acd5c4d6f1f4f35
Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this reading

Correct value: mpmath gamma at 800 bits from the binary64 input, correctly rounded.

Correct value: mpmath gamma at 800 bits from the binary64 input, correctly rounded.

Basis: Noise lines on windows of consecutive doubles (Excel build 20527): stored x^2 with weight x/2, then x^4, x^8 and x^16 at the frequencies a stored square of a stored value gives, stored ln x, and the bias. This chain gives every bit on 69.5% of 59,200 answers from 36 to 170.

Inferred: The chain is read from the noise, and 30.5% of the answers in that range do not yet match, so at least one stored stage is missing. The series w is only seen as a line at 1/(12 m x), and below x = 30 it differs from the true series.

Open: The Stirling series below x = 30, and the stored stage still missing above it.

Evidence and capture sources

Machine-readable note records