fix: correct function definitions (swap De Jongs)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8a2d3eb5ee
commit
65d555b4df
@ -23,7 +23,7 @@ func DeJong1st(x []float64) float64 {
|
|||||||
var res float64
|
var res float64
|
||||||
|
|
||||||
for _, val := range x {
|
for _, val := range x {
|
||||||
res += math.Floor(val)
|
res += math.Pow(val, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
return res
|
return res
|
||||||
@ -34,7 +34,7 @@ func DeJong2nd(x []float64) float64 {
|
|||||||
var res float64
|
var res float64
|
||||||
|
|
||||||
for _, val := range x {
|
for _, val := range x {
|
||||||
res += math.Pow(val, 2)
|
res += math.Floor(val)
|
||||||
}
|
}
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user