Ticket #67 (closed Bug: fixed)

Opened 16 years ago

Last modified 16 years ago

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

comment:1 Changed 16 years ago by jlegrand

  • Owner set to F. Singhoff
  • Status changed from new to assigned

comment:2 Changed 16 years ago by jlegrand

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.