We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It takes some large exponents and the overflow behavior is not documented nor coded:
/// Raises self to the power of `exp`, using exponentiation by squaring. /// /// # Example /// /// ```rust /// use std::num::Int; /// /// assert_eq!(2.pow(4), 16); /// ``` #[unstable(feature = "core", reason = "pending integer conventions")] #[inline] fn pow(self, mut exp: uint) -> Self { let mut base = self; let mut acc: Self = Int::one(); while exp > 0 { if (exp & 1) == 1 { acc = acc * base; } base = base * base; exp /= 2; } acc }
The text was updated successfully, but these errors were encountered:
@GuillaumeGomez will work on this.
Sorry, something went wrong.
Should be closed since it has been fixed.
No branches or pull requests
It takes some large exponents and the overflow behavior is not documented nor coded:
The text was updated successfully, but these errors were encountered: