Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def div_interval(x, y):
  2. """Return the interval that contains the quotient of any value in x divided by
  3. any value in y. Division is implemented as the multiplication of x by the
  4. reciprocal of y."""
  5. assert (lower_bound(y) < upper_bound(y) < 0) or (0 < lower_bound(y) < upper_bound(y))
  6. reciprocal_y = interval(1/upper_bound(y), 1/lower_bound(y))
  7. return mul_interval(x, reciprocal_y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement