Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Medium
New issue 2418 by asmeurer: Interval.evalf() returns a mpmath interval
http://code.google.com/p/sympy/issues/detail?id=2418
This was originally my idea, but I see now that it was probably a bad one.
We have:
In [1]: Interval(S(1)/2, S(2)/3, True, False)
Out[1]: (1/2, 2/3]
In [2]: Interval(S(1)/2, S(2)/3, True, False).evalf()
Out[2]: [0.5, 0.66666666666666662966]
In [3]: type(Interval(S(1)/2, S(2)/3, True, False).evalf())
Out[3]: <class 'sympy.mpmath.ctx_iv.ivmpf'>
There should be a method to Interval to get a mpmath interval, but evalf()
should not be it. .evalf() should return a sympy type. In this case, it
should just evalf the arguments. Also, notice how we lost the information
about the open left end.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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/sympy-issues?hl=en.