From 0bcd4de77521203444812eeb34862d2833256453 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sun, 21 Apr 2024 19:27:40 +0200 Subject: Set higher precision for output. --- least_squares.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/least_squares.cpp b/least_squares.cpp index 827ede0..36bb1c3 100644 --- a/least_squares.cpp +++ b/least_squares.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "pcg-cpp/include/pcg_random.hpp" #include "randutils/randutils.hpp" @@ -224,6 +225,8 @@ int main(int argc, char* argv[]) { Vector x = Vector::Zero(N); x(0) = sqrt(N); + std::cout << std::setprecision(15); + for (unsigned sample = 0; sample < samples; sample++) { QuadraticModel* ls = new QuadraticModel(N, M, r, σ², μA, μJ); Vector xGD = gradientAscent(*ls, x); -- cgit v1.2.3-70-g09d2