-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Missing pow implementation for integers #11499
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
Comments
Upon investigation, this is the relevant method:
|
Yeah, @bjz is doing some work on cleaning the num package. As for this bug, we can either wait for that work to be complete or implement pow as part of the Integer trait. There are some methods in the I'm already working on an implementation of pow for the |
So, |
The patch adds a `pow` function for types implementing `One`, `Mul` and `Clone` trait. The patch also renames f32 and f64 pow into powf in order to still have a way to easily have float powers. It uses llvms intrinsics. The pow implementation for all num types uses the exponentiation by square. Fixes bug rust-lang#11499
The text was updated successfully, but these errors were encountered: