xsimd: reduce precision to fix asin test
`asin` test fails on darwin with clang-19. reduce the test precision epsilon to 1e-7 fixes the test
This commit is contained in:
parent
4e4c5898b1
commit
a6ebc2e1f2
@ -26,6 +26,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
# https://github.com/xtensor-stack/xsimd/issues/1030
|
# https://github.com/xtensor-stack/xsimd/issues/1030
|
||||||
./disable-test_error_gamma.patch
|
./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
|
# strictDeps raises the chance that xsimd will be able to be cross compiled
|
||||||
|
|||||||
14
pkgs/by-name/xs/xsimd/relax-asin-precision.diff
Normal file
14
pkgs/by-name/xs/xsimd/relax-asin-precision.diff
Normal file
@ -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()
|
||||||
|
{
|
||||||
Loading…
x
Reference in New Issue
Block a user