def eval(cls, m): if m.is_odd: return S.Zero if m.is_Integer and m.is_nonnegative: from sympy.mpmath import mp m = m._to_mpmath(mp.prec) res = mp.eulernum(m, exact=True) return Integer(res)
def _eval_evalf(self, prec): m = self.args[0] if m.is_Integer and m.is_nonnegative: from sympy.mpmath import mp from sympy import Expr m = m._to_mpmath(prec) with workprec(prec): res = mp.eulernum(m) return Expr._from_mpmath(res, prec)
def eval(cls, m, evaluate=None): if evaluate is None: evaluate = global_evaluate[0] if not evaluate: return if m.is_odd: return S.Zero if m.is_Integer and m.is_nonnegative: from sympy.mpmath import mp m = m._to_mpmath(mp.prec) res = mp.eulernum(m, exact=True) return Integer(res)