{"action":"opened","issue":{"url":"https://api.github.com/repos/lballabio/QuantLib/issues/262","repository_url":"https://api.github.com/repos/lballabio/QuantLib","labels_url":"https://api.github.com/repos/lballabio/QuantLib/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/lballabio/QuantLib/issues/262/comments","events_url":"https://api.github.com/repos/lballabio/QuantLib/issues/262/events","html_url":"https://github.com/lballabio/QuantLib/issues/262","id":236103580,"number":262,"title":"NthToDefaultTest::testGaussStudent test case always passes regardless of wrong calculation","user":{"login":"haozhangphd","id":10821861,"avatar_url":"https://avatars2.githubusercontent.com/u/10821861?v=3","gravatar_id":"","url":"https://api.github.com/users/haozhangphd","html_url":"https://github.com/haozhangphd","followers_url":"https://api.github.com/users/haozhangphd/followers","following_url":"https://api.github.com/users/haozhangphd/following{/other_user}","gists_url":"https://api.github.com/users/haozhangphd/gists{/gist_id}","starred_url":"https://api.github.com/users/haozhangphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haozhangphd/subscriptions","organizations_url":"https://api.github.com/users/haozhangphd/orgs","repos_url":"https://api.github.com/users/haozhangphd/repos","events_url":"https://api.github.com/users/haozhangphd/events{/privacy}","received_events_url":"https://api.github.com/users/haozhangphd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-15T07:43:00Z","updated_at":"2017-06-15T07:43:00Z","closed_at":null,"body":"in the file `nthtodefault.cpp:368` and `nthtodefault.cpp:382`, the lines \r\n```\r\nBOOST_CHECK_MESSAGE (fabs(diff / hwDataDist[i].spread[0]) ||\r\n                             fabs(diff) < absTolerance\r\n```\r\n and\r\n```\r\nBOOST_CHECK_MESSAGE (fabs(diff / hwDataDist[i].spread[3]) ||\r\n                             fabs(diff) < absTolerance\r\n```\r\nalways tests true as long as `diff` is nonzero. I think these lines need to be changed to \r\n```\r\nBOOST_CHECK_MESSAGE (fabs(diff / hwDataDist[i].spread[0]) < relTolerance||\r\n                             fabs(diff) < absTolerance\r\n```\r\n and\r\n```\r\nBOOST_CHECK_MESSAGE (fabs(diff / hwDataDist[i].spread[3]) < relTolerance ||\r\n                             fabs(diff) < absTolerance\r\n```\r\nrespectively.\r\n\r\n"}}
{"actor":{"display_login":"haozhangphd"}}