original_docstring: 
      Compute the logarithmic derivative using best method.
  
      Args:
          m: the complex index of refraction of the sphere
          x: the size parameter of the sphere
          N: order of Ricatti-Bessel function
  
      Returns:
          The values of the Ricatti-Bessel function for orders from 0 to N.
      
docstring: Compute the logarithmic derivative using best method.
docstring_tokens: Compute the logarithmic derivative using best method .
code: def _D_calc(m, x, N):
      """
      Compute the logarithmic derivative using best method.
  
      Args:
          m: the complex index of refraction of the sphere
          x: the size parameter of the sphere
          N: order of Ricatti-Bessel function
  
      Returns:
          The values of the Ricatti-Bessel function for orders from 0 to N.
      """
      n = m.real
      kappa = abs(m.imag)
  
      if n < 1 or n > 10 or kappa > 10 or x*kappa >= 3.9 - 10.8 * n + 13.78 * n**2:
          return _D_downwards(m*x, N)
  
      return _D_upwards(m*x, N)
code_tokens: def _D_calc ( m , x , N ) : n = m . real kappa = abs ( m . imag ) if n < 1 or n > 10 or kappa > 10 or x * kappa >= 3.9 - 10.8 * n + 13.78 * n ** 2 : return _D_downwards ( m * x , N ) return _D_upwards ( m * x , N )
short_docstring: Compute the logarithmic derivative using best method.
short_docstring_tokens: Compute the logarithmic derivative using best method .
comment: """
      Compute the logarithmic derivative using best method.
  
      Args:
          m: the complex index of refraction of the sphere
          x: the size parameter of the sphere
          N: order of Ricatti-Bessel function
  
      Returns:
          The values of the Ricatti-Bessel function for orders from 0 to N.
      """