最快的算法素性测试 [英] Fastest algorithm for primality test

查看:147
本文介绍了最快的算法素性测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要测试素数上是真正的大(在很长很长的范围内)的数字之间的间隔,所以我需要一些快速的算法,用于检查数是素与否。请提出你的想法。

I need to test primality on intervals between numbers which are really big (in the range of long long), so i need some fast algorithm for checking if a number is prime or not. Please suggest your ideas.

推荐答案

一个很好的方法是 Miller-拉宾测试。应当指出然而,这仅仅是一个概率测试

One good method is the Miller-Rabin test. It should be noted however, that this is only a probabilistic test.

这篇关于最快的算法素性测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆