1 Star 0 Fork 0

QuickSpeed/javascript-algorithms

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.github
.husky
assets
src
algorithms
cryptography
graph
image-processing
linked-list
math
bits
complex-number
euclidean-algorithm
euclidean-distance
factorial
fast-powering
fibonacci
fourier-transform
horner-method
integer-partition
is-power-of-two
least-common-multiple
liu-hui
matrix
pascal-triangle
primality-test
__test__
README.md
trialDivision.js
prime-factors
radian
sieve-of-eratosthenes
square-root
ml
search
sets
sorting
string
tree
uncategorized
data-structures
playground
utils/comparator
.babelrc
.editorconfig
.eslintrc
.gitignore
.npmrc
BACKERS.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.ar-AR.md
README.de-DE.md
README.es-ES.md
README.fr-FR.md
README.id-ID.md
README.it-IT.md
README.ja-JP.md
README.ko-KR.md
README.md
README.pl-PL.md
README.pt-BR.md
README.ru-RU.md
README.tr-TR.md
README.uk-UA.md
README.zh-CN.md
README.zh-TW.md
jest.config.js
package-lock.json
package.json
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Primality Test

A prime number (or a prime) is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways of writing it as a product, 1 × 5 or 5 × 1, involve 5 itself. However, 6 is composite because it is the product of two numbers (2 × 3) that are both smaller than 6.

Prime Numbers

A primality test is an algorithm for determining whether an input number is prime. Among other fields of mathematics, it is used for cryptography. Unlike integer factorization, primality tests do not generally give prime factors, only stating whether the input number is prime or not. Factorization is thought to be a computationally difficult problem, whereas primality testing is comparatively easy (its running time is polynomial in the size of the input).

References

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quick-speed/javascript-algorithms.git
git@gitee.com:quick-speed/javascript-algorithms.git
quick-speed
javascript-algorithms
javascript-algorithms
master

搜索帮助