GAMMADIST
Quirk foundCategory: Compatibility · Last tested 2026-09-01
Real compatibility results for the GAMMADIST function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel (desktop) | Yes | No — documented only | n/a |
| Excel for the web | — | Yes (recalc, 2026-09-01) | Supported, behaves as documented |
| Google Sheets | Yes | Yes (Drive import, 2026-08-31) | Supported, behaves as documented |
| LibreOffice Calc | Yes | Yes (25.8.7.3, 2026-08-31) | Quirk found |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when GAMMADIST’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Quirk found | 2026-08-31 |
| 24.8.7.2 | Quirk found | 2026-08-31 |
| 25.2.0.3 | Quirk found | 2026-08-31 |
| 25.8.7.3 | Quirk found | 2026-08-31 |
Why isn't GAMMADIST working in LibreOffice?
GAMMADIST exists in LibreOffice 25.8.7.3, but it is not a drop-in match for
Excel — our executed tests found real behavioral differences (detailed in the test results on this
page). If a formula that works in Excel or Google Sheets misbehaves in LibreOffice, compare your usage
against the failing cases above before assuming your data is wrong.
Discovered quirks
-
=GAMMADIST(-1,9,2,TRUE) on
LibreOffice Calc returned
0, but the documented/expected
result is #NUM!.
Provenance
Excel documents: "If x < 0, GAMMADIST returns the #NUM! error value." The gamma distribution has no support below zero. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. EXECUTED RESULT, and a SILENT WRONG ANSWER -- the serious class: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return the NUMBER 0 for a negative x, where the page documents #NUM!. No error is raised, so a column of negative inputs yields a column of zeros that looks like a legitimately tiny probability rather than a visible column of errors. This is the same shape of missing input guard batch C recorded for EXPON.DIST/EXPONDIST at negative x. The finding is sharpened by the modern spelling on the same engine: GAMMA.DIST(-1,9,2,TRUE) returns #VALUE! on all four builds (see data/tests/GAMMA.DIST.json), so LibreOffice has the guard -- it is just missing from the legacy alias, and the two names disagree about the same documented exclusion.; MISMATCH vs expected: expected '#NUM!', got 0
-
=GAMMADIST(1,0,2,TRUE) on
LibreOffice Calc returned
#VALUE!, but the documented/expected
result is #NUM!.
Provenance
Excel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Zero is the boundary of the exclusion. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.; MISMATCH vs expected: expected '#NUM!', got '#VALUE!'
-
=GAMMADIST(1,9,0,TRUE) on
LibreOffice Calc returned
#VALUE!, but the documented/expected
result is #NUM!.
Provenance
Excel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Asserted separately from the alpha case because an engine can guard one parameter and not the other; beta also appears in a division (x/beta), so a missing guard here surfaces as #DIV/0! rather than a wrong number. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1.; MISMATCH vs expected: expected '#NUM!', got '#VALUE!'
Executed test cases
Excel for the web (executed 2026-09-01 via OneDrive recalculation)
These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(GAMMADIST(A2,A3,A4,FALSE),12) | Microsoft's documented worked example: the probability DENSITY at x = 10.00001131 with alpha = 9, beta = 2 | 0.032639130418 | 0.032639130418ProvenanceMicrosoft publishes '=GAMMADIST(A2,A3,A4,FALSE)' with the result 0.032639. Derived independently with mpmath at 50 digits straight from the density the page states in prose -- x^(alpha-1) * e^(-x/beta) / (beta^alpha * Gamma(alpha)) -- rather than from any statistics library's gamma routine: with x = 10.00001131, alpha = 9, beta = 2 the value is 0.032639130418294001533, which rounds to exactly the published 0.032639. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(A2,A3,A4,TRUE),12) | Microsoft's documented worked example: the CUMULATIVE distribution at the same point | 0.06809400387 | 0.06809400387ProvenanceMicrosoft publishes '=GAMMADIST(A2,A3,A4,TRUE)' with the result 0.068094. Derived independently as the REGULARIZED LOWER INCOMPLETE GAMMA function P(alpha, x/beta) = P(9, 5.000005655) = 0.068094003869787331102 at 50 digits, which rounds to exactly the published 0.068094. Asserted at 12 dp: the 11th and 12th decimals (…3870) are carried because they are inside double precision and pin the implementation's incomplete-gamma routine, not just its leading digits. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(2,1,3,TRUE)-(1-EXP(-2/3)),12) | The page's own identity: at alpha = 1 the gamma distribution IS the exponential distribution | 0 | 0ProvenanceMicrosoft's GAMMADIST page states "When alpha = 1, GAMMADIST returns the exponential distribution with:" followed by an equation rendered as an image. The identity behind it is standard and independently checkable: the gamma CDF with alpha = 1 and scale beta is 1 - e^(-x/beta). At x = 2, beta = 3 that is 1 - e^(-2/3) = 0.48658288096740797313 (mpmath, 50 digits), and the regularized incomplete gamma P(1, 2/3) gives the identical value. Asserted as a difference of zero against the engine's OWN EXP, so it tests the distribution rather than a printed constant, and so it holds even if the engine's exp differs in the last bit. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(3,2,2,TRUE)-(1-CHIDIST(3,4)),12) | The page's other stated identity, relating the gamma and chi-squared distributions | 0 | 0ProvenanceMicrosoft's GAMMADIST page states: "For a positive integer n, when alpha = n/2, beta = 2, and cumulative = TRUE, GAMMADIST returns (1 - CHIDIST(x)) with n degrees of freedom." Instantiated here at n = 4, so alpha = 2 and beta = 2. Derived independently: P(2, 1.5) = 0.44217459962892543 at 50 digits, and the chi-squared survival function at x = 3 with 4 degrees of freedom is 0.55782540037107457, whose complement is the same number. Written as a difference of exactly zero so it tests the two functions against each other inside the engine under test rather than against a figure from outside it. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST(-1,9,2,TRUE) | A negative x, which the page excludes | #NUM! | #NUM!ProvenanceExcel documents: "If x < 0, GAMMADIST returns the #NUM! error value." The gamma distribution has no support below zero. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. EXECUTED RESULT, and a SILENT WRONG ANSWER -- the serious class: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return the NUMBER 0 for a negative x, where the page documents #NUM!. No error is raised, so a column of negative inputs yields a column of zeros that looks like a legitimately tiny probability rather than a visible column of errors. This is the same shape of missing input guard batch C recorded for EXPON.DIST/EXPONDIST at negative x. The finding is sharpened by the modern spelling on the same engine: GAMMA.DIST(-1,9,2,TRUE) returns #VALUE! on all four builds (see data/tests/GAMMA.DIST.json), so LibreOffice has the guard -- it is just missing from the legacy alias, and the two names disagree about the same documented exclusion. |
Matched |
| =GAMMADIST(1,0,2,TRUE) | An alpha of zero, which the page excludes | #NUM! | #NUM!ProvenanceExcel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Zero is the boundary of the exclusion. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST(1,9,0,TRUE) | A beta of zero, the other half of the same exclusion | #NUM! | #NUM!ProvenanceExcel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Asserted separately from the alpha case because an engine can guard one parameter and not the other; beta also appears in a division (x/beta), so a missing guard here surfaces as #DIV/0! rather than a wrong number. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST("abc",9,2,TRUE) | A non-numeric x | #VALUE! | #VALUE!ProvenanceExcel documents: "If x, alpha, or beta is nonnumeric, GAMMADIST returns the #VALUE! error value." Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
Google Sheets (executed 2026-08-31 via Drive import)
Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(GAMMADIST(A2,A3,A4,FALSE),12) | Microsoft's documented worked example: the probability DENSITY at x = 10.00001131 with alpha = 9, beta = 2 | 0.03263913042 | 0.032639130418ProvenanceMicrosoft publishes '=GAMMADIST(A2,A3,A4,FALSE)' with the result 0.032639. Derived independently with mpmath at 50 digits straight from the density the page states in prose -- x^(alpha-1) * e^(-x/beta) / (beta^alpha * Gamma(alpha)) -- rather than from any statistics library's gamma routine: with x = 10.00001131, alpha = 9, beta = 2 the value is 0.032639130418294001533, which rounds to exactly the published 0.032639. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(A2,A3,A4,TRUE),12) | Microsoft's documented worked example: the CUMULATIVE distribution at the same point | 0.06809400387 | 0.06809400387ProvenanceMicrosoft publishes '=GAMMADIST(A2,A3,A4,TRUE)' with the result 0.068094. Derived independently as the REGULARIZED LOWER INCOMPLETE GAMMA function P(alpha, x/beta) = P(9, 5.000005655) = 0.068094003869787331102 at 50 digits, which rounds to exactly the published 0.068094. Asserted at 12 dp: the 11th and 12th decimals (…3870) are carried because they are inside double precision and pin the implementation's incomplete-gamma routine, not just its leading digits. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(2,1,3,TRUE)-(1-EXP(-2/3)),12) | The page's own identity: at alpha = 1 the gamma distribution IS the exponential distribution | 0 | 0ProvenanceMicrosoft's GAMMADIST page states "When alpha = 1, GAMMADIST returns the exponential distribution with:" followed by an equation rendered as an image. The identity behind it is standard and independently checkable: the gamma CDF with alpha = 1 and scale beta is 1 - e^(-x/beta). At x = 2, beta = 3 that is 1 - e^(-2/3) = 0.48658288096740797313 (mpmath, 50 digits), and the regularized incomplete gamma P(1, 2/3) gives the identical value. Asserted as a difference of zero against the engine's OWN EXP, so it tests the distribution rather than a printed constant, and so it holds even if the engine's exp differs in the last bit. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(3,2,2,TRUE)-(1-CHIDIST(3,4)),12) | The page's other stated identity, relating the gamma and chi-squared distributions | 0 | 0ProvenanceMicrosoft's GAMMADIST page states: "For a positive integer n, when alpha = n/2, beta = 2, and cumulative = TRUE, GAMMADIST returns (1 - CHIDIST(x)) with n degrees of freedom." Instantiated here at n = 4, so alpha = 2 and beta = 2. Derived independently: P(2, 1.5) = 0.44217459962892543 at 50 digits, and the chi-squared survival function at x = 3 with 4 degrees of freedom is 0.55782540037107457, whose complement is the same number. Written as a difference of exactly zero so it tests the two functions against each other inside the engine under test rather than against a figure from outside it. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST(-1,9,2,TRUE) | A negative x, which the page excludes | #NUM! | #NUM!ProvenanceExcel documents: "If x < 0, GAMMADIST returns the #NUM! error value." The gamma distribution has no support below zero. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. EXECUTED RESULT, and a SILENT WRONG ANSWER -- the serious class: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return the NUMBER 0 for a negative x, where the page documents #NUM!. No error is raised, so a column of negative inputs yields a column of zeros that looks like a legitimately tiny probability rather than a visible column of errors. This is the same shape of missing input guard batch C recorded for EXPON.DIST/EXPONDIST at negative x. The finding is sharpened by the modern spelling on the same engine: GAMMA.DIST(-1,9,2,TRUE) returns #VALUE! on all four builds (see data/tests/GAMMA.DIST.json), so LibreOffice has the guard -- it is just missing from the legacy alias, and the two names disagree about the same documented exclusion. |
Matched |
| =GAMMADIST(1,0,2,TRUE) | An alpha of zero, which the page excludes | #NUM! | #NUM!ProvenanceExcel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Zero is the boundary of the exclusion. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST(1,9,0,TRUE) | A beta of zero, the other half of the same exclusion | #NUM! | #NUM!ProvenanceExcel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Asserted separately from the alpha case because an engine can guard one parameter and not the other; beta also appears in a division (x/beta), so a missing guard here surfaces as #DIV/0! rather than a wrong number. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST("abc",9,2,TRUE) | A non-numeric x | #VALUE! | #VALUE!ProvenanceExcel documents: "If x, alpha, or beta is nonnumeric, GAMMADIST returns the #VALUE! error value." Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(GAMMADIST(A2,A3,A4,FALSE),12) | Microsoft's documented worked example: the probability DENSITY at x = 10.00001131 with alpha = 9, beta = 2 | 0.032639130418 | 0.032639130418ProvenanceMicrosoft publishes '=GAMMADIST(A2,A3,A4,FALSE)' with the result 0.032639. Derived independently with mpmath at 50 digits straight from the density the page states in prose -- x^(alpha-1) * e^(-x/beta) / (beta^alpha * Gamma(alpha)) -- rather than from any statistics library's gamma routine: with x = 10.00001131, alpha = 9, beta = 2 the value is 0.032639130418294001533, which rounds to exactly the published 0.032639. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(A2,A3,A4,TRUE),12) | Microsoft's documented worked example: the CUMULATIVE distribution at the same point | 0.06809400387 | 0.06809400387ProvenanceMicrosoft publishes '=GAMMADIST(A2,A3,A4,TRUE)' with the result 0.068094. Derived independently as the REGULARIZED LOWER INCOMPLETE GAMMA function P(alpha, x/beta) = P(9, 5.000005655) = 0.068094003869787331102 at 50 digits, which rounds to exactly the published 0.068094. Asserted at 12 dp: the 11th and 12th decimals (…3870) are carried because they are inside double precision and pin the implementation's incomplete-gamma routine, not just its leading digits. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(2,1,3,TRUE)-(1-EXP(-2/3)),12) | The page's own identity: at alpha = 1 the gamma distribution IS the exponential distribution | 0 | 0ProvenanceMicrosoft's GAMMADIST page states "When alpha = 1, GAMMADIST returns the exponential distribution with:" followed by an equation rendered as an image. The identity behind it is standard and independently checkable: the gamma CDF with alpha = 1 and scale beta is 1 - e^(-x/beta). At x = 2, beta = 3 that is 1 - e^(-2/3) = 0.48658288096740797313 (mpmath, 50 digits), and the regularized incomplete gamma P(1, 2/3) gives the identical value. Asserted as a difference of zero against the engine's OWN EXP, so it tests the distribution rather than a printed constant, and so it holds even if the engine's exp differs in the last bit. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =ROUND(GAMMADIST(3,2,2,TRUE)-(1-CHIDIST(3,4)),12) | The page's other stated identity, relating the gamma and chi-squared distributions | 0 | 0ProvenanceMicrosoft's GAMMADIST page states: "For a positive integer n, when alpha = n/2, beta = 2, and cumulative = TRUE, GAMMADIST returns (1 - CHIDIST(x)) with n degrees of freedom." Instantiated here at n = 4, so alpha = 2 and beta = 2. Derived independently: P(2, 1.5) = 0.44217459962892543 at 50 digits, and the chi-squared survival function at x = 3 with 4 degrees of freedom is 0.55782540037107457, whose complement is the same number. Written as a difference of exactly zero so it tests the two functions against each other inside the engine under test rather than against a figure from outside it. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
| =GAMMADIST(-1,9,2,TRUE) | A negative x, which the page excludes | 0 | #NUM!ProvenanceExcel documents: "If x < 0, GAMMADIST returns the #NUM! error value." The gamma distribution has no support below zero. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. EXECUTED RESULT, and a SILENT WRONG ANSWER -- the serious class: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return the NUMBER 0 for a negative x, where the page documents #NUM!. No error is raised, so a column of negative inputs yields a column of zeros that looks like a legitimately tiny probability rather than a visible column of errors. This is the same shape of missing input guard batch C recorded for EXPON.DIST/EXPONDIST at negative x. The finding is sharpened by the modern spelling on the same engine: GAMMA.DIST(-1,9,2,TRUE) returns #VALUE! on all four builds (see data/tests/GAMMA.DIST.json), so LibreOffice has the guard -- it is just missing from the legacy alias, and the two names disagree about the same documented exclusion. |
Mismatch |
| =GAMMADIST(1,0,2,TRUE) | An alpha of zero, which the page excludes | #VALUE! | #NUM!ProvenanceExcel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Zero is the boundary of the exclusion. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Mismatch |
| =GAMMADIST(1,9,0,TRUE) | A beta of zero, the other half of the same exclusion | #VALUE! | #NUM!ProvenanceExcel documents: "If alpha <= 0 or if beta <= 0, GAMMADIST returns the #NUM! error value." Asserted separately from the alpha case because an engine can guard one parameter and not the other; beta also appears in a division (x/beta), so a missing guard here surfaces as #DIV/0! rather than a wrong number. EXECUTED RESULT: all four LibreOffice builds (24.2.0.3, 24.8.7.2, 25.2.0.3, 25.8.7.3) return #VALUE! here instead of the documented #NUM! -- the same systemic #VALUE!-substitution pattern already recorded across this corpus, an error-code difference rather than a computation one. Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Mismatch |
| =GAMMADIST("abc",9,2,TRUE) | A non-numeric x | #VALUE! | #VALUE!ProvenanceExcel documents: "If x, alpha, or beta is nonnumeric, GAMMADIST returns the #VALUE! error value." Set up from Microsoft's own worked-example table: A2 = 10.00001131 (the value at which the distribution is evaluated), A3 = 9 (alpha) and A4 = 2 (beta), pasted at A1 exactly as the page describes. Column F is untouched because this harness writes the formula under test into cell F1. |
Matched |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation