Opened 4 years ago
Closed 4 years ago
#19834 closed enhancement (fixed)
implement symbolic Stieltjes constants
Reported by:  rws  Owned by:  

Priority:  major  Milestone:  sage7.1 
Component:  symbolics  Keywords:  
Cc:  behackl  Merged in:  
Authors:  Ralf Stephan  Reviewers:  Benjamin Hackl 
Report Upstream:  N/A  Work issues:  
Branch:  0e1162b (Commits)  Commit:  0e1162bace0e5a2fbdf04ecdfb22343cadc560ce 
Dependencies:  #19948  Stopgaps: 
Description (last modified by )
Probably just another symbolic function would suffice. This would be needed for zeta expansion and special values. The Sage side would be a new GinacFunction
and numeric evaluation.
 https://en.wikipedia.org/wiki/Stieltjes_constants
 http://docs.sympy.org/dev/modules/mpmath/functions/zeta.html#stieltjes
 Section 4.2 of http://arxiv.org/abs/1309.2877
Depends on https://github.com/pynac/pynac/issues/120 See also #18141.
Change History (18)
comment:1 Changed 4 years ago by
 Cc behackl added
comment:2 Changed 4 years ago by
 Description modified (diff)
comment:3 Changed 4 years ago by
 Description modified (diff)
comment:4 Changed 4 years ago by
 Description modified (diff)
comment:5 Changed 4 years ago by
comment:6 Changed 4 years ago by
... or just stieltjes(n, a=1)
with adaptive representation. That's probably more elegant. ;)
comment:7 Changed 4 years ago by
 Branch set to u/rws/implement_symbolic_stieltjes_constants
comment:8 Changed 4 years ago by
 Commit set to bdac71f6017bbc99729fe8a1ed84b7a95543804e
 Dependencies set to pynac0.6.1
 Status changed from new to needs_review
This is what Sage needs to use the current pynac git master implementation of Stieltjes constants (not generalized).
New commits:
bdac71f  19834: implement symbolic Stieltjes constants

comment:9 Changed 4 years ago by
Why are you making cdef object py_stieltjes
a cdef
function? A cdef
function that takes as input a Python object, returns a Python object would and only contains Python code would better be a def
function.
comment:10 Changed 4 years ago by
Ho I see. This is actually needed for the array of functions.
comment:11 Changed 4 years ago by
Yes, everything symbolic is rooted through Pynac, so ex.n()
calls Pynac's evalf
functions which call (indirectly) Python functions which therefore must be cdef
.
comment:12 Changed 4 years ago by
 Dependencies changed from pynac0.6.1 to #19448
 Milestone changed from sage7.0 to sage7.1
comment:13 Changed 4 years ago by
 Dependencies changed from #19448 to #19948
comment:14 Changed 4 years ago by
 Branch changed from u/rws/implement_symbolic_stieltjes_constants to u/behackl/symbolics/stieltjesconstants
 Commit changed from bdac71f6017bbc99729fe8a1ed84b7a95543804e to 0e1162bace0e5a2fbdf04ecdfb22343cadc560ce
I just resolved the merge conflict with 7.1.beta1
.
New commits:
0e1162b  Merge tag '7.1.beta1' into symbolics/stieltjesconstants

comment:15 Changed 4 years ago by
 Reviewers set to Benjamin Hackl
Implementation looks fine to me; doctests pass. I'd still like to see if the patchbot is satisfied, too. I'll set this to positive_review
lateror you can do so directly, if you do not want to wait. ;)
comment:16 Changed 4 years ago by
 Status changed from needs_review to positive_review
comment:17 Changed 4 years ago by
Thanks!
comment:18 Changed 4 years ago by
 Branch changed from u/behackl/symbolics/stieltjesconstants to 0e1162bace0e5a2fbdf04ecdfb22343cadc560ce
 Resolution set to fixed
 Status changed from positive_review to closed
For the sake of representation: should there be two separate functions, say
stieltjes(n)
andgeneralized_stieltjes(n, a)
represented as\gamma_n
and\gamma_n(a)
, respectively?Of course, like
stieltjes(0)
should returneuler_gamma
,generalized_stieltjes(n, 1)
should returnstieltjes(n)
 but I think this can be done easily, either still in pynac, or after registering the function in sage.