mersenneforum.org  

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

Reply
 
Thread Tools
Old 2010-09-29, 01:51   #12
WraithX
 
WraithX's Avatar
 
Mar 2006

2·277 Posts
Default

Well, now that I've run algorithm 7.2.4 on numbers that I'll usually be working on, my implementation seems to be a little slow.

I'm wondering if anyone can point me to another algorithm that is faster than 7.2.4 from C&P? Either in a book or online would be fine. Or if you can post the algorithm here that'd be great too! ;)

Or can I use code from gmp-ecm? If this is okay, I'll try to create an implementation using ecm_mul from gmp-ecm's ecm.c. From there I can compare it speed wise to my code (I'm hoping for an order of magnitude speed up, or more!)

Also, in ecm.c, what is prac? Is it point multiplication code? Does the multiplier k have to be an int? Can it be an mpz_t? I'm doing some very large multiplications and an int definitely isn't large enough.
WraithX is offline   Reply With Quote
Old 2010-09-29, 09:34   #13
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

193616 Posts
Default

There's various work (Bernstein's papers on the hideously badly organised http://cr.yp.to are a place to start) on making elliptic curve operations a bit more efficient. For exponentiation, you can get asymptotically up to a factor two by computing P, 3P, 5P, 7P ... and working through the exponent three or more bits at a time; since you've got subtraction on elliptic curves, writing the number in base -16 or similar can help. (if you ever found you needed to add an even multiple of P, you should have doubled one less time and added an odd multiple then)

prac does its operations using Lucas chains (ways to get to an integer by adding and subtracting previously-observed integers); I _think_ you could just rewrite it to use an mp_z for k and it would still work. It's full of weird mod-2 and mod-3 conditions.
fivemack is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Testing Mersenne Primes with Elliptic Curves a nicol Math 3 2017-11-15 20:23
Elliptic curve arithmetic burrobert GMP-ECM 6 2012-11-08 13:05
Elliptic Curve Arithmetic Raman Math 8 2009-04-13 19:20
New coordinate system for elliptic curves wpolly GMP-ECM 5 2007-07-18 13:18
Elliptic curves in NFS otkachalka Factoring 5 2005-11-20 12:22

All times are UTC. The time now is 15:41.


Fri Jul 7 15:41:02 UTC 2023 up 323 days, 13:09, 0 users, load averages: 1.73, 1.33, 1.17

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

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