From 65d555b4df82445a77ab6d229af36c1ba8b76a39 Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 17 Jun 2022 20:41:39 +0200 Subject: [PATCH] fix: correct function definitions (swap De Jongs) --- bench/functions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bench/functions.go b/bench/functions.go index 442449d..e6d7a22 100644 --- a/bench/functions.go +++ b/bench/functions.go @@ -23,7 +23,7 @@ func DeJong1st(x []float64) float64 { var res float64 for _, val := range x { - res += math.Floor(val) + res += math.Pow(val, 2) } return res @@ -34,7 +34,7 @@ func DeJong2nd(x []float64) float64 { var res float64 for _, val := range x { - res += math.Pow(val, 2) + res += math.Floor(val) } return res