Code: Alles auswählen
In [488]: (851361202**2 - 1) % 61
Out[488]: 0L
In [489]: (851361202**2 - 1) / 61
Out[489]: 11882227807719423L
In [490]: math.sqrt((851361202**2 - 1) / 61)
Out[490]: 109005632.0
In [491]: decimal.Decimal((851361202**2 - 1) / 61).sqrt()
Out[491]: Decimal('109005631.9999999954130810415')
In [492]: int(_490)**2
Out[492]: 11882227807719424L
In [493]: int(_490)**2 == _489
Out[493]: False
Nachtrag: Mir fiel gerade auf, dass hier schon die Umwandlung in `float()` das Problem ist:
Code: Alles auswählen
In [499]: (851361202 ** 2 - 1) / 61
Out[499]: 11882227807719423L
In [500]: float((851361202 ** 2 - 1) / 61)
Out[500]: 11882227807719424.0
In [501]: _499 == _500
Out[501]: False