Opened 5 years ago

Closed 5 years ago

#18091 closed defect (fixed)

symbolic floor,ceil,factorial need _evalf_ too

Reported by: rws Owned by:
Priority: major Milestone: sage-6.6
Component: symbolics Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: 0db18c4 (Commits) Commit: 0db18c40c3df445028de6c4ec5e80fb5b1706ec1
Dependencies: Stopgaps:

Description

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

Change History (4)

comment:1 Changed 5 years ago by rws

  • Branch set to u/rws/symbolic_floor_ceil_factorial_need__evalf__too

comment:2 Changed 5 years ago by rws

  • Authors set to Ralf Stephan
  • Commit set to 0db18c40c3df445028de6c4ec5e80fb5b1706ec1
  • Status changed from new to needs_review

New commits:

0db18c418091: symbolic floor,ceil,factorial need _evalf_ too

comment:3 Changed 5 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:4 Changed 5 years ago by vbraun

  • Branch changed from u/rws/symbolic_floor_ceil_factorial_need__evalf__too to 0db18c40c3df445028de6c4ec5e80fb5b1706ec1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.