Issue 218 in mpmath: Interval arithmetic: incorrect results for min and max

3 views
Skip to first unread message

mpm...@googlecode.com

unread,
Jan 28, 2012, 5:28:18 PM1/28/12
to mpmath...@googlegroups.com
Status: New
Owner: ----

New issue 218 by brookes....@gmail.com: Interval arithmetic: incorrect
results for min and max
http://code.google.com/p/mpmath/issues/detail?id=218

Consider the following operation:

a = iv.mpf([0,1])
b = 0.5

min(a,b)

Mpmath returns the range [0,1] though there is no posible value of a that
can give a result greater than 0.5

The correct response is [0,0.5]


mpm...@googlecode.com

unread,
Jan 28, 2012, 10:03:24 PM1/28/12
to mpmath...@googlegroups.com

Comment #1 on issue 218 by fredrik....@gmail.com: Interval arithmetic:

This behavior is impossible to change since min is a Python function
implemented in terms of comparison operators.

We could perhaps add new interval min/max functions to mpmath that behave
this way?

Reply all
Reply to author
Forward
0 new messages