diff --git a/lib/std/math/acos.zig b/lib/std/math/acos.zig index f96c3fffb5..21b1f1b889 100644 --- a/lib/std/math/acos.zig +++ b/lib/std/math/acos.zig @@ -337,6 +337,8 @@ fn acosBinary128(x: f128) f128 { } test "acosBinary16.special" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(0x1.92p0, acosBinary16(0x0p+0), math.floatEpsAt(f16, 0x1.92p0)); try testing.expectApproxEqAbs(0x1.92p1, acosBinary16(-0x1p+0), math.floatEpsAt(f16, 0x1.92p1)); try testing.expectEqual(0x0p+0, acosBinary16(0x1p+0)); @@ -348,6 +350,8 @@ test "acosBinary16.special" { } test "acosBinary16" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(0x1.834p0, acosBinary16(0x1.db4p-5), math.floatEpsAt(f16, 0x1.834p0)); try testing.expectApproxEqAbs(0x1.d48p0, acosBinary16(-0x1.068p-2), math.floatEpsAt(f16, 0x1.d48p0)); try testing.expectApproxEqAbs(0x1.b7cp0, acosBinary16(-0x1.2c4p-3), math.floatEpsAt(f16, 0x1.b7cp0)); diff --git a/lib/std/math/asin.zig b/lib/std/math/asin.zig index 7c5eb68d01..1248e72459 100644 --- a/lib/std/math/asin.zig +++ b/lib/std/math/asin.zig @@ -326,6 +326,8 @@ fn asinBinary128(x: f128) f128 { } test "asinBinary16.special" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(0x1.92p0, asinBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p0)); try testing.expectApproxEqAbs(-0x1.92p0, asinBinary16(-0x1p+0), math.floatEpsAt(f16, -0x1.92p0)); try testing.expectEqual(0x0p+0, asinBinary16(0x0p+0)); @@ -338,6 +340,8 @@ test "asinBinary16.special" { } test "asinBinary16" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(-0x1.e4cp-6, asinBinary16(-0x1.e4cp-6), math.floatEpsAt(f16, -0x1.e4cp-6)); try testing.expectApproxEqAbs(0x1.2a8p0, asinBinary16(0x1.d68p-1), math.floatEpsAt(f16, 0x1.2a8p0)); try testing.expectApproxEqAbs(-0x1.eep-1, asinBinary16(-0x1.a4cp-1), math.floatEpsAt(f16, -0x1.eep-1)); diff --git a/lib/std/math/atan.zig b/lib/std/math/atan.zig index ccb46e7afe..2d55b8bc13 100644 --- a/lib/std/math/atan.zig +++ b/lib/std/math/atan.zig @@ -11,6 +11,7 @@ // https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atanf.c // https://github.com/ARM-software/optimized-routines/blob/master/math/aarch64/advsimd/atan.c +const builtin = @import("builtin"); const std = @import("../std.zig"); const math = std.math; const mem = std.mem; @@ -480,6 +481,8 @@ fn atanBinary128(x: f128) f128 { } test "atanBinary16.special" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectEqual(0x0p+0, atanBinary16(0x0p+0)); try testing.expectEqual(-0x0p+0, atanBinary16(-0x0p+0)); try testing.expectApproxEqAbs(0x1.92p-1, atanBinary16(0x1p+0), math.floatEpsAt(f16, 0x1.92p-1)); @@ -490,6 +493,8 @@ test "atanBinary16.special" { } test "atanBinary16" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; + try testing.expectApproxEqAbs(-0x1.74cp-2, atanBinary16(-0x1.864p-2), math.floatEpsAt(f16, -0x1.74cp-2)); try testing.expectApproxEqAbs(-0x1.374p0, atanBinary16(-0x1.59cp1), math.floatEpsAt(f16, -0x1.374p0)); try testing.expectApproxEqAbs(-0x1.11cp0, atanBinary16(-0x1.d2cp0), math.floatEpsAt(f16, -0x1.11cp0)); diff --git a/lib/std/math/hypot.zig b/lib/std/math/hypot.zig index 40a9518cf4..f661e56d4c 100644 --- a/lib/std/math/hypot.zig +++ b/lib/std/math/hypot.zig @@ -98,7 +98,9 @@ test hypot { } test "hypot.correct" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869 + inline for (.{ f16, f32, f64, f128 }) |T| { inline for (hypot_test_cases) |v| { const a: T, const b: T, const c: T = v; @@ -108,7 +110,9 @@ test "hypot.correct" { } test "hypot.precise" { + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC() and builtin.mode != .Debug) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/171869 + inline for (.{ f16, f32, f64 }) |T| { // f128 seems to be 5 ulp inline for (hypot_test_cases) |v| { const a: T, const b: T, const c: T = v; diff --git a/test/behavior/cast.zig b/test/behavior/cast.zig index cfe0b17c56..2988f4479e 100644 --- a/test/behavior/cast.zig +++ b/test/behavior/cast.zig @@ -1722,6 +1722,7 @@ test "cast f16 to wider types" { if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; const S = struct { fn doTheTest() !void { diff --git a/test/behavior/vector.zig b/test/behavior/vector.zig index 777730345e..f20d083dea 100644 --- a/test/behavior/vector.zig +++ b/test/behavior/vector.zig @@ -278,6 +278,7 @@ test "array to vector with element type coercion" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; const S = struct { fn doTheTest() !void { diff --git a/test/behavior/widening.zig b/test/behavior/widening.zig index 62489c5cd7..48d0a7407c 100644 --- a/test/behavior/widening.zig +++ b/test/behavior/widening.zig @@ -42,6 +42,7 @@ test "float widening" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; + if (builtin.target.cpu.arch == .x86_64 and builtin.target.os.tag == .macos) return error.SkipZigTest; var a: f16 = 12.34; var b: f32 = a;