use math/float.zig everywhere

This commit is contained in:
viri
2022-04-06 20:49:05 -06:00
parent 5d6a5a1236
commit e46c612503
26 changed files with 177 additions and 173 deletions

View File

@@ -28,7 +28,7 @@ pub fn next_f64(random: Random, comptime tables: ZigTable) f64 {
} else {
// Generate a value in the range [1, 2) and scale into (0, 1)
const repr = (0x3ff << 52) | (bits >> 12);
break :blk @bitCast(f64, repr) - (1.0 - math.f64_epsilon / 2.0);
break :blk @bitCast(f64, repr) - (1.0 - math.floatEps(f64) / 2.0);
}
};