{"action":"closed","issue":{"url":"https://api.github.com/repos/elm-lang/core/issues/529","repository_url":"https://api.github.com/repos/elm-lang/core","labels_url":"https://api.github.com/repos/elm-lang/core/issues/529/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/core/issues/529/comments","events_url":"https://api.github.com/repos/elm-lang/core/issues/529/events","html_url":"https://github.com/elm-lang/core/issues/529","id":141958406,"number":529,"title":"Exponentiation (^) can break Int/Float type safety","user":{"login":"mgold","id":1191970,"avatar_url":"https://avatars.githubusercontent.com/u/1191970?v=3","gravatar_id":"","url":"https://api.github.com/users/mgold","html_url":"https://github.com/mgold","followers_url":"https://api.github.com/users/mgold/followers","following_url":"https://api.github.com/users/mgold/following{/other_user}","gists_url":"https://api.github.com/users/mgold/gists{/gist_id}","starred_url":"https://api.github.com/users/mgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgold/subscriptions","organizations_url":"https://api.github.com/users/mgold/orgs","repos_url":"https://api.github.com/users/mgold/repos","events_url":"https://api.github.com/users/mgold/events{/privacy}","received_events_url":"https://api.github.com/users/mgold/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-18T19:29:44Z","updated_at":"2016-03-18T19:36:58Z","closed_at":"2016-03-18T19:36:58Z","body":"Currently, exponentiation `(^) : number -> number -> number`. A negative integer power will yield a float, producing a float value typed as an Int.\r\n\r\n```elm\r\nbase : Int\r\nbase = 10\r\n\r\npower : Int\r\npower = -3\r\n\r\nbad : Int\r\nbad = base ^ power\r\n```\r\n\r\n`toFloat bad == 0.001` which can cause all kinds of havoc.\r\n\r\nPerhaps the return value should be changed from `number` to `Float`."}}