#12238: a bug in taking n() of a definite integral
------------------------+---------------------------------------------------
Reporter: dimpase | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-4.8
Component: calculus | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
the following triggers a bug in Sage interface, apparently
{{{
sage: integrate(sin(x)*(x^(1/2)),x,0,1).n()
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1111, 0))
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/usr/local/src/sage/sage-4.8.alpha4/spkg/standard/<ipython console> in
<module>()
/usr/local/src/sage/sage-4.8.alpha4/local/lib/python2.6/site-
packages/sage/symbolic/expression.so in
sage.symbolic.expression.Expression._numerical_approx
(sage/symbolic/expression.cpp:18004)()
/usr/local/src/sage/sage-4.8.alpha4/local/lib/python2.6/site-
packages/sage/symbolic/expression.so in
sage.symbolic.expression.Expression._convert
(sage/symbolic/expression.cpp:5089)()
/usr/local/src/sage/sage-4.8.alpha4/local/lib/python2.6/site-
packages/sage/functions/other.pyc in _evalf_(self, x, parent)
79 if prec > 53:
80 raise NotImplementedError, "erf not implemented for
precision higher than 53"
---> 81 return parent(1 - pari(float(x)).erfc())
82
83 def _derivative_(self, x, diff_param=None):
/usr/local/src/sage/sage-4.8.alpha4/local/lib/python2.6/site-
packages/sage/rings/complex_number.so in
sage.rings.complex_number.ComplexNumber.__float__
(sage/rings/complex_number.c:7501)()
TypeError: Unable to convert -0.707106781186547 + 0.707106781186547*I to
float; use abs() or real_part() as desired
}}}
a comment on IRC:
{{{
vbraun: should be return parent(1 - pari(x).erfc())
vbraun: I guess
vbraun: or maybe cast to complex
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12238>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.