diff --git a/pkgs/by-name/xs/xsimd/package.nix b/pkgs/by-name/xs/xsimd/package.nix index 622f11f400bc6..ad806a6a7d468 100644 --- a/pkgs/by-name/xs/xsimd/package.nix +++ b/pkgs/by-name/xs/xsimd/package.nix @@ -26,6 +26,9 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/xtensor-stack/xsimd/issues/1030 ./disable-test_error_gamma.patch + + # https://github.com/xtensor-stack/xsimd/issues/1063 + ./relax-asin-precision.diff ]; # strictDeps raises the chance that xsimd will be able to be cross compiled diff --git a/pkgs/by-name/xs/xsimd/relax-asin-precision.diff b/pkgs/by-name/xs/xsimd/relax-asin-precision.diff new file mode 100644 index 0000000000000..7623f6e81e4a0 --- /dev/null +++ b/pkgs/by-name/xs/xsimd/relax-asin-precision.diff @@ -0,0 +1,14 @@ +diff --git a/test/test_xsimd_api.cpp b/test/test_xsimd_api.cpp +index f416ae9..1f8253e 100644 +--- a/test/test_xsimd_api.cpp ++++ b/test/test_xsimd_api.cpp +@@ -468,7 +468,8 @@ struct xsimd_api_float_types_functions + void test_asin() + { + value_type val(1); +- CHECK_EQ(extract(xsimd::asin(T(val))), std::asin(val)); ++ CHECK(extract(xsimd::asin(T(val))) ++ == doctest::Approx(std::asin(val)).epsilon(1e-7)); + } + void test_asinh() + {