mersenneforum.org  

Go Back   mersenneforum.org > Search Forums

Showing results 1 to 4 of 4
Search took 0.01 seconds.
Search: Posts Made By: paulunderwood
Forum: Homework Help 2021-10-29, 07:29
Replies: 15
Views: 2,150
Posted By paulunderwood
In a general sort of way -- top-down I suppose --...

In a general sort of way -- top-down I suppose -- I would do the following.


If withinLimits(n,1000000) && isMersennePrime(n) then printLine(n).

isMersennePrime(n) iff n==2 || (isPrime(n) &&...
Forum: Homework Help 2021-10-28, 15:11
Replies: 15
Views: 2,150
Posted By paulunderwood
This sub-forum is for help not complete...

This sub-forum is for help not complete solutions!

Anyway, I'd like to see an LL test. I.e. isPrime(p,sqrt(p))&&passesLL((1<<p)-1). :boxer:
Forum: Homework Help 2021-10-28, 08:05
Replies: 15
Views: 2,150
Posted By paulunderwood
:lol: Hah, good point! If the numbers are less...

:lol: Hah, good point! If the numbers are less than 1,000,000 then the problem is greatly reduced. You need to do trial division for p<=19, (maybe trail division of Mp by 2*k*p+1), and an LL test....
Forum: Homework Help 2021-10-28, 07:34
Replies: 15
Views: 2,150
Posted By paulunderwood
Firstly you need to address multiple-precision...

Firstly you need to address multiple-precision through the use of limbs or an array of integers. Does your program deal with overflow beyond 64 bits? Are you allowed to use a library such as GMP?
...
Showing results 1 to 4 of 4

 
All times are UTC. The time now is 08:07.


Thu Jun 30 08:07:06 UTC 2022 up 77 days, 6:08, 0 users, load averages: 1.53, 1.52, 1.52

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.

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