{"action":"closed","issue":{"url":"https://api.github.com/repos/CGAL/cgal/issues/548","labels_url":"https://api.github.com/repos/CGAL/cgal/issues/548/labels{/name}","comments_url":"https://api.github.com/repos/CGAL/cgal/issues/548/comments","events_url":"https://api.github.com/repos/CGAL/cgal/issues/548/events","html_url":"https://github.com/CGAL/cgal/issues/548","id":121868122,"number":548,"title":"Rounding exact scalars to integers","user":{"login":"alecjacobson","id":2241689,"avatar_url":"https://avatars.githubusercontent.com/u/2241689?v=3","gravatar_id":"","url":"https://api.github.com/users/alecjacobson","html_url":"https://github.com/alecjacobson","followers_url":"https://api.github.com/users/alecjacobson/followers","following_url":"https://api.github.com/users/alecjacobson/following{/other_user}","gists_url":"https://api.github.com/users/alecjacobson/gists{/gist_id}","starred_url":"https://api.github.com/users/alecjacobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecjacobson/subscriptions","organizations_url":"https://api.github.com/users/alecjacobson/orgs","repos_url":"https://api.github.com/users/alecjacobson/repos","events_url":"https://api.github.com/users/alecjacobson/events{/privacy}","received_events_url":"https://api.github.com/users/alecjacobson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-12T17:36:49Z","updated_at":"2015-12-17T17:30:50Z","closed_at":"2015-12-17T17:30:50Z","body":"I'd like to round an arbitrary precision number (e.g. `CGAL::Epeck::FT e`) to the nearest integer:\r\n\r\nso if e is an arbitrary precision input number and i <= e < i where i is an integer then I assume the following (usual) rounding rule:\r\n\r\n    if e < i+0.5  --> i\r\n    otherwise     --> i+1\r\n\r\nCan I trust that `std::round(CGAL::to_double(e))` will give the correct rounding result? I guess I'm asking if it's possible that `e<0.5` but `CGAL::to_double(e) >= 0.5` (or `e>=0.5` but `CGAL::to_double(e)<0.5`). I suppose there could also be issues with very large doubles?"}}