cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo (JIRA)" <>
Subject [jira] Closed: (COCOON-1716) RandomNumberModule wrong answers
Date Mon, 24 Apr 2006 10:37:10 GMT
     [ ]
Antonio Gallardo closed COCOON-1716:

    Fix Version: 2.1.10-dev (current SVN)
     Resolution: Fixed

Thanks for reporting!
1. It is not uniform, on the javadocs, we read the java.lang.Math.random() has an approximately
uniform distribution [1].

2. The problem about the "min" parameter is now fixed in branch 2.1 and trunk for 2.2. Now
the RandomInputModule returns a random number in the range (min,max) as expected.
To show the fix there are 2 new values in the random input module: http://localhost:8888/samples/modules/randomnumber.html

3. About returning the same value, I was unable to see this behavior, make sure your browser
is not caching the page.


Please cross check and reopen the bug if needed.

> RandomNumberModule wrong answers
> --------------------------------
>          Key: COCOON-1716
>          URL:
>      Project: Cocoon
>         Type: Bug

>     Reporter: Antonio Fiol
>     Assignee: Antonio Gallardo
>      Fix For: 2.1.10-dev (current SVN)

> Apparently, the distribution of the numbers returned by the RandomNumberModule is not
quite uniform.
> Without any special configuration, its result "mod 4" usually (if not always) returns
the same value (Windows platform, Tomcat 5.5, JDK 1.5).
> Other than that, the code does not add up "min" to the result, so it gives a random number
in the range (0,max-min), and not in (min,max) as expected.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message