@@ -29,11 +29,11 @@ template<class Derived>
2929LogLikeIndexMapping<Derived>::LogLikeIndexMapping(const double & gamma, const double & index_offset):
3030 gamma (require_valid_gamma(gamma)),
3131 index_offset(index_offset),
32- relative_accuracy(compute_relative_accuracy(gamma, Derived::CORRECTING_FACTOR )),
33- multiplier(std::log(Derived::BASE ) / std::log1p(gamma - 1 )) {}
32+ relative_accuracy(compute_relative_accuracy(gamma, Derived::CORRECTING_FACTOR () )),
33+ multiplier(std::log(Derived::BASE () ) / std::log1p(gamma - 1 )) {}
3434
3535template <class Derived >
36- double LogLikeIndexMapping<Derived>::compute_relative_accuracy(const double & gamma, const double & correcting_factor) {
36+ double LogLikeIndexMapping<Derived>::compute_relative_accuracy(const double gamma, const double correcting_factor) {
3737 const double exact_log_gamma = std::pow (gamma, correcting_factor);
3838 return (exact_log_gamma - 1 ) / (exact_log_gamma + 1 );
3939}
@@ -89,14 +89,14 @@ double LogLikeIndexMapping<Derived>::get_relative_accuracy() const {
8989
9090template <class Derived >
9191double LogLikeIndexMapping<Derived>::min_indexable_value() const {
92- const double & a = std::pow (Derived::BASE , (static_cast <double >(std::numeric_limits<int >::min ()) - index_offset) / multiplier + 1 );
92+ const double & a = std::pow (Derived::BASE () , (static_cast <double >(std::numeric_limits<int >::min ()) - index_offset) / multiplier + 1 );
9393 const double & b = std::numeric_limits<double >::min () * (1 + relative_accuracy) / (1 - relative_accuracy);
9494 return std::max (a, b);
9595}
9696
9797template <class Derived >
9898double LogLikeIndexMapping<Derived>::max_indexable_value() const {
99- const double & a = std::pow (Derived::BASE , (static_cast <double >(std::numeric_limits<int >::max ()) - index_offset) / multiplier - 1 );
99+ const double & a = std::pow (Derived::BASE () , (static_cast <double >(std::numeric_limits<int >::max ()) - index_offset) / multiplier - 1 );
100100 const double & b = std::numeric_limits<double >::max () / (1 + relative_accuracy);
101101 return std::min (a, b);
102102}
0 commit comments