Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add non-panicking variants of pow for Integers #48291

Closed
milesand opened this issue Feb 17, 2018 · 2 comments
Closed

Add non-panicking variants of pow for Integers #48291

milesand opened this issue Feb 17, 2018 · 2 comments
Labels
C-feature-accepted Category: A feature request that has been accepted pending implementation. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@milesand
Copy link
Contributor

std (and core) does not include non-panicking variants of pow. As we already have such variants of other possibly-overflowing operations in the std, it may be a good idea to add such functionality for symmetry.

@milesand milesand changed the title Add non-panicking variants of pow to Integers Add non-panicking variants of pow for Integers Feb 17, 2018
@sfackler
Copy link
Member

It seems reasonable to take a PR adding checked_pow!

@frewsxcv
Copy link
Member

@frewsxcv frewsxcv added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 18, 2018
@dtolnay dtolnay added the C-feature-accepted Category: A feature request that has been accepted pending implementation. label Feb 19, 2018
kennytm added a commit to kennytm/rust that referenced this issue Feb 27, 2018
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.

Closes rust-lang#48291.
Relevant tracking issue: rust-lang#48320
kennytm added a commit to kennytm/rust that referenced this issue Feb 28, 2018
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.

Closes rust-lang#48291.
Relevant tracking issue: rust-lang#48320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-accepted Category: A feature request that has been accepted pending implementation. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants