{"action":"created","issue":{"url":"https://api.github.com/repos/ldionne/hana/issues/28","labels_url":"https://api.github.com/repos/ldionne/hana/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/ldionne/hana/issues/28/comments","events_url":"https://api.github.com/repos/ldionne/hana/issues/28/events","html_url":"https://github.com/ldionne/hana/issues/28","id":63553288,"number":28,"title":"IntegralDomain is misnamed","user":{"login":"ldionne","id":700834,"avatar_url":"https://avatars.githubusercontent.com/u/700834?v=3","gravatar_id":"","url":"https://api.github.com/users/ldionne","html_url":"https://github.com/ldionne","followers_url":"https://api.github.com/users/ldionne/followers","following_url":"https://api.github.com/users/ldionne/following{/other_user}","gists_url":"https://api.github.com/users/ldionne/gists{/gist_id}","starred_url":"https://api.github.com/users/ldionne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldionne/subscriptions","organizations_url":"https://api.github.com/users/ldionne/orgs","repos_url":"https://api.github.com/users/ldionne/repos","events_url":"https://api.github.com/users/ldionne/events{/privacy}","received_events_url":"https://api.github.com/users/ldionne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ldionne/hana/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-22T17:02:09Z","updated_at":"2015-09-14T14:55:55Z","closed_at":null,"body":"IntegralDomain is the wrong name for that concept. In abstract algebra, an IntegralDomain is not enough to provide `quot` and `rem`. Technically, I think we need an [Euclidean Domain](http://en.wikipedia.org/wiki/Euclidean_domain)."},"comment":{"url":"https://api.github.com/repos/ldionne/hana/issues/comments/140106438","html_url":"https://github.com/ldionne/hana/issues/28#issuecomment-140106438","issue_url":"https://api.github.com/repos/ldionne/hana/issues/28","id":140106438,"user":{"login":"ldionne","id":700834,"avatar_url":"https://avatars.githubusercontent.com/u/700834?v=3","gravatar_id":"","url":"https://api.github.com/users/ldionne","html_url":"https://github.com/ldionne","followers_url":"https://api.github.com/users/ldionne/followers","following_url":"https://api.github.com/users/ldionne/following{/other_user}","gists_url":"https://api.github.com/users/ldionne/gists{/gist_id}","starred_url":"https://api.github.com/users/ldionne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldionne/subscriptions","organizations_url":"https://api.github.com/users/ldionne/orgs","repos_url":"https://api.github.com/users/ldionne/repos","events_url":"https://api.github.com/users/ldionne/events{/privacy}","received_events_url":"https://api.github.com/users/ldionne/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T14:55:55Z","updated_at":"2015-09-14T14:55:55Z","body":"Yes, I think we're looking at an Euclidean Ring (which is an Euclidean Domain). I would need to add the `norm` method, and the euclidean algorithm would be defined by the two functions `quot` and `rem`.\r\n\r\nRegarding the name of `quot` and `rem`: There's a subtle difference between `div`/`mod` and `quot`/`rem` in Haskell. `quot` truncates towards zero, whereas `div` rounds towards minus infinity IIRC. Since what we're doing in C++ is truncate towards zero, I went with that name. This is the historical reason, but you are right that the correct name we should be using is `div`/`mod` for consistency with the standard library. I'll create an issue."}}