haskell / statistics

A fast, high quality library for computing with statistics in Haskell.
http://hackage.haskell.org/package/statistics
BSD 2-Clause "Simplified" License
300 stars 68 forks source link

Occasional Spearman correlation failure in test suite #197

Open lorinder opened 1 year ago

lorinder commented 1 year ago

I sometimes see the Spearman correlation test fail in the test suite. Example:

Spearman correlation, nonlinear:                                                         FAIL
  *** Failed! Falsified (after 3 tests and 7 shrinks):
  [(-0.58,0.0),(-0.4,0.0),(-0.304,-1.0)]
  [(-0.58,0.0),(-0.4,0.0),(-0.304,-1.0)]
  [(724.6376811594204,180.0),(711.5942028985509,180.0),(704.6376811594205,200.0)]
  [(Infinity,180.0),(Infinity,180.0),(1.0477475853785193e306,200.0)]
  [(724.6376811594204,1.4893842007818383e78),(711.5942028985509,1.4893842007818383e78),(704.6376811594205,7.225973768125749e86)]
  [(Infinity,1.4893842007818383e78),(Infinity,1.4893842007818383e78),(1.0477475853785193e306,7.225973768125749e86)]
  (-0.8660254037844387,-1.0,-0.8660254037844387,-1.0)
  Use --quickcheck-replay=986361 to reproduce.
  Use -p '/Spearman correlation, nonlinear/' to rerun this test only.

To reproduce, run the test suite in a loop. This one also takes typically a few dozen test suite runs to fail.