updated formula for complex log