[Edu-sig] Bernoulli Numbers (a generator)
kirby.urner at gmail.com
Tue Jul 14 02:28:57 CEST 2009
Just adding to what's on file, not sure this is a "must have" but it's
fun to do, especially given the association of Bernoulli Numbers with
"the first computer program" as scoped out in Ada's notes:
view, Akbar font)
http://www.4dsolutions.net/ocn/python/ada.py (source code)
According to Wikipedia, this is similar to what Knuth recommends i.e.
we're staying with integer operations, although I'm using the Fraction
type to output results (Bernoulli numbers are fractions with lots of
digits once you get into 'em, ideal grist for the mill when learning
about Python generators).
More information about the Edu-sig