port some of the bernoulli number code
use new types for bernoulli iteration code