![]() |
is this prime?
1 Attachment(s)
IM NOT SURE IS THIS NUMBER PRIME?
|
[quote=n1994;128821]IM NOT SURE IS THIS NUMBER PRIME?[/quote]
Please find it on your own. I know it, and it's easy to find, you really don't need to post here for this. I'll repeat my instructions, just to be sure you have them:[quote=Mini-Geek;128567][URL]http://pari.math.u-bordeaux.fr/pub/pari/windows/Pari-2-3-3.exe[/URL] 1. Download that. 2. Install it. 3. Run gp.exe. 4. Type "isprime(", then copy your long number and paste it in by clicking the C:\ icon in the upper left corner, going to Edit, and clicking Paste (Ctrl+V doesn't work in GP, and right click is disabled), then press ")" and click Enter. 5. See that it says 0, meaning not prime. 6. Stop posting here about things you can obviously find on your own. If you do need to post another long number, please use the [ code ][ /code ] tags so it doesn't make the page extremely long.[/quote][quote=Mini-Geek;128570]I...told...you...how...to...paste... Once you copy it (you can copy it from this thread, if you like), after you've put the "isprime(" (or "factor(" or "ispseudoprime(" or whatever other command), click the C:\ icon in the upper left of the GP window, go to Edit, and click Paste.[/quote] If you have trouble understanding the instructions, please post with what you don't understand. Pari/GP can find the primality of a number that size easily, use isprime(x). |
ok 'my problem is that it doesnt work
i put a number in and instead of writing if its prime or not it writes the order(if i write foe example 4 in the first time it will writ me 1)
|
[quote=n1994;128823]i put a number in and instead of writing if its prime or not it writes the order(if i write foe example 4 in the first time it will writ me 1)[/quote]
%1 = 0 (after running the same command again) %2 = 0 Is this the sort of thing you're talking about? It's saying "%1", a reference for you to use in later formulas to reference this output, "= 0" meaning not prime (0 for not prime, 1 for prime). If you're saying it prints something like (assuming you're trying to check 11 for primality) "%1 = isprime11", then you need to put the parentheses around it so it knows you're telling it a command and not saying a name of a new variable or something. Edit: Try typing isprime(11) and see if it returns "%1 = 1". |
no it returns %6=(11)
it says six because its the 6 number i tried |
never mind it works thanx but it doesnt check big numbers
(more then a 100 digits also) |
[quote=n1994;128828]no it returns %6=(11)
it says six because its the 6 number i tried[/quote] [quote=n1994;128829]never mind it works thanx but it doesnt check big numbers (more then a 100 digits also)[/quote] What's the exact command you're using? Does it give some kind of error message when you try to check numbers over 100 digits? |
[quote=Mini-Geek;128830]What's the exact command you're using? Does it give some kind of error message when you try to check numbers over 100 digits?[/quote]
no im doing what you said isprime(x) but it "cuts" the nuber where the programs end instead of writing the hole number it makes it shorter. |
[quote=n1994;128832]no im doing what you said isprime(x) but it "cuts" the nuber where the programs end instead of writing the hole number it makes it shorter.[/quote]
So when you type isprime(11) it returns "(11)"? isprime() should report a "0" or a "1", with no parentheses. |
no that works fine now it returns 1 but if u put a big number it makes it shorter
|
[quote=n1994;128834]no that works fine now it returns 1 but if u put a big number it makes it shorter[/quote]
So isprime(11) returns "1" but if you paste a number instead of typing "11", it returns the full number? Try copying "11", then doing it just like you'd paste a larger number (making sure the command stays "isprime(11)") and double check that it returns "1". Then copy a large number, making sure you have "isprime(" before it and then typing ")" after it, and see if it returns 0 or 1 or something else. |
| All times are UTC. The time now is 07:26. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.