Opened 6 years ago
Last modified 5 years ago
#15219 new defect
numerical integral needs an operand for callable symbolic functions
Reported by: | kcrisman | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.4 |
Component: | calculus | Keywords: | |
Cc: | eviatarbach | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
I feel like I've seen this before, so close if appropriate... See this ask.sagemath question.
sage: h(x) = x sage: numerical_integral(h, 1, 2) --------------------------------------------------------------------------- /Users/.../sage-5.11.rc0/local/lib/python2.7/site-packages/sage/symbolic/expression_conversions.pyc in fast_float(ex, *vars) 1264 1.4142135623730951 1265 """ -> 1266 return FastFloatConverter(ex, *vars)() 1267 1268 ################# /Users/.../sage-5.11.rc0/local/lib/python2.7/site-packages/sage/symbolic/expression_conversions.pyc in __call__(self, ex) 206 operator = ex.operator() 207 if operator is None: --> 208 return self.symbol(ex) 209 210 if operator in arithmetic_operators: /Users/.../sage-5.11.rc0/local/lib/python2.7/site-packages/sage/symbolic/expression_conversions.pyc in symbol(self, ex) 1182 return self.ff.fast_float_constant(float(ex)) 1183 except TypeError: -> 1184 raise ValueError, "free variable: %s" % repr(ex) 1185 1186 def arithmetic(self, ex, operator): ValueError: free variable: x |--> x
but
sage: numerical_integral(x, 1, 2) (1.5, 1.6653345369377348e-14)
I think this should be easy to fix by catching this somehow.
Change History (6)
comment:1 Changed 6 years ago by
comment:2 Changed 6 years ago by
- Description modified (diff)
$ hg log -r 12287 changeset: 12287:d7533ae4895e user: Mike Hansen <mhansen@gmail.com> date: Tue May 19 16:11:30 2009 -0700 summary: Updates for Pynac-0.1.7, main symbolics switch (#5930)
So apparently it's been here for a while.
comment:3 Changed 6 years ago by
- Cc eviatarbach added
comment:4 Changed 5 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:5 Changed 5 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:6 Changed 5 years ago by
- Milestone changed from sage-6.3 to sage-6.4
Note: See
TracTickets for help on using
tickets.
Here's the relevant code.
Note that this case is supposedly already taken care of! But apparently in this case
name
is not insvars
. I'll investigate...