[
https://issues.apache.org/jira/browse/MATH-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499852#comment-13499852
]
Gilles commented on MATH-899:
-----------------------------
bq. it would be sufficient to do a proof by induction (sort of): [...]
Well, this could be said for any piece of code: we must have property <x>, so
we write code that implements <x>. ;)
We write unit tests that actually show that the code behaves as expected.
After spending quite some time on the attached code, I of course agree that it
is complicated in some situations. In this case, the code is simple enough as
to not necessitates a unit test.
But the issue will crop up again if we start introducing more "complicated"
code (like the utilities in the "java.util.concurrent" package).
So do I commit just the class and no unit test, or just the unit test of the
synchronizing wrapper?
> A random crash of MersenneTwister random generator
> --------------------------------------------------
>
> Key: MATH-899
> URL: https://issues.apache.org/jira/browse/MATH-899
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.0
> Environment: Windows 7, JDK 1.7.05
> Reporter: Alexander Nozik
> Priority: Minor
> Attachments: SynchronizedRandomGenerator.java,
> SynchronizedRandomGeneratorTest.java
>
>
> There is a very small probability that MersenneTwister generator gives a
> following error:
> java.lang.ArrayIndexOutOfBoundsException: 624
> in MersenneTwister.java line 253
> The error is completely random and its probability is about 1e-8.
> UPD: The problem most probably arises only in multy-thread mode.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira