#![doc(html_root_url = "https://docs.rs/mpir/0.4.5")]
pub mod prim;
pub use crate::prim::{*, typ::*, mpz::*, mpf::*, mpq::*, randstate::*};
pub mod ops;
pub use crate::ops::{*};
pub mod convert;
pub use crate::convert::{*};
pub mod util;
pub use crate::util::{*};
pub mod minimum;
#[cfg(test)]
mod tests {
use super::*;
use super::minimum::{
calc_mpz_test,
calc_fact_test,
calc_fib_test,
calc_gcd_test,
calc_lcm_test,
calc_mod_prime_test,
calc_binomial_coefficient_test,
calc_mpf_prec64_test, calc_rand_test, calc_fit_test, calc_logical_test,
calc_mpq_test,
ops, compare_test, significant_digits_test, calc_pi_gauss_legendre_test, calc_pi_euler_test, calc_pi_leibniz_test, calc_pi_machin_test, calc_pi_takano_test, calc_napier_test, ept_test};
use serial_test::serial;
#[test]
fn test_mpz() {
let a = &mpz_s::from(-123); assert_eq!(format!("{:?}", a),
"1, -1 000000000000007b");
}
#[test]
#[serial] fn test_mpf() {
mpf_set_default_prec(64); let f = &mpf_s::from(-0.3); assert_eq!(format!("{:?}", f),
"2, -2, 0 0000000000000000 4ccccccccccccc00");
}
#[test]
fn test_mpq() {
let q = &mpq_s::from((2, 8 as ui_t)); assert_eq!(format!("{:?}", q),
"(1, 1 0000000000000002) / (1, 1 0000000000000008)");
}
#[test]
fn test_calc_mpz() {
assert_eq!(calc_mpz_test(), ());
}
#[test]
fn test_calc_fact() {
assert_eq!(calc_fact_test(), ());
}
#[test]
fn test_calc_fib() {
assert_eq!(calc_fib_test(), ());
}
#[test]
fn test_calc_gcd() {
assert_eq!(calc_gcd_test(), ());
}
#[test]
fn test_calc_lcm() {
assert_eq!(calc_lcm_test(), ());
}
#[test]
fn test_calc_mod_prime() {
assert_eq!(calc_mod_prime_test(), ());
}
#[test]
fn test_calc_binomial_coefficient() {
assert_eq!(calc_binomial_coefficient_test(), ());
}
#[test]
#[serial] fn test_calc_mpf_prec64() {
assert_eq!(calc_mpf_prec64_test(), ());
}
#[test]
#[serial] fn test_calc_rand() {
assert_eq!(calc_rand_test(), ());
}
#[test]
#[serial] fn test_calc_fit() {
assert_eq!(calc_fit_test(), ());
}
#[test]
fn test_calc_logical() {
assert_eq!(calc_logical_test(), ());
}
#[test]
fn test_calc_mpq() {
assert_eq!(calc_mpq_test(), ());
}
#[test]
fn test_ops_mpz() {
assert_eq!(ops::mpz::ops_test(), ());
}
#[test]
#[serial] fn test_ops_mpf() {
assert_eq!(ops::mpf::ops_test(), ());
}
#[test]
fn test_ops_mpq() {
assert_eq!(ops::mpq::ops_test(), ());
}
#[test]
#[serial] fn test_ops() {
assert_eq!(ops::ops_test(), ());
}
#[test]
#[serial] fn test_compare() {
assert_eq!(compare_test(), ());
}
#[test]
#[serial] fn test_significant_digits() {
assert_eq!(significant_digits_test(), ());
}
#[test]
#[serial] fn test_calc_pi_gauss_legendre() {
assert_eq!(calc_pi_gauss_legendre_test(), ());
}
#[test]
#[serial] fn test_calc_pi_euler() {
assert_eq!(calc_pi_euler_test(), ());
}
#[test]
#[serial] fn test_calc_pi_leibniz() {
assert_eq!(calc_pi_leibniz_test(), ());
}
#[test]
#[serial] fn test_calc_pi_machin() {
assert_eq!(calc_pi_machin_test(), ());
}
#[test]
#[serial] fn test_calc_pi_takano() {
assert_eq!(calc_pi_takano_test(), ());
}
#[test]
#[serial] fn test_calc_napier() {
assert_eq!(calc_napier_test(), ());
}
#[test]
fn test_ept() {
assert_eq!(ept_test(), ());
}
}