Opened 6 years ago

Last modified 6 years ago

#21975 new enhancement

Remainder operator for integer symbols

Reported by: Peleg Michaeli Owned by:
Priority: major Milestone: sage-7.5
Component: symbolics Keywords: remainder, modulo
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


The following should probably work:

sage: x = SR.symbol('x', domain='integer')
sage: y = SR.symbol('y', domain='integer')
sage: x % y

but instead it raises the following error:

TypeError: unsupported operand parent(s) for '%': 'Symbolic Ring' and 'Symbolic Ring'

This is the behaviour in SymPy?:

In [9]: x%y
Out[9]: Mod(x, y)

Change History (1)

comment:1 Changed 6 years ago by Ralf Stephan

There is consensus on sage-devel that operations combining variables and elements of Zmod should not be supported by the symbolic ring (which mainly deals with calculus). While this is not such an operation per se, the expression will certainly be used later in operations. I'm not dismissing the ticket, just saying don't hold your breath.

Note: See TracTickets for help on using tickets.