首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 寻找素数的java命令行工具实现了5种不同的素性检验

寻找素数的java命令行工具实现了5种不同的素性检验

资 源 简 介

Test for Prime Numbers Summary This project encompasses 5 different tests for primality. The methods implemented are Miller-Rabin, Miller-Rabin Deterministic, Solovay-Strassen, Fermat’s Primality Test and a Brute Force method. In addition to the 5 primality tests, the program is also capable of finding the closest integer to a given upper bound. The largest number it is capable of handling is a 2147483647 bit integer. Primality Tests Miller-Rabin This primality test is a probabilistic primality test that has a degree of certainty of 4^(-k) where k is the number of unique witnesses less than n-1. This primality test is very fast and very accurate. This is the default primality test for the project. Miller-Rabin Deterministic A variation on the Miller-Rabin test, it uses an unproven conjecture for finding deterministically if the number in question is prime.
VIP VIP
0.174178s