authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-02 04:05:40+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-03 04:38:53+02:00
log1e838eba7543db06b2e57919c94d740188a11bfb
tree67c2c3add0c644074669187c90fcc42ad9af1b73
parentc13713dd02ccd6ae21a508ec43bc1725199d2ec8
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.math: Re-enable isSignalNan test on most targets.

This remains disabled on arm, aarch64, and powerpc, as well as for the C backend, as it still fails for these targets. See: https://github.com/ziglang/zig/issues/14366

1 files changed, 7 insertions(+), 1 deletions(-)

lib/std/math/isnan.zig+7-1
...@@ -32,7 +32,13 @@ test isSignalNan {...@@ -32,7 +32,13 @@ test isSignalNan {
32 // TODO: Signalling NaN values get converted to quiet NaN values in32 // TODO: Signalling NaN values get converted to quiet NaN values in
33 // some cases where they shouldn't such that this can fail.33 // some cases where they shouldn't such that this can fail.
34 // See https://github.com/ziglang/zig/issues/1436634 // See https://github.com/ziglang/zig/issues/14366
35 // try expect(isSignalNan(math.snan(T)));35 if (!builtin.cpu.arch.isArmOrThumb() and
36 !builtin.cpu.arch.isAARCH64() and
37 !builtin.cpu.arch.isPowerPC() and
38 builtin.zig_backend != .stage2_c)
39 {
40 try expect(isSignalNan(math.snan(T)));
41 }
36 try expect(!isSignalNan(math.nan(T)));42 try expect(!isSignalNan(math.nan(T)));
37 try expect(!isSignalNan(@as(T, 1.0)));43 try expect(!isSignalNan(@as(T, 1.0)));
38 try expect(!isSignalNan(math.inf(T)));44 try expect(!isSignalNan(math.inf(T)));