Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xsimd: reduce precision to fix asin test #354908

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgs/by-name/xs/xsimd/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions pkgs/by-name/xs/xsimd/relax-asin-precision.diff
Original file line number Diff line number Diff line change
@@ -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()
{