| 3705 | |

| 3706 | def antilogarithm(self, z, prec=53): |

| 3707 | """The rational point (if any) associated to this complex number |

| 3708 | (inverse of elliptic logarithm) |

| 3709 | |

| 3710 | INPUT: |

| 3711 | z -- a complex number representing an element of |

| 3712 | CC/L where L is the period lattice of the elliptic |

| 3713 | curve |

| 3714 | |

| 3715 | OUTPUT: The rational point which is the image of z under |

| 3716 | the Weierstrass parametrization, if it exists and can |

| 3717 | be determined from z with default precision |

| 3718 | |

| 3719 | ALGORITHM: This uses the function ellztopoint from the pari library |

| 3720 | |

| 3721 | WARNING: At present (3.0.4) it is not possible to pass the |

| 3722 | precision parameter to ellztopoint! |

| 3723 | |

| 3724 | EXAMPLES: |

| 3725 | sage: E=EllipticCurve('5077a1') |

| 3726 | sage: Pi=E.gens() |

| 3727 | sage: Pi |

| 3728 | [(-2 : 3 : 1), (-7/4 : 25/8 : 1), (1 : -1 : 1)] |

| 3729 | sage: zi=[P.elliptic_logarithm(100) for P in Pi] |

| 3730 | sage: Qi = [E.antilogarithm(z) for z in zi] |

| 3731 | sage: Pi == Qi |

| 3732 | True |

| 3733 | |

| 3734 | """ |

| 3735 | |

| 3736 | E_pari = self.pari_curve(prec) |

| 3737 | CC = ComplexField(prec) |

| 3738 | try: |

| 3739 | coords = E_pari.ellztopoint(z) |

| 3740 | if len(coords) == 1: |

| 3741 | return self(0) |

| 3742 | return self([CC(xy).real().simplest_rational() for xy in coords]) |

| 3743 | except: |

| 3744 | raise ValueError, "No rational point computable from z" |