| ... | ... | @@ -1,4 +1,5 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); |
| 2 | 3 | const testing = std.testing; |
| 3 | 4 | const math = std.math; |
| 4 | 5 | const floatXiYf = @import("floatXiYf.zig").floatXiYf; |
| ... | ... | @@ -809,6 +810,9 @@ test "conversion to f32" { |
| 809 | 810 | } |
| 810 | 811 | |
| 811 | 812 | test "conversion to f80" { |
| 813 | if (builtin.zig_backend == .stage1 and builtin.cpu.arch != .x86_64) |
| 814 | return error.SkipZigTest; // https://github.com/ziglang/zig/issues/11408 |
| 815 | |
| 812 | 816 | try testing.expect(floatXiYf(f80, @as(i80, -12)) == -12); |
| 813 | 817 | try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u64, math.maxInt(u64)) + 0)) == math.maxInt(u64) + 0); |
| 814 | 818 | try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u80, math.maxInt(u64)) + 1)) == math.maxInt(u64) + 1); |