fix(cec2020): add Schwefel Modified's missing case
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-02-22 12:52:14 +01:00
parent 1e8b3d2d84
commit e1fac11ec5
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

View File

@ -153,6 +153,7 @@ func SchwefelModified(x []float64) float64 {
case zi < -500:
// g(zi)
sum += (math.Mod(math.Abs(zi), 500)-500)*math.Sin(math.Sqrt(math.Abs(math.Mod(math.Abs(zi), 500)-500))) - (math.Pow(zi-500, 2) - 10000*fnx)
case math.Abs(zi) <= 500:
// g(zi)