![]() |
|
|
#661 | |
|
Aug 2006
10111010110112 Posts |
Quote:
Trial division by 125 primes costs 125 modular divisions, at a cost of maybe 1000 cycles each. For a list of N candidates, this costs 1000N cycles in total. With sieving, the first is just as slow as trial division, maybe slightly slower, but the rest cost almost nothing (about 3 cycles in this case), for a total cost of about 1000 + 3N cycles. |
|
|
|
|
|
|
#662 |
|
Aug 2006
3·1,993 Posts |
|
|
|
|
|
|
#663 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
|
|
|
|
|
|
|
#664 |
|
Aug 2006
10111010110112 Posts |
|
|
|
|
|
|
#665 | |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Quote:
Last fiddled with by 3.14159 on 2010-08-19 at 14:36 |
|
|
|
|
|
|
#666 |
|
Aug 2006
3·1,993 Posts |
If you break (Ctrl+C) then it stops immediately, not finishing the computation. It's useful if you run a program with the settings too high -- you can stop it, change the settings lower, and re-run.
|
|
|
|
|
|
#667 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
The only substitution I've been able to make is the variables. Last fiddled with by 3.14159 on 2010-08-19 at 14:51 |
|
|
|
|
|
|
#668 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
couldn't you have gettime() called every few calculations and then ask if it's above a limit abort().
|
|
|
|
|
|
#669 |
|
Aug 2006
3·1,993 Posts |
You should study it to see how it uses the vector, since you seem to have trouble there, then use the code I/we worked out earlier for the variable-k case -- Mod(-1,p)/stuff.
|
|
|
|
|
|
#670 |
|
Aug 2006
175B16 Posts |
|
|
|
|
|
|
#671 | |
|
May 2010
Prime hunting commission.
168010 Posts |
Quote:
Last fiddled with by 3.14159 on 2010-08-19 at 15:13 |
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why do I sometimes see all the <> formatting commands when I quote or edit? | cheesehead | Forum Feedback | 3 | 2013-05-25 12:56 |
| Passing commands to PARI on Windows | James Heinrich | Software | 2 | 2012-05-13 19:19 |
| Ubiquity commands | Mini-Geek | Aliquot Sequences | 1 | 2009-09-22 19:33 |
| 64-bit Pari? | CRGreathouse | Software | 2 | 2009-03-13 04:22 |
| Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |