Opened 11 years ago
Last modified 11 years ago
#11885 closed defect
call function in sage.libs.mpmath.utils doesn't handle parent=parent(float) — at Version 1
Reported by: | benjaminfjones | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-4.8 |
Component: | symbolics | Keywords: | mpmath call parent precision |
Cc: | burcin | Merged in: | |
Authors: | Benjamin Jones | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
In multiple places in the Sage library the function sage.libs.mpmath.utils.call
is called and inputs are passed along with their parents. If the parent of the input doesn't have a prec
method, an AttributeError
is raised:
sage: import sage.libs.mpmath.all as a sage: z = float(4) sage: a.call(a.e1, z) 0.00377935240984891 sage: a.call(a.e1, z, parent=parent(z)) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /Users/jonesbe/sage/sage-4.7.2.alpha2/devel/sage-test/sage/<ipython console> in <module>() /Users/jonesbe/sage/latest/local/lib/python2.6/site-packages/sage/libs/mpmath/utils.so in sage.libs.mpmath.utils.call (sage/libs/mpmath/utils.c:5277)() AttributeError: type object 'float' has no attribute 'prec'
This can be fixed with a simple check in in the call
code in sage/libs/mpmath/utils.pyx
.
Apply trac_11885.patch to the Sage library.
Change History (2)
Changed 11 years ago by
comment:1 Changed 11 years ago by
- Description modified (diff)
- Keywords precision added
- Status changed from new to needs_review
Note: See
TracTickets for help on using
tickets.
adds check that parent has attribute 'prec' before calling