private static double DeltaFunction(double a, double b) { // what base should I use for the log? return Math.Log(b * (1 - a) / ((1 - b) * a)); }