Interface to custom pari/GP

asked 0 years ago

GuidoL gravatar image

updated 0 years ago

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

Preview: (hide)

Comments

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

Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )
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 ( 0 years ago )

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 ( 0 years ago )
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 ( 0 years ago )