First time here? Check out the FAQ!

Ask Your Question
2

calculating multiple polylogarithms in sage/pynac

asked 14 years ago

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!

Preview: (hide)

3 Answers

Sort by » oldest newest most voted
2

answered 14 years ago

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.

Preview: (hide)
link

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

answered 14 years ago

kcrisman gravatar image

updated 14 years ago

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.

Preview: (hide)
link

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

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

Of course :)

kcrisman gravatar imagekcrisman ( 14 years ago )
0

answered 14 years ago

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

Preview: (hide)
link

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: 14 years ago

Seen: 909 times

Last updated: Oct 01 '10