Skip to main content

AdelicInt

Type Alias AdelicInt 

Source
pub type AdelicInt = Adelic<RnsInt>;
Expand description

Integer instantiation.

Aliased Type§

pub struct AdelicInt { /* private fields */ }

Implementations§

Source§

impl AdelicInt

Source

pub fn from_bigint(n: &BigInt, basis: Basis) -> Self

From an exact BigInt over basis (the infinite place pins the value).

Source

pub fn from_i64(n: i64, basis: Basis) -> Self

From a machine integer.

Source

pub fn try_exact(&self) -> Result<BigInt, RangeError>

The exact integer, or RangeError::ReconstructionFailed if the finite reconstruction disagrees with the infinite place (basis too small).