{"action":"created","issue":{"url":"https://api.github.com/repos/exercism/xgo/issues/157","labels_url":"https://api.github.com/repos/exercism/xgo/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/exercism/xgo/issues/157/comments","events_url":"https://api.github.com/repos/exercism/xgo/issues/157/events","html_url":"https://github.com/exercism/xgo/issues/157","id":65447525,"number":157,"title":"Int type used in largest-series-product may be too small","user":{"login":"pminten","id":4168875,"avatar_url":"https://avatars.githubusercontent.com/u/4168875?v=3","gravatar_id":"","url":"https://api.github.com/users/pminten","html_url":"https://github.com/pminten","followers_url":"https://api.github.com/users/pminten/followers","following_url":"https://api.github.com/users/pminten/following{/other_user}","gists_url":"https://api.github.com/users/pminten/gists{/gist_id}","starred_url":"https://api.github.com/users/pminten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pminten/subscriptions","organizations_url":"https://api.github.com/users/pminten/orgs","repos_url":"https://api.github.com/users/pminten/repos","events_url":"https://api.github.com/users/pminten/events{/privacy}","received_events_url":"https://api.github.com/users/pminten/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-31T13:14:54Z","updated_at":"2015-04-01T07:27:27Z","closed_at":null,"body":"The largest-series-product test has this in its test cases:\r\n\r\n```go\r\nvar tests = []struct {\r\n\tdigits  string\r\n\tspan    int\r\n\tproduct int\r\n\tok      bool\r\n}{\r\n...\r\n\t{pe1k, 13, 23514624000, true}, // new PE problem\r\n}\r\n```\r\n\r\nThe problem here is that the number 23514624000 doesn't fit in an int32. In go the type int may be implemented as int32 or int64, most likely based on the machine word size. That means this will work for a 64-bit platform but will likely break at compile time on a 32-bit platform (since you're not allowed to have overflowing constants).\r\n\r\nI'm not quite sure how to best fix this though. Changing the result size to int64 would make the most sense but would break user code."},"comment":{"url":"https://api.github.com/repos/exercism/xgo/issues/comments/88377816","html_url":"https://github.com/exercism/xgo/issues/157#issuecomment-88377816","issue_url":"https://api.github.com/repos/exercism/xgo/issues/157","id":88377816,"user":{"login":"pminten","id":4168875,"avatar_url":"https://avatars.githubusercontent.com/u/4168875?v=3","gravatar_id":"","url":"https://api.github.com/users/pminten","html_url":"https://github.com/pminten","followers_url":"https://api.github.com/users/pminten/followers","following_url":"https://api.github.com/users/pminten/following{/other_user}","gists_url":"https://api.github.com/users/pminten/gists{/gist_id}","starred_url":"https://api.github.com/users/pminten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pminten/subscriptions","organizations_url":"https://api.github.com/users/pminten/orgs","repos_url":"https://api.github.com/users/pminten/repos","events_url":"https://api.github.com/users/pminten/events{/privacy}","received_events_url":"https://api.github.com/users/pminten/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T07:27:27Z","updated_at":"2015-04-01T07:27:27Z","body":"I don't think the devious approach would work. The product would overflow during calculation in the user code and then extended to int64 upon return. So correct user code would still be unable to return a correct value.\r\n\r\nI'll make a PR for a full conversion to int64 + TestVersion later today."}}