Crates.io | large-primes |
lib.rs | large-primes |
version | 0.5.1 |
source | src |
created_at | 2024-01-27 15:26:44.57919 |
updated_at | 2024-01-27 17:10:18.112453 |
description | Package for Large Prime Number Analysis |
homepage | |
repository | https://github.com/shashankp28/primes/ |
max_upload_size | |
id | 1116783 |
size | 48,961 |
Prime Analysis Tool is a versatile command-line utility written in Rust, designed to perform various mathematical operations and analyses on prime numbers and large integers. This tool offers a range of functionalities, including standard prime checks, advanced primality tests, number generation, exponentiation, and the Lucas-Lehmer test for Mersenne primes.
To install Prime Analysis Tool, ensure you have Rust and Cargo installed on your system. Follow these steps:
git clone https://github.com/shashankp28/primes.git
cd primes
cargo build --release
To use Prime Analysis Tool, run the compiled binary with the required arguments. The general syntax is:
<exe> [OPTIONS] --action <ACTION> [--target <TARGET>] [--power <POWER>] [--maximum <MAXIMUM>] [--mersenne_exp <MERSENNE_EXP>]
-a
, --action <ACTION>
: Specify the action to perform. Actions include standard
, fermat
, miller-rabin
, generate
, power
, and lucas-lehmer
.-t
, --target <TARGET>
: The target number for prime checks or exponentiation.-p
, --power <POWER>
: The power to raise the target number to (used with power
action).-m
, --maximum <MAXIMUM>
: Specify the upper limit for prime number generation (used with generate
action).--mersenne-exp <MERSENNE_EXP>
: The exponent for the Mersenne prime in the Lucas-Lehmer test.Get Help:
./target/release/primes --help
Check if a number is a prime:
./target/release/primes --action standard --target 17
Perform the Miller-Rabin primality test:
./target/release/primes --action miller-rabin --target 19
Generate primes up to 100:
./target/release/primes --action generate --maximum 100
Raise a number to a power:
./target/release/primes --action power --target 2 --power 10
Perform the Lucas-Lehmer test:
./target/release/primes --action lucas-lehmer --mersenne-exp 13
Contributions to the Prime Analysis Tool are welcome! Feel free to submit issues or pull requests on GitHub.
Prime Analysis Tool is distributed under the MIT License.
Disclaimer: Prime Analysis Tool is a project under active development. Features and functionalities are subject to change.