# Ticket #4611: 4611

File 4611, 2.5 KB (added by roed, 12 years ago)
Line
1* * *
2* * *
3
4diff -r 9ca650e6e2a5 sage/rings/integer.pyx
5--- a/sage/rings/integer.pyx    Thu Jan 22 01:03:06 2009 -0800
6+++ b/sage/rings/integer.pyx    Thu Jan 22 03:34:42 2009 -0800
7@@ -3410,12 +3410,15 @@ cdef class Integer(sage.structure.elemen
8         """
9         EXAMPLES:
10             sage: 5.sqrt_approx(prec=200)
11+            doctest:1172: DeprecationWarning: This function is deprecated.  Use sqrt with a given number of bits of precision instead.
12             2.2360679774997896964091736687312762354406183596115257242709
13             sage: 5.sqrt_approx()
14             2.23606797749979
15             sage: 4.sqrt_approx()
16             2
17         """
18+        from sage.misc.misc import deprecation
19+        deprecation("This function is deprecated.  Use sqrt with a given number of bits of precision instead.")
20         try:
21             return self.sqrt(extend=False,all=all)
22         except ValueError:
23diff -r 9ca650e6e2a5 sage/rings/polynomial/polynomial_gf2x.pyx
24--- a/sage/rings/polynomial/polynomial_gf2x.pyx Thu Jan 22 01:03:06 2009 -0800
25+++ b/sage/rings/polynomial/polynomial_gf2x.pyx Thu Jan 22 03:34:42 2009 -0800
26@@ -131,7 +131,7 @@ cdef class Polynomial_GF2X(Polynomial_te
27
28         n = h.degree()
29
30-        k = ceil(Integer(n+1).sqrt_approx())
31+        k = ceil(Integer(n+1).sqrt(prec=Integer(n).log(2,prec=30)+1))
32         l = ceil((self.degree() + 1) / k)
33
34         # we store all matrices transposed for performance reasons
35diff -r 9ca650e6e2a5 sage/rings/rational.pyx
36--- a/sage/rings/rational.pyx   Thu Jan 22 01:03:06 2009 -0800
37+++ b/sage/rings/rational.pyx   Thu Jan 22 03:34:42 2009 -0800
38@@ -732,14 +732,17 @@ cdef class Rational(sage.structure.eleme
39
40         EXAMPLES:
41             sage: (5/3).sqrt_approx()
42+            doctest:1172: DeprecationWarning: This function is deprecated.  Use sqrt with a given number of bits of precision instead.
43             1.29099444873581
44             sage: (990829038092384908234098239048230984/4).sqrt_approx()
45             4.9770197862083713747374920870362581922510725585130996993055116540856385e17
46             sage: (5/3).sqrt_approx(prec=200)
47             1.2909944487358056283930884665941332036109739017638636088625
48-            sage: (9/4).sqrt_approx()
49+            sage: (9/4).sqrt_approx()
50             3/2
51         """
52+        from sage.misc.misc import deprecation
53+        deprecation("This function is deprecated.  Use sqrt with a given number of bits of precision instead.")
54         try:
55             return self.sqrt(extend=False,all=all)
56         except ValueError: