{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/11968","repository_url":"https://api.github.com/repos/chapel-lang/chapel","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/11968/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/11968/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/11968/events","html_url":"https://github.com/chapel-lang/chapel/issues/11968","id":395725687,"node_id":"MDU6SXNzdWUzOTU3MjU2ODc=","number":11968,"title":"mode to halt on floating point overflow / underflow?","user":{"login":"mppf","id":3653132,"node_id":"MDQ6VXNlcjM2NTMxMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/3653132?v=4","gravatar_id":"","url":"https://api.github.com/users/mppf","html_url":"https://github.com/mppf","followers_url":"https://api.github.com/users/mppf/followers","following_url":"https://api.github.com/users/mppf/following{/other_user}","gists_url":"https://api.github.com/users/mppf/gists{/gist_id}","starred_url":"https://api.github.com/users/mppf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mppf/subscriptions","organizations_url":"https://api.github.com/users/mppf/orgs","repos_url":"https://api.github.com/users/mppf/repos","events_url":"https://api.github.com/users/mppf/events{/privacy}","received_events_url":"https://api.github.com/users/mppf/received_events","type":"User","site_admin":false},"labels":[{"id":499565193,"node_id":"MDU6TGFiZWw0OTk1NjUxOTM=","url":"https://api.github.com/repos/chapel-lang/chapel/labels/area:%20Language","name":"area: Language","color":"d4c5f9","default":false},{"id":112762321,"node_id":"MDU6TGFiZWwxMTI3NjIzMjE=","url":"https://api.github.com/repos/chapel-lang/chapel/labels/type:%20Design","name":"type: Design","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2019-01-03T21:11:15Z","updated_at":"2019-01-04T23:44:25Z","closed_at":null,"author_association":"MEMBER","body":"As a Chapel user, I'd like to be able to compile a Chapel program in a mode that produces an error at run-time if there ever is a floating point operation that overflows or underflows. I'd like to be able to write my floating point code without worrying about `Nan` and `Inf` values and would consider these to be in error if they appeared.\r\n\r\nSuch a compilation mode would allow the Chapel compiler to optimize out any handling of `Inf` and `NaN` and could as a result improve performance for certain programs. This topic is related to mandelbrot-complex performance (see #11156) but is not the whole story.\r\n\r\nIssue #11832 requests such a feature - something like the GFortran flag `-ffpe-trap=zero`."},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/451602298","html_url":"https://github.com/chapel-lang/chapel/issues/11968#issuecomment-451602298","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/11968","id":451602298,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTYwMjI5OA==","user":{"login":"damianmoz","id":33830375,"node_id":"MDQ6VXNlcjMzODMwMzc1","avatar_url":"https://avatars1.githubusercontent.com/u/33830375?v=4","gravatar_id":"","url":"https://api.github.com/users/damianmoz","html_url":"https://github.com/damianmoz","followers_url":"https://api.github.com/users/damianmoz/followers","following_url":"https://api.github.com/users/damianmoz/following{/other_user}","gists_url":"https://api.github.com/users/damianmoz/gists{/gist_id}","starred_url":"https://api.github.com/users/damianmoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianmoz/subscriptions","organizations_url":"https://api.github.com/users/damianmoz/orgs","repos_url":"https://api.github.com/users/damianmoz/repos","events_url":"https://api.github.com/users/damianmoz/events{/privacy}","received_events_url":"https://api.github.com/users/damianmoz/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T23:44:25Z","updated_at":"2019-01-04T23:44:25Z","author_association":"NONE","body":"The rounding mode is a very different beast to the exception flags. The rounding mode is where you tell the CPU/core what you want. Having the rounding mode change depending on the running CPU sounds like a recipe for a big mess. But then again, my areas of interest/application are by definition to me (+customers),\r\n\r\nAn exception flag is set by the FPU depending on the data you ask it to play with.  All you should do, I humbly suggest, is to clear it. Well that's what I assumed is the best programming practice. I have never attempted to raise an exception explicitly using the fenv interface although I do portably force an exception using data. Certainly when I code an individual algorithm, I never go near the fenv interface, assuming the user of my module, even if it is me, will configure that appropriately in the calling code and recover/trap from a set exception."}}
{"actor":{"display_login":"damianmoz"}}