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

Order in symbolic ring: error calling operator #19425

Closed
dkrenn opened this issue Oct 16, 2015 · 10 comments
Closed

Order in symbolic ring: error calling operator #19425

dkrenn opened this issue Oct 16, 2015 · 10 comments

Comments

@dkrenn
Copy link
Contributor

dkrenn commented Oct 16, 2015

sage: R.<r> = ZZ[[]]
sage: o = SR(r.O(2)).operands()[1]; o
Order(r^2)
sage: o.operator()
...
RuntimeError: cannot find SFunction in table

or

x.Order().operator()
...
RuntimeError: cannot find SFunction in table

Component: symbolics

Author: Benjamin Hackl

Branch/Commit: 7a2e948

Reviewer: Ralf Stephan

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

@dkrenn dkrenn added this to the sage-6.10 milestone Oct 16, 2015
@cheuberg
Copy link
Contributor

comment:1
sage: (x+x^2).series(x, 2).operator() is None
True

@dkrenn

This comment has been minimized.

@rwst
Copy link
Contributor

rwst commented Oct 17, 2015

comment:3

Replying to @cheuberg:

sage: (x+x^2).series(x, 2).operator() is None
True

The topmost operator in symbolic series pseries is not a registered function, but it can be seen in the expression tree:

sage: (x+x^2).series(x, 2)._dbgprinttree()
pseries @0x4e2c3b0, hash=0x0, flags=0x3
    1 (numeric) @0x35d70d0, hash=0x0, flags=0x7
    1 (numeric) @0x35d70d0, hash=0x0, flags=0x7
    -----
    function Order @0x4c197f0, serial=12, hash=0x0, flags=0x3, nops=1
        1 (numeric) @0x35d70d0, hash=0x0, flags=0x7
        =====
    2 (numeric) @0x35d7130, hash=0x0, flags=0x7
    -----
    x (symbol) @0x3e5d6d0, serial=5, hash=0xf4f4bfee, flags=0xf, domain=0, iflags=0000000000000000
    0 (numeric) @0x3647180, hash=0x0, flags=0x7

You can see that the function Order is there too. GiNaC::Order is registered in Pynac and imported to Sage (symbolic/ginac.pxd). But it somehow doesn't get into Sage's registry sfunction_serial_dict which is created and used in symbolic/function.pyx.

@behackl
Copy link
Member

behackl commented Jan 7, 2016

comment:4

Replying to @rwst:

But it somehow doesn't get into Sage's registry sfunction_serial_dict which is created and used in symbolic/function.pyx.

This was because Order was not registered. Should be fixed now.


New commits:

84aa1e2register Order-function
318dd7badd examples and tests
7a2e948add seealso-block

@behackl
Copy link
Member

behackl commented Jan 7, 2016

Commit: 7a2e948

@behackl
Copy link
Member

behackl commented Jan 7, 2016

@behackl
Copy link
Member

behackl commented Jan 7, 2016

Author: Benjamin Hackl

@rwst
Copy link
Contributor

rwst commented Jan 7, 2016

Reviewer: Ralf Stephan

@rwst
Copy link
Contributor

rwst commented Jan 7, 2016

comment:5

Passes tests in selected directories. As soon as a patchbot run passes this can be set positive.

@vbraun
Copy link
Member

vbraun commented Jan 7, 2016

Changed branch from u/behackl/function/Order-registration to 7a2e948

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