Opened 5 years ago
Closed 5 months ago
#21907 closed defect (fixed)
Bug in Maxima interface wrt polylog
Reported by:  rws  Owned by:  

Priority:  minor  Milestone:  sage9.3 
Component:  symbolics  Keywords:  
Cc:  Merged in:  
Authors:  Frédéric Chapoton  Reviewers:  Dave Morris 
Report Upstream:  N/A  Work issues:  
Branch:  8f4f726 (Commits, GitHub, GitLab)  Commit:  8f4f726f394d7be7e401ed1115229a9874afd9e1 
Dependencies:  Stopgaps: 
Description
sage: bool(x*polylog(x,x)==0) ... /home/ralf/sage/local/lib/python2.7/sitepackages/sage/symbolic/expression_conversions.pyc in composition(self, ex, operator) 644 #FIXME: consider stripping pyobjects() in ops 645 if hasattr(operator, self.name_init + "evaled_"): > 646 return getattr(operator, self.name_init + "evaled_")(*ops) 647 else: 648 ops = [self(_) for _ in ops] /home/ralf/sage/local/lib/python2.7/sitepackages/sage/functions/log.pyc in _maxima_init_evaled_(self, *args) 451 452 n, x = args_maxima > 453 if int(n) in [1,2,3]: 454 return 'li[%s](%s)'%(n, x) 455 else: ValueError: invalid literal for int() with base 10: '_SAGE_VAR_x'
Change History (11)
comment:1 Changed 6 months ago by
 Milestone changed from sage7.5 to sageduplicate/invalid/wontfix
 Status changed from new to needs_review
comment:2 Changed 6 months ago by
 Status changed from needs_review to needs_info
I don't understand. The documentation seems to clearly state that nonintegral values are allowed:
This definition is valid for arbitrary complex order s and for all complex arguments z with z<1; it can be extended to z≥1 by the process of analytic continuation.
And nonintegral values are accepted in my testing:
sage: polylog(1.1 + 2.2*I, 3.3 + 4.4*I) 13.9758786469542 + 8.16803654165145*I
PS I think the documentation should tell us which parameter is s
and which is z
. (And I find the phrase "complex order s" to be confusing.)
comment:3 Changed 5 months ago by
This seems to work fine in 9.3.beta6, for some reason.
comment:4 Changed 5 months ago by
 Branch set to u/chapoton/21907
 Commit set to 88acb4cc619968ee7bc0c63955a82361f5886224
 Milestone changed from sageduplicate/invalid/wontfix to sage9.3
 Status changed from needs_info to needs_review
Here is a branch adding a doctest, and cleaning the file "en passant".
New commits:
88acb4c  cleanup the log file, plus one doctest for polylog

comment:5 Changed 5 months ago by
green bot, please review
comment:6 Changed 5 months ago by
Please clarify the definition of polylog
by making the following revision or something similar that specifies the branch cut.
 This definition is valid for arbitrary complex order `s` and for  all complex arguments `z` with `z < 1`; it can be extended to  `z \ge 1` by the process of analytic continuation. So the  function may have a discontinuity at `z=1` which can cause a  `NaN` value returned for floating point arguments. + This definition is valid for arbitrary complex numbers `s` and `z` + with `z < 1`. It can be extended to `z \ge 1` by the process of + analytic continuation, with a branch cut along the positive real axis + from `1` to `+\infty`. A `NaN` value may be returned for floating + point arguments that are on the branch cut.
comment:7 Changed 5 months ago by
 Commit changed from 88acb4cc619968ee7bc0c63955a82361f5886224 to 8f4f726f394d7be7e401ed1115229a9874afd9e1
Branch pushed to git repo; I updated commit sha1. New commits:
8f4f726  doc of polylog

comment:8 Changed 5 months ago by
ok, done
comment:9 Changed 5 months ago by
 Priority changed from major to minor
 Reviewers set to Dave Morris
Thanks! You can set to positive review on my behalf when there is a green patchbot again.
comment:10 Changed 5 months ago by
 Status changed from needs_review to positive_review
comment:11 Changed 5 months ago by
 Branch changed from u/chapoton/21907 to 8f4f726f394d7be7e401ed1115229a9874afd9e1
 Resolution set to fixed
 Status changed from positive_review to closed
This seems to be invalid.
polylog(x,x)
is not correct, the first argument must be an integer.Of course, one could ask for a better error message.
https://doc.sagemath.org/html/en/reference/functions/sage/functions/log.html?#sage.functions.log.Function_polylog