implement the bitfunc integral function recursively