Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

symbolic Laguerre / associated Laguerre polynomials #17151

Closed
rwst opened this issue Oct 14, 2014 · 45 comments
Closed

symbolic Laguerre / associated Laguerre polynomials #17151

rwst opened this issue Oct 14, 2014 · 45 comments

Comments

@rwst
Copy link

rwst commented Oct 14, 2014

Not only is laguerre(n,x) not symbolic, a naive implementation is already 2x as fast at n=100 and 10x at n=1000:

R.<x> = PolynomialRing(QQ, 'x')
def lag(n):
    return R([binomial(n,k)*(-1)^k/factorial(k) for k in xrange(n+1)])

Depends on #17953

Component: symbolics

Keywords: special, function, holonomic, orthogonal

Author: Ralf Stephan

Branch/Commit: f0d809f

Reviewer: Marc Mezzarobba

Issue created by migration from https://trac.sagemath.org/ticket/17151

@rwst rwst added this to the sage-6.4 milestone Oct 14, 2014
@rwst

This comment has been minimized.

@rwst
Copy link
Author

rwst commented Nov 9, 2014

@rwst
Copy link
Author

rwst commented Nov 9, 2014

New commits:

6d10729Simplify numerical evaluation of BuiltinFunctions
b6e1ed4Merge remote-tracking branches 'origin/u/jdemeyer/ticket/17131' and 'origin/u/jdemeyer/ticket/17133' into ticket/17130
04b2b37Merge branch 'u/jdemeyer/ticket/17130' of trac.sagemath.org:sage into t/17151/symbolic_laguerre___associated_laguerre_polynomials
3d3d1fa17151: skeleton impl.
b3edc5117151: implement symbolic Laguerre pol.
c8beac217151: implement laguerre(n,x)
1626a8b17151: implement gen_laguerre

@rwst
Copy link
Author

rwst commented Nov 9, 2014

Commit: 1626a8b

@rwst
Copy link
Author

rwst commented Nov 9, 2014

Author: Ralf Stephan

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 26, 2014

Changed commit from 1626a8b to f727de5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 26, 2014

Branch pushed to git repo; I updated commit sha1. New commits:

f727de517151: reduce evalf logic further; fix merge conflict

@kcrisman
Copy link
Member

kcrisman commented Feb 3, 2015

comment:6

For some reason this branch is red.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 3, 2015

Changed commit from f727de5 to 6d05ac6

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 3, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

6d05ac6Merge branch 'develop' into t/17151/symbolic_laguerre___associated_laguerre_polynomials

@rwst
Copy link
Author

rwst commented Feb 24, 2015

comment:9
sage -t --long src/sage/symbolic/expression.pyx  # 1 doctest failed
sage -t --long src/sage/matrix/matrix2.pyx  # 1 doctest failed
sage -t --long src/sage/graphs/bipartite_graph.py  # 1 doctest failed

@rwst
Copy link
Author

rwst commented Feb 25, 2015

@rwst
Copy link
Author

rwst commented Feb 25, 2015

comment:11

Fixed. Squashed it all into one commit.

EDIT: Or not.


New commits:

80f136bMerge branch 'develop' into t/17151/symbolic_laguerre___associated_laguerre_polynomials
ea2ff9b17151: symbolic Laguerre / associated Laguerre polynomials

@rwst
Copy link
Author

rwst commented Feb 25, 2015

Changed commit from 6d05ac6 to ea2ff9b

@rwst rwst modified the milestones: sage-6.4, sage-6.6 Feb 25, 2015
@mezzarobba
Copy link
Member

comment:12
sage: laguerre(-9, 2.)
0.000000000000000
sage: laguerre(-9, 2).n()
1566.22186244286

@mezzarobba
Copy link
Member

comment:27

Not a bug, but would be nice to have: the implementation doesn't seem to know that L(n, 0) = 1 and more generally L(n, α, 0) = binomial(n+α,n).

@rwst
Copy link
Author

rwst commented Jul 2, 2015

comment:29

Replying to @mezzarobba:

I also don't like that

sage: laguerre(3, polygen(QQ)).parent()
Symbolic Ring

Equivalently to #16813 this behaviour can only be changed when we have #18832. EDIT: pow is not a BuiltinFunction and chebyshev_T uses its own __call__ which is frowned upon. I would advise to not make this ticket dependent on the feature you suggest but to open a followup ticket.

@rwst
Copy link
Author

rwst commented Jul 2, 2015

Changed branch from u/rws/17151-1 to u/rws/17151-2

@rwst
Copy link
Author

rwst commented Jul 2, 2015

comment:31

With the new branch all other comments were addressed.


New commits:

6631c7717151: symbolic Laguerre / associated Laguerre polynomials

@rwst
Copy link
Author

rwst commented Jul 2, 2015

Changed commit from 351b5c6 to 6631c77

@rwst rwst modified the milestones: sage-6.7, sage-6.8 Jul 2, 2015
@fchapoton
Copy link
Contributor

comment:32

needs rebase, does not apply

@fchapoton
Copy link
Contributor

Changed commit from 6631c77 to f0d809f

@fchapoton
Copy link
Contributor

comment:33

rebased


New commits:

f0d809fMerge branch 'u/rws/17151-2' into 6.9.b4

@fchapoton
Copy link
Contributor

Changed branch from u/rws/17151-2 to public/ticket/17151

@mezzarobba
Copy link
Member

comment:34

As explained in one of my previous comments, I still don't understand why you don't like the idea of using QQ['x'] to compute the coefficients in _pol_laguerre() (especially since #18282 has been merged and the problem with symbolic results being computed in Horner form no longer exists). But that's something that can be fixed later and this ticket has languished long enough already.

Thanks for working on it!

@mezzarobba
Copy link
Member

Reviewer: Marc Mezzarobba

@rwst
Copy link
Author

rwst commented Sep 3, 2015

comment:35

Thanks for the review.

@vbraun
Copy link
Member

vbraun commented Sep 4, 2015

Changed branch from public/ticket/17151 to f0d809f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants