def _compute_tauk(n, k, maxit=5):
 a = ((n % 2) - 0.5)
 c = (((((4.0 * floor((n / 2.0))) - (4.0 * k)) + 3.0) * pi) / (((4.0 * floor((n / 2.0))) + (2.0 * a)) + 2.0))
 f = (lambda x: ((x - sin(x)) - c))
 df = (lambda x: (1.0 - cos(x)))
 xi = (0.5 * pi)
 for i in range(maxit):
  xi = (xi - (f(xi) / df(xi)))
 return xi

def _compute_tauk ( n , k , maxit = 5 ) : a = ( ( n % 2 ) - 0.5 ) c = ( ( ( ( ( 4.0 * floor ( ( n / 2.0 ) ) ) - ( 4.0 * k ) ) + 3.0 ) * pi ) / ( ( ( 4.0 * floor ( ( n / 2.0 ) ) ) + ( 2.0 * a ) ) + 2.0 ) ) f = ( lambda x : ( ( x - sin ( x ) ) - c ) ) df = ( lambda x : ( 1.0 - cos ( x ) ) ) xi = ( 0.5 * pi ) for i in range ( maxit ) : xi = ( xi - ( f ( xi ) / df ( xi ) ) ) return xi
helper function for tricomi initial guesses for details .