| ... | @@ -16,8 +16,8 @@ pub fn next_f64(random: *Random, comptime tables: ZigTable) f64 { | ... | @@ -16,8 +16,8 @@ pub fn next_f64(random: *Random, comptime tables: ZigTable) f64 { |
| 16 | while (true) { | 16 | while (true) { |
| 17 | // We manually construct a float from parts as we can avoid an extra random lookup here by | 17 | // We manually construct a float from parts as we can avoid an extra random lookup here by |
| 18 | // using the unused exponent for the lookup table entry. | 18 | // using the unused exponent for the lookup table entry. |
| 19 | const bits = random.scalar(u64); | 19 | const bits = random.int(u64); |
| 20 | const i = @as(usize, bits & 0xff); | 20 | const i = @as(usize, @truncate(u8, bits)); |
| 21 | | 21 | |
| 22 | const u = blk: { | 22 | const u = blk: { |
| 23 | if (tables.is_symmetric) { | 23 | if (tables.is_symmetric) { |