Ticket #67 (closed Bug: fixed)
No check on uniform()
Reported by: | Guillaume Laurens (Airbus) | Owned by: | F. Singhoff |
---|---|---|---|
Priority: | major | Milestone: | 2.0 |
Component: | framework | Version: | |
Keywords: | Cc: |
Description
In .sc files, uniform() can work better :
- uniform(var, 1, 3) give 1, 2 or 3 ok
- uniform(var, 1, 2) give always 1 !
- uniform(var, 0, 2) give always 1 !
- uniform(var, 2, 3) give 1, 2, 3 !
- When using bad code, no check : uniform(var, -2, 3) -> raised STORAGE_ERROR : heap exhausted.
To fix this bug, a new implementation of the uniform random generator is provided. Do not forget that the accurancy of the value distribution (which should be uniform !) depends of :
- the number of random generation (the more you fire random values, the more you get an accurate distribution).
- the range of the expected values (uniform distribution will be better if the range is large !). By range, we mean the value "b-a" in the case of the statement "uniform(var,a,b);"
Change History
Note: See
TracTickets for help on using
tickets.