summarylogtreecommitdiffstats
path: root/sagemath-pari-2.11.3.patch
blob: 7cb469d255a937fc3d9c89a60008358e2969a459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
diff --git a/src/sage/lfunctions/dokchitser.py b/src/sage/lfunctions/dokchitser.py
index 680ac17..1bf8953 100644
--- a/src/sage/lfunctions/dokchitser.py
+++ b/src/sage/lfunctions/dokchitser.py
@@ -111,7 +111,7 @@ class Dokchitser(SageObject):
         0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4)
         sage: L.check_functional_equation()
         6.11218974700000e-18                            # 32-bit
-        6.04442711160669e-18                            # 64-bit
+        6.11218974738703e-18                            # 64-bit
 
     RANK 2 ELLIPTIC CURVE:
 
@@ -670,7 +670,7 @@ class Dokchitser(SageObject):
             sage: L = Dokchitser(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], init='1')
             sage: L.check_functional_equation()
             -1.35525271600000e-20                        # 32-bit
-            -2.71050543121376e-20                        # 64-bit
+            -1.35525271560688e-20                        # 64-bit
 
         If we choose the sign in functional equation for the
         `\zeta` function incorrectly, the functional equation
diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py
index c60f944..1daa219 100644
--- a/src/sage/lfunctions/pari.py
+++ b/src/sage/lfunctions/pari.py
@@ -423,7 +423,7 @@ class LFunction(SageObject):
         sage: L.taylor_series(1,4)
         0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4)
         sage: L.check_functional_equation()
-        1.08420217248550e-19
+        4.33680868994202e-19
 
     .. RUBRIC:: Rank 2 elliptic curve
 
diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py
index 2732f22..6c2a453 100644
--- a/src/sage/rings/number_field/number_field.py
+++ b/src/sage/rings/number_field/number_field.py
@@ -3433,18 +3433,18 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
             Fractional ideal (2, 1/2*a - 1/2)
             Fractional ideal (2, 1/2*a + 1/2)
             3
-            Fractional ideal (3, 1/2*a - 1/2)
             Fractional ideal (3, 1/2*a + 1/2)
+            Fractional ideal (3, 1/2*a - 1/2)
             4
             Fractional ideal (4, 1/2*a + 3/2)
             Fractional ideal (2)
             Fractional ideal (4, 1/2*a + 5/2)
             5
             6
-            Fractional ideal (1/2*a - 1/2)
-            Fractional ideal (6, 1/2*a + 5/2)
             Fractional ideal (6, 1/2*a + 7/2)
             Fractional ideal (1/2*a + 1/2)
+            Fractional ideal (1/2*a - 1/2)
+            Fractional ideal (6, 1/2*a + 5/2)
             7
             8
             Fractional ideal (1/2*a + 3/2)
@@ -3452,9 +3452,9 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
             Fractional ideal (4, a + 1)
             Fractional ideal (1/2*a - 3/2)
             9
-            Fractional ideal (9, 1/2*a + 11/2)
-            Fractional ideal (3)
             Fractional ideal (9, 1/2*a + 7/2)
+            Fractional ideal (3)
+            Fractional ideal (9, 1/2*a + 11/2)
             10
         """
         hnf_ideals = self.pari_nf().ideallist(bound)
@@ -4550,7 +4550,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
               -1/13*a^2 + 6/13*a + 345/13,
               -1,
               2/13*a^2 + 1/13*a - 755/13,
-              1/13*a^2 - 19/13*a - 7/13],
+              1/13*a^2 + 20/13*a - 7/13],
              [(Fractional ideal (11, a - 2), 2), (Fractional ideal (19, a + 7), 2)])
 
         Number fields defined by non-monic and non-integral
@@ -4708,9 +4708,9 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
              -1/13*a^2 + 6/13*a + 345/13,
              -1,
              2/13*a^2 + 1/13*a - 755/13,
-             1/13*a^2 - 19/13*a - 7/13,
-             -1/13*a^2 + 45/13*a - 97/13,
-             2/13*a^2 + 40/13*a - 27/13]
+             1/13*a^2 + 20/13*a - 7/13,
+             1/13*a^2 - 45/13*a + 97/13,
+             -2/13*a^2 - 40/13*a + 27/13]
 
         Verify that :trac:`16708` is fixed::
 
@@ -5355,7 +5355,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
 
             sage: K.<a> = NumberField(7/9*x^3 + 7/3*x^2 - 56*x + 123)
             sage: K.elements_of_norm(7)
-            [7/225*a^2 - 7/75*a - 42/25]
+            [28/225*a^2 + 77/75*a - 133/25]
         """
         proof = proof_flag(proof)
         B = self.pari_bnf(proof).bnfisintnorm(n)
@@ -5458,7 +5458,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
             sage: pari('setrand(2)')
             sage: L.<b> = K.extension(x^2 - 7)
             sage: f = L.factor(a + 1); f
-            (Fractional ideal (1/2*a*b - a + 1/2)) * (Fractional ideal (-1/2*a*b - a + 1/2))
+            (Fractional ideal (-1/2*b + 1/2*a + 1)) * (Fractional ideal (-1/2*a*b - a + 1/2))
             sage: f.value() == a+1
             True
 
@@ -6535,7 +6535,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
             sage: [K.uniformizer(P) for P,e in factor(K.ideal(5))]
             [t^2 - t + 1, t + 2, t - 2]
             sage: [K.uniformizer(P) for P,e in factor(K.ideal(7))]
-            [t^2 + 3*t + 1]
+            [t^2 - 4*t + 1]
             sage: [K.uniformizer(P) for P,e in factor(K.ideal(67))]
             [t + 23, t + 26, t - 32, t - 18]
 
@@ -7805,11 +7805,11 @@ class NumberField_absolute(NumberField_generic):
              Ring morphism:
                From: Number Field in a1 with defining polynomial x^3 - 7*x - 7
                To:   Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123
-               Defn: a1 |--> 7/225*a^2 - 7/75*a - 42/25,
+               Defn: a1 |--> 28/225*a^2 + 77/75*a - 133/25,
              Ring morphism:
                From: Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123
                To:   Number Field in a1 with defining polynomial x^3 - 7*x - 7
-               Defn: a |--> -15/7*a1^2 + 9)
+               Defn: a |--> -60/7*a1^2 + 15*a1 + 39)
         """
         if name is None:
             name = self.variable_names()
diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx
index 59bab07..079eaaa 100644
--- a/src/sage/rings/number_field/number_field_element.pyx
+++ b/src/sage/rings/number_field/number_field_element.pyx
@@ -1733,7 +1733,7 @@ cdef class NumberFieldElement(FieldElement):
             sage: P.<X> = K[]
             sage: L = NumberField(X^2 + a^2 + 2*a + 1, 'b')
             sage: K(17)._rnfisnorm(L)
-            ((a^2 - 2)*b - 4, 1)
+            ((a^2 - 2)*b + 4, 1)
 
             sage: K.<a> = NumberField(x^3 + x + 1)
             sage: Q.<X> = K[]
diff --git a/src/sage/rings/number_field/number_field_ideal.py b/src/sage/rings/number_field/number_field_ideal.py
index b4eabe8..d746dcb 100644
--- a/src/sage/rings/number_field/number_field_ideal.py
+++ b/src/sage/rings/number_field/number_field_ideal.py
@@ -1827,7 +1827,7 @@ class NumberFieldFractionalIdeal(MultiplicativeGroupElement, NumberFieldIdeal):
 
             sage: F.<a> = NumberField(2*x^3 + x + 1)
             sage: fact = F.factor(2); fact
-            (Fractional ideal (2*a^2 + 1))^2 * (Fractional ideal (-2*a^2))
+            (Fractional ideal (-2*a^2 - 1))^2 * (Fractional ideal (2*a^2))
             sage: [p[0].norm() for p in fact]
             [2, 2]
         """
@@ -2418,7 +2418,7 @@ class NumberFieldFractionalIdeal(MultiplicativeGroupElement, NumberFieldIdeal):
             sage: A.is_coprime(B)
             False
             sage: lam = A.idealcoprime(B); lam
-            -1/6*a + 1/6
+            1/6*a - 1/6
             sage: (lam*A).is_coprime(B)
             True
 
diff --git a/src/sage/rings/number_field/unit_group.py b/src/sage/rings/number_field/unit_group.py
index 6ed0aea..529e23a 100644
--- a/src/sage/rings/number_field/unit_group.py
+++ b/src/sage/rings/number_field/unit_group.py
@@ -279,7 +279,7 @@ class UnitGroup(AbelianGroupWithValues_class):
             sage: K.unit_group()
             Unit group with structure C2 x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123
             sage: UnitGroup(K, S=tuple(K.primes_above(7)))
-            S-unit group with structure C2 x Z x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 with S = (Fractional ideal (7/225*a^2 - 7/75*a - 42/25),)
+            S-unit group with structure C2 x Z x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 with S = (Fractional ideal (28/225*a^2 + 77/75*a - 133/25),)
 
         Conversion from unit group to a number field and back
         gives the right results (:trac:`25874`)::
diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py
index 1e2052c..2c05db9 100644
--- a/src/sage/rings/polynomial/polynomial_quotient_ring.py
+++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py
@@ -1293,9 +1293,9 @@ class PolynomialQuotientRing_generic(CommutativeRing):
                1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8),
               6),
              ((-5/4*xbar^2 - 115/4,
-               1/4*a*xbar^2 + 23/4*a,
-               -1/16*xbar^3 - 7/16*xbar^2 - 23/16*xbar - 161/16,
-               1/16*a*xbar^3 - 1/16*a*xbar^2 + 23/16*a*xbar - 23/16*a),
+               (1/8*a - 5/8)*xbar^2 + 23/8*a - 115/8,
+               -1/16*xbar^3 - 17/16*xbar^2 - 23/16*xbar - 391/16,
+               1/16*a*xbar^3 + (-1/16*a - 5/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 115/8),
               2)]
 
         By using the ideal `(a)`, we cut the part of the class group coming from
@@ -1425,9 +1425,9 @@ class PolynomialQuotientRing_generic(CommutativeRing):
                1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8),
               6),
              ((-5/4*xbar^2 - 115/4,
-               1/4*a*xbar^2 + 23/4*a,
-               -1/16*xbar^3 - 7/16*xbar^2 - 23/16*xbar - 161/16,
-               1/16*a*xbar^3 - 1/16*a*xbar^2 + 23/16*a*xbar - 23/16*a),
+               (1/8*a - 5/8)*xbar^2 + 23/8*a - 115/8,
+               -1/16*xbar^3 - 17/16*xbar^2 - 23/16*xbar - 391/16,
+               1/16*a*xbar^3 + (-1/16*a - 5/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 115/8),
               2)]
 
         Note that all the returned values live where we expect them to::
diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py
index 2967f08..300278b 100644
--- a/src/sage/schemes/elliptic_curves/ell_number_field.py
+++ b/src/sage/schemes/elliptic_curves/ell_number_field.py
@@ -302,7 +302,8 @@ class EllipticCurve_number_field(EllipticCurve_field):
             (3,
              3,
              [(0 : 0 : 1),
-              (-1/2*zeta43_0^2 - 1/2*zeta43_0 + 7 : -3/2*zeta43_0^2 - 5/2*zeta43_0 + 18 : 1)])
+              (-1/2*zeta43_0^2 - 1/2*zeta43_0 + 7 : -3/2*zeta43_0^2 - 5/2*zeta43_0 + 18 : 1),
+              (5/8*zeta43_0^2 + 17/8*zeta43_0 - 9/4 : -27/16*zeta43_0^2 - 103/16*zeta43_0 + 39/8 : 1)])
         """
         verbose = int(verbose)
         if known_points is None:
@@ -810,7 +811,7 @@ class EllipticCurve_number_field(EllipticCurve_field):
             sage: K.<v> = NumberField(x^2 + 161*x - 150)
             sage: E = EllipticCurve([25105/216*v - 3839/36, 634768555/7776*v - 98002625/1296, 634768555/7776*v - 98002625/1296, 0, 0])
             sage: E.global_integral_model()
-            Elliptic Curve defined by y^2 + (2094779518028859*v-1940492905300351)*x*y + (477997268472544193101178234454165304071127500*v-442791377441346852919930773849502871958097500)*y = x^3 + (26519784690047674853185542622500*v-24566525306469707225840460652500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150
+            Elliptic Curve defined by y^2 + (33872485050625*v-31078224284250)*x*y + (2020602604156076340058146664245468750000*v-1871778534673615560803175189398437500000)*y = x^3 + (6933305282258321342920781250*v-6422644400723486559914062500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150
 
         :trac:`14476`::
 
@@ -923,10 +924,10 @@ class EllipticCurve_number_field(EllipticCurve_field):
            sage: E1 = E.scale_curve(u^5)
            sage: E1.ainvs()
            (0,
-           0,
-           0,
-           28087920796764302856*a + 88821804456186580548,
-           -77225139016967233228487820912*a - 244207331916752959911655344864)
+            0,
+            0,
+            193309837823322216*a - 611299381639464252,
+            -3379649566176127326923323632*a + 10687390322316522207588229536)
            sage: E1._scale_by_units().ainvs()
            (0, 0, 0, 4536*a + 14148, -163728*a - 474336)