-
-
Notifications
You must be signed in to change notification settings - Fork 400
Closed
Milestone
Description
Scalacheck is using a flawed method [https://github.com/rickynils/scalacheck/blob/master/src/main/scala/org/scalacheck/Arbitrary.scala#L105] to generate Arbitrary Double values. Currently, it basically generates 3 number "archetypes": +1E307, 0.0, and -1E307. Because it is using a uniform distribution with endpoints at +/- E307, the chance of it generating any values in a everyday range (say +/- 1000) is infinitesimally small.
A good solution IMO is to use a log-uniform distribution, ie one where log(value) is uniformly distributed, not the values themselves. This can be done by generating the mantissa and the exponent separately from uniform distributions.
Metadata
Metadata
Assignees
Labels
No labels