From 08df0c2e39e87512d0f83732cddf8ee26050d8d3 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 10:29:33 +0300 Subject: Autocommit at 29.05.2022 @ 10:29 --- src/Models/CellFormula.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Models/CellFormula.cpp') diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp index caa1f5d..2425ea8 100644 --- a/src/Models/CellFormula.cpp +++ b/src/Models/CellFormula.cpp @@ -3,12 +3,12 @@ #include #include double pow(double x, unsigned y) { - std::cout << x << " " << y << std::endl; if (y == 0) return 1; + double res = x; for (unsigned i = 1; i < y; i++) - x *= x; - return x; + res *= x; + return res; } double CellFormula::calculate(unsigned index) { -- cgit v1.3.1-23-gd82d