Skip to content
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
28 changes: 1 addition & 27 deletions test/test_asin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <boost/math/special_functions/next.hpp>
#include <boost/core/lightweight_test.hpp>

#include <chrono>
#include <cmath>
#include <random>

Expand All @@ -49,28 +48,6 @@ using namespace boost::decimal;
template<typename T> auto my_zero() -> T;
template<typename T> auto my_one () -> T;

namespace local
{
template<typename IntegralTimePointType,
typename ClockType = std::chrono::high_resolution_clock>
auto time_point() noexcept -> IntegralTimePointType
{
using local_integral_time_point_type = IntegralTimePointType;
using local_clock_type = ClockType;

const auto current_now =
static_cast<std::uintmax_t>
(
std::chrono::duration_cast<std::chrono::nanoseconds>
(
local_clock_type::now().time_since_epoch()
).count()
);

return static_cast<local_integral_time_point_type>(current_now);
}
} // namespace local

template <typename Dec>
void test_asin()
{
Expand Down Expand Up @@ -203,10 +180,7 @@ auto test_asin_edge() -> void
using namespace boost::decimal::literals;
const T half_pi { static_cast<T>(1.570796326794896619231321691639751_DL) };

std::random_device rd;
std::mt19937_64 gen(rd());

gen.seed(local::time_point<typename std::mt19937_64::result_type>());
std::mt19937_64 gen(42);

auto dis =
std::uniform_real_distribution<float>
Expand Down
2 changes: 1 addition & 1 deletion test/test_sin_cos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ auto test_cos() -> void
auto ret_val {std::cos(val1)};
auto ret_dec {static_cast<float>(cos(d1))};

if (!BOOST_TEST(std::fabs(ret_val - ret_dec) < 35*std::numeric_limits<float>::epsilon()))
if (!BOOST_TEST(std::fabs(ret_val - ret_dec) < 16*std::numeric_limits<float>::epsilon()))
{
// LCOV_EXCL_START
std::cerr << "Val 1: " << val1
Expand Down
Loading