Generated by Cython 0.29.7

Yellow lines hint at Python interaction.
Click on a line that starts with a "+" to see the C code that Cython generated for it.

Raw output: _specfunc.c

+001: from libc cimport math as cm
  __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 002: cimport numpy as cnp
 003: 
 004: from cython.parallel import prange
+005: import numpy as np
  __Pyx_TraceLine(5,0,__PYX_ERR(0, 5, __pyx_L1_error))
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
 006: 
+007: ctypedef double (*Fn1R) (double) nogil
typedef double (*__pyx_t_7copulae_7special_9_specfunc_Fn1R)(double);
+008: ctypedef ComplexResult (*Fn1C) (double, double) nogil
typedef __pyx_t_7copulae_7special_9_specfunc_ComplexResult (*__pyx_t_7copulae_7special_9_specfunc_Fn1C)(double, double);
+009: ctypedef struct ComplexResult:
struct __pyx_t_7copulae_7special_9_specfunc_ComplexResult {
  double real;
  double imag;
};
 010:     double real
 011:     double imag
 012: 
 013: cdef:
+014:     double PI = 3.14159265358979323846264338328
  __Pyx_TraceLine(14,0,__PYX_ERR(0, 14, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_PI = 3.14159265358979323846264338328;
+015:     double DBL_EPSILON = 2.220446049250313e-16
  __Pyx_TraceLine(15,0,__PYX_ERR(0, 15, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON = 2.220446049250313e-16;
+016:     double SQRT_DBL_EPSILON = 1.4901161193847656e-08
  __Pyx_TraceLine(16,0,__PYX_ERR(0, 16, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_SQRT_DBL_EPSILON = 1.4901161193847656e-08;
+017:     double LOG_DBL_EPSILON = -36.04365338911715
  __Pyx_TraceLine(17,0,__PYX_ERR(0, 17, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_LOG_DBL_EPSILON = -36.04365338911715;
+018:     double LOG_DBL_MIN = -708.3964185322641
  __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_LOG_DBL_MIN = -708.3964185322641;
+019:     double M_LN2 = 0.69314718055994530941723212146
  __Pyx_TraceLine(19,0,__PYX_ERR(0, 19, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_M_LN2 = 0.69314718055994530941723212146;
+020:     double M_SQRT2 = 1.41421356237309504880168872421
  __Pyx_TraceLine(20,0,__PYX_ERR(0, 20, __pyx_L1_error))
  __pyx_v_7copulae_7special_9_specfunc_M_SQRT2 = 1.41421356237309504880168872421;
 021: 
+022:     double[::1] clausen_constants = np.array([
  __Pyx_TraceLine(22,0,__PYX_ERR(0, 22, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_float_2_142694363766688447e_00);
  __Pyx_GIVEREF(__pyx_float_2_142694363766688447e_00);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_float_2_142694363766688447e_00);
  __Pyx_INCREF(__pyx_float_0_723324281221257925eneg_01);
  __Pyx_GIVEREF(__pyx_float_0_723324281221257925eneg_01);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_float_0_723324281221257925eneg_01);
  __Pyx_INCREF(__pyx_float_0_101642475021151164eneg_02);
  __Pyx_GIVEREF(__pyx_float_0_101642475021151164eneg_02);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_float_0_101642475021151164eneg_02);
  __Pyx_INCREF(__pyx_float_0_3245250328531645eneg_04);
  __Pyx_GIVEREF(__pyx_float_0_3245250328531645eneg_04);
  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_float_0_3245250328531645eneg_04);
  __Pyx_INCREF(__pyx_float_0_133315187571472eneg_05);
  __Pyx_GIVEREF(__pyx_float_0_133315187571472eneg_05);
  PyList_SET_ITEM(__pyx_t_1, 4, __pyx_float_0_133315187571472eneg_05);
  __Pyx_INCREF(__pyx_float_0_6213240591653eneg_07);
  __Pyx_GIVEREF(__pyx_float_0_6213240591653eneg_07);
  PyList_SET_ITEM(__pyx_t_1, 5, __pyx_float_0_6213240591653eneg_07);
  __Pyx_INCREF(__pyx_float_0_313004135337eneg_08);
  __Pyx_GIVEREF(__pyx_float_0_313004135337eneg_08);
  PyList_SET_ITEM(__pyx_t_1, 6, __pyx_float_0_313004135337eneg_08);
  __Pyx_INCREF(__pyx_float_0_16635723056eneg_09);
  __Pyx_GIVEREF(__pyx_float_0_16635723056eneg_09);
  PyList_SET_ITEM(__pyx_t_1, 7, __pyx_float_0_16635723056eneg_09);
  __Pyx_INCREF(__pyx_float_0_919659293eneg_11);
  __Pyx_GIVEREF(__pyx_float_0_919659293eneg_11);
  PyList_SET_ITEM(__pyx_t_1, 8, __pyx_float_0_919659293eneg_11);
  __Pyx_INCREF(__pyx_float_0_52400462eneg_12);
  __Pyx_GIVEREF(__pyx_float_0_52400462eneg_12);
  PyList_SET_ITEM(__pyx_t_1, 9, __pyx_float_0_52400462eneg_12);
  __Pyx_INCREF(__pyx_float_0_3058040eneg_13);
  __Pyx_GIVEREF(__pyx_float_0_3058040eneg_13);
  PyList_SET_ITEM(__pyx_t_1, 10, __pyx_float_0_3058040eneg_13);
  __Pyx_INCREF(__pyx_float_0_18197eneg_14);
  __Pyx_GIVEREF(__pyx_float_0_18197eneg_14);
  PyList_SET_ITEM(__pyx_t_1, 11, __pyx_float_0_18197eneg_14);
  __Pyx_INCREF(__pyx_float_0_1100eneg_15);
  __Pyx_GIVEREF(__pyx_float_0_1100eneg_15);
  PyList_SET_ITEM(__pyx_t_1, 12, __pyx_float_0_1100eneg_15);
  __Pyx_INCREF(__pyx_float_0_68eneg_17);
  __Pyx_GIVEREF(__pyx_float_0_68eneg_17);
  PyList_SET_ITEM(__pyx_t_1, 13, __pyx_float_0_68eneg_17);
  __Pyx_INCREF(__pyx_float_0_4eneg_18);
  __Pyx_GIVEREF(__pyx_float_0_4eneg_18);
  PyList_SET_ITEM(__pyx_t_1, 14, __pyx_float_0_4eneg_18);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __PYX_XDEC_MEMVIEW(&__pyx_v_7copulae_7special_9_specfunc_clausen_constants, 1);
  __pyx_v_7copulae_7special_9_specfunc_clausen_constants = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;
 023:         2.142694363766688447e+00,
 024:         0.723324281221257925e-01,
 025:         0.101642475021151164e-02,
 026:         0.3245250328531645e-04,
 027:         0.133315187571472e-05,
 028:         0.6213240591653e-07,
 029:         0.313004135337e-08,
 030:         0.16635723056e-09,
 031:         0.919659293e-11,
 032:         0.52400462e-12,
 033:         0.3058040e-13,
 034:         0.18197e-14,
 035:         0.1100e-15,
 036:         0.68e-17,
 037:         0.4e-18
 038:     ])
 039: 
+040:     double[::1] debye1_constant = np.array([
  __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_float_2_4006597190381410194);
  __Pyx_GIVEREF(__pyx_float_2_4006597190381410194);
  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_float_2_4006597190381410194);
  __Pyx_INCREF(__pyx_float_0_1937213042189360089);
  __Pyx_GIVEREF(__pyx_float_0_1937213042189360089);
  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_float_0_1937213042189360089);
  __Pyx_INCREF(__pyx_float_neg_0_62329124554895770eneg_02);
  __Pyx_GIVEREF(__pyx_float_neg_0_62329124554895770eneg_02);
  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_float_neg_0_62329124554895770eneg_02);
  __Pyx_INCREF(__pyx_float_0_3511174770206480eneg_03);
  __Pyx_GIVEREF(__pyx_float_0_3511174770206480eneg_03);
  PyList_SET_ITEM(__pyx_t_3, 3, __pyx_float_0_3511174770206480eneg_03);
  __Pyx_INCREF(__pyx_float_neg_0_228222466701231eneg_04);
  __Pyx_GIVEREF(__pyx_float_neg_0_228222466701231eneg_04);
  PyList_SET_ITEM(__pyx_t_3, 4, __pyx_float_neg_0_228222466701231eneg_04);
  __Pyx_INCREF(__pyx_float_0_15805467875030eneg_05);
  __Pyx_GIVEREF(__pyx_float_0_15805467875030eneg_05);
  PyList_SET_ITEM(__pyx_t_3, 5, __pyx_float_0_15805467875030eneg_05);
  __Pyx_INCREF(__pyx_float_neg_0_1135378197072eneg_06);
  __Pyx_GIVEREF(__pyx_float_neg_0_1135378197072eneg_06);
  PyList_SET_ITEM(__pyx_t_3, 6, __pyx_float_neg_0_1135378197072eneg_06);
  __Pyx_INCREF(__pyx_float_0_83583361188eneg_08);
  __Pyx_GIVEREF(__pyx_float_0_83583361188eneg_08);
  PyList_SET_ITEM(__pyx_t_3, 7, __pyx_float_0_83583361188eneg_08);
  __Pyx_INCREF(__pyx_float_neg_0_6264424787eneg_09);
  __Pyx_GIVEREF(__pyx_float_neg_0_6264424787eneg_09);
  PyList_SET_ITEM(__pyx_t_3, 8, __pyx_float_neg_0_6264424787eneg_09);
  __Pyx_INCREF(__pyx_float_0_476033489eneg_10);
  __Pyx_GIVEREF(__pyx_float_0_476033489eneg_10);
  PyList_SET_ITEM(__pyx_t_3, 9, __pyx_float_0_476033489eneg_10);
  __Pyx_INCREF(__pyx_float_neg_0_36574154eneg_11);
  __Pyx_GIVEREF(__pyx_float_neg_0_36574154eneg_11);
  PyList_SET_ITEM(__pyx_t_3, 10, __pyx_float_neg_0_36574154eneg_11);
  __Pyx_INCREF(__pyx_float_0_2835431eneg_12);
  __Pyx_GIVEREF(__pyx_float_0_2835431eneg_12);
  PyList_SET_ITEM(__pyx_t_3, 11, __pyx_float_0_2835431eneg_12);
  __Pyx_INCREF(__pyx_float_neg_0_221473eneg_13);
  __Pyx_GIVEREF(__pyx_float_neg_0_221473eneg_13);
  PyList_SET_ITEM(__pyx_t_3, 12, __pyx_float_neg_0_221473eneg_13);
  __Pyx_INCREF(__pyx_float_0_17409eneg_14);
  __Pyx_GIVEREF(__pyx_float_0_17409eneg_14);
  PyList_SET_ITEM(__pyx_t_3, 13, __pyx_float_0_17409eneg_14);
  __Pyx_INCREF(__pyx_float_neg_0_1376eneg_15);
  __Pyx_GIVEREF(__pyx_float_neg_0_1376eneg_15);
  PyList_SET_ITEM(__pyx_t_3, 14, __pyx_float_neg_0_1376eneg_15);
  __Pyx_INCREF(__pyx_float_0_109eneg_16);
  __Pyx_GIVEREF(__pyx_float_0_109eneg_16);
  PyList_SET_ITEM(__pyx_t_3, 15, __pyx_float_0_109eneg_16);
  __Pyx_INCREF(__pyx_float_neg_0_9eneg_18);
  __Pyx_GIVEREF(__pyx_float_neg_0_9eneg_18);
  PyList_SET_ITEM(__pyx_t_3, 16, __pyx_float_neg_0_9eneg_18);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __PYX_XDEC_MEMVIEW(&__pyx_v_7copulae_7special_9_specfunc_debye1_constant, 1);
  __pyx_v_7copulae_7special_9_specfunc_debye1_constant = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;
 041:         2.4006597190381410194,
 042:         0.1937213042189360089,
 043:         -0.62329124554895770e-02,
 044:         0.3511174770206480e-03,
 045:         -0.228222466701231e-04,
 046:         0.15805467875030e-05,
 047:         -0.1135378197072e-06,
 048:         0.83583361188e-08,
 049:         -0.6264424787e-09,
 050:         0.476033489e-10,
 051:         -0.36574154e-11,
 052:         0.2835431e-12,
 053:         -0.221473e-13,
 054:         0.17409e-14,
 055:         -0.1376e-15,
 056:         0.109e-16,
 057:         -0.9e-18
 058:     ])
 059: 
+060:     double[::1] debye2_constant = np.array([
  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyList_New(18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_float_2_5943810232570770282);
  __Pyx_GIVEREF(__pyx_float_2_5943810232570770282);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_2_5943810232570770282);
  __Pyx_INCREF(__pyx_float_0_2863357204530719834);
  __Pyx_GIVEREF(__pyx_float_0_2863357204530719834);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_float_0_2863357204530719834);
  __Pyx_INCREF(__pyx_float_neg_0_102062656158046713eneg_01);
  __Pyx_GIVEREF(__pyx_float_neg_0_102062656158046713eneg_01);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_float_neg_0_102062656158046713eneg_01);
  __Pyx_INCREF(__pyx_float_0_6049109775346844eneg_03);
  __Pyx_GIVEREF(__pyx_float_0_6049109775346844eneg_03);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_float_0_6049109775346844eneg_03);
  __Pyx_INCREF(__pyx_float_neg_0_405257658950210eneg_04);
  __Pyx_GIVEREF(__pyx_float_neg_0_405257658950210eneg_04);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_float_neg_0_405257658950210eneg_04);
  __Pyx_INCREF(__pyx_float_0_28633826328811eneg_05);
  __Pyx_GIVEREF(__pyx_float_0_28633826328811eneg_05);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_float_0_28633826328811eneg_05);
  __Pyx_INCREF(__pyx_float_neg_0_2086394303065eneg_06);
  __Pyx_GIVEREF(__pyx_float_neg_0_2086394303065eneg_06);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_float_neg_0_2086394303065eneg_06);
  __Pyx_INCREF(__pyx_float_0_155237875826eneg_07);
  __Pyx_GIVEREF(__pyx_float_0_155237875826eneg_07);
  PyList_SET_ITEM(__pyx_t_2, 7, __pyx_float_0_155237875826eneg_07);
  __Pyx_INCREF(__pyx_float_neg_0_11731280087eneg_08);
  __Pyx_GIVEREF(__pyx_float_neg_0_11731280087eneg_08);
  PyList_SET_ITEM(__pyx_t_2, 8, __pyx_float_neg_0_11731280087eneg_08);
  __Pyx_INCREF(__pyx_float_0_897358589eneg_10);
  __Pyx_GIVEREF(__pyx_float_0_897358589eneg_10);
  PyList_SET_ITEM(__pyx_t_2, 9, __pyx_float_0_897358589eneg_10);
  __Pyx_INCREF(__pyx_float_neg_0_69317614eneg_11);
  __Pyx_GIVEREF(__pyx_float_neg_0_69317614eneg_11);
  PyList_SET_ITEM(__pyx_t_2, 10, __pyx_float_neg_0_69317614eneg_11);
  __Pyx_INCREF(__pyx_float_0_5398057eneg_12);
  __Pyx_GIVEREF(__pyx_float_0_5398057eneg_12);
  PyList_SET_ITEM(__pyx_t_2, 11, __pyx_float_0_5398057eneg_12);
  __Pyx_INCREF(__pyx_float_neg_0_423241eneg_13);
  __Pyx_GIVEREF(__pyx_float_neg_0_423241eneg_13);
  PyList_SET_ITEM(__pyx_t_2, 12, __pyx_float_neg_0_423241eneg_13);
  __Pyx_INCREF(__pyx_float_0_33378eneg_14);
  __Pyx_GIVEREF(__pyx_float_0_33378eneg_14);
  PyList_SET_ITEM(__pyx_t_2, 13, __pyx_float_0_33378eneg_14);
  __Pyx_INCREF(__pyx_float_neg_0_2645eneg_15);
  __Pyx_GIVEREF(__pyx_float_neg_0_2645eneg_15);
  PyList_SET_ITEM(__pyx_t_2, 14, __pyx_float_neg_0_2645eneg_15);
  __Pyx_INCREF(__pyx_float_0_211eneg_16);
  __Pyx_GIVEREF(__pyx_float_0_211eneg_16);
  PyList_SET_ITEM(__pyx_t_2, 15, __pyx_float_0_211eneg_16);
  __Pyx_INCREF(__pyx_float_neg_0_17eneg_17);
  __Pyx_GIVEREF(__pyx_float_neg_0_17eneg_17);
  PyList_SET_ITEM(__pyx_t_2, 16, __pyx_float_neg_0_17eneg_17);
  __Pyx_INCREF(__pyx_float_0_1eneg_18);
  __Pyx_GIVEREF(__pyx_float_0_1eneg_18);
  PyList_SET_ITEM(__pyx_t_2, 17, __pyx_float_0_1eneg_18);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_XDEC_MEMVIEW(&__pyx_v_7copulae_7special_9_specfunc_debye2_constant, 1);
  __pyx_v_7copulae_7special_9_specfunc_debye2_constant = __pyx_t_4;
  __pyx_t_4.memview = NULL;
  __pyx_t_4.data = NULL;
 061:         2.5943810232570770282,
 062:         0.2863357204530719834,
 063:         -0.102062656158046713e-01,
 064:         0.6049109775346844e-03,
 065:         -0.405257658950210e-04,
 066:         0.28633826328811e-05,
 067:         -0.2086394303065e-06,
 068:         0.155237875826e-07,
 069:         -0.11731280087e-08,
 070:         0.897358589e-10,
 071:         -0.69317614e-11,
 072:         0.5398057e-12,
 073:         -0.423241e-13,
 074:         0.33378e-14,
 075:         -0.2645e-15,
 076:         0.211e-16,
 077:         -0.17e-17,
 078:         0.1e-18
 079:     ])
 080: 
 081: 
+082: def clausen(x, bint threaded=True):
/* Python wrapper */
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_1clausen(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7copulae_7special_9_specfunc_1clausen = {"clausen", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7copulae_7special_9_specfunc_1clausen, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_1clausen(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  int __pyx_v_threaded;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clausen (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_threaded,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clausen") < 0)) __PYX_ERR(0, 82, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_x = values[0];
    if (values[1]) {
      __pyx_v_threaded = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_threaded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L3_error)
    } else {
      __pyx_v_threaded = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clausen", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 82, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("copulae.special._specfunc.clausen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7copulae_7special_9_specfunc_clausen(__pyx_self, __pyx_v_x, __pyx_v_threaded);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7copulae_7special_9_specfunc_clausen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, int __pyx_v_threaded) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj_)
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clausen", 0);
  __Pyx_TraceCall("clausen", __pyx_f[0], 82, 0, __PYX_ERR(0, 82, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_x);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("copulae.special._specfunc.clausen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__32 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_threaded, __pyx_n_s_arr, __pyx_n_s_n); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
/* … */
  __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error))
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7copulae_7special_9_specfunc_1clausen, NULL, __pyx_n_s_copulae_special__specfunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clausen, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_copulae_special__specfunc_pyx, __pyx_n_s_clausen, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 82, __pyx_L1_error)
+083:     x = np.asarray(x, float)
  __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)(&PyFloat_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_1);
  __pyx_t_1 = 0;
 084:     cdef:
+085:         cnp.ndarray[cnp.npy_float64, ndim=1] arr = x.ravel()
  __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_ravel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 85, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 85, __pyx_L1_error)
    } else {__pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
+086:         int n = arr.size
  __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_4;
 087: 
+088:     if n == 1:
  __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error))
  __pyx_t_7 = ((__pyx_v_n == 1) != 0);
  if (__pyx_t_7) {
/* … */
  }
+089:         return _clausen(arr[0])
    __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = 0;
    __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7copulae_7special_9_specfunc__clausen((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+090:     if threaded and n > 1:
  __Pyx_TraceLine(90,0,__PYX_ERR(0, 90, __pyx_L1_error))
  __pyx_t_9 = (__pyx_v_threaded != 0);
  if (__pyx_t_9) {
  } else {
    __pyx_t_7 = __pyx_t_9;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_9 = ((__pyx_v_n > 1) != 0);
  __pyx_t_7 = __pyx_t_9;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {
/* … */
    goto __pyx_L4;
  }
+091:         map_dbl_p(_clausen, arr, n)
    __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 91, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_p(__pyx_f_7copulae_7special_9_specfunc__clausen, __pyx_t_10, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
    __pyx_t_10.memview = NULL;
    __pyx_t_10.data = NULL;
 092:     else:
+093:         map_dbl_s(_clausen, arr, n)
  __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error))
  /*else*/ {
    __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 93, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_s(__pyx_f_7copulae_7special_9_specfunc__clausen, __pyx_t_10, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
    __pyx_t_10.memview = NULL;
    __pyx_t_10.data = NULL;
  }
  __pyx_L4:;
 094: 
+095:     return arr.reshape(x.shape)
  __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 096: 
 097: 
+098: def debye_1(x, bint threaded=True):
/* Python wrapper */
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_3debye_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7copulae_7special_9_specfunc_3debye_1 = {"debye_1", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7copulae_7special_9_specfunc_3debye_1, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_3debye_1(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  int __pyx_v_threaded;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debye_1 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_threaded,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "debye_1") < 0)) __PYX_ERR(0, 98, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_x = values[0];
    if (values[1]) {
      __pyx_v_threaded = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_threaded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error)
    } else {
      __pyx_v_threaded = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("debye_1", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 98, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("copulae.special._specfunc.debye_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7copulae_7special_9_specfunc_2debye_1(__pyx_self, __pyx_v_x, __pyx_v_threaded);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7copulae_7special_9_specfunc_2debye_1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, int __pyx_v_threaded) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__2)
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debye_1", 0);
  __Pyx_TraceCall("debye_1", __pyx_f[0], 98, 0, __PYX_ERR(0, 98, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_x);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("copulae.special._specfunc.debye_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__33 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_threaded, __pyx_n_s_arr, __pyx_n_s_n); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
/* … */
  __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error))
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7copulae_7special_9_specfunc_3debye_1, NULL, __pyx_n_s_copulae_special__specfunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_debye_1, __pyx_t_1) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_copulae_special__specfunc_pyx, __pyx_n_s_debye_1, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(0, 98, __pyx_L1_error)
+099:     x = np.asarray(x, float)
  __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)(&PyFloat_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_1);
  __pyx_t_1 = 0;
 100:     cdef:
+101:         cnp.ndarray[cnp.npy_float64, ndim=1] arr = x.ravel()
  __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_ravel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 101, __pyx_L1_error)
    } else {__pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
+102:         int n = arr.size
  __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_4;
 103: 
+104:     if n == 1:
  __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error))
  __pyx_t_7 = ((__pyx_v_n == 1) != 0);
  if (__pyx_t_7) {
/* … */
  }
+105:         return _debye_1(arr[0])
    __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = 0;
    __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7copulae_7special_9_specfunc__debye_1((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+106:     elif threaded:
  __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error))
  __pyx_t_7 = (__pyx_v_threaded != 0);
  if (__pyx_t_7) {
/* … */
    goto __pyx_L3;
  }
+107:         map_dbl_p(_debye_1, arr, n)
    __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error))
    __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 107, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_p(__pyx_f_7copulae_7special_9_specfunc__debye_1, __pyx_t_9, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
    __pyx_t_9.memview = NULL;
    __pyx_t_9.data = NULL;
 108:     else:
+109:         map_dbl_s(_debye_1, arr, n)
  __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error))
  /*else*/ {
    __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 109, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_s(__pyx_f_7copulae_7special_9_specfunc__debye_1, __pyx_t_9, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
    __pyx_t_9.memview = NULL;
    __pyx_t_9.data = NULL;
  }
  __pyx_L3:;
 110: 
+111:     return arr.reshape(x.shape)
  __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 112: 
 113: 
+114: def debye_2(x, bint threaded=True):
/* Python wrapper */
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_5debye_2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7copulae_7special_9_specfunc_5debye_2 = {"debye_2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7copulae_7special_9_specfunc_5debye_2, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_5debye_2(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  int __pyx_v_threaded;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debye_2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_threaded,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "debye_2") < 0)) __PYX_ERR(0, 114, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_x = values[0];
    if (values[1]) {
      __pyx_v_threaded = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_threaded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 114, __pyx_L3_error)
    } else {
      __pyx_v_threaded = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("debye_2", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 114, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("copulae.special._specfunc.debye_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7copulae_7special_9_specfunc_4debye_2(__pyx_self, __pyx_v_x, __pyx_v_threaded);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7copulae_7special_9_specfunc_4debye_2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, int __pyx_v_threaded) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__3)
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("debye_2", 0);
  __Pyx_TraceCall("debye_2", __pyx_f[0], 114, 0, __PYX_ERR(0, 114, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_x);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("copulae.special._specfunc.debye_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_threaded, __pyx_n_s_arr, __pyx_n_s_n); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
/* … */
  __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error))
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7copulae_7special_9_specfunc_5debye_2, NULL, __pyx_n_s_copulae_special__specfunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_debye_2, __pyx_t_1) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_copulae_special__specfunc_pyx, __pyx_n_s_debye_2, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 114, __pyx_L1_error)
+115:     x = np.asarray(x, float)
  __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)(&PyFloat_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_1);
  __pyx_t_1 = 0;
 116:     cdef:
+117:         cnp.ndarray[cnp.npy_float64, ndim=1] arr = x.ravel()
  __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_ravel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 117, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 117, __pyx_L1_error)
    } else {__pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
+118:         int n = arr.size
  __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_4;
 119: 
+120:     if n == 1:
  __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error))
  __pyx_t_7 = ((__pyx_v_n == 1) != 0);
  if (__pyx_t_7) {
/* … */
  }
+121:         return _debye_2(arr[0])
    __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = 0;
    __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7copulae_7special_9_specfunc__debye_2((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+122:     elif threaded:
  __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error))
  __pyx_t_7 = (__pyx_v_threaded != 0);
  if (__pyx_t_7) {
/* … */
    goto __pyx_L3;
  }
+123:         map_dbl_p(_debye_2, arr, n)
    __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error))
    __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 123, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_p(__pyx_f_7copulae_7special_9_specfunc__debye_2, __pyx_t_9, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
    __pyx_t_9.memview = NULL;
    __pyx_t_9.data = NULL;
 124:     else:
+125:         map_dbl_s(_debye_2, arr, n)
  __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error))
  /*else*/ {
    __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 125, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_s(__pyx_f_7copulae_7special_9_specfunc__debye_2, __pyx_t_9, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
    __pyx_t_9.memview = NULL;
    __pyx_t_9.data = NULL;
  }
  __pyx_L3:;
 126: 
+127:     return arr.reshape(x.shape)
  __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 128: 
 129: 
+130: def dilog(x, bint threaded):
/* Python wrapper */
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_7dilog(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7copulae_7special_9_specfunc_7dilog = {"dilog", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7copulae_7special_9_specfunc_7dilog, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_7dilog(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  int __pyx_v_threaded;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dilog (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_threaded,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dilog", 1, 2, 2, 1); __PYX_ERR(0, 130, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dilog") < 0)) __PYX_ERR(0, 130, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_threaded = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_threaded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dilog", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 130, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("copulae.special._specfunc.dilog", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7copulae_7special_9_specfunc_6dilog(__pyx_self, __pyx_v_x, __pyx_v_threaded);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7copulae_7special_9_specfunc_6dilog(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, int __pyx_v_threaded) {
  PyArrayObject *__pyx_v_arr = 0;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_arr;
  __Pyx_Buffer __pyx_pybuffer_arr;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__4)
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dilog", 0);
  __Pyx_TraceCall("dilog", __pyx_f[0], 130, 0, __PYX_ERR(0, 130, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_x);
  __pyx_pybuffer_arr.pybuffer.buf = NULL;
  __pyx_pybuffer_arr.refcount = 0;
  __pyx_pybuffernd_arr.data = NULL;
  __pyx_pybuffernd_arr.rcbuffer = &__pyx_pybuffer_arr;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("copulae.special._specfunc.dilog", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_arr.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_arr);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__35 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_threaded, __pyx_n_s_arr, __pyx_n_s_n); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
/* … */
  __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error))
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7copulae_7special_9_specfunc_7dilog, NULL, __pyx_n_s_copulae_special__specfunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dilog, __pyx_t_1) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_copulae_special__specfunc_pyx, __pyx_n_s_dilog, 130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 130, __pyx_L1_error)
+131:     x = np.asarray(x, float)
  __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_x, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)(&PyFloat_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_1);
  __pyx_t_1 = 0;
 132:     cdef:
+133:         cnp.ndarray[cnp.npy_float64, ndim=1] arr = x.ravel()
  __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error))
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_ravel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 133, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_arr.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_arr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 133, __pyx_L1_error)
    } else {__pyx_pybuffernd_arr.diminfo[0].strides = __pyx_pybuffernd_arr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_arr.diminfo[0].shape = __pyx_pybuffernd_arr.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_arr = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
+134:         int n = arr.size
  __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_4;
 135: 
+136:     if n == 1:
  __Pyx_TraceLine(136,0,__PYX_ERR(0, 136, __pyx_L1_error))
  __pyx_t_7 = ((__pyx_v_n == 1) != 0);
  if (__pyx_t_7) {
/* … */
  }
+137:         return _dilog(arr[0])
    __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_8 = 0;
    __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7copulae_7special_9_specfunc__dilog((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_pybuffernd_arr.rcbuffer->pybuffer.buf, __pyx_t_8, __pyx_pybuffernd_arr.diminfo[0].strides)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
+138:     if threaded and n > 1:
  __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error))
  __pyx_t_9 = (__pyx_v_threaded != 0);
  if (__pyx_t_9) {
  } else {
    __pyx_t_7 = __pyx_t_9;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_9 = ((__pyx_v_n > 1) != 0);
  __pyx_t_7 = __pyx_t_9;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {
/* … */
    goto __pyx_L4;
  }
+139:         map_dbl_p(_dilog, arr, n)
    __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error))
    __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 139, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_p(__pyx_f_7copulae_7special_9_specfunc__dilog, __pyx_t_10, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
    __pyx_t_10.memview = NULL;
    __pyx_t_10.data = NULL;
 140:     else:
+141:         map_dbl_s(_dilog, arr, n)
  __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error))
  /*else*/ {
    __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_arr), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 141, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_map_dbl_s(__pyx_f_7copulae_7special_9_specfunc__dilog, __pyx_t_10, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
    __pyx_t_10.memview = NULL;
    __pyx_t_10.data = NULL;
  }
  __pyx_L4:;
 142: 
+143:     return arr.reshape(x.shape)
  __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_arr), __pyx_n_s_reshape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;
 144: 
 145: 
+146: def dilog_complex(r, theta, bint threaded):
/* Python wrapper */
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_9dilog_complex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_7copulae_7special_9_specfunc_9dilog_complex = {"dilog_complex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7copulae_7special_9_specfunc_9dilog_complex, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7copulae_7special_9_specfunc_9dilog_complex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_r = 0;
  PyObject *__pyx_v_theta = 0;
  int __pyx_v_threaded;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dilog_complex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_theta,&__pyx_n_s_threaded,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dilog_complex", 1, 3, 3, 1); __PYX_ERR(0, 146, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threaded)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("dilog_complex", 1, 3, 3, 2); __PYX_ERR(0, 146, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dilog_complex") < 0)) __PYX_ERR(0, 146, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_r = values[0];
    __pyx_v_theta = values[1];
    __pyx_v_threaded = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_threaded == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dilog_complex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 146, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("copulae.special._specfunc.dilog_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7copulae_7special_9_specfunc_8dilog_complex(__pyx_self, __pyx_v_r, __pyx_v_theta, __pyx_v_threaded);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7copulae_7special_9_specfunc_8dilog_complex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r, PyObject *__pyx_v_theta, int __pyx_v_threaded) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  PyArrayObject *__pyx_v_r_vec = 0;
  PyArrayObject *__pyx_v_i_vec = 0;
  int __pyx_v_n;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_i_vec;
  __Pyx_Buffer __pyx_pybuffer_i_vec;
  __Pyx_LocalBuf_ND __pyx_pybuffernd_r_vec;
  __Pyx_Buffer __pyx_pybuffer_r_vec;
  PyObject *__pyx_r = NULL;
  __Pyx_TraceDeclarations
  __Pyx_TraceFrameInit(__pyx_codeobj__5)
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dilog_complex", 0);
  __Pyx_TraceCall("dilog_complex", __pyx_f[0], 146, 0, __PYX_ERR(0, 146, __pyx_L1_error));
  __Pyx_INCREF(__pyx_v_r);
  __Pyx_INCREF(__pyx_v_theta);
  __pyx_pybuffer_r_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_r_vec.refcount = 0;
  __pyx_pybuffernd_r_vec.data = NULL;
  __pyx_pybuffernd_r_vec.rcbuffer = &__pyx_pybuffer_r_vec;
  __pyx_pybuffer_i_vec.pybuffer.buf = NULL;
  __pyx_pybuffer_i_vec.refcount = 0;
  __pyx_pybuffernd_i_vec.data = NULL;
  __pyx_pybuffernd_i_vec.rcbuffer = &__pyx_pybuffer_i_vec;
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
  __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
  { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_i_vec.rcbuffer->pybuffer);
    __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_r_vec.rcbuffer->pybuffer);
  __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
  __Pyx_AddTraceback("copulae.special._specfunc.dilog_complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  goto __pyx_L2;
  __pyx_L0:;
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_i_vec.rcbuffer->pybuffer);
  __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_r_vec.rcbuffer->pybuffer);
  __pyx_L2:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r_vec);
  __Pyx_XDECREF((PyObject *)__pyx_v_i_vec);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_theta);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_TraceReturn(__pyx_r, 0);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* … */
  __pyx_tuple__36 = PyTuple_Pack(7, __pyx_n_s_r, __pyx_n_s_theta, __pyx_n_s_threaded, __pyx_n_s_c, __pyx_n_s_r_vec, __pyx_n_s_i_vec, __pyx_n_s_n); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
/* … */
  __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error))
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_7copulae_7special_9_specfunc_9dilog_complex, NULL, __pyx_n_s_copulae_special__specfunc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dilog_complex, __pyx_t_1) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_copulae_special__specfunc_pyx, __pyx_n_s_dilog_complex, 146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 146, __pyx_L1_error)
+147:     r = np.asarray(r, float)
  __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_r, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_r, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_r);
    __Pyx_GIVEREF(__pyx_v_r);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_r);
    __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)(&PyFloat_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_r, __pyx_t_1);
  __pyx_t_1 = 0;
+148:     theta = np.asarray(theta, float)
  __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error))
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_theta, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_theta, ((PyObject *)(&PyFloat_Type))};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_2 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_theta);
    __Pyx_GIVEREF(__pyx_v_theta);
    PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_4, __pyx_v_theta);
    __Pyx_INCREF(((PyObject *)(&PyFloat_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type)));
    PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_4, ((PyObject *)(&PyFloat_Type)));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_theta, __pyx_t_1);
  __pyx_t_1 = 0;
 149: 
 150:     cdef:
 151:         ComplexResult c
+152:         cnp.ndarray[cnp.npy_float64, ndim=1] r_vec = r.ravel()
  __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_ravel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 152, __pyx_L1_error)
  __pyx_t_6 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_r_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_r_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_r_vec.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 152, __pyx_L1_error)
    } else {__pyx_pybuffernd_r_vec.diminfo[0].strides = __pyx_pybuffernd_r_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_r_vec.diminfo[0].shape = __pyx_pybuffernd_r_vec.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_6 = 0;
  __pyx_v_r_vec = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
+153:         cnp.ndarray[cnp.npy_float64, ndim=1] i_vec = theta.ravel()
  __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error))
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_theta, __pyx_n_s_ravel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 153, __pyx_L1_error)
  __pyx_t_7 = ((PyArrayObject *)__pyx_t_1);
  {
    __Pyx_BufFmt_StackElem __pyx_stack[1];
    if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_i_vec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn_npy_float64, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) {
      __pyx_v_i_vec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_i_vec.rcbuffer->pybuffer.buf = NULL;
      __PYX_ERR(0, 153, __pyx_L1_error)
    } else {__pyx_pybuffernd_i_vec.diminfo[0].strides = __pyx_pybuffernd_i_vec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_i_vec.diminfo[0].shape = __pyx_pybuffernd_i_vec.rcbuffer->pybuffer.shape[0];
    }
  }
  __pyx_t_7 = 0;
  __pyx_v_i_vec = ((PyArrayObject *)__pyx_t_1);
  __pyx_t_1 = 0;
+154:         int n = r_vec.size
  __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error))
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_r_vec), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_n = __pyx_t_4;
 155: 
+156:     assert r.shape == theta.shape, "Radius of complex vector must have same shape as the angled part"
  __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error))
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(!Py_OptimizeFlag)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_theta, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_8)) {
      PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Radius_of_complex_vector_must_ha);
      __PYX_ERR(0, 156, __pyx_L1_error)
    }
  }
  #endif
 157: 
+158:     if n == 1:
  __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error))
  __pyx_t_8 = ((__pyx_v_n == 1) != 0);
  if (__pyx_t_8) {
/* … */
  }
+159:         c = _dilog_complex(r_vec[0], i_vec[0])
    __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error))
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc__dilog_complex((*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_pybuffernd_r_vec.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_r_vec.diminfo[0].strides)), (*__Pyx_BufPtrStrided1d(npy_float64 *, __pyx_pybuffernd_i_vec.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_i_vec.diminfo[0].strides)));
+160:         return c.real + 1j * c.imag
    __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error))
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_11 = __Pyx_c_sum_double(__pyx_t_double_complex_from_parts(__pyx_v_c.real, 0), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(0, 1.0), __pyx_t_double_complex_from_parts(__pyx_v_c.imag, 0)));
    __pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
+161:     if threaded:
  __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error))
  __pyx_t_8 = (__pyx_v_threaded != 0);
  if (__pyx_t_8) {
/* … */
    goto __pyx_L4;
  }
+162:         mapc_dbl_p(_dilog_complex, r_vec, i_vec, n)
    __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error))
    __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_r_vec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 162, __pyx_L1_error)
    __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_i_vec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 162, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_mapc_dbl_p(__pyx_f_7copulae_7special_9_specfunc__dilog_complex, __pyx_t_12, __pyx_t_13, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
    __pyx_t_12.memview = NULL;
    __pyx_t_12.data = NULL;
    __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
    __pyx_t_13.memview = NULL;
    __pyx_t_13.data = NULL;
 163:     else:
+164:         mapc_dbl_s(_dilog_complex, r_vec, i_vec, n)
  __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error))
  /*else*/ {
    __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_r_vec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 164, __pyx_L1_error)
    __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(((PyObject *)__pyx_v_i_vec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 164, __pyx_L1_error)
    __pyx_f_7copulae_7special_9_specfunc_mapc_dbl_s(__pyx_f_7copulae_7special_9_specfunc__dilog_complex, __pyx_t_13, __pyx_t_12, __pyx_v_n);
    __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
    __pyx_t_13.memview = NULL;
    __pyx_t_13.data = NULL;
    __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
    __pyx_t_12.memview = NULL;
    __pyx_t_12.data = NULL;
  }
  __pyx_L4:;
 165: 
+166:     return (r_vec + 1j * i_vec).reshape(r.shape)
  __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error))
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyComplex_FromDoubles(0.0, 1.0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = PyNumber_Multiply(__pyx_t_5, ((PyObject *)__pyx_v_i_vec)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_v_r_vec), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;
 167: 
 168: 
+169: cdef double angle_restrict_pos_err(double theta) nogil:
static double __pyx_f_7copulae_7special_9_specfunc_angle_restrict_pos_err(double __pyx_v_theta) {
  double __pyx_v_two_pi;
  double __pyx_v_y;
  double __pyx_v_r;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("angle_restrict_pos_err", __pyx_f[0], 169, 1, __PYX_ERR(0, 169, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.angle_restrict_pos_err", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error))

 170:     cdef:
+171:         double two_pi = 2 * PI
  __Pyx_TraceLine(171,1,__PYX_ERR(0, 171, __pyx_L1_error))
  __pyx_v_two_pi = (2.0 * __pyx_v_7copulae_7special_9_specfunc_PI);
+172:         double y = 2 * cm.floor(theta / two_pi)
  __Pyx_TraceLine(172,1,__PYX_ERR(0, 172, __pyx_L1_error))
  __pyx_v_y = (2.0 * floor((__pyx_v_theta / __pyx_v_two_pi)));
+173:         double r = theta - y * 2 * two_pi
  __Pyx_TraceLine(173,1,__PYX_ERR(0, 173, __pyx_L1_error))
  __pyx_v_r = (__pyx_v_theta - ((__pyx_v_y * 2.0) * __pyx_v_two_pi));
 174: 
+175:     if cm.fabs(theta) > 0.0625 / DBL_EPSILON:
  __Pyx_TraceLine(175,1,__PYX_ERR(0, 175, __pyx_L1_error))
  __pyx_t_1 = ((fabs(__pyx_v_theta) > (0.0625 / __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON)) != 0);
  if (__pyx_t_1) {
/* … */
  }
+176:         return cm.NAN
    __Pyx_TraceLine(176,1,__PYX_ERR(0, 176, __pyx_L1_error))
    __pyx_r = NAN;
    goto __pyx_L0;
 177: 
+178:     if r > two_pi:
  __Pyx_TraceLine(178,1,__PYX_ERR(0, 178, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_r > __pyx_v_two_pi) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L4;
  }
+179:         r -= two_pi
    __Pyx_TraceLine(179,1,__PYX_ERR(0, 179, __pyx_L1_error))
    __pyx_v_r = (__pyx_v_r - __pyx_v_two_pi);
+180:     elif r < 0:
  __Pyx_TraceLine(180,1,__PYX_ERR(0, 180, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_r < 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
  __pyx_L4:;
+181:         r += two_pi
    __Pyx_TraceLine(181,1,__PYX_ERR(0, 181, __pyx_L1_error))
    __pyx_v_r = (__pyx_v_r + __pyx_v_two_pi);
 182: 
+183:     return r
  __Pyx_TraceLine(183,1,__PYX_ERR(0, 183, __pyx_L1_error))
  __pyx_r = __pyx_v_r;
  goto __pyx_L0;
 184: 
 185: 
+186: cdef double cheb_eval(double[::1] constants, double x, int a, int b) nogil:
static double __pyx_f_7copulae_7special_9_specfunc_cheb_eval(__Pyx_memviewslice __pyx_v_constants, double __pyx_v_x, int __pyx_v_a, int __pyx_v_b) {
  double __pyx_v_d;
  double __pyx_v_dd;
  double __pyx_v_y;
  double __pyx_v_y2;
  size_t __pyx_v_i;
  size_t __pyx_v_n;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("cheb_eval", __pyx_f[0], 186, 1, __PYX_ERR(0, 186, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.cheb_eval", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error))

 187:     cdef:
+188:         double d = 0, dd = 0
  __Pyx_TraceLine(188,1,__PYX_ERR(0, 188, __pyx_L1_error))
  __pyx_v_d = 0.0;
  __pyx_v_dd = 0.0;
+189:         double y = (2. * x - a - b) / (b - a)
  __Pyx_TraceLine(189,1,__PYX_ERR(0, 189, __pyx_L1_error))
  __pyx_v_y = ((((2. * __pyx_v_x) - __pyx_v_a) - __pyx_v_b) / ((double)(__pyx_v_b - __pyx_v_a)));
+190:         double y2 = 2 * y
  __Pyx_TraceLine(190,1,__PYX_ERR(0, 190, __pyx_L1_error))
  __pyx_v_y2 = (2.0 * __pyx_v_y);
+191:         size_t i, n = len(constants)
  __Pyx_TraceLine(191,1,__PYX_ERR(0, 191, __pyx_L1_error))
  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_constants); 
  __pyx_v_n = __pyx_t_1;
 192: 
+193:     for i in range(n - 1, 0, -1):
  __Pyx_TraceLine(193,1,__PYX_ERR(0, 193, __pyx_L1_error))
  for (__pyx_t_1 = (__pyx_v_n - 1) + 1; __pyx_t_1 > 0 + 1; ) { __pyx_t_1-=1;
    __pyx_v_i = __pyx_t_1;
+194:         d, dd = y2 * d - dd + constants[i], d
    __Pyx_TraceLine(194,1,__PYX_ERR(0, 194, __pyx_L1_error))
    __pyx_t_2 = __pyx_v_i;
    __pyx_t_3 = (((__pyx_v_y2 * __pyx_v_d) - __pyx_v_dd) + (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_constants.data) + __pyx_t_2)) ))));
    __pyx_t_4 = __pyx_v_d;
    __pyx_v_d = __pyx_t_3;
    __pyx_v_dd = __pyx_t_4;
  }
 195: 
+196:     return y * d - dd + 0.5 * constants[0]
  __Pyx_TraceLine(196,1,__PYX_ERR(0, 196, __pyx_L1_error))
  __pyx_t_5 = 0;
  __pyx_r = (((__pyx_v_y * __pyx_v_d) - __pyx_v_dd) + (0.5 * (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_constants.data) + __pyx_t_5)) )))));
  goto __pyx_L0;
 197: 
 198: 
+199: cdef void map_dbl_p(Fn1R f, double[::1] x, int size) nogil:
static void __pyx_f_7copulae_7special_9_specfunc_map_dbl_p(__pyx_t_7copulae_7special_9_specfunc_Fn1R __pyx_v_f, __Pyx_memviewslice __pyx_v_x, CYTHON_UNUSED int __pyx_v_size) {
  int __pyx_v_i;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("map_dbl_p", __pyx_f[0], 199, 1, __PYX_ERR(0, 199, __pyx_L1_error));
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.map_dbl_p", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
}
/* … */
  __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error))

 200:     # Parallel
 201:     cdef int i
+202:     for i in prange(size, nogil=True):
  __Pyx_TraceLine(202,1,__PYX_ERR(0, 202, __pyx_L1_error))
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {
        __pyx_t_1 = __pyx_v_size;
        if (1 == 0) abort();
        {
            #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
                #undef likely
                #undef unlikely
                #define likely(x)   (x)
                #define unlikely(x) (x)
            #endif
            __pyx_t_3 = (__pyx_t_1 - 0 + 1 - 1/abs(1)) / 1;
            if (__pyx_t_3 > 0)
            {
                #ifdef _OPENMP
                #pragma omp parallel
                #endif /* _OPENMP */
                {
                    #ifdef _OPENMP
                    #pragma omp for firstprivate(__pyx_v_i) lastprivate(__pyx_v_i)
                    #endif /* _OPENMP */
                    for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_3; __pyx_t_2++){
                        {
                            __pyx_v_i = (int)(0 + 1 * __pyx_t_2);
/* … */
      __Pyx_TraceLine(202,1,__PYX_ERR(0, 202, __pyx_L4_error))
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }
+203:         x[i] = f(x[i])
                            __Pyx_TraceLine(203,1,__PYX_ERR(0, 203, __pyx_L8_error))
                            __pyx_t_4 = __pyx_v_i;
                            __pyx_t_5 = __pyx_v_i;
                            *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_x.data) + __pyx_t_5)) )) = __pyx_v_f((*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_x.data) + __pyx_t_4)) ))));
                            goto __pyx_L11;
                            __pyx_L8_error:;
                            {
                                #ifdef WITH_THREAD
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                #endif
                                #ifdef _OPENMP
                                #pragma omp flush(__pyx_parallel_exc_type)
                                #endif /* _OPENMP */
                                if (!__pyx_parallel_exc_type) {
                                  __Pyx_ErrFetchWithState(&__pyx_parallel_exc_type, &__pyx_parallel_exc_value, &__pyx_parallel_exc_tb);
                                  __pyx_parallel_filename = __pyx_filename; __pyx_parallel_lineno = __pyx_lineno; __pyx_parallel_clineno = __pyx_clineno;
                                  __Pyx_GOTREF(__pyx_parallel_exc_type);
                                }
                                #ifdef WITH_THREAD
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                #endif
                            }
                            __pyx_parallel_why = 4;
                            goto __pyx_L10;
                            __pyx_L10:;
                            #ifdef _OPENMP
                            #pragma omp critical(__pyx_parallel_lastprivates0)
                            #endif /* _OPENMP */
                            {
                                __pyx_parallel_temp0 = __pyx_v_i;
                            }
                            __pyx_L11:;
                            #ifdef _OPENMP
                            #pragma omp flush(__pyx_parallel_why)
                            #endif /* _OPENMP */
                        }
                    }
                    #ifdef _OPENMP
                    Py_END_ALLOW_THREADS
                    #else
{
#ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                    #endif
                    #endif /* _OPENMP */
                    /* Clean up any temporaries */
                    #ifdef WITH_THREAD
                    __Pyx_PyGILState_Release(__pyx_gilstate_save);
                    #endif
                    #ifndef _OPENMP
}
#endif /* _OPENMP */
                }
            }
            if (__pyx_parallel_exc_type) {
              /* This may have been overridden by a continue, break or return in another thread. Prefer the error. */
              __pyx_parallel_why = 4;
            }
            if (__pyx_parallel_why) {
              __pyx_v_i = __pyx_parallel_temp0;
              switch (__pyx_parallel_why) {
                    case 4:
                {
                    #ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                    #endif
                    __Pyx_GIVEREF(__pyx_parallel_exc_type);
                    __Pyx_ErrRestoreWithState(__pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb);
                    __pyx_filename = __pyx_parallel_filename; __pyx_lineno = __pyx_parallel_lineno; __pyx_clineno = __pyx_parallel_clineno;
                    #ifdef WITH_THREAD
                    __Pyx_PyGILState_Release(__pyx_gilstate_save);
                    #endif
                }
                goto __pyx_L4_error;
              }
            }
        }
        #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
            #undef likely
            #undef unlikely
            #define likely(x)   __builtin_expect(!!(x), 1)
            #define unlikely(x) __builtin_expect(!!(x), 0)
        #endif
      }
 204: 
 205: 
+206: cdef void map_dbl_s(Fn1R f, double[::1] x, int size) nogil:
static void __pyx_f_7copulae_7special_9_specfunc_map_dbl_s(__pyx_t_7copulae_7special_9_specfunc_Fn1R __pyx_v_f, __Pyx_memviewslice __pyx_v_x, int __pyx_v_size) {
  int __pyx_v_i;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("map_dbl_s", __pyx_f[0], 206, 1, __PYX_ERR(0, 206, __pyx_L1_error));
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.map_dbl_s", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
}
/* … */
  __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error))

 207:     # single
 208:     cdef int i
+209:     for i in range(size):
  __Pyx_TraceLine(209,1,__PYX_ERR(0, 209, __pyx_L1_error))
  __pyx_t_1 = __pyx_v_size;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
+210:         x[i] = f(x[i])
    __Pyx_TraceLine(210,1,__PYX_ERR(0, 210, __pyx_L1_error))
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = __pyx_v_i;
    *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_x.data) + __pyx_t_5)) )) = __pyx_v_f((*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_x.data) + __pyx_t_4)) ))));
  }
 211: 
 212: 
+213: cdef void mapc_dbl_p(Fn1C f, double[::1] r, double[::1] t, int size) nogil:
static void __pyx_f_7copulae_7special_9_specfunc_mapc_dbl_p(__pyx_t_7copulae_7special_9_specfunc_Fn1C __pyx_v_f, __Pyx_memviewslice __pyx_v_r, __Pyx_memviewslice __pyx_v_t, CYTHON_UNUSED int __pyx_v_size) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  int __pyx_v_i;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("mapc_dbl_p", __pyx_f[0], 213, 1, __PYX_ERR(0, 213, __pyx_L1_error));
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.mapc_dbl_p", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
}
/* … */
  __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error))

 214:     # Parallel
 215:     cdef:
 216:         ComplexResult c
 217:         int i
 218: 
+219:     for i in prange(size, nogil=True):
  __Pyx_TraceLine(219,1,__PYX_ERR(0, 219, __pyx_L1_error))
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {
        __pyx_t_1 = __pyx_v_size;
        if (1 == 0) abort();
        {
            #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
                #undef likely
                #undef unlikely
                #define likely(x)   (x)
                #define unlikely(x) (x)
            #endif
            __pyx_t_3 = (__pyx_t_1 - 0 + 1 - 1/abs(1)) / 1;
            if (__pyx_t_3 > 0)
            {
                #ifdef _OPENMP
                #pragma omp parallel
                #endif /* _OPENMP */
                {
                    #ifdef _OPENMP
                    #pragma omp for lastprivate(__pyx_v_c) firstprivate(__pyx_v_i) lastprivate(__pyx_v_i)
                    #endif /* _OPENMP */
                    for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_3; __pyx_t_2++){
                        {
                            __pyx_v_i = (int)(0 + 1 * __pyx_t_2);
/* … */
      __Pyx_TraceLine(219,1,__PYX_ERR(0, 219, __pyx_L4_error))
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L5;
        }
        __pyx_L4_error: {
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }
  }
+220:         c = f(r[i], t[i])
                            __Pyx_TraceLine(220,1,__PYX_ERR(0, 220, __pyx_L8_error))
                            __pyx_t_4 = __pyx_v_i;
                            __pyx_t_5 = __pyx_v_i;
                            __pyx_v_c = __pyx_v_f((*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_r.data) + __pyx_t_4)) ))), (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_t.data) + __pyx_t_5)) ))));
+221:         r[i] = c.real
                            __Pyx_TraceLine(221,1,__PYX_ERR(0, 221, __pyx_L8_error))
                            __pyx_t_6 = __pyx_v_c.real;
                            __pyx_t_7 = __pyx_v_i;
                            *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_r.data) + __pyx_t_7)) )) = __pyx_t_6;
+222:         t[i] = c.imag
                            __Pyx_TraceLine(222,1,__PYX_ERR(0, 222, __pyx_L8_error))
                            __pyx_t_6 = __pyx_v_c.imag;
                            __pyx_t_8 = __pyx_v_i;
                            *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_t.data) + __pyx_t_8)) )) = __pyx_t_6;
                            goto __pyx_L11;
                            __pyx_L8_error:;
                            {
                                #ifdef WITH_THREAD
                                PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                                #endif
                                #ifdef _OPENMP
                                #pragma omp flush(__pyx_parallel_exc_type)
                                #endif /* _OPENMP */
                                if (!__pyx_parallel_exc_type) {
                                  __Pyx_ErrFetchWithState(&__pyx_parallel_exc_type, &__pyx_parallel_exc_value, &__pyx_parallel_exc_tb);
                                  __pyx_parallel_filename = __pyx_filename; __pyx_parallel_lineno = __pyx_lineno; __pyx_parallel_clineno = __pyx_clineno;
                                  __Pyx_GOTREF(__pyx_parallel_exc_type);
                                }
                                #ifdef WITH_THREAD
                                __Pyx_PyGILState_Release(__pyx_gilstate_save);
                                #endif
                            }
                            __pyx_parallel_why = 4;
                            goto __pyx_L10;
                            __pyx_L10:;
                            #ifdef _OPENMP
                            #pragma omp critical(__pyx_parallel_lastprivates1)
                            #endif /* _OPENMP */
                            {
                                __pyx_parallel_temp0 = __pyx_v_c;
                                __pyx_parallel_temp1 = __pyx_v_i;
                            }
                            __pyx_L11:;
                            #ifdef _OPENMP
                            #pragma omp flush(__pyx_parallel_why)
                            #endif /* _OPENMP */
                        }
                    }
                    #ifdef _OPENMP
                    Py_END_ALLOW_THREADS
                    #else
{
#ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                    #endif
                    #endif /* _OPENMP */
                    /* Clean up any temporaries */
                    #ifdef WITH_THREAD
                    __Pyx_PyGILState_Release(__pyx_gilstate_save);
                    #endif
                    #ifndef _OPENMP
}
#endif /* _OPENMP */
                }
            }
            if (__pyx_parallel_exc_type) {
              /* This may have been overridden by a continue, break or return in another thread. Prefer the error. */
              __pyx_parallel_why = 4;
            }
            if (__pyx_parallel_why) {
              __pyx_v_c = __pyx_parallel_temp0;
              __pyx_v_i = __pyx_parallel_temp1;
              switch (__pyx_parallel_why) {
                    case 4:
                {
                    #ifdef WITH_THREAD
                    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
                    #endif
                    __Pyx_GIVEREF(__pyx_parallel_exc_type);
                    __Pyx_ErrRestoreWithState(__pyx_parallel_exc_type, __pyx_parallel_exc_value, __pyx_parallel_exc_tb);
                    __pyx_filename = __pyx_parallel_filename; __pyx_lineno = __pyx_parallel_lineno; __pyx_clineno = __pyx_parallel_clineno;
                    #ifdef WITH_THREAD
                    __Pyx_PyGILState_Release(__pyx_gilstate_save);
                    #endif
                }
                goto __pyx_L4_error;
              }
            }
        }
        #if ((defined(__APPLE__) || defined(__OSX__)) && (defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))))
            #undef likely
            #undef unlikely
            #define likely(x)   __builtin_expect(!!(x), 1)
            #define unlikely(x) __builtin_expect(!!(x), 0)
        #endif
      }
 223: 
 224: 
+225: cdef void mapc_dbl_s(Fn1C f, double[::1] r, double[::1] t, int size) nogil:
static void __pyx_f_7copulae_7special_9_specfunc_mapc_dbl_s(__pyx_t_7copulae_7special_9_specfunc_Fn1C __pyx_v_f, __Pyx_memviewslice __pyx_v_r, __Pyx_memviewslice __pyx_v_t, int __pyx_v_size) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  int __pyx_v_i;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("mapc_dbl_s", __pyx_f[0], 225, 1, __PYX_ERR(0, 225, __pyx_L1_error));
/* … */
  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.mapc_dbl_s", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
}
/* … */
  __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error))

 226:     # Single
 227:     cdef:
 228:         ComplexResult c
 229:         int i
 230: 
+231:     for i in range(size):
  __Pyx_TraceLine(231,1,__PYX_ERR(0, 231, __pyx_L1_error))
  __pyx_t_1 = __pyx_v_size;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;
+232:         c = f(r[i], t[i])
    __Pyx_TraceLine(232,1,__PYX_ERR(0, 232, __pyx_L1_error))
    __pyx_t_4 = __pyx_v_i;
    __pyx_t_5 = __pyx_v_i;
    __pyx_v_c = __pyx_v_f((*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_r.data) + __pyx_t_4)) ))), (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_t.data) + __pyx_t_5)) ))));
+233:         r[i] = c.real
    __Pyx_TraceLine(233,1,__PYX_ERR(0, 233, __pyx_L1_error))
    __pyx_t_6 = __pyx_v_c.real;
    __pyx_t_7 = __pyx_v_i;
    *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_r.data) + __pyx_t_7)) )) = __pyx_t_6;
+234:         t[i] = c.imag
    __Pyx_TraceLine(234,1,__PYX_ERR(0, 234, __pyx_L1_error))
    __pyx_t_6 = __pyx_v_c.imag;
    __pyx_t_8 = __pyx_v_i;
    *((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_t.data) + __pyx_t_8)) )) = __pyx_t_6;
  }
 235: 
 236: 
+237: cdef double _clausen(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc__clausen(double __pyx_v_x) {
  double __pyx_v_res;
  double __pyx_v_sr;
  double __pyx_v_x_cut;
  int __pyx_v_sgn;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("_clausen", __pyx_f[0], 237, 1, __PYX_ERR(0, 237, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc._clausen", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error))

 238:     cdef:
 239:         double res, sr
+240:         double x_cut = PI * DBL_EPSILON
  __Pyx_TraceLine(240,1,__PYX_ERR(0, 240, __pyx_L1_error))
  __pyx_v_x_cut = (__pyx_v_7copulae_7special_9_specfunc_PI * __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON);
+241:         int sgn = 1
  __Pyx_TraceLine(241,1,__PYX_ERR(0, 241, __pyx_L1_error))
  __pyx_v_sgn = 1;
 242: 
+243:     if x < 0:
  __Pyx_TraceLine(243,1,__PYX_ERR(0, 243, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
+244:         x = -x
    __Pyx_TraceLine(244,1,__PYX_ERR(0, 244, __pyx_L1_error))
    __pyx_v_x = (-__pyx_v_x);
+245:         sgn = -1
    __Pyx_TraceLine(245,1,__PYX_ERR(0, 245, __pyx_L1_error))
    __pyx_v_sgn = -1;
 246: 
+247:     x = sr = angle_restrict_pos_err(x)
  __Pyx_TraceLine(247,1,__PYX_ERR(0, 247, __pyx_L1_error))
  __pyx_t_2 = __pyx_f_7copulae_7special_9_specfunc_angle_restrict_pos_err(__pyx_v_x);
  __pyx_v_x = __pyx_t_2;
  __pyx_v_sr = __pyx_t_2;
 248: 
+249:     if x > PI:
  __Pyx_TraceLine(249,1,__PYX_ERR(0, 249, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > __pyx_v_7copulae_7special_9_specfunc_PI) != 0);
  if (__pyx_t_1) {
/* … */
  }
+250:         x = (6.28125 - x) + 1.9353071795864769253e-03
    __Pyx_TraceLine(250,1,__PYX_ERR(0, 250, __pyx_L1_error))
    __pyx_v_x = ((6.28125 - __pyx_v_x) + 1.9353071795864769253e-03);
+251:         sgn = -sgn
    __Pyx_TraceLine(251,1,__PYX_ERR(0, 251, __pyx_L1_error))
    __pyx_v_sgn = (-__pyx_v_sgn);
 252: 
+253:     if x == 0.0:
  __Pyx_TraceLine(253,1,__PYX_ERR(0, 253, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x == 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
+254:         return 0
    __Pyx_TraceLine(254,1,__PYX_ERR(0, 254, __pyx_L1_error))
    __pyx_r = 0.0;
    goto __pyx_L0;
+255:     elif x < x_cut:
  __Pyx_TraceLine(255,1,__PYX_ERR(0, 255, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < __pyx_v_x_cut) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L5;
  }
+256:         res = x * (1 - cm.log(x))
    __Pyx_TraceLine(256,1,__PYX_ERR(0, 256, __pyx_L1_error))
    __pyx_v_res = (__pyx_v_x * (1.0 - log(__pyx_v_x)));
 257:     else:
+258:         sr = cheb_eval(clausen_constants, 2 * (x * x / (PI ** 2) - 0.5), -1, 1)
  __Pyx_TraceLine(258,1,__PYX_ERR(0, 258, __pyx_L1_error))
  /*else*/ {
    if (unlikely(!__pyx_v_7copulae_7special_9_specfunc_clausen_constants.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("clausen_constants"); __PYX_ERR(0, 258, __pyx_L1_error) }
    __pyx_v_sr = __pyx_f_7copulae_7special_9_specfunc_cheb_eval(__pyx_v_7copulae_7special_9_specfunc_clausen_constants, (2.0 * (((__pyx_v_x * __pyx_v_x) / pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0)) - 0.5)), -1, 1);
+259:         res = x * (sr - cm.log(x))
    __Pyx_TraceLine(259,1,__PYX_ERR(0, 259, __pyx_L1_error))
    __pyx_v_res = (__pyx_v_x * (__pyx_v_sr - log(__pyx_v_x)));
  }
  __pyx_L5:;
 260: 
+261:     return res * sgn
  __Pyx_TraceLine(261,1,__PYX_ERR(0, 261, __pyx_L1_error))
  __pyx_r = (__pyx_v_res * __pyx_v_sgn);
  goto __pyx_L0;
 262: 
 263: 
+264: cdef double _debye_1(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc__debye_1(double __pyx_v_x) {
  double __pyx_v_res;
  double __pyx_v_val_infinity;
  int __pyx_v_i;
  int __pyx_v_nexp;
  double __pyx_v_total;
  double __pyx_v_ex;
  double __pyx_v_X_CUT;
  double __pyx_v_c;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("_debye_1", __pyx_f[0], 264, 1, __PYX_ERR(0, 264, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc._debye_1", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L1_error))

 265:     cdef:
+266:         double res = 0
  __Pyx_TraceLine(266,1,__PYX_ERR(0, 266, __pyx_L1_error))
  __pyx_v_res = 0.0;
+267:         double val_infinity = 1.64493406684822644
  __Pyx_TraceLine(267,1,__PYX_ERR(0, 267, __pyx_L1_error))
  __pyx_v_val_infinity = 1.64493406684822644;
 268:         int i, nexp
 269:         double total, ex
+270:         double X_CUT = -LOG_DBL_MIN
  __Pyx_TraceLine(270,1,__PYX_ERR(0, 270, __pyx_L1_error))
  __pyx_v_X_CUT = (-__pyx_v_7copulae_7special_9_specfunc_LOG_DBL_MIN);
 271: 
+272:     if x < 0:
  __Pyx_TraceLine(272,1,__PYX_ERR(0, 272, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
+273:         return cm.NAN
    __Pyx_TraceLine(273,1,__PYX_ERR(0, 273, __pyx_L1_error))
    __pyx_r = NAN;
    goto __pyx_L0;
 274: 
+275:     elif x < 2 * SQRT_DBL_EPSILON:
  __Pyx_TraceLine(275,1,__PYX_ERR(0, 275, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < (2.0 * __pyx_v_7copulae_7special_9_specfunc_SQRT_DBL_EPSILON)) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+276:         res = 1 - 0.25 * x + x ** 2 / 36.
    __Pyx_TraceLine(276,1,__PYX_ERR(0, 276, __pyx_L1_error))
    __pyx_v_res = ((1.0 - (0.25 * __pyx_v_x)) + (pow(__pyx_v_x, 2.0) / 36.));
 277: 
+278:     elif x <= 4:
  __Pyx_TraceLine(278,1,__PYX_ERR(0, 278, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x <= 4.0) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+279:         c = cheb_eval(debye1_constant, x * x / 8. - 1, -1, 1)
    __Pyx_TraceLine(279,1,__PYX_ERR(0, 279, __pyx_L1_error))
    if (unlikely(!__pyx_v_7copulae_7special_9_specfunc_debye1_constant.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("debye1_constant"); __PYX_ERR(0, 279, __pyx_L1_error) }
    __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_cheb_eval(__pyx_v_7copulae_7special_9_specfunc_debye1_constant, (((__pyx_v_x * __pyx_v_x) / 8.) - 1.0), -1, 1);
+280:         res = c  - 0.25 * x
    __Pyx_TraceLine(280,1,__PYX_ERR(0, 280, __pyx_L1_error))
    __pyx_v_res = (__pyx_v_c - (0.25 * __pyx_v_x));
 281: 
+282:     elif x <= -(M_LN2 + LOG_DBL_EPSILON):
  __Pyx_TraceLine(282,1,__PYX_ERR(0, 282, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x <= (-(__pyx_v_7copulae_7special_9_specfunc_M_LN2 + __pyx_v_7copulae_7special_9_specfunc_LOG_DBL_EPSILON))) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+283:         nexp = <int> cm.floor(X_CUT / x)
    __Pyx_TraceLine(283,1,__PYX_ERR(0, 283, __pyx_L1_error))
    __pyx_v_nexp = ((int)floor((__pyx_v_X_CUT / __pyx_v_x)));
+284:         ex = cm.exp(-x)
    __Pyx_TraceLine(284,1,__PYX_ERR(0, 284, __pyx_L1_error))
    __pyx_v_ex = exp((-__pyx_v_x));
+285:         total = 0.0
    __Pyx_TraceLine(285,1,__PYX_ERR(0, 285, __pyx_L1_error))
    __pyx_v_total = 0.0;
+286:         for i in range(nexp, 0, -1):
    __Pyx_TraceLine(286,1,__PYX_ERR(0, 286, __pyx_L1_error))
    for (__pyx_t_2 = __pyx_v_nexp; __pyx_t_2 > 0; __pyx_t_2-=1) {
      __pyx_v_i = __pyx_t_2;
+287:             total *= ex
      __Pyx_TraceLine(287,1,__PYX_ERR(0, 287, __pyx_L1_error))
      __pyx_v_total = (__pyx_v_total * __pyx_v_ex);
+288:             total += (1 + 1 / (x * i)) / i
      __Pyx_TraceLine(288,1,__PYX_ERR(0, 288, __pyx_L1_error))
      __pyx_v_total = (__pyx_v_total + ((1.0 + (1.0 / (__pyx_v_x * __pyx_v_i))) / ((double)__pyx_v_i)));
    }
 289: 
+290:         res = val_infinity / x - total * ex
    __Pyx_TraceLine(290,1,__PYX_ERR(0, 290, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_val_infinity / __pyx_v_x) - (__pyx_v_total * __pyx_v_ex));
 291: 
+292:     elif x < X_CUT:
  __Pyx_TraceLine(292,1,__PYX_ERR(0, 292, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < __pyx_v_X_CUT) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+293:         res = (val_infinity - cm.exp(-x) * (x + 1)) / x
    __Pyx_TraceLine(293,1,__PYX_ERR(0, 293, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_val_infinity - (exp((-__pyx_v_x)) * (__pyx_v_x + 1.0))) / __pyx_v_x);
 294: 
 295:     else:
+296:         res = val_infinity / x
  __Pyx_TraceLine(296,1,__PYX_ERR(0, 296, __pyx_L1_error))
  /*else*/ {
    __pyx_v_res = (__pyx_v_val_infinity / __pyx_v_x);
  }
  __pyx_L3:;
 297: 
+298:     return res
  __Pyx_TraceLine(298,1,__PYX_ERR(0, 298, __pyx_L1_error))
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;
 299: 
 300: 
+301: cdef double _debye_2(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc__debye_2(double __pyx_v_x) {
  double __pyx_v_res;
  double __pyx_v_val_infinity;
  double __pyx_v_x2;
  int __pyx_v_i;
  int __pyx_v_nexp;
  double __pyx_v_total;
  double __pyx_v_ex;
  double __pyx_v_xi;
  double __pyx_v_X_CUT;
  double __pyx_v_c;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("_debye_2", __pyx_f[0], 301, 1, __PYX_ERR(0, 301, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc._debye_2", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error))

 302:     cdef:
+303:         double res = 0
  __Pyx_TraceLine(303,1,__PYX_ERR(0, 303, __pyx_L1_error))
  __pyx_v_res = 0.0;
+304:         double val_infinity = 4.80822761263837714, x2 = x ** 2
  __Pyx_TraceLine(304,1,__PYX_ERR(0, 304, __pyx_L1_error))
  __pyx_v_val_infinity = 4.80822761263837714;
  __pyx_v_x2 = pow(__pyx_v_x, 2.0);
 305:         int i, nexp
 306:         double total, ex, xi
+307:         double X_CUT = -LOG_DBL_MIN
  __Pyx_TraceLine(307,1,__PYX_ERR(0, 307, __pyx_L1_error))
  __pyx_v_X_CUT = (-__pyx_v_7copulae_7special_9_specfunc_LOG_DBL_MIN);
 308: 
+309:     if x < 0:
  __Pyx_TraceLine(309,1,__PYX_ERR(0, 309, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
+310:         return cm.NAN
    __Pyx_TraceLine(310,1,__PYX_ERR(0, 310, __pyx_L1_error))
    __pyx_r = NAN;
    goto __pyx_L0;
 311: 
+312:     elif x < 2 * M_SQRT2 * SQRT_DBL_EPSILON:
  __Pyx_TraceLine(312,1,__PYX_ERR(0, 312, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < ((2.0 * __pyx_v_7copulae_7special_9_specfunc_M_SQRT2) * __pyx_v_7copulae_7special_9_specfunc_SQRT_DBL_EPSILON)) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+313:         res = 1 - x / 3 + x2 / 24
    __Pyx_TraceLine(313,1,__PYX_ERR(0, 313, __pyx_L1_error))
    __pyx_v_res = ((1.0 - (__pyx_v_x / 3.0)) + (__pyx_v_x2 / 24.0));
 314: 
+315:     elif x <= 4:
  __Pyx_TraceLine(315,1,__PYX_ERR(0, 315, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x <= 4.0) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+316:         c = cheb_eval(debye2_constant, x * x / 8. - 1, -1, 1)
    __Pyx_TraceLine(316,1,__PYX_ERR(0, 316, __pyx_L1_error))
    if (unlikely(!__pyx_v_7copulae_7special_9_specfunc_debye2_constant.memview)) { __Pyx_RaiseUnboundMemoryviewSliceNogil("debye2_constant"); __PYX_ERR(0, 316, __pyx_L1_error) }
    __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_cheb_eval(__pyx_v_7copulae_7special_9_specfunc_debye2_constant, (((__pyx_v_x * __pyx_v_x) / 8.) - 1.0), -1, 1);
+317:         res = c - x / 3.
    __Pyx_TraceLine(317,1,__PYX_ERR(0, 317, __pyx_L1_error))
    __pyx_v_res = (__pyx_v_c - (__pyx_v_x / 3.));
 318: 
+319:     elif x < - (M_LN2 + LOG_DBL_EPSILON):
  __Pyx_TraceLine(319,1,__PYX_ERR(0, 319, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < (-(__pyx_v_7copulae_7special_9_specfunc_M_LN2 + __pyx_v_7copulae_7special_9_specfunc_LOG_DBL_EPSILON))) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+320:         nexp = <int> cm.floor(X_CUT / x)
    __Pyx_TraceLine(320,1,__PYX_ERR(0, 320, __pyx_L1_error))
    __pyx_v_nexp = ((int)floor((__pyx_v_X_CUT / __pyx_v_x)));
+321:         ex = cm.exp(-x)
    __Pyx_TraceLine(321,1,__PYX_ERR(0, 321, __pyx_L1_error))
    __pyx_v_ex = exp((-__pyx_v_x));
+322:         total = 0.0
    __Pyx_TraceLine(322,1,__PYX_ERR(0, 322, __pyx_L1_error))
    __pyx_v_total = 0.0;
+323:         for i in range(nexp, 0, -1):
    __Pyx_TraceLine(323,1,__PYX_ERR(0, 323, __pyx_L1_error))
    for (__pyx_t_2 = __pyx_v_nexp; __pyx_t_2 > 0; __pyx_t_2-=1) {
      __pyx_v_i = __pyx_t_2;
+324:             total *= ex
      __Pyx_TraceLine(324,1,__PYX_ERR(0, 324, __pyx_L1_error))
      __pyx_v_total = (__pyx_v_total * __pyx_v_ex);
+325:             xi = x * i
      __Pyx_TraceLine(325,1,__PYX_ERR(0, 325, __pyx_L1_error))
      __pyx_v_xi = (__pyx_v_x * __pyx_v_i);
+326:             total += (1 + 2 / xi + 2 / (xi ** 2)) / i
      __Pyx_TraceLine(326,1,__PYX_ERR(0, 326, __pyx_L1_error))
      __pyx_v_total = (__pyx_v_total + (((1.0 + (2.0 / __pyx_v_xi)) + (2.0 / pow(__pyx_v_xi, 2.0))) / ((double)__pyx_v_i)));
    }
 327: 
+328:         res = val_infinity / x ** 2 - 2 * total * ex
    __Pyx_TraceLine(328,1,__PYX_ERR(0, 328, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_val_infinity / pow(__pyx_v_x, 2.0)) - ((2.0 * __pyx_v_total) * __pyx_v_ex));
 329: 
+330:     elif x < X_CUT:
  __Pyx_TraceLine(330,1,__PYX_ERR(0, 330, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x < __pyx_v_X_CUT) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+331:         total = 2 + 2 * x + x2
    __Pyx_TraceLine(331,1,__PYX_ERR(0, 331, __pyx_L1_error))
    __pyx_v_total = ((2.0 + (2.0 * __pyx_v_x)) + __pyx_v_x2);
+332:         res = (val_infinity - 2 * total * cm.exp(-x)) / x2
    __Pyx_TraceLine(332,1,__PYX_ERR(0, 332, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_val_infinity - ((2.0 * __pyx_v_total) * exp((-__pyx_v_x)))) / __pyx_v_x2);
 333: 
 334:     else:
+335:         res = val_infinity / x2
  __Pyx_TraceLine(335,1,__PYX_ERR(0, 335, __pyx_L1_error))
  /*else*/ {
    __pyx_v_res = (__pyx_v_val_infinity / __pyx_v_x2);
  }
  __pyx_L3:;
 336: 
+337:     return res
  __Pyx_TraceLine(337,1,__PYX_ERR(0, 337, __pyx_L1_error))
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;
 338: 
+339: cdef double _dilog(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc__dilog(double __pyx_v_x) {
  double __pyx_v_res;
  double __pyx_v_d1;
  double __pyx_v_d2;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("_dilog", __pyx_f[0], 339, 1, __PYX_ERR(0, 339, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc._dilog", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(339,0,__PYX_ERR(0, 339, __pyx_L1_error))

 340:     cdef:
+341:         double res = 0, d1, d2
  __Pyx_TraceLine(341,1,__PYX_ERR(0, 341, __pyx_L1_error))
  __pyx_v_res = 0.0;
 342: 
+343:     if x >= 0:
  __Pyx_TraceLine(343,1,__PYX_ERR(0, 343, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x >= 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
+344:         return dilog_xge0(x)
    __Pyx_TraceLine(344,1,__PYX_ERR(0, 344, __pyx_L1_error))
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilog_xge0(__pyx_v_x);
    goto __pyx_L0;
+345:     d1 = dilog_xge0(-x)
  __Pyx_TraceLine(345,1,__PYX_ERR(0, 345, __pyx_L1_error))
  __pyx_v_d1 = __pyx_f_7copulae_7special_9_specfunc_dilog_xge0((-__pyx_v_x));
+346:     d2 = dilog_xge0(x * x)
  __Pyx_TraceLine(346,1,__PYX_ERR(0, 346, __pyx_L1_error))
  __pyx_v_d2 = __pyx_f_7copulae_7special_9_specfunc_dilog_xge0((__pyx_v_x * __pyx_v_x));
+347:     res = 0.5 * d2 - d1
  __Pyx_TraceLine(347,1,__PYX_ERR(0, 347, __pyx_L1_error))
  __pyx_v_res = ((0.5 * __pyx_v_d2) - __pyx_v_d1);
+348:     return res
  __Pyx_TraceLine(348,1,__PYX_ERR(0, 348, __pyx_L1_error))
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;
 349: 
+350: cdef double dilog_xge0(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc_dilog_xge0(double __pyx_v_x) {
  double __pyx_v_res;
  double __pyx_v_ser;
  double __pyx_v_log_x;
  double __pyx_v_t1;
  double __pyx_v_t2;
  double __pyx_v_t3;
  int __pyx_v_i;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilog_xge0", __pyx_f[0], 350, 1, __PYX_ERR(0, 350, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilog_xge0", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(350,0,__PYX_ERR(0, 350, __pyx_L1_error))

 351:     """Calculates dilog for real :math:`x \geq 0"""
 352:     cdef:
+353:         double res = 0
  __Pyx_TraceLine(353,1,__PYX_ERR(0, 353, __pyx_L1_error))
  __pyx_v_res = 0.0;
 354:         double ser
+355:         double log_x = cm.log(x)
  __Pyx_TraceLine(355,1,__PYX_ERR(0, 355, __pyx_L1_error))
  __pyx_v_log_x = log(__pyx_v_x);
 356:         double t1, t2, t3
 357:         int i
 358: 
+359:     if x > 2:
  __Pyx_TraceLine(359,1,__PYX_ERR(0, 359, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 2.0) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+360:         ser = dilog_series_2(1. / x)
    __Pyx_TraceLine(360,1,__PYX_ERR(0, 360, __pyx_L1_error))
    __pyx_v_ser = __pyx_f_7copulae_7special_9_specfunc_dilog_series_2((1. / __pyx_v_x));
+361:         t1 = PI * PI / 3
    __Pyx_TraceLine(361,1,__PYX_ERR(0, 361, __pyx_L1_error))
    __pyx_v_t1 = ((__pyx_v_7copulae_7special_9_specfunc_PI * __pyx_v_7copulae_7special_9_specfunc_PI) / 3.0);
+362:         t2 = ser
    __Pyx_TraceLine(362,1,__PYX_ERR(0, 362, __pyx_L1_error))
    __pyx_v_t2 = __pyx_v_ser;
+363:         t3 = 0.5 * log_x ** 2
    __Pyx_TraceLine(363,1,__PYX_ERR(0, 363, __pyx_L1_error))
    __pyx_v_t3 = (0.5 * pow(__pyx_v_log_x, 2.0));
+364:         res = t1 - t2 - t3
    __Pyx_TraceLine(364,1,__PYX_ERR(0, 364, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_t1 - __pyx_v_t2) - __pyx_v_t3);
 365: 
+366:     elif x > 1.01:
  __Pyx_TraceLine(366,1,__PYX_ERR(0, 366, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 1.01) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+367:         ser = dilog_series_2(1 - 1. / x)
    __Pyx_TraceLine(367,1,__PYX_ERR(0, 367, __pyx_L1_error))
    __pyx_v_ser = __pyx_f_7copulae_7special_9_specfunc_dilog_series_2((1.0 - (1. / __pyx_v_x)));
+368:         t1 = PI ** 2 / 6
    __Pyx_TraceLine(368,1,__PYX_ERR(0, 368, __pyx_L1_error))
    __pyx_v_t1 = (pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0) / 6.0);
+369:         t2 = ser
    __Pyx_TraceLine(369,1,__PYX_ERR(0, 369, __pyx_L1_error))
    __pyx_v_t2 = __pyx_v_ser;
+370:         t3 = log_x * (cm.log(1 - 1. / x) + 0.5 * log_x)
    __Pyx_TraceLine(370,1,__PYX_ERR(0, 370, __pyx_L1_error))
    __pyx_v_t3 = (__pyx_v_log_x * (log((1.0 - (1. / __pyx_v_x))) + (0.5 * __pyx_v_log_x)));
+371:         res = t1 + t2 - t3
    __Pyx_TraceLine(371,1,__PYX_ERR(0, 371, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_t1 + __pyx_v_t2) - __pyx_v_t3);
 372: 
+373:     elif x > 1:
  __Pyx_TraceLine(373,1,__PYX_ERR(0, 373, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 1.0) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+374:         t2 = cm.log(x - 1)
    __Pyx_TraceLine(374,1,__PYX_ERR(0, 374, __pyx_L1_error))
    __pyx_v_t2 = log((__pyx_v_x - 1.0));
+375:         t3 = 0
    __Pyx_TraceLine(375,1,__PYX_ERR(0, 375, __pyx_L1_error))
    __pyx_v_t3 = 0.0;
 376: 
+377:         for i in range(8, 0, -1):
    __Pyx_TraceLine(377,1,__PYX_ERR(0, 377, __pyx_L1_error))
    for (__pyx_t_2 = 8; __pyx_t_2 > 0; __pyx_t_2-=1) {
      __pyx_v_i = __pyx_t_2;
+378:             t1 = (-1) ** (i + 1) * (1 - i * t2) / (i * i)
      __Pyx_TraceLine(378,1,__PYX_ERR(0, 378, __pyx_L1_error))
      __pyx_v_t1 = ((__Pyx_pow_long(-1L, (__pyx_v_i + 1)) * (1.0 - (__pyx_v_i * __pyx_v_t2))) / ((double)(__pyx_v_i * __pyx_v_i)));
+379:             t3 = (x - 1) * (t3 + t1)
      __Pyx_TraceLine(379,1,__PYX_ERR(0, 379, __pyx_L1_error))
      __pyx_v_t3 = ((__pyx_v_x - 1.0) * (__pyx_v_t3 + __pyx_v_t1));
    }
 380: 
+381:         res = t3 + PI * PI / 6
    __Pyx_TraceLine(381,1,__PYX_ERR(0, 381, __pyx_L1_error))
    __pyx_v_res = (__pyx_v_t3 + ((__pyx_v_7copulae_7special_9_specfunc_PI * __pyx_v_7copulae_7special_9_specfunc_PI) / 6.0));
 382: 
+383:     elif cm.fabs(x - 1) <= DBL_EPSILON * 10:
  __Pyx_TraceLine(383,1,__PYX_ERR(0, 383, __pyx_L1_error))
  __pyx_t_1 = ((fabs((__pyx_v_x - 1.0)) <= (__pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON * 10.0)) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+384:         res = PI ** 2 / 6
    __Pyx_TraceLine(384,1,__PYX_ERR(0, 384, __pyx_L1_error))
    __pyx_v_res = (pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0) / 6.0);
 385: 
+386:     elif x > 0.5:
  __Pyx_TraceLine(386,1,__PYX_ERR(0, 386, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 0.5) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+387:         ser = dilog_series_2(1 - x)
    __Pyx_TraceLine(387,1,__PYX_ERR(0, 387, __pyx_L1_error))
    __pyx_v_ser = __pyx_f_7copulae_7special_9_specfunc_dilog_series_2((1.0 - __pyx_v_x));
+388:         t1 = PI ** 2 / 6
    __Pyx_TraceLine(388,1,__PYX_ERR(0, 388, __pyx_L1_error))
    __pyx_v_t1 = (pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0) / 6.0);
+389:         t2 = ser
    __Pyx_TraceLine(389,1,__PYX_ERR(0, 389, __pyx_L1_error))
    __pyx_v_t2 = __pyx_v_ser;
+390:         t3 = log_x * cm.log(1 - x)
    __Pyx_TraceLine(390,1,__PYX_ERR(0, 390, __pyx_L1_error))
    __pyx_v_t3 = (__pyx_v_log_x * log((1.0 - __pyx_v_x)));
+391:         res = t1 - t2 - t3
    __Pyx_TraceLine(391,1,__PYX_ERR(0, 391, __pyx_L1_error))
    __pyx_v_res = ((__pyx_v_t1 - __pyx_v_t2) - __pyx_v_t3);
 392: 
+393:     elif x > 0.25:
  __Pyx_TraceLine(393,1,__PYX_ERR(0, 393, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 0.25) != 0);
  if (__pyx_t_1) {
/* … */
  }
+394:         return dilog_series_2(x)
    __Pyx_TraceLine(394,1,__PYX_ERR(0, 394, __pyx_L1_error))
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilog_series_2(__pyx_v_x);
    goto __pyx_L0;
 395: 
+396:     elif x > 0:
  __Pyx_TraceLine(396,1,__PYX_ERR(0, 396, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 0.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
  __pyx_L3:;
+397:         return dilog_series_1(x)
    __Pyx_TraceLine(397,1,__PYX_ERR(0, 397, __pyx_L1_error))
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilog_series_1(__pyx_v_x);
    goto __pyx_L0;
 398: 
+399:     return res
  __Pyx_TraceLine(399,1,__PYX_ERR(0, 399, __pyx_L1_error))
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;
 400: 
+401: cdef double dilog_series_1(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc_dilog_series_1(double __pyx_v_x) {
  double __pyx_v_rk2;
  double __pyx_v_term;
  double __pyx_v_total;
  int __pyx_v_k;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilog_series_1", __pyx_f[0], 401, 1, __PYX_ERR(0, 401, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilog_series_1", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(401,0,__PYX_ERR(0, 401, __pyx_L1_error))

 402:     cdef:
+403:         double rk2, term = x, total = x
  __Pyx_TraceLine(403,1,__PYX_ERR(0, 403, __pyx_L1_error))
  __pyx_v_term = __pyx_v_x;
  __pyx_v_total = __pyx_v_x;
 404:         int k
 405: 
+406:     for k in range(2, 1000):
  __Pyx_TraceLine(406,1,__PYX_ERR(0, 406, __pyx_L1_error))
  for (__pyx_t_1 = 2; __pyx_t_1 < 0x3E8; __pyx_t_1+=1) {
    __pyx_v_k = __pyx_t_1;
+407:         rk2 = ((k - 1.0) / k) ** 2
    __Pyx_TraceLine(407,1,__PYX_ERR(0, 407, __pyx_L1_error))
    __pyx_v_rk2 = pow(((__pyx_v_k - 1.0) / ((double)__pyx_v_k)), 2.0);
+408:         term *= x * rk2
    __Pyx_TraceLine(408,1,__PYX_ERR(0, 408, __pyx_L1_error))
    __pyx_v_term = (__pyx_v_term * (__pyx_v_x * __pyx_v_rk2));
+409:         total += term
    __Pyx_TraceLine(409,1,__PYX_ERR(0, 409, __pyx_L1_error))
    __pyx_v_total = (__pyx_v_total + __pyx_v_term);
 410: 
+411:         if cm.fabs(term / total) < DBL_EPSILON:
    __Pyx_TraceLine(411,1,__PYX_ERR(0, 411, __pyx_L1_error))
    __pyx_t_2 = ((fabs((__pyx_v_term / __pyx_v_total)) < __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON) != 0);
    if (__pyx_t_2) {
/* … */
    }
  }
+412:             return total
      __Pyx_TraceLine(412,1,__PYX_ERR(0, 412, __pyx_L1_error))
      __pyx_r = __pyx_v_total;
      goto __pyx_L0;
 413: 
 414:     # Max iteration hit. dilog_series_1 could not converge
+415:     return cm.NAN
  __Pyx_TraceLine(415,1,__PYX_ERR(0, 415, __pyx_L1_error))
  __pyx_r = NAN;
  goto __pyx_L0;
 416: 
 417: 
+418: cdef double dilog_series_2(double x) nogil:
static double __pyx_f_7copulae_7special_9_specfunc_dilog_series_2(double __pyx_v_x) {
  double __pyx_v_res;
  double __pyx_v_total;
  double __pyx_v_y;
  double __pyx_v_z;
  double __pyx_v_ds;
  int __pyx_v_k;
  double __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilog_series_2", __pyx_f[0], 418, 1, __PYX_ERR(0, 418, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilog_series_2", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(418,0,__PYX_ERR(0, 418, __pyx_L1_error))

 419:     cdef:
+420:         double res = 0
  __Pyx_TraceLine(420,1,__PYX_ERR(0, 420, __pyx_L1_error))
  __pyx_v_res = 0.0;
+421:         double total = 0.5 * x, y = x, z = 0
  __Pyx_TraceLine(421,1,__PYX_ERR(0, 421, __pyx_L1_error))
  __pyx_v_total = (0.5 * __pyx_v_x);
  __pyx_v_y = __pyx_v_x;
  __pyx_v_z = 0.0;
 422:         double ds
 423:         int k
 424: 
+425:     for k in range(2, 100):
  __Pyx_TraceLine(425,1,__PYX_ERR(0, 425, __pyx_L1_error))
  for (__pyx_t_1 = 2; __pyx_t_1 < 0x64; __pyx_t_1+=1) {
    __pyx_v_k = __pyx_t_1;
+426:         y *= x
    __Pyx_TraceLine(426,1,__PYX_ERR(0, 426, __pyx_L1_error))
    __pyx_v_y = (__pyx_v_y * __pyx_v_x);
+427:         ds = y / (k * k * (k + 1))
    __Pyx_TraceLine(427,1,__PYX_ERR(0, 427, __pyx_L1_error))
    __pyx_v_ds = (__pyx_v_y / ((double)((__pyx_v_k * __pyx_v_k) * (__pyx_v_k + 1))));
+428:         total += ds
    __Pyx_TraceLine(428,1,__PYX_ERR(0, 428, __pyx_L1_error))
    __pyx_v_total = (__pyx_v_total + __pyx_v_ds);
+429:         if k >= 10 and cm.fabs(ds / total) < 0.5 * DBL_EPSILON:
    __Pyx_TraceLine(429,1,__PYX_ERR(0, 429, __pyx_L1_error))
    __pyx_t_3 = ((__pyx_v_k >= 10) != 0);
    if (__pyx_t_3) {
    } else {
      __pyx_t_2 = __pyx_t_3;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_3 = ((fabs((__pyx_v_ds / __pyx_v_total)) < (0.5 * __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON)) != 0);
    __pyx_t_2 = __pyx_t_3;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_2) {
/* … */
    }
  }
  __pyx_L4_break:;
+430:             break
      __Pyx_TraceLine(430,1,__PYX_ERR(0, 430, __pyx_L1_error))
      goto __pyx_L4_break;
 431: 
+432:     res = total
  __Pyx_TraceLine(432,1,__PYX_ERR(0, 432, __pyx_L1_error))
  __pyx_v_res = __pyx_v_total;
 433: 
+434:     if x > 0.01:
  __Pyx_TraceLine(434,1,__PYX_ERR(0, 434, __pyx_L1_error))
  __pyx_t_2 = ((__pyx_v_x > 0.01) != 0);
  if (__pyx_t_2) {
/* … */
    goto __pyx_L8;
  }
+435:         z = (1 - x) * cm.log(1 - x) / x
    __Pyx_TraceLine(435,1,__PYX_ERR(0, 435, __pyx_L1_error))
    __pyx_v_z = (((1.0 - __pyx_v_x) * log((1.0 - __pyx_v_x))) / __pyx_v_x);
 436:     else:
+437:         for k in range(8, 1, -1):
  __Pyx_TraceLine(437,1,__PYX_ERR(0, 437, __pyx_L1_error))
  /*else*/ {
    for (__pyx_t_1 = 8; __pyx_t_1 > 1; __pyx_t_1-=1) {
      __pyx_v_k = __pyx_t_1;
+438:             z = x * (1.0 / k + z)
      __Pyx_TraceLine(438,1,__PYX_ERR(0, 438, __pyx_L1_error))
      __pyx_v_z = (__pyx_v_x * ((1.0 / ((double)__pyx_v_k)) + __pyx_v_z));
    }
+439:         z = (x - 1) * (1 + z)
    __Pyx_TraceLine(439,1,__PYX_ERR(0, 439, __pyx_L1_error))
    __pyx_v_z = ((__pyx_v_x - 1.0) * (1.0 + __pyx_v_z));
  }
  __pyx_L8:;
 440: 
+441:     return res + z + 1
  __Pyx_TraceLine(441,1,__PYX_ERR(0, 441, __pyx_L1_error))
  __pyx_r = ((__pyx_v_res + __pyx_v_z) + 1.0);
  goto __pyx_L0;
 442: 
 443: 
+444: cdef ComplexResult _dilog_complex(double r, double theta) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc__dilog_complex(double __pyx_v_r, double __pyx_v_theta) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_zeta2;
  double __pyx_v_r2;
  double __pyx_v_t1;
  double __pyx_v_t2;
  double __pyx_v_ln_minusz_re;
  double __pyx_v_ln_minusz_im;
  double __pyx_v_lmz2_re;
  double __pyx_v_lmz2_im;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("_dilog_complex", __pyx_f[0], 444, 1, __PYX_ERR(0, 444, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc._dilog_complex", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __pyx_L1_error))

 445:     cdef:
+446:         ComplexResult c = make_c_0()
  __Pyx_TraceLine(446,1,__PYX_ERR(0, 446, __pyx_L1_error))
  __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
+447:         double x = r * cm.cos(theta)
  __Pyx_TraceLine(447,1,__PYX_ERR(0, 447, __pyx_L1_error))
  __pyx_v_x = (__pyx_v_r * cos(__pyx_v_theta));
+448:         double y = r * cm.sin(theta)
  __Pyx_TraceLine(448,1,__PYX_ERR(0, 448, __pyx_L1_error))
  __pyx_v_y = (__pyx_v_r * sin(__pyx_v_theta));
+449:         double zeta2 = PI ** 2 / 6
  __Pyx_TraceLine(449,1,__PYX_ERR(0, 449, __pyx_L1_error))
  __pyx_v_zeta2 = (pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0) / 6.0);
+450:         double r2 = x * x + y * y
  __Pyx_TraceLine(450,1,__PYX_ERR(0, 450, __pyx_L1_error))
  __pyx_v_r2 = ((__pyx_v_x * __pyx_v_x) + (__pyx_v_y * __pyx_v_y));
 451:         double t1, t2
 452: 
 453:         double ln_minusz_re, ln_minusz_im, lmz2_re, lmz2_im
 454: 
+455:     if cm.fabs(y) < 10 * DBL_EPSILON:
  __Pyx_TraceLine(455,1,__PYX_ERR(0, 455, __pyx_L1_error))
  __pyx_t_1 = ((fabs(__pyx_v_y) < (10.0 * __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON)) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+456:         c.real = _dilog(x)
    __Pyx_TraceLine(456,1,__PYX_ERR(0, 456, __pyx_L1_error))
    __pyx_v_c.real = __pyx_f_7copulae_7special_9_specfunc__dilog(__pyx_v_x);
+457:         if x >= 1:
    __Pyx_TraceLine(457,1,__PYX_ERR(0, 457, __pyx_L1_error))
    __pyx_t_1 = ((__pyx_v_x >= 1.0) != 0);
    if (__pyx_t_1) {
/* … */
    }
+458:             c.imag = -PI * cm.log(x)
      __Pyx_TraceLine(458,1,__PYX_ERR(0, 458, __pyx_L1_error))
      __pyx_v_c.imag = ((-__pyx_v_7copulae_7special_9_specfunc_PI) * log(__pyx_v_x));
 459: 
+460:     elif cm.fabs(r2 - 1) <= DBL_EPSILON:
  __Pyx_TraceLine(460,1,__PYX_ERR(0, 460, __pyx_L1_error))
  __pyx_t_1 = ((fabs((__pyx_v_r2 - 1.0)) <= __pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON) != 0);
  if (__pyx_t_1) {
/* … */
    goto __pyx_L3;
  }
+461:         t1 = theta * theta / 4
    __Pyx_TraceLine(461,1,__PYX_ERR(0, 461, __pyx_L1_error))
    __pyx_v_t1 = ((__pyx_v_theta * __pyx_v_theta) / 4.0);
+462:         t2 = PI * cm.fabs(theta) / 2
    __Pyx_TraceLine(462,1,__PYX_ERR(0, 462, __pyx_L1_error))
    __pyx_v_t2 = ((__pyx_v_7copulae_7special_9_specfunc_PI * fabs(__pyx_v_theta)) / 2.0);
+463:         c.real = zeta2 + t1 - t2
    __Pyx_TraceLine(463,1,__PYX_ERR(0, 463, __pyx_L1_error))
    __pyx_v_c.real = ((__pyx_v_zeta2 + __pyx_v_t1) - __pyx_v_t2);
 464: 
+465:         c.imag = _clausen(theta)
    __Pyx_TraceLine(465,1,__PYX_ERR(0, 465, __pyx_L1_error))
    __pyx_v_c.imag = __pyx_f_7copulae_7special_9_specfunc__clausen(__pyx_v_theta);
 466: 
+467:     elif r2 < 1:
  __Pyx_TraceLine(467,1,__PYX_ERR(0, 467, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_r2 < 1.0) != 0);
  if (__pyx_t_1) {
/* … */
  }
+468:         return dilogc_unit_disk(x, y)
    __Pyx_TraceLine(468,1,__PYX_ERR(0, 468, __pyx_L1_error))
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilogc_unit_disk(__pyx_v_x, __pyx_v_y);
    goto __pyx_L0;
 469: 
 470:     else:
+471:         c = dilogc_unit_disk(x / r2, - y / r2)
  __Pyx_TraceLine(471,1,__PYX_ERR(0, 471, __pyx_L1_error))
  /*else*/ {
    __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_dilogc_unit_disk((__pyx_v_x / __pyx_v_r2), ((-__pyx_v_y) / __pyx_v_r2));
+472:         ln_minusz_re = cm.log(r)
    __Pyx_TraceLine(472,1,__PYX_ERR(0, 472, __pyx_L1_error))
    __pyx_v_ln_minusz_re = log(__pyx_v_r);
+473:         ln_minusz_im = (-1.0 if theta < 0.0 else 1.0) * (cm.fabs(theta) - PI)
    __Pyx_TraceLine(473,1,__PYX_ERR(0, 473, __pyx_L1_error))
    if (((__pyx_v_theta < 0.0) != 0)) {
      __pyx_t_2 = -1.0;
    } else {
      __pyx_t_2 = 1.0;
    }
    __pyx_v_ln_minusz_im = (__pyx_t_2 * (fabs(__pyx_v_theta) - __pyx_v_7copulae_7special_9_specfunc_PI));
+474:         lmz2_re = ln_minusz_re ** 2 - ln_minusz_im ** 2
    __Pyx_TraceLine(474,1,__PYX_ERR(0, 474, __pyx_L1_error))
    __pyx_v_lmz2_re = (pow(__pyx_v_ln_minusz_re, 2.0) - pow(__pyx_v_ln_minusz_im, 2.0));
+475:         lmz2_im = 2.0 * ln_minusz_re * ln_minusz_im
    __Pyx_TraceLine(475,1,__PYX_ERR(0, 475, __pyx_L1_error))
    __pyx_v_lmz2_im = ((2.0 * __pyx_v_ln_minusz_re) * __pyx_v_ln_minusz_im);
 476: 
+477:         c.real = -c.real - 0.5 * lmz2_re - zeta2
    __Pyx_TraceLine(477,1,__PYX_ERR(0, 477, __pyx_L1_error))
    __pyx_v_c.real = (((-__pyx_v_c.real) - (0.5 * __pyx_v_lmz2_re)) - __pyx_v_zeta2);
+478:         c.imag = -c.imag - 0.5 * lmz2_im
    __Pyx_TraceLine(478,1,__PYX_ERR(0, 478, __pyx_L1_error))
    __pyx_v_c.imag = ((-__pyx_v_c.imag) - (0.5 * __pyx_v_lmz2_im));
  }
  __pyx_L3:;
 479: 
+480:     return c
  __Pyx_TraceLine(480,1,__PYX_ERR(0, 480, __pyx_L1_error))
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;
 481: 
 482: 
+483: cdef ComplexResult complex_log(double zr, double zi) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_complex_log(double __pyx_v_zr, double __pyx_v_zi) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_res;
  double __pyx_v_ax;
  double __pyx_v_ay;
  double __pyx_v_min_;
  double __pyx_v_max_;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("complex_log", __pyx_f[0], 483, 1, __PYX_ERR(0, 483, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.complex_log", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(483,0,__PYX_ERR(0, 483, __pyx_L1_error))

 484:     cdef:
+485:         ComplexResult res = make_c_0()
  __Pyx_TraceLine(485,1,__PYX_ERR(0, 485, __pyx_L1_error))
  __pyx_v_res = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
 486:         double ax, ay, min_, max_
 487: 
+488:     if zr == 0 and zi == 0:
  __Pyx_TraceLine(488,1,__PYX_ERR(0, 488, __pyx_L1_error))
  __pyx_t_2 = ((__pyx_v_zr == 0.0) != 0);
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_zi == 0.0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {
/* … */
  }
+489:         res.real = cm.NAN
    __Pyx_TraceLine(489,1,__PYX_ERR(0, 489, __pyx_L1_error))
    __pyx_v_res.real = NAN;
+490:         res.imag = cm.NAN
    __Pyx_TraceLine(490,1,__PYX_ERR(0, 490, __pyx_L1_error))
    __pyx_v_res.imag = NAN;
+491:         return res
    __Pyx_TraceLine(491,1,__PYX_ERR(0, 491, __pyx_L1_error))
    __pyx_r = __pyx_v_res;
    goto __pyx_L0;
 492: 
+493:     ax = cm.fabs(zr)
  __Pyx_TraceLine(493,1,__PYX_ERR(0, 493, __pyx_L1_error))
  __pyx_v_ax = fabs(__pyx_v_zr);
+494:     ay = cm.fabs(zi)
  __Pyx_TraceLine(494,1,__PYX_ERR(0, 494, __pyx_L1_error))
  __pyx_v_ay = fabs(__pyx_v_zi);
+495:     min_ = cm.fmin(ax, ay)
  __Pyx_TraceLine(495,1,__PYX_ERR(0, 495, __pyx_L1_error))
  __pyx_v_min_ = fmin(__pyx_v_ax, __pyx_v_ay);
+496:     max_ = cm.fmax(ax, ay)
  __Pyx_TraceLine(496,1,__PYX_ERR(0, 496, __pyx_L1_error))
  __pyx_v_max_ = fmax(__pyx_v_ax, __pyx_v_ay);
 497: 
+498:     res.real = cm.log(max_) + 0.5 * cm.log(1 + (min_ / max_) ** 2)
  __Pyx_TraceLine(498,1,__PYX_ERR(0, 498, __pyx_L1_error))
  __pyx_v_res.real = (log(__pyx_v_max_) + (0.5 * log((1.0 + pow((__pyx_v_min_ / __pyx_v_max_), 2.0)))));
+499:     res.imag = cm.atan2(zi, zr)
  __Pyx_TraceLine(499,1,__PYX_ERR(0, 499, __pyx_L1_error))
  __pyx_v_res.imag = atan2(__pyx_v_zi, __pyx_v_zr);
 500: 
+501:     return res
  __Pyx_TraceLine(501,1,__PYX_ERR(0, 501, __pyx_L1_error))
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;
 502: 
+503: cdef inline ComplexResult dilogc_fundamental(double r, double x, double y) nogil:
static CYTHON_INLINE __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_dilogc_fundamental(double __pyx_v_r, double __pyx_v_x, double __pyx_v_y) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilogc_fundamental", __pyx_f[0], 503, 1, __PYX_ERR(0, 503, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilogc_fundamental", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error))

+504:     if r > 0.98:
  __Pyx_TraceLine(504,1,__PYX_ERR(0, 504, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_r > 0.98) != 0);
  if (__pyx_t_1) {
/* … */
  }
+505:         return dilogc_series_3(r, x, y)
    __Pyx_TraceLine(505,1,__PYX_ERR(0, 505, __pyx_L1_error))
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilogc_series_3(__pyx_v_r, __pyx_v_x, __pyx_v_y);
    goto __pyx_L0;
+506:     elif r > 0.25:
  __Pyx_TraceLine(506,1,__PYX_ERR(0, 506, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_r > 0.25) != 0);
  if (__pyx_t_1) {
/* … */
  }
+507:         return dilogc_series_2(r, x, y)
    __Pyx_TraceLine(507,1,__PYX_ERR(0, 507, __pyx_L1_error))
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilogc_series_2(__pyx_v_r, __pyx_v_x, __pyx_v_y);
    goto __pyx_L0;
 508:     else:
+509:         return dilogc_series_1(r, x, y)
  __Pyx_TraceLine(509,1,__PYX_ERR(0, 509, __pyx_L1_error))
  /*else*/ {
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilogc_series_1(__pyx_v_r, __pyx_v_x, __pyx_v_y);
    goto __pyx_L0;
  }
 510: 
 511: 
+512: cdef ComplexResult dilogc_unit_disk(double x, double y) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_dilogc_unit_disk(double __pyx_v_x, double __pyx_v_y) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_tmp_c;
  double __pyx_v_r;
  double __pyx_v_zeta2;
  double __pyx_v_x_tmp;
  double __pyx_v_y_tmp;
  double __pyx_v_r_tmp;
  double __pyx_v_lnz;
  double __pyx_v_lnomz;
  double __pyx_v_argz;
  double __pyx_v_argomz;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilogc_unit_disk", __pyx_f[0], 512, 1, __PYX_ERR(0, 512, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilogc_unit_disk", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error))

 513:     cdef:
+514:         ComplexResult c = make_c_0()
  __Pyx_TraceLine(514,1,__PYX_ERR(0, 514, __pyx_L1_error))
  __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
 515:         ComplexResult tmp_c
+516:         double r = cm.hypot(x, y)
  __Pyx_TraceLine(516,1,__PYX_ERR(0, 516, __pyx_L1_error))
  __pyx_v_r = hypot(__pyx_v_x, __pyx_v_y);
+517:         double zeta2 = PI ** 2 / 6
  __Pyx_TraceLine(517,1,__PYX_ERR(0, 517, __pyx_L1_error))
  __pyx_v_zeta2 = (pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0) / 6.0);
 518:         double x_tmp, y_tmp, r_tmp, lnz, lnomz, argz, argomz
 519: 
+520:     if x > 0.732:  # magic split value
  __Pyx_TraceLine(520,1,__PYX_ERR(0, 520, __pyx_L1_error))
  __pyx_t_1 = ((__pyx_v_x > 0.732) != 0);
  if (__pyx_t_1) {
/* … */
  }
+521:         x_tmp = 1.0 - x
    __Pyx_TraceLine(521,1,__PYX_ERR(0, 521, __pyx_L1_error))
    __pyx_v_x_tmp = (1.0 - __pyx_v_x);
+522:         y_tmp = -y
    __Pyx_TraceLine(522,1,__PYX_ERR(0, 522, __pyx_L1_error))
    __pyx_v_y_tmp = (-__pyx_v_y);
+523:         r_tmp = cm.hypot(x_tmp, y_tmp)
    __Pyx_TraceLine(523,1,__PYX_ERR(0, 523, __pyx_L1_error))
    __pyx_v_r_tmp = hypot(__pyx_v_x_tmp, __pyx_v_y_tmp);
+524:         tmp_c = dilogc_fundamental(r_tmp, x_tmp, y_tmp)
    __Pyx_TraceLine(524,1,__PYX_ERR(0, 524, __pyx_L1_error))
    __pyx_v_tmp_c = __pyx_f_7copulae_7special_9_specfunc_dilogc_fundamental(__pyx_v_r_tmp, __pyx_v_x_tmp, __pyx_v_y_tmp);
 525: 
+526:         lnz = cm.log(r)  # log(|z|)
    __Pyx_TraceLine(526,1,__PYX_ERR(0, 526, __pyx_L1_error))
    __pyx_v_lnz = log(__pyx_v_r);
+527:         lnomz = cm.log(r_tmp)  # log(|1 - z|)
    __Pyx_TraceLine(527,1,__PYX_ERR(0, 527, __pyx_L1_error))
    __pyx_v_lnomz = log(__pyx_v_r_tmp);
+528:         argz = cm.atan2(y, x)  # arg(z)
    __Pyx_TraceLine(528,1,__PYX_ERR(0, 528, __pyx_L1_error))
    __pyx_v_argz = atan2(__pyx_v_y, __pyx_v_x);
+529:         argomz = cm.atan2(y_tmp, x_tmp)  # arg(1 - z)
    __Pyx_TraceLine(529,1,__PYX_ERR(0, 529, __pyx_L1_error))
    __pyx_v_argomz = atan2(__pyx_v_y_tmp, __pyx_v_x_tmp);
 530: 
+531:         c.real = -tmp_c.real + zeta2 - lnz * lnomz + argz * argomz
    __Pyx_TraceLine(531,1,__PYX_ERR(0, 531, __pyx_L1_error))
    __pyx_v_c.real = ((((-__pyx_v_tmp_c.real) + __pyx_v_zeta2) - (__pyx_v_lnz * __pyx_v_lnomz)) + (__pyx_v_argz * __pyx_v_argomz));
+532:         c.imag = -tmp_c.imag - argz * lnomz - argomz * lnz
    __Pyx_TraceLine(532,1,__PYX_ERR(0, 532, __pyx_L1_error))
    __pyx_v_c.imag = (((-__pyx_v_tmp_c.imag) - (__pyx_v_argz * __pyx_v_lnomz)) - (__pyx_v_argomz * __pyx_v_lnz));
 533: 
+534:         return c
    __Pyx_TraceLine(534,1,__PYX_ERR(0, 534, __pyx_L1_error))
    __pyx_r = __pyx_v_c;
    goto __pyx_L0;
 535:     else:
+536:         return dilogc_fundamental(r, x, y)
  __Pyx_TraceLine(536,1,__PYX_ERR(0, 536, __pyx_L1_error))
  /*else*/ {
    __pyx_r = __pyx_f_7copulae_7special_9_specfunc_dilogc_fundamental(__pyx_v_r, __pyx_v_x, __pyx_v_y);
    goto __pyx_L0;
  }
 537: 
 538: 
+539: cdef ComplexResult dilogc_series_1(double r, double x, double y) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_dilogc_series_1(double __pyx_v_r, double __pyx_v_x, double __pyx_v_y) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  double __pyx_v_cos_theta;
  double __pyx_v_sin_theta;
  double __pyx_v_alpha;
  double __pyx_v_beta;
  double __pyx_v_ck;
  double __pyx_v_sk;
  double __pyx_v_rk;
  double __pyx_v_real;
  double __pyx_v_imag;
  int __pyx_v_k;
  int __pyx_v_kmax;
  double __pyx_v_ck_tmp;
  double __pyx_v_dr;
  double __pyx_v_di;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilogc_series_1", __pyx_f[0], 539, 1, __PYX_ERR(0, 539, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilogc_series_1", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(539,0,__PYX_ERR(0, 539, __pyx_L1_error))

 540:     cdef:
+541:         ComplexResult c = make_c_0()
  __Pyx_TraceLine(541,1,__PYX_ERR(0, 541, __pyx_L1_error))
  __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
+542:         double cos_theta = x / r
  __Pyx_TraceLine(542,1,__PYX_ERR(0, 542, __pyx_L1_error))
  __pyx_v_cos_theta = (__pyx_v_x / __pyx_v_r);
+543:         double sin_theta = y / r
  __Pyx_TraceLine(543,1,__PYX_ERR(0, 543, __pyx_L1_error))
  __pyx_v_sin_theta = (__pyx_v_y / __pyx_v_r);
+544:         double alpha = 1 - cos_theta
  __Pyx_TraceLine(544,1,__PYX_ERR(0, 544, __pyx_L1_error))
  __pyx_v_alpha = (1.0 - __pyx_v_cos_theta);
+545:         double beta = sin_theta
  __Pyx_TraceLine(545,1,__PYX_ERR(0, 545, __pyx_L1_error))
  __pyx_v_beta = __pyx_v_sin_theta;
+546:         double ck = cos_theta
  __Pyx_TraceLine(546,1,__PYX_ERR(0, 546, __pyx_L1_error))
  __pyx_v_ck = __pyx_v_cos_theta;
+547:         double sk = sin_theta
  __Pyx_TraceLine(547,1,__PYX_ERR(0, 547, __pyx_L1_error))
  __pyx_v_sk = __pyx_v_sin_theta;
+548:         double rk = r
  __Pyx_TraceLine(548,1,__PYX_ERR(0, 548, __pyx_L1_error))
  __pyx_v_rk = __pyx_v_r;
+549:         double real = r * ck
  __Pyx_TraceLine(549,1,__PYX_ERR(0, 549, __pyx_L1_error))
  __pyx_v_real = (__pyx_v_r * __pyx_v_ck);
+550:         double imag = r * sk
  __Pyx_TraceLine(550,1,__PYX_ERR(0, 550, __pyx_L1_error))
  __pyx_v_imag = (__pyx_v_r * __pyx_v_sk);
+551:         int k, kmax = 50 + <int> (-22 / cm.log(r))
  __Pyx_TraceLine(551,1,__PYX_ERR(0, 551, __pyx_L1_error))
  __pyx_v_kmax = (50 + ((int)(-22.0 / log(__pyx_v_r))));
 552: 
+553:     for k in range(2, kmax):
  __Pyx_TraceLine(553,1,__PYX_ERR(0, 553, __pyx_L1_error))
  __pyx_t_1 = __pyx_v_kmax;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 2; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_k = __pyx_t_3;
+554:         ck_tmp = ck
    __Pyx_TraceLine(554,1,__PYX_ERR(0, 554, __pyx_L1_error))
    __pyx_v_ck_tmp = __pyx_v_ck;
+555:         ck = ck - (alpha * ck + beta * sk)
    __Pyx_TraceLine(555,1,__PYX_ERR(0, 555, __pyx_L1_error))
    __pyx_v_ck = (__pyx_v_ck - ((__pyx_v_alpha * __pyx_v_ck) + (__pyx_v_beta * __pyx_v_sk)));
+556:         sk = sk - (alpha * sk - beta * ck_tmp)
    __Pyx_TraceLine(556,1,__PYX_ERR(0, 556, __pyx_L1_error))
    __pyx_v_sk = (__pyx_v_sk - ((__pyx_v_alpha * __pyx_v_sk) - (__pyx_v_beta * __pyx_v_ck_tmp)));
+557:         rk *= r
    __Pyx_TraceLine(557,1,__PYX_ERR(0, 557, __pyx_L1_error))
    __pyx_v_rk = (__pyx_v_rk * __pyx_v_r);
+558:         dr = rk / (k * k) * ck
    __Pyx_TraceLine(558,1,__PYX_ERR(0, 558, __pyx_L1_error))
    __pyx_v_dr = ((__pyx_v_rk / ((double)(__pyx_v_k * __pyx_v_k))) * __pyx_v_ck);
+559:         di = rk / (k * k) * sk
    __Pyx_TraceLine(559,1,__PYX_ERR(0, 559, __pyx_L1_error))
    __pyx_v_di = ((__pyx_v_rk / ((double)(__pyx_v_k * __pyx_v_k))) * __pyx_v_sk);
+560:         real += dr
    __Pyx_TraceLine(560,1,__PYX_ERR(0, 560, __pyx_L1_error))
    __pyx_v_real = (__pyx_v_real + __pyx_v_dr);
+561:         imag += di
    __Pyx_TraceLine(561,1,__PYX_ERR(0, 561, __pyx_L1_error))
    __pyx_v_imag = (__pyx_v_imag + __pyx_v_di);
+562:         if cm.fabs((dr * dr + di * di) / (real ** 2 + imag ** 2)) < DBL_EPSILON ** 2:
    __Pyx_TraceLine(562,1,__PYX_ERR(0, 562, __pyx_L1_error))
    __pyx_t_4 = ((fabs((((__pyx_v_dr * __pyx_v_dr) + (__pyx_v_di * __pyx_v_di)) / (pow(__pyx_v_real, 2.0) + pow(__pyx_v_imag, 2.0)))) < pow(__pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON, 2.0)) != 0);
    if (__pyx_t_4) {
/* … */
    }
  }
  __pyx_L4_break:;
+563:             break
      __Pyx_TraceLine(563,1,__PYX_ERR(0, 563, __pyx_L1_error))
      goto __pyx_L4_break;
 564: 
+565:     c.real = real
  __Pyx_TraceLine(565,1,__PYX_ERR(0, 565, __pyx_L1_error))
  __pyx_v_c.real = __pyx_v_real;
+566:     c.imag = imag
  __Pyx_TraceLine(566,1,__PYX_ERR(0, 566, __pyx_L1_error))
  __pyx_v_c.imag = __pyx_v_imag;
+567:     return c
  __Pyx_TraceLine(567,1,__PYX_ERR(0, 567, __pyx_L1_error))
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;
 568: 
 569: 
+570: cdef ComplexResult dilogc_series_2(double r, double x, double y) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_dilogc_series_2(double __pyx_v_r, double __pyx_v_x, double __pyx_v_y) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_ln_omz;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_sum_c;
  double __pyx_v_r2;
  double __pyx_v_tx;
  double __pyx_v_ty;
  double __pyx_v_rx;
  double __pyx_v_ry;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilogc_series_2", __pyx_f[0], 570, 1, __PYX_ERR(0, 570, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilogc_series_2", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error))

 571:     cdef:
+572:         ComplexResult c = make_c_0()
  __Pyx_TraceLine(572,1,__PYX_ERR(0, 572, __pyx_L1_error))
  __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
 573:         ComplexResult ln_omz, sum_c
+574:         double r2 = r ** 2
  __Pyx_TraceLine(574,1,__PYX_ERR(0, 574, __pyx_L1_error))
  __pyx_v_r2 = pow(__pyx_v_r, 2.0);
 575:         double tx, ty, rx, ry
 576: 
+577:     if cm.fabs(r) <= DBL_EPSILON * 10:
  __Pyx_TraceLine(577,1,__PYX_ERR(0, 577, __pyx_L1_error))
  __pyx_t_1 = ((fabs(__pyx_v_r) <= (__pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON * 10.0)) != 0);
  if (__pyx_t_1) {
/* … */
  }
+578:         return c
    __Pyx_TraceLine(578,1,__PYX_ERR(0, 578, __pyx_L1_error))
    __pyx_r = __pyx_v_c;
    goto __pyx_L0;
 579: 
+580:     sum_c = series_2_c(r, x, y)
  __Pyx_TraceLine(580,1,__PYX_ERR(0, 580, __pyx_L1_error))
  __pyx_v_sum_c = __pyx_f_7copulae_7special_9_specfunc_series_2_c(__pyx_v_r, __pyx_v_x, __pyx_v_y);
+581:     ln_omz = complex_log(1 - x, -y)
  __Pyx_TraceLine(581,1,__PYX_ERR(0, 581, __pyx_L1_error))
  __pyx_v_ln_omz = __pyx_f_7copulae_7special_9_specfunc_complex_log((1.0 - __pyx_v_x), (-__pyx_v_y));
 582: 
+583:     tx = (ln_omz.real * x + ln_omz.imag * y) / r2
  __Pyx_TraceLine(583,1,__PYX_ERR(0, 583, __pyx_L1_error))
  __pyx_v_tx = (((__pyx_v_ln_omz.real * __pyx_v_x) + (__pyx_v_ln_omz.imag * __pyx_v_y)) / __pyx_v_r2);
+584:     ty = (-ln_omz.real * y + ln_omz.imag * x) / r2
  __Pyx_TraceLine(584,1,__PYX_ERR(0, 584, __pyx_L1_error))
  __pyx_v_ty = ((((-__pyx_v_ln_omz.real) * __pyx_v_y) + (__pyx_v_ln_omz.imag * __pyx_v_x)) / __pyx_v_r2);
+585:     rx = (1 - x) * tx + y * ty
  __Pyx_TraceLine(585,1,__PYX_ERR(0, 585, __pyx_L1_error))
  __pyx_v_rx = (((1.0 - __pyx_v_x) * __pyx_v_tx) + (__pyx_v_y * __pyx_v_ty));
+586:     ry = (1 - x) * ty - y * tx
  __Pyx_TraceLine(586,1,__PYX_ERR(0, 586, __pyx_L1_error))
  __pyx_v_ry = (((1.0 - __pyx_v_x) * __pyx_v_ty) - (__pyx_v_y * __pyx_v_tx));
 587: 
+588:     c.real = sum_c.real + rx + 1
  __Pyx_TraceLine(588,1,__PYX_ERR(0, 588, __pyx_L1_error))
  __pyx_v_c.real = ((__pyx_v_sum_c.real + __pyx_v_rx) + 1.0);
+589:     c.imag = sum_c.imag + ry
  __Pyx_TraceLine(589,1,__PYX_ERR(0, 589, __pyx_L1_error))
  __pyx_v_c.imag = (__pyx_v_sum_c.imag + __pyx_v_ry);
 590: 
+591:     return c
  __Pyx_TraceLine(591,1,__PYX_ERR(0, 591, __pyx_L1_error))
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;
 592: 
+593: cdef ComplexResult dilogc_series_3(double r, double x, double y) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_dilogc_series_3(double __pyx_v_r, double __pyx_v_x, double __pyx_v_y) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  double __pyx_v_theta;
  double __pyx_v_cos_theta;
  double __pyx_v_sin_theta;
  double __pyx_v_omc;
  double __pyx_v_claus;
  double *__pyx_v_re;
  double *__pyx_v_im;
  double __pyx_v_sum_re;
  double __pyx_v_sum_im;
  double __pyx_v_a;
  double __pyx_v_an;
  double __pyx_v_nfact;
  int __pyx_v_n;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("dilogc_series_3", __pyx_f[0], 593, 1, __PYX_ERR(0, 593, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.dilogc_series_3", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(593,0,__PYX_ERR(0, 593, __pyx_L1_error))

 594:     cdef:
+595:         ComplexResult c = make_c_0()
  __Pyx_TraceLine(595,1,__PYX_ERR(0, 595, __pyx_L1_error))
  __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
+596:         double theta = cm.atan2(y, x)
  __Pyx_TraceLine(596,1,__PYX_ERR(0, 596, __pyx_L1_error))
  __pyx_v_theta = atan2(__pyx_v_y, __pyx_v_x);
+597:         double cos_theta = x / r
  __Pyx_TraceLine(597,1,__PYX_ERR(0, 597, __pyx_L1_error))
  __pyx_v_cos_theta = (__pyx_v_x / __pyx_v_r);
+598:         double sin_theta = y / r
  __Pyx_TraceLine(598,1,__PYX_ERR(0, 598, __pyx_L1_error))
  __pyx_v_sin_theta = (__pyx_v_y / __pyx_v_r);
+599:         double omc = 1.0 - cos_theta
  __Pyx_TraceLine(599,1,__PYX_ERR(0, 599, __pyx_L1_error))
  __pyx_v_omc = (1.0 - __pyx_v_cos_theta);
 600: 
+601:         double claus = _clausen(theta)
  __Pyx_TraceLine(601,1,__PYX_ERR(0, 601, __pyx_L1_error))
  __pyx_v_claus = __pyx_f_7copulae_7special_9_specfunc__clausen(__pyx_v_theta);
 602: 
+603:         double*re = [
  __Pyx_TraceLine(603,1,__PYX_ERR(0, 603, __pyx_L1_error))
  __pyx_t_1[0] = ((pow(__pyx_v_7copulae_7special_9_specfunc_PI, 2.0) / 6.0) + (0.25 * (pow(__pyx_v_theta, 2.0) - ((2.0 * __pyx_v_7copulae_7special_9_specfunc_PI) * fabs(__pyx_v_theta)))));
  __pyx_t_1[1] = (-0.5 * log((2.0 * __pyx_v_omc)));
  __pyx_t_1[2] = -0.5;
  __pyx_t_1[3] = (-0.5 / __pyx_v_omc);
  __pyx_t_1[4] = 0.0;
  __pyx_t_1[5] = ((0.5 * (2.0 + __pyx_v_cos_theta)) / pow(__pyx_v_omc, 2.0));
  __pyx_t_1[6] = 0.0;
  __pyx_v_re = __pyx_t_1;
 604:             PI ** 2 / 6 + 0.25 * (theta ** 2 - 2 * PI * cm.fabs(theta)),
 605:             -0.5 * cm.log(2 * omc),
 606:             -0.5,
 607:             -0.5 / omc,
 608:             0,
 609:             0.5 * (2.0 + cos_theta) / (omc ** 2),
 610:             0
 611:         ]
+612:         double*im = [
  __Pyx_TraceLine(612,1,__PYX_ERR(0, 612, __pyx_L1_error))
  __pyx_t_2[0] = __pyx_v_claus;
  __pyx_t_2[1] = (-atan2((-__pyx_v_sin_theta), __pyx_v_omc));
  __pyx_t_2[2] = ((0.5 * __pyx_v_sin_theta) / __pyx_v_omc);
  __pyx_t_2[3] = 0.0;
  __pyx_t_2[4] = ((-0.5 * __pyx_v_sin_theta) / pow(__pyx_v_omc, 2.0));
  __pyx_t_2[5] = 0.0;
  __pyx_t_2[6] = (((0.5 * __pyx_v_sin_theta) / pow(__pyx_v_omc, 5.0)) * ((8.0 * __pyx_v_omc) - ((__pyx_v_sin_theta * __pyx_v_sin_theta) * (3.0 + __pyx_v_cos_theta))));
  __pyx_v_im = __pyx_t_2;
 613:             claus,
 614:             -cm.atan2(-sin_theta, omc),
 615:             0.5 * sin_theta / omc,
 616:             0,
 617:             -0.5 * sin_theta / (omc ** 2),
 618:             0,
 619:             0.5 * sin_theta / (omc ** 5) * (8.0 * omc - sin_theta * sin_theta * (3.0 + cos_theta))
 620:         ]
+621:         double sum_re = re[0], sum_im = im[0]
  __Pyx_TraceLine(621,1,__PYX_ERR(0, 621, __pyx_L1_error))
  __pyx_v_sum_re = (__pyx_v_re[0]);
  __pyx_v_sum_im = (__pyx_v_im[0]);
+622:         double a = cm.log(r), an = 1.0, nfact = 1.0
  __Pyx_TraceLine(622,1,__PYX_ERR(0, 622, __pyx_L1_error))
  __pyx_v_a = log(__pyx_v_r);
  __pyx_v_an = 1.0;
  __pyx_v_nfact = 1.0;
 623:         int n
 624: 
+625:     for n in range(1, 7):
  __Pyx_TraceLine(625,1,__PYX_ERR(0, 625, __pyx_L1_error))
  for (__pyx_t_3 = 1; __pyx_t_3 < 7; __pyx_t_3+=1) {
    __pyx_v_n = __pyx_t_3;
+626:         an *= a
    __Pyx_TraceLine(626,1,__PYX_ERR(0, 626, __pyx_L1_error))
    __pyx_v_an = (__pyx_v_an * __pyx_v_a);
+627:         nfact *= n
    __Pyx_TraceLine(627,1,__PYX_ERR(0, 627, __pyx_L1_error))
    __pyx_v_nfact = (__pyx_v_nfact * __pyx_v_n);
+628:         sum_re += an / nfact * re[n]
    __Pyx_TraceLine(628,1,__PYX_ERR(0, 628, __pyx_L1_error))
    __pyx_v_sum_re = (__pyx_v_sum_re + ((__pyx_v_an / __pyx_v_nfact) * (__pyx_v_re[__pyx_v_n])));
+629:         sum_im += an / nfact * im[n]
    __Pyx_TraceLine(629,1,__PYX_ERR(0, 629, __pyx_L1_error))
    __pyx_v_sum_im = (__pyx_v_sum_im + ((__pyx_v_an / __pyx_v_nfact) * (__pyx_v_im[__pyx_v_n])));
  }
 630: 
+631:     c.real = sum_re
  __Pyx_TraceLine(631,1,__PYX_ERR(0, 631, __pyx_L1_error))
  __pyx_v_c.real = __pyx_v_sum_re;
+632:     c.imag = sum_im
  __Pyx_TraceLine(632,1,__PYX_ERR(0, 632, __pyx_L1_error))
  __pyx_v_c.imag = __pyx_v_sum_im;
+633:     return c
  __Pyx_TraceLine(633,1,__PYX_ERR(0, 633, __pyx_L1_error))
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;
 634: 
+635: cdef ComplexResult series_2_c(double r, double x, double y) nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_series_2_c(double __pyx_v_r, double __pyx_v_x, double __pyx_v_y) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  double __pyx_v_cos_theta;
  double __pyx_v_sin_theta;
  double __pyx_v_alpha;
  double __pyx_v_beta;
  double __pyx_v_ck;
  double __pyx_v_sk;
  double __pyx_v_rk;
  double __pyx_v_real;
  double __pyx_v_imag;
  double __pyx_v_ck_tmp;
  double __pyx_v_di;
  double __pyx_v_dr;
  int __pyx_v_k;
  int __pyx_v_kmax;
  double __pyx_v_limit;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("series_2_c", __pyx_f[0], 635, 1, __PYX_ERR(0, 635, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.series_2_c", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error))

 636:     cdef:
+637:         ComplexResult c = make_c_0()
  __Pyx_TraceLine(637,1,__PYX_ERR(0, 637, __pyx_L1_error))
  __pyx_v_c = __pyx_f_7copulae_7special_9_specfunc_make_c_0();
+638:         double cos_theta = x / r
  __Pyx_TraceLine(638,1,__PYX_ERR(0, 638, __pyx_L1_error))
  __pyx_v_cos_theta = (__pyx_v_x / __pyx_v_r);
+639:         double sin_theta = y / r
  __Pyx_TraceLine(639,1,__PYX_ERR(0, 639, __pyx_L1_error))
  __pyx_v_sin_theta = (__pyx_v_y / __pyx_v_r);
+640:         double alpha = 1 - cos_theta
  __Pyx_TraceLine(640,1,__PYX_ERR(0, 640, __pyx_L1_error))
  __pyx_v_alpha = (1.0 - __pyx_v_cos_theta);
+641:         double beta = sin_theta
  __Pyx_TraceLine(641,1,__PYX_ERR(0, 641, __pyx_L1_error))
  __pyx_v_beta = __pyx_v_sin_theta;
+642:         double ck = cos_theta
  __Pyx_TraceLine(642,1,__PYX_ERR(0, 642, __pyx_L1_error))
  __pyx_v_ck = __pyx_v_cos_theta;
+643:         double sk = sin_theta
  __Pyx_TraceLine(643,1,__PYX_ERR(0, 643, __pyx_L1_error))
  __pyx_v_sk = __pyx_v_sin_theta;
+644:         double rk = r
  __Pyx_TraceLine(644,1,__PYX_ERR(0, 644, __pyx_L1_error))
  __pyx_v_rk = __pyx_v_r;
+645:         double real = 0.5 * r * ck
  __Pyx_TraceLine(645,1,__PYX_ERR(0, 645, __pyx_L1_error))
  __pyx_v_real = ((0.5 * __pyx_v_r) * __pyx_v_ck);
+646:         double imag = 0.5 * r * sk
  __Pyx_TraceLine(646,1,__PYX_ERR(0, 646, __pyx_L1_error))
  __pyx_v_imag = ((0.5 * __pyx_v_r) * __pyx_v_sk);
 647:         double ck_tmp, di, dr
+648:         int k, kmax = 30 + <int> (18.0 / (-cm.log(r)))
  __Pyx_TraceLine(648,1,__PYX_ERR(0, 648, __pyx_L1_error))
  __pyx_v_kmax = (30 + ((int)(18.0 / (-log(__pyx_v_r)))));
+649:         double limit = DBL_EPSILON ** 2
  __Pyx_TraceLine(649,1,__PYX_ERR(0, 649, __pyx_L1_error))
  __pyx_v_limit = pow(__pyx_v_7copulae_7special_9_specfunc_DBL_EPSILON, 2.0);
 650: 
+651:     for k in range(2, kmax):
  __Pyx_TraceLine(651,1,__PYX_ERR(0, 651, __pyx_L1_error))
  __pyx_t_1 = __pyx_v_kmax;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 2; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_k = __pyx_t_3;
+652:         ck_tmp = ck
    __Pyx_TraceLine(652,1,__PYX_ERR(0, 652, __pyx_L1_error))
    __pyx_v_ck_tmp = __pyx_v_ck;
+653:         ck = ck - (alpha * ck + beta * sk)
    __Pyx_TraceLine(653,1,__PYX_ERR(0, 653, __pyx_L1_error))
    __pyx_v_ck = (__pyx_v_ck - ((__pyx_v_alpha * __pyx_v_ck) + (__pyx_v_beta * __pyx_v_sk)));
+654:         sk = sk - (alpha * sk - beta * ck_tmp)
    __Pyx_TraceLine(654,1,__PYX_ERR(0, 654, __pyx_L1_error))
    __pyx_v_sk = (__pyx_v_sk - ((__pyx_v_alpha * __pyx_v_sk) - (__pyx_v_beta * __pyx_v_ck_tmp)));
+655:         rk *= r
    __Pyx_TraceLine(655,1,__PYX_ERR(0, 655, __pyx_L1_error))
    __pyx_v_rk = (__pyx_v_rk * __pyx_v_r);
+656:         dr = rk / (k * k * (k + 1.0)) * ck
    __Pyx_TraceLine(656,1,__PYX_ERR(0, 656, __pyx_L1_error))
    __pyx_v_dr = ((__pyx_v_rk / ((__pyx_v_k * __pyx_v_k) * (__pyx_v_k + 1.0))) * __pyx_v_ck);
+657:         di = rk / (k * k * (k + 1.0)) * sk
    __Pyx_TraceLine(657,1,__PYX_ERR(0, 657, __pyx_L1_error))
    __pyx_v_di = ((__pyx_v_rk / ((__pyx_v_k * __pyx_v_k) * (__pyx_v_k + 1.0))) * __pyx_v_sk);
+658:         real += dr
    __Pyx_TraceLine(658,1,__PYX_ERR(0, 658, __pyx_L1_error))
    __pyx_v_real = (__pyx_v_real + __pyx_v_dr);
+659:         imag += di
    __Pyx_TraceLine(659,1,__PYX_ERR(0, 659, __pyx_L1_error))
    __pyx_v_imag = (__pyx_v_imag + __pyx_v_di);
+660:         if cm.fabs((dr ** 2 + di ** 2) / (real ** 2 + imag ** 2)) < limit:
    __Pyx_TraceLine(660,1,__PYX_ERR(0, 660, __pyx_L1_error))
    __pyx_t_4 = ((fabs(((pow(__pyx_v_dr, 2.0) + pow(__pyx_v_di, 2.0)) / (pow(__pyx_v_real, 2.0) + pow(__pyx_v_imag, 2.0)))) < __pyx_v_limit) != 0);
    if (__pyx_t_4) {
/* … */
    }
  }
  __pyx_L4_break:;
+661:             break
      __Pyx_TraceLine(661,1,__PYX_ERR(0, 661, __pyx_L1_error))
      goto __pyx_L4_break;
 662: 
+663:     c.real = real
  __Pyx_TraceLine(663,1,__PYX_ERR(0, 663, __pyx_L1_error))
  __pyx_v_c.real = __pyx_v_real;
+664:     c.imag = imag
  __Pyx_TraceLine(664,1,__PYX_ERR(0, 664, __pyx_L1_error))
  __pyx_v_c.imag = __pyx_v_imag;
+665:     return c
  __Pyx_TraceLine(665,1,__PYX_ERR(0, 665, __pyx_L1_error))
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;
 666: 
 667: 
+668: cdef ComplexResult make_c_0() nogil:
static __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_f_7copulae_7special_9_specfunc_make_c_0(void) {
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_v_c;
  __pyx_t_7copulae_7special_9_specfunc_ComplexResult __pyx_r;
  __Pyx_TraceDeclarations
  __Pyx_TraceCall("make_c_0", __pyx_f[0], 668, 1, __PYX_ERR(0, 668, __pyx_L1_error));
/* … */
  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("copulae.special._specfunc.make_c_0", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}
/* … */
  __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error))

 669:     cdef ComplexResult c
+670:     c.real, c.imag = 0, 0
  __Pyx_TraceLine(670,1,__PYX_ERR(0, 670, __pyx_L1_error))
  __pyx_t_1 = 0.0;
  __pyx_t_2 = 0.0;
  __pyx_v_c.real = __pyx_t_1;
  __pyx_v_c.imag = __pyx_t_2;
+671:     return c
  __Pyx_TraceLine(671,1,__PYX_ERR(0, 671, __pyx_L1_error))
  __pyx_r = __pyx_v_c;
  goto __pyx_L0;