质数

编程入门 行业动态 更新时间:2024-10-24 16:25:34
本文介绍了质数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好! 我一直在做一些研究,看看C ++是否有某种 函数来处理素数。 例如,我想输入整数并让程序检查 以查看整数是否为素数。 我找不到任何东西都没有成功。我相信我很可能 想出很长的路要走,但我很想知道C ++是否有可用的东西。 谢谢! Chris

解决方案

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

我一直在做一些研究,看看C ++是否具有与素数一起工作的某种功能。 例如,我会喜欢输入整数并让程序检查以查看整数是否为素数。 我找不到任何东西。我相信我可能会想出很长的路要走,但我很想知道C ++是否有可用的东西。

标准库没有这样的功能。如果确实如此, 所有那些数量最多的求职者都没有什么可以做的,他们会这样做吗? 试试 www.google 。 Victor

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

您好! 我一直在做一些研究,看看C ++是否具有与素数一起使用的某种功能。 没有那个特别对于素数而言,并不是真的那么多,而不是用于处理大数字的构建块一般来说。 例如,我想输入整数并检查程序以查看整数是否为素数。 根据您想要处理的数字的大小,从任何地方(例如< 20位数)到大型项目的任何地方都可以获得 (例如将军 Number Field Sieve是由 man设计的最复杂算法之一。) 我找不到成功任何东西。我相信我可能会想出很长的路要走,但我很想知道C ++是否有可用的东西。

MIRACL库有一个很好的保理程序,作为其功能的免费演示 。您可以从以下位置获取库(带演示): ftp://ftpputing.dcu.ie/pub/crypto/miracl.zip - 后来, 杰瑞。 宇宙是自己想象的虚构。

Jerry Coffin < JC ***** @ taeus>在留言中写道 新闻:MP ************************ @ news.clspco.adelph ia ...

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

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

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

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

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

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

MIRACL库有一个很好的保理程序作为其功能的免费演示。您可以从以下位置获取库(带演示): ftp://ftpputing.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> 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. Victor

In article <2e*************************@posting.google> , de*****@verizon 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://ftpputing.dcu.ie/pub/crypto/miracl.zip -- Later, Jerry. The universe is a figment of its own imagination.

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

In article <2e*************************@posting.google> , de*****@verizon 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://ftpputing.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

更多推荐

质数

本文发布于:2023-11-29 22:53:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1647864.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:质数

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!