Skip to content
Open
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
7 changes: 3 additions & 4 deletions test/test_complex_trigonometric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,14 @@ struct complex_trigonometric_test
std::transform(atan_input.cbegin(), atan_input.cend(), expected.begin(),
[](const value_type& v)
{ using std::atan; return atan(v); });
batch_type in, out;
batch_type in, out, ref;
for (size_t i = 0; i < nb_input; i += size)
{
detail::load_batch(in, atan_input, i);
out = atan(in);
detail::store_batch(out, res, i);
detail::load_batch(ref, expected, i);
CHECK_BATCH_EQ(ref, out);
}
size_t diff = detail::get_nb_diff(res, expected);
CHECK_EQ(diff, 0);
}

private:
Expand Down
8 changes: 6 additions & 2 deletions test/test_xsimd_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,13 @@ struct xsimd_api_float_types_functions
{
value_type val0(2);
value_type val1(2);
value_type nval1(-3);
int ival1 = 4;
int nival1 = -5;
CHECK_EQ(extract(xsimd::pow(T(val0), T(val1))), std::pow(val0, val1));
CHECK_EQ(extract(xsimd::pow(T(val0), ival1)), std::pow(val0, ival1));
CHECK_EQ(extract(xsimd::pow(T(val0), T(nval1))), doctest::Approx(std::pow(val0, nval1)));
CHECK_EQ(extract(xsimd::pow(T(val0), nival1)), doctest::Approx(std::pow(val0, nival1)));
}
void test_reciprocal()
{
Expand Down Expand Up @@ -784,7 +788,7 @@ struct xsimd_api_float_types_functions
void test_sqrt()
{
value_type val(1);
CHECK_EQ(extract(xsimd::sqrt(T(val))), std::sqrt(val));
CHECK_EQ(extract(xsimd::sqrt(T(val))), doctest::Approx(std::sqrt(val)));
}
void test_tan()
{
Expand Down Expand Up @@ -1183,7 +1187,7 @@ struct xsimd_api_all_signed_types_functions
void test_abs()
{
value_type val(-1);
CHECK_EQ(extract(xsimd::abs(T(val))), std::abs(val));
CHECK_EQ(extract(xsimd::abs(T(val))), doctest::Approx(std::abs(val)));
}

void test_fnms()
Expand Down