Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def div_interval(x, y):
- """Return the interval that contains the quotient of any value in x divided by
- any value in y. Division is implemented as the multiplication of x by the
- reciprocal of y."""
- assert (lower_bound(y) < upper_bound(y) < 0) or (0 < lower_bound(y) < upper_bound(y))
- reciprocal_y = interval(1/upper_bound(y), 1/lower_bound(y))
- return mul_interval(x, reciprocal_y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement