@@ -57,6 +57,6 @@ bool randomBool(Random* r) {
float randomFloat(Random* r) {
u32 u = next(r);
- float f = (float)u / (float)0xFFFFFFF;
+ float f = (float)u / (float)0xFFFF'FFFFu;
return f >= 1.0f ? randomFloat(r) : f;
}
@@ -53,7 +53,7 @@ static void testFloatAverage(bool light) {
static void testFloatCoin(bool light) {
- int limit = light ? 100'000 : 1'000'000;
+ int limit = light ? 200'000 : 1'000'000;
Random r;
initRandom(&r, 5534);
int c[2] = {0, 0};