-
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
-
400 Solvers
-
Duplicate each element of a vector.
616 Solvers
-
743 Solvers
-
1476 Solvers
-
Find out sum of all elements of given Matrix
510 Solvers
More from this Author56
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!