pyexpint/expint.cpp
/**
 * Algorithm for the generalized exponential integral with double nu
 * accuracy improved: v split into an integral and decimal fractional part.
 */
Algorithm for the generalized exponential integral with double nu
accuracy improved: v split into an integral and decimal fractional part.
Algorithm for the generalized exponential integral with double nu accuracy improved : v split into an integral and decimal fractional part .
double expint_v_imp(const int n, const double e, const double x)
{
  int iflag = 0;
  double result, v;
  result = v = 0.0;
  if (e == 0.0)
    return expint_n(n, x);
  if (std::abs(e) < 0.1 && (n < 10 && n > 0) && x < 2.0)
    return expint_n_e_acc(n, e, x);
  expint_v_special_cases(v, x, &iflag, &result);
  if (iflag) return result;
  v = n + e;
  if (x <= 1.0)
    return expint_small_x(v, x);
  else if (v >= x)
    return expint_large_v(v, x);
  else
    return expint_large_x(v, x); 
}
double expint_v_imp ( const int n , const double e , const double x ) { int iflag = 0 ; double result , v ; result = v = 0.0 ; if ( e == 0.0 ) return expint_n ( n , x ) ; if ( std :: abs ( e ) < 0.1 && ( n < 10 && n > 0 ) && x < 2.0 ) return expint_n_e_acc ( n , e , x ) ; expint_v_special_cases ( v , x , & iflag , & result ) ; if ( iflag ) return result ; v = n + e ; if ( x <= 1.0 ) return expint_small_x ( v , x ) ; else if ( v >= x ) return expint_large_v ( v , x ) ; else return expint_large_x ( v , x ) ; }
Algorithm for the generalized exponential integral with double nu
 accuracy improved: v split into an integral and decimal fractional part.
Algorithm for the generalized exponential integral with double nu accuracy improved : v split into an integral and decimal fractional part .
// check if input is integer, return expint_n // special cases // general cases