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

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-08-17 09:39:25 +09:00
parent 1520c97e17
commit 0b22bf4a89
+1 -1
View File
@@ -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