mersenneforum.org  

Go Back   mersenneforum.org > Math Stuff > Computer Science & Computational Number Theory > PARI/GP

Reply
 
Thread Tools
Old 2020-08-15, 13:29   #276
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

23×3×79 Posts
Default

Thank you very much for that Dr. S.
I did check the documentation for the current stable version 2.11.1 before posting and it was missing.
I will look for the 2,12.2 version.
Thanks again. That is a very useful function that is quite hard for me to emulate myself. It has been part of Mathematica since before I started this thread and I have even ranted about its missing earlier in this thread somewhere.

Last fiddled with by a1call on 2020-08-15 at 13:30
a1call is offline   Reply With Quote
Old 2020-08-15, 18:44   #277
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

23×3×79 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
My guess is, your version of Pari-GP predates the function, in which case the answer to your question is, "You can't."

I don't know the earliest version of Pari-GP that included foreach(V, X, seq) but I did find it mentioned on a reference card for version 2.12.1.
That's only available as a Linux version. The highest WinThose version available is 2.12.0.
I am not going to go through the build/make stuff.
The waiting goes on, but beggars can't be choosy now can they.

Last fiddled with by a1call on 2020-08-15 at 18:44
a1call is offline   Reply With Quote
Old 2020-08-16, 01:19   #278
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

31×191 Posts
Default

Quote:
Originally Posted by a1call View Post
That's only available as a Linux version. The highest WinThose version available is 2.12.0.
I am not going to go through the build/make stuff.
The waiting goes on, but beggars can't be choosy now can they.
You can get a daily snapshot here:
https://pari.math.u-bordeaux.fr/pub/...ows/snapshots/
CRGreathouse is offline   Reply With Quote
Old 2020-08-16, 01:50   #279
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

23×3×79 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
Thanks for that CRGreathouse.

Alas the function is missing from the portable gp64-2-12-1.A2020.exe

I am installing the install-able version as we speak.

ETA: At least we know it's coming soon to a theater near us

Quote:
Reading GPRC: gprc.txt
GPRC Done.

GP/PARI CALCULATOR Version 2.12.1 (alpha)
amd64 running mingw (x86-64/GMP-6.1.2 kernel) 64-bit version
compiled: Jan 19 2020, gcc version 6.3.0 20170516 (GCC)
threading engine: single
(readline v8.0 enabled, extended help enabled)

Copyright (C) 2000-2020 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?17 for how to get moral (and possibly technical) support.

parisize = 8000000, primelimit = 500000
(18:51) gp > foreach(V, X, seq)
*** at top-level: foreach(V,X,seq)
*** ^----------------
*** not a function in function call
(18:52) gp > ?foreach
foreach: new identifier

(18:52) gp > f=factor(2*3*5)
%1 =
[2 1]

[3 1]

[5 1]

(18:53) gp > foreach(f, i, print(i))
i
*** at top-level: foreach(f,i,print(i))
*** ^---------------------
*** not a function in function call
(18:54) gp >

Last fiddled with by a1call on 2020-08-16 at 01:59
a1call is offline   Reply With Quote
Old 2020-08-16, 03:21   #280
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

31·191 Posts
Default

Try gp64-gmp-git-lastest.exe
CRGreathouse is offline   Reply With Quote
Old 2020-08-16, 04:20   #281
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

23·3·79 Posts
Default

lastest
WIP
Thanks.
a1call is offline   Reply With Quote
Old 2020-08-16, 05:06   #282
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

23·3·79 Posts
Default

Code:
? f=[3,5,7];
? foreach(f, i, print(i));
3
5
7


Thanks to everyone.
a1call is offline   Reply With Quote
Old 2020-08-16, 05:30   #283
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

31×191 Posts
Default

Glad to know it's working!

When I'm on Windows, I install the latest development version, then run the latest snapshot from the same directory to get a (mostly) best-of-both-worlds setup. Maybe that will work for you as well?
CRGreathouse is offline   Reply With Quote
Old 2020-08-16, 05:51   #284
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

189610 Posts
Default

Acknowledged and thanks for the tip CRGreathouse.

ETA:
I had my issues with SM, but I wish he was still around.

Last fiddled with by a1call on 2020-08-16 at 05:53
a1call is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
An equivalent problem for factorization of large numbers HellGauss Math 5 2012-04-12 14:01
PIV Effective Equivalent curiosities... petrw1 Software 0 2009-12-05 04:41
Dual Core P95 64Bit P4 Equivalent problem g0ods Software 9 2009-09-15 14:12
Is there a finite-field equivalent to the DWT? fivemack Math 4 2008-03-27 17:58
Equivalent code dsouza123 Programming 25 2005-10-08 05:10

All times are UTC. The time now is 06:24.

Sat Sep 19 06:24:49 UTC 2020 up 9 days, 3:35, 0 users, load averages: 1.71, 1.71, 1.56

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.