{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/28012","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/28012/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/28012/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/28012/events","html_url":"https://github.com/rust-lang/rust/issues/28012","id":103266615,"number":28012,"title":"i32::pow only handles overflow up to an exponent of 1023","user":{"login":"jonas-schievink","id":1786438,"avatar_url":"https://avatars.githubusercontent.com/u/1786438?v=3","gravatar_id":"","url":"https://api.github.com/users/jonas-schievink","html_url":"https://github.com/jonas-schievink","followers_url":"https://api.github.com/users/jonas-schievink/followers","following_url":"https://api.github.com/users/jonas-schievink/following{/other_user}","gists_url":"https://api.github.com/users/jonas-schievink/gists{/gist_id}","starred_url":"https://api.github.com/users/jonas-schievink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonas-schievink/subscriptions","organizations_url":"https://api.github.com/users/jonas-schievink/orgs","repos_url":"https://api.github.com/users/jonas-schievink/repos","events_url":"https://api.github.com/users/jonas-schievink/events{/privacy}","received_events_url":"https://api.github.com/users/jonas-schievink/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-libs","name":"A-libs","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-26T13:13:56Z","updated_at":"2015-09-04T11:41:43Z","closed_at":null,"body":"Playpen: http://is.gd/zhwksu\r\n\r\n```rust\r\nfn main() {\r\n    let x: i32 = 2;\r\n\r\n    println!(\"{}\", x.pow(1024));\r\n    println!(\"{}\", x.pow(1023));\r\n}\r\n```\r\n\r\nPrints:\r\n```\r\n0\r\nthread '<main>' panicked at 'arithmetic operation overflowed', ../src/libcore/num/mod.rs:550\r\n```\r\n\r\nInterestingly, this only seems to happen with an even base. The overflow is detected correctly when `x` is set to 3 or other odd numbers."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/137714852","html_url":"https://github.com/rust-lang/rust/issues/28012#issuecomment-137714852","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/28012","id":137714852,"user":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T11:41:43Z","updated_at":"2015-09-04T11:41:43Z","body":"I agree with @alexcrichton "}}