pub fn pow(self, exp: u32) -> Self {
        unsafe {
            Self::new_unchecked(
                self.minus && (exp % 2 == 1),
                self.numerator.pow(exp),
                self.denominator.pow(exp),
            )
        }
    }
/// Raises self to the power of exp, using exponentiation by squaring.
///
/// # Examples
///
/// ```
/// use lib_rust::math::rational::Rational;
///
/// let num: Rational = (-2, 3).into();
///
/// assert_eq!(num.pow(2), (4, 9));
/// assert_eq!(num.pow(3), (-8, 27));
/// ```
Raises self to the power of exp, using exponentiation by squaring.
Raises self to the power of exp using exponentiation by squaring .
pub fn pow(self, exp: u32) -> Self {
        unsafe {
            Self::new_unchecked(
                self.minus && (exp % 2 == 1),
                self.numerator.pow(exp),
                self.denominator.pow(exp),
            )
        }
    }
pub fn pow ( self , exp : u32 ) -> Self { unsafe { Self :: new_unchecked ( self . minus && ( exp % 2 == 1 ) , self . numerator . pow ( exp ) , self . denominator . pow ( exp ) , ) } }
Raises self to the power of exp, using exponentiation by squaring.
Raises self to the power of exp using exponentiation by squaring .
self
exp
u32
self
exp
u32
examples
```
use lib_rust::math::rational::Rational.




` ` ` use lib_rust :: math :: rational :: Rational .