mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2007-04-19, 22:35   #1
yqiang
 
Apr 2007

3 Posts
Default using libecm from python

Hello,
I am writing a wrapper for ecm using python and pyrex. I have successfully wrapped the ecm_factor method defined in ecm.h but am a bit confused about the factors it sometimes finds.

If I call ecm_factor(f, n, B1, NULL), the factor it finds is sometimes equal to n. I thought it was supposed to return you a nontrivial factor.

Cheers,
Yi
yqiang is offline   Reply With Quote
Old 2007-04-20, 08:31   #2
akruppa
 
akruppa's Avatar
 
"Nancy"
Aug 2002
Alexandria

2,467 Posts
Default

It depends on the parameters. Bad sigma values can cause the trivial factor N to be found, specifically sigma=0,1,2,3 and 5, afaik. Also, if all prime factors in N are relatively small and your B1 value is high enough, ECM can find all factors simultaneously and hence return N as the factor.

Alex
akruppa is offline   Reply With Quote
Old 2007-04-22, 00:14   #3
yqiang
 
Apr 2007

3 Posts
Default

Aha, I see. Thanks for your clear explanation.

Yi
yqiang is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP vs. Python vs. C (all with GMP) daxmick Programming 2 2014-02-10 01:45
Python... Xyzzy Programming 20 2009-09-08 15:51
Is libecm thread-safe? frmky GMP-ECM 5 2009-02-28 16:08
Can't bind libecm.a with C++ files poire GMP-ECM 2 2006-03-21 14:41
Help w/ python. a216vcti Programming 7 2005-10-30 00:37

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


Tue Dec 6 19:51:07 UTC 2022 up 110 days, 17:19, 1 user, load averages: 0.86, 0.74, 0.73

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.

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