Talk:Twin primes

From Rosetta Code
(Redirected from Talk:Twin Prime Conjecture)

Conjecture?

So... what part of the task is about a conjecture? How is finding twin primes up to a finite number proving / disproving or even exercising Polignac's conjecture? Why is Conjecture even in the task title? --Thundergnat (talk) 11:38, 26 July 2020 (UTC)

Deja vu all over again

Did we not cover and become bored with this with Successive prime differences and Sexy Primes plus a further one the name of which I forget which was deleted as we had had enough?--Nigel Galloway (talk) 14:38, 27 July 2020 (UTC)

Brun's Theorem Extention?

Even though the task currently isn't testing the conjecture, it prompted me to read about the it on the Wikipedia.

I see that that Viggo Brun proved that the sum of the reciprocals of the twin primes converges as the twin primes approach infinity.
Testing this lead to the discovery of the division bug in the early Pentium chips by Thomas Nicely (according the Wikipedia page on Brun's Theorem).

It would be simple to add calculating the sum of the reciprocals of the twin primes. The sum is thought to approximate 1.902.... Apparently convergence is *very* slow. I didn't get very close to that with twins up to 10 000 000.
NB: 5 is the only prime in two twin pairs.

--Tigerofdarkness (talk) 14:53, 27 July 2020 (UTC)

Primesieve is broken for Perl and Raku

Primesieve is broken for Perl and Raku

No Rosetta Code Tasks for Perl or Raku can be executed because I can't install the module.

If this is based on the GitHub Primesieve package, I can't build that one either.

I don't know how to report broken Perl Modules to CPAN

Primesieve.h can't be found.


Excerpt from my attempt to install Primesieve using cpanm (same error using cpan)...

Primesieve.xs:9:10: fatal error: 'primesieve.h' file not found

#include <primesieve.h>

         ^~~~~~~~~~~~~~

1 error generated.

make: *** [Primesieve.o] Error 1

-> FAIL Installing Primesieve failed. Retired Build Engineer (talk) 03:47, 11 December 2023 (UTC)

Primesieve is not broken for Raku. I literally, just yesterday, did a fresh install of Linux Mint, built from source and installed Raku and (among many other modules,) Math::Primesieve, so it was working as of yesterday. Did you follow the Math::Primesieve Readme directions and install the primesieve development package first? It contains the various header files needed for the module to function. sudo apt install libprimesieve-dev for Debian based distributions. --Thundergnat (talk) 22:58, 11 December 2023 (UTC)
concurring here: Perl's xs file in the package wants the C compiler's primesieve package installed first, since that is where compiling C for the Perl package gets that missing header file. You might also want to see if you can find a precompiled CPAN package for your OS. --Wherrera (talk) 02:04, 12 December 2023 (UTC)