Interface to custom pari/GP

asked 2024-08-03 01:41:01 +0200

GuidoL gravatar image

updated 2024-08-26 20:05:30 +0200

FrédéricC gravatar image

Hi, I would like to interface pari with a developing branch of pari/GP. 1) Is this possible?
2) It looks to me that between diifferent calls the variables do not change. Does Sage somehow opens a pari session?

Thank you if you have some suggestion

edit retag flag offensive close merge delete

Comments

Maybe just execute PARI/GP as a standalone tool from Sage and parse its results?

Max Alekseyev gravatar imageMax Alekseyev ( 2024-08-03 07:07:08 +0200 )edit
1

Thank you a lot!

I tried !echo '''a=1; other_pari_command; ''' | /home/custom_pari/pari/gp -q and it is working at the moment

If you know of other ways to do it I am curius but thank you already!

GuidoL gravatar imageGuidoL ( 2024-08-03 09:30:41 +0200 )edit

If your PARI/GP code is lengthy, you may also save it as a file/script and providing it as an argument to PARI/GP. Vice versa, PARI/GP may communicate its results back in a file as well.

Max Alekseyev gravatar imageMax Alekseyev ( 2024-08-03 12:19:19 +0200 )edit
1

The sage interface to PARI/GP goes through cypari2. The latter is configurable to work with any PARI/GP you would like to use, including development version. Depending on your setup, you might just have to

  1. install the PARI/GP development version into your sage installation
  2. rebuild cypari2
vdelecroix gravatar imagevdelecroix ( 2024-08-03 16:05:57 +0200 )edit