{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4478","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4478/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4478/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4478/events","html_url":"https://github.com/fish-shell/fish-shell/issues/4478","id":265425548,"number":4478,"title":"builtin math shouldn't require a `--scale` argument for floating point math.","user":{"login":"floam","id":291142,"avatar_url":"https://avatars1.githubusercontent.com/u/291142?v=4","gravatar_id":"","url":"https://api.github.com/users/floam","html_url":"https://github.com/floam","followers_url":"https://api.github.com/users/floam/followers","following_url":"https://api.github.com/users/floam/following{/other_user}","gists_url":"https://api.github.com/users/floam/gists{/gist_id}","starred_url":"https://api.github.com/users/floam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floam/subscriptions","organizations_url":"https://api.github.com/users/floam/orgs","repos_url":"https://api.github.com/users/floam/repos","events_url":"https://api.github.com/users/floam/events{/privacy}","received_events_url":"https://api.github.com/users/floam/received_events","type":"User","site_admin":false},"labels":[{"id":4724776,"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/bug","name":"bug","color":"fc2929","default":true},{"id":720071379,"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/math","name":"math","color":"75ddcf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/18","html_url":"https://github.com/fish-shell/fish-shell/milestone/18","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/18/labels","id":2597361,"number":18,"title":"fish-3.0","description":"The proposed 3.0 major release of fish. May contain breaking changes.","creator":{"login":"faho","id":5185367,"avatar_url":"https://avatars3.githubusercontent.com/u/5185367?v=4","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":185,"state":"open","created_at":"2017-06-22T00:28:56Z","updated_at":"2018-03-09T15:17:32Z","due_on":"2018-04-01T07:00:00Z","closed_at":null},"comments":7,"created_at":"2017-10-13T21:36:05Z","updated_at":"2018-03-09T16:29:10Z","closed_at":null,"author_association":"MEMBER","body":"The old `math` function wouldn't do this (we cast to an integer in builtin_math.cpp):\r\n\r\n```\r\n~ $ math '3.5*3'\r\n10\r\n```\r\n\r\n`bc` would print `10.5`.\r\n\r\nThe only way to coax out the right answer is to use `--scale`, which I consider something kind of unpleasant from our old math function that was an artifact of `bc`, not something we should want to encourage let alone require. Ideally we could have a nice default where `5.0` printed `5` and `5.0010` printed `5.001` (roughly %g without the exponent stuff). "},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/371863509","html_url":"https://github.com/fish-shell/fish-shell/issues/4478#issuecomment-371863509","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4478","id":371863509,"user":{"login":"faho","id":5185367,"avatar_url":"https://avatars3.githubusercontent.com/u/5185367?v=4","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T16:29:10Z","updated_at":"2018-03-09T16:29:10Z","author_association":"MEMBER","body":"Okay, printf explicitly tries the user's locale and then C."}}
{"actor":{"display_login":"faho"}}