Published Updated

An extreme-tail sign error in SciPy’s Student-t quantile

A SciPy bug can return positive infinity instead of a large negative value for an extreme-tail Student-t quantile.

Current status

Reported to SciPy on August 20, 2026. The SciPy issue remains open and is labeled defect, scipy.special, and upstream bug.

A SciPy contributor requested an upstream Boost report. We opened Boost.Math issue #1436 on August 24, 2026 and cross-linked it from SciPy. A Boost.Math repository collaborator reproduced the failure directly in Boost.Math and then opened pull request #1437 to address it.

Boost.Math has now merged #1437 and closed #1436 as completed. The fix prevents underflow in the Student-t inverse correction calculation where possible and adds regression tests for very small quantile probabilities across several degrees of freedom. Boost.Math collaborator jzmaddock authored and merged the correction as commit d9fc176 on the develop branch. We have not confirmed it in a released Boost.Math or SciPy version yet.

At the September 9 check, SciPy main still pins Boost.Math at7ff2d2b, whose inverse-t calculation lacks this correction. TheBoost 1.92 update in SciPy #25970does not include it. Upstream merge and inclusion in SciPy remain separate states.

What we observed

For very small tail probabilities, scipy.special.stdtrit and scipy.stats.t.ppf can return +inf (positive infinity) even though the correct Student-t quantile is a large, negative, finite number. The report includes an input that reproduces the error and an independent high-precision calculation of the expected value.

For one reported case with three degrees of freedom, the returned value is +inf, while the expected result is approximately -2.31e82. This is not a small rounding difference: the returned result has the wrong sign and incorrectly reports infinity.

Scope

The observed failures occur at exceptionally small probabilities, with onset that depends on the degrees of freedom. This report does not claim that ordinary Student-t analyses are affected, nor does it estimate how often real research workflows reach the failing region.

The direct Boost.Math reproduction showed that the failure was present in the Boost.Math Student-t quantile path rather than only in SciPy’s Python-facing layer. Boost.Math’s merged fix restructures the derivative calculation used by the final correction step to avoid intermediate underflow where possible, and stops that correction when the derivative itself has underflowed. The pull request also adds regression tests covering extreme probabilities for multiple degrees of freedom.

This page distinguishes a merged upstream correction from a released fix. Boost.Math #1437 is merged, but the latest Boost.Math release predates that merge, and the SciPy issue remains open. We will update the status again when an installable release that contains the correction is confirmed.

Public evidence

Boost.Math has accepted and merged a correction for the upstream defect. We will continue to distinguish that merged state from release availability and will update this page when the correction is confirmed in a released Boost.Math or SciPy version.

Relation to the preprint

We found this issue while testing Student-t calculations for theCorrectly Rounded or Refusedpreprint. This page tracks the software bug and its status. It is not peer review of the paper and does not show that any scientific analysis is valid.