Kappa lambda computations

The kappa lambda computations were difficult to get right, partly because of python integral rounding, of exact vs approximate computations etc
All these are now centralized, in the hope that we can optimize them in one place. All the tests pass. Some attention to the imports in Lfunction_base would be warranted