alexjbest / cluster-pictures

This package implements the machinery of cluster pictures of Maistret, Morgan, Dokchitser and Dokchitser in Sage.
https://alexjbest.github.io/cluster-pictures/
GNU General Public License v2.0
3 stars 4 forks source link

Some examples used to work with less precision #32

Open alexjbest opened 4 years ago

alexjbest commented 4 years ago

When we did the ICERM demo, this example used to work

from sage_cluster_pictures.cluster_pictures import *
K = Qp(5)
x = polygen(K)
H = HyperellipticCurve((x^2 + 5^2)*(x^2 - 5^15)*(x - 5^6)*(x - 5^6 - 5^9))
R = Cluster.from_curve(H)

now it needs more prec

rbommel commented 4 years ago

Yeah, that does not surprise me. During the Tamagawa tests, I found out that it is really not safe to test for equality in Qp, as the last digits of a root do not have to be correct. So you apply Frobenius to a root, and you get something that is not in the list of roots. To solve this, I changed all equalities into the checks for an error of half the precision. Now it is required the roots to lie at least so far apart from each other. Maybe this is a bit much, and can probably be improved by using ball arithmetic instead of just elements.