{"action":"closed","issue":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/5616","repository_url":"https://api.github.com/repos/jekyll/jekyll","labels_url":"https://api.github.com/repos/jekyll/jekyll/issues/5616/labels{/name}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/5616/comments","events_url":"https://api.github.com/repos/jekyll/jekyll/issues/5616/events","html_url":"https://github.com/jekyll/jekyll/issues/5616","id":192842468,"number":5616,"title":"Can't calculate a percentage because divided_by rounds","user":{"login":"timwis","id":761444,"avatar_url":"https://avatars.githubusercontent.com/u/761444?v=3","gravatar_id":"","url":"https://api.github.com/users/timwis","html_url":"https://github.com/timwis","followers_url":"https://api.github.com/users/timwis/followers","following_url":"https://api.github.com/users/timwis/following{/other_user}","gists_url":"https://api.github.com/users/timwis/gists{/gist_id}","starred_url":"https://api.github.com/users/timwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timwis/subscriptions","organizations_url":"https://api.github.com/users/timwis/orgs","repos_url":"https://api.github.com/users/timwis/repos","events_url":"https://api.github.com/users/timwis/events{/privacy}","received_events_url":"https://api.github.com/users/timwis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-01T13:09:55Z","updated_at":"2016-12-01T13:19:39Z","closed_at":"2016-12-01T13:19:39Z","body":"Hey folks, I'm trying to calculate a percentage using liquid and, to my surprise, it seems to be a bit impossible :-/\r\n\r\n```liquid\r\n{{ 3470 | divided_by: 8441 | times: 100 | round }}\r\n```\r\nexpected: `41`\r\nactual: `0`\r\n\r\nIt seems to be caused by the fact that liquid's `divided_by` filter [rounds the result \"for you\"](https://help.shopify.com/themes/liquid/filters/math-filters#divided_by). I was surprised that this behaviour is default, especially given there's a `round` filter, but more surprised that I can't seem to find a way around it :O\r\n\r\nIs there no way to calculate a percentage?"}}
{"actor":{"display_login":"timwis"}}