File:  [CENS] / python / pyGiNaC / examples / EulerNumber.py
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon Nov 26 22:37:44 2001 UTC (16 years ago) by pearu
Branches: MAIN
CVS tags: HEAD
See NEWS.txt (impl. matrix)

#/usr/bin/env python

from ginac import *

def EulerNumber(n):
    x = symbol('x')
    generator = 1/cosh(x)
    return generator.diff(x,n).subs(x==0)

for n in range (0,51,2):
    print 'EulerNumber(%d) = %s'%(n,EulerNumber(n))

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>