A Prime Number Laboratory for testing and generating prime numbers, powered by Rust and TypeScript!
Due to the project still being under-development in alpha version, use of it is not recommended unless for testing purposes.
Binaries for the project aren't being shipped yet. You must compile the project and run it using Node:
# After cloning the repository/downloading the source-code:
yarn build
Then run the application using:
npx tsx ui/index.ts
This is currently a CLI app only.
See tsx ui/index.ts help for more information.
For the purposes of this section,
tsx ui/index.tsis replaced withprimelabfor simplicity.
- Testing the primality of a number:
primelab test <n>
- Uses Miller-Rabin by default, for alternative algorithms, see
--alg
- Prime number after
n
primelab next-prime <n>
- Prime number before
n
primelab prev-prime <n>
- Prime Factorization
primelab factorize <n>
- See
--displayfor more output formats.
- Sieve Generation
Generates all prime numbers upto n
primelab sieve <n>
- Generation: Prime number generation from
2tonusing Sieve of Eratosthenes - Testing: Implements Miller–Rabin primality test and Fermat primality test algorithms to produce a probabilistic determination of the primality of any given number.
All contributions are welcomed under the assumption that it follows the principle direction of this project.