Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on State of the art of random double generation.
166808 332743 500449
The doubles method makes each value "as if it's the result of calling the following method with the origin and bound':
double nextDouble(double origin, double bound) { double r = nextDouble(); r = r * (bound - origin) + origin; if (r >= bound) // correct for rounding r = Math.nextDown(bound); return r; }
[1] https://bitbucket.org/snippets/twic/qqEe
[2] https://docs.oracle.com/javase/8/docs/api/java/util/Random.h...
There are no comments on this comment yet.
The doubles method makes each value "as if it's the result of calling the following method with the origin and bound':
Which is the naive approach that Artur has been struggling against.[1] https://bitbucket.org/snippets/twic/qqEe
[2] https://docs.oracle.com/javase/8/docs/api/java/util/Random.h...