machine_factor/lib.rs
1#![no_std]
2#![allow(improper_ctypes_definitions)]
3
4//! Machine-factor is a relatively fast library for factoring integers up to 2^128. Most integers can be factored in less than
5//! 60 seconds (on i5-5300U). Machine-factor can be used in const contexts, however this is will often exceed the allowed time.
6
7mod mfactor;
8mod primes;
9mod wfactor;
10
11pub use mfactor::{factorize, get_factor, Factorization};
12
13pub use wfactor::{factorize_128, get_factor_128, Factorization128};
14#[cfg(feature = "internal")]
15pub use {
16 mfactor::{drbg, partial_gcd},
17 primes::PRIMES_101,
18 wfactor::partial_gcd_128,
19};
20/*
21#[panic_handler]
22fn panic(_info: &core::panic::PanicInfo) -> ! {
23 loop {}
24}
25*/