Skip to content

Commit bcd7895

Browse files
Loosen exp10 tests accuracy constraints
Both some scalar version and some vector version (depending on arch) are not totally accurate, so allow for some approximation. Should fix #917
1 parent 5ac7edf commit bcd7895

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/test_xsimd_api.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,9 @@ struct xsimd_api_float_types_functions
526526
void test_exp10()
527527
{
528528
value_type val(2);
529-
#ifdef EMSCRIPTEN
529+
// exp10 doesn't always have an accurate implementation, so allow for
530+
// approximate result
530531
CHECK_EQ(extract(xsimd::exp10(T(val))), doctest::Approx(std::pow(value_type(10), val)));
531-
#else
532-
CHECK_EQ(extract(xsimd::exp10(T(val))), std::pow(value_type(10), val));
533-
#endif
534532
}
535533
void test_exp2()
536534
{

0 commit comments

Comments
 (0)