-
4 Comments
Show
1 older comment
Matthew M.
on 28 Aug 2012
^Agreed.
Dyuman Joshi
on 10 Aug 2024
Making a sophisticated test suite for such case(s) seems to be an interesting challenge!
Christian Schröder
on 12 Aug 2024
@Dyuman Monte Carlo would probably work: call the function 1e4 times, check how often the two rolls are the same, and test whether the result is (statistically) significantly different from the expected value. Setting a very high significance level to avoid false positives would allow valid solutions to pass with a very high probability while catching ones such as this.
Suggested Problems
-
1406 Solvers
-
781 Solvers
-
Fix the last element of a cell array
1548 Solvers
-
Is this triangle right-angled?
5961 Solvers
-
809 Solvers
More from this Author56
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!