calculating multiple polylogarithms in sage/pynac

i like this post (click again to cancel)
2
i dont like this post (click again to cancel)

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!

asked Sep 30 '10

torben gravatar image torben
21 2

3 Answers:

i like this answer (click again to cancel)
2
i dont like this answer (click again to cancel)

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.

link

posted Oct 01 '10

burcin gravatar image burcin
1058 10 31
http://erocal.org/burcin
And of course we're referring to multiple polylogs here, for the original poster, though the ticket could have all of that. kcrisman (Oct 01 '10)
i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel)

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.

link

posted Sep 30 '10

kcrisman gravatar image kcrisman
6639 13 66 150

updated Sep 30 '10

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 (Sep 30 '10)
> "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 (Oct 01 '10)
Of course :) kcrisman (Oct 01 '10)
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

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 :)

link

posted Sep 30 '10

niles gravatar image niles
3354 5 38 92
http://nilesjohnson.net/

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Sep 30 '10

Seen: 187 times

Last updated: Oct 01 '10

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.