Skip to content

symbolic floor,ceil,factorial need _evalf_ too #18091

@rwst

Description

@rwst

With

sage: f(x) = floor(x)
sage: g(x) = ceil(x)
sage: h(x) = factorial(x)

any of the following

sage: f(pi)._numerical_approx()
sage: g(pi)._numerical_approx()
sage: h(5)._numerical_approx()

will result in

src/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression._numerical_approx (build/cythonized/sage/symbolic/expression.cpp:27487)()
   4888         # in pynac
   4889         if is_a_numeric(x._gobj):
-> 4890             res = py_object_from_numeric(x._gobj)
   4891         elif  is_a_constant(x._gobj):
   4892             res = x.pyobject()

TypeError: cannot evaluate symbolic expression numerically

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 0db18c4

Reviewer: Volker Braun

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions