Closed snoyberg closed 10 years ago
Sporadic failures are usual featery of property testing of numberic code. They arise because we don't have exact equality and have to use approximate equality. Usual choice is |a-b|/max(|a|,|b|) < ε
. Problems don't end here because ε
depends on parameter on in some corners of parameter space may approach 1. We use some ε
for all inputs so it envitable fails for some small fraction.
One could argue that it's bug in tests. I agree but I don't know how to write them properly.
I suppose it's for purposes of stackage? AFAIR it's possible to mark that test may fail and that's OK. It's probably only sane solution
In this particular case test is log(Γ(x+1)) - log(Γ(x)) - log x ≈ 0
. For small x
expression x+1
start to lose precision. So it's OK.
OK, I'll take your recommendation and set this as an expected failure in Stackage. Thanks for the info.
Full error log below: