In my Bernoulli Numbers challenge, I've been seeing a lot of invalid answers that fail to compute certain values to the required accuracy/precision, or that take substantially longer to run than the amount of time between the posting of the challenge and the answer (such as this one - it's been churning for nearly 40 hours at just computing 30-36, and the answer was posted less than 24 hours after the question). Now, whether said requirements were good requirements is another discussion altogether - I'm mainly concerned with the fact that many answers have been posted that have obviously not been tested by the posters.
The entire point of providing test cases is to allow users to test their prospective answers and verify that they produce the expected output before posting them, rather than having the OP1 test them and inform the poster of their answer's invalidity. Needless to say, it is frustrating to go through the effort of compiling test cases and see them not being utilized.
I would like to see a policy where users are required to test their code before submitting it as an answer, to reduce the effort required of the OP in testing all of the answers for validity. Is this a reasonable request? If so, how might we go about requiring proof of testing/validity?
1I use "OP" to mean the user who posted the question/challenge
0. That's simple enough to check for, while I was working on compiling
0-60for the full test suite. \$\endgroup\$
0.000000.... I did have an iteration of my code where all of the odd numbers were just set to 0, and there were still inaccuracies for the higher even numbers \$\endgroup\$
n=60(the test cases available when I wrote my answer) and it works fine. However, it utterly fails for big odd
n, because rounding errors sum up. So, yes, I've tested not enough and my answer is wrong. I've deleted it. PS: I've written a memoizing wrapper so
b 60runs in less than a second, but removed it again for golfing reasons. \$\endgroup\$