Opened 9 years ago
Closed 9 years ago
#12238 closed defect (duplicate)
a bug in taking n() of a definite integral
Reported by: | dimpase | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | calculus | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | Volker Braun | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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
See #11948 instead.
Change History (4)
comment:1 Changed 9 years ago by
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
- Status changed from needs_review to positive_review
comment:3 Changed 9 years ago by
- Reviewers set to Volker Braun
comment:4 Changed 9 years ago by
- Description modified (diff)
- Milestone changed from sage-4.8 to sage-duplicate/invalid/wontfix
- Resolution set to duplicate
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Duplicate of #12237