Ask Your Question
2

calculating multiple polylogarithms in sage/pynac

asked 2010-09-30 16:57:58 +0100

torben gravatar image

Hi Everbody

In connection with some numerical simulations I am running, I need to calculate multiple polylogarithms to high precision ( 20 digits or more). I know that there exists functions in the Ginac library that can handle this, but I would rather work in python, hence I was wondering whether similar functionality exist here. If so how do I acces it (have been looking around in the documentation, but haven't found any mention of multiple polylogs). Any help would be most welcome. Thanks!

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2010-10-01 18:08:14 +0100

The code for numeric evaluation of polylogarithms in GiNaC calls the CLN library directly for speed. While removing the dependency on CLN, these functions were commented out. No one has tried to get them working within pynac since.

Looking at the relevant part of the code, which kcrisman linked to as well, you'll see that almost all numeric evaluation functions are commented out. The changes needed to get this to compile don't look too hard though. The calls to cln:: functions need to be replaced with either the equivalent ones in the numeric class, or use the py_*() functions defined in py_funcs.h directly.

I opened a ticket on the Sage issue tracker (#10050) to expose the polylogaritms from pynac in Sage. Fixing the numeric evaluation should be on a separate ticket.

The getting started with pynac development document might help with the first steps. Feel free to write to the pynac-devel googlegroup if you have any questions.

edit flag offensive delete link more

Comments

And of course we're referring to multiple polylogs here, for the original poster, though the ticket could have all of that.

kcrisman gravatar imagekcrisman ( 2010-10-01 22:50:10 +0100 )edit
1

answered 2010-09-30 18:00:28 +0100

kcrisman gravatar image

updated 2010-09-30 21:37:15 +0100

I think you might want to try

sage: polylog?

as a first step. But I don't see immediate Sage access to Ginac's

Li(m, x)    classical polylogarithm as well as multiple polylogarithm 
G(a, y) multiple polylogarithm 
G(a, s, y)  multiple polylogarithm with explicit signs for the imaginary parts

other than the regular polylog. However, Pynac's code doesn't seem to be missing too much of Ginac's stuff; some things are commented out, but not much.

Here is where ask.sagemath.org is NOT so helpful - no guarantee that the person who would know this best is reading. I'll ping him and see if he might give a sense of how you could write a wrapper (there are lots of good examples in Sage itself); presumably you could also access it via the C interface.

Incidentally, mpmath does not appear to currently support multiple polylogs.

edit flag offensive delete link more

Comments

Actually, I am pretty sure you *are* talking about the different function. This is in Pynac, but I don't think this is accessed via Sage - yet.

kcrisman gravatar imagekcrisman ( 2010-09-30 18:01:29 +0100 )edit

> "Here is where ask.sagemath.org is NOT so helpful.." That's a possible shortcoming of sage-support too; it's just much less likely to happen there.

niles gravatar imageniles ( 2010-10-01 08:55:00 +0100 )edit

Of course :)

kcrisman gravatar imagekcrisman ( 2010-10-01 11:25:12 +0100 )edit
0

answered 2010-09-30 18:14:22 +0100

niles gravatar image

I'm not sure how much help this will be, but it looks to me like Sage has GiNaC built in, so there should be a way to create and manipulate GiNaC objects from Sage . . . it looks like the contents of, e.g., sage.functions.trig do this for some trigonometric functions; those classes are based on GinacFunction, from sage.symbolic.function, which looks like it might take an arbitrary GiNaC function as input . . . but maybe it only allows selected ones -- I'm not sure about that.

Good luck :)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2010-09-30 16:57:58 +0100

Seen: 858 times

Last updated: Oct 01 '10