mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > jzakiya

Reply
 
Thread Tools
Old 2022-06-29, 20:07   #67
jzakiya
 
Jul 2014

23×7 Posts
Default

I updated the paper and code yesterday (June 28, 2022 -- Tau Day).

I found 2 places in the code that allowed arithmetic overflow, that I fixed in all versions.
I also fixed some typos, and clarified|simplified some language, and explained the code changes.

The updated paper is available at the previously provided links, and I've attached a copy here.
Attached Files
File Type: pdf SSoZ Explained.pdf (447.0 KB, 34 views)
jzakiya is offline   Reply With Quote
Old 2022-07-03, 04:33   #68
Rustum
 
Jul 2022

5 Posts
Default

Quote:
Originally Posted by Till View Post
I have been provided with a Java implementation of this sieve a couple of months ago. You can find it here:
https://github.com/TilmanNeumann/jav...act/SSOZJ.java

My impression was that it is very fast.
Yes, it is fast, and most of the time it works correctly. However, the twin primes it gives are sometimes incorrect, suggesting that a bug is present in the Java source code. Here is an example.

Code:
T:\PRIMES>java TNeumann.SSOZJ
Please enter an range of integer (comma or space separated):
16850900 16851030
 Max threads = 12
Using Prime Generator parameters for given Pn 5
segment size = 5 resgroups; seg array is [1 x 1] 64-bits
twinprime candidates = 15 ; resgroups = 5
each 3 threads has nextp[2 x 561] array
setup time = 0.026 secs
perform twinprimes ssoz sieve with s=6
3 of 3 threads done
sieve time = 0.008 secs
last segment = 5 resgroups; segment slices = 1
total twins = 1; last twin = 16850988+/-1
total time = 0.034 secs
Factors of 16850989: 4099 4111
Rustum is offline   Reply With Quote
Old 2022-07-03, 20:18   #69
Till
 
Till's Avatar
 
"Tilman Neumann"
Jan 2016
Germany

11×47 Posts
Default

Quote:
Originally Posted by Rustum View Post
Yes, it is fast, and most of the time it works correctly. However, the twin primes it gives are sometimes incorrect, suggesting that a bug is present in the Java source code. Here is an example.

Code:
T:\PRIMES>java TNeumann.SSOZJ
Please enter an range of integer (comma or space separated):
16850900 16851030
 Max threads = 12
Using Prime Generator parameters for given Pn 5
segment size = 5 resgroups; seg array is [1 x 1] 64-bits
twinprime candidates = 15 ; resgroups = 5
each 3 threads has nextp[2 x 561] array
setup time = 0.026 secs
perform twinprimes ssoz sieve with s=6
3 of 3 threads done
sieve time = 0.008 secs
last segment = 5 resgroups; segment slices = 1
total twins = 1; last twin = 16850988+/-1
total time = 0.034 secs
Factors of 16850989: 4099 4111

Well, admittedly I didnt't test the program extensively. For a start I will comment the error in the javadoc. Maybe Pascal Pechard is willing to investigate it.
Till is offline   Reply With Quote
Old 2022-07-04, 01:43   #70
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

5·1,997 Posts
Default

Quote:
Originally Posted by Till View Post
Well, admittedly I didnt't test the program extensively. For a start I will comment the error in the javadoc. Maybe Pascal Pechard is willing to investigate it.
"У семи нянек дитя без глаза", the Russian proverb says. "There are too many cooks in the kitchen."

If seven cooks only care about their part of the recipe and then put it all together in a soup, trust me - you won't want to eat it.
Batalov is offline   Reply With Quote
Old 2022-07-04, 02:35   #71
jzakiya
 
Jul 2014

708 Posts
Default

Here are the correct results using Rust (other versions give same result).
I haven't looked at that code in awhile, but I informed its author.

Code:
echo 16850900 16851030 | ./twinprimes_ssoz-rust 
threads = 16 
using Prime Generator parameters for P5 
segment size = 5 resgroups; seg array is [1 x 1] 64-bits 
twinprime candidates = 15; resgroups = 5 
each of 3 threads has nextp[2 x 108] array 
setup time = 0.000798284 secs 
perform twinprimes ssoz sieve 
3 of 3 twinpairs done 
sieve time = 0.00003492 secs 
total time = 0.000838024 secs 
last segment = 5 resgroups; segment slices = 1 
total twins = 0; last twin = 0+/-1
jzakiya is offline   Reply With Quote
Old 2022-07-04, 06:09   #72
Pascal66
 
Jul 2022

2 Posts
Default

@rustulm, I'll give the correct version to @till soon.

As @jzakiya say, there's some good improvment on it, so the improved version will be online soon too.

Sorry to haven't updated the code for some years :)
Pascal66 is offline   Reply With Quote
Old 2022-07-04, 08:00   #73
Pascal66
 
Jul 2022

2 Posts
Default Corrected version

A corrected version (2020->2022) is available https://gist.github.com/Pascal66/d92...fc9a787636e17c
This was pushed on @Till java math library
Pascal66 is offline   Reply With Quote
Old 2022-07-04, 12:58   #74
Till
 
Till's Avatar
 
"Tilman Neumann"
Jan 2016
Germany

11·47 Posts
Default

Quote:
Originally Posted by Pascal66 View Post
A corrected version (2020->2022) is available https://gist.github.com/Pascal66/d92...fc9a787636e17c
This was pushed on @Till java math library

Thanks Pascal, your PR is merged now and I verified that it fixes the error found by rustum.
Till is offline   Reply With Quote
Old 2022-07-04, 13:15   #75
Till
 
Till's Avatar
 
"Tilman Neumann"
Jan 2016
Germany

11·47 Posts
Default

Quote:
Originally Posted by Batalov View Post
"У семи нянек дитя без глаза", the Russian proverb says. "There are too many cooks in the kitchen."

If seven cooks only care about their part of the recipe and then put it all together in a soup, trust me - you won't want to eat it.

Good saying, but not really appropriate here. This twin prime sieve only has two cooks and a waiter (me); and all the rest of the library has been (implemented or ported or (extensively reviewed and worked over)) and tested by myself.

Last fiddled with by Till on 2022-07-04 at 13:25 Reason: two cooks and a waiter instead of three cooks ;-)
Till is offline   Reply With Quote
Old 2022-07-04, 21:27   #76
Rustum
 
Jul 2022

5 Posts
Default

Thanks to Pascal66 and Till for the prompt bug fix and file updates.
Rustum is offline   Reply With Quote
Old 2022-07-09, 15:41   #77
Rustum
 
Jul 2022

516 Posts
Default

Quote:
Originally Posted by jzakiya View Post
I wrote a paper explaining a general theory of using what I call Prime Generators, and applied the theory to establish that Polignac's Conjecture is true, there are infinitely many pairs of primes that differ by any gap n.

This is an application of Prime Generator Theory (PGT) I began developing in 2008, and applied to creating the fastest/most efficient prime sieves, as independently verified in the link below, and a Rubygem.

https://github.com/hathix/prime-algorithms

...
It turns out that the Python codes of "hathix" have bugs (Issue 1 at the Github site). They report composite numbers as primes and leave out known primes (such as even a lowly 7) from the list of primes.

Until these bugs are fixed and the output lists of primes have been verified, any conclusions (regarding the correctness of the so called Prime Generators or the speed of the algorithm) are premature.
Rustum is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Twin Prime Constellations robert44444uk Prime Gap Searches 45 2022-02-24 18:28
How do you efficiently sieve for prime 3/4-tuples? Puzzle-Peter Software 156 2019-06-03 20:19
find very easy twin prime in the infamy twin primes hal1se Miscellaneous Math 13 2018-11-05 16:34
Highest Prime is also a twin prime... NOT hydeer Lone Mersenne Hunters 9 2018-04-03 22:54
Twin Prime Days, Prime Day Clusters cuBerBruce Puzzles 3 2014-12-01 18:15

All times are UTC. The time now is 16:47.


Sat Nov 26 16:47:48 UTC 2022 up 100 days, 14:16, 1 user, load averages: 1.39, 1.17, 1.11

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔