{"action":"created","issue":{"url":"https://api.github.com/repos/torch/torch7/issues/260","labels_url":"https://api.github.com/repos/torch/torch7/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/torch/torch7/issues/260/comments","events_url":"https://api.github.com/repos/torch/torch7/issues/260/events","html_url":"https://github.com/torch/torch7/pull/260","id":88408410,"number":260,"title":"Fix problem with NaNs in max and min","user":{"login":"sergomezcol","id":3340788,"avatar_url":"https://avatars.githubusercontent.com/u/3340788?v=3","gravatar_id":"","url":"https://api.github.com/users/sergomezcol","html_url":"https://github.com/sergomezcol","followers_url":"https://api.github.com/users/sergomezcol/followers","following_url":"https://api.github.com/users/sergomezcol/following{/other_user}","gists_url":"https://api.github.com/users/sergomezcol/gists{/gist_id}","starred_url":"https://api.github.com/users/sergomezcol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergomezcol/subscriptions","organizations_url":"https://api.github.com/users/sergomezcol/orgs","repos_url":"https://api.github.com/users/sergomezcol/repos","events_url":"https://api.github.com/users/sergomezcol/events{/privacy}","received_events_url":"https://api.github.com/users/sergomezcol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-15T12:22:03Z","updated_at":"2015-07-09T23:04:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/torch/torch7/pulls/260","html_url":"https://github.com/torch/torch7/pull/260","diff_url":"https://github.com/torch/torch7/pull/260.diff","patch_url":"https://github.com/torch/torch7/pull/260.patch"},"body":"Now min and max always return NaN when the input contains a NaN.\r\n\r\nThey only returned NaN before when the first element of the input was NaN and the min or max value excluding NaNs otherwise."},"comment":{"url":"https://api.github.com/repos/torch/torch7/issues/comments/120170680","html_url":"https://github.com/torch/torch7/pull/260#issuecomment-120170680","issue_url":"https://api.github.com/repos/torch/torch7/issues/260","id":120170680,"user":{"login":"hughperkins","id":123560,"avatar_url":"https://avatars.githubusercontent.com/u/123560?v=3","gravatar_id":"","url":"https://api.github.com/users/hughperkins","html_url":"https://github.com/hughperkins","followers_url":"https://api.github.com/users/hughperkins/followers","following_url":"https://api.github.com/users/hughperkins/following{/other_user}","gists_url":"https://api.github.com/users/hughperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/hughperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughperkins/subscriptions","organizations_url":"https://api.github.com/users/hughperkins/orgs","repos_url":"https://api.github.com/users/hughperkins/repos","events_url":"https://api.github.com/users/hughperkins/events{/privacy}","received_events_url":"https://api.github.com/users/hughperkins/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T23:04:15Z","updated_at":"2015-07-09T23:04:15Z","body":"Oh, good point, I hadn't checked/noticed that isnan comes from standard-libraries.  According to http://stackoverflow.com/questions/2249110/how-do-i-make-a-portable-isnan-isinf-function , the answer by Johann, it can be implemented portably as `int isnan(double x) { return x != x; }`, as long as the fast math flag is not set.  Not sure if we set that or not?"}}