Hello Commons Statistics maintainers,
The official commons-statistics-distribution 1.3 artifact returns NaN
probabilities for distinct, finite, ordered inputs:
LogUniformDistribution d = LogUniformDistribution.of(
0x1.0p100, 0x1.0000000000002p100);
double x = 0x1.0000000000001p100;
System.out.println(d.cumulativeProbability(x)); // NaN
System.out.println(d.survivalProbability(x)); // NaN
The analytical probabilities are approximately 0.5. Subtracting separately
rounded endpoint logarithms produces a zero denominator here. A log1p-based
ratio candidate removes the tested CDF/SF failures.
On 176 unique input triples, the official release, local candidate and
restored source give 48, 0 and 48 CDF/SF mismatches against independent
Decimal references at 120 and 200 digits (absolute tolerance 1e-12).
Invalid probability pairs number 30, 0 and 30. A fresh offline packet
replay reproduced these results on OpenJDK 26.0.2.
A separate GERO synthetic CSV/JSON consumer measures a possible
consequence: 30 invalid results yield 30 wrong threshold decisions if the
consumer compares NaN without a finite-value guard; a guarded consumer
blocks those 30 calculations instead. For the example above, SF(x) times
1,000,000 should be about 500,000 units, above a 400,000 threshold. NaN
incorrectly takes the naive consumer's within-limit branch. This consumer
is our demonstration code, not an Apache business application. No deployed
impact, customer loss or security vulnerability is claimed.
The target class at current master 5d8d9e10d876d9a913a054154146f36a18490824
differs from the release only in Javadoc; full master was not built. The
candidate is not a full distribution fix or a correctly rounded
implementation: inverse, moment and sampling methods and the full upstream
test suite were not validated.
Bounded source/Jira/GitHub review found no exact prior report.
STATISTICS-88 introduces this distribution; STATISTICS-96 concerns invalid
NaN/infinite constructor inputs, whereas these inputs are finite and
ordered. The separate mailing-list archive search was unavailable, so
completeness is not claimed.
A small offline reproducer, pinned artifact hashes, raw results and
candidate/restoration patch evidence are ready. Could you point me to an
existing ticket, or advise whether this should become a numerical-stability
regression ticket? Happy to help with focused reproductions and regression
checks.
This message and test preparation were generated with an AI assistant under
my direction. I do not claim personal independent code review. The results
above come from executed local tests.
Best regards,
Khamit Kadirbekov
GERO independent research