质数 [英] Prime Numbers

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

问题描述

您好!


我一直在做一些研究,看看C ++是否有某种

函数来处理素数。


例如,我想输入整数并让程序检查

以查看整数是否为素数。


我找不到任何东西都没有成功。我相信我很可能

想出很长的路要走,但我很想知道C ++是否有可用的东西。

谢谢!

Chris

解决方案

" Chris" <德***** @ verizon.net>写了...

我一直在做一些研究,看看C ++是否具有与素数一起工作的某种功能。

例如,我会喜欢输入整数并让程序检查
以查看整数是否为素数。

我找不到任何东西。我相信我可能会想出很长的路要走,但我很想知道C ++是否有可用的东西。




标准库没有这样的功能。如果确实如此,

所有那些数量最多的求职者都没有什么可以做的,他们会这样做吗?


试试< a rel =nofollowhref =http://www.google.comtarget =_ blank> www.google.com 。


Victor


文章< 2e ************************* @ posting.google.com> ,
de*****@verizon.net 说...

您好!

我一直在做一些研究,看看C ++是否具有与素数一起使用的某种功能。


没有那个特别对于素数而言,并不是真的那么多,而不是用于处理大数字的构建块一般来说。

例如,我想输入整数并检查程序
以查看整数是否为素数。


根据您想要处理的数字的大小,从任何地方(例如< 20位数)到大型项目的任何地方都可以获得
(例如将军

Number Field Sieve是由

man设计的最复杂算法之一。)

我找不到成功任何东西。我相信我可能会想出很长的路要走,但我很想知道C ++是否有可用的东西。




MIRACL库有一个很好的保理程序,作为其功能的免费演示

。您可以从以下位置获取库(带演示):
ftp://ftp.computing.dcu.ie/pub/crypto/miracl.zip


-

后来,< br $>
杰瑞。


宇宙是自己想象的虚构。




Jerry Coffin < JC ***** @ taeus.com>在留言中写道

新闻:MP ************************ @ news.clspco.adelph ia.net ...

文章< 2e ************************* @ posting.google.com> ,
de*****@verizon.net 说...

您好!

我一直在做一些研究,看看C ++是否具有与素数一起使用的某种功能。



没有那个'特别是素数,而不是那么多,而不是一般的大数字构建块。

例如,我想要输入整数并进行程序检查
以查看整数是否为素数。



取决于你想要处理的数字有多大,那就是''从任何地方(例如< 20位数)到大型项目(例如General
Number Field Sieve是
man设计的最复杂的算法之一)。

我找不到任何东西都没有成功。我相信我可能会想出很长的路要走,但我很想知道C ++是否有可用的东西。



MIRACL库有一个很好的保理程序作为其功能的免费演示。您可以从以下位置获取库(带演示):
ftp://ftp.computing.dcu.ie/pub/crypto/miracl.zip

- 后来,
Jerry。




不要忘记漂亮的Miller Rabin概率素性测试,这是
恕我直言只是一件艺术品。


干杯

克里斯


Hello!

I have been doing some research to see if C++ has some sort of
function to work with prime numbers.

For example, I would like to input integers and have the program check
to see if the integers are prime numbers.

I have been unsuccessful in finding anything. I am sure I can probably
figure out a long way to do it, but I was curious to see if C++ had
something available.

Thanks!
Chris

解决方案

"Chris" <de*****@verizon.net> wrote...

I have been doing some research to see if C++ has some sort of
function to work with prime numbers.

For example, I would like to input integers and have the program check
to see if the integers are prime numbers.

I have been unsuccessful in finding anything. I am sure I can probably
figure out a long way to do it, but I was curious to see if C++ had
something available.



The Standard library does NOT have such a function. If it did,
all those seekers of the largest number would have nothing to
do, would they?

Try www.google.com.

Victor


In article <2e*************************@posting.google.com> ,
de*****@verizon.net says...

Hello!

I have been doing some research to see if C++ has some sort of
function to work with prime numbers.
None that''s particular to prime numbers, and not really much that''s any
more than a building-block toward working with large numbers in general.
For example, I would like to input integers and have the program check
to see if the integers are prime numbers.
Depending on how big of numbers you want to deal with, that''s anywhere
from trivial (e.g. < 20 digits) to a massive project (e.g. the General
Number Field Sieve is one of the most complex algorithms ever devised by
man).
I have been unsuccessful in finding anything. I am sure I can probably
figure out a long way to do it, but I was curious to see if C++ had
something available.



The MIRACL library has quite a nice factoring program as a free demo of
its capabilities. You can get the library (with the demo) from:
ftp://ftp.computing.dcu.ie/pub/crypto/miracl.zip

--
Later,
Jerry.

The universe is a figment of its own imagination.



"Jerry Coffin" <jc*****@taeus.com> wrote in message
news:MP************************@news.clspco.adelph ia.net...

In article <2e*************************@posting.google.com> ,
de*****@verizon.net says...

Hello!

I have been doing some research to see if C++ has some sort of
function to work with prime numbers.



None that''s particular to prime numbers, and not really much that''s any
more than a building-block toward working with large numbers in general.

For example, I would like to input integers and have the program check
to see if the integers are prime numbers.



Depending on how big of numbers you want to deal with, that''s anywhere
from trivial (e.g. < 20 digits) to a massive project (e.g. the General
Number Field Sieve is one of the most complex algorithms ever devised by
man).

I have been unsuccessful in finding anything. I am sure I can probably
figure out a long way to do it, but I was curious to see if C++ had
something available.



The MIRACL library has quite a nice factoring program as a free demo of
its capabilities. You can get the library (with the demo) from:
ftp://ftp.computing.dcu.ie/pub/crypto/miracl.zip

--
Later,
Jerry.



Not to forget the nice "Miller Rabin probabilistic primality" test, which
IMHO is just a piece of art.

Cheers
Chris


这篇关于质数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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