| author | |
| committer | |
| log | 26119bd98d2f867eb06eeea9431883931d806dd5 |
| tree | ccb34030b89297c5c1d7241161982305568159bc |
| parent | 5285f41267f20150d58a40a96e4380a3b611955d |
| signature |
https://github.com/ziglang/zig/issues/212343 files changed, 6 insertions(+), 0 deletions(-)
lib/std/math/gamma.zig+3| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | // | 3 | // |
| 4 | // https://git.musl-libc.org/cgit/musl/tree/src/math/tgamma.c | 4 | // https://git.musl-libc.org/cgit/musl/tree/src/math/tgamma.c |
| 5 | 5 | ||
| 6 | const builtin = @import("builtin"); | ||
| 6 | const std = @import("../std.zig"); | 7 | const std = @import("../std.zig"); |
| 7 | 8 | ||
| 8 | /// Returns the gamma function of x, | 9 | /// Returns the gamma function of x, |
| ... | @@ -262,6 +263,8 @@ test gamma { | ... | @@ -262,6 +263,8 @@ test gamma { |
| 262 | } | 263 | } |
| 263 | 264 | ||
| 264 | test "gamma.special" { | 265 | test "gamma.special" { |
| 266 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | ||
| 267 | |||
| 265 | inline for (&.{ f32, f64 }) |T| { | 268 | inline for (&.{ f32, f64 }) |T| { |
| 266 | try expect(std.math.isNan(gamma(T, -std.math.nan(T)))); | 269 | try expect(std.math.isNan(gamma(T, -std.math.nan(T)))); |
| 267 | try expect(std.math.isNan(gamma(T, std.math.nan(T)))); | 270 | try expect(std.math.isNan(gamma(T, std.math.nan(T)))); |
test/behavior/floatop.zig+2| ... | @@ -126,6 +126,7 @@ test "cmp f16" { | ... | @@ -126,6 +126,7 @@ test "cmp f16" { |
| 126 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 126 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 127 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 127 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 128 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 128 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 129 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | ||
| 129 | 130 | ||
| 130 | try testCmp(f16); | 131 | try testCmp(f16); |
| 131 | try comptime testCmp(f16); | 132 | try comptime testCmp(f16); |
| ... | @@ -134,6 +135,7 @@ test "cmp f16" { | ... | @@ -134,6 +135,7 @@ test "cmp f16" { |
| 134 | test "cmp f32/f64" { | 135 | test "cmp f32/f64" { |
| 135 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 136 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 136 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 137 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 138 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | ||
| 137 | 139 | ||
| 138 | try testCmp(f32); | 140 | try testCmp(f32); |
| 139 | try comptime testCmp(f32); | 141 | try comptime testCmp(f32); |
test/behavior/math.zig+1| ... | @@ -1597,6 +1597,7 @@ test "NaN comparison" { | ... | @@ -1597,6 +1597,7 @@ test "NaN comparison" { |
| 1597 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 1597 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 1598 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; | 1598 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest; |
| 1599 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1599 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1600 | if (builtin.cpu.arch.isArmOrThumb() and builtin.target.floatAbi() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234 | ||
| 1600 | 1601 | ||
| 1601 | try testNanEqNan(f16); | 1602 | try testNanEqNan(f16); |
| 1602 | try testNanEqNan(f32); | 1603 | try testNanEqNan(f32); |