Fix `rand_real` to return random number `[0,1)` not `[0,1]`.

parent 1520c97e
......@@ -90,7 +90,7 @@ static double
rand_real(rand_state *t)
{
uint32_t x = rand_uint32(t);
return x*(1.0/4294967295.0);
return x*(1.0/4294967296.0);
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment