Skip to content

Commit

Permalink
using declarations. [CI SKIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
NAThompson committed Feb 7, 2022
1 parent 7610a2f commit b89e233
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/boost/multiprecision/pslq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,18 @@ void display_progress(int64_t iteration, int64_t max_iterations, double norm_bou
// See: https://www.davidhbailey.com/dhbpapers/cpslq.pdf, section 3.
template<typename Real>
std::vector<std::pair<int64_t, Real>> pslq(std::vector<Real> & x, Real max_acceptable_norm_bound, Real gamma, std::ostream& os = std::cout) {
using std::sqrt;
using std::log;
using std::ceil;
using std::pow;
using std::abs;
std::vector<std::pair<int64_t, Real>> relation;
/*if (!std::is_sorted(x.begin(), x.end())) {
std::cerr << "Elements must be sorted in increasing order.\n";
return relation;
}*/

std::sort(x.begin(), x.end());
using std::sqrt;
if (gamma <= 2/sqrt(3)) {
std::cerr << "γ > 2/√3 is required\n";
return relation;
Expand Down

0 comments on commit b89e233

Please sign in to comment.