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 Aug 7, 2020
1 parent 0fb9b9c commit 675d6b3
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 675d6b3

Please sign in to comment.