{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/14178","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/14178/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/14178/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/14178/events","html_url":"https://github.com/dotnet/corefx/issues/14178","id":193294545,"number":14178,"title":"Get a rough idea of the size of a BigInteger","user":{"login":"verybadcat","id":321979,"avatar_url":"https://avatars.githubusercontent.com/u/321979?v=3","gravatar_id":"","url":"https://api.github.com/users/verybadcat","html_url":"https://github.com/verybadcat","followers_url":"https://api.github.com/users/verybadcat/followers","following_url":"https://api.github.com/users/verybadcat/following{/other_user}","gists_url":"https://api.github.com/users/verybadcat/gists{/gist_id}","starred_url":"https://api.github.com/users/verybadcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybadcat/subscriptions","organizations_url":"https://api.github.com/users/verybadcat/orgs","repos_url":"https://api.github.com/users/verybadcat/repos","events_url":"https://api.github.com/users/verybadcat/events{/privacy}","received_events_url":"https://api.github.com/users/verybadcat/received_events","type":"User","site_admin":false},"labels":[{"id":153714228,"url":"https://api.github.com/repos/dotnet/corefx/labels/api-needs-work","name":"api-needs-work","color":"207de5","default":false},{"id":147576314,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Numerics","name":"area-System.Numerics","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-03T15:42:00Z","updated_at":"2016-12-04T08:53:53Z","closed_at":null,"body":"It would be terrific if there were a fast API for getting a rough idea of the absolute value of a BigInteger, say to within a factor of a billion or so. Something like the size of the private _bits array would be fine.\r\n\r\nThis is useful for calculator apps and the like, as you want to be able to tell if an operation will definitely overflow before attempting it. "},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/264692036","html_url":"https://github.com/dotnet/corefx/issues/14178#issuecomment-264692036","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/14178","id":264692036,"user":{"login":"verybadcat","id":321979,"avatar_url":"https://avatars.githubusercontent.com/u/321979?v=3","gravatar_id":"","url":"https://api.github.com/users/verybadcat","html_url":"https://github.com/verybadcat","followers_url":"https://api.github.com/users/verybadcat/followers","following_url":"https://api.github.com/users/verybadcat/following{/other_user}","gists_url":"https://api.github.com/users/verybadcat/gists{/gist_id}","starred_url":"https://api.github.com/users/verybadcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybadcat/subscriptions","organizations_url":"https://api.github.com/users/verybadcat/orgs","repos_url":"https://api.github.com/users/verybadcat/repos","events_url":"https://api.github.com/users/verybadcat/events{/privacy}","received_events_url":"https://api.github.com/users/verybadcat/received_events","type":"User","site_admin":false},"created_at":"2016-12-04T08:53:53Z","updated_at":"2016-12-04T08:53:53Z","body":"Consider the Pow function. You are going to get into trouble if the exponent times the log of the base is too big. There is not actually a way to test that with hard-coded values, unless you are willing to keep a lot of them. And for large bases, actually taking the log is both slow and unnecessary. A rough idea of the size is plenty of info in such cases. If the size is small, you can go ahead and take the log, and it will be quick.\r\n\r\nFor product, you will get into trouble if the sum of the numbers of digits is too big. That's actually less troubling than the Pow case; you may just be willing to take the product, then drop it if it's too big.\r\n\r\nFor functions like Comb (or Choose, or whatever you want to call it), it is yet another computation . . ."}}
{"actor":{"display_login":"verybadcat"}}