![]() |
|
|
#551 |
|
"Ben"
Feb 2007
7×503 Posts |
... in the usual place.
This version has some cool new stuff. bchaffin contributed code to run gmp-ecm over multiple threads - now one can do N times as much ECM pretesting in the same amount of time when running multi-threaded. WraithX contributed code to grab the input expression and use it in his special output files rather than the expanded decimal form (e.g. 2^32-1 would be put in log files rather than 4294967295). Brian Gladman contributed assembler files to support 64 bit mod operations in x64 builds. Lastly, I was able to get mingw64 builds to work, which together with a largish pile of new assembly code results in much faster SIQS code for 64 bit platforms - up to 20% in some cases. Linux people should see similar improvements. My 2.93 GHz i7 can now factor my test C85 in 7.5 minutes, single threaded ![]() Additional details: * the parallel gmp-ecm code relies on shared memory and fork(). Unfortunately, that means that this is only available for *nix platforms. * A big piece of the SIQS speed improvement comes from resieving of "medium" sized factor base primes. A big thanks to fivemack and R.D. Silverman for helping me to finally understand what it was all about (towards the end of this thread) Cheers, - ben. |
|
|
|
|
|
#552 | |||
|
Mar 2010
Brick, NJ
67 Posts |
Not sure if this has been fixed in the latest version or not. Using 1.22 there is a bug with the factorization of certain numbers.
To reproduce, take N = the square of a Mersenne number larger than [sqrt(MP)] mod MP. Eg, N=(2^536-1)^2 mod (2^1061-1), or N=(2^537-1)^2 mod (2^1061-1), or N=(2^538-1)^2 mod (2^1061-1)... etc. The modulus will be half of a perfect square. When trying to factor such N, or even 2N (which would be a perfect square) YAFU Displays the message: Quote:
Here is an example: Quote:
Quote:
I belive that YAFU finds a perfect square in the composite being restarted and factors the sqrt of that number, which is fine except if this is the case the number of each prime factor found should be double. |
|||
|
|
|
|
|
#553 |
|
Mar 2010
Brick, NJ
67 Posts |
Also, would it be possible that when the factorization contains multiples of a prime factor the program outputs the exponent instead of the same exponent multiple times?
The problem is say the factorizations contains 2^128, then 2 is printed as factor one 128 seperate lines. There have been cases where so many factors have been displayed I could not scroll up far enough get all the factors. Yes they are printed to the log file but.... |
|
|
|
|
|
#554 |
|
"Ben"
Feb 2007
DC116 Posts |
I see what happens... fermat splits the square into two identical composite factors but only one of the composite factors is re-factored. Trial division removed all of the small squares first, so that's why they were reported correctly.
The easiest fix would be to send both composite factors down the re-factorization path, but that would duplicate a lot of work. I suppose the smart approach would be to test for squaritude first and, if square and composite, just double all of the factors' exponents. I should really have generic ispower test, come to think of it, and use that early in the factor() sequence. Thanks for the report... and the feature request. |
|
|
|
|
|
#555 | ||
|
Mar 2010
Brick, NJ
1038 Posts |
Quote:
I thought the YAFU did a check for a square already. I remember seeing such a check in the source code. In my own app, which is nowhere on the level of yours, I check if N is a square then factor the square root after which each exponent is doubled. Quote:
-------- Edit.... I found your square root check, MPQS.C line 220, v1.20. |
||
|
|
|
|
|
#556 |
|
Tribal Bullet
Oct 2004
354310 Posts |
You can add a power detection test, and that will fix the problem here, but may not fix the more general problem: when reducing a number to its prime factorization, you may find a factor that appears in factors that were previously found.
The only way to solve the general version of this problem is to maintain a list of factors found so far, and when a new factor is found you go through the list and divide GCD(new_factor, factor_i) out of composite factor i, then add the GCD result, the smaller old factor and the smaller new factor back into the list. It's easiest to do that recursively. With the list in hand, you can ask for each composite in the list, then perform a power test and QS or NFS, with new factors added back into the list. Proceed until the list only contains primes. The bookkeeping is easier if you then manually determine how many times each prime in the list divides the input, so there's always only one copy of each prime in the list. Msieve uses a factor_list_t to do this work; the code using it is in common/driver.c, and it took a surprising amount of fiddling to automatically break down highly composite numbers. |
|
|
|
|
|
#557 | |
|
"Ben"
Feb 2007
7×503 Posts |
Quote:
What I need to add is a square/power check in factor(). ----------- Edit: You're welcome! Glad you like it. People that take the time to provide helpful feedback like this is what makes things better, and keeps things fun. :) Last fiddled with by bsquared on 2011-02-12 at 01:08 |
|
|
|
|
|
|
#558 | |
|
"Ben"
Feb 2007
67018 Posts |
Quote:
I've got a recursive structure with global factor list already in place - just need to be more thorough about recursing through all composites in the list. |
|
|
|
|
|
|
#559 |
|
Mar 2010
5710 Posts |
I upgraded to 1.24 and all of a sudden I get "gnfs has been disabled". Whahappen? It worked fine up until now.
|
|
|
|
|
|
#560 |
|
Sep 2010
Scandinavia
11478 Posts |
Same here - 'gnfs has been disabled'
|
|
|
|
|
|
#561 |
|
"Ben"
Feb 2007
352110 Posts |
Sorry, I'd forgotten that NFS wasn't enabled by default. I'll upload a patched 1.24 tonight.
Thanks for the report. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Running YAFU via Aliqueit doesn't find yafu.ini | EdH | YAFU | 8 | 2018-03-14 17:22 |
| YAFU-1.34 | bsquared | YAFU | 119 | 2015-11-05 16:24 |
| Yafu bug. | storflyt32 | YAFU | 2 | 2015-06-29 05:19 |
| yafu-1.33 | bsquared | YAFU | 12 | 2012-11-08 04:12 |
| yafu-1.32.1 | bsquared | YAFU | 21 | 2012-09-04 19:44 |