Skip to content

Commit

Permalink
avoid implicit conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
rabauke committed Feb 26, 2024
1 parent f648153 commit f90c2e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_distributions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ void continuous_dist_test_icdf(const dist &d) {
using result_type = typename dist::result_type;
const auto eps{256 * std::numeric_limits<result_type>::epsilon()};
std::vector<result_type> p_values;
p_values.push_back(result_type(1) / result_type(2));
p_values.push_back(result_type{1} / result_type{2});
for (int i{2}; i < std::numeric_limits<result_type>::digits; ++i) {
p_values.push_back(result_type(0) + std::pow(p_values[0], i));
p_values.push_back(result_type(1) - std::pow(p_values[0], i));
p_values.push_back(result_type{0} + std::pow(p_values[0], result_type(i)));
p_values.push_back(result_type{1} - std::pow(p_values[0], result_type(i)));
}
std::sort(p_values.begin(), p_values.end());
for (const auto p : p_values) {
Expand Down

0 comments on commit f90c2e5

Please sign in to comment.