twibint 0.3.2

Crate for arithmetic on arbitrarily large integers. Provides Python bindings as well.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::traits::{Digit, Pow};
use crate::BigInt;

impl<T: Digit> Pow for BigInt<T> {
    fn pow(&self, exp: usize) -> BigInt<T> {
        Self {
            uint: self.uint.pow(exp),
            sign: self.sign || exp & 1 == 0,
        }
    }
}