Skip to content

SymPy's ceiling() is not translated to Sage #22566

@pelegm

Description

@pelegm
sage: ceil(x)
ceil(x)
sage: _._sympy_()
ceiling(x)
sage: _._sage_()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-9-7149a2430cab> in <module>()
----> 1 _._sage_()

/home/ralf/sage/local/lib/python2.7/site-packages/sympy/core/function.py in _sage_(self)
    705         import sage.all as sage
    706         fname = self.func.__name__
--> 707         func = getattr(sage, fname)
    708         args = [arg._sage_() for arg in self.args]
    709         return func(*args)

AttributeError: 'module' object has no attribute 'ceiling'
sage: 

Previous description was:

sage: integrate(ceil(x), x, 0, infinity, algorithm='sympy')

leads to

Traceback (most recent call last):
  File "<ipython-input-3-257ec54e6dd3>", line 1, in <module>
    integrate(ceil(x), x, Integer(0), infinity, algorithm='sympy')
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sage/misc/functional.py", line 664, in integral
    return x.integral(*args, **kwds)
  File "sage/symbolic/expression.pyx", line 11766, in sage.symbolic.expression.Expression.integral (build/cythonized/sage/symbolic/expression.cpp:65026)
    return integral(self, *args, **kwds)
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 773, in integrate
    return integrator(expression, v, a, b)
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py", line 42, in sympy_integrator
    return result._sage_()
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sympy/integrals/integrals.py", line 1100, in _sage_
    f, limits = self.function._sage_(), list(self.limits)
  File "/home/peleg/sage/local/lib/python2.7/site-packages/sympy/core/function.py", line 707, in _sage_
    func = getattr(sage, fname)
AttributeError: 'module' object has no attribute 'ceiling'

Depends on #23923

Component: calculus

Keywords: ceil, integrate, sympy

Author: Ralf Stephan

Branch/Commit: 319c8b9

Reviewer: Marcelo Forets

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions