# HG changeset patch
# User Johan Bosman <johan.g.bosman@gmail.com>
# Date 1322841644 3600
# Node ID d0ad1e2135446e96ac319ccbcc57c2770267506a
# Parent 48f265a4198662ab60132f930b818b65a28089fa
Trac 12105: fix buggy ifstatement
diff git a/sage/rings/real_mpfr.pyx b/sage/rings/real_mpfr.pyx
a

b


4689  4689  [1.0621, 1.0621, 1.0622, 1.0621] 
4690  4690  sage: check(RealField(200)(e), 4) 
4691  4691  [1.2840254166877414840734205680624364583362808652814630892175, 1.2840254166877414840734205680624364583362808652814630892175, 1.2840254166877414840734205680624364583362808652814630892176, 1.2840254166877414840734205680624364583362808652814630892175] 
 4692  
 4693  Check that #12105 is fixed:: 
 4694  
 4695  sage: RealField(53)(0.05).nth_root(7 * 10^8) 
 4696  0.999999995720382 
4692  4697  """ 
4693  4698  if n <= 0: 
4694  4699  raise ValueError, "n must be positive" 
… 
… 

4705  4710  
4706  4711  cdef RealField_class fld = <RealField_class>self._parent 
4707  4712  
4708   if algorithm == 0 and fld.__prec * n < 10000: 
 4713  if algorithm == 0 and n <= 10000 / fld.__prec: 
4709  4714  # This is a rough estimate for when it is probably 
4710  4715  # faster to call mpfr directly. (This is a pretty 
4711  4716  # good estimate on one particular machine, a 