mersenneforum.org Auto-XYYXF tool
 User Name Remember Me? Password
 Register FAQ Search Today's Posts Mark Forums Read

2016-07-04, 08:40   #1
fivemack
(loop (#_fork))

Feb 2006
Cambridge, England

2·7·461 Posts
Auto-XYYXF tool

Here is the tool I was talking about for producing SNFS polynomials for XYYXF numbers. Feel free to complain about my maths and my Python.

I'm never quite sure how to automate trial-sieving - you probably do want to launch multiple jobs in parallel, I think that having this tool analyse the stderr from the trial-sieving job if it exists with an obvious name is probably going to be the right answer.
Attached Files
 automate-xyyxf.py.txt (1.8 KB, 232 views)

 2016-07-04, 09:56 #2 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40
 2016-07-04, 15:54 #3 fivemack (loop (#_fork))     Feb 2006 Cambridge, England 193616 Posts Some results on S{250..255} These are A-side 14e, A-side 15e, R-side 14e, R-side 15e timings for a number of candidate numbers, with 31-bit large primes. These are pretty clearly 15e numbers, though may need a little more ECM before queue submission. Code: C240_134_77.initial_snfs total yield: 5565, q=130010009 (0.75608 sec/rel) total yield: 11590, q=130010009 (0.68150 sec/rel) total yield: 4971, q=130010009 (0.77353 sec/rel) total yield: 9924, q=130010009 (0.72277 sec/rel) C246_130_87.initial_snfs total yield: 3456, q=130010009 (1.09830 sec/rel) total yield: 7358, q=130010009 (0.96890 sec/rel) total yield: 3407, q=130010009 (1.11494 sec/rel) total yield: 6765, q=130010009 (1.06387 sec/rel) C246_143_58.initial_snfs total yield: 4415, q=130010009 (0.84616 sec/rel) total yield: 9214, q=130010009 (0.76643 sec/rel) total yield: 4643, q=130010009 (0.82960 sec/rel) total yield: 9449, q=130010009 (0.77321 sec/rel) C247_125_102.initial_snfs total yield: 8796, q=130010009 (0.46016 sec/rel) total yield: 19094, q=130010009 (0.40438 sec/rel) total yield: 9207, q=130010009 (0.42136 sec/rel) total yield: 18853, q=130010009 (0.38462 sec/rel) C249_125_106.initial_snfs total yield: 7130, q=130010009 (0.52332 sec/rel) total yield: 15217, q=130010009 (0.46348 sec/rel) total yield: 7920, q=130010009 (0.48562 sec/rel) total yield: 16245, q=130010009 (0.44511 sec/rel) C249_133_82.initial_snfs total yield: 4217, q=130010009 (0.88017 sec/rel) total yield: 8996, q=130010009 (0.77564 sec/rel) total yield: 4412, q=130010009 (0.86608 sec/rel) total yield: 8877, q=130010009 (0.81619 sec/rel) C250_142_98.initial_snfs total yield: 5498, q=130010009 (0.69142 sec/rel) total yield: 11459, q=130010009 (0.62760 sec/rel) total yield: 5657, q=130010009 (0.68142 sec/rel) total yield: 11358, q=130010009 (0.64701 sec/rel) C250_146_80.initial_snfs total yield: 6470, q=130010009 (0.64258 sec/rel) total yield: 13714, q=130010009 (0.59361 sec/rel) total yield: 6196, q=130010009 (0.62433 sec/rel) total yield: 12502, q=130010009 (0.61041 sec/rel) 130.87 yields with 3 large primes (A3.0 => lss=0, 3 large primes on A side); 15e, 31LP Code: A3.0 y=7823 t=1.229s/r A3.1 y=7503 t=1.302s/r R3.0 y=8140 t=1.229s/r R3.1 y=6874 t=1.295s/r so that's a significant disadvantage over 2 large primes Last fiddled with by fivemack on 2016-07-04 at 16:32
2016-07-06, 04:01   #4
Dubslow

"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts

There are lots of things I could say about the code, both generically and Python specific... mostly, it's terse and uncommented, some variable names being rather opaque, though I think I was able to figure things out. Among other things, I would suggest that even for the most terse single character variables, you use them consistently -- sometimes you used p for factors, while later you used g instead of p for no particular reason I could see. Also, more spacing is always better (and see PEP 8 for the official Python spacing conventions, among other things). Finally, use Python 3. Python 2 is deprecated and has no advantages and several disadvantages compared to Python 3.

There are a variety of other things too, like unnecessary parens in conditionals and other things. See the attached for a full diff. (I more or less rewrote it line for line)

(And if you complain that this is a throwaway script, well... I used to do the same until I tried to read the throwaways when they became useful again after months or years of disuse... boy was that a pain. )

Edit: One of my more liked coans from among many: http://thecodelesscode.com/case/116
Attached Files
 automate-xyyxf.copy.py.txt (3.1 KB, 224 views)

Last fiddled with by Dubslow on 2016-07-06 at 04:17

 Similar Threads Thread Thread Starter Forum Replies Last Post wildrabbitt Hardware 3 2016-05-14 16:31 ConstipatedNinj Information & Answers 12 2015-12-02 00:02 akruppa Factoring 5 2012-12-04 09:24 wyattwong Software 3 2011-02-25 20:20 rgiltrap Linux 1 2007-01-08 22:33

All times are UTC. The time now is 02:24.

Thu Feb 9 02:24:18 UTC 2023 up 174 days, 23:52, 1 user, load averages: 0.58, 0.65, 0.80

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.

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