mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2002-09-25, 16:34   #1
Angular
 
Aug 2002

2×33 Posts
Default PRP v2.3, incorrect results for k > 2^32

Hello,

When using PRP v2.3, which uses Prime95 FFTs I believe, for prp testing of number of the form k.2^n-1, I noticed that when k ~> 2^32 the k value is wrapped around and incorrect.

For example k=4300006275 => 5038979

Is this just a simple fix? Is testing k ~> 2^32 slower, and if so by what factor?

Thanks,

Michael
Angular is offline   Reply With Quote
Old 2002-09-25, 19:27   #2
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

173128 Posts
Default

Yes, PRP cannot handle k > 2^32. I suggest trying WinPFGW.

The problem is the assembly code that does the mod k*2^n-1 can only handle k values that fit in one register.
Prime95 is offline   Reply With Quote
Old 2002-09-25, 21:01   #3
Angular
 
Aug 2002

2×33 Posts
Default

Is it possible to handle larger k's in such a way as that prp tests take less than 2.3x with x the amount of time required for k < 2^32? I hope there is a better algorithm than in use by PFGW now.

PFGW presentally does handles these large k's but I find it supprising that it takes so much longer with larger k's. PFGW for my testing around 3000 digits takes 2.3-2.4x for a test of k > 2^32.

Perhaps prp should test the k value before testing the number for probable primality? Since presentally it gives incorrect results if k is too large.
Angular is offline   Reply With Quote
Old 2002-09-26, 00:10   #4
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×7×563 Posts
Default

Sorry, I just checked the code. I use fscanf to get the k value from the input file. The C runtime library routine does not raise any errors and I'd rather not reimplement fscanf just to catch this case.

I really wish all PRP functionality were incorporated in PFGW so that I could cease supporting PRP.
Prime95 is offline   Reply With Quote
Old 2002-09-26, 00:26   #5
Angular
 
Aug 2002

2·33 Posts
Default

I agree, Rewritting fscanf would not be worth the time.

Quote:
Originally Posted by Prime95
I really wish all PRP functionality were incorporated in PFGW so that I could cease supporting PRP.
What functionality does PRP have that PFGW does not?

Did you have any comment on PFGW's algorithm for k >2^32 taking 2.3x+ the amount of time for as the tests for k < 2^32? Is there a more efficient method of doing this? or what methods are you familure with to do this?
Angular is offline   Reply With Quote
Old 2002-09-26, 02:11   #6
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

2×7×563 Posts
Default

I'm not positive, but I think PFGW does not use the assembly code I wrote to do the mod k*2^n-1. The C code to do this would be much slower, which is why people still use PRP. On the other hand, the PFGW C code can handle larger k values.
Prime95 is offline   Reply With Quote
Old 2002-09-26, 02:28   #7
Angular
 
Aug 2002

2·33 Posts
Default

I am rather sure that PFGW uses your asm code, sinceI have tested many numbers with PRP + PFGW and the speeds are usually very close. difference < 0.1 % unless you enter a region were different FFT crossovers are used in the different programs. Perhaps just different versions of your library.

At least that is my experience with prping numbers from 1k digits to 40k digits. So its good news you may be able to retire PRP, unless you know of a counter example for timing.

Oh, I found an old email from Chris Nash about the k > 2^32 slow down at: http://groups.yahoo.com/group/openpfgw/message/949

He apparentally had a version that did k > 2^32 but it had caused a FPU stall.

Thanks.
Angular is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nvidia 364.xx drivers returning incorrect results UBR47K GPU Computing 2 2016-06-11 22:38
Incorrect result bayanne Information & Answers 2 2013-12-01 09:18
CPU Speed Incorrect AZMango Software 8 2010-03-20 21:55
Incorrect totals in stats Flatlander No Prime Left Behind 1 2008-12-01 23:16
Incorrect CPU profile in 22.9 and 22.8 sdbardwick Software 5 2002-09-22 19:49

All times are UTC. The time now is 20:19.


Tue May 17 20:19:49 UTC 2022 up 33 days, 18:21, 0 users, load averages: 1.88, 1.50, 1.28

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.

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