Skip to content

Commit 567aaea

Browse files
Release Managervbraun
Release Manager
authored andcommitted
Trac #19425: Order in symbolic ring: error calling operator
{{{ 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 }}} URL: http://trac.sagemath.org/19425 Reported by: dkrenn Ticket author(s): Benjamin Hackl Reviewer(s): Ralf Stephan
2 parents 8f93e71 + 7a2e948 commit 567aaea

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/sage/functions/other.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,39 @@ def _evalf_(self, x, **kwds):
670670

671671
floor = Function_floor()
672672

673+
class Function_Order(GinacFunction):
674+
def __init__(self):
675+
r"""
676+
The order function.
677+
678+
This function gives the order of magnitude of some expression,
679+
similar to `O`-terms.
680+
681+
.. SEEALSO::
682+
683+
:meth:`~sage.symbolic.expression.Expression.Order`,
684+
:mod:`~sage.rings.big_oh`
685+
686+
EXAMPLES::
687+
688+
sage: x = SR('x')
689+
sage: x.Order()
690+
Order(x)
691+
sage: (x^2 + x).Order()
692+
Order(x^2 + x)
693+
694+
TESTS:
695+
696+
Check that :trac:`19425` is resolved::
697+
698+
sage: x.Order().operator()
699+
Order
700+
"""
701+
GinacFunction.__init__(self, "Order", latex_name=r"\mathcal{O}")
702+
703+
Function_Order()
704+
705+
673706
class Function_gamma(GinacFunction):
674707
def __init__(self):
675708
r"""

0 commit comments

Comments
 (0)