Commit 944c6d40ce

Marc Tiehuis <marc@tiehu.is>
2024-07-13 14:46:16
std.fmt.formatFloat: skip f80 round-trip tests on x86_64 windows
1 parent 8ff01f7
Changed files (1)
lib
lib/std/fmt/format_float.zig
@@ -1513,6 +1513,8 @@ const FLOAT128_POW5_INV_ERRORS: [154]u64 = .{
 
 // zig fmt: on
 
+const builtin = @import("builtin");
+
 fn check(comptime T: type, value: T, comptime expected: []const u8) !void {
     const I = @Type(.{ .Int = .{ .signedness = .unsigned, .bits = @bitSizeOf(T) } });
 
@@ -1521,6 +1523,8 @@ fn check(comptime T: type, value: T, comptime expected: []const u8) !void {
     const s = try formatFloat(&buf, value, .{});
     try std.testing.expectEqualStrings(expected, s);
 
+    if (T == f80 and builtin.target.os.tag == .windows and builtin.target.cpu.arch == .x86_64) return;
+
     const o = try std.fmt.parseFloat(T, s);
     const o_bits: I = @bitCast(o);