diff --git a/src/sage/rings/continued_fraction.py b/src/sage/rings/continued_fraction.py index cf5f8b1f9eb..ce55ac87867 100644 --- a/src/sage/rings/continued_fraction.py +++ b/src/sage/rings/continued_fraction.py @@ -268,6 +268,8 @@ def rat_interval_cf_list(r1, r2): ....: x = R.random_element() * R.random_element() + R.random_element() / 100 ....: l = x.lower().exact_rational() ....: u = x.upper().exact_rational() + ....: if l.floor() != u.floor(): + ....: continue ....: cf = rat_interval_cf_list(l,u) ....: a = continued_fraction(cf).value() ....: b = continued_fraction(cf+[1]).value()