{"action":"closed","issue":{"url":"https://api.github.com/repos/scijs/ndarray-blas-level1/issues/5","repository_url":"https://api.github.com/repos/scijs/ndarray-blas-level1","labels_url":"https://api.github.com/repos/scijs/ndarray-blas-level1/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/scijs/ndarray-blas-level1/issues/5/comments","events_url":"https://api.github.com/repos/scijs/ndarray-blas-level1/issues/5/events","html_url":"https://github.com/scijs/ndarray-blas-level1/issues/5","id":77743758,"number":5,"title":"Prevent overflow in nrm2","user":{"login":"rreusser","id":572717,"avatar_url":"https://avatars.githubusercontent.com/u/572717?v=3","gravatar_id":"","url":"https://api.github.com/users/rreusser","html_url":"https://github.com/rreusser","followers_url":"https://api.github.com/users/rreusser/followers","following_url":"https://api.github.com/users/rreusser/following{/other_user}","gists_url":"https://api.github.com/users/rreusser/gists{/gist_id}","starred_url":"https://api.github.com/users/rreusser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rreusser/subscriptions","organizations_url":"https://api.github.com/users/rreusser/orgs","repos_url":"https://api.github.com/users/rreusser/repos","events_url":"https://api.github.com/users/rreusser/events{/privacy}","received_events_url":"https://api.github.com/users/rreusser/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-05-18T17:49:25Z","updated_at":"2016-08-04T04:45:40Z","closed_at":"2016-08-04T04:45:39Z","body":"Nrm2 is a meaningful function for lots of algorithms, but it's not great since the naive implementation square roots the valid floating point range. A floating point aware version normalizes by the max entry, normalizes by the length of the input, and perhaps even orders additions by magnitude of the elements, although that last one seems like too much. This makes it a two step process. Find the magnitude of the input, then add with normalization and rescale the output. Maybe there should be a safe version with optional scale that otherwise falls back to checking the size if not provided. Not the end of the world, but I'd like to keep the algorithms optimized and robust. Perhaps this is best handled by avoiding nrm2 in the first place, when possible. Netlib notes that this function was not added for the sake of optimization.\r\n\r\nSee: http://www.netlib.org/atlas/developer/atlas_contrib/node60.html\r\n"}}
{"actor":{"display_login":"tab58"}}