{"action":"opened","issue":{"url":"https://api.github.com/repos/SebastianNiemann/Mantella/issues/81","labels_url":"https://api.github.com/repos/SebastianNiemann/Mantella/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/SebastianNiemann/Mantella/issues/81/comments","events_url":"https://api.github.com/repos/SebastianNiemann/Mantella/issues/81/events","html_url":"https://github.com/SebastianNiemann/Mantella/issues/81","id":121299425,"number":81,"title":"bestObjectiveValue and difference calcuation","user":{"login":"wlfbck","id":1621804,"avatar_url":"https://avatars.githubusercontent.com/u/1621804?v=3","gravatar_id":"","url":"https://api.github.com/users/wlfbck","html_url":"https://github.com/wlfbck","followers_url":"https://api.github.com/users/wlfbck/followers","following_url":"https://api.github.com/users/wlfbck/following{/other_user}","gists_url":"https://api.github.com/users/wlfbck/gists{/gist_id}","starred_url":"https://api.github.com/users/wlfbck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlfbck/subscriptions","organizations_url":"https://api.github.com/users/wlfbck/orgs","repos_url":"https://api.github.com/users/wlfbck/repos","events_url":"https://api.github.com/users/wlfbck/events{/privacy}","received_events_url":"https://api.github.com/users/wlfbck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-09T17:35:54Z","updated_at":"2015-12-09T17:35:54Z","closed_at":null,"body":"Currently the difference gets calculated as\r\n`const double difference = bestObjectiveValue_ - objectiveValue;`\r\nwhich, since bestObjectiveValue is infinite at start, will result in difference also being infinite.\r\n\r\nSo checking for `if (difference < 0) {` will never find a better bestParameter. Since we presumably want to minimize the objectivevalue the arguments for difference should be switched. This will still return -infinity for the first iteration though, and might be a problem for some algorithms?"}}