def __call__(self, r, base_at_infinity=True): r""" Evaluates the modular symbol at {0,`r`} or {oo,`r`}. EXAMPLES:: sage: m = EllipticCurve('11a1').modular_symbol(implementation="eclib") sage: m(0) 1/5 """ from sage.rings.rational import Rational if r != oo: r = Rational(r) r = r.numer() % r.denom() / r.denom() return self._modsym(r, sign=self._sign, base_at_infinity=base_at_infinity) * self._scaling
def __call__(self, r): r""" Evaluates the modular symbol at `r`. EXAMPLES:: sage: m = EllipticCurve('11a1').modular_symbol(use_eclib=True) sage: m(0) 1/5 """ # this computes {0,oo} - {0,r} = {r,oo} from sage.rings.rational import Rational if r != oo: r = Rational(r) r = r.numer() % r.denom() / r.denom() return (self._atzero - self._modsym(r)) * self._scaling
def __call__(self, r): r""" Evaluates the modular symbol at `r`. EXAMPLES:: sage: m = EllipticCurve('11a1').modular_symbol(implementation="eclib") sage: m(0) 1/5 """ # this computes {0,oo} - {0,r} = {r,oo} from sage.rings.rational import Rational if r != oo: r = Rational(r) r = r.numer() % r.denom() / r.denom() return (self._atzero - self._modsym(r))*self._scaling