{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/29127","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/29127/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/29127/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/29127/events","html_url":"https://github.com/JuliaLang/julia/pull/29127","id":358966539,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTcxNzgy","number":29127,"title":"make BigFloat(x::BigFloat) respect global precision (fix #20766)","user":{"login":"rfourquet","id":8462914,"node_id":"MDQ6VXNlcjg0NjI5MTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8462914?v=4","gravatar_id":"","url":"https://api.github.com/users/rfourquet","html_url":"https://github.com/rfourquet","followers_url":"https://api.github.com/users/rfourquet/followers","following_url":"https://api.github.com/users/rfourquet/following{/other_user}","gists_url":"https://api.github.com/users/rfourquet/gists{/gist_id}","starred_url":"https://api.github.com/users/rfourquet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfourquet/subscriptions","organizations_url":"https://api.github.com/users/rfourquet/orgs","repos_url":"https://api.github.com/users/rfourquet/repos","events_url":"https://api.github.com/users/rfourquet/events{/privacy}","received_events_url":"https://api.github.com/users/rfourquet/received_events","type":"User","site_admin":false},"labels":[{"id":611168704,"node_id":"MDU6TGFiZWw2MTExNjg3MDQ=","url":"https://api.github.com/repos/JuliaLang/julia/labels/bignums","name":"bignums","color":"f1791e","default":false},{"id":414648058,"node_id":"MDU6TGFiZWw0MTQ2NDgwNTg=","url":"https://api.github.com/repos/JuliaLang/julia/labels/bugfix","name":"bugfix","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-09-11T09:40:01Z","updated_at":"2018-09-14T02:32:47Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/29127","html_url":"https://github.com/JuliaLang/julia/pull/29127","diff_url":"https://github.com/JuliaLang/julia/pull/29127.diff","patch_url":"https://github.com/JuliaLang/julia/pull/29127.patch"},"body":"This makes e.g. `BigFloat(BigFloat(1), 128)` have precision `128` instead of the default `256`.\r\n\r\nI'm not familiar with these questions, but this fix seems relatively sane to me. Currently there is no easy way (AFAIK) to create a `BigFloat` out of another one with a different precision, so allowing the documented API (`BigFloat(x, prec)`) to do what it says seems to be a must. On the other hand, I don't know whether it's officially documented that `BigFloat(x)` creates a `BigFloat` with `precision(BigFloat)` precision. But it's what we do for all other numbers, so I believe this is the most expected behavior to implement also for `BigFloat`.\r\n\r\nAs raised by @simonbyrne [in the issue](https://github.com/JuliaLang/julia/issues/20766#issuecomment-283773845), there is also the question of `convert(BigFloat, x::BigFloat)`, which I didn't touch for now in this PR. But I think we don't have the expectation that `convert` will create a new object (unlike for constructors), only that it returns an object of the destination type.\r\n\r\nIt seems slighly breaking, but on the other hand, it was labeled as \"bug\" in the issue, so..."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/421211759","html_url":"https://github.com/JuliaLang/julia/pull/29127#issuecomment-421211759","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/29127","id":421211759,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTIxMTc1OQ==","user":{"login":"JeffreySarnoff","id":1682118,"node_id":"MDQ6VXNlcjE2ODIxMTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1682118?v=4","gravatar_id":"","url":"https://api.github.com/users/JeffreySarnoff","html_url":"https://github.com/JeffreySarnoff","followers_url":"https://api.github.com/users/JeffreySarnoff/followers","following_url":"https://api.github.com/users/JeffreySarnoff/following{/other_user}","gists_url":"https://api.github.com/users/JeffreySarnoff/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffreySarnoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffreySarnoff/subscriptions","organizations_url":"https://api.github.com/users/JeffreySarnoff/orgs","repos_url":"https://api.github.com/users/JeffreySarnoff/repos","events_url":"https://api.github.com/users/JeffreySarnoff/events{/privacy}","received_events_url":"https://api.github.com/users/JeffreySarnoff/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T02:32:47Z","updated_at":"2018-09-14T02:32:47Z","author_association":"CONTRIBUTOR","body":"I don't see the gotcha.  \"My slight preference ...\"  I hope you share our desire to get something importantly helpful done and do not want to derail that over a case that itself will become deprecated.  Let's separate concerns.  `BigFloat(x::BigFloat)` is `x` unchanged will save many unintended allocations, and simplify logic given the ease with which one can mix precisions unintentionally.\r\n"}}
{"actor":{"display_login":"JeffreySarnoff"}}