![]() |
[QUOTE=CRGreathouse;222319]What are you trying to do?[/QUOTE]
well if you want me to use your code you better tell me how to make it work in pari if it can't I need to find a code that will come up with a formula that proves #2 on my list way back in the thread. |
[QUOTE=science_man_88;222320]well if you want me to use your code you better tell me how to make it work in pari if it can't I need to find a code that will come up with a formula that proves #2 on my list way back in the thread.[/QUOTE]
My program won't run? What does it say? You said that it wouldn't take "my" and I told you to upgrade. You did, so I'm not aware of any issues you're having. |
@CRG:
For the pseudoprime generator: pseudo(n)=!isprime(n)&isWPRP(n,2) forstep(n=2,1e6,if(pseudo(n),print(n))) ?? P.S: Code saved onto document. @Scienceman: [B]P.S: 690487410473298653431 = 53318149a + 14651927b. a = ?; b = ?[/B] |
it didn't look like it was doing anything I apparently didn't press enter after the last line lol.
|
[QUOTE=3.14159;222322]pseudo(n)=!isprime(n)&isWPRP(n,2)
forstep(n=2,1e6,if(pseudo(n),print(n)))[/QUOTE] Something like that, but be sure you're using the isWPRP/isPRP version that returns a value rather than printing. You'll need to put in a step value to use forstep. In this case you want a step of 2 (and to start at 3): forstep(n=3,1e6,2, -code goes here-) |
[QUOTE=3.14159;222322]@CRG:
For the pseudoprime generator: pseudo(n)=!isprime(n)&isWPRP(n,2) forstep(n=2,1e6,if(pseudo(n),print(n))) ?? P.S: Code saved onto document. @Scienceman: [B]P.S: 690487410473298653431 = 53318149a + 14651927b. a = ?; b = ?[/B][/QUOTE] wel I'm guessing that since you won't stop until I answer it's your usual 2 and 3 lol |
[QUOTE=science_man_88;222324]it didn't look like it was doing anything I apparently didn't press enter after the last line lol.[/QUOTE]
Ah. It works now, though, right? Hopefully it's faster for you as well. I think you'll find it worthwhile to reverse the logic on that program: print only if an exception is found, rather than on each number. Otherwise it's just going to fill up your screen! |
[QUOTE=CRGreathouse;222327]Ah. It works now, though, right? Hopefully it's faster for you as well.
I think you'll find it worthwhile to reverse the logic on that program: print only if an exception is found, rather than on each number. Otherwise it's just going to fill up your screen![/QUOTE] yeah..... i have no clue how to do that lol . actually so just change everything to not mostly ? |
got it working for that now and I tested this in 6-7 minutes maybe 8 at most
[CODE](16:38) gp > gettime();test(40000000);gettime(); (16:44) gp >[/CODE] |
You can type ## (then enter) to see how long the last command took. If you type # (then enter) then each command from that point on prints out how long it took.
|
[QUOTE=CRGreathouse;222333]You can type ## (then enter) to see how long the last command took. If you type # (then enter) then each command from that point on prints out how long it took.[/QUOTE]
I'll do it again apparently the 4000 test took 16 ms the last time. |
| All times are UTC. The time now is 04:47. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.