Opened 4 years ago

Closed 4 years ago

#19834 closed enhancement (fixed)

implement symbolic Stieltjes constants

Reported by: rws Owned by:
Priority: major Milestone: sage-7.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 rws)

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.

Depends on https://github.com/pynac/pynac/issues/120 See also #18141.

Change History (18)

comment:1 Changed 4 years ago by rws

  • Cc behackl added

comment:2 Changed 4 years ago by rws

  • Description modified (diff)

comment:3 Changed 4 years ago by rws

  • Description modified (diff)

comment:4 Changed 4 years ago by rws

  • Description modified (diff)

comment:5 Changed 4 years ago by behackl

For the sake of representation: should there be two separate functions, say stieltjes(n) and generalized_stieltjes(n, a) represented as \gamma_n and \gamma_n(a), respectively?

Of course, like stieltjes(0) should return euler_gamma, generalized_stieltjes(n, 1) should return stieltjes(n) -- but I think this can be done easily, either still in pynac, or after registering the function in sage.

comment:6 Changed 4 years ago by behackl

... or just stieltjes(n, a=1) with adaptive representation. That's probably more elegant. ;-)

comment:7 Changed 4 years ago by rws

  • Branch set to u/rws/implement_symbolic_stieltjes_constants

comment:8 Changed 4 years ago by rws

  • Authors set to Ralf Stephan
  • Commit set to bdac71f6017bbc99729fe8a1ed84b7a95543804e
  • Dependencies set to pynac-0.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:

bdac71f19834: implement symbolic Stieltjes constants

comment:9 Changed 4 years ago by vdelecroix

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 vdelecroix

Ho I see. This is actually needed for the array of functions.

comment:11 Changed 4 years ago by rws

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 rws

  • Dependencies changed from pynac-0.6.1 to #19448
  • Milestone changed from sage-7.0 to sage-7.1

comment:13 Changed 4 years ago by rws

  • Dependencies changed from #19448 to #19948

comment:14 Changed 4 years ago by behackl

  • Branch changed from u/rws/implement_symbolic_stieltjes_constants to u/behackl/symbolics/stieltjes-constants
  • Commit changed from bdac71f6017bbc99729fe8a1ed84b7a95543804e to 0e1162bace0e5a2fbdf04ecdfb22343cadc560ce

I just resolved the merge conflict with 7.1.beta1.


New commits:

0e1162bMerge tag '7.1.beta1' into symbolics/stieltjes-constants

comment:15 Changed 4 years ago by behackl

  • 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 later---or you can do so directly, if you do not want to wait. ;-)

comment:16 Changed 4 years ago by behackl

  • Status changed from needs_review to positive_review

comment:17 Changed 4 years ago by rws

Thanks!

comment:18 Changed 4 years ago by vbraun

  • Branch changed from u/behackl/symbolics/stieltjes-constants to 0e1162bace0e5a2fbdf04ecdfb22343cadc560ce
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.