{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/13875","labels_url":"https://api.github.com/repos/golang/go/issues/13875/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/13875/comments","events_url":"https://api.github.com/repos/golang/go/issues/13875/events","html_url":"https://github.com/golang/go/issues/13875","id":125629454,"number":13875,"title":"math/big: mistake in the definition of DivMod","user":{"login":"TomCoates8161","id":16611610,"avatar_url":"https://avatars.githubusercontent.com/u/16611610?v=3","gravatar_id":"","url":"https://api.github.com/users/TomCoates8161","html_url":"https://github.com/TomCoates8161","followers_url":"https://api.github.com/users/TomCoates8161/followers","following_url":"https://api.github.com/users/TomCoates8161/following{/other_user}","gists_url":"https://api.github.com/users/TomCoates8161/gists{/gist_id}","starred_url":"https://api.github.com/users/TomCoates8161/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomCoates8161/subscriptions","organizations_url":"https://api.github.com/users/TomCoates8161/orgs","repos_url":"https://api.github.com/users/TomCoates8161/repos","events_url":"https://api.github.com/users/TomCoates8161/events{/privacy}","received_events_url":"https://api.github.com/users/TomCoates8161/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/Documentation","name":"Documentation","color":"aaffaa"}],"state":"open","locked":false,"assignee":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/34","html_url":"https://github.com/golang/go/milestones/Go1.6Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/34/labels","id":1425772,"number":34,"title":"Go1.6Maybe","description":"Maybe this will happen for Go 1.6.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":18,"state":"open","created_at":"2015-11-23T18:39:45Z","updated_at":"2016-01-08T15:42:48Z","due_on":"2016-01-31T05:00:00Z","closed_at":null},"comments":3,"created_at":"2016-01-08T15:12:36Z","updated_at":"2016-01-08T16:07:18Z","closed_at":null,"body":"The documentation for DivMod, in the big library, suggests that z.DivMod(x,y,w) sets z to the quotient q and w to the modulus m, where q and m satisfy\r\n> m = x - y*q  with 0 <= m < |q|\r\n\r\nI believe that this should read\r\n> m = x - y*q  with 0 <= m < |y|\r\n\r\nso that it agrees with the reference mentioned in the documentation for DivMod: Raymond T. Boute, “The Euclidean definition of the functions div and mod”. ACM Transactions on Programming Languages and Systems (TOPLAS), 14(2):127-144, New York, NY, USA, 4/1992. ACM press. "},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/170041826","html_url":"https://github.com/golang/go/issues/13875#issuecomment-170041826","issue_url":"https://api.github.com/repos/golang/go/issues/13875","id":170041826,"user":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T16:07:18Z","updated_at":"2016-01-08T16:07:18Z","body":"Yes, if the operation is q=x/y then clearly the remainder (sorry, modulus) must be < y, not < q. Thanks.\r\n"}}