@@ -218,9 +218,9 @@ def __init__(self, E, embedding=None):
218218
219219 sage: E = EllipticCurve(QQ[I], [5, -3*I])
220220 sage: L = PeriodLattice_ell(E, embedding=None)
221- sage: L.elliptic_logarithm(E(I+1, I+2))
221+ sage: L.elliptic_logarithm(E(I+1, I+2)) # abs tol 1e-15
222222 -0.773376784700140 - 0.177736018028666*I
223- sage: L.elliptic_exponential(_)
223+ sage: L.elliptic_exponential(_) # abs tol 1e-15
224224 (1.00000000000000 - 1.00000000000000*I : 2.00000000000000 - 1.00000000000000*I : 1.00000000000000)
225225 """
226226 # First we cache the elliptic curve with this period lattice:
@@ -385,8 +385,8 @@ def __call__(self, P, prec=None):
385385 sage: P = E([-1,1])
386386 sage: P.is_on_identity_component ()
387387 False
388- sage: L(P, prec=96)
389- 0.4793482501902193161295330101 + 0.985868850775824102211203849... *I
388+ sage: L(P, prec=96) # abs tol 1e-27
389+ 0.4793482501902193161295330101 + 0.985868850775824102211203849*I
390390 sage: Q = E([3,5])
391391 sage: Q.is_on_identity_component()
392392 True
@@ -1237,14 +1237,14 @@ def coordinates(self, z, rounding=None):
12371237 sage: L = E.period_lattice()
12381238 sage: w1, w2 = L.basis(prec=100)
12391239 sage: P = E([-1,1])
1240- sage: zP = P.elliptic_logarithm(precision=100); zP
1240+ sage: zP = P.elliptic_logarithm(precision=100); zP # abs tol 1e-28
12411241 0.47934825019021931612953301006 + 0.98586885077582410221120384908*I
1242- sage: L.coordinates(zP)
1242+ sage: L.coordinates(zP) # abs tol 1e-28
12431243 (0.19249290511394227352563996419, 0.50000000000000000000000000000)
1244- sage: sum([x*w for x, w in zip(L.coordinates(zP), L.basis(prec=100))])
1244+ sage: sum([x*w for x, w in zip(L.coordinates(zP), L.basis(prec=100))]) # abs tol 1e-28
12451245 0.47934825019021931612953301006 + 0.98586885077582410221120384908*I
12461246
1247- sage: L.coordinates(12*w1 + 23*w2)
1247+ sage: L.coordinates(12*w1 + 23*w2) # abs tol 1e-28
12481248 (12.000000000000000000000000000, 23.000000000000000000000000000)
12491249 sage: L.coordinates(12*w1 + 23*w2, rounding='floor')
12501250 (11, 22)
@@ -1302,17 +1302,17 @@ def reduce(self, z):
13021302 sage: L = E.period_lattice()
13031303 sage: w1, w2 = L.basis(prec=100)
13041304 sage: P = E([-1,1])
1305- sage: zP = P.elliptic_logarithm(precision=100); zP
1305+ sage: zP = P.elliptic_logarithm(precision=100); zP # abs tol 1e-28
13061306 0.47934825019021931612953301006 + 0.98586885077582410221120384908*I
1307- sage: z = zP + 10*w1 - 20*w2; z
1307+ sage: z = zP + 10*w1 - 20*w2; z # abs tol 1e-28
13081308 25.381473858740770069343110929 - 38.448885180257139986236950114*I
1309- sage: L.reduce(z)
1309+ sage: L.reduce(z) # abs tol 1e-28
13101310 0.47934825019021931612953301006 + 0.98586885077582410221120384908*I
1311- sage: L.elliptic_logarithm(2*P)
1311+ sage: L.elliptic_logarithm(2*P) # abs tol 1e-15
13121312 0.958696500380439
1313- sage: L.reduce(L.elliptic_logarithm(2*P))
1313+ sage: L.reduce(L.elliptic_logarithm(2*P)) # abs tol 1e-15
13141314 0.958696500380439
1315- sage: L.reduce(L.elliptic_logarithm(2*P) + 10*w1 - 20*w2)
1315+ sage: L.reduce(L.elliptic_logarithm(2*P) + 10*w1 - 20*w2) # abs tol 1e-15
13161316 0.958696500380444
13171317 """
13181318 C = z .parent ()
@@ -1392,12 +1392,12 @@ def e_log_RC(self, xP, yP, prec=None, reduce=True):
13921392
13931393 The elliptic log from the real coordinates::
13941394
1395- sage: L.e_log_RC(xP, yP)
1395+ sage: L.e_log_RC(xP, yP) # abs tol 1e-15
13961396 0.479348250190219 + 0.985868850775824*I
13971397
13981398 The same elliptic log from the algebraic point::
13991399
1400- sage: L(P)
1400+ sage: L(P) # abs tol 1e-15
14011401 0.479348250190219 + 0.985868850775824*I
14021402
14031403 A number field example::
@@ -1409,10 +1409,10 @@ def e_log_RC(self, xP, yP, prec=None, reduce=True):
14091409 sage: v = K.real_places()[0]
14101410 sage: L = E.period_lattice(v)
14111411 sage: P = E.lift_x(1/3*a^2 + a + 5/3)
1412- sage: L(P)
1412+ sage: L(P) # abs tol 1e-15
14131413 3.51086196882538
14141414 sage: xP, yP = [v(c) for c in P.xy()]
1415- sage: L.e_log_RC(xP, yP)
1415+ sage: L.e_log_RC(xP, yP) # abs tol 1e-15
14161416 3.51086196882538
14171417
14181418 Elliptic logs of real points which do not come from algebraic
@@ -1422,11 +1422,11 @@ def e_log_RC(self, xP, yP, prec=None, reduce=True):
14221422 sage: ER = EllipticCurve([v(ai) for ai in E.a_invariants()])
14231423 sage: P = ER.lift_x(12.34)
14241424 sage: xP, yP = P.xy()
1425- sage: xP, yP
1425+ sage: xP, yP # abs tol 1e-15
14261426 (12.3400000000000, -43.3628968710567)
1427- sage: L.e_log_RC(xP, yP)
1427+ sage: L.e_log_RC(xP, yP) # abs tol 1e-15
14281428 0.284656841192041
1429- sage: xP, yP = ER.lift_x(0).xy()
1429+ sage: xP, yP = ER.lift_x(0).xy() # abs tol 1e-15
14301430 sage: L.e_log_RC(xP, yP)
14311431 1.34921304541057
14321432
@@ -1436,14 +1436,14 @@ def e_log_RC(self, xP, yP, prec=None, reduce=True):
14361436 sage: v = K.complex_embeddings()[0]
14371437 sage: L = E.period_lattice(v)
14381438 sage: P = E.lift_x(1/3*a^2 + a + 5/3)
1439- sage: L(P)
1439+ sage: L(P) # abs tol 1e-15
14401440 1.68207104397706 - 1.87873661686704*I
14411441 sage: xP, yP = [v(c) for c in P.xy()]
1442- sage: L.e_log_RC(xP, yP)
1442+ sage: L.e_log_RC(xP, yP) # abs tol 1e-15
14431443 1.68207104397706 - 1.87873661686704*I
14441444 sage: EC = EllipticCurve([v(ai) for ai in E.a_invariants()])
14451445 sage: xP, yP = EC.lift_x(0).xy()
1446- sage: L.e_log_RC(xP, yP)
1446+ sage: L.e_log_RC(xP, yP) # abs tol 1e-15
14471447 2.06711431204080 - 1.73451485683471*I
14481448 """
14491449 if prec is None :
@@ -1743,11 +1743,11 @@ def elliptic_logarithm(self, P, prec=None, reduce=True):
17431743 sage: P = E.lift_x(3)
17441744 sage: L.elliptic_logarithm(P)
17451745 -1.97657221097437 - 1.05021415535949*I
1746- sage: L.elliptic_exponential(_)
1746+ sage: L.elliptic_exponential(_) # abs tol 1e-15
17471747 (3.00000000000000 + 9.20856947066460e-16*I : -5.59022723358798 - 0.0894418024719718*I : 1.00000000000000)
1748- sage: L.elliptic_logarithm(P, prec=100)
1748+ sage: L.elliptic_logarithm(P, prec=100) # abs tol 1e-15
17491749 -3.4730631218714889933426781799 + 0.44627675553762761312098773197*I
1750- sage: L.elliptic_exponential(_)
1750+ sage: L.elliptic_exponential(_) # abs tol 1e-28
17511751 (3.0000000000000000000000000000 - 1.4773628579202938936348512161e-30*I : -5.5902272335879800026836302686 - 0.089441802471969391005702381090*I : 1.0000000000000000000000000000)
17521752
17531753 Real approximate field, negative discriminant. Note that the output precision uses the precision of the base field::
@@ -1902,8 +1902,8 @@ def elliptic_exponential(self, z, to_curve=True):
19021902 sage: E = EllipticCurve('37a')
19031903 sage: K.<a> = QuadraticField(-5)
19041904 sage: L = E.change_ring(K).period_lattice(K.places()[0])
1905- sage: L.elliptic_exponential(CDF(.1,.1))
1906- (0.0000142854026029... - 49.9960001066650*I
1905+ sage: L.elliptic_exponential(CDF(.1,.1)) # abs tol 1e-15
1906+ (0.0000142854026029 - 49.9960001066650*I
19071907 : 249.520141250950 + 250.019855549131*I : 1.00000000000000)
19081908 sage: L.elliptic_exponential(CDF(.1,.1), to_curve=False)
19091909 (0.0000142854026029447 - 49.9960001066650*I,
0 commit comments