![]() |
![]() |
#1 | |
"James Heinrich"
May 2004
ex-Northern Ontario
77718 Posts |
![]()
edit: This started off as a help-request thread, but I have solved my own problem while typing it. It may yet contain useful information, so I'll post anyways.
![]() I have a code snippet (which I got from someone here, but I seem unable to find the original thread) for authenticating whether a factor actually divides a Mersenne exponent. And it works very nicely... but not on Windows. ![]() On *nix, it does as expected: Code:
# echo "Mod(2,2383)^397" | /usr/local/bin/gp -q Mod(1, 2383) Quote:
Code:
C:\Users\User>"C:\Program Files (x86)\PARI\gp.exe" -q (10:03) gp > Mod(2,2383)^397 Mod(1, 2383) Code:
// fail: echo 'factor(1234)' | "C:\Program Files (x86)\PARI\gp.exe" -q :: *** unused characters: 'factor(1234)' // fail: echo "factor(1234)" | "C:\Program Files (x86)\PARI\gp.exe" -q :: %1 = "factor(1234)" // work: echo factor(1234) | "C:\Program Files (x86)\PARI\gp.exe" -q Except when you get to the current problem, because the caret is a special character: Code:
C:\>echo Mod(2,2383)^397 | "C:\Program Files (x86)\PARI\gp.exe" -q *** unused characters: Mod(2,2383)397 ^--- Code:
C:\>echo Mod(2,2383)^^397 | "C:\Program Files (x86)\PARI\gp.exe" -q *** unused characters: Mod(2,2383)397 ^--- Code:
C:\Users\User>echo Mod(2,2383)^^^^397 | "C:\Program Files (x86)\PARI\gp.exe" -q Mod(1, 2383) |
|
![]() |
![]() |
![]() |
#2 |
Apr 2010
2×7 Posts |
![]()
echo eval(" 2+2^2 ") | gp -q
|
![]() |
![]() |
![]() |
#3 |
"James Heinrich"
May 2004
ex-Northern Ontario
3·29·47 Posts |
![]()
Oh, that works
![]() Thanks! |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PARI's commands | 3.14159 | PARI/GP | 2631 | 2018-09-26 15:26 |
Passing on manual work | CuriousKit | Information & Answers | 13 | 2015-02-27 01:11 |
Ubiquity commands | TimSorbet | Aliquot Sequences | 1 | 2009-09-22 19:33 |
Are these commands correct? | jasong | Linux | 2 | 2007-10-18 23:40 |
Passing input numbers to ECMNet as formulae? | bearnol | GMP-ECM | 2 | 2006-02-23 20:23 |