Uh oh!
There was an error while loading. Please reload this page.
Add non-panicking variants of pow for integer types - #48321
Conversation
rust-highfive
commented
Feb 18, 2018
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
767ada2 to
a5bf3c9CompareCurrently, calling pow may panic in case of overflow, and the function does not have non-panicking counterparts. Thus, it would be beneficial to add those in.
milesand
commented
Feb 19, 2018
Squashed and rebased. |
alexcrichton
commented
Feb 24, 2018
Thanks! Would it be possible perhaps to implement these methods in terms of one another? For example |
milesand
commented
Feb 25, 2018
It would be possible, though that might incur some performace penalty(haven't benchmarked, so not sure). |
alexcrichton
commented
Feb 26, 2018
Ah ok yeah that makes sense to me, the loop does indeed seem like it throws a wrench into performance here. In that case... @bors: r+ |
bors
commented
Feb 26, 2018
📌 Commit b31ff95 has been approved by |
Add non-panicking variants of pow for integer types Currently, calling pow may panic in case of overflow, and the function does not have non-panicking counterparts. Thus, it would be beneficial to add those in. Closesrust-lang#48291. Relevant tracking issue: rust-lang#48320
alexcrichton
commented
Feb 27, 2018
@bors: rollup |
Add non-panicking variants of pow for integer types Currently, calling pow may panic in case of overflow, and the function does not have non-panicking counterparts. Thus, it would be beneficial to add those in. Closesrust-lang#48291. Relevant tracking issue: rust-lang#48320
Currently, calling pow may panic in case of overflow, and the function does not have non-panicking counterparts. Thus, it would be beneficial to add those in.
Closes#48291.
Relevant tracking issue: #48320