glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.27.3 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "depends": [
7  "PyClical.h"
8  ],
9  "extra_compile_args": [
10  "-I.",
11  "-I..",
12  "-fno-strict-aliasing",
13  "-Wno-unused",
14  "-Wall",
15  "-std=c++11",
16  "-g",
17  "-O3",
18  "-fmessage-length=0",
19  "-grecord-gcc-switches",
20  "-O2",
21  "-Wall",
22  "-D_FORTIFY_SOURCE=2",
23  "-fstack-protector-strong",
24  "-funwind-tables",
25  "-fasynchronous-unwind-tables",
26  "-fstack-clash-protection",
27  "-finline-limit=4000",
28  "--param",
29  "inline-unit-growth=200",
30  "-funroll-loops",
31  "-fvariable-expansion-in-unroller",
32  "-DNDEBUG",
33  "-DHAVE_BITS_WORDSIZE_H",
34  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
35  "-D_GLUCAT_USE_DENSE_MATRICES",
36  "-D_GLUCAT_CHECK_ISNAN",
37  "-Wno-unused-local-typedefs",
38  "-Wno-misleading-indentation",
39  "-fno-check-new",
40  "-fexceptions"
41  ],
42  "include_dirs": [
43  ".",
44  ".."
45  ],
46  "language": "c++",
47  "name": "PyClical",
48  "sources": [
49  "PyClical.pyx"
50  ]
51  },
52  "module_name": "PyClical"
53 }
54 END: Cython Metadata */
55 
56 #define PY_SSIZE_T_CLEAN
57 #include "Python.h"
58 #ifndef Py_PYTHON_H
59  #error Python headers needed to compile C extensions, please install development version of Python.
60 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
61  #error Cython requires Python 2.6+ or Python 3.3+.
62 #else
63 #define CYTHON_ABI "0_27_3"
64 #define CYTHON_FUTURE_DIVISION 0
65 #include <stddef.h>
66 #ifndef offsetof
67  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
68 #endif
69 #if !defined(WIN32) && !defined(MS_WINDOWS)
70  #ifndef __stdcall
71  #define __stdcall
72  #endif
73  #ifndef __cdecl
74  #define __cdecl
75  #endif
76  #ifndef __fastcall
77  #define __fastcall
78  #endif
79 #endif
80 #ifndef DL_IMPORT
81  #define DL_IMPORT(t) t
82 #endif
83 #ifndef DL_EXPORT
84  #define DL_EXPORT(t) t
85 #endif
86 #define __PYX_COMMA ,
87 #ifndef HAVE_LONG_LONG
88  #if PY_VERSION_HEX >= 0x02070000
89  #define HAVE_LONG_LONG
90  #endif
91 #endif
92 #ifndef PY_LONG_LONG
93  #define PY_LONG_LONG LONG_LONG
94 #endif
95 #ifndef Py_HUGE_VAL
96  #define Py_HUGE_VAL HUGE_VAL
97 #endif
98 #ifdef PYPY_VERSION
99  #define CYTHON_COMPILING_IN_PYPY 1
100  #define CYTHON_COMPILING_IN_PYSTON 0
101  #define CYTHON_COMPILING_IN_CPYTHON 0
102  #undef CYTHON_USE_TYPE_SLOTS
103  #define CYTHON_USE_TYPE_SLOTS 0
104  #undef CYTHON_USE_PYTYPE_LOOKUP
105  #define CYTHON_USE_PYTYPE_LOOKUP 0
106  #if PY_VERSION_HEX < 0x03050000
107  #undef CYTHON_USE_ASYNC_SLOTS
108  #define CYTHON_USE_ASYNC_SLOTS 0
109  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
110  #define CYTHON_USE_ASYNC_SLOTS 1
111  #endif
112  #undef CYTHON_USE_PYLIST_INTERNALS
113  #define CYTHON_USE_PYLIST_INTERNALS 0
114  #undef CYTHON_USE_UNICODE_INTERNALS
115  #define CYTHON_USE_UNICODE_INTERNALS 0
116  #undef CYTHON_USE_UNICODE_WRITER
117  #define CYTHON_USE_UNICODE_WRITER 0
118  #undef CYTHON_USE_PYLONG_INTERNALS
119  #define CYTHON_USE_PYLONG_INTERNALS 0
120  #undef CYTHON_AVOID_BORROWED_REFS
121  #define CYTHON_AVOID_BORROWED_REFS 1
122  #undef CYTHON_ASSUME_SAFE_MACROS
123  #define CYTHON_ASSUME_SAFE_MACROS 0
124  #undef CYTHON_UNPACK_METHODS
125  #define CYTHON_UNPACK_METHODS 0
126  #undef CYTHON_FAST_THREAD_STATE
127  #define CYTHON_FAST_THREAD_STATE 0
128  #undef CYTHON_FAST_PYCALL
129  #define CYTHON_FAST_PYCALL 0
130  #undef CYTHON_PEP489_MULTI_PHASE_INIT
131  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
132  #undef CYTHON_USE_TP_FINALIZE
133  #define CYTHON_USE_TP_FINALIZE 0
134 #elif defined(PYSTON_VERSION)
135  #define CYTHON_COMPILING_IN_PYPY 0
136  #define CYTHON_COMPILING_IN_PYSTON 1
137  #define CYTHON_COMPILING_IN_CPYTHON 0
138  #ifndef CYTHON_USE_TYPE_SLOTS
139  #define CYTHON_USE_TYPE_SLOTS 1
140  #endif
141  #undef CYTHON_USE_PYTYPE_LOOKUP
142  #define CYTHON_USE_PYTYPE_LOOKUP 0
143  #undef CYTHON_USE_ASYNC_SLOTS
144  #define CYTHON_USE_ASYNC_SLOTS 0
145  #undef CYTHON_USE_PYLIST_INTERNALS
146  #define CYTHON_USE_PYLIST_INTERNALS 0
147  #ifndef CYTHON_USE_UNICODE_INTERNALS
148  #define CYTHON_USE_UNICODE_INTERNALS 1
149  #endif
150  #undef CYTHON_USE_UNICODE_WRITER
151  #define CYTHON_USE_UNICODE_WRITER 0
152  #undef CYTHON_USE_PYLONG_INTERNALS
153  #define CYTHON_USE_PYLONG_INTERNALS 0
154  #ifndef CYTHON_AVOID_BORROWED_REFS
155  #define CYTHON_AVOID_BORROWED_REFS 0
156  #endif
157  #ifndef CYTHON_ASSUME_SAFE_MACROS
158  #define CYTHON_ASSUME_SAFE_MACROS 1
159  #endif
160  #ifndef CYTHON_UNPACK_METHODS
161  #define CYTHON_UNPACK_METHODS 1
162  #endif
163  #undef CYTHON_FAST_THREAD_STATE
164  #define CYTHON_FAST_THREAD_STATE 0
165  #undef CYTHON_FAST_PYCALL
166  #define CYTHON_FAST_PYCALL 0
167  #undef CYTHON_PEP489_MULTI_PHASE_INIT
168  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
169  #undef CYTHON_USE_TP_FINALIZE
170  #define CYTHON_USE_TP_FINALIZE 0
171 #else
172  #define CYTHON_COMPILING_IN_PYPY 0
173  #define CYTHON_COMPILING_IN_PYSTON 0
174  #define CYTHON_COMPILING_IN_CPYTHON 1
175  #ifndef CYTHON_USE_TYPE_SLOTS
176  #define CYTHON_USE_TYPE_SLOTS 1
177  #endif
178  #if PY_VERSION_HEX < 0x02070000
179  #undef CYTHON_USE_PYTYPE_LOOKUP
180  #define CYTHON_USE_PYTYPE_LOOKUP 0
181  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
182  #define CYTHON_USE_PYTYPE_LOOKUP 1
183  #endif
184  #if PY_MAJOR_VERSION < 3
185  #undef CYTHON_USE_ASYNC_SLOTS
186  #define CYTHON_USE_ASYNC_SLOTS 0
187  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
188  #define CYTHON_USE_ASYNC_SLOTS 1
189  #endif
190  #if PY_VERSION_HEX < 0x02070000
191  #undef CYTHON_USE_PYLONG_INTERNALS
192  #define CYTHON_USE_PYLONG_INTERNALS 0
193  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
194  #define CYTHON_USE_PYLONG_INTERNALS 1
195  #endif
196  #ifndef CYTHON_USE_PYLIST_INTERNALS
197  #define CYTHON_USE_PYLIST_INTERNALS 1
198  #endif
199  #ifndef CYTHON_USE_UNICODE_INTERNALS
200  #define CYTHON_USE_UNICODE_INTERNALS 1
201  #endif
202  #if PY_VERSION_HEX < 0x030300F0
203  #undef CYTHON_USE_UNICODE_WRITER
204  #define CYTHON_USE_UNICODE_WRITER 0
205  #elif !defined(CYTHON_USE_UNICODE_WRITER)
206  #define CYTHON_USE_UNICODE_WRITER 1
207  #endif
208  #ifndef CYTHON_AVOID_BORROWED_REFS
209  #define CYTHON_AVOID_BORROWED_REFS 0
210  #endif
211  #ifndef CYTHON_ASSUME_SAFE_MACROS
212  #define CYTHON_ASSUME_SAFE_MACROS 1
213  #endif
214  #ifndef CYTHON_UNPACK_METHODS
215  #define CYTHON_UNPACK_METHODS 1
216  #endif
217  #ifndef CYTHON_FAST_THREAD_STATE
218  #define CYTHON_FAST_THREAD_STATE 1
219  #endif
220  #ifndef CYTHON_FAST_PYCALL
221  #define CYTHON_FAST_PYCALL 1
222  #endif
223  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
224  #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
225  #endif
226  #ifndef CYTHON_USE_TP_FINALIZE
227  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
228  #endif
229 #endif
230 #if !defined(CYTHON_FAST_PYCCALL)
231 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
232 #endif
233 #if CYTHON_USE_PYLONG_INTERNALS
234  #include "longintrepr.h"
235  #undef SHIFT
236  #undef BASE
237  #undef MASK
238 #endif
239 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
240  #define Py_OptimizeFlag 0
241 #endif
242 #define __PYX_BUILD_PY_SSIZE_T "n"
243 #define CYTHON_FORMAT_SSIZE_T "z"
244 #if PY_MAJOR_VERSION < 3
245  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
246  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
247  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
248  #define __Pyx_DefaultClassType PyClass_Type
249 #else
250  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
251  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
252  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
253  #define __Pyx_DefaultClassType PyType_Type
254 #endif
255 #ifndef Py_TPFLAGS_CHECKTYPES
256  #define Py_TPFLAGS_CHECKTYPES 0
257 #endif
258 #ifndef Py_TPFLAGS_HAVE_INDEX
259  #define Py_TPFLAGS_HAVE_INDEX 0
260 #endif
261 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
262  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
263 #endif
264 #ifndef Py_TPFLAGS_HAVE_FINALIZE
265  #define Py_TPFLAGS_HAVE_FINALIZE 0
266 #endif
267 #if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
268  #ifndef METH_FASTCALL
269  #define METH_FASTCALL 0x80
270  #endif
271  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
272  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
273  Py_ssize_t nargs, PyObject *kwnames);
274 #else
275  #define __Pyx_PyCFunctionFast _PyCFunctionFast
276  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
277 #endif
278 #if CYTHON_FAST_PYCCALL
279 #define __Pyx_PyFastCFunction_Check(func)\
280  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
281 #else
282 #define __Pyx_PyFastCFunction_Check(func) 0
283 #endif
284 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
285  #define __Pyx_PyThreadState_Current PyThreadState_GET()
286 #elif PY_VERSION_HEX >= 0x03060000
287  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
288 #elif PY_VERSION_HEX >= 0x03000000
289  #define __Pyx_PyThreadState_Current PyThreadState_GET()
290 #else
291  #define __Pyx_PyThreadState_Current _PyThreadState_Current
292 #endif
293 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
294 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
295 #else
296 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
297 #endif
298 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
299  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
300  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
301 #else
302  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
303  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
304 #endif
305 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
306  #define CYTHON_PEP393_ENABLED 1
307  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
308  0 : _PyUnicode_Ready((PyObject *)(op)))
309  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
310  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
311  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
312  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
313  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
314  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
315  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
316  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
317 #else
318  #define CYTHON_PEP393_ENABLED 0
319  #define PyUnicode_1BYTE_KIND 1
320  #define PyUnicode_2BYTE_KIND 2
321  #define PyUnicode_4BYTE_KIND 4
322  #define __Pyx_PyUnicode_READY(op) (0)
323  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
324  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
325  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
326  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
327  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
328  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
329  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
330  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
331 #endif
332 #if CYTHON_COMPILING_IN_PYPY
333  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
334  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
335 #else
336  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
337  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
338  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
339 #endif
340 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
341  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
342 #endif
343 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
344  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
345 #endif
346 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
347  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
348 #endif
349 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
350  #define PyObject_Malloc(s) PyMem_Malloc(s)
351  #define PyObject_Free(p) PyMem_Free(p)
352  #define PyObject_Realloc(p) PyMem_Realloc(p)
353 #endif
354 #if CYTHON_COMPILING_IN_PYSTON
355  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
356  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
357 #else
358  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
359  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
360 #endif
361 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
362 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
363 #if PY_MAJOR_VERSION >= 3
364  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
365 #else
366  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
367 #endif
368 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
369  #define PyObject_ASCII(o) PyObject_Repr(o)
370 #endif
371 #if PY_MAJOR_VERSION >= 3
372  #define PyBaseString_Type PyUnicode_Type
373  #define PyStringObject PyUnicodeObject
374  #define PyString_Type PyUnicode_Type
375  #define PyString_Check PyUnicode_Check
376  #define PyString_CheckExact PyUnicode_CheckExact
377 #endif
378 #if PY_MAJOR_VERSION >= 3
379  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
380  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
381 #else
382  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
383  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
384 #endif
385 #ifndef PySet_CheckExact
386  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
387 #endif
388 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
389 #if PY_MAJOR_VERSION >= 3
390  #define PyIntObject PyLongObject
391  #define PyInt_Type PyLong_Type
392  #define PyInt_Check(op) PyLong_Check(op)
393  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
394  #define PyInt_FromString PyLong_FromString
395  #define PyInt_FromUnicode PyLong_FromUnicode
396  #define PyInt_FromLong PyLong_FromLong
397  #define PyInt_FromSize_t PyLong_FromSize_t
398  #define PyInt_FromSsize_t PyLong_FromSsize_t
399  #define PyInt_AsLong PyLong_AsLong
400  #define PyInt_AS_LONG PyLong_AS_LONG
401  #define PyInt_AsSsize_t PyLong_AsSsize_t
402  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
403  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
404  #define PyNumber_Int PyNumber_Long
405 #endif
406 #if PY_MAJOR_VERSION >= 3
407  #define PyBoolObject PyLongObject
408 #endif
409 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
410  #ifndef PyUnicode_InternFromString
411  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
412  #endif
413 #endif
414 #if PY_VERSION_HEX < 0x030200A4
415  typedef long Py_hash_t;
416  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
417  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
418 #else
419  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
420  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
421 #endif
422 #if PY_MAJOR_VERSION >= 3
423  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
424 #else
425  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
426 #endif
427 #ifndef __has_attribute
428  #define __has_attribute(x) 0
429 #endif
430 #ifndef __has_cpp_attribute
431  #define __has_cpp_attribute(x) 0
432 #endif
433 #if CYTHON_USE_ASYNC_SLOTS
434  #if PY_VERSION_HEX >= 0x030500B1
435  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
436  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
437  #else
438  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
439  #endif
440 #else
441  #define __Pyx_PyType_AsAsync(obj) NULL
442 #endif
443 #ifndef __Pyx_PyAsyncMethodsStruct
444  typedef struct {
445  unaryfunc am_await;
446  unaryfunc am_aiter;
447  unaryfunc am_anext;
448  } __Pyx_PyAsyncMethodsStruct;
449 #endif
450 #ifndef CYTHON_RESTRICT
451  #if defined(__GNUC__)
452  #define CYTHON_RESTRICT __restrict__
453  #elif defined(_MSC_VER) && _MSC_VER >= 1400
454  #define CYTHON_RESTRICT __restrict
455  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
456  #define CYTHON_RESTRICT restrict
457  #else
458  #define CYTHON_RESTRICT
459  #endif
460 #endif
461 #ifndef CYTHON_UNUSED
462 # if defined(__GNUC__)
463 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
464 # define CYTHON_UNUSED __attribute__ ((__unused__))
465 # else
466 # define CYTHON_UNUSED
467 # endif
468 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
469 # define CYTHON_UNUSED __attribute__ ((__unused__))
470 # else
471 # define CYTHON_UNUSED
472 # endif
473 #endif
474 #ifndef CYTHON_MAYBE_UNUSED_VAR
475 # if defined(__cplusplus)
476  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
477 # else
478 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
479 # endif
480 #endif
481 #ifndef CYTHON_NCP_UNUSED
482 # if CYTHON_COMPILING_IN_CPYTHON
483 # define CYTHON_NCP_UNUSED
484 # else
485 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
486 # endif
487 #endif
488 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
489 #ifdef _MSC_VER
490  #ifndef _MSC_STDINT_H_
491  #if _MSC_VER < 1300
492  typedef unsigned char uint8_t;
493  typedef unsigned int uint32_t;
494  #else
495  typedef unsigned __int8 uint8_t;
496  typedef unsigned __int32 uint32_t;
497  #endif
498  #endif
499 #else
500  #include <stdint.h>
501 #endif
502 #ifndef CYTHON_FALLTHROUGH
503  #if defined(__cplusplus) && __cplusplus >= 201103L
504  #if __has_cpp_attribute(fallthrough)
505  #define CYTHON_FALLTHROUGH [[fallthrough]]
506  #elif __has_cpp_attribute(clang::fallthrough)
507  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
508  #elif __has_cpp_attribute(gnu::fallthrough)
509  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
510  #endif
511  #endif
512  #ifndef CYTHON_FALLTHROUGH
513  #if __has_attribute(fallthrough)
514  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
515  #else
516  #define CYTHON_FALLTHROUGH
517  #endif
518  #endif
519  #if defined(__clang__ ) && defined(__apple_build_version__)
520  #if __apple_build_version__ < 7000000
521  #undef CYTHON_FALLTHROUGH
522  #define CYTHON_FALLTHROUGH
523  #endif
524  #endif
525 #endif
526 
527 #ifndef __cplusplus
528  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
529 #endif
530 #ifndef CYTHON_INLINE
531  #if defined(__clang__)
532  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
533  #else
534  #define CYTHON_INLINE inline
535  #endif
536 #endif
537 template<typename T>
538 void __Pyx_call_destructor(T& x) {
539  x.~T();
540 }
541 template<typename T>
542 class __Pyx_FakeReference {
543  public:
544  __Pyx_FakeReference() : ptr(NULL) { }
545  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
546  T *operator->() { return ptr; }
547  T *operator&() { return ptr; }
548  operator T&() { return *ptr; }
549  template<typename U> bool operator ==(U other) { return *ptr == other; }
550  template<typename U> bool operator !=(U other) { return *ptr != other; }
551  private:
552  T *ptr;
553 };
554 
555 #if defined(WIN32) || defined(MS_WINDOWS)
556  #define _USE_MATH_DEFINES
557 #endif
558 #include <math.h>
559 #ifdef NAN
560 #define __PYX_NAN() ((float) NAN)
561 #else
562 static CYTHON_INLINE float __PYX_NAN() {
563  float value;
564  memset(&value, 0xFF, sizeof(value));
565  return value;
566 }
567 #endif
568 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
569 #define __Pyx_truncl trunc
570 #else
571 #define __Pyx_truncl truncl
572 #endif
573 
574 
575 #define __PYX_ERR(f_index, lineno, Ln_error) \
576 { \
577  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
578 }
579 
580 #ifndef __PYX_EXTERN_C
581  #ifdef __cplusplus
582  #define __PYX_EXTERN_C extern "C"
583  #else
584  #define __PYX_EXTERN_C extern
585  #endif
586 #endif
587 
588 #define __PYX_HAVE__PyClical
589 #define __PYX_HAVE_API__PyClical
590 #include <vector>
591 #include "ios"
592 #include "new"
593 #include "stdexcept"
594 #include "typeinfo"
595 #include "PyClical.h"
596 #ifdef _OPENMP
597 #include <omp.h>
598 #endif /* _OPENMP */
599 
600 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
601 #define CYTHON_WITHOUT_ASSERTIONS
602 #endif
603 
604 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
605  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
606 
607 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
608 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
609 #define __PYX_DEFAULT_STRING_ENCODING ""
610 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
611 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
612 #define __Pyx_uchar_cast(c) ((unsigned char)c)
613 #define __Pyx_long_cast(x) ((long)x)
614 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
615  (sizeof(type) < sizeof(Py_ssize_t)) ||\
616  (sizeof(type) > sizeof(Py_ssize_t) &&\
617  likely(v < (type)PY_SSIZE_T_MAX ||\
618  v == (type)PY_SSIZE_T_MAX) &&\
619  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
620  v == (type)PY_SSIZE_T_MIN))) ||\
621  (sizeof(type) == sizeof(Py_ssize_t) &&\
622  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
623  v == (type)PY_SSIZE_T_MAX))) )
624 #if defined (__cplusplus) && __cplusplus >= 201103L
625  #include <cstdlib>
626  #define __Pyx_sst_abs(value) std::abs(value)
627 #elif SIZEOF_INT >= SIZEOF_SIZE_T
628  #define __Pyx_sst_abs(value) abs(value)
629 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
630  #define __Pyx_sst_abs(value) labs(value)
631 #elif defined (_MSC_VER)
632  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
633 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
634  #define __Pyx_sst_abs(value) llabs(value)
635 #elif defined (__GNUC__)
636  #define __Pyx_sst_abs(value) __builtin_llabs(value)
637 #else
638  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
639 #endif
640 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
641 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
642 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
643 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
644 #define __Pyx_PyBytes_FromString PyBytes_FromString
645 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
646 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
647 #if PY_MAJOR_VERSION < 3
648  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
649  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
650 #else
651  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
652  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
653 #endif
654 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
655 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
656 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
657 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
658 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
659 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
660 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
661 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
662 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
663 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
664 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
665 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
666 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
667 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
668 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
669 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
670 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
671  const Py_UNICODE *u_end = u;
672  while (*u_end++) ;
673  return (size_t)(u_end - u - 1);
674 }
675 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
676 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
677 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
678 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
679 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
680 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
681 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
682 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
683 #define __Pyx_PySequence_Tuple(obj)\
684  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
685 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
686 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
687 #if CYTHON_ASSUME_SAFE_MACROS
688 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
689 #else
690 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
691 #endif
692 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
693 #if PY_MAJOR_VERSION >= 3
694 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
695 #else
696 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
697 #endif
698 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
699 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
700 static int __Pyx_sys_getdefaultencoding_not_ascii;
701 static int __Pyx_init_sys_getdefaultencoding_params(void) {
702  PyObject* sys;
703  PyObject* default_encoding = NULL;
704  PyObject* ascii_chars_u = NULL;
705  PyObject* ascii_chars_b = NULL;
706  const char* default_encoding_c;
707  sys = PyImport_ImportModule("sys");
708  if (!sys) goto bad;
709  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
710  Py_DECREF(sys);
711  if (!default_encoding) goto bad;
712  default_encoding_c = PyBytes_AsString(default_encoding);
713  if (!default_encoding_c) goto bad;
714  if (strcmp(default_encoding_c, "ascii") == 0) {
715  __Pyx_sys_getdefaultencoding_not_ascii = 0;
716  } else {
717  char ascii_chars[128];
718  int c;
719  for (c = 0; c < 128; c++) {
720  ascii_chars[c] = c;
721  }
722  __Pyx_sys_getdefaultencoding_not_ascii = 1;
723  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
724  if (!ascii_chars_u) goto bad;
725  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
726  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
727  PyErr_Format(
728  PyExc_ValueError,
729  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
730  default_encoding_c);
731  goto bad;
732  }
733  Py_DECREF(ascii_chars_u);
734  Py_DECREF(ascii_chars_b);
735  }
736  Py_DECREF(default_encoding);
737  return 0;
738 bad:
739  Py_XDECREF(default_encoding);
740  Py_XDECREF(ascii_chars_u);
741  Py_XDECREF(ascii_chars_b);
742  return -1;
743 }
744 #endif
745 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
746 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
747 #else
748 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
749 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
750 static char* __PYX_DEFAULT_STRING_ENCODING;
751 static int __Pyx_init_sys_getdefaultencoding_params(void) {
752  PyObject* sys;
753  PyObject* default_encoding = NULL;
754  char* default_encoding_c;
755  sys = PyImport_ImportModule("sys");
756  if (!sys) goto bad;
757  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
758  Py_DECREF(sys);
759  if (!default_encoding) goto bad;
760  default_encoding_c = PyBytes_AsString(default_encoding);
761  if (!default_encoding_c) goto bad;
762  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
763  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
764  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
765  Py_DECREF(default_encoding);
766  return 0;
767 bad:
768  Py_XDECREF(default_encoding);
769  return -1;
770 }
771 #endif
772 #endif
773 
774 
775 /* Test for GCC > 2.95 */
776 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
777  #define likely(x) __builtin_expect(!!(x), 1)
778  #define unlikely(x) __builtin_expect(!!(x), 0)
779 #else /* !__GNUC__ or GCC < 2.95 */
780  #define likely(x) (x)
781  #define unlikely(x) (x)
782 #endif /* __GNUC__ */
783 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
784 
785 static PyObject *__pyx_m = NULL;
786 static PyObject *__pyx_d;
787 static PyObject *__pyx_b;
788 static PyObject *__pyx_cython_runtime;
789 static PyObject *__pyx_empty_tuple;
790 static PyObject *__pyx_empty_bytes;
791 static PyObject *__pyx_empty_unicode;
792 static int __pyx_lineno;
793 static int __pyx_clineno = 0;
794 static const char * __pyx_cfilenm= __FILE__;
795 static const char *__pyx_filename;
796 
797 
798 static const char *__pyx_f[] = {
799  "PyClical.pyx",
800  "stringsource",
801 };
802 
803 /*--- Type declarations ---*/
804 struct __pyx_obj_8PyClical_index_set;
805 struct __pyx_obj_8PyClical_clifford;
806 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
807 struct __pyx_opt_args_8PyClical_sqrt;
808 struct __pyx_opt_args_8PyClical_log;
809 struct __pyx_opt_args_8PyClical_cos;
810 struct __pyx_opt_args_8PyClical_acos;
811 struct __pyx_opt_args_8PyClical_acosh;
812 struct __pyx_opt_args_8PyClical_sin;
813 struct __pyx_opt_args_8PyClical_asin;
814 struct __pyx_opt_args_8PyClical_asinh;
815 struct __pyx_opt_args_8PyClical_tan;
816 struct __pyx_opt_args_8PyClical_atan;
817 struct __pyx_opt_args_8PyClical_atanh;
818 struct __pyx_opt_args_8PyClical_random_clifford;
819 
820 /* "PyClical.pyx":1542
821  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
822  *
823  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
824  * """
825  * Square root of multivector with optional complexifier.
826  */
827 struct __pyx_opt_args_8PyClical_sqrt {
828  int __pyx_n;
829  PyObject *i;
830 };
831 
832 /* "PyClical.pyx":1579
833  * return clifford().wrap( glucat.exp(toClifford(obj)) )
834  *
835  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
836  * """
837  * Natural logarithm of multivector with optional complexifier.
838  */
839 struct __pyx_opt_args_8PyClical_log {
840  int __pyx_n;
841  PyObject *i;
842 };
843 
844 /* "PyClical.pyx":1602
845  * return clifford().wrap( glucat.log(toClifford(obj)) )
846  *
847  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
848  * """
849  * Cosine of multivector with optional complexifier.
850  */
851 struct __pyx_opt_args_8PyClical_cos {
852  int __pyx_n;
853  PyObject *i;
854 };
855 
856 /* "PyClical.pyx":1619
857  * return clifford().wrap( glucat.cos(toClifford(obj)) )
858  *
859  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
860  * """
861  * Inverse cosine of multivector with optional complexifier.
862  */
863 struct __pyx_opt_args_8PyClical_acos {
864  int __pyx_n;
865  PyObject *i;
866 };
867 
868 /* "PyClical.pyx":1656
869  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
870  *
871  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
872  * """
873  * Inverse hyperbolic cosine of multivector with optional complexifier.
874  */
875 struct __pyx_opt_args_8PyClical_acosh {
876  int __pyx_n;
877  PyObject *i;
878 };
879 
880 /* "PyClical.pyx":1679
881  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
882  *
883  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
884  * """
885  * Sine of multivector with optional complexifier.
886  */
887 struct __pyx_opt_args_8PyClical_sin {
888  int __pyx_n;
889  PyObject *i;
890 };
891 
892 /* "PyClical.pyx":1698
893  * return clifford().wrap( glucat.sin(toClifford(obj)) )
894  *
895  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
896  * """
897  * Inverse sine of multivector with optional complexifier.
898  */
899 struct __pyx_opt_args_8PyClical_asin {
900  int __pyx_n;
901  PyObject *i;
902 };
903 
904 /* "PyClical.pyx":1733
905  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
906  *
907  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
908  * """
909  * Inverse hyperbolic sine of multivector with optional complexifier.
910  */
911 struct __pyx_opt_args_8PyClical_asinh {
912  int __pyx_n;
913  PyObject *i;
914 };
915 
916 /* "PyClical.pyx":1752
917  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
918  *
919  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
920  * """
921  * Tangent of multivector with optional complexifier.
922  */
923 struct __pyx_opt_args_8PyClical_tan {
924  int __pyx_n;
925  PyObject *i;
926 };
927 
928 /* "PyClical.pyx":1769
929  * return clifford().wrap( glucat.tan(toClifford(obj)) )
930  *
931  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
932  * """
933  * Inverse tangent of multivector with optional complexifier.
934  */
935 struct __pyx_opt_args_8PyClical_atan {
936  int __pyx_n;
937  PyObject *i;
938 };
939 
940 /* "PyClical.pyx":1798
941  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
942  *
943  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
944  * """
945  * Inverse hyperbolic tangent of multivector with optional complexifier.
946  */
947 struct __pyx_opt_args_8PyClical_atanh {
948  int __pyx_n;
949  PyObject *i;
950 };
951 
952 /* "PyClical.pyx":1815
953  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
954  *
955  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
956  * """
957  * Random multivector within a frame.
958  */
959 struct __pyx_opt_args_8PyClical_random_clifford {
960  int __pyx_n;
961  PyObject *fill;
962 };
963 
964 /* "PyClical.pyx":37
965  *
966  * # Forward reference
967  * cdef class index_set # <<<<<<<<<<<<<<
968  *
969  * cdef inline IndexSet toIndexSet(obj):
970  */
971 struct __pyx_obj_8PyClical_index_set {
972  PyObject_HEAD
973  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
974  IndexSet *instance;
975 };
976 
977 
978 /* "PyClical.pyx":530
979  *
980  * # Forward reference.
981  * cdef class clifford # <<<<<<<<<<<<<<
982  *
983  * cdef inline Clifford toClifford(obj):
984  */
985 struct __pyx_obj_8PyClical_clifford {
986  PyObject_HEAD
987  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
988  Clifford *instance;
989 };
990 
991 
992 /* "PyClical.pyx":227
993  * return self.instance.getitem(idx)
994  *
995  * def __iter__(self): # <<<<<<<<<<<<<<
996  * """
997  * Iterate over the indices of an index_set.
998  */
999 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1000  PyObject_HEAD
1001  PyObject *__pyx_v_idx;
1002  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1003  PyObject *__pyx_t_0;
1004  Py_ssize_t __pyx_t_1;
1005  PyObject *(*__pyx_t_2)(PyObject *);
1006 };
1007 
1008 
1009 
1010 /* "PyClical.pyx":45
1011  * return index_set(obj).instance[0]
1012  *
1013  * cdef class index_set: # <<<<<<<<<<<<<<
1014  * """
1015  * Python class index_set wraps C++ class IndexSet.
1016  */
1017 
1018 struct __pyx_vtabstruct_8PyClical_index_set {
1019  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1020  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1021  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1022 };
1023 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1024 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1025 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1026 
1027 
1028 /* "PyClical.pyx":535
1029  * return clifford(obj).instance[0]
1030  *
1031  * cdef class clifford: # <<<<<<<<<<<<<<
1032  * """
1033  * Python class clifford wraps C++ class Clifford.
1034  */
1035 
1036 struct __pyx_vtabstruct_8PyClical_clifford {
1037  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1038  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1039  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1040 };
1041 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1042 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1043 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1044 
1045 /* --- Runtime support code (head) --- */
1046 /* Refnanny.proto */
1047 #ifndef CYTHON_REFNANNY
1048  #define CYTHON_REFNANNY 0
1049 #endif
1050 #if CYTHON_REFNANNY
1051  typedef struct {
1052  void (*INCREF)(void*, PyObject*, int);
1053  void (*DECREF)(void*, PyObject*, int);
1054  void (*GOTREF)(void*, PyObject*, int);
1055  void (*GIVEREF)(void*, PyObject*, int);
1056  void* (*SetupContext)(const char*, int, const char*);
1057  void (*FinishContext)(void**);
1058  } __Pyx_RefNannyAPIStruct;
1059  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1060  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1061  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1062 #ifdef WITH_THREAD
1063  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1064  if (acquire_gil) {\
1065  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1066  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1067  PyGILState_Release(__pyx_gilstate_save);\
1068  } else {\
1069  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1070  }
1071 #else
1072  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1073  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1074 #endif
1075  #define __Pyx_RefNannyFinishContext()\
1076  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1077  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1078  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1079  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1080  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1081  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1082  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1083  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1084  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1085 #else
1086  #define __Pyx_RefNannyDeclarations
1087  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1088  #define __Pyx_RefNannyFinishContext()
1089  #define __Pyx_INCREF(r) Py_INCREF(r)
1090  #define __Pyx_DECREF(r) Py_DECREF(r)
1091  #define __Pyx_GOTREF(r)
1092  #define __Pyx_GIVEREF(r)
1093  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1094  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1095  #define __Pyx_XGOTREF(r)
1096  #define __Pyx_XGIVEREF(r)
1097 #endif
1098 #define __Pyx_XDECREF_SET(r, v) do {\
1099  PyObject *tmp = (PyObject *) r;\
1100  r = v; __Pyx_XDECREF(tmp);\
1101  } while (0)
1102 #define __Pyx_DECREF_SET(r, v) do {\
1103  PyObject *tmp = (PyObject *) r;\
1104  r = v; __Pyx_DECREF(tmp);\
1105  } while (0)
1106 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1107 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1108 
1109 /* PyObjectGetAttrStr.proto */
1110 #if CYTHON_USE_TYPE_SLOTS
1111 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1112  PyTypeObject* tp = Py_TYPE(obj);
1113  if (likely(tp->tp_getattro))
1114  return tp->tp_getattro(obj, attr_name);
1115 #if PY_MAJOR_VERSION < 3
1116  if (likely(tp->tp_getattr))
1117  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1118 #endif
1119  return PyObject_GetAttr(obj, attr_name);
1120 }
1121 #else
1122 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1123 #endif
1124 
1125 /* GetBuiltinName.proto */
1126 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1127 
1128 /* PyObjectCall.proto */
1129 #if CYTHON_COMPILING_IN_CPYTHON
1130 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1131 #else
1132 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1133 #endif
1134 
1135 /* PyThreadStateGet.proto */
1136 #if CYTHON_FAST_THREAD_STATE
1137 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1138 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1139 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1140 #else
1141 #define __Pyx_PyThreadState_declare
1142 #define __Pyx_PyThreadState_assign
1143 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1144 #endif
1145 
1146 /* PyErrFetchRestore.proto */
1147 #if CYTHON_FAST_THREAD_STATE
1148 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1149 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1150 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1151 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1152 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1153 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1154 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1155 #if CYTHON_COMPILING_IN_CPYTHON
1156 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1157 #else
1158 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1159 #endif
1160 #else
1161 #define __Pyx_PyErr_Clear() PyErr_Clear()
1162 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1163 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1164 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1165 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1166 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1167 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1168 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1169 #endif
1170 
1171 /* WriteUnraisableException.proto */
1172 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1173  int lineno, const char *filename,
1174  int full_traceback, int nogil);
1175 
1176 /* PyCFunctionFastCall.proto */
1177 #if CYTHON_FAST_PYCCALL
1178 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1179 #else
1180 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1181 #endif
1182 
1183 /* PyFunctionFastCall.proto */
1184 #if CYTHON_FAST_PYCALL
1185 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1186  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1187 #if 1 || PY_VERSION_HEX < 0x030600B1
1188 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1189 #else
1190 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1191 #endif
1192 #endif
1193 
1194 /* PyObjectCallMethO.proto */
1195 #if CYTHON_COMPILING_IN_CPYTHON
1196 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1197 #endif
1198 
1199 /* PyObjectCallOneArg.proto */
1200 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1201 
1202 /* PyObjectCallNoArg.proto */
1203 #if CYTHON_COMPILING_IN_CPYTHON
1204 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1205 #else
1206 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1207 #endif
1208 
1209 /* RaiseDoubleKeywords.proto */
1210 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1211 
1212 /* ParseKeywords.proto */
1213 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1214  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1215  const char* function_name);
1216 
1217 /* RaiseArgTupleInvalid.proto */
1218 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1219  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1220 
1221 /* GetModuleGlobalName.proto */
1222 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1223 
1224 /* SaveResetException.proto */
1225 #if CYTHON_FAST_THREAD_STATE
1226 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1227 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1228 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1229 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1230 #else
1231 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1232 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1233 #endif
1234 
1235 /* PyErrExceptionMatches.proto */
1236 #if CYTHON_FAST_THREAD_STATE
1237 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1238 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1239 #else
1240 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1241 #endif
1242 
1243 /* GetException.proto */
1244 #if CYTHON_FAST_THREAD_STATE
1245 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1246 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1247 #else
1248 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1249 #endif
1250 
1251 /* RaiseException.proto */
1252 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1253 
1254 /* PyIntBinop.proto */
1255 #if !CYTHON_COMPILING_IN_PYPY
1256 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1257 #else
1258 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1259  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1260 #endif
1261 
1262 /* PySequenceContains.proto */
1263 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1264  int result = PySequence_Contains(seq, item);
1265  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1266 }
1267 
1268 /* SetItemInt.proto */
1269 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1270  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1271  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1272  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1273  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1274 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1275 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1276  int is_list, int wraparound, int boundscheck);
1277 
1278 /* ArgTypeTest.proto */
1279 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1280  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1281  __Pyx__ArgTypeTest(obj, type, name, exact))
1282 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1283 
1284 /* Import.proto */
1285 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1286 
1287 /* IncludeStringH.proto */
1288 #include <string.h>
1289 
1290 /* SetVTable.proto */
1291 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1292 
1293 /* SetupReduce.proto */
1294 static int __Pyx_setup_reduce(PyObject* type_obj);
1295 
1296 /* PyFloatBinop.proto */
1297 #if !CYTHON_COMPILING_IN_PYPY
1298 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
1299 #else
1300 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
1301  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1302  #endif
1303 
1304 /* BytesEquals.proto */
1305 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1306 
1307 /* UnicodeEquals.proto */
1308 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1309 
1310 /* StrEquals.proto */
1311 #if PY_MAJOR_VERSION >= 3
1312 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1313 #else
1314 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1315 #endif
1316 
1317 /* CLineInTraceback.proto */
1318 #ifdef CYTHON_CLINE_IN_TRACEBACK
1319 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1320 #else
1321 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1322 #endif
1323 
1324 /* CodeObjectCache.proto */
1325 typedef struct {
1326  PyCodeObject* code_object;
1327  int code_line;
1328 } __Pyx_CodeObjectCacheEntry;
1329 struct __Pyx_CodeObjectCache {
1330  int count;
1331  int max_count;
1332  __Pyx_CodeObjectCacheEntry* entries;
1333 };
1334 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1335 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1336 static PyCodeObject *__pyx_find_code_object(int code_line);
1337 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1338 
1339 /* AddTraceback.proto */
1340 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1341  int py_line, const char *filename);
1342 
1343 /* CppExceptionConversion.proto */
1344 #ifndef __Pyx_CppExn2PyErr
1345 #include <new>
1346 #include <typeinfo>
1347 #include <stdexcept>
1348 #include <ios>
1349 static void __Pyx_CppExn2PyErr() {
1350  try {
1351  if (PyErr_Occurred())
1352  ; // let the latest Python exn pass through and ignore the current one
1353  else
1354  throw;
1355  } catch (const std::bad_alloc& exn) {
1356  PyErr_SetString(PyExc_MemoryError, exn.what());
1357  } catch (const std::bad_cast& exn) {
1358  PyErr_SetString(PyExc_TypeError, exn.what());
1359  } catch (const std::bad_typeid& exn) {
1360  PyErr_SetString(PyExc_TypeError, exn.what());
1361  } catch (const std::domain_error& exn) {
1362  PyErr_SetString(PyExc_ValueError, exn.what());
1363  } catch (const std::invalid_argument& exn) {
1364  PyErr_SetString(PyExc_ValueError, exn.what());
1365  } catch (const std::ios_base::failure& exn) {
1366  PyErr_SetString(PyExc_IOError, exn.what());
1367  } catch (const std::out_of_range& exn) {
1368  PyErr_SetString(PyExc_IndexError, exn.what());
1369  } catch (const std::overflow_error& exn) {
1370  PyErr_SetString(PyExc_OverflowError, exn.what());
1371  } catch (const std::range_error& exn) {
1372  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1373  } catch (const std::underflow_error& exn) {
1374  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1375  } catch (const std::exception& exn) {
1376  PyErr_SetString(PyExc_RuntimeError, exn.what());
1377  }
1378  catch (...)
1379  {
1380  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1381  }
1382 }
1383 #endif
1384 
1385 /* CIntToPy.proto */
1386 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1387 
1388 /* CIntFromPy.proto */
1389 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1390 
1391 /* CIntToPy.proto */
1392 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1393 
1394 /* CIntFromPy.proto */
1395 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1396 
1397 /* FastTypeChecks.proto */
1398 #if CYTHON_COMPILING_IN_CPYTHON
1399 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1400 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1401 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1402 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1403 #else
1404 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1405 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1406 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1407 #endif
1408 
1409 /* FetchCommonType.proto */
1410 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1411 
1412 /* SwapException.proto */
1413 #if CYTHON_FAST_THREAD_STATE
1414 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1415 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1416 #else
1417 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1418 #endif
1419 
1420 /* PyObjectCallMethod1.proto */
1421 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1422 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
1423 
1424 /* CoroutineBase.proto */
1425 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1426 typedef struct {
1427  PyObject_HEAD
1428  __pyx_coroutine_body_t body;
1429  PyObject *closure;
1430  PyObject *exc_type;
1431  PyObject *exc_value;
1432  PyObject *exc_traceback;
1433  PyObject *gi_weakreflist;
1434  PyObject *classobj;
1435  PyObject *yieldfrom;
1436  PyObject *gi_name;
1437  PyObject *gi_qualname;
1438  PyObject *gi_modulename;
1439  int resume_label;
1440  char is_running;
1441 } __pyx_CoroutineObject;
1442 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1443  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
1444  PyObject *name, PyObject *qualname, PyObject *module_name);
1445 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1446  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
1447  PyObject *name, PyObject *qualname, PyObject *module_name);
1448 static int __Pyx_Coroutine_clear(PyObject *self);
1449 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1450 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1451 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1452 #define __Pyx_Coroutine_SwapException(self) {\
1453  __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
1454  __Pyx_Coroutine_ResetFrameBackpointer(self);\
1455  }
1456 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1457  __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
1458  (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
1459  }
1460 #if CYTHON_FAST_THREAD_STATE
1461 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1462  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1463 #else
1464 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1465  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1466 #endif
1467 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1468 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
1469 
1470 /* PatchModuleWithCoroutine.proto */
1471 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1472 
1473 /* PatchGeneratorABC.proto */
1474 static int __Pyx_patch_abc(void);
1475 
1476 /* Generator.proto */
1477 #define __Pyx_Generator_USED
1478 static PyTypeObject *__pyx_GeneratorType = 0;
1479 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1480 #define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
1481  __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
1482 static PyObject *__Pyx_Generator_Next(PyObject *self);
1483 static int __pyx_Generator_init(void);
1484 
1485 /* CheckBinaryVersion.proto */
1486 static int __Pyx_check_binary_version(void);
1487 
1488 /* InitStrings.proto */
1489 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1490 
1491 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1492 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1493 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1494 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1495 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1496 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1497 
1498 /* Module declarations from 'libcpp.vector' */
1499 
1500 /* Module declarations from 'glucat' */
1501 
1502 /* Module declarations from 'PyClical' */
1503 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1504 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1505 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1506 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1507 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1508 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1509 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1510 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1511 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1512 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1513 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1514 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1515 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1516 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1517 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1518 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1519 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1520 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1521 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1522 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1523 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1524 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1525 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1526 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1527 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1528 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1529 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1530 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1531 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1532 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1533 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1534 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1535 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1536 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1537 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1538 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1539 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1540 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1541 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1542 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1543 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1544 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_random_clifford(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_random_clifford *__pyx_optional_args); /*proto*/
1545 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1546 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1547 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1548 #define __Pyx_MODULE_NAME "PyClical"
1549 extern int __pyx_module_is_main_PyClical;
1550 int __pyx_module_is_main_PyClical = 0;
1551 
1552 /* Implementation of 'PyClical' */
1553 static PyObject *__pyx_builtin_IndexError;
1554 static PyObject *__pyx_builtin_RuntimeError;
1555 static PyObject *__pyx_builtin_TypeError;
1556 static PyObject *__pyx_builtin_ValueError;
1557 static PyObject *__pyx_builtin_NotImplemented;
1558 static PyObject *__pyx_builtin_range;
1559 static PyObject *__pyx_builtin_xrange;
1560 static const char __pyx_k_[] = ".";
1561 static const char __pyx_k_e[] = "e";
1562 static const char __pyx_k_i[] = "i";
1563 static const char __pyx_k_m[] = "m";
1564 static const char __pyx_k_p[] = "p";
1565 static const char __pyx_k_q[] = "q";
1566 static const char __pyx_k__2[] = " ";
1567 static const char __pyx_k__5[] = ":";
1568 static const char __pyx_k__6[] = "\n\t";
1569 static const char __pyx_k__7[] = " (";
1570 static const char __pyx_k__8[] = ", ";
1571 static const char __pyx_k__9[] = ").";
1572 static const char __pyx_k_cl[] = "cl";
1573 static const char __pyx_k_pi[] = "pi";
1574 static const char __pyx_k_cos[] = "cos";
1575 static const char __pyx_k_exp[] = "exp";
1576 static const char __pyx_k_frm[] = "frm";
1577 static const char __pyx_k_inv[] = "inv";
1578 static const char __pyx_k_ist[] = "ist";
1579 static const char __pyx_k_ixt[] = "ixt";
1580 static const char __pyx_k_lhs[] = "lhs";
1581 static const char __pyx_k_log[] = "log";
1582 static const char __pyx_k_max[] = "max";
1583 static const char __pyx_k_min[] = "min";
1584 static const char __pyx_k_obj[] = "obj";
1585 static const char __pyx_k_odd[] = "odd";
1586 static const char __pyx_k_pow[] = "pow";
1587 static const char __pyx_k_rhs[] = "rhs";
1588 static const char __pyx_k_sin[] = "sin";
1589 static const char __pyx_k_tan[] = "tan";
1590 static const char __pyx_k_tau[] = "tau";
1591 static const char __pyx_k_Real[] = "Real";
1592 static const char __pyx_k_acos[] = "acos";
1593 static const char __pyx_k_args[] = "args";
1594 static const char __pyx_k_asin[] = "asin";
1595 static const char __pyx_k_atan[] = "atan";
1596 static const char __pyx_k_conj[] = "conj";
1597 static const char __pyx_k_copy[] = "copy";
1598 static const char __pyx_k_cosh[] = "cosh";
1599 static const char __pyx_k_even[] = "even";
1600 static const char __pyx_k_fill[] = "fill";
1601 static const char __pyx_k_from[] = " from ";
1602 static const char __pyx_k_iter[] = "__iter__";
1603 static const char __pyx_k_main[] = "__main__";
1604 static const char __pyx_k_math[] = "math";
1605 static const char __pyx_k_name[] = "__name__";
1606 static const char __pyx_k_norm[] = "norm";
1607 static const char __pyx_k_pure[] = "pure";
1608 static const char __pyx_k_quad[] = "quad";
1609 static const char __pyx_k_send[] = "send";
1610 static const char __pyx_k_sinh[] = "sinh";
1611 static const char __pyx_k_sqrt[] = "sqrt";
1612 static const char __pyx_k_tanh[] = "tanh";
1613 static const char __pyx_k_test[] = "_test";
1614 static const char __pyx_k_0_8_2[] = "0.8.2";
1615 static const char __pyx_k_acosh[] = "acosh";
1616 static const char __pyx_k_asinh[] = "asinh";
1617 static const char __pyx_k_atanh[] = "atanh";
1618 static const char __pyx_k_close[] = "close";
1619 static const char __pyx_k_grade[] = "grade";
1620 static const char __pyx_k_istpq[] = "istpq";
1621 static const char __pyx_k_nbar3[] = "nbar3";
1622 static const char __pyx_k_ninf3[] = "ninf3";
1623 static const char __pyx_k_other[] = "other";
1624 static const char __pyx_k_range[] = "range";
1625 static const char __pyx_k_throw[] = "throw";
1626 static const char __pyx_k_using[] = " using (";
1627 static const char __pyx_k_value[] = " value ";
1628 static const char __pyx_k_import[] = "__import__";
1629 static const char __pyx_k_reduce[] = "__reduce__";
1630 static const char __pyx_k_scalar[] = "scalar";
1631 static const char __pyx_k_test_2[] = "__test__";
1632 static const char __pyx_k_xrange[] = "xrange";
1633 static const char __pyx_k_doctest[] = "doctest";
1634 static const char __pyx_k_invalid[] = " invalid ";
1635 static const char __pyx_k_numbers[] = "numbers";
1636 static const char __pyx_k_reverse[] = "reverse";
1637 static const char __pyx_k_testmod[] = "testmod";
1638 static const char __pyx_k_version[] = "__version__";
1639 static const char __pyx_k_Integral[] = "Integral";
1640 static const char __pyx_k_PyClical[] = "PyClical";
1641 static const char __pyx_k_Sequence[] = "Sequence";
1642 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1643 static const char __pyx_k_getstate[] = "__getstate__";
1644 static const char __pyx_k_involute[] = "involute";
1645 static const char __pyx_k_setstate[] = "__setstate__";
1646 static const char __pyx_k_to_frame[] = " to frame ";
1647 static const char __pyx_k_TypeError[] = "TypeError";
1648 static const char __pyx_k_outer_pow[] = "outer_pow";
1649 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1650 static const char __pyx_k_IndexError[] = "IndexError";
1651 static const char __pyx_k_ValueError[] = "ValueError";
1652 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1653 static const char __pyx_k_collections[] = "collections";
1654 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1655 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1656 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1657 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1658 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1659 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1660 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1661 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1662 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1663 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1664 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1665 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1666 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1667 static const char __pyx_k_using_invalid[] = " using invalid ";
1668 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1669 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1670 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1671 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1672 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1673 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1674 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1675 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1676 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1677 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1678 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1679 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1680 static const char __pyx_k_invalid_string[] = " invalid string ";
1681 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1682 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1683 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1684 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1685 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1686 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1687 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1688 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1689 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1690 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1691 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1692 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1693 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1694 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1695 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1696 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1697 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1698 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1699 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1700 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1701 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1702 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1703 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1704 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1705 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1706 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1707 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1708 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1709 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1710 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1711 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1712 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1713 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1714 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1715 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1716 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1717 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1718 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1719 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1720 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1721 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1722 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1723 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1724 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1725 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1726 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1727 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1728 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1729 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1730 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1731 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1732 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1733 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1734 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1735 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1736 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1737 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1738 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1739 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1740 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1741 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1742 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1743 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1744 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1745 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1746 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1747 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1748 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1749 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1750 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1751 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1752 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1753 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1754 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1755 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1756 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1757 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1758 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1759 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1760 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1761 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1762 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1763 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1764 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1765 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1766 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1767 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1768 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1769 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1770 static const char __pyx_k_Abbreviation_for_index_set_q_p[] = "\n Abbreviation for index_set({-q,...p}).\n\n >>> print istpq(2,3)\n {-3,-2,-1,1,2}\n ";
1771 static const char __pyx_k_Conjugation_reverse_o_involute[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print (clifford(\"{1}\")).conj()\n -{1}\n >>> print (clifford(\"{2}\") * clifford(\"{1}\")).conj()\n {1,2}\n >>> print (clifford(\"{1}\") * clifford(\"{2}\")).conj()\n -{1,2}\n >>> print clifford(\"1+{1}+{1,2}\").conj()\n 1-{1}-{1,2}\n ";
1772 static const char __pyx_k_Geometric_product_x_clifford_2[] = "\n Geometric product.\n\n >>> x = clifford(2); x *= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{2}\"); print x\n {1,2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{1,2}\"); print x\n {2}\n ";
1773 static const char __pyx_k_Geometric_sum_print_clifford_1[] = "\n Geometric sum.\n\n >>> print clifford(1) + clifford(\"{2}\")\n 1+{2}\n >>> print clifford(\"{1}\") + clifford(\"{2}\")\n {1}+{2}\n ";
1774 static const char __pyx_k_Hyperbolic_sine_of_multivector[] = "\n Hyperbolic sine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/2; print sinh(x)\n {1,2}\n >>> x=clifford(\"{1,2}\") * pi/6; print sinh(x)\n 0.5{1,2}\n ";
1775 static const char __pyx_k_Inner_product_print_clifford_1[] = "\n Inner product.\n\n >>> print clifford(\"{1}\") & clifford(\"{2}\")\n 0\n >>> print clifford(2) & clifford(\"{2}\")\n 0\n >>> print clifford(\"{1}\") & clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") & clifford(\"{1,2}\")\n {2}\n ";
1776 static const char __pyx_k_Inverse_tangent_of_multivector[] = "\n Inverse tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1}\"); print tan(atan(x,s),s)\n {1}\n >>> x=clifford(\"{1}\"); print tan(atan(x))\n {1}\n ";
1777 static const char __pyx_k_Iterate_over_the_indices_of_an[] = "\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}): print i,\n -3 4 7\n ";
1778 static const char __pyx_k_Maximum_member_index_set_1_1_2[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
1779 static const char __pyx_k_Maximum_positive_index_or_0_if[] = "\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ";
1780 static const char __pyx_k_Minimum_member_index_set_1_1_2[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
1781 static const char __pyx_k_Minimum_negative_index_or_0_if[] = "\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ";
1782 static const char __pyx_k_Odd_part_of_multivector_sum_of[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").odd()\n {1}\n ";
1783 static const char __pyx_k_Outer_product_power_x_clifford[] = "\n Outer product power.\n\n >>> x=clifford(\"2+{1}\"); print x.outer_pow(0)\n 1\n >>> x=clifford(\"2+{1}\"); print x.outer_pow(1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print x.outer_pow(2)\n 4+4{1}\n >>> print clifford(\"1+{1}+{1,2}\").outer_pow(3)\n 1+3{1}+3{1,2}\n\n ";
1784 static const char __pyx_k_Outer_product_print_clifford_1[] = "\n Outer product.\n\n >>> print clifford(\"{1}\") ^ clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) ^ clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") ^ clifford(\"{1}\")\n 0\n >>> print clifford(\"{1}\") ^ clifford(\"{1,2}\")\n 0\n ";
1785 static const char __pyx_k_Power_self_to_the_m_x_clifford[] = "\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print x ** 2\n 1\n >>> x=clifford(\"2\"); print x ** 2\n 4\n >>> x=clifford(\"2+{1}\"); print x ** 0\n 1\n >>> x=clifford(\"2+{1}\"); print x ** 1\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print x ** 2\n 5+4{1}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * (i ** i)\n 1\n ";
1786 static const char __pyx_k_Pure_part_print_clifford_1_1_1[] = "\n Pure part.\n\n >>> print clifford(\"1+{1}+{1,2}\").pure()\n {1}+{1,2}\n >>> print clifford(\"{1,2}\").pure()\n {1,2}\n ";
1787 static const char __pyx_k_Quadratic_form_rev_x_x_0_print[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print clifford(\"1+{1}+{1,2}\").quad()\n 3.0\n >>> print clifford(\"1+{-1}+{1,2}+{1,2,3}\").quad()\n 2.0\n ";
1788 static const char __pyx_k_Set_complement_not_print_index[] = "\n Set complement: not.\n\n >>> print ~index_set({-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16})\n {-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}\n ";
1789 static const char __pyx_k_Set_union_or_print_index_set_1[] = "\n Set union: or.\n\n >>> print index_set({1}) | index_set({2})\n {1,2}\n >>> print index_set({1,2}) | index_set({2})\n {1,2}\n ";
1790 static const char __pyx_k_Transform_left_hand_side_using[] = "\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print y|x\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print y|exp(x)\n -{1}\n ";
1791 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1792 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1793 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1794 static const char __pyx_k_lexicographic_compare_eg_3_4_5[] = "\n \"lexicographic compare\" eg. {3,4,5} is less than {3,7,8};\n -1 if a<b, +1 if a>b, 0 if a==b.\n\n >>> compare(index_set({1,2}),index_set({-1,3}))\n -1\n >>> compare(index_set({-1,4}),index_set({-1,3}))\n 1\n ";
1795 static const char __pyx_k_Abbreviation_for_clifford_index[] = "\n Abbreviation for clifford(index_set(obj)).\n\n >>> print e(1)\n {1}\n >>> print e(-1)\n {-1}\n >>> print e(0)\n 1\n ";
1796 static const char __pyx_k_Absolute_value_of_multivector_m[] = "\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
1797 static const char __pyx_k_Absolute_value_square_root_of_n[] = "\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ";
1798 static const char __pyx_k_Cardinality_Number_of_indices_i[] = "\n Cardinality: Number of indices included in set.\n\n >>> index_set({-1,1,2}).count()\n 3\n ";
1799 static const char __pyx_k_Check_if_a_multivector_contains[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
1800 static const char __pyx_k_Contraction_print_clifford_1_cl[] = "\n Contraction.\n\n >>> print clifford(\"{1}\") % clifford(\"{2}\")\n 0\n >>> print clifford(2) % clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") % clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") % clifford(\"{1,2}\")\n {2}\n ";
1801 static const char __pyx_k_Contraction_x_clifford_1_x_clif[] = "\n Contraction.\n\n >>> x = clifford(\"{1}\"); x %= clifford(\"{2}\"); print x\n 0\n >>> x = clifford(2); x %= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1}\"); print x\n 1\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1,2}\"); print x\n {2}\n ";
1802 static const char __pyx_k_Convert_CGA3_null_vector_to_Euc[] = "\n Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print agc3(cga3(x))\n 2{1}+9{2}+{3}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print agc3(cga3(x))-x\n 0\n ";
1803 static const char __pyx_k_Convert_CGA3_null_vector_to_sta[] = "\n Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3std(cga3(x))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3std(cga3(x))-cga3(x)\n 0\n ";
1804 static const char __pyx_k_Convert_Euclidean_3D_multivecto[] = "\n Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3(x)\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n ";
1805 static const char __pyx_k_Copy_this_clifford_object_x_cli[] = "\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print y\n {2}\n ";
1806 static const char __pyx_k_Copy_this_index_set_object_s_in[] = "\n Copy this index_set object.\n\n >>> s=index_set(1); t=s.copy(); print t\n {1}\n ";
1807 static const char __pyx_k_Cosine_of_multivector_with_opti[] = "\n Cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{1,2,3}\")\n {1,2}\n >>> x=clifford(\"{1,2}\"); print cos(acos(x))\n {1,2}\n ";
1808 static const char __pyx_k_Even_part_of_multivector_sum_of[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").even()\n 1+{1,2}\n ";
1809 static const char __pyx_k_Exponential_of_multivector_x_cl[] = "\n Exponential of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print exp(x)\n 0.7071+0.7071{1,2}\n >>> x=clifford(\"{1,2}\") * pi/2; print exp(x)\n {1,2}\n ";
1810 static const char __pyx_k_Geometric_difference_print_clif[] = "\n Geometric difference.\n\n >>> print clifford(1) - clifford(\"{2}\")\n 1-{2}\n >>> print clifford(\"{1}\") - clifford(\"{2}\")\n {1}-{2}\n ";
1811 static const char __pyx_k_Geometric_difference_x_clifford[] = "\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print x\n 1-{2}\n ";
1812 static const char __pyx_k_Geometric_multiplicative_invers[] = "\n Geometric multiplicative inverse.\n\n >>> x = clifford(\"{1}\"); print x.inv()\n {1}\n >>> x = clifford(2); print x.inv()\n 0.5\n >>> x = clifford(\"{1,2}\"); print x.inv()\n -{1,2}\n ";
1813 static const char __pyx_k_Geometric_product_print_cliffor[] = "\n Geometric product.\n\n >>> print clifford(\"{1}\") * clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) * clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") * clifford(\"{1,2}\")\n {2}\n ";
1814 static const char __pyx_k_Geometric_quotient_print_cliffo[] = "\n Geometric quotient.\n\n >>> print clifford(\"{1}\") / clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) / clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") / clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") / clifford(\"{1,2}\")\n -{2}\n ";
1815 static const char __pyx_k_Geometric_quotient_x_clifford_1[] = "\n Geometric quotient.\n\n >>> x = clifford(\"{1}\"); x /= clifford(\"{2}\"); print x\n {1,2}\n >>> x = clifford(2); x /= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1}\"); print x\n 1\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1,2}\"); print x\n -{2}\n ";
1816 static const char __pyx_k_Geometric_sum_x_clifford_1_x_cl[] = "\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print x\n 1+{2}\n ";
1817 static const char __pyx_k_Get_the_value_of_an_index_set_o[] = "\n Get the value of an index_set object at an index.\n\n >>> index_set({1})[1]\n True\n >>> index_set({1})[2]\n False\n >>> index_set({2})[-1]\n False\n >>> index_set({2})[1]\n False\n >>> index_set({2})[2]\n True\n >>> index_set({2})[33]\n False\n ";
1818 static const char __pyx_k_Hyperbolic_cosine_of_multivecto[] = "\n Hyperbolic cosine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi; print cosh(x)\n -1\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print cosh(acosh(x))\n {1,2}\n ";
1819 static const char __pyx_k_Hyperbolic_tangent_of_multivect[] = "\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print tanh(x)\n {1,2}\n ";
1820 static const char __pyx_k_Imaginary_part_deprecated_alway[] = "\n Imaginary part: deprecated (always 0).\n\n >>> imag(clifford(\"1+{1}+{1,2}\"))\n 0.0\n >>> imag(clifford(\"{1,2}\"))\n 0.0\n ";
1821 static const char __pyx_k_Inner_product_x_clifford_1_x_cl[] = "\n Inner product.\n\n >>> x = clifford(\"{1}\"); x &= clifford(\"{2}\"); print x\n 0\n >>> x = clifford(2); x &= clifford(\"{2}\"); print x\n 0\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1}\"); print x\n 1\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1,2}\"); print x\n {2}\n ";
1822 static const char __pyx_k_Integer_power_of_multivector_ob[] = "\n Integer power of multivector: obj to the m.\n\n >>> x=clifford(\"{1}\"); print pow(x,2)\n 1\n >>> x=clifford(\"2\"); print pow(x,2)\n 4\n >>> x=clifford(\"2+{1}\"); print pow(x,0)\n 1\n >>> x=clifford(\"2+{1}\"); print pow(x,1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print pow(x,2)\n 5+4{1}\n >>> print pow(clifford(\"1+{1}+{1,2}\"),3)\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * pow(i, i)\n 1\n ";
1823 static const char __pyx_k_Inverse_cosine_of_multivector_w[] = "\n Inverse cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{1,2,3}\")\n {1,2}\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{-1,1,2,3,4}\")\n {1,2}\n >>> print acos(0) / pi\n 0.5\n >>> x=clifford(\"{1,2}\"); print cos(acos(x))\n {1,2}\n ";
1824 static const char __pyx_k_Inverse_hyperbolic_cosine_of_mu[] = "\n Inverse hyperbolic cosine of multivector with optional complexifier.\n\n >>> print acosh(0,\"{-2,-1,1}\")\n 1.571{-2,-1,1}\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x,\"{-1,1,2,3,4}\"))\n {1,2,3}\n >>> print acosh(0)\n 1.571{-1}\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print cosh(acosh(x))\n {1,2}\n ";
1825 static const char __pyx_k_Inverse_hyperbolic_sine_of_mult[] = "\n Inverse hyperbolic sine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print asinh(x,\"{1,2,3}\") * 2/pi\n {1,2}\n >>> x=clifford(\"{1,2}\"); print asinh(x) * 2/pi\n {1,2}\n >>> x=clifford(\"{1,2}\") / 2; print asinh(x) * 6/pi\n {1,2}\n ";
1826 static const char __pyx_k_Inverse_hyperbolic_tangent_of_m[] = "\n Inverse hyperbolic tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1,2}\"); print tanh(atanh(x,s))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print tanh(atanh(x))\n {1,2}\n ";
1827 static const char __pyx_k_Inverse_sine_of_multivector_wit[] = "\n Inverse sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),s)\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),\"{-2,-1,1}\")\n {-1}\n >>> print asin(1) / pi\n 0.5\n >>> x=clifford(\"{1,2,3}\"); print asin(sin(x))\n {1,2,3}\n ";
1828 static const char __pyx_k_Main_involution_each_i_is_repla[] = "\n Main involution, each {i} is replaced by -{i} in each term,\n eg. clifford(\"{1}\") -> -clifford(\"{1}\").\n\n >>> print clifford(\"{1}\").involute()\n -{1}\n >>> print (clifford(\"{2}\") * clifford(\"{1}\")).involute()\n -{1,2}\n >>> print (clifford(\"{1}\") * clifford(\"{2}\")).involute()\n {1,2}\n >>> print clifford(\"1+{1}+{1,2}\").involute()\n 1-{1}+{1,2}\n ";
1829 static const char __pyx_k_Maximum_absolute_value_of_coord[] = "\n Maximum absolute value of coordinates multivector: multivector infinity-norm.\n\n >>> max_abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 1.0\n >>> max_abs(clifford(\"3+2{1}+{1,2}\"))\n 3.0\n\n ";
1830 static const char __pyx_k_Maximum_of_absolute_values_of_c[] = "\n Maximum of absolute values of components of multivector: multivector infinity norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").max_abs()\n 1.0\n >>> clifford(\"3+2{1}+{1,2}\").max_abs()\n 3.0\n ";
1831 static const char __pyx_k_Natural_logarithm_of_multivecto[] = "\n Natural logarithm of multivector with optional complexifier.\n\n >>> x=clifford(\"{-1}\"); print (log(x,\"{-1}\") * 2/pi)\n {-1}\n >>> x=clifford(\"{1,2}\"); print (log(x,\"{1,2,3}\") * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print (log(x) * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print (log(x,\"{1,2}\") * 2/pi)\n Traceback (most recent call last):\n ...\n RuntimeError: check_complex(val, i): i is not a valid complexifier for val\n ";
1832 static const char __pyx_k_Norm_sum_of_squares_of_coordina[] = "\n Norm == sum of squares of coordinates.\n\n >>> clifford(\"1+{1}+{1,2}\").norm()\n 3.0\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").norm()\n 4.0\n ";
1833 static const char __pyx_k_Not_applicable_for_a_in_cliffor[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})): print a,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
1834 static const char __pyx_k_Number_of_negative_indices_incl[] = "\n Number of negative indices included in set.\n\n >>> index_set({-1,1,2}).count_neg()\n 1\n ";
1835 static const char __pyx_k_Number_of_positive_indices_incl[] = "\n Number of positive indices included in set.\n\n >>> index_set({-1,1,2}).count_pos()\n 2\n ";
1836 static const char __pyx_k_Outer_product_power_of_multivec[] = "\n Outer product power of multivector.\n\n >>> print outer_pow(clifford(\"1+{1}+{1,2}\"),3)\n 1+3{1}+3{1,2}\n ";
1837 static const char __pyx_k_Outer_product_x_clifford_1_x_cl[] = "\n Outer product.\n\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{2}\"); print x\n {1,2}\n >>> x = clifford(2); x ^= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1}\"); print x\n 0\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1,2}\"); print x\n 0\n ";
1838 static const char __pyx_k_Pure_grade_vector_part_print_cl[] = "\n Pure grade-vector part.\n\n >>> print clifford(\"{1}\")(1)\n {1}\n >>> print clifford(\"{1}\")(0)\n 0\n >>> print clifford(\"1+{1}+{1,2}\")(0)\n 1\n >>> print clifford(\"1+{1}+{1,2}\")(1)\n {1}\n >>> print clifford(\"1+{1}+{1,2}\")(2)\n {1,2}\n >>> print clifford(\"1+{1}+{1,2}\")(3)\n 0\n ";
1839 static const char __pyx_k_Pure_part_print_pure_clifford_1[] = "\n Pure part\n\n >>> print pure(clifford(\"1+{1}+{1,2}\"))\n {1}+{1,2}\n >>> print pure(clifford(\"{1,2}\"))\n {1,2}\n ";
1840 static const char __pyx_k_Put_self_into_a_larger_frame_co[] = "\n Put self into a larger frame, containing the union of self.frame() and index set ixt.\n This can be used to make multiplication faster, by multiplying within a common frame.\n\n >>> clifford(\"2+3{1}\").reframe(index_set({1,2,3}))\n clifford(\"2+3{1}\")\n >>> s=index_set({1,2,3});t=index_set({-3,-2,-1});x=random_clifford(s); x.reframe(t).frame() == (s|t);\n True\n ";
1841 static const char __pyx_k_Random_multivector_within_a_fra[] = "\n Random multivector within a frame.\n\n >>> print random_clifford(index_set({-3,-1,2})).frame()\n {-3,-1,2}\n ";
1842 static const char __pyx_k_Real_part_synonym_for_scalar_pa[] = "\n Real part: synonym for scalar part.\n\n >>> real(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> real(clifford(\"{1,2}\"))\n 0.0\n ";
1843 static const char __pyx_k_Remove_all_terms_of_self_with_r[] = "\n Remove all terms of self with relative size smaller than limit.\n\n >>> clifford(\"1e8+{1}+1e-8{1,2}\").truncated(1.0e-6)\n clifford(\"100000000\")\n >>> clifford(\"1e4+{1}+1e-4{1,2}\").truncated(1.0e-6)\n clifford(\"10000+{1}\")\n ";
1844 static const char __pyx_k_Reversion_eg_1_2_2_1_print_reve[] = "\n Reversion, eg. {1}*{2} -> {2}*{1}\n\n >>> print reverse(clifford(\"{1}\"))\n {1}\n >>> print reverse(clifford(\"{2}\") * clifford(\"{1}\"))\n {1,2}\n >>> print reverse(clifford(\"{1}\") * clifford(\"{2}\"))\n -{1,2}\n >>> print reverse(clifford(\"1+{1}+{1,2}\"))\n 1+{1}-{1,2}\n ";
1845 static const char __pyx_k_Reversion_eg_clifford_1_cliffor[] = "\n Reversion, eg. clifford(\"{1}\")*clifford(\"{2}\") -> clifford(\"{2}\")*clifford(\"{1}\").\n\n >>> print clifford(\"{1}\").reverse()\n {1}\n >>> print (clifford(\"{2}\") * clifford(\"{1}\")).reverse()\n {1,2}\n >>> print (clifford(\"{1}\") * clifford(\"{2}\")).reverse()\n -{1,2}\n >>> print clifford(\"1+{1}+{1,2}\").reverse()\n 1+{1}-{1,2}\n ";
1846 static const char __pyx_k_Scalar_part_clifford_1_1_1_2_sc[] = "\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ";
1847 static const char __pyx_k_Scalar_part_scalar_clifford_1_1[] = "\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
1848 static const char __pyx_k_Set_intersection_and_print_inde[] = "\n Set intersection: and.\n\n >>> print index_set({1}) & index_set({2})\n {}\n >>> print index_set({1,2}) & index_set({2})\n {2}\n ";
1849 static const char __pyx_k_Set_intersection_and_x_index_se[] = "\n Set intersection: and.\n\n >>> x = index_set({1}); x &= index_set({2}); print x\n {}\n >>> x = index_set({1,2}); x &= index_set({2}); print x\n {2}\n ";
1850 static const char __pyx_k_Set_the_value_of_an_index_set_o[] = "\n Set the value of an index_set object at index idx to value val.\n\n >>> s=index_set({1}); s[2] = True; print s\n {1,2}\n >>> s=index_set({1,2}); s[1] = False; print s\n {2}\n ";
1851 static const char __pyx_k_Set_union_or_x_index_set_1_x_in[] = "\n Set union: or.\n\n >>> x = index_set({1}); x |= index_set({2}); print x\n {1,2}\n >>> x = index_set({1,2}); x |= index_set({2}); print x\n {1,2}\n ";
1852 static const char __pyx_k_Sign_of_geometric_product_of_tw[] = "\n Sign of geometric product of two Clifford basis elements.\n\n >>> s = index_set({1,2}); t=index_set({-1}); s.sign_of_mult(t)\n 1\n ";
1853 static const char __pyx_k_Sign_of_geometric_square_of_a_C[] = "\n Sign of geometric square of a Clifford basis element.\n\n >>> s = index_set({1,2}); s.sign_of_square()\n -1\n ";
1854 static const char __pyx_k_Sine_of_multivector_with_option[] = "\n Sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),s)\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),\"{-2,-1,1}\")\n {-1}\n >>> x=clifford(\"{1,2,3}\"); print asin(sin(x))\n {1,2,3}\n ";
1855 static const char __pyx_k_Square_root_of_1_which_commutes[] = "\n Square root of -1 which commutes with all members of the frame of the given multivector.\n\n >>> print complexifier(clifford(index_set({1})))\n {1,2,3}\n >>> print complexifier(clifford(index_set({-1})))\n {-1}\n >>> print complexifier(index_set({1}))\n {1,2,3}\n >>> print complexifier(index_set({-1}))\n {-1}\n ";
1856 static const char __pyx_k_Square_root_of_multivector_with[] = "\n Square root of multivector with optional complexifier.\n\n >>> print sqrt(-1)\n {-1}\n >>> print sqrt(clifford(\"2{-1}\"))\n 1+{-1}\n >>> j=sqrt(-1,complexifier(index_set({1}))); print j; print j*j\n {1,2,3}\n -1\n >>> j=sqrt(-1,\"{1,2,3}\"); print j; print j*j\n {1,2,3}\n -1\n ";
1857 static const char __pyx_k_Subalgebra_generated_by_all_gen[] = "\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame()\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <type 'PyClical.index_set'>\n ";
1858 static const char __pyx_k_Subscripting_map_from_index_set[] = "\n Subscripting: map from index set to scalar coordinate.\n\n >>> clifford(\"{1}\")[index_set(1)]\n 1.0\n >>> clifford(\"{1}\")[index_set({1})]\n 1.0\n >>> clifford(\"{1}\")[index_set({1,2})]\n 0.0\n >>> clifford(\"2{1,2}\")[index_set({1,2})]\n 2.0\n ";
1859 static const char __pyx_k_Symmetric_set_difference_exclus[] = "\n Symmetric set difference: exclusive or.\n\n >>> print index_set({1}) ^ index_set({2})\n {1,2}\n >>> print index_set({1,2}) ^ index_set({2})\n {1}\n ";
1860 static const char __pyx_k_Tangent_of_multivector_with_opt[] = "\n Tangent of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print tan(x,\"{1,2,3}\")\n 0.7616{1,2}\n >>> x=clifford(\"{1,2}\"); print tan(x)\n 0.7616{1,2}\n ";
1861 static const char __pyx_k_Tests_for_functions_that_Doctes[] = "\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print index_set(1)\n {1}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set(index_set({1,2}))\n {1,2}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set(\"\")\n {}\n >>> print index_set(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print index_set(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print index_set(\"{1,2,100}\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print index_set({1,2,100})\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> index_se""t({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
1862  static const char __pyx_k_The_informal_string_representat[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__str__()\n '{1,2}'\n >>> str(index_set({1,2}))\n '{1,2}'\n ";
1863  static const char __pyx_k_The_official_string_representat[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__repr__()\n 'index_set({1,2})'\n >>> repr(index_set({1,2}))\n 'index_set({1,2})'\n ";
1864  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
1865  static const char __pyx_k_Vector_part_of_multivector_as_a[] = "\n Vector part of multivector, as a Python list, with respect to frm.\n\n >>> print clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part()\n [2.0, 3.0]\n >>> print clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part(index_set({-1,1,2}))\n [0.0, 2.0, 3.0]\n ";
1866  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
1867  static const char __pyx_k_norm_sum_of_squares_of_coordina[] = "\n norm == sum of squares of coordinates.\n\n >>> norm(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> norm(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 4.0\n ";
1868  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
1869  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
1870  static const char __pyx_k_Conjugation_reverse_o_involute_2[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print conj(clifford(\"{1}\"))\n -{1}\n >>> print conj(clifford(\"{2}\") * clifford(\"{1}\"))\n {1,2}\n >>> print conj(clifford(\"{1}\") * clifford(\"{2}\"))\n -{1,2}\n >>> print conj(clifford(\"1+{1}+{1,2}\"))\n 1-{1}-{1,2}\n ";
1871  static const char __pyx_k_Odd_part_of_multivector_sum_of_2[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print odd(clifford(\"1+{1}+{1,2}\"))\n {1}\n ";
1872  static const char __pyx_k_Power_self_to_the_m_x_clifford_2[] = "\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print x.pow(2)\n 1\n >>> x=clifford(\"2\"); print x.pow(2)\n 4\n >>> x=clifford(\"2+{1}\"); print x.pow(0)\n 1\n >>> x=clifford(\"2+{1}\"); print x.pow(1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print x.pow(2)\n 5+4{1}\n >>> print clifford(\"1+{1}+{1,2}\").pow(3)\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * i.pow(i)\n 1\n ";
1873  static const char __pyx_k_Quadratic_form_rev_x_x_0_print_2[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print quad(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> print quad(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
1874  static const char __pyx_k_Transform_left_hand_side_using_2[] = "\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=x; print y\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=exp(x); print y\n -{1}\n ";
1875  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
1876  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
1877  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
1878  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
1879  static const char __pyx_k_Even_part_of_multivector_sum_of_2[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print even(clifford(\"1+{1}+{1,2}\"))\n 1+{1,2}\n ";
1880  static const char __pyx_k_Geometric_multiplicative_invers_2[] = "\n Geometric multiplicative inverse.\n\n >>> print inv(clifford(\"{1}\"))\n {1}\n >>> print inv(clifford(\"{-1}\"))\n -{-1}\n >>> print inv(clifford(\"{-2,-1}\"))\n -{-2,-1}\n >>> print inv(clifford(\"{-1}+{1}\"))\n nan\n ";
1881  static const char __pyx_k_Main_involution_each_i_is_repla_2[] = "\n Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})\n\n >>> print involute(clifford(\"{1}\"))\n -{1}\n >>> print involute(clifford(\"{2}\") * clifford(\"{1}\"))\n -{1,2}\n >>> print involute(clifford(\"{1}\") * clifford(\"{2}\"))\n {1,2}\n >>> print involute(clifford(\"1+{1}+{1,2}\"))\n 1-{1}+{1,2}\n ";
1882  static const char __pyx_k_Symmetric_set_difference_exclus_2[] = "\n Symmetric set difference: exclusive or.\n\n >>> x = index_set({1}); x ^= index_set({2}); print x\n {1,2}\n >>> x = index_set({1,2}); x ^= index_set({2}); print x\n {1}\n ";
1883  static const char __pyx_k_Tests_for_functions_that_Doctes_2[] = "\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print clifford(2)\n 2\n >>> print clifford(2L)\n 2\n >>> print clifford(2.0)\n 2\n >>> print clifford(1.0e-1)\n 0.1\n >>> print clifford(\"2\")\n 2\n >>> print clifford(\"2{1,2,3}\")\n 2{1,2,3}\n >>> print clifford(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print clifford(\"-{1}\")\n -{1}\n >>> print clifford(2,index_set({1,2}))\n 2{1,2}\n >>> print clifford([2,3],index_set({1,2}))\n 2{1}+3{2}\n >>> print clifford([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type 'list'>).\n >>> print clifford(\"\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print clifford(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print clifford(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print clifford(\"+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print clifford(\"-\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford"" object from invalid string '-'.\n >>> print clifford(\"{1}+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
1884  static const char __pyx_k_The_informal_string_representat_2[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__str__()\n '1+3{-1}+2{1,2}+4{-2,7}'\n ";
1885  static const char __pyx_k_The_official_string_representat_2[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__repr__()\n 'clifford(\"1+3{-1}+2{1,2}+4{-2,7}\")'\n ";
1886  static PyObject *__pyx_kp_s_;
1887  static PyObject *__pyx_kp_s_0_8_2;
1888  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1889  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1890  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1891  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1892  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1893  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1894  static PyObject *__pyx_kp_s_Cannot_reframe;
1895  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1896  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1897  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1898  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1899  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1900  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1901  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1902  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1903  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1904  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1905  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1906  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1907  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1908  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1909  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1910  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1911  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1912  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1913  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1914  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1915  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1916  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1917  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1918  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1919  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1920  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1921  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1922  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1923  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1924  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1925  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1926  static PyObject *__pyx_n_s_IndexError;
1927  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1928  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1929  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1930  static PyObject *__pyx_n_s_Integral;
1931  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1932  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1933  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1934  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1935  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1936  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1937  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1938  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1939  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1940  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1941  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1942  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1943  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1944  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1945  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1946  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1947  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1948  static PyObject *__pyx_n_s_NotImplemented;
1949  static PyObject *__pyx_kp_s_Not_applicable;
1950  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1951  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1952  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1953  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1954  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1955  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1956  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1957  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1958  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1959  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1960  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1961  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1962  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1963  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1964  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1965  static PyObject *__pyx_n_s_PyClical;
1966  static PyObject *__pyx_kp_s_PyClical_pyx;
1967  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1968  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1969  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1970  static PyObject *__pyx_n_s_Real;
1971  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1972  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1973  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1974  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1975  static PyObject *__pyx_n_s_RuntimeError;
1976  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1977  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1978  static PyObject *__pyx_n_s_Sequence;
1979  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1980  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1981  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1982  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1983  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1984  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1985  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1986  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1987  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1988  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1989  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1990  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1991  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1992  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1993  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1994  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1995  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1996  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1997  static PyObject *__pyx_kp_u_The_informal_string_representat;
1998  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
1999  static PyObject *__pyx_kp_u_The_official_string_representat;
2000  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2001  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2002  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2003  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2004  static PyObject *__pyx_n_s_TypeError;
2005  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2006  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2007  static PyObject *__pyx_n_s_ValueError;
2008  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2009  static PyObject *__pyx_kp_s__2;
2010  static PyObject *__pyx_kp_s__5;
2011  static PyObject *__pyx_kp_s__6;
2012  static PyObject *__pyx_kp_s__7;
2013  static PyObject *__pyx_kp_s__8;
2014  static PyObject *__pyx_kp_s__9;
2015  static PyObject *__pyx_kp_u_abs_line_1473;
2016  static PyObject *__pyx_n_s_acos;
2017  static PyObject *__pyx_kp_u_acos_line_1619;
2018  static PyObject *__pyx_n_s_acosh;
2019  static PyObject *__pyx_kp_u_acosh_line_1656;
2020  static PyObject *__pyx_kp_u_agc3_line_1844;
2021  static PyObject *__pyx_n_s_args;
2022  static PyObject *__pyx_kp_s_as_frame;
2023  static PyObject *__pyx_n_s_asin;
2024  static PyObject *__pyx_kp_u_asin_line_1698;
2025  static PyObject *__pyx_n_s_asinh;
2026  static PyObject *__pyx_kp_u_asinh_line_1733;
2027  static PyObject *__pyx_n_s_atan;
2028  static PyObject *__pyx_kp_u_atan_line_1769;
2029  static PyObject *__pyx_n_s_atanh;
2030  static PyObject *__pyx_kp_u_atanh_line_1798;
2031  static PyObject *__pyx_kp_u_cga3_line_1824;
2032  static PyObject *__pyx_kp_u_cga3std_line_1833;
2033  static PyObject *__pyx_n_s_cl;
2034  static PyObject *__pyx_kp_u_clifford___add___line_739;
2035  static PyObject *__pyx_kp_u_clifford___and___line_835;
2036  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2037  static PyObject *__pyx_kp_u_clifford___div___line_895;
2038  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2039  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2040  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2041  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2042  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2043  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2044  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2045  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2046  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2047  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2048  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2049  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2050  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2051  static PyObject *__pyx_kp_u_clifford___or___line_938;
2052  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2053  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2054  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2055  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2056  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2057  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2058  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2059  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2060  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2061  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2062  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2063  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2064  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2065  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2066  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2067  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2068  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2069  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2070  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2071  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2072  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2073  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2074  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2075  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2076  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2077  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2078  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2079  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2080  static PyObject *__pyx_n_s_cline_in_traceback;
2081  static PyObject *__pyx_n_s_close;
2082  static PyObject *__pyx_n_s_collections;
2083  static PyObject *__pyx_kp_u_compare_line_490;
2084  static PyObject *__pyx_kp_u_complexifier_line_1527;
2085  static PyObject *__pyx_n_s_conj;
2086  static PyObject *__pyx_kp_u_conj_line_1436;
2087  static PyObject *__pyx_n_s_copy;
2088  static PyObject *__pyx_n_s_cos;
2089  static PyObject *__pyx_kp_u_cos_line_1602;
2090  static PyObject *__pyx_n_s_cosh;
2091  static PyObject *__pyx_kp_u_cosh_line_1640;
2092  static PyObject *__pyx_n_s_doctest;
2093  static PyObject *__pyx_n_s_e;
2094  static PyObject *__pyx_kp_u_e_line_1887;
2095  static PyObject *__pyx_n_s_even;
2096  static PyObject *__pyx_kp_u_even_line_1388;
2097  static PyObject *__pyx_n_s_exp;
2098  static PyObject *__pyx_kp_u_exp_line_1565;
2099  static PyObject *__pyx_n_s_fill;
2100  static PyObject *__pyx_n_s_frm;
2101  static PyObject *__pyx_kp_s_from;
2102  static PyObject *__pyx_n_s_getstate;
2103  static PyObject *__pyx_n_s_grade;
2104  static PyObject *__pyx_n_s_i;
2105  static PyObject *__pyx_kp_u_imag_line_1366;
2106  static PyObject *__pyx_n_s_import;
2107  static PyObject *__pyx_kp_u_index_set___and___line_269;
2108  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2109  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2110  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2111  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2112  static PyObject *__pyx_n_s_index_set___iter;
2113  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2114  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2115  static PyObject *__pyx_kp_u_index_set___or___line_291;
2116  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2117  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2118  static PyObject *__pyx_kp_u_index_set___str___line_393;
2119  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2120  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2121  static PyObject *__pyx_kp_u_index_set_count_line_313;
2122  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2123  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2124  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2125  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2126  static PyObject *__pyx_kp_u_index_set_max_line_349;
2127  static PyObject *__pyx_kp_u_index_set_min_line_340;
2128  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2129  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2130  static PyObject *__pyx_n_s_inv;
2131  static PyObject *__pyx_kp_u_inv_line_1329;
2132  static PyObject *__pyx_kp_s_invalid;
2133  static PyObject *__pyx_kp_s_invalid_string;
2134  static PyObject *__pyx_n_s_involute;
2135  static PyObject *__pyx_kp_u_involute_line_1406;
2136  static PyObject *__pyx_n_s_ist;
2137  static PyObject *__pyx_n_s_istpq;
2138  static PyObject *__pyx_kp_u_istpq_line_1900;
2139  static PyObject *__pyx_n_s_iter;
2140  static PyObject *__pyx_n_s_ixt;
2141  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2142  static PyObject *__pyx_n_s_lhs;
2143  static PyObject *__pyx_n_s_log;
2144  static PyObject *__pyx_kp_u_log_line_1579;
2145  static PyObject *__pyx_n_s_m;
2146  static PyObject *__pyx_n_s_main;
2147  static PyObject *__pyx_n_s_math;
2148  static PyObject *__pyx_n_s_max;
2149  static PyObject *__pyx_kp_u_max_abs_line_1482;
2150  static PyObject *__pyx_kp_u_max_pos_line_511;
2151  static PyObject *__pyx_n_s_min;
2152  static PyObject *__pyx_kp_u_min_neg_line_502;
2153  static PyObject *__pyx_n_s_name;
2154  static PyObject *__pyx_n_s_nbar3;
2155  static PyObject *__pyx_n_s_ninf3;
2156  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2157  static PyObject *__pyx_n_s_norm;
2158  static PyObject *__pyx_kp_u_norm_line_1462;
2159  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2160  static PyObject *__pyx_n_s_numbers;
2161  static PyObject *__pyx_n_s_obj;
2162  static PyObject *__pyx_n_s_odd;
2163  static PyObject *__pyx_kp_u_odd_line_1397;
2164  static PyObject *__pyx_n_s_other;
2165  static PyObject *__pyx_n_s_outer_pow;
2166  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2167  static PyObject *__pyx_n_s_p;
2168  static PyObject *__pyx_n_s_pi;
2169  static PyObject *__pyx_n_s_pow;
2170  static PyObject *__pyx_kp_u_pow_line_1494;
2171  static PyObject *__pyx_n_s_pure;
2172  static PyObject *__pyx_kp_u_pure_line_1377;
2173  static PyObject *__pyx_n_s_pyx_vtable;
2174  static PyObject *__pyx_n_s_q;
2175  static PyObject *__pyx_n_s_quad;
2176  static PyObject *__pyx_kp_u_quad_line_1451;
2177  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2178  static PyObject *__pyx_n_s_range;
2179  static PyObject *__pyx_kp_u_real_line_1355;
2180  static PyObject *__pyx_n_s_reduce;
2181  static PyObject *__pyx_n_s_reduce_cython;
2182  static PyObject *__pyx_n_s_reduce_ex;
2183  static PyObject *__pyx_n_s_reverse;
2184  static PyObject *__pyx_kp_u_reverse_line_1421;
2185  static PyObject *__pyx_n_s_rhs;
2186  static PyObject *__pyx_n_s_scalar;
2187  static PyObject *__pyx_kp_u_scalar_line_1344;
2188  static PyObject *__pyx_n_s_send;
2189  static PyObject *__pyx_n_s_setstate;
2190  static PyObject *__pyx_n_s_setstate_cython;
2191  static PyObject *__pyx_n_s_sin;
2192  static PyObject *__pyx_kp_u_sin_line_1679;
2193  static PyObject *__pyx_n_s_sinh;
2194  static PyObject *__pyx_kp_u_sinh_line_1719;
2195  static PyObject *__pyx_n_s_sqrt;
2196  static PyObject *__pyx_kp_u_sqrt_line_1542;
2197  static PyObject *__pyx_n_s_tan;
2198  static PyObject *__pyx_kp_u_tan_line_1752;
2199  static PyObject *__pyx_n_s_tanh;
2200  static PyObject *__pyx_kp_u_tanh_line_1786;
2201  static PyObject *__pyx_n_s_tau;
2202  static PyObject *__pyx_n_s_test;
2203  static PyObject *__pyx_n_s_test_2;
2204  static PyObject *__pyx_n_s_testmod;
2205  static PyObject *__pyx_n_s_throw;
2206  static PyObject *__pyx_kp_s_to_frame;
2207  static PyObject *__pyx_kp_s_using;
2208  static PyObject *__pyx_kp_s_using_invalid;
2209  static PyObject *__pyx_kp_s_value;
2210  static PyObject *__pyx_n_s_version;
2211  static PyObject *__pyx_n_s_xrange;
2212 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2213 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2214 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2215 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2216 static int __pyx_pf_8PyClical_9index_set_8__setitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /* proto */
2217 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2218 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2219 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2220 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2221 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2222 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2223 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2224 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2225 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2226 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2227 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2228 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2229 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2230 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2231 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2232 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2233 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2234 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2235 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2236 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2237 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2238 static PyObject *__pyx_pf_8PyClical_9index_set_53__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2239 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2240 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2241 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2242 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2243 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2244 static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt); /* proto */
2245 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2246 static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x); /* proto */
2247 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2248 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2249 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2250 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2251 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2252 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2253 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2254 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2255 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2256 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2257 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2258 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2259 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2260 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2261 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2262 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2263 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2264 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2265 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2266 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2267 #endif
2268 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2269 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2270 #endif
2271 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2272 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2273 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2274 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2275 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2276 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2277 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2278 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2279 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2280 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2281 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2282 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2283 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2284 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2285 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2286 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2287 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2288 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2289 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2290 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2291 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2292 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2293 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2294 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2295 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2296 static PyObject *__pyx_pf_8PyClical_8clifford_98__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2297 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2298 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2299 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2300 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2301 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2302 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2303 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2304 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2305 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2306 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2307 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2308 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2309 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2310 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2311 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2312 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2313 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2314 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2315 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2316 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2317 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2318 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2319 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2320 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2321 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2322 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2323 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2324 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2325 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2326 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2327 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2328 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2329 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2330 static PyObject *__pyx_pf_8PyClical_74random_clifford(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill); /* proto */
2331 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2332 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2333 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2334 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2335 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2336 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2337 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2338 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2339 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2340 static PyObject *__pyx_float_0_0;
2341 static PyObject *__pyx_float_1_0;
2342 static PyObject *__pyx_float_2_0;
2343 static PyObject *__pyx_float_8_0;
2344 static PyObject *__pyx_int_0;
2345 static PyObject *__pyx_int_1;
2346 static PyObject *__pyx_int_4;
2347 static PyObject *__pyx_int_neg_1;
2348 static PyObject *__pyx_tuple__3;
2349 static PyObject *__pyx_tuple__4;
2350 static PyObject *__pyx_tuple__10;
2351 static PyObject *__pyx_tuple__11;
2352 static PyObject *__pyx_tuple__12;
2353 static PyObject *__pyx_tuple__13;
2354 static PyObject *__pyx_tuple__16;
2355 static PyObject *__pyx_tuple__17;
2356 static PyObject *__pyx_tuple__19;
2357 static PyObject *__pyx_tuple__21;
2358 static PyObject *__pyx_tuple__22;
2359 static PyObject *__pyx_tuple__23;
2360 static PyObject *__pyx_tuple__24;
2361 static PyObject *__pyx_tuple__25;
2362 static PyObject *__pyx_codeobj__14;
2363 static PyObject *__pyx_codeobj__15;
2364 static PyObject *__pyx_codeobj__18;
2365 static PyObject *__pyx_codeobj__20;
2366 static PyObject *__pyx_codeobj__26;
2367 
2368 /* "PyClical.pyx":39
2369  * cdef class index_set
2370  *
2371  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2372  * """
2373  * Return the C++ IndexSet instance wrapped by index_set(obj).
2374  */
2375 
2376 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2377  IndexSet __pyx_r;
2378  __Pyx_RefNannyDeclarations
2379  PyObject *__pyx_t_1 = NULL;
2380  PyObject *__pyx_t_2 = NULL;
2381  __Pyx_RefNannySetupContext("toIndexSet", 0);
2382 
2383  /* "PyClical.pyx":43
2384  * Return the C++ IndexSet instance wrapped by index_set(obj).
2385  * """
2386  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2387  *
2388  * cdef class index_set:
2389  */
2390  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
2391  __Pyx_GOTREF(__pyx_t_1);
2392  __Pyx_INCREF(__pyx_v_obj);
2393  __Pyx_GIVEREF(__pyx_v_obj);
2394  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
2395  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
2396  __Pyx_GOTREF(__pyx_t_2);
2397  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2398  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
2399  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2400  goto __pyx_L0;
2401 
2402  /* "PyClical.pyx":39
2403  * cdef class index_set
2404  *
2405  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2406  * """
2407  * Return the C++ IndexSet instance wrapped by index_set(obj).
2408  */
2409 
2410  /* function exit code */
2411  __pyx_L1_error:;
2412  __Pyx_XDECREF(__pyx_t_1);
2413  __Pyx_XDECREF(__pyx_t_2);
2414  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2415  __Pyx_pretend_to_initialize(&__pyx_r);
2416  __pyx_L0:;
2417  __Pyx_RefNannyFinishContext();
2418  return __pyx_r;
2419 }
2420 
2421 /* "PyClical.pyx":51
2422  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2423  *
2424  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2425  * """
2426  * Wrap an instance of the C++ class IndexSet.
2427  */
2428 
2429 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2430  PyObject *__pyx_r = NULL;
2431  __Pyx_RefNannyDeclarations
2432  __Pyx_RefNannySetupContext("wrap", 0);
2433 
2434  /* "PyClical.pyx":55
2435  * Wrap an instance of the C++ class IndexSet.
2436  * """
2437  * self.instance[0] = other # <<<<<<<<<<<<<<
2438  * return self
2439  *
2440  */
2441  (__pyx_v_self->instance[0]) = __pyx_v_other;
2442 
2443  /* "PyClical.pyx":56
2444  * """
2445  * self.instance[0] = other
2446  * return self # <<<<<<<<<<<<<<
2447  *
2448  * cdef inline IndexSet unwrap(index_set self):
2449  */
2450  __Pyx_XDECREF(__pyx_r);
2451  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2452  __pyx_r = ((PyObject *)__pyx_v_self);
2453  goto __pyx_L0;
2454 
2455  /* "PyClical.pyx":51
2456  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2457  *
2458  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2459  * """
2460  * Wrap an instance of the C++ class IndexSet.
2461  */
2462 
2463  /* function exit code */
2464  __pyx_L0:;
2465  __Pyx_XGIVEREF(__pyx_r);
2466  __Pyx_RefNannyFinishContext();
2467  return __pyx_r;
2468 }
2469 
2470 /* "PyClical.pyx":58
2471  * return self
2472  *
2473  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2474  * """
2475  * Return the wrapped C++ IndexSet instance.
2476  */
2477 
2478 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2479  IndexSet __pyx_r;
2480  __Pyx_RefNannyDeclarations
2481  __Pyx_RefNannySetupContext("unwrap", 0);
2482 
2483  /* "PyClical.pyx":62
2484  * Return the wrapped C++ IndexSet instance.
2485  * """
2486  * return self.instance[0] # <<<<<<<<<<<<<<
2487  *
2488  * cpdef copy(index_set self):
2489  */
2490  __pyx_r = (__pyx_v_self->instance[0]);
2491  goto __pyx_L0;
2492 
2493  /* "PyClical.pyx":58
2494  * return self
2495  *
2496  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2497  * """
2498  * Return the wrapped C++ IndexSet instance.
2499  */
2500 
2501  /* function exit code */
2502  __pyx_L0:;
2503  __Pyx_RefNannyFinishContext();
2504  return __pyx_r;
2505 }
2506 
2507 /* "PyClical.pyx":64
2508  * return self.instance[0]
2509  *
2510  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2511  * """
2512  * Copy this index_set object.
2513  */
2514 
2515 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2516 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2517  PyObject *__pyx_r = NULL;
2518  __Pyx_RefNannyDeclarations
2519  PyObject *__pyx_t_1 = NULL;
2520  PyObject *__pyx_t_2 = NULL;
2521  PyObject *__pyx_t_3 = NULL;
2522  PyObject *__pyx_t_4 = NULL;
2523  __Pyx_RefNannySetupContext("copy", 0);
2524  /* Check if called by wrapper */
2525  if (unlikely(__pyx_skip_dispatch)) ;
2526  /* Check if overridden in Python */
2527  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2528  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
2529  __Pyx_GOTREF(__pyx_t_1);
2530  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2531  __Pyx_XDECREF(__pyx_r);
2532  __Pyx_INCREF(__pyx_t_1);
2533  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2534  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2535  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2536  if (likely(__pyx_t_4)) {
2537  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2538  __Pyx_INCREF(__pyx_t_4);
2539  __Pyx_INCREF(function);
2540  __Pyx_DECREF_SET(__pyx_t_3, function);
2541  }
2542  }
2543  if (__pyx_t_4) {
2544  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2545  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2546  } else {
2547  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2548  }
2549  __Pyx_GOTREF(__pyx_t_2);
2550  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2551  __pyx_r = __pyx_t_2;
2552  __pyx_t_2 = 0;
2553  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2554  goto __pyx_L0;
2555  }
2556  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2557  }
2558 
2559  /* "PyClical.pyx":71
2560  * {1}
2561  * """
2562  * return index_set(self) # <<<<<<<<<<<<<<
2563  *
2564  * def __cinit__(self, other = 0):
2565  */
2566  __Pyx_XDECREF(__pyx_r);
2567  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2568  __Pyx_GOTREF(__pyx_t_1);
2569  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2570  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
2571  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
2572  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
2573  __Pyx_GOTREF(__pyx_t_2);
2574  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2575  __pyx_r = __pyx_t_2;
2576  __pyx_t_2 = 0;
2577  goto __pyx_L0;
2578 
2579  /* "PyClical.pyx":64
2580  * return self.instance[0]
2581  *
2582  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2583  * """
2584  * Copy this index_set object.
2585  */
2586 
2587  /* function exit code */
2588  __pyx_L1_error:;
2589  __Pyx_XDECREF(__pyx_t_1);
2590  __Pyx_XDECREF(__pyx_t_2);
2591  __Pyx_XDECREF(__pyx_t_3);
2592  __Pyx_XDECREF(__pyx_t_4);
2593  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2594  __pyx_r = 0;
2595  __pyx_L0:;
2596  __Pyx_XGIVEREF(__pyx_r);
2597  __Pyx_RefNannyFinishContext();
2598  return __pyx_r;
2599 }
2600 
2601 /* Python wrapper */
2602 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2603 static char __pyx_doc_8PyClical_9index_set_copy[] = "\n Copy this index_set object.\n\n >>> s=index_set(1); t=s.copy(); print t\n {1}\n ";
2604 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2605  PyObject *__pyx_r = 0;
2606  __Pyx_RefNannyDeclarations
2607  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2608  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2609 
2610  /* function exit code */
2611  __Pyx_RefNannyFinishContext();
2612  return __pyx_r;
2613 }
2614 
2615 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2616  PyObject *__pyx_r = NULL;
2617  __Pyx_RefNannyDeclarations
2618  PyObject *__pyx_t_1 = NULL;
2619  __Pyx_RefNannySetupContext("copy", 0);
2620  __Pyx_XDECREF(__pyx_r);
2621  __pyx_t_1 = __pyx_f_8PyClical_9index_set_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
2622  __Pyx_GOTREF(__pyx_t_1);
2623  __pyx_r = __pyx_t_1;
2624  __pyx_t_1 = 0;
2625  goto __pyx_L0;
2626 
2627  /* function exit code */
2628  __pyx_L1_error:;
2629  __Pyx_XDECREF(__pyx_t_1);
2630  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2631  __pyx_r = NULL;
2632  __pyx_L0:;
2633  __Pyx_XGIVEREF(__pyx_r);
2634  __Pyx_RefNannyFinishContext();
2635  return __pyx_r;
2636 }
2637 
2638 /* "PyClical.pyx":73
2639  * return index_set(self)
2640  *
2641  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2642  * """
2643  * Construct an object of type index_set.
2644  */
2645 
2646 /* Python wrapper */
2647 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2648 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2649  PyObject *__pyx_v_other = 0;
2650  int __pyx_r;
2651  __Pyx_RefNannyDeclarations
2652  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2653  {
2654  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2655  PyObject* values[1] = {0};
2656  values[0] = ((PyObject *)__pyx_int_0);
2657  if (unlikely(__pyx_kwds)) {
2658  Py_ssize_t kw_args;
2659  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2660  switch (pos_args) {
2661  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2662  CYTHON_FALLTHROUGH;
2663  case 0: break;
2664  default: goto __pyx_L5_argtuple_error;
2665  }
2666  kw_args = PyDict_Size(__pyx_kwds);
2667  switch (pos_args) {
2668  case 0:
2669  if (kw_args > 0) {
2670  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2671  if (value) { values[0] = value; kw_args--; }
2672  }
2673  }
2674  if (unlikely(kw_args > 0)) {
2675  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2676  }
2677  } else {
2678  switch (PyTuple_GET_SIZE(__pyx_args)) {
2679  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2680  CYTHON_FALLTHROUGH;
2681  case 0: break;
2682  default: goto __pyx_L5_argtuple_error;
2683  }
2684  }
2685  __pyx_v_other = values[0];
2686  }
2687  goto __pyx_L4_argument_unpacking_done;
2688  __pyx_L5_argtuple_error:;
2689  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2690  __pyx_L3_error:;
2691  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2692  __Pyx_RefNannyFinishContext();
2693  return -1;
2694  __pyx_L4_argument_unpacking_done:;
2695  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2696 
2697  /* function exit code */
2698  __Pyx_RefNannyFinishContext();
2699  return __pyx_r;
2700 }
2701 
2702 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2703  PyObject *__pyx_v_error_msg_prefix = NULL;
2704  PyObject *__pyx_v_idx = NULL;
2705  int __pyx_r;
2706  __Pyx_RefNannyDeclarations
2707  int __pyx_t_1;
2708  int __pyx_t_2;
2709  IndexSet *__pyx_t_3;
2710  PyObject *__pyx_t_4 = NULL;
2711  PyObject *__pyx_t_5 = NULL;
2712  int __pyx_t_6;
2713  int __pyx_t_7;
2714  PyObject *__pyx_t_8 = NULL;
2715  PyObject *__pyx_t_9 = NULL;
2716  PyObject *__pyx_t_10 = NULL;
2717  Py_ssize_t __pyx_t_11;
2718  PyObject *(*__pyx_t_12)(PyObject *);
2719  PyObject *__pyx_t_13 = NULL;
2720  PyObject *__pyx_t_14 = NULL;
2721  PyObject *__pyx_t_15 = NULL;
2722  PyObject *__pyx_t_16 = NULL;
2723  char *__pyx_t_17;
2724  __Pyx_RefNannySetupContext("__cinit__", 0);
2725 
2726  /* "PyClical.pyx":92
2727  * {}
2728  * """
2729  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2730  * if isinstance(other, index_set):
2731  * self.instance = new IndexSet((<index_set>other).unwrap())
2732  */
2733  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2734  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2735 
2736  /* "PyClical.pyx":93
2737  * """
2738  * error_msg_prefix = "Cannot initialize index_set object from"
2739  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2740  * self.instance = new IndexSet((<index_set>other).unwrap())
2741  * elif isinstance(other, numbers.Integral):
2742  */
2743  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2744  __pyx_t_2 = (__pyx_t_1 != 0);
2745  if (__pyx_t_2) {
2746 
2747  /* "PyClical.pyx":94
2748  * error_msg_prefix = "Cannot initialize index_set object from"
2749  * if isinstance(other, index_set):
2750  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2751  * elif isinstance(other, numbers.Integral):
2752  * self.instance = new IndexSet(<int>other)
2753  */
2754  try {
2755  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2756  } catch(...) {
2757  __Pyx_CppExn2PyErr();
2758  __PYX_ERR(0, 94, __pyx_L1_error)
2759  }
2760  __pyx_v_self->instance = __pyx_t_3;
2761 
2762  /* "PyClical.pyx":93
2763  * """
2764  * error_msg_prefix = "Cannot initialize index_set object from"
2765  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2766  * self.instance = new IndexSet((<index_set>other).unwrap())
2767  * elif isinstance(other, numbers.Integral):
2768  */
2769  goto __pyx_L3;
2770  }
2771 
2772  /* "PyClical.pyx":95
2773  * if isinstance(other, index_set):
2774  * self.instance = new IndexSet((<index_set>other).unwrap())
2775  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2776  * self.instance = new IndexSet(<int>other)
2777  * elif isinstance(other, (set, frozenset)):
2778  */
2779  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2780  __Pyx_GOTREF(__pyx_t_4);
2781  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Integral); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 95, __pyx_L1_error)
2782  __Pyx_GOTREF(__pyx_t_5);
2783  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2784  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_5); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 95, __pyx_L1_error)
2785  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2786  __pyx_t_1 = (__pyx_t_2 != 0);
2787  if (__pyx_t_1) {
2788 
2789  /* "PyClical.pyx":96
2790  * self.instance = new IndexSet((<index_set>other).unwrap())
2791  * elif isinstance(other, numbers.Integral):
2792  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2793  * elif isinstance(other, (set, frozenset)):
2794  * try:
2795  */
2796  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_other); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 96, __pyx_L1_error)
2797  try {
2798  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2799  } catch(...) {
2800  __Pyx_CppExn2PyErr();
2801  __PYX_ERR(0, 96, __pyx_L1_error)
2802  }
2803  __pyx_v_self->instance = __pyx_t_3;
2804 
2805  /* "PyClical.pyx":95
2806  * if isinstance(other, index_set):
2807  * self.instance = new IndexSet((<index_set>other).unwrap())
2808  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2809  * self.instance = new IndexSet(<int>other)
2810  * elif isinstance(other, (set, frozenset)):
2811  */
2812  goto __pyx_L3;
2813  }
2814 
2815  /* "PyClical.pyx":97
2816  * elif isinstance(other, numbers.Integral):
2817  * self.instance = new IndexSet(<int>other)
2818  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2819  * try:
2820  * self.instance = new IndexSet()
2821  */
2822  __pyx_t_2 = PySet_Check(__pyx_v_other);
2823  __pyx_t_7 = (__pyx_t_2 != 0);
2824  if (!__pyx_t_7) {
2825  } else {
2826  __pyx_t_1 = __pyx_t_7;
2827  goto __pyx_L4_bool_binop_done;
2828  }
2829  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2830  __pyx_t_2 = (__pyx_t_7 != 0);
2831  __pyx_t_1 = __pyx_t_2;
2832  __pyx_L4_bool_binop_done:;
2833  __pyx_t_2 = (__pyx_t_1 != 0);
2834  if (__pyx_t_2) {
2835 
2836  /* "PyClical.pyx":98
2837  * self.instance = new IndexSet(<int>other)
2838  * elif isinstance(other, (set, frozenset)):
2839  * try: # <<<<<<<<<<<<<<
2840  * self.instance = new IndexSet()
2841  * for idx in other:
2842  */
2843  {
2844  __Pyx_PyThreadState_declare
2845  __Pyx_PyThreadState_assign
2846  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2847  __Pyx_XGOTREF(__pyx_t_8);
2848  __Pyx_XGOTREF(__pyx_t_9);
2849  __Pyx_XGOTREF(__pyx_t_10);
2850  /*try:*/ {
2851 
2852  /* "PyClical.pyx":99
2853  * elif isinstance(other, (set, frozenset)):
2854  * try:
2855  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2856  * for idx in other:
2857  * self[idx] = True
2858  */
2859  __pyx_t_3 = new IndexSet();
2860  __pyx_v_self->instance = __pyx_t_3;
2861 
2862  /* "PyClical.pyx":100
2863  * try:
2864  * self.instance = new IndexSet()
2865  * for idx in other: # <<<<<<<<<<<<<<
2866  * self[idx] = True
2867  * except IndexError:
2868  */
2869  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2870  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2871  __pyx_t_12 = NULL;
2872  } else {
2873  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
2874  __Pyx_GOTREF(__pyx_t_5);
2875  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
2876  }
2877  for (;;) {
2878  if (likely(!__pyx_t_12)) {
2879  if (likely(PyList_CheckExact(__pyx_t_5))) {
2880  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
2881  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2882  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 100, __pyx_L6_error)
2883  #else
2884  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L6_error)
2885  __Pyx_GOTREF(__pyx_t_4);
2886  #endif
2887  } else {
2888  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2889  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2890  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 100, __pyx_L6_error)
2891  #else
2892  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 100, __pyx_L6_error)
2893  __Pyx_GOTREF(__pyx_t_4);
2894  #endif
2895  }
2896  } else {
2897  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2898  if (unlikely(!__pyx_t_4)) {
2899  PyObject* exc_type = PyErr_Occurred();
2900  if (exc_type) {
2901  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2902  else __PYX_ERR(0, 100, __pyx_L6_error)
2903  }
2904  break;
2905  }
2906  __Pyx_GOTREF(__pyx_t_4);
2907  }
2908  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2909  __pyx_t_4 = 0;
2910 
2911  /* "PyClical.pyx":101
2912  * self.instance = new IndexSet()
2913  * for idx in other:
2914  * self[idx] = True # <<<<<<<<<<<<<<
2915  * except IndexError:
2916  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2917  */
2918  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
2919 
2920  /* "PyClical.pyx":100
2921  * try:
2922  * self.instance = new IndexSet()
2923  * for idx in other: # <<<<<<<<<<<<<<
2924  * self[idx] = True
2925  * except IndexError:
2926  */
2927  }
2928  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2929 
2930  /* "PyClical.pyx":98
2931  * self.instance = new IndexSet(<int>other)
2932  * elif isinstance(other, (set, frozenset)):
2933  * try: # <<<<<<<<<<<<<<
2934  * self.instance = new IndexSet()
2935  * for idx in other:
2936  */
2937  }
2938  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2939  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2940  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2941  goto __pyx_L11_try_end;
2942  __pyx_L6_error:;
2943  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2944  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2945 
2946  /* "PyClical.pyx":102
2947  * for idx in other:
2948  * self[idx] = True
2949  * except IndexError: # <<<<<<<<<<<<<<
2950  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2951  * except (RuntimeError, TypeError):
2952  */
2953  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2954  if (__pyx_t_6) {
2955  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2956  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
2957  __Pyx_GOTREF(__pyx_t_5);
2958  __Pyx_GOTREF(__pyx_t_4);
2959  __Pyx_GOTREF(__pyx_t_13);
2960 
2961  /* "PyClical.pyx":103
2962  * self[idx] = True
2963  * except IndexError:
2964  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2965  * except (RuntimeError, TypeError):
2966  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2967  */
2968  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2969  __Pyx_GOTREF(__pyx_t_14);
2970  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2971  __Pyx_GOTREF(__pyx_t_15);
2972  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2973  __Pyx_GOTREF(__pyx_t_16);
2974  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2975  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2976  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2977  __Pyx_GOTREF(__pyx_t_15);
2978  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2979  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2980  __Pyx_GOTREF(__pyx_t_16);
2981  __Pyx_GIVEREF(__pyx_t_15);
2982  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2983  __pyx_t_15 = 0;
2984  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2985  __Pyx_GOTREF(__pyx_t_15);
2986  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2987  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2988  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2989  __PYX_ERR(0, 103, __pyx_L8_except_error)
2990  }
2991 
2992  /* "PyClical.pyx":104
2993  * except IndexError:
2994  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2995  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
2996  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2997  * elif isinstance(other, str):
2998  */
2999  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3000  if (__pyx_t_6) {
3001  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3002  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3003  __Pyx_GOTREF(__pyx_t_13);
3004  __Pyx_GOTREF(__pyx_t_4);
3005  __Pyx_GOTREF(__pyx_t_5);
3006 
3007  /* "PyClical.pyx":105
3008  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3009  * except (RuntimeError, TypeError):
3010  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3011  * elif isinstance(other, str):
3012  * try:
3013  */
3014  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3015  __Pyx_GOTREF(__pyx_t_15);
3016  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3017  __Pyx_GOTREF(__pyx_t_16);
3018  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3019  __Pyx_GOTREF(__pyx_t_14);
3020  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3021  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3022  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3023  __Pyx_GOTREF(__pyx_t_16);
3024  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3025  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3026  __Pyx_GOTREF(__pyx_t_14);
3027  __Pyx_GIVEREF(__pyx_t_16);
3028  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
3029  __pyx_t_16 = 0;
3030  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3031  __Pyx_GOTREF(__pyx_t_16);
3032  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3033  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3034  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3035  __PYX_ERR(0, 105, __pyx_L8_except_error)
3036  }
3037  goto __pyx_L8_except_error;
3038  __pyx_L8_except_error:;
3039 
3040  /* "PyClical.pyx":98
3041  * self.instance = new IndexSet(<int>other)
3042  * elif isinstance(other, (set, frozenset)):
3043  * try: # <<<<<<<<<<<<<<
3044  * self.instance = new IndexSet()
3045  * for idx in other:
3046  */
3047  __Pyx_XGIVEREF(__pyx_t_8);
3048  __Pyx_XGIVEREF(__pyx_t_9);
3049  __Pyx_XGIVEREF(__pyx_t_10);
3050  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3051  goto __pyx_L1_error;
3052  __pyx_L11_try_end:;
3053  }
3054 
3055  /* "PyClical.pyx":97
3056  * elif isinstance(other, numbers.Integral):
3057  * self.instance = new IndexSet(<int>other)
3058  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3059  * try:
3060  * self.instance = new IndexSet()
3061  */
3062  goto __pyx_L3;
3063  }
3064 
3065  /* "PyClical.pyx":106
3066  * except (RuntimeError, TypeError):
3067  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3068  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3069  * try:
3070  * self.instance = new IndexSet(<char *>other)
3071  */
3072  __pyx_t_2 = PyString_Check(__pyx_v_other);
3073  __pyx_t_1 = (__pyx_t_2 != 0);
3074  if (__pyx_t_1) {
3075 
3076  /* "PyClical.pyx":107
3077  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3078  * elif isinstance(other, str):
3079  * try: # <<<<<<<<<<<<<<
3080  * self.instance = new IndexSet(<char *>other)
3081  * except RuntimeError:
3082  */
3083  {
3084  __Pyx_PyThreadState_declare
3085  __Pyx_PyThreadState_assign
3086  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3087  __Pyx_XGOTREF(__pyx_t_10);
3088  __Pyx_XGOTREF(__pyx_t_9);
3089  __Pyx_XGOTREF(__pyx_t_8);
3090  /*try:*/ {
3091 
3092  /* "PyClical.pyx":108
3093  * elif isinstance(other, str):
3094  * try:
3095  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3096  * except RuntimeError:
3097  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3098  */
3099  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3100  try {
3101  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3102  } catch(...) {
3103  __Pyx_CppExn2PyErr();
3104  __PYX_ERR(0, 108, __pyx_L18_error)
3105  }
3106  __pyx_v_self->instance = __pyx_t_3;
3107 
3108  /* "PyClical.pyx":107
3109  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3110  * elif isinstance(other, str):
3111  * try: # <<<<<<<<<<<<<<
3112  * self.instance = new IndexSet(<char *>other)
3113  * except RuntimeError:
3114  */
3115  }
3116  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3117  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3118  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3119  goto __pyx_L23_try_end;
3120  __pyx_L18_error:;
3121  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3122  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3123  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3124  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3125  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3126  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3127 
3128  /* "PyClical.pyx":109
3129  * try:
3130  * self.instance = new IndexSet(<char *>other)
3131  * except RuntimeError: # <<<<<<<<<<<<<<
3132  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3133  * else:
3134  */
3135  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3136  if (__pyx_t_6) {
3137  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3138  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3139  __Pyx_GOTREF(__pyx_t_5);
3140  __Pyx_GOTREF(__pyx_t_4);
3141  __Pyx_GOTREF(__pyx_t_13);
3142 
3143  /* "PyClical.pyx":110
3144  * self.instance = new IndexSet(<char *>other)
3145  * except RuntimeError:
3146  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3147  * else:
3148  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3149  */
3150  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3151  __Pyx_GOTREF(__pyx_t_16);
3152  __pyx_t_14 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3153  __Pyx_GOTREF(__pyx_t_14);
3154  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3155  __Pyx_GOTREF(__pyx_t_15);
3156  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3157  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3158  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3159  __Pyx_GOTREF(__pyx_t_14);
3160  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3161  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3162  __Pyx_GOTREF(__pyx_t_15);
3163  __Pyx_GIVEREF(__pyx_t_14);
3164  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
3165  __pyx_t_14 = 0;
3166  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3167  __Pyx_GOTREF(__pyx_t_14);
3168  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3169  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3170  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3171  __PYX_ERR(0, 110, __pyx_L20_except_error)
3172  }
3173  goto __pyx_L20_except_error;
3174  __pyx_L20_except_error:;
3175 
3176  /* "PyClical.pyx":107
3177  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3178  * elif isinstance(other, str):
3179  * try: # <<<<<<<<<<<<<<
3180  * self.instance = new IndexSet(<char *>other)
3181  * except RuntimeError:
3182  */
3183  __Pyx_XGIVEREF(__pyx_t_10);
3184  __Pyx_XGIVEREF(__pyx_t_9);
3185  __Pyx_XGIVEREF(__pyx_t_8);
3186  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3187  goto __pyx_L1_error;
3188  __pyx_L23_try_end:;
3189  }
3190 
3191  /* "PyClical.pyx":106
3192  * except (RuntimeError, TypeError):
3193  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3194  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3195  * try:
3196  * self.instance = new IndexSet(<char *>other)
3197  */
3198  goto __pyx_L3;
3199  }
3200 
3201  /* "PyClical.pyx":112
3202  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3203  * else:
3204  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3205  *
3206  * def __dealloc__(self):
3207  */
3208  /*else*/ {
3209  __pyx_t_13 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 112, __pyx_L1_error)
3210  __Pyx_GOTREF(__pyx_t_13);
3211  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3212  __Pyx_GOTREF(__pyx_t_4);
3213  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
3214  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
3215  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
3216  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3217  __Pyx_GOTREF(__pyx_t_5);
3218  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3219  __pyx_t_4 = PyNumber_Add(__pyx_t_13, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3220  __Pyx_GOTREF(__pyx_t_4);
3221  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3222  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3223  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3224  __Pyx_GOTREF(__pyx_t_5);
3225  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3226  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3227  __Pyx_GOTREF(__pyx_t_4);
3228  __Pyx_GIVEREF(__pyx_t_5);
3229  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
3230  __pyx_t_5 = 0;
3231  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3232  __Pyx_GOTREF(__pyx_t_5);
3233  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3234  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3235  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3236  __PYX_ERR(0, 112, __pyx_L1_error)
3237  }
3238  __pyx_L3:;
3239 
3240  /* "PyClical.pyx":73
3241  * return index_set(self)
3242  *
3243  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3244  * """
3245  * Construct an object of type index_set.
3246  */
3247 
3248  /* function exit code */
3249  __pyx_r = 0;
3250  goto __pyx_L0;
3251  __pyx_L1_error:;
3252  __Pyx_XDECREF(__pyx_t_4);
3253  __Pyx_XDECREF(__pyx_t_5);
3254  __Pyx_XDECREF(__pyx_t_13);
3255  __Pyx_XDECREF(__pyx_t_14);
3256  __Pyx_XDECREF(__pyx_t_15);
3257  __Pyx_XDECREF(__pyx_t_16);
3258  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3259  __pyx_r = -1;
3260  __pyx_L0:;
3261  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3262  __Pyx_XDECREF(__pyx_v_idx);
3263  __Pyx_RefNannyFinishContext();
3264  return __pyx_r;
3265 }
3266 
3267 /* "PyClical.pyx":114
3268  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3269  *
3270  * def __dealloc__(self): # <<<<<<<<<<<<<<
3271  * """
3272  * Clean up by deallocating the instance of C++ class IndexSet.
3273  */
3274 
3275 /* Python wrapper */
3276 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3277 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3278  __Pyx_RefNannyDeclarations
3279  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3280  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3281 
3282  /* function exit code */
3283  __Pyx_RefNannyFinishContext();
3284 }
3285 
3286 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3287  __Pyx_RefNannyDeclarations
3288  __Pyx_RefNannySetupContext("__dealloc__", 0);
3289 
3290  /* "PyClical.pyx":118
3291  * Clean up by deallocating the instance of C++ class IndexSet.
3292  * """
3293  * del self.instance # <<<<<<<<<<<<<<
3294  *
3295  * def __richcmp__(lhs, rhs, int op):
3296  */
3297  delete __pyx_v_self->instance;
3298 
3299  /* "PyClical.pyx":114
3300  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3301  *
3302  * def __dealloc__(self): # <<<<<<<<<<<<<<
3303  * """
3304  * Clean up by deallocating the instance of C++ class IndexSet.
3305  */
3306 
3307  /* function exit code */
3308  __Pyx_RefNannyFinishContext();
3309 }
3310 
3311 /* "PyClical.pyx":120
3312  * del self.instance
3313  *
3314  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3315  * """
3316  * Compare two objects of class index_set.
3317  */
3318 
3319 /* Python wrapper */
3320 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3321 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3322  PyObject *__pyx_r = 0;
3323  __Pyx_RefNannyDeclarations
3324  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3325  __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
3326 
3327  /* function exit code */
3328  __Pyx_RefNannyFinishContext();
3329  return __pyx_r;
3330 }
3331 
3332 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3333  PyObject *__pyx_v_eq = NULL;
3334  PyObject *__pyx_v_lt = NULL;
3335  PyObject *__pyx_r = NULL;
3336  __Pyx_RefNannyDeclarations
3337  int __pyx_t_1;
3338  int __pyx_t_2;
3339  int __pyx_t_3;
3340  PyObject *__pyx_t_4 = NULL;
3341  __Pyx_RefNannySetupContext("__richcmp__", 0);
3342 
3343  /* "PyClical.pyx":141
3344  * False
3345  * """
3346  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3347  * eq = bool(lhs is rhs)
3348  * if op == 2: # ==
3349  */
3350  __pyx_t_2 = (__pyx_v_lhs == Py_None);
3351  __pyx_t_3 = (__pyx_t_2 != 0);
3352  if (!__pyx_t_3) {
3353  } else {
3354  __pyx_t_1 = __pyx_t_3;
3355  goto __pyx_L4_bool_binop_done;
3356  }
3357  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3358  __pyx_t_2 = (__pyx_t_3 != 0);
3359  __pyx_t_1 = __pyx_t_2;
3360  __pyx_L4_bool_binop_done:;
3361  if (__pyx_t_1) {
3362 
3363  /* "PyClical.pyx":142
3364  * """
3365  * if (lhs is None) or (rhs is None):
3366  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3367  * if op == 2: # ==
3368  * return eq
3369  */
3370  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
3371  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3372  __Pyx_GOTREF(__pyx_t_4);
3373  __pyx_v_eq = __pyx_t_4;
3374  __pyx_t_4 = 0;
3375 
3376  /* "PyClical.pyx":143
3377  * if (lhs is None) or (rhs is None):
3378  * eq = bool(lhs is rhs)
3379  * if op == 2: # == # <<<<<<<<<<<<<<
3380  * return eq
3381  * elif op == 3: # !=
3382  */
3383  switch (__pyx_v_op) {
3384  case 2:
3385 
3386  /* "PyClical.pyx":144
3387  * eq = bool(lhs is rhs)
3388  * if op == 2: # ==
3389  * return eq # <<<<<<<<<<<<<<
3390  * elif op == 3: # !=
3391  * return not eq
3392  */
3393  __Pyx_XDECREF(__pyx_r);
3394  __Pyx_INCREF(__pyx_v_eq);
3395  __pyx_r = __pyx_v_eq;
3396  goto __pyx_L0;
3397 
3398  /* "PyClical.pyx":143
3399  * if (lhs is None) or (rhs is None):
3400  * eq = bool(lhs is rhs)
3401  * if op == 2: # == # <<<<<<<<<<<<<<
3402  * return eq
3403  * elif op == 3: # !=
3404  */
3405  break;
3406 
3407  /* "PyClical.pyx":145
3408  * if op == 2: # ==
3409  * return eq
3410  * elif op == 3: # != # <<<<<<<<<<<<<<
3411  * return not eq
3412  * else:
3413  */
3414  case 3:
3415 
3416  /* "PyClical.pyx":146
3417  * return eq
3418  * elif op == 3: # !=
3419  * return not eq # <<<<<<<<<<<<<<
3420  * else:
3421  * if op == 0: # <
3422  */
3423  __Pyx_XDECREF(__pyx_r);
3424  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3425  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3426  __Pyx_GOTREF(__pyx_t_4);
3427  __pyx_r = __pyx_t_4;
3428  __pyx_t_4 = 0;
3429  goto __pyx_L0;
3430 
3431  /* "PyClical.pyx":145
3432  * if op == 2: # ==
3433  * return eq
3434  * elif op == 3: # != # <<<<<<<<<<<<<<
3435  * return not eq
3436  * else:
3437  */
3438  break;
3439  default:
3440 
3441  /* "PyClical.pyx":148
3442  * return not eq
3443  * else:
3444  * if op == 0: # < # <<<<<<<<<<<<<<
3445  * return False
3446  * elif op == 1: # <=
3447  */
3448  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3449  if (__pyx_t_1) {
3450 
3451  /* "PyClical.pyx":149
3452  * else:
3453  * if op == 0: # <
3454  * return False # <<<<<<<<<<<<<<
3455  * elif op == 1: # <=
3456  * return eq
3457  */
3458  __Pyx_XDECREF(__pyx_r);
3459  __Pyx_INCREF(Py_False);
3460  __pyx_r = Py_False;
3461  goto __pyx_L0;
3462 
3463  /* "PyClical.pyx":148
3464  * return not eq
3465  * else:
3466  * if op == 0: # < # <<<<<<<<<<<<<<
3467  * return False
3468  * elif op == 1: # <=
3469  */
3470  }
3471 
3472  /* "PyClical.pyx":150
3473  * if op == 0: # <
3474  * return False
3475  * elif op == 1: # <= # <<<<<<<<<<<<<<
3476  * return eq
3477  * elif op == 4: # >
3478  */
3479  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3480  if (__pyx_t_1) {
3481 
3482  /* "PyClical.pyx":151
3483  * return False
3484  * elif op == 1: # <=
3485  * return eq # <<<<<<<<<<<<<<
3486  * elif op == 4: # >
3487  * return False
3488  */
3489  __Pyx_XDECREF(__pyx_r);
3490  __Pyx_INCREF(__pyx_v_eq);
3491  __pyx_r = __pyx_v_eq;
3492  goto __pyx_L0;
3493 
3494  /* "PyClical.pyx":150
3495  * if op == 0: # <
3496  * return False
3497  * elif op == 1: # <= # <<<<<<<<<<<<<<
3498  * return eq
3499  * elif op == 4: # >
3500  */
3501  }
3502 
3503  /* "PyClical.pyx":152
3504  * elif op == 1: # <=
3505  * return eq
3506  * elif op == 4: # > # <<<<<<<<<<<<<<
3507  * return False
3508  * elif op == 5: # >=
3509  */
3510  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3511  if (__pyx_t_1) {
3512 
3513  /* "PyClical.pyx":153
3514  * return eq
3515  * elif op == 4: # >
3516  * return False # <<<<<<<<<<<<<<
3517  * elif op == 5: # >=
3518  * return eq
3519  */
3520  __Pyx_XDECREF(__pyx_r);
3521  __Pyx_INCREF(Py_False);
3522  __pyx_r = Py_False;
3523  goto __pyx_L0;
3524 
3525  /* "PyClical.pyx":152
3526  * elif op == 1: # <=
3527  * return eq
3528  * elif op == 4: # > # <<<<<<<<<<<<<<
3529  * return False
3530  * elif op == 5: # >=
3531  */
3532  }
3533 
3534  /* "PyClical.pyx":154
3535  * elif op == 4: # >
3536  * return False
3537  * elif op == 5: # >= # <<<<<<<<<<<<<<
3538  * return eq
3539  * else:
3540  */
3541  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3542  if (__pyx_t_1) {
3543 
3544  /* "PyClical.pyx":155
3545  * return False
3546  * elif op == 5: # >=
3547  * return eq # <<<<<<<<<<<<<<
3548  * else:
3549  * return NotImplemented
3550  */
3551  __Pyx_XDECREF(__pyx_r);
3552  __Pyx_INCREF(__pyx_v_eq);
3553  __pyx_r = __pyx_v_eq;
3554  goto __pyx_L0;
3555 
3556  /* "PyClical.pyx":154
3557  * elif op == 4: # >
3558  * return False
3559  * elif op == 5: # >= # <<<<<<<<<<<<<<
3560  * return eq
3561  * else:
3562  */
3563  }
3564 
3565  /* "PyClical.pyx":157
3566  * return eq
3567  * else:
3568  * return NotImplemented # <<<<<<<<<<<<<<
3569  * else:
3570  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3571  */
3572  /*else*/ {
3573  __Pyx_XDECREF(__pyx_r);
3574  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3575  __pyx_r = __pyx_builtin_NotImplemented;
3576  goto __pyx_L0;
3577  }
3578  break;
3579  }
3580 
3581  /* "PyClical.pyx":141
3582  * False
3583  * """
3584  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3585  * eq = bool(lhs is rhs)
3586  * if op == 2: # ==
3587  */
3588  }
3589 
3590  /* "PyClical.pyx":159
3591  * return NotImplemented
3592  * else:
3593  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3594  * if op == 2: # ==
3595  * return eq
3596  */
3597  /*else*/ {
3598  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3599  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3600  __Pyx_GOTREF(__pyx_t_4);
3601  __pyx_v_eq = __pyx_t_4;
3602  __pyx_t_4 = 0;
3603 
3604  /* "PyClical.pyx":160
3605  * else:
3606  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3607  * if op == 2: # == # <<<<<<<<<<<<<<
3608  * return eq
3609  * elif op == 3: # !=
3610  */
3611  switch (__pyx_v_op) {
3612  case 2:
3613 
3614  /* "PyClical.pyx":161
3615  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3616  * if op == 2: # ==
3617  * return eq # <<<<<<<<<<<<<<
3618  * elif op == 3: # !=
3619  * return not eq
3620  */
3621  __Pyx_XDECREF(__pyx_r);
3622  __Pyx_INCREF(__pyx_v_eq);
3623  __pyx_r = __pyx_v_eq;
3624  goto __pyx_L0;
3625 
3626  /* "PyClical.pyx":160
3627  * else:
3628  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3629  * if op == 2: # == # <<<<<<<<<<<<<<
3630  * return eq
3631  * elif op == 3: # !=
3632  */
3633  break;
3634 
3635  /* "PyClical.pyx":162
3636  * if op == 2: # ==
3637  * return eq
3638  * elif op == 3: # != # <<<<<<<<<<<<<<
3639  * return not eq
3640  * else:
3641  */
3642  case 3:
3643 
3644  /* "PyClical.pyx":163
3645  * return eq
3646  * elif op == 3: # !=
3647  * return not eq # <<<<<<<<<<<<<<
3648  * else:
3649  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3650  */
3651  __Pyx_XDECREF(__pyx_r);
3652  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3653  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3654  __Pyx_GOTREF(__pyx_t_4);
3655  __pyx_r = __pyx_t_4;
3656  __pyx_t_4 = 0;
3657  goto __pyx_L0;
3658 
3659  /* "PyClical.pyx":162
3660  * if op == 2: # ==
3661  * return eq
3662  * elif op == 3: # != # <<<<<<<<<<<<<<
3663  * return not eq
3664  * else:
3665  */
3666  break;
3667  default:
3668 
3669  /* "PyClical.pyx":165
3670  * return not eq
3671  * else:
3672  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3673  * if op == 0: # <
3674  * return lt
3675  */
3676  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3677  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3678  __Pyx_GOTREF(__pyx_t_4);
3679  __pyx_v_lt = __pyx_t_4;
3680  __pyx_t_4 = 0;
3681 
3682  /* "PyClical.pyx":166
3683  * else:
3684  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3685  * if op == 0: # < # <<<<<<<<<<<<<<
3686  * return lt
3687  * elif op == 1: # <=
3688  */
3689  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3690  if (__pyx_t_1) {
3691 
3692  /* "PyClical.pyx":167
3693  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3694  * if op == 0: # <
3695  * return lt # <<<<<<<<<<<<<<
3696  * elif op == 1: # <=
3697  * return lt or eq
3698  */
3699  __Pyx_XDECREF(__pyx_r);
3700  __Pyx_INCREF(__pyx_v_lt);
3701  __pyx_r = __pyx_v_lt;
3702  goto __pyx_L0;
3703 
3704  /* "PyClical.pyx":166
3705  * else:
3706  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3707  * if op == 0: # < # <<<<<<<<<<<<<<
3708  * return lt
3709  * elif op == 1: # <=
3710  */
3711  }
3712 
3713  /* "PyClical.pyx":168
3714  * if op == 0: # <
3715  * return lt
3716  * elif op == 1: # <= # <<<<<<<<<<<<<<
3717  * return lt or eq
3718  * elif op == 4: # >
3719  */
3720  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3721  if (__pyx_t_1) {
3722 
3723  /* "PyClical.pyx":169
3724  * return lt
3725  * elif op == 1: # <=
3726  * return lt or eq # <<<<<<<<<<<<<<
3727  * elif op == 4: # >
3728  * return not (lt or eq)
3729  */
3730  __Pyx_XDECREF(__pyx_r);
3731  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3732  if (!__pyx_t_1) {
3733  } else {
3734  __Pyx_INCREF(__pyx_v_lt);
3735  __pyx_t_4 = __pyx_v_lt;
3736  goto __pyx_L8_bool_binop_done;
3737  }
3738  __Pyx_INCREF(__pyx_v_eq);
3739  __pyx_t_4 = __pyx_v_eq;
3740  __pyx_L8_bool_binop_done:;
3741  __pyx_r = __pyx_t_4;
3742  __pyx_t_4 = 0;
3743  goto __pyx_L0;
3744 
3745  /* "PyClical.pyx":168
3746  * if op == 0: # <
3747  * return lt
3748  * elif op == 1: # <= # <<<<<<<<<<<<<<
3749  * return lt or eq
3750  * elif op == 4: # >
3751  */
3752  }
3753 
3754  /* "PyClical.pyx":170
3755  * elif op == 1: # <=
3756  * return lt or eq
3757  * elif op == 4: # > # <<<<<<<<<<<<<<
3758  * return not (lt or eq)
3759  * elif op == 5: # >=
3760  */
3761  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3762  if (__pyx_t_1) {
3763 
3764  /* "PyClical.pyx":171
3765  * return lt or eq
3766  * elif op == 4: # >
3767  * return not (lt or eq) # <<<<<<<<<<<<<<
3768  * elif op == 5: # >=
3769  * return not lt
3770  */
3771  __Pyx_XDECREF(__pyx_r);
3772  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3773  if (!__pyx_t_2) {
3774  } else {
3775  __pyx_t_1 = __pyx_t_2;
3776  goto __pyx_L10_bool_binop_done;
3777  }
3778  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3779  __pyx_t_1 = __pyx_t_2;
3780  __pyx_L10_bool_binop_done:;
3781  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3782  __Pyx_GOTREF(__pyx_t_4);
3783  __pyx_r = __pyx_t_4;
3784  __pyx_t_4 = 0;
3785  goto __pyx_L0;
3786 
3787  /* "PyClical.pyx":170
3788  * elif op == 1: # <=
3789  * return lt or eq
3790  * elif op == 4: # > # <<<<<<<<<<<<<<
3791  * return not (lt or eq)
3792  * elif op == 5: # >=
3793  */
3794  }
3795 
3796  /* "PyClical.pyx":172
3797  * elif op == 4: # >
3798  * return not (lt or eq)
3799  * elif op == 5: # >= # <<<<<<<<<<<<<<
3800  * return not lt
3801  * else:
3802  */
3803  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3804  if (__pyx_t_1) {
3805 
3806  /* "PyClical.pyx":173
3807  * return not (lt or eq)
3808  * elif op == 5: # >=
3809  * return not lt # <<<<<<<<<<<<<<
3810  * else:
3811  * return NotImplemented
3812  */
3813  __Pyx_XDECREF(__pyx_r);
3814  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3815  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3816  __Pyx_GOTREF(__pyx_t_4);
3817  __pyx_r = __pyx_t_4;
3818  __pyx_t_4 = 0;
3819  goto __pyx_L0;
3820 
3821  /* "PyClical.pyx":172
3822  * elif op == 4: # >
3823  * return not (lt or eq)
3824  * elif op == 5: # >= # <<<<<<<<<<<<<<
3825  * return not lt
3826  * else:
3827  */
3828  }
3829 
3830  /* "PyClical.pyx":175
3831  * return not lt
3832  * else:
3833  * return NotImplemented # <<<<<<<<<<<<<<
3834  *
3835  * def __setitem__(self, idx, val):
3836  */
3837  /*else*/ {
3838  __Pyx_XDECREF(__pyx_r);
3839  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3840  __pyx_r = __pyx_builtin_NotImplemented;
3841  goto __pyx_L0;
3842  }
3843  break;
3844  }
3845  }
3846 
3847  /* "PyClical.pyx":120
3848  * del self.instance
3849  *
3850  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3851  * """
3852  * Compare two objects of class index_set.
3853  */
3854 
3855  /* function exit code */
3856  __pyx_L1_error:;
3857  __Pyx_XDECREF(__pyx_t_4);
3858  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3859  __pyx_r = NULL;
3860  __pyx_L0:;
3861  __Pyx_XDECREF(__pyx_v_eq);
3862  __Pyx_XDECREF(__pyx_v_lt);
3863  __Pyx_XGIVEREF(__pyx_r);
3864  __Pyx_RefNannyFinishContext();
3865  return __pyx_r;
3866 }
3867 
3868 /* "PyClical.pyx":177
3869  * return NotImplemented
3870  *
3871  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3872  * """
3873  * Set the value of an index_set object at index idx to value val.
3874  */
3875 
3876 /* Python wrapper */
3877 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3878 static char __pyx_doc_8PyClical_9index_set_8__setitem__[] = "\n Set the value of an index_set object at index idx to value val.\n\n >>> s=index_set({1}); s[2] = True; print s\n {1,2}\n >>> s=index_set({1,2}); s[1] = False; print s\n {2}\n ";
3879 #if CYTHON_COMPILING_IN_CPYTHON
3880 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3881 #endif
3882 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3883  int __pyx_r;
3884  __Pyx_RefNannyDeclarations
3885  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3886  __pyx_r = __pyx_pf_8PyClical_9index_set_8__setitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx), ((PyObject *)__pyx_v_val));
3887 
3888  /* function exit code */
3889  __Pyx_RefNannyFinishContext();
3890  return __pyx_r;
3891 }
3892 
3893 static int __pyx_pf_8PyClical_9index_set_8__setitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3894  int __pyx_r;
3895  __Pyx_RefNannyDeclarations
3896  int __pyx_t_1;
3897  int __pyx_t_2;
3898  __Pyx_RefNannySetupContext("__setitem__", 0);
3899 
3900  /* "PyClical.pyx":186
3901  * {2}
3902  * """
3903  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3904  * return
3905  *
3906  */
3907  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L1_error)
3908  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L1_error)
3909  try {
3910  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3911  } catch(...) {
3912  __Pyx_CppExn2PyErr();
3913  __PYX_ERR(0, 186, __pyx_L1_error)
3914  }
3915 
3916  /* "PyClical.pyx":187
3917  * """
3918  * self.instance.set(idx, val)
3919  * return # <<<<<<<<<<<<<<
3920  *
3921  * def __getitem__(self, idx):
3922  */
3923  __pyx_r = 0;
3924  goto __pyx_L0;
3925 
3926  /* "PyClical.pyx":177
3927  * return NotImplemented
3928  *
3929  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3930  * """
3931  * Set the value of an index_set object at index idx to value val.
3932  */
3933 
3934  /* function exit code */
3935  __pyx_L1_error:;
3936  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3937  __pyx_r = -1;
3938  __pyx_L0:;
3939  __Pyx_RefNannyFinishContext();
3940  return __pyx_r;
3941 }
3942 
3943 /* "PyClical.pyx":189
3944  * return
3945  *
3946  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3947  * """
3948  * Get the value of an index_set object at an index.
3949  */
3950 
3951 /* Python wrapper */
3952 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3953 static char __pyx_doc_8PyClical_9index_set_10__getitem__[] = "\n Get the value of an index_set object at an index.\n\n >>> index_set({1})[1]\n True\n >>> index_set({1})[2]\n False\n >>> index_set({2})[-1]\n False\n >>> index_set({2})[1]\n False\n >>> index_set({2})[2]\n True\n >>> index_set({2})[33]\n False\n ";
3954 #if CYTHON_COMPILING_IN_CPYTHON
3955 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3956 #endif
3957 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3958  PyObject *__pyx_r = 0;
3959  __Pyx_RefNannyDeclarations
3960  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
3961  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3962 
3963  /* function exit code */
3964  __Pyx_RefNannyFinishContext();
3965  return __pyx_r;
3966 }
3967 
3968 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3969  PyObject *__pyx_r = NULL;
3970  __Pyx_RefNannyDeclarations
3971  int __pyx_t_1;
3972  PyObject *__pyx_t_2 = NULL;
3973  __Pyx_RefNannySetupContext("__getitem__", 0);
3974 
3975  /* "PyClical.pyx":206
3976  * False
3977  * """
3978  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3979  *
3980  * def __contains__(self, idx):
3981  */
3982  __Pyx_XDECREF(__pyx_r);
3983  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 206, __pyx_L1_error)
3984  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->operator[](__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
3985  __Pyx_GOTREF(__pyx_t_2);
3986  __pyx_r = __pyx_t_2;
3987  __pyx_t_2 = 0;
3988  goto __pyx_L0;
3989 
3990  /* "PyClical.pyx":189
3991  * return
3992  *
3993  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3994  * """
3995  * Get the value of an index_set object at an index.
3996  */
3997 
3998  /* function exit code */
3999  __pyx_L1_error:;
4000  __Pyx_XDECREF(__pyx_t_2);
4001  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4002  __pyx_r = NULL;
4003  __pyx_L0:;
4004  __Pyx_XGIVEREF(__pyx_r);
4005  __Pyx_RefNannyFinishContext();
4006  return __pyx_r;
4007 }
4008 
4009 /* "PyClical.pyx":208
4010  * return self.instance.getitem(idx)
4011  *
4012  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4013  * """
4014  * Check that an index_set object contains the index idx: idx in self.
4015  */
4016 
4017 /* Python wrapper */
4018 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4019 static char __pyx_doc_8PyClical_9index_set_12__contains__[] = "\n Check that an index_set object contains the index idx: idx in self.\n\n >>> 1 in index_set({1})\n True\n >>> 2 in index_set({1})\n False\n >>> -1 in index_set({2})\n False\n >>> 1 in index_set({2})\n False\n >>> 2 in index_set({2})\n True\n >>> 33 in index_set({2})\n False\n ";
4020 #if CYTHON_COMPILING_IN_CPYTHON
4021 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4022 #endif
4023 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4024  int __pyx_r;
4025  __Pyx_RefNannyDeclarations
4026  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4027  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4028 
4029  /* function exit code */
4030  __Pyx_RefNannyFinishContext();
4031  return __pyx_r;
4032 }
4033 
4034 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4035  int __pyx_r;
4036  __Pyx_RefNannyDeclarations
4037  int __pyx_t_1;
4038  __Pyx_RefNannySetupContext("__contains__", 0);
4039 
4040  /* "PyClical.pyx":225
4041  * False
4042  * """
4043  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4044  *
4045  * def __iter__(self):
4046  */
4047  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_idx); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 225, __pyx_L1_error)
4048  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4049  goto __pyx_L0;
4050 
4051  /* "PyClical.pyx":208
4052  * return self.instance.getitem(idx)
4053  *
4054  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4055  * """
4056  * Check that an index_set object contains the index idx: idx in self.
4057  */
4058 
4059  /* function exit code */
4060  __pyx_L1_error:;
4061  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4062  __pyx_r = -1;
4063  __pyx_L0:;
4064  __Pyx_RefNannyFinishContext();
4065  return __pyx_r;
4066 }
4067 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4068 
4069 /* "PyClical.pyx":227
4070  * return self.instance.getitem(idx)
4071  *
4072  * def __iter__(self): # <<<<<<<<<<<<<<
4073  * """
4074  * Iterate over the indices of an index_set.
4075  */
4076 
4077 /* Python wrapper */
4078 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4079 static char __pyx_doc_8PyClical_9index_set_14__iter__[] = "\n Iterate over the indices of an index_set.\n\n >>> for i in index_set({-3,4,7}): print i,\n -3 4 7\n ";
4080 #if CYTHON_COMPILING_IN_CPYTHON
4081 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4082 #endif
4083 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4084  PyObject *__pyx_r = 0;
4085  __Pyx_RefNannyDeclarations
4086  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4087  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4088 
4089  /* function exit code */
4090  __Pyx_RefNannyFinishContext();
4091  return __pyx_r;
4092 }
4093 
4094 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4095  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4096  PyObject *__pyx_r = NULL;
4097  __Pyx_RefNannyDeclarations
4098  __Pyx_RefNannySetupContext("__iter__", 0);
4099  __pyx_cur_scope = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(__pyx_ptype_8PyClical___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
4100  if (unlikely(!__pyx_cur_scope)) {
4101  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4102  __Pyx_INCREF(Py_None);
4103  __PYX_ERR(0, 227, __pyx_L1_error)
4104  } else {
4105  __Pyx_GOTREF(__pyx_cur_scope);
4106  }
4107  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4108  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4109  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4110  {
4111  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8PyClical_9index_set_16generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_index_set___iter, __pyx_n_s_PyClical); if (unlikely(!gen)) __PYX_ERR(0, 227, __pyx_L1_error)
4112  __Pyx_DECREF(__pyx_cur_scope);
4113  __Pyx_RefNannyFinishContext();
4114  return (PyObject *) gen;
4115  }
4116 
4117  /* function exit code */
4118  __pyx_L1_error:;
4119  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4120  __pyx_r = NULL;
4121  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4122  __Pyx_XGIVEREF(__pyx_r);
4123  __Pyx_RefNannyFinishContext();
4124  return __pyx_r;
4125 }
4126 
4127 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4128 {
4129  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4130  PyObject *__pyx_r = NULL;
4131  PyObject *__pyx_t_1 = NULL;
4132  PyObject *__pyx_t_2 = NULL;
4133  PyObject *__pyx_t_3 = NULL;
4134  PyObject *__pyx_t_4 = NULL;
4135  Py_ssize_t __pyx_t_5;
4136  PyObject *(*__pyx_t_6)(PyObject *);
4137  int __pyx_t_7;
4138  int __pyx_t_8;
4139  __Pyx_RefNannyDeclarations
4140  __Pyx_RefNannySetupContext("__iter__", 0);
4141  switch (__pyx_generator->resume_label) {
4142  case 0: goto __pyx_L3_first_run;
4143  case 1: goto __pyx_L7_resume_from_yield;
4144  default: /* CPython raises the right error here */
4145  __Pyx_RefNannyFinishContext();
4146  return NULL;
4147  }
4148  __pyx_L3_first_run:;
4149  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4150 
4151  /* "PyClical.pyx":234
4152  * -3 4 7
4153  * """
4154  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4155  * if idx in self:
4156  * yield idx
4157  */
4158  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_min); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4159  __Pyx_GOTREF(__pyx_t_2);
4160  __pyx_t_3 = NULL;
4161  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4162  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4163  if (likely(__pyx_t_3)) {
4164  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4165  __Pyx_INCREF(__pyx_t_3);
4166  __Pyx_INCREF(function);
4167  __Pyx_DECREF_SET(__pyx_t_2, function);
4168  }
4169  }
4170  if (__pyx_t_3) {
4171  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4172  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4173  } else {
4174  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4175  }
4176  __Pyx_GOTREF(__pyx_t_1);
4177  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4178  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_max); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4179  __Pyx_GOTREF(__pyx_t_3);
4180  __pyx_t_4 = NULL;
4181  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4182  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4183  if (likely(__pyx_t_4)) {
4184  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4185  __Pyx_INCREF(__pyx_t_4);
4186  __Pyx_INCREF(function);
4187  __Pyx_DECREF_SET(__pyx_t_3, function);
4188  }
4189  }
4190  if (__pyx_t_4) {
4191  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4192  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4193  } else {
4194  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4195  }
4196  __Pyx_GOTREF(__pyx_t_2);
4197  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4198  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4199  __Pyx_GOTREF(__pyx_t_3);
4200  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4201  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4202  __Pyx_GOTREF(__pyx_t_2);
4203  __Pyx_GIVEREF(__pyx_t_1);
4204  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4205  __Pyx_GIVEREF(__pyx_t_3);
4206  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4207  __pyx_t_1 = 0;
4208  __pyx_t_3 = 0;
4209  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4210  __Pyx_GOTREF(__pyx_t_3);
4211  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4212  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4213  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4214  __pyx_t_6 = NULL;
4215  } else {
4216  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4217  __Pyx_GOTREF(__pyx_t_2);
4218  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4219  }
4220  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4221  for (;;) {
4222  if (likely(!__pyx_t_6)) {
4223  if (likely(PyList_CheckExact(__pyx_t_2))) {
4224  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4225  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4226  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)
4227  #else
4228  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4229  __Pyx_GOTREF(__pyx_t_3);
4230  #endif
4231  } else {
4232  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4233  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4234  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)
4235  #else
4236  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4237  __Pyx_GOTREF(__pyx_t_3);
4238  #endif
4239  }
4240  } else {
4241  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4242  if (unlikely(!__pyx_t_3)) {
4243  PyObject* exc_type = PyErr_Occurred();
4244  if (exc_type) {
4245  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4246  else __PYX_ERR(0, 234, __pyx_L1_error)
4247  }
4248  break;
4249  }
4250  __Pyx_GOTREF(__pyx_t_3);
4251  }
4252  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4253  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4254  __Pyx_GIVEREF(__pyx_t_3);
4255  __pyx_t_3 = 0;
4256 
4257  /* "PyClical.pyx":235
4258  * """
4259  * for idx in range(self.min(), self.max()+1):
4260  * if idx in self: # <<<<<<<<<<<<<<
4261  * yield idx
4262  *
4263  */
4264  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_idx, ((PyObject *)__pyx_cur_scope->__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 235, __pyx_L1_error)
4265  __pyx_t_8 = (__pyx_t_7 != 0);
4266  if (__pyx_t_8) {
4267 
4268  /* "PyClical.pyx":236
4269  * for idx in range(self.min(), self.max()+1):
4270  * if idx in self:
4271  * yield idx # <<<<<<<<<<<<<<
4272  *
4273  * def __invert__(self):
4274  */
4275  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4276  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4277  __Pyx_XGIVEREF(__pyx_t_2);
4278  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4279  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4280  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4281  __Pyx_XGIVEREF(__pyx_r);
4282  __Pyx_RefNannyFinishContext();
4283  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4284  /* return from generator, yielding value */
4285  __pyx_generator->resume_label = 1;
4286  return __pyx_r;
4287  __pyx_L7_resume_from_yield:;
4288  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4289  __pyx_cur_scope->__pyx_t_0 = 0;
4290  __Pyx_XGOTREF(__pyx_t_2);
4291  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4292  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4293  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4294 
4295  /* "PyClical.pyx":235
4296  * """
4297  * for idx in range(self.min(), self.max()+1):
4298  * if idx in self: # <<<<<<<<<<<<<<
4299  * yield idx
4300  *
4301  */
4302  }
4303 
4304  /* "PyClical.pyx":234
4305  * -3 4 7
4306  * """
4307  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4308  * if idx in self:
4309  * yield idx
4310  */
4311  }
4312  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4313  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4314 
4315  /* "PyClical.pyx":227
4316  * return self.instance.getitem(idx)
4317  *
4318  * def __iter__(self): # <<<<<<<<<<<<<<
4319  * """
4320  * Iterate over the indices of an index_set.
4321  */
4322 
4323  /* function exit code */
4324  PyErr_SetNone(PyExc_StopIteration);
4325  goto __pyx_L0;
4326  __pyx_L1_error:;
4327  __Pyx_XDECREF(__pyx_t_1);
4328  __Pyx_XDECREF(__pyx_t_2);
4329  __Pyx_XDECREF(__pyx_t_3);
4330  __Pyx_XDECREF(__pyx_t_4);
4331  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4332  __pyx_L0:;
4333  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4334  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4335  __pyx_generator->resume_label = -1;
4336  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4337  __Pyx_RefNannyFinishContext();
4338  return __pyx_r;
4339 }
4340 
4341 /* "PyClical.pyx":238
4342  * yield idx
4343  *
4344  * def __invert__(self): # <<<<<<<<<<<<<<
4345  * """
4346  * Set complement: not.
4347  */
4348 
4349 /* Python wrapper */
4350 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4351 static char __pyx_doc_8PyClical_9index_set_17__invert__[] = "\n Set complement: not.\n\n >>> print ~index_set({-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16})\n {-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}\n ";
4352 #if CYTHON_COMPILING_IN_CPYTHON
4353 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4354 #endif
4355 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4356  PyObject *__pyx_r = 0;
4357  __Pyx_RefNannyDeclarations
4358  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4359  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4360 
4361  /* function exit code */
4362  __Pyx_RefNannyFinishContext();
4363  return __pyx_r;
4364 }
4365 
4366 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4367  PyObject *__pyx_r = NULL;
4368  __Pyx_RefNannyDeclarations
4369  PyObject *__pyx_t_1 = NULL;
4370  PyObject *__pyx_t_2 = NULL;
4371  __Pyx_RefNannySetupContext("__invert__", 0);
4372 
4373  /* "PyClical.pyx":245
4374  * {-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32}
4375  * """
4376  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4377  *
4378  * def __xor__(lhs, rhs):
4379  */
4380  __Pyx_XDECREF(__pyx_r);
4381  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4382  __Pyx_GOTREF(__pyx_t_1);
4383  __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), __pyx_v_self->instance->operator~()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
4384  __Pyx_GOTREF(__pyx_t_2);
4385  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4386  __pyx_r = __pyx_t_2;
4387  __pyx_t_2 = 0;
4388  goto __pyx_L0;
4389 
4390  /* "PyClical.pyx":238
4391  * yield idx
4392  *
4393  * def __invert__(self): # <<<<<<<<<<<<<<
4394  * """
4395  * Set complement: not.
4396  */
4397 
4398  /* function exit code */
4399  __pyx_L1_error:;
4400  __Pyx_XDECREF(__pyx_t_1);
4401  __Pyx_XDECREF(__pyx_t_2);
4402  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4403  __pyx_r = NULL;
4404  __pyx_L0:;
4405  __Pyx_XGIVEREF(__pyx_r);
4406  __Pyx_RefNannyFinishContext();
4407  return __pyx_r;
4408 }
4409 
4410 /* "PyClical.pyx":247
4411  * return index_set().wrap( self.instance.invert() )
4412  *
4413  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4414  * """
4415  * Symmetric set difference: exclusive or.
4416  */
4417 
4418 /* Python wrapper */
4419 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4420 static char __pyx_doc_8PyClical_9index_set_19__xor__[] = "\n Symmetric set difference: exclusive or.\n\n >>> print index_set({1}) ^ index_set({2})\n {1,2}\n >>> print index_set({1,2}) ^ index_set({2})\n {1}\n ";
4421 #if CYTHON_COMPILING_IN_CPYTHON
4422 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4423 #endif
4424 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4425  PyObject *__pyx_r = 0;
4426  __Pyx_RefNannyDeclarations
4427  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4428  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4429 
4430  /* function exit code */
4431  __Pyx_RefNannyFinishContext();
4432  return __pyx_r;
4433 }
4434 
4435 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4436  PyObject *__pyx_r = NULL;
4437  __Pyx_RefNannyDeclarations
4438  PyObject *__pyx_t_1 = NULL;
4439  PyObject *__pyx_t_2 = NULL;
4440  __Pyx_RefNannySetupContext("__xor__", 0);
4441 
4442  /* "PyClical.pyx":256
4443  * {1}
4444  * """
4445  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4446  *
4447  * def __ixor__(self, rhs):
4448  */
4449  __Pyx_XDECREF(__pyx_r);
4450  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4451  __Pyx_GOTREF(__pyx_t_1);
4452  __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) ^ __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
4453  __Pyx_GOTREF(__pyx_t_2);
4454  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4455  __pyx_r = __pyx_t_2;
4456  __pyx_t_2 = 0;
4457  goto __pyx_L0;
4458 
4459  /* "PyClical.pyx":247
4460  * return index_set().wrap( self.instance.invert() )
4461  *
4462  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4463  * """
4464  * Symmetric set difference: exclusive or.
4465  */
4466 
4467  /* function exit code */
4468  __pyx_L1_error:;
4469  __Pyx_XDECREF(__pyx_t_1);
4470  __Pyx_XDECREF(__pyx_t_2);
4471  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4472  __pyx_r = NULL;
4473  __pyx_L0:;
4474  __Pyx_XGIVEREF(__pyx_r);
4475  __Pyx_RefNannyFinishContext();
4476  return __pyx_r;
4477 }
4478 
4479 /* "PyClical.pyx":258
4480  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4481  *
4482  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4483  * """
4484  * Symmetric set difference: exclusive or.
4485  */
4486 
4487 /* Python wrapper */
4488 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4489 static char __pyx_doc_8PyClical_9index_set_21__ixor__[] = "\n Symmetric set difference: exclusive or.\n\n >>> x = index_set({1}); x ^= index_set({2}); print x\n {1,2}\n >>> x = index_set({1,2}); x ^= index_set({2}); print x\n {1}\n ";
4490 #if CYTHON_COMPILING_IN_CPYTHON
4491 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4492 #endif
4493 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4494  PyObject *__pyx_r = 0;
4495  __Pyx_RefNannyDeclarations
4496  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4497  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4498 
4499  /* function exit code */
4500  __Pyx_RefNannyFinishContext();
4501  return __pyx_r;
4502 }
4503 
4504 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4505  PyObject *__pyx_r = NULL;
4506  __Pyx_RefNannyDeclarations
4507  PyObject *__pyx_t_1 = NULL;
4508  __Pyx_RefNannySetupContext("__ixor__", 0);
4509 
4510  /* "PyClical.pyx":267
4511  * {1}
4512  * """
4513  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4514  *
4515  * def __and__(lhs, rhs):
4516  */
4517  __Pyx_XDECREF(__pyx_r);
4518  __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) ^ __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
4519  __Pyx_GOTREF(__pyx_t_1);
4520  __pyx_r = __pyx_t_1;
4521  __pyx_t_1 = 0;
4522  goto __pyx_L0;
4523 
4524  /* "PyClical.pyx":258
4525  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4526  *
4527  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4528  * """
4529  * Symmetric set difference: exclusive or.
4530  */
4531 
4532  /* function exit code */
4533  __pyx_L1_error:;
4534  __Pyx_XDECREF(__pyx_t_1);
4535  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4536  __pyx_r = NULL;
4537  __pyx_L0:;
4538  __Pyx_XGIVEREF(__pyx_r);
4539  __Pyx_RefNannyFinishContext();
4540  return __pyx_r;
4541 }
4542 
4543 /* "PyClical.pyx":269
4544  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4545  *
4546  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4547  * """
4548  * Set intersection: and.
4549  */
4550 
4551 /* Python wrapper */
4552 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4553 static char __pyx_doc_8PyClical_9index_set_23__and__[] = "\n Set intersection: and.\n\n >>> print index_set({1}) & index_set({2})\n {}\n >>> print index_set({1,2}) & index_set({2})\n {2}\n ";
4554 #if CYTHON_COMPILING_IN_CPYTHON
4555 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4556 #endif
4557 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4558  PyObject *__pyx_r = 0;
4559  __Pyx_RefNannyDeclarations
4560  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4561  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4562 
4563  /* function exit code */
4564  __Pyx_RefNannyFinishContext();
4565  return __pyx_r;
4566 }
4567 
4568 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4569  PyObject *__pyx_r = NULL;
4570  __Pyx_RefNannyDeclarations
4571  PyObject *__pyx_t_1 = NULL;
4572  PyObject *__pyx_t_2 = NULL;
4573  __Pyx_RefNannySetupContext("__and__", 0);
4574 
4575  /* "PyClical.pyx":278
4576  * {2}
4577  * """
4578  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4579  *
4580  * def __iand__(self, rhs):
4581  */
4582  __Pyx_XDECREF(__pyx_r);
4583  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4584  __Pyx_GOTREF(__pyx_t_1);
4585  __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) & __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error)
4586  __Pyx_GOTREF(__pyx_t_2);
4587  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4588  __pyx_r = __pyx_t_2;
4589  __pyx_t_2 = 0;
4590  goto __pyx_L0;
4591 
4592  /* "PyClical.pyx":269
4593  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4594  *
4595  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4596  * """
4597  * Set intersection: and.
4598  */
4599 
4600  /* function exit code */
4601  __pyx_L1_error:;
4602  __Pyx_XDECREF(__pyx_t_1);
4603  __Pyx_XDECREF(__pyx_t_2);
4604  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4605  __pyx_r = NULL;
4606  __pyx_L0:;
4607  __Pyx_XGIVEREF(__pyx_r);
4608  __Pyx_RefNannyFinishContext();
4609  return __pyx_r;
4610 }
4611 
4612 /* "PyClical.pyx":280
4613  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4614  *
4615  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4616  * """
4617  * Set intersection: and.
4618  */
4619 
4620 /* Python wrapper */
4621 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4622 static char __pyx_doc_8PyClical_9index_set_25__iand__[] = "\n Set intersection: and.\n\n >>> x = index_set({1}); x &= index_set({2}); print x\n {}\n >>> x = index_set({1,2}); x &= index_set({2}); print x\n {2}\n ";
4623 #if CYTHON_COMPILING_IN_CPYTHON
4624 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4625 #endif
4626 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4627  PyObject *__pyx_r = 0;
4628  __Pyx_RefNannyDeclarations
4629  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4630  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4631 
4632  /* function exit code */
4633  __Pyx_RefNannyFinishContext();
4634  return __pyx_r;
4635 }
4636 
4637 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4638  PyObject *__pyx_r = NULL;
4639  __Pyx_RefNannyDeclarations
4640  PyObject *__pyx_t_1 = NULL;
4641  __Pyx_RefNannySetupContext("__iand__", 0);
4642 
4643  /* "PyClical.pyx":289
4644  * {2}
4645  * """
4646  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4647  *
4648  * def __or__(lhs, rhs):
4649  */
4650  __Pyx_XDECREF(__pyx_r);
4651  __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) & __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
4652  __Pyx_GOTREF(__pyx_t_1);
4653  __pyx_r = __pyx_t_1;
4654  __pyx_t_1 = 0;
4655  goto __pyx_L0;
4656 
4657  /* "PyClical.pyx":280
4658  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4659  *
4660  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4661  * """
4662  * Set intersection: and.
4663  */
4664 
4665  /* function exit code */
4666  __pyx_L1_error:;
4667  __Pyx_XDECREF(__pyx_t_1);
4668  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4669  __pyx_r = NULL;
4670  __pyx_L0:;
4671  __Pyx_XGIVEREF(__pyx_r);
4672  __Pyx_RefNannyFinishContext();
4673  return __pyx_r;
4674 }
4675 
4676 /* "PyClical.pyx":291
4677  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4678  *
4679  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4680  * """
4681  * Set union: or.
4682  */
4683 
4684 /* Python wrapper */
4685 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4686 static char __pyx_doc_8PyClical_9index_set_27__or__[] = "\n Set union: or.\n\n >>> print index_set({1}) | index_set({2})\n {1,2}\n >>> print index_set({1,2}) | index_set({2})\n {1,2}\n ";
4687 #if CYTHON_COMPILING_IN_CPYTHON
4688 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4689 #endif
4690 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4691  PyObject *__pyx_r = 0;
4692  __Pyx_RefNannyDeclarations
4693  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4694  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4695 
4696  /* function exit code */
4697  __Pyx_RefNannyFinishContext();
4698  return __pyx_r;
4699 }
4700 
4701 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4702  PyObject *__pyx_r = NULL;
4703  __Pyx_RefNannyDeclarations
4704  PyObject *__pyx_t_1 = NULL;
4705  PyObject *__pyx_t_2 = NULL;
4706  __Pyx_RefNannySetupContext("__or__", 0);
4707 
4708  /* "PyClical.pyx":300
4709  * {1,2}
4710  * """
4711  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4712  *
4713  * def __ior__(self, rhs):
4714  */
4715  __Pyx_XDECREF(__pyx_r);
4716  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4717  __Pyx_GOTREF(__pyx_t_1);
4718  __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) | __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)
4719  __Pyx_GOTREF(__pyx_t_2);
4720  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4721  __pyx_r = __pyx_t_2;
4722  __pyx_t_2 = 0;
4723  goto __pyx_L0;
4724 
4725  /* "PyClical.pyx":291
4726  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4727  *
4728  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4729  * """
4730  * Set union: or.
4731  */
4732 
4733  /* function exit code */
4734  __pyx_L1_error:;
4735  __Pyx_XDECREF(__pyx_t_1);
4736  __Pyx_XDECREF(__pyx_t_2);
4737  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4738  __pyx_r = NULL;
4739  __pyx_L0:;
4740  __Pyx_XGIVEREF(__pyx_r);
4741  __Pyx_RefNannyFinishContext();
4742  return __pyx_r;
4743 }
4744 
4745 /* "PyClical.pyx":302
4746  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4747  *
4748  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4749  * """
4750  * Set union: or.
4751  */
4752 
4753 /* Python wrapper */
4754 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4755 static char __pyx_doc_8PyClical_9index_set_29__ior__[] = "\n Set union: or.\n\n >>> x = index_set({1}); x |= index_set({2}); print x\n {1,2}\n >>> x = index_set({1,2}); x |= index_set({2}); print x\n {1,2}\n ";
4756 #if CYTHON_COMPILING_IN_CPYTHON
4757 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4758 #endif
4759 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4760  PyObject *__pyx_r = 0;
4761  __Pyx_RefNannyDeclarations
4762  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4763  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4764 
4765  /* function exit code */
4766  __Pyx_RefNannyFinishContext();
4767  return __pyx_r;
4768 }
4769 
4770 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4771  PyObject *__pyx_r = NULL;
4772  __Pyx_RefNannyDeclarations
4773  PyObject *__pyx_t_1 = NULL;
4774  __Pyx_RefNannySetupContext("__ior__", 0);
4775 
4776  /* "PyClical.pyx":311
4777  * {1,2}
4778  * """
4779  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4780  *
4781  * def count(self):
4782  */
4783  __Pyx_XDECREF(__pyx_r);
4784  __pyx_t_1 = __pyx_f_8PyClical_9index_set_wrap(__pyx_v_self, (__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self) | __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error)
4785  __Pyx_GOTREF(__pyx_t_1);
4786  __pyx_r = __pyx_t_1;
4787  __pyx_t_1 = 0;
4788  goto __pyx_L0;
4789 
4790  /* "PyClical.pyx":302
4791  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4792  *
4793  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4794  * """
4795  * Set union: or.
4796  */
4797 
4798  /* function exit code */
4799  __pyx_L1_error:;
4800  __Pyx_XDECREF(__pyx_t_1);
4801  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4802  __pyx_r = NULL;
4803  __pyx_L0:;
4804  __Pyx_XGIVEREF(__pyx_r);
4805  __Pyx_RefNannyFinishContext();
4806  return __pyx_r;
4807 }
4808 
4809 /* "PyClical.pyx":313
4810  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4811  *
4812  * def count(self): # <<<<<<<<<<<<<<
4813  * """
4814  * Cardinality: Number of indices included in set.
4815  */
4816 
4817 /* Python wrapper */
4818 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4819 static char __pyx_doc_8PyClical_9index_set_31count[] = "\n Cardinality: Number of indices included in set.\n\n >>> index_set({-1,1,2}).count()\n 3\n ";
4820 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4821  PyObject *__pyx_r = 0;
4822  __Pyx_RefNannyDeclarations
4823  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4824  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4825 
4826  /* function exit code */
4827  __Pyx_RefNannyFinishContext();
4828  return __pyx_r;
4829 }
4830 
4831 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4832  PyObject *__pyx_r = NULL;
4833  __Pyx_RefNannyDeclarations
4834  PyObject *__pyx_t_1 = NULL;
4835  __Pyx_RefNannySetupContext("count", 0);
4836 
4837  /* "PyClical.pyx":320
4838  * 3
4839  * """
4840  * return self.instance.count() # <<<<<<<<<<<<<<
4841  *
4842  * def count_neg(self):
4843  */
4844  __Pyx_XDECREF(__pyx_r);
4845  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4846  __Pyx_GOTREF(__pyx_t_1);
4847  __pyx_r = __pyx_t_1;
4848  __pyx_t_1 = 0;
4849  goto __pyx_L0;
4850 
4851  /* "PyClical.pyx":313
4852  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4853  *
4854  * def count(self): # <<<<<<<<<<<<<<
4855  * """
4856  * Cardinality: Number of indices included in set.
4857  */
4858 
4859  /* function exit code */
4860  __pyx_L1_error:;
4861  __Pyx_XDECREF(__pyx_t_1);
4862  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4863  __pyx_r = NULL;
4864  __pyx_L0:;
4865  __Pyx_XGIVEREF(__pyx_r);
4866  __Pyx_RefNannyFinishContext();
4867  return __pyx_r;
4868 }
4869 
4870 /* "PyClical.pyx":322
4871  * return self.instance.count()
4872  *
4873  * def count_neg(self): # <<<<<<<<<<<<<<
4874  * """
4875  * Number of negative indices included in set.
4876  */
4877 
4878 /* Python wrapper */
4879 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4880 static char __pyx_doc_8PyClical_9index_set_33count_neg[] = "\n Number of negative indices included in set.\n\n >>> index_set({-1,1,2}).count_neg()\n 1\n ";
4881 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4882  PyObject *__pyx_r = 0;
4883  __Pyx_RefNannyDeclarations
4884  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4885  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4886 
4887  /* function exit code */
4888  __Pyx_RefNannyFinishContext();
4889  return __pyx_r;
4890 }
4891 
4892 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4893  PyObject *__pyx_r = NULL;
4894  __Pyx_RefNannyDeclarations
4895  PyObject *__pyx_t_1 = NULL;
4896  __Pyx_RefNannySetupContext("count_neg", 0);
4897 
4898  /* "PyClical.pyx":329
4899  * 1
4900  * """
4901  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4902  *
4903  * def count_pos(self):
4904  */
4905  __Pyx_XDECREF(__pyx_r);
4906  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_neg()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
4907  __Pyx_GOTREF(__pyx_t_1);
4908  __pyx_r = __pyx_t_1;
4909  __pyx_t_1 = 0;
4910  goto __pyx_L0;
4911 
4912  /* "PyClical.pyx":322
4913  * return self.instance.count()
4914  *
4915  * def count_neg(self): # <<<<<<<<<<<<<<
4916  * """
4917  * Number of negative indices included in set.
4918  */
4919 
4920  /* function exit code */
4921  __pyx_L1_error:;
4922  __Pyx_XDECREF(__pyx_t_1);
4923  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4924  __pyx_r = NULL;
4925  __pyx_L0:;
4926  __Pyx_XGIVEREF(__pyx_r);
4927  __Pyx_RefNannyFinishContext();
4928  return __pyx_r;
4929 }
4930 
4931 /* "PyClical.pyx":331
4932  * return self.instance.count_neg()
4933  *
4934  * def count_pos(self): # <<<<<<<<<<<<<<
4935  * """
4936  * Number of positive indices included in set.
4937  */
4938 
4939 /* Python wrapper */
4940 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4941 static char __pyx_doc_8PyClical_9index_set_35count_pos[] = "\n Number of positive indices included in set.\n\n >>> index_set({-1,1,2}).count_pos()\n 2\n ";
4942 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4943  PyObject *__pyx_r = 0;
4944  __Pyx_RefNannyDeclarations
4945  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
4946  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4947 
4948  /* function exit code */
4949  __Pyx_RefNannyFinishContext();
4950  return __pyx_r;
4951 }
4952 
4953 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4954  PyObject *__pyx_r = NULL;
4955  __Pyx_RefNannyDeclarations
4956  PyObject *__pyx_t_1 = NULL;
4957  __Pyx_RefNannySetupContext("count_pos", 0);
4958 
4959  /* "PyClical.pyx":338
4960  * 2
4961  * """
4962  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4963  *
4964  * def min(self):
4965  */
4966  __Pyx_XDECREF(__pyx_r);
4967  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count_pos()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
4968  __Pyx_GOTREF(__pyx_t_1);
4969  __pyx_r = __pyx_t_1;
4970  __pyx_t_1 = 0;
4971  goto __pyx_L0;
4972 
4973  /* "PyClical.pyx":331
4974  * return self.instance.count_neg()
4975  *
4976  * def count_pos(self): # <<<<<<<<<<<<<<
4977  * """
4978  * Number of positive indices included in set.
4979  */
4980 
4981  /* function exit code */
4982  __pyx_L1_error:;
4983  __Pyx_XDECREF(__pyx_t_1);
4984  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4985  __pyx_r = NULL;
4986  __pyx_L0:;
4987  __Pyx_XGIVEREF(__pyx_r);
4988  __Pyx_RefNannyFinishContext();
4989  return __pyx_r;
4990 }
4991 
4992 /* "PyClical.pyx":340
4993  * return self.instance.count_pos()
4994  *
4995  * def min(self): # <<<<<<<<<<<<<<
4996  * """
4997  * Minimum member.
4998  */
4999 
5000 /* Python wrapper */
5001 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5002 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5003 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5004  PyObject *__pyx_r = 0;
5005  __Pyx_RefNannyDeclarations
5006  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5007  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5008 
5009  /* function exit code */
5010  __Pyx_RefNannyFinishContext();
5011  return __pyx_r;
5012 }
5013 
5014 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5015  PyObject *__pyx_r = NULL;
5016  __Pyx_RefNannyDeclarations
5017  PyObject *__pyx_t_1 = NULL;
5018  __Pyx_RefNannySetupContext("min", 0);
5019 
5020  /* "PyClical.pyx":347
5021  * -1
5022  * """
5023  * return self.instance.min() # <<<<<<<<<<<<<<
5024  *
5025  * def max(self):
5026  */
5027  __Pyx_XDECREF(__pyx_r);
5028  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5029  __Pyx_GOTREF(__pyx_t_1);
5030  __pyx_r = __pyx_t_1;
5031  __pyx_t_1 = 0;
5032  goto __pyx_L0;
5033 
5034  /* "PyClical.pyx":340
5035  * return self.instance.count_pos()
5036  *
5037  * def min(self): # <<<<<<<<<<<<<<
5038  * """
5039  * Minimum member.
5040  */
5041 
5042  /* function exit code */
5043  __pyx_L1_error:;
5044  __Pyx_XDECREF(__pyx_t_1);
5045  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5046  __pyx_r = NULL;
5047  __pyx_L0:;
5048  __Pyx_XGIVEREF(__pyx_r);
5049  __Pyx_RefNannyFinishContext();
5050  return __pyx_r;
5051 }
5052 
5053 /* "PyClical.pyx":349
5054  * return self.instance.min()
5055  *
5056  * def max(self): # <<<<<<<<<<<<<<
5057  * """
5058  * Maximum member.
5059  */
5060 
5061 /* Python wrapper */
5062 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5063 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5064 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5065  PyObject *__pyx_r = 0;
5066  __Pyx_RefNannyDeclarations
5067  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5068  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5069 
5070  /* function exit code */
5071  __Pyx_RefNannyFinishContext();
5072  return __pyx_r;
5073 }
5074 
5075 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5076  PyObject *__pyx_r = NULL;
5077  __Pyx_RefNannyDeclarations
5078  PyObject *__pyx_t_1 = NULL;
5079  __Pyx_RefNannySetupContext("max", 0);
5080 
5081  /* "PyClical.pyx":356
5082  * 2
5083  * """
5084  * return self.instance.max() # <<<<<<<<<<<<<<
5085  *
5086  * def hash_fn(self):
5087  */
5088  __Pyx_XDECREF(__pyx_r);
5089  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5090  __Pyx_GOTREF(__pyx_t_1);
5091  __pyx_r = __pyx_t_1;
5092  __pyx_t_1 = 0;
5093  goto __pyx_L0;
5094 
5095  /* "PyClical.pyx":349
5096  * return self.instance.min()
5097  *
5098  * def max(self): # <<<<<<<<<<<<<<
5099  * """
5100  * Maximum member.
5101  */
5102 
5103  /* function exit code */
5104  __pyx_L1_error:;
5105  __Pyx_XDECREF(__pyx_t_1);
5106  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5107  __pyx_r = NULL;
5108  __pyx_L0:;
5109  __Pyx_XGIVEREF(__pyx_r);
5110  __Pyx_RefNannyFinishContext();
5111  return __pyx_r;
5112 }
5113 
5114 /* "PyClical.pyx":358
5115  * return self.instance.max()
5116  *
5117  * def hash_fn(self): # <<<<<<<<<<<<<<
5118  * """
5119  * Hash function.
5120  */
5121 
5122 /* Python wrapper */
5123 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5124 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5125 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5126  PyObject *__pyx_r = 0;
5127  __Pyx_RefNannyDeclarations
5128  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5129  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5130 
5131  /* function exit code */
5132  __Pyx_RefNannyFinishContext();
5133  return __pyx_r;
5134 }
5135 
5136 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5137  PyObject *__pyx_r = NULL;
5138  __Pyx_RefNannyDeclarations
5139  PyObject *__pyx_t_1 = NULL;
5140  __Pyx_RefNannySetupContext("hash_fn", 0);
5141 
5142  /* "PyClical.pyx":362
5143  * Hash function.
5144  * """
5145  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5146  *
5147  * def sign_of_mult(self, rhs):
5148  */
5149  __Pyx_XDECREF(__pyx_r);
5150  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->hash_fn()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
5151  __Pyx_GOTREF(__pyx_t_1);
5152  __pyx_r = __pyx_t_1;
5153  __pyx_t_1 = 0;
5154  goto __pyx_L0;
5155 
5156  /* "PyClical.pyx":358
5157  * return self.instance.max()
5158  *
5159  * def hash_fn(self): # <<<<<<<<<<<<<<
5160  * """
5161  * Hash function.
5162  */
5163 
5164  /* function exit code */
5165  __pyx_L1_error:;
5166  __Pyx_XDECREF(__pyx_t_1);
5167  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5168  __pyx_r = NULL;
5169  __pyx_L0:;
5170  __Pyx_XGIVEREF(__pyx_r);
5171  __Pyx_RefNannyFinishContext();
5172  return __pyx_r;
5173 }
5174 
5175 /* "PyClical.pyx":364
5176  * return self.instance.hash_fn()
5177  *
5178  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5179  * """
5180  * Sign of geometric product of two Clifford basis elements.
5181  */
5182 
5183 /* Python wrapper */
5184 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5185 static char __pyx_doc_8PyClical_9index_set_43sign_of_mult[] = "\n Sign of geometric product of two Clifford basis elements.\n\n >>> s = index_set({1,2}); t=index_set({-1}); s.sign_of_mult(t)\n 1\n ";
5186 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5187  PyObject *__pyx_r = 0;
5188  __Pyx_RefNannyDeclarations
5189  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5190  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5191 
5192  /* function exit code */
5193  __Pyx_RefNannyFinishContext();
5194  return __pyx_r;
5195 }
5196 
5197 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5198  PyObject *__pyx_r = NULL;
5199  __Pyx_RefNannyDeclarations
5200  PyObject *__pyx_t_1 = NULL;
5201  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5202 
5203  /* "PyClical.pyx":371
5204  * 1
5205  * """
5206  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5207  *
5208  * def sign_of_square(self):
5209  */
5210  __Pyx_XDECREF(__pyx_r);
5211  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_mult(__pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error)
5212  __Pyx_GOTREF(__pyx_t_1);
5213  __pyx_r = __pyx_t_1;
5214  __pyx_t_1 = 0;
5215  goto __pyx_L0;
5216 
5217  /* "PyClical.pyx":364
5218  * return self.instance.hash_fn()
5219  *
5220  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5221  * """
5222  * Sign of geometric product of two Clifford basis elements.
5223  */
5224 
5225  /* function exit code */
5226  __pyx_L1_error:;
5227  __Pyx_XDECREF(__pyx_t_1);
5228  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5229  __pyx_r = NULL;
5230  __pyx_L0:;
5231  __Pyx_XGIVEREF(__pyx_r);
5232  __Pyx_RefNannyFinishContext();
5233  return __pyx_r;
5234 }
5235 
5236 /* "PyClical.pyx":373
5237  * return self.instance.sign_of_mult(toIndexSet(rhs))
5238  *
5239  * def sign_of_square(self): # <<<<<<<<<<<<<<
5240  * """
5241  * Sign of geometric square of a Clifford basis element.
5242  */
5243 
5244 /* Python wrapper */
5245 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5246 static char __pyx_doc_8PyClical_9index_set_45sign_of_square[] = "\n Sign of geometric square of a Clifford basis element.\n\n >>> s = index_set({1,2}); s.sign_of_square()\n -1\n ";
5247 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5248  PyObject *__pyx_r = 0;
5249  __Pyx_RefNannyDeclarations
5250  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5251  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5252 
5253  /* function exit code */
5254  __Pyx_RefNannyFinishContext();
5255  return __pyx_r;
5256 }
5257 
5258 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5259  PyObject *__pyx_r = NULL;
5260  __Pyx_RefNannyDeclarations
5261  PyObject *__pyx_t_1 = NULL;
5262  __Pyx_RefNannySetupContext("sign_of_square", 0);
5263 
5264  /* "PyClical.pyx":380
5265  * -1
5266  * """
5267  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5268  *
5269  * def __repr__(self):
5270  */
5271  __Pyx_XDECREF(__pyx_r);
5272  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->sign_of_square()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
5273  __Pyx_GOTREF(__pyx_t_1);
5274  __pyx_r = __pyx_t_1;
5275  __pyx_t_1 = 0;
5276  goto __pyx_L0;
5277 
5278  /* "PyClical.pyx":373
5279  * return self.instance.sign_of_mult(toIndexSet(rhs))
5280  *
5281  * def sign_of_square(self): # <<<<<<<<<<<<<<
5282  * """
5283  * Sign of geometric square of a Clifford basis element.
5284  */
5285 
5286  /* function exit code */
5287  __pyx_L1_error:;
5288  __Pyx_XDECREF(__pyx_t_1);
5289  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5290  __pyx_r = NULL;
5291  __pyx_L0:;
5292  __Pyx_XGIVEREF(__pyx_r);
5293  __Pyx_RefNannyFinishContext();
5294  return __pyx_r;
5295 }
5296 
5297 /* "PyClical.pyx":382
5298  * return self.instance.sign_of_square()
5299  *
5300  * def __repr__(self): # <<<<<<<<<<<<<<
5301  * """
5302  * The official string representation of self.
5303  */
5304 
5305 /* Python wrapper */
5306 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5307 static char __pyx_doc_8PyClical_9index_set_47__repr__[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__repr__()\n 'index_set({1,2})'\n >>> repr(index_set({1,2}))\n 'index_set({1,2})'\n ";
5308 #if CYTHON_COMPILING_IN_CPYTHON
5309 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5310 #endif
5311 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5312  PyObject *__pyx_r = 0;
5313  __Pyx_RefNannyDeclarations
5314  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5315  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5316 
5317  /* function exit code */
5318  __Pyx_RefNannyFinishContext();
5319  return __pyx_r;
5320 }
5321 
5322 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5323  PyObject *__pyx_r = NULL;
5324  __Pyx_RefNannyDeclarations
5325  PyObject *__pyx_t_1 = NULL;
5326  __Pyx_RefNannySetupContext("__repr__", 0);
5327 
5328  /* "PyClical.pyx":391
5329  * 'index_set({1,2})'
5330  * """
5331  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5332  *
5333  * def __str__(self):
5334  */
5335  __Pyx_XDECREF(__pyx_r);
5336  __pyx_t_1 = __Pyx_PyBytes_FromString(index_set_to_repr(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
5337  __Pyx_GOTREF(__pyx_t_1);
5338  __pyx_r = __pyx_t_1;
5339  __pyx_t_1 = 0;
5340  goto __pyx_L0;
5341 
5342  /* "PyClical.pyx":382
5343  * return self.instance.sign_of_square()
5344  *
5345  * def __repr__(self): # <<<<<<<<<<<<<<
5346  * """
5347  * The official string representation of self.
5348  */
5349 
5350  /* function exit code */
5351  __pyx_L1_error:;
5352  __Pyx_XDECREF(__pyx_t_1);
5353  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5354  __pyx_r = NULL;
5355  __pyx_L0:;
5356  __Pyx_XGIVEREF(__pyx_r);
5357  __Pyx_RefNannyFinishContext();
5358  return __pyx_r;
5359 }
5360 
5361 /* "PyClical.pyx":393
5362  * return index_set_to_repr( self.unwrap() ).c_str()
5363  *
5364  * def __str__(self): # <<<<<<<<<<<<<<
5365  * """
5366  * The informal string representation of self.
5367  */
5368 
5369 /* Python wrapper */
5370 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5371 static char __pyx_doc_8PyClical_9index_set_49__str__[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> index_set({1,2}).__str__()\n '{1,2}'\n >>> str(index_set({1,2}))\n '{1,2}'\n ";
5372 #if CYTHON_COMPILING_IN_CPYTHON
5373 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5374 #endif
5375 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5376  PyObject *__pyx_r = 0;
5377  __Pyx_RefNannyDeclarations
5378  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5379  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5380 
5381  /* function exit code */
5382  __Pyx_RefNannyFinishContext();
5383  return __pyx_r;
5384 }
5385 
5386 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5387  PyObject *__pyx_r = NULL;
5388  __Pyx_RefNannyDeclarations
5389  PyObject *__pyx_t_1 = NULL;
5390  __Pyx_RefNannySetupContext("__str__", 0);
5391 
5392  /* "PyClical.pyx":402
5393  * '{1,2}'
5394  * """
5395  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5396  *
5397  * def index_set_hidden_doctests():
5398  */
5399  __Pyx_XDECREF(__pyx_r);
5400  __pyx_t_1 = __Pyx_PyBytes_FromString(index_set_to_str(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
5401  __Pyx_GOTREF(__pyx_t_1);
5402  __pyx_r = __pyx_t_1;
5403  __pyx_t_1 = 0;
5404  goto __pyx_L0;
5405 
5406  /* "PyClical.pyx":393
5407  * return index_set_to_repr( self.unwrap() ).c_str()
5408  *
5409  * def __str__(self): # <<<<<<<<<<<<<<
5410  * """
5411  * The informal string representation of self.
5412  */
5413 
5414  /* function exit code */
5415  __pyx_L1_error:;
5416  __Pyx_XDECREF(__pyx_t_1);
5417  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5418  __pyx_r = NULL;
5419  __pyx_L0:;
5420  __Pyx_XGIVEREF(__pyx_r);
5421  __Pyx_RefNannyFinishContext();
5422  return __pyx_r;
5423 }
5424 
5425 /* "(tree fragment)":1
5426  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5427  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5428  * def __setstate_cython__(self, __pyx_state):
5429  */
5430 
5431 /* Python wrapper */
5432 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5433 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5434  PyObject *__pyx_r = 0;
5435  __Pyx_RefNannyDeclarations
5436  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5437  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5438 
5439  /* function exit code */
5440  __Pyx_RefNannyFinishContext();
5441  return __pyx_r;
5442 }
5443 
5444 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5445  PyObject *__pyx_r = NULL;
5446  __Pyx_RefNannyDeclarations
5447  PyObject *__pyx_t_1 = NULL;
5448  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5449 
5450  /* "(tree fragment)":2
5451  * def __reduce_cython__(self):
5452  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5453  * def __setstate_cython__(self, __pyx_state):
5454  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5455  */
5456  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
5457  __Pyx_GOTREF(__pyx_t_1);
5458  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5459  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5460  __PYX_ERR(1, 2, __pyx_L1_error)
5461 
5462  /* "(tree fragment)":1
5463  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5464  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5465  * def __setstate_cython__(self, __pyx_state):
5466  */
5467 
5468  /* function exit code */
5469  __pyx_L1_error:;
5470  __Pyx_XDECREF(__pyx_t_1);
5471  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5472  __pyx_r = NULL;
5473  __Pyx_XGIVEREF(__pyx_r);
5474  __Pyx_RefNannyFinishContext();
5475  return __pyx_r;
5476 }
5477 
5478 /* "(tree fragment)":3
5479  * def __reduce_cython__(self):
5480  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5481  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5482  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5483  */
5484 
5485 /* Python wrapper */
5486 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5487 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5488  PyObject *__pyx_r = 0;
5489  __Pyx_RefNannyDeclarations
5490  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5491  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5492 
5493  /* function exit code */
5494  __Pyx_RefNannyFinishContext();
5495  return __pyx_r;
5496 }
5497 
5498 static PyObject *__pyx_pf_8PyClical_9index_set_53__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
5499  PyObject *__pyx_r = NULL;
5500  __Pyx_RefNannyDeclarations
5501  PyObject *__pyx_t_1 = NULL;
5502  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5503 
5504  /* "(tree fragment)":4
5505  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5506  * def __setstate_cython__(self, __pyx_state):
5507  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5508  */
5509  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
5510  __Pyx_GOTREF(__pyx_t_1);
5511  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5512  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5513  __PYX_ERR(1, 4, __pyx_L1_error)
5514 
5515  /* "(tree fragment)":3
5516  * def __reduce_cython__(self):
5517  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5518  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5519  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5520  */
5521 
5522  /* function exit code */
5523  __pyx_L1_error:;
5524  __Pyx_XDECREF(__pyx_t_1);
5525  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5526  __pyx_r = NULL;
5527  __Pyx_XGIVEREF(__pyx_r);
5528  __Pyx_RefNannyFinishContext();
5529  return __pyx_r;
5530 }
5531 
5532 /* "PyClical.pyx":404
5533  * return index_set_to_str( self.unwrap() ).c_str()
5534  *
5535  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5536  * """
5537  * Tests for functions that Doctest cannot see.
5538  */
5539 
5540 /* Python wrapper */
5541 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5542 static char __pyx_doc_8PyClical_index_set_hidden_doctests[] = "\n Tests for functions that Doctest cannot see.\n\n For index_set.__cinit__: Construct index_set.\n\n >>> print index_set(1)\n {1}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set(index_set({1,2}))\n {1,2}\n >>> print index_set({1,2})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set({1,2,1})\n {1,2}\n >>> print index_set(\"\")\n {}\n >>> print index_set(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{'.\n >>> print index_set(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1'.\n >>> print index_set(\"{1,2,100}\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize index_set object from invalid string '{1,2,100}'.\n >>> print index_set({1,2,100})\n Traceback (most recent call last):\n ...\n IndexError: Cannot initialize index_set object from invalid set([1, 2, 100]).\n >>> print index_set([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize index_set object from <type 'list'>.\n\n For index_set.__richcmp__: Compare two objects of class index_set.\n\n >>> index_set(1) == index_set({1})\n True\n >>> index_set({1}) != index_set({1})\n False\n >>> index_set({1}) != index_set({2})\n True\n >>> index_set({1}) == index_set({2})\n False\n >>> index_set({1}) < index_set({2})\n True\n >>> index_set({1}) <= index_set({2})\n True\n >>> index_set({1}) > index_set({2})\n False\n >>> index_set({1}) >= index_set({2})\n False\n >>> None == index_set({1,2})\n False\n >>> None != index_set({1,2})\n True\n >>> None < index_set({1,2})\n False\n >>> None <= index_set({1,2})\n False\n >>> None > index_set({1,2})\n False\n >>> None >= index_set({1,2})\n False\n >>> index_se""t({1,2}) == None\n False\n >>> index_set({1,2}) != None\n True\n >>> index_set({1,2}) < None\n False\n >>> index_set({1,2}) <= None\n False\n >>> index_set({1,2}) > None\n False\n >>> index_set({1,2}) >= None\n False\n ";
5543  static PyMethodDef __pyx_mdef_8PyClical_1index_set_hidden_doctests = {"index_set_hidden_doctests", (PyCFunction)__pyx_pw_8PyClical_1index_set_hidden_doctests, METH_NOARGS, __pyx_doc_8PyClical_index_set_hidden_doctests};
5544  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5545  PyObject *__pyx_r = 0;
5546  __Pyx_RefNannyDeclarations
5547  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5548  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5549 
5550  /* function exit code */
5551  __Pyx_RefNannyFinishContext();
5552  return __pyx_r;
5553  }
5554 
5555  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5556  PyObject *__pyx_r = NULL;
5557  __Pyx_RefNannyDeclarations
5558  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5559 
5560  /* "PyClical.pyx":488
5561  * False
5562  * """
5563  * return # <<<<<<<<<<<<<<
5564  *
5565  * cpdef inline compare(lhs,rhs):
5566  */
5567  __Pyx_XDECREF(__pyx_r);
5568  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5569  goto __pyx_L0;
5570 
5571  /* "PyClical.pyx":404
5572  * return index_set_to_str( self.unwrap() ).c_str()
5573  *
5574  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5575  * """
5576  * Tests for functions that Doctest cannot see.
5577  */
5578 
5579  /* function exit code */
5580  __pyx_L0:;
5581  __Pyx_XGIVEREF(__pyx_r);
5582  __Pyx_RefNannyFinishContext();
5583  return __pyx_r;
5584  }
5585 
5586  /* "PyClical.pyx":490
5587  * return
5588  *
5589  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5590  * """
5591  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5592  */
5593 
5594  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5595  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5596  PyObject *__pyx_r = NULL;
5597  __Pyx_RefNannyDeclarations
5598  PyObject *__pyx_t_1 = NULL;
5599  __Pyx_RefNannySetupContext("compare", 0);
5600 
5601  /* "PyClical.pyx":500
5602  * 1
5603  * """
5604  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5605  *
5606  * cpdef inline min_neg(obj):
5607  */
5608  __Pyx_XDECREF(__pyx_r);
5609  __pyx_t_1 = __Pyx_PyInt_From_int(compare(__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs), __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
5610  __Pyx_GOTREF(__pyx_t_1);
5611  __pyx_r = __pyx_t_1;
5612  __pyx_t_1 = 0;
5613  goto __pyx_L0;
5614 
5615  /* "PyClical.pyx":490
5616  * return
5617  *
5618  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5619  * """
5620  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5621  */
5622 
5623  /* function exit code */
5624  __pyx_L1_error:;
5625  __Pyx_XDECREF(__pyx_t_1);
5626  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5627  __pyx_r = 0;
5628  __pyx_L0:;
5629  __Pyx_XGIVEREF(__pyx_r);
5630  __Pyx_RefNannyFinishContext();
5631  return __pyx_r;
5632  }
5633 
5634  /* Python wrapper */
5635  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5636  static char __pyx_doc_8PyClical_2compare[] = "\n \"lexicographic compare\" eg. {3,4,5} is less than {3,7,8};\n -1 if a<b, +1 if a>b, 0 if a==b.\n\n >>> compare(index_set({1,2}),index_set({-1,3}))\n -1\n >>> compare(index_set({-1,4}),index_set({-1,3}))\n 1\n ";
5637  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5638  PyObject *__pyx_v_lhs = 0;
5639  PyObject *__pyx_v_rhs = 0;
5640  PyObject *__pyx_r = 0;
5641  __Pyx_RefNannyDeclarations
5642  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5643  {
5644  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5645  PyObject* values[2] = {0,0};
5646  if (unlikely(__pyx_kwds)) {
5647  Py_ssize_t kw_args;
5648  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5649  switch (pos_args) {
5650  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5651  CYTHON_FALLTHROUGH;
5652  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5653  CYTHON_FALLTHROUGH;
5654  case 0: break;
5655  default: goto __pyx_L5_argtuple_error;
5656  }
5657  kw_args = PyDict_Size(__pyx_kwds);
5658  switch (pos_args) {
5659  case 0:
5660  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5661  else goto __pyx_L5_argtuple_error;
5662  CYTHON_FALLTHROUGH;
5663  case 1:
5664  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5665  else {
5666  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5667  }
5668  }
5669  if (unlikely(kw_args > 0)) {
5670  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5671  }
5672  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5673  goto __pyx_L5_argtuple_error;
5674  } else {
5675  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5676  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5677  }
5678  __pyx_v_lhs = values[0];
5679  __pyx_v_rhs = values[1];
5680  }
5681  goto __pyx_L4_argument_unpacking_done;
5682  __pyx_L5_argtuple_error:;
5683  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5684  __pyx_L3_error:;
5685  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5686  __Pyx_RefNannyFinishContext();
5687  return NULL;
5688  __pyx_L4_argument_unpacking_done:;
5689  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5690 
5691  /* function exit code */
5692  __Pyx_RefNannyFinishContext();
5693  return __pyx_r;
5694  }
5695 
5696  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5697  PyObject *__pyx_r = NULL;
5698  __Pyx_RefNannyDeclarations
5699  PyObject *__pyx_t_1 = NULL;
5700  __Pyx_RefNannySetupContext("compare", 0);
5701  __Pyx_XDECREF(__pyx_r);
5702  __pyx_t_1 = __pyx_f_8PyClical_compare(__pyx_v_lhs, __pyx_v_rhs, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
5703  __Pyx_GOTREF(__pyx_t_1);
5704  __pyx_r = __pyx_t_1;
5705  __pyx_t_1 = 0;
5706  goto __pyx_L0;
5707 
5708  /* function exit code */
5709  __pyx_L1_error:;
5710  __Pyx_XDECREF(__pyx_t_1);
5711  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5712  __pyx_r = NULL;
5713  __pyx_L0:;
5714  __Pyx_XGIVEREF(__pyx_r);
5715  __Pyx_RefNannyFinishContext();
5716  return __pyx_r;
5717  }
5718 
5719  /* "PyClical.pyx":502
5720  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5721  *
5722  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5723  * """
5724  * Minimum negative index, or 0 if none.
5725  */
5726 
5727  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5728  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5729  PyObject *__pyx_r = NULL;
5730  __Pyx_RefNannyDeclarations
5731  PyObject *__pyx_t_1 = NULL;
5732  __Pyx_RefNannySetupContext("min_neg", 0);
5733 
5734  /* "PyClical.pyx":509
5735  * 0
5736  * """
5737  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5738  *
5739  * cpdef inline max_pos(obj):
5740  */
5741  __Pyx_XDECREF(__pyx_r);
5742  __pyx_t_1 = __Pyx_PyInt_From_int(min_neg(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error)
5743  __Pyx_GOTREF(__pyx_t_1);
5744  __pyx_r = __pyx_t_1;
5745  __pyx_t_1 = 0;
5746  goto __pyx_L0;
5747 
5748  /* "PyClical.pyx":502
5749  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5750  *
5751  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5752  * """
5753  * Minimum negative index, or 0 if none.
5754  */
5755 
5756  /* function exit code */
5757  __pyx_L1_error:;
5758  __Pyx_XDECREF(__pyx_t_1);
5759  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5760  __pyx_r = 0;
5761  __pyx_L0:;
5762  __Pyx_XGIVEREF(__pyx_r);
5763  __Pyx_RefNannyFinishContext();
5764  return __pyx_r;
5765  }
5766 
5767  /* Python wrapper */
5768  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5769  static char __pyx_doc_8PyClical_4min_neg[] = "\n Minimum negative index, or 0 if none.\n\n >>> min_neg(index_set({1,2}))\n 0\n ";
5770  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5771  PyObject *__pyx_r = 0;
5772  __Pyx_RefNannyDeclarations
5773  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5774  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5775 
5776  /* function exit code */
5777  __Pyx_RefNannyFinishContext();
5778  return __pyx_r;
5779  }
5780 
5781  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5782  PyObject *__pyx_r = NULL;
5783  __Pyx_RefNannyDeclarations
5784  PyObject *__pyx_t_1 = NULL;
5785  __Pyx_RefNannySetupContext("min_neg", 0);
5786  __Pyx_XDECREF(__pyx_r);
5787  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5788  __Pyx_GOTREF(__pyx_t_1);
5789  __pyx_r = __pyx_t_1;
5790  __pyx_t_1 = 0;
5791  goto __pyx_L0;
5792 
5793  /* function exit code */
5794  __pyx_L1_error:;
5795  __Pyx_XDECREF(__pyx_t_1);
5796  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5797  __pyx_r = NULL;
5798  __pyx_L0:;
5799  __Pyx_XGIVEREF(__pyx_r);
5800  __Pyx_RefNannyFinishContext();
5801  return __pyx_r;
5802  }
5803 
5804  /* "PyClical.pyx":511
5805  * return glucat.min_neg( toIndexSet(obj) )
5806  *
5807  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5808  * """
5809  * Maximum positive index, or 0 if none.
5810  */
5811 
5812  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5813  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5814  PyObject *__pyx_r = NULL;
5815  __Pyx_RefNannyDeclarations
5816  PyObject *__pyx_t_1 = NULL;
5817  __Pyx_RefNannySetupContext("max_pos", 0);
5818 
5819  /* "PyClical.pyx":518
5820  * 2
5821  * """
5822  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5823  *
5824  * cdef inline vector[scalar_t] list_to_vector(lst):
5825  */
5826  __Pyx_XDECREF(__pyx_r);
5827  __pyx_t_1 = __Pyx_PyInt_From_int(max_pos(__pyx_f_8PyClical_toIndexSet(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
5828  __Pyx_GOTREF(__pyx_t_1);
5829  __pyx_r = __pyx_t_1;
5830  __pyx_t_1 = 0;
5831  goto __pyx_L0;
5832 
5833  /* "PyClical.pyx":511
5834  * return glucat.min_neg( toIndexSet(obj) )
5835  *
5836  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5837  * """
5838  * Maximum positive index, or 0 if none.
5839  */
5840 
5841  /* function exit code */
5842  __pyx_L1_error:;
5843  __Pyx_XDECREF(__pyx_t_1);
5844  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5845  __pyx_r = 0;
5846  __pyx_L0:;
5847  __Pyx_XGIVEREF(__pyx_r);
5848  __Pyx_RefNannyFinishContext();
5849  return __pyx_r;
5850  }
5851 
5852  /* Python wrapper */
5853  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5854  static char __pyx_doc_8PyClical_6max_pos[] = "\n Maximum positive index, or 0 if none.\n\n >>> max_pos(index_set({1,2}))\n 2\n ";
5855  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5856  PyObject *__pyx_r = 0;
5857  __Pyx_RefNannyDeclarations
5858  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5859  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5860 
5861  /* function exit code */
5862  __Pyx_RefNannyFinishContext();
5863  return __pyx_r;
5864  }
5865 
5866  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5867  PyObject *__pyx_r = NULL;
5868  __Pyx_RefNannyDeclarations
5869  PyObject *__pyx_t_1 = NULL;
5870  __Pyx_RefNannySetupContext("max_pos", 0);
5871  __Pyx_XDECREF(__pyx_r);
5872  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5873  __Pyx_GOTREF(__pyx_t_1);
5874  __pyx_r = __pyx_t_1;
5875  __pyx_t_1 = 0;
5876  goto __pyx_L0;
5877 
5878  /* function exit code */
5879  __pyx_L1_error:;
5880  __Pyx_XDECREF(__pyx_t_1);
5881  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5882  __pyx_r = NULL;
5883  __pyx_L0:;
5884  __Pyx_XGIVEREF(__pyx_r);
5885  __Pyx_RefNannyFinishContext();
5886  return __pyx_r;
5887  }
5888 
5889  /* "PyClical.pyx":520
5890  * return glucat.max_pos( toIndexSet(obj) )
5891  *
5892  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5893  * """
5894  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5895  */
5896 
5897  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5898  std::vector<scalar_t> __pyx_v_v;
5899  PyObject *__pyx_v_s = NULL;
5900  std::vector<scalar_t> __pyx_r;
5901  __Pyx_RefNannyDeclarations
5902  PyObject *__pyx_t_1 = NULL;
5903  Py_ssize_t __pyx_t_2;
5904  PyObject *(*__pyx_t_3)(PyObject *);
5905  PyObject *__pyx_t_4 = NULL;
5906  scalar_t __pyx_t_5;
5907  __Pyx_RefNannySetupContext("list_to_vector", 0);
5908 
5909  /* "PyClical.pyx":525
5910  * """
5911  * cdef vector[scalar_t] v
5912  * for s in lst: # <<<<<<<<<<<<<<
5913  * v.push_back(<scalar_t>s)
5914  * return v
5915  */
5916  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5917  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5918  __pyx_t_3 = NULL;
5919  } else {
5920  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5921  __Pyx_GOTREF(__pyx_t_1);
5922  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5923  }
5924  for (;;) {
5925  if (likely(!__pyx_t_3)) {
5926  if (likely(PyList_CheckExact(__pyx_t_1))) {
5927  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5928  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5929  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 525, __pyx_L1_error)
5930  #else
5931  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
5932  __Pyx_GOTREF(__pyx_t_4);
5933  #endif
5934  } else {
5935  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5936  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5937  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 525, __pyx_L1_error)
5938  #else
5939  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
5940  __Pyx_GOTREF(__pyx_t_4);
5941  #endif
5942  }
5943  } else {
5944  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5945  if (unlikely(!__pyx_t_4)) {
5946  PyObject* exc_type = PyErr_Occurred();
5947  if (exc_type) {
5948  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5949  else __PYX_ERR(0, 525, __pyx_L1_error)
5950  }
5951  break;
5952  }
5953  __Pyx_GOTREF(__pyx_t_4);
5954  }
5955  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5956  __pyx_t_4 = 0;
5957 
5958  /* "PyClical.pyx":526
5959  * cdef vector[scalar_t] v
5960  * for s in lst:
5961  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
5962  * return v
5963  *
5964  */
5965  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_s); if (unlikely((__pyx_t_5 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error)
5966  try {
5967  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
5968  } catch(...) {
5969  __Pyx_CppExn2PyErr();
5970  __PYX_ERR(0, 526, __pyx_L1_error)
5971  }
5972 
5973  /* "PyClical.pyx":525
5974  * """
5975  * cdef vector[scalar_t] v
5976  * for s in lst: # <<<<<<<<<<<<<<
5977  * v.push_back(<scalar_t>s)
5978  * return v
5979  */
5980  }
5981  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5982 
5983  /* "PyClical.pyx":527
5984  * for s in lst:
5985  * v.push_back(<scalar_t>s)
5986  * return v # <<<<<<<<<<<<<<
5987  *
5988  * # Forward reference.
5989  */
5990  __pyx_r = __pyx_v_v;
5991  goto __pyx_L0;
5992 
5993  /* "PyClical.pyx":520
5994  * return glucat.max_pos( toIndexSet(obj) )
5995  *
5996  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5997  * """
5998  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5999  */
6000 
6001  /* function exit code */
6002  __pyx_L1_error:;
6003  __Pyx_XDECREF(__pyx_t_1);
6004  __Pyx_XDECREF(__pyx_t_4);
6005  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6006  __Pyx_pretend_to_initialize(&__pyx_r);
6007  __pyx_L0:;
6008  __Pyx_XDECREF(__pyx_v_s);
6009  __Pyx_RefNannyFinishContext();
6010  return __pyx_r;
6011  }
6012 
6013  /* "PyClical.pyx":532
6014  * cdef class clifford
6015  *
6016  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6017  * return clifford(obj).instance[0]
6018  *
6019  */
6020 
6021  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6022  Clifford __pyx_r;
6023  __Pyx_RefNannyDeclarations
6024  PyObject *__pyx_t_1 = NULL;
6025  PyObject *__pyx_t_2 = NULL;
6026  __Pyx_RefNannySetupContext("toClifford", 0);
6027 
6028  /* "PyClical.pyx":533
6029  *
6030  * cdef inline Clifford toClifford(obj):
6031  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6032  *
6033  * cdef class clifford:
6034  */
6035  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
6036  __Pyx_GOTREF(__pyx_t_1);
6037  __Pyx_INCREF(__pyx_v_obj);
6038  __Pyx_GIVEREF(__pyx_v_obj);
6039  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
6040  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
6041  __Pyx_GOTREF(__pyx_t_2);
6042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6043  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
6044  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6045  goto __pyx_L0;
6046 
6047  /* "PyClical.pyx":532
6048  * cdef class clifford
6049  *
6050  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6051  * return clifford(obj).instance[0]
6052  *
6053  */
6054 
6055  /* function exit code */
6056  __pyx_L1_error:;
6057  __Pyx_XDECREF(__pyx_t_1);
6058  __Pyx_XDECREF(__pyx_t_2);
6059  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6060  __Pyx_pretend_to_initialize(&__pyx_r);
6061  __pyx_L0:;
6062  __Pyx_RefNannyFinishContext();
6063  return __pyx_r;
6064  }
6065 
6066  /* "PyClical.pyx":541
6067  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6068  *
6069  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6070  * """
6071  * Wrap an instance of the C++ class Clifford.
6072  */
6073 
6074  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6075  PyObject *__pyx_r = NULL;
6076  __Pyx_RefNannyDeclarations
6077  __Pyx_RefNannySetupContext("wrap", 0);
6078 
6079  /* "PyClical.pyx":545
6080  * Wrap an instance of the C++ class Clifford.
6081  * """
6082  * self.instance[0] = other # <<<<<<<<<<<<<<
6083  * return self
6084  *
6085  */
6086  (__pyx_v_self->instance[0]) = __pyx_v_other;
6087 
6088  /* "PyClical.pyx":546
6089  * """
6090  * self.instance[0] = other
6091  * return self # <<<<<<<<<<<<<<
6092  *
6093  * cdef inline Clifford unwrap(clifford self):
6094  */
6095  __Pyx_XDECREF(__pyx_r);
6096  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6097  __pyx_r = ((PyObject *)__pyx_v_self);
6098  goto __pyx_L0;
6099 
6100  /* "PyClical.pyx":541
6101  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6102  *
6103  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6104  * """
6105  * Wrap an instance of the C++ class Clifford.
6106  */
6107 
6108  /* function exit code */
6109  __pyx_L0:;
6110  __Pyx_XGIVEREF(__pyx_r);
6111  __Pyx_RefNannyFinishContext();
6112  return __pyx_r;
6113  }
6114 
6115  /* "PyClical.pyx":548
6116  * return self
6117  *
6118  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6119  * """
6120  * Return the wrapped C++ Clifford instance.
6121  */
6122 
6123  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6124  Clifford __pyx_r;
6125  __Pyx_RefNannyDeclarations
6126  __Pyx_RefNannySetupContext("unwrap", 0);
6127 
6128  /* "PyClical.pyx":552
6129  * Return the wrapped C++ Clifford instance.
6130  * """
6131  * return self.instance[0] # <<<<<<<<<<<<<<
6132  *
6133  * cpdef copy(clifford self):
6134  */
6135  __pyx_r = (__pyx_v_self->instance[0]);
6136  goto __pyx_L0;
6137 
6138  /* "PyClical.pyx":548
6139  * return self
6140  *
6141  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6142  * """
6143  * Return the wrapped C++ Clifford instance.
6144  */
6145 
6146  /* function exit code */
6147  __pyx_L0:;
6148  __Pyx_RefNannyFinishContext();
6149  return __pyx_r;
6150  }
6151 
6152  /* "PyClical.pyx":554
6153  * return self.instance[0]
6154  *
6155  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6156  * """
6157  * Copy this clifford object.
6158  */
6159 
6160  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6161  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6162  PyObject *__pyx_r = NULL;
6163  __Pyx_RefNannyDeclarations
6164  PyObject *__pyx_t_1 = NULL;
6165  PyObject *__pyx_t_2 = NULL;
6166  PyObject *__pyx_t_3 = NULL;
6167  PyObject *__pyx_t_4 = NULL;
6168  __Pyx_RefNannySetupContext("copy", 0);
6169  /* Check if called by wrapper */
6170  if (unlikely(__pyx_skip_dispatch)) ;
6171  /* Check if overridden in Python */
6172  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
6173  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6174  __Pyx_GOTREF(__pyx_t_1);
6175  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
6176  __Pyx_XDECREF(__pyx_r);
6177  __Pyx_INCREF(__pyx_t_1);
6178  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6179  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6180  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6181  if (likely(__pyx_t_4)) {
6182  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6183  __Pyx_INCREF(__pyx_t_4);
6184  __Pyx_INCREF(function);
6185  __Pyx_DECREF_SET(__pyx_t_3, function);
6186  }
6187  }
6188  if (__pyx_t_4) {
6189  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6190  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6191  } else {
6192  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6193  }
6194  __Pyx_GOTREF(__pyx_t_2);
6195  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6196  __pyx_r = __pyx_t_2;
6197  __pyx_t_2 = 0;
6198  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6199  goto __pyx_L0;
6200  }
6201  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6202  }
6203 
6204  /* "PyClical.pyx":561
6205  * {2}
6206  * """
6207  * return clifford(self) # <<<<<<<<<<<<<<
6208  *
6209  * def __cinit__(self, other = 0, ixt = None):
6210  */
6211  __Pyx_XDECREF(__pyx_r);
6212  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
6213  __Pyx_GOTREF(__pyx_t_1);
6214  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6215  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6216  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
6217  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
6218  __Pyx_GOTREF(__pyx_t_2);
6219  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6220  __pyx_r = __pyx_t_2;
6221  __pyx_t_2 = 0;
6222  goto __pyx_L0;
6223 
6224  /* "PyClical.pyx":554
6225  * return self.instance[0]
6226  *
6227  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6228  * """
6229  * Copy this clifford object.
6230  */
6231 
6232  /* function exit code */
6233  __pyx_L1_error:;
6234  __Pyx_XDECREF(__pyx_t_1);
6235  __Pyx_XDECREF(__pyx_t_2);
6236  __Pyx_XDECREF(__pyx_t_3);
6237  __Pyx_XDECREF(__pyx_t_4);
6238  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6239  __pyx_r = 0;
6240  __pyx_L0:;
6241  __Pyx_XGIVEREF(__pyx_r);
6242  __Pyx_RefNannyFinishContext();
6243  return __pyx_r;
6244  }
6245 
6246  /* Python wrapper */
6247  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6248  static char __pyx_doc_8PyClical_8clifford_copy[] = "\n Copy this clifford object.\n\n >>> x=clifford(\"1{2}\"); y=x.copy(); print y\n {2}\n ";
6249  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6250  PyObject *__pyx_r = 0;
6251  __Pyx_RefNannyDeclarations
6252  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6253  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6254 
6255  /* function exit code */
6256  __Pyx_RefNannyFinishContext();
6257  return __pyx_r;
6258  }
6259 
6260  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6261  PyObject *__pyx_r = NULL;
6262  __Pyx_RefNannyDeclarations
6263  PyObject *__pyx_t_1 = NULL;
6264  __Pyx_RefNannySetupContext("copy", 0);
6265  __Pyx_XDECREF(__pyx_r);
6266  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6267  __Pyx_GOTREF(__pyx_t_1);
6268  __pyx_r = __pyx_t_1;
6269  __pyx_t_1 = 0;
6270  goto __pyx_L0;
6271 
6272  /* function exit code */
6273  __pyx_L1_error:;
6274  __Pyx_XDECREF(__pyx_t_1);
6275  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6276  __pyx_r = NULL;
6277  __pyx_L0:;
6278  __Pyx_XGIVEREF(__pyx_r);
6279  __Pyx_RefNannyFinishContext();
6280  return __pyx_r;
6281  }
6282 
6283  /* "PyClical.pyx":563
6284  * return clifford(self)
6285  *
6286  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6287  * """
6288  * Construct an object of type clifford.
6289  */
6290 
6291  /* Python wrapper */
6292  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6293  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6294  PyObject *__pyx_v_other = 0;
6295  PyObject *__pyx_v_ixt = 0;
6296  int __pyx_r;
6297  __Pyx_RefNannyDeclarations
6298  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6299  {
6300  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6301  PyObject* values[2] = {0,0};
6302  values[0] = ((PyObject *)__pyx_int_0);
6303  values[1] = ((PyObject *)Py_None);
6304  if (unlikely(__pyx_kwds)) {
6305  Py_ssize_t kw_args;
6306  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6307  switch (pos_args) {
6308  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6309  CYTHON_FALLTHROUGH;
6310  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6311  CYTHON_FALLTHROUGH;
6312  case 0: break;
6313  default: goto __pyx_L5_argtuple_error;
6314  }
6315  kw_args = PyDict_Size(__pyx_kwds);
6316  switch (pos_args) {
6317  case 0:
6318  if (kw_args > 0) {
6319  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
6320  if (value) { values[0] = value; kw_args--; }
6321  }
6322  CYTHON_FALLTHROUGH;
6323  case 1:
6324  if (kw_args > 0) {
6325  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
6326  if (value) { values[1] = value; kw_args--; }
6327  }
6328  }
6329  if (unlikely(kw_args > 0)) {
6330  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6331  }
6332  } else {
6333  switch (PyTuple_GET_SIZE(__pyx_args)) {
6334  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6335  CYTHON_FALLTHROUGH;
6336  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6337  CYTHON_FALLTHROUGH;
6338  case 0: break;
6339  default: goto __pyx_L5_argtuple_error;
6340  }
6341  }
6342  __pyx_v_other = values[0];
6343  __pyx_v_ixt = values[1];
6344  }
6345  goto __pyx_L4_argument_unpacking_done;
6346  __pyx_L5_argtuple_error:;
6347  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6348  __pyx_L3_error:;
6349  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6350  __Pyx_RefNannyFinishContext();
6351  return -1;
6352  __pyx_L4_argument_unpacking_done:;
6353  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6354 
6355  /* function exit code */
6356  __Pyx_RefNannyFinishContext();
6357  return __pyx_r;
6358  }
6359 
6360  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6361  PyObject *__pyx_v_error_msg_prefix = NULL;
6362  PyObject *__pyx_v_err = NULL;
6363  int __pyx_r;
6364  __Pyx_RefNannyDeclarations
6365  int __pyx_t_1;
6366  int __pyx_t_2;
6367  PyObject *__pyx_t_3 = NULL;
6368  PyObject *__pyx_t_4 = NULL;
6369  PyObject *__pyx_t_5 = NULL;
6370  Clifford *__pyx_t_6;
6371  PyObject *__pyx_t_7 = NULL;
6372  PyObject *__pyx_t_8 = NULL;
6373  scalar_t __pyx_t_9;
6374  PyObject *__pyx_t_10 = NULL;
6375  PyObject *__pyx_t_11 = NULL;
6376  PyObject *__pyx_t_12 = NULL;
6377  char *__pyx_t_13;
6378  int __pyx_t_14;
6379  PyObject *__pyx_t_15 = NULL;
6380  PyObject *__pyx_t_16 = NULL;
6381  PyObject *__pyx_t_17 = NULL;
6382  PyObject *__pyx_t_18 = NULL;
6383  __Pyx_RefNannySetupContext("__cinit__", 0);
6384 
6385  /* "PyClical.pyx":588
6386  * 2{1}+3{2}
6387  * """
6388  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6389  * if ixt is None:
6390  * try:
6391  */
6392  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6393  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6394 
6395  /* "PyClical.pyx":589
6396  * """
6397  * error_msg_prefix = "Cannot initialize clifford object from"
6398  * if ixt is None: # <<<<<<<<<<<<<<
6399  * try:
6400  * if isinstance(other, clifford):
6401  */
6402  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6403  __pyx_t_2 = (__pyx_t_1 != 0);
6404  if (__pyx_t_2) {
6405 
6406  /* "PyClical.pyx":590
6407  * error_msg_prefix = "Cannot initialize clifford object from"
6408  * if ixt is None:
6409  * try: # <<<<<<<<<<<<<<
6410  * if isinstance(other, clifford):
6411  * self.instance = new Clifford((<clifford>other).unwrap())
6412  */
6413  {
6414  __Pyx_PyThreadState_declare
6415  __Pyx_PyThreadState_assign
6416  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6417  __Pyx_XGOTREF(__pyx_t_3);
6418  __Pyx_XGOTREF(__pyx_t_4);
6419  __Pyx_XGOTREF(__pyx_t_5);
6420  /*try:*/ {
6421 
6422  /* "PyClical.pyx":591
6423  * if ixt is None:
6424  * try:
6425  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6426  * self.instance = new Clifford((<clifford>other).unwrap())
6427  * elif isinstance(other, index_set):
6428  */
6429  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6430  __pyx_t_1 = (__pyx_t_2 != 0);
6431  if (__pyx_t_1) {
6432 
6433  /* "PyClical.pyx":592
6434  * try:
6435  * if isinstance(other, clifford):
6436  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6437  * elif isinstance(other, index_set):
6438  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6439  */
6440  try {
6441  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6442  } catch(...) {
6443  __Pyx_CppExn2PyErr();
6444  __PYX_ERR(0, 592, __pyx_L4_error)
6445  }
6446  __pyx_v_self->instance = __pyx_t_6;
6447 
6448  /* "PyClical.pyx":591
6449  * if ixt is None:
6450  * try:
6451  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6452  * self.instance = new Clifford((<clifford>other).unwrap())
6453  * elif isinstance(other, index_set):
6454  */
6455  goto __pyx_L10;
6456  }
6457 
6458  /* "PyClical.pyx":593
6459  * if isinstance(other, clifford):
6460  * self.instance = new Clifford((<clifford>other).unwrap())
6461  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6462  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6463  * elif isinstance(other, numbers.Real):
6464  */
6465  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6466  __pyx_t_2 = (__pyx_t_1 != 0);
6467  if (__pyx_t_2) {
6468 
6469  /* "PyClical.pyx":594
6470  * self.instance = new Clifford((<clifford>other).unwrap())
6471  * elif isinstance(other, index_set):
6472  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6473  * elif isinstance(other, numbers.Real):
6474  * self.instance = new Clifford(<scalar_t>other)
6475  */
6476  try {
6477  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6478  } catch(...) {
6479  __Pyx_CppExn2PyErr();
6480  __PYX_ERR(0, 594, __pyx_L4_error)
6481  }
6482  __pyx_v_self->instance = __pyx_t_6;
6483 
6484  /* "PyClical.pyx":593
6485  * if isinstance(other, clifford):
6486  * self.instance = new Clifford((<clifford>other).unwrap())
6487  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6488  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6489  * elif isinstance(other, numbers.Real):
6490  */
6491  goto __pyx_L10;
6492  }
6493 
6494  /* "PyClical.pyx":595
6495  * elif isinstance(other, index_set):
6496  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6497  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6498  * self.instance = new Clifford(<scalar_t>other)
6499  * elif isinstance(other, str):
6500  */
6501  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6502  __Pyx_GOTREF(__pyx_t_7);
6503  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Real); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 595, __pyx_L4_error)
6504  __Pyx_GOTREF(__pyx_t_8);
6505  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6506  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_8); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 595, __pyx_L4_error)
6507  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6508  __pyx_t_1 = (__pyx_t_2 != 0);
6509  if (__pyx_t_1) {
6510 
6511  /* "PyClical.pyx":596
6512  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6513  * elif isinstance(other, numbers.Real):
6514  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6515  * elif isinstance(other, str):
6516  * try:
6517  */
6518  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 596, __pyx_L4_error)
6519  try {
6520  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6521  } catch(...) {
6522  __Pyx_CppExn2PyErr();
6523  __PYX_ERR(0, 596, __pyx_L4_error)
6524  }
6525  __pyx_v_self->instance = __pyx_t_6;
6526 
6527  /* "PyClical.pyx":595
6528  * elif isinstance(other, index_set):
6529  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6530  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6531  * self.instance = new Clifford(<scalar_t>other)
6532  * elif isinstance(other, str):
6533  */
6534  goto __pyx_L10;
6535  }
6536 
6537  /* "PyClical.pyx":597
6538  * elif isinstance(other, numbers.Real):
6539  * self.instance = new Clifford(<scalar_t>other)
6540  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6541  * try:
6542  * self.instance = new Clifford(<char *>other)
6543  */
6544  __pyx_t_1 = PyString_Check(__pyx_v_other);
6545  __pyx_t_2 = (__pyx_t_1 != 0);
6546  if (__pyx_t_2) {
6547 
6548  /* "PyClical.pyx":598
6549  * self.instance = new Clifford(<scalar_t>other)
6550  * elif isinstance(other, str):
6551  * try: # <<<<<<<<<<<<<<
6552  * self.instance = new Clifford(<char *>other)
6553  * except RuntimeError:
6554  */
6555  {
6556  __Pyx_PyThreadState_declare
6557  __Pyx_PyThreadState_assign
6558  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6559  __Pyx_XGOTREF(__pyx_t_10);
6560  __Pyx_XGOTREF(__pyx_t_11);
6561  __Pyx_XGOTREF(__pyx_t_12);
6562  /*try:*/ {
6563 
6564  /* "PyClical.pyx":599
6565  * elif isinstance(other, str):
6566  * try:
6567  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6568  * except RuntimeError:
6569  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6570  */
6571  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6572  try {
6573  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6574  } catch(...) {
6575  __Pyx_CppExn2PyErr();
6576  __PYX_ERR(0, 599, __pyx_L11_error)
6577  }
6578  __pyx_v_self->instance = __pyx_t_6;
6579 
6580  /* "PyClical.pyx":598
6581  * self.instance = new Clifford(<scalar_t>other)
6582  * elif isinstance(other, str):
6583  * try: # <<<<<<<<<<<<<<
6584  * self.instance = new Clifford(<char *>other)
6585  * except RuntimeError:
6586  */
6587  }
6588  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6589  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6590  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6591  goto __pyx_L16_try_end;
6592  __pyx_L11_error:;
6593  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6594  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6595 
6596  /* "PyClical.pyx":600
6597  * try:
6598  * self.instance = new Clifford(<char *>other)
6599  * except RuntimeError: # <<<<<<<<<<<<<<
6600  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6601  * else:
6602  */
6603  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6604  if (__pyx_t_14) {
6605  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6606  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6607  __Pyx_GOTREF(__pyx_t_8);
6608  __Pyx_GOTREF(__pyx_t_7);
6609  __Pyx_GOTREF(__pyx_t_15);
6610 
6611  /* "PyClical.pyx":601
6612  * self.instance = new Clifford(<char *>other)
6613  * except RuntimeError:
6614  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6615  * else:
6616  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6617  */
6618  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6619  __Pyx_GOTREF(__pyx_t_16);
6620  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6621  __Pyx_GOTREF(__pyx_t_17);
6622  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6623  __Pyx_GOTREF(__pyx_t_18);
6624  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6625  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6626  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6627  __Pyx_GOTREF(__pyx_t_17);
6628  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6629  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6630  __Pyx_GOTREF(__pyx_t_18);
6631  __Pyx_GIVEREF(__pyx_t_17);
6632  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
6633  __pyx_t_17 = 0;
6634  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6635  __Pyx_GOTREF(__pyx_t_17);
6636  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6637  __Pyx_Raise(__pyx_t_17, 0, 0, 0);
6638  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6639  __PYX_ERR(0, 601, __pyx_L13_except_error)
6640  }
6641  goto __pyx_L13_except_error;
6642  __pyx_L13_except_error:;
6643 
6644  /* "PyClical.pyx":598
6645  * self.instance = new Clifford(<scalar_t>other)
6646  * elif isinstance(other, str):
6647  * try: # <<<<<<<<<<<<<<
6648  * self.instance = new Clifford(<char *>other)
6649  * except RuntimeError:
6650  */
6651  __Pyx_XGIVEREF(__pyx_t_10);
6652  __Pyx_XGIVEREF(__pyx_t_11);
6653  __Pyx_XGIVEREF(__pyx_t_12);
6654  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6655  goto __pyx_L4_error;
6656  __pyx_L16_try_end:;
6657  }
6658 
6659  /* "PyClical.pyx":597
6660  * elif isinstance(other, numbers.Real):
6661  * self.instance = new Clifford(<scalar_t>other)
6662  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6663  * try:
6664  * self.instance = new Clifford(<char *>other)
6665  */
6666  goto __pyx_L10;
6667  }
6668 
6669  /* "PyClical.pyx":603
6670  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6671  * else:
6672  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6673  * except RuntimeError as err:
6674  * raise ValueError(error_msg_prefix + " " + str(type(other))
6675  */
6676  /*else*/ {
6677  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 603, __pyx_L4_error)
6678  __Pyx_GOTREF(__pyx_t_15);
6679  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6680  __Pyx_GOTREF(__pyx_t_7);
6681  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6682  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6683  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6684  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6685  __Pyx_GOTREF(__pyx_t_8);
6686  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6687  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6688  __Pyx_GOTREF(__pyx_t_7);
6689  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6690  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6691  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6692  __Pyx_GOTREF(__pyx_t_8);
6693  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6694  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6695  __Pyx_GOTREF(__pyx_t_7);
6696  __Pyx_GIVEREF(__pyx_t_8);
6697  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
6698  __pyx_t_8 = 0;
6699  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6700  __Pyx_GOTREF(__pyx_t_8);
6701  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6702  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6703  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6704  __PYX_ERR(0, 603, __pyx_L4_error)
6705  }
6706  __pyx_L10:;
6707 
6708  /* "PyClical.pyx":590
6709  * error_msg_prefix = "Cannot initialize clifford object from"
6710  * if ixt is None:
6711  * try: # <<<<<<<<<<<<<<
6712  * if isinstance(other, clifford):
6713  * self.instance = new Clifford((<clifford>other).unwrap())
6714  */
6715  }
6716  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6717  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6718  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6719  goto __pyx_L9_try_end;
6720  __pyx_L4_error:;
6721  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6722  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6723  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6724  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6725  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6726  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6727 
6728  /* "PyClical.pyx":604
6729  * else:
6730  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6731  * except RuntimeError as err: # <<<<<<<<<<<<<<
6732  * raise ValueError(error_msg_prefix + " " + str(type(other))
6733  * + " value " + repr(other) + ":"
6734  */
6735  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6736  if (__pyx_t_14) {
6737  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6738  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6739  __Pyx_GOTREF(__pyx_t_8);
6740  __Pyx_GOTREF(__pyx_t_7);
6741  __Pyx_GOTREF(__pyx_t_15);
6742  __Pyx_INCREF(__pyx_t_7);
6743  __pyx_v_err = __pyx_t_7;
6744 
6745  /* "PyClical.pyx":605
6746  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6747  * except RuntimeError as err:
6748  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6749  * + " value " + repr(other) + ":"
6750  * + "\n\t" + str(err))
6751  */
6752  __pyx_t_17 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6753  __Pyx_GOTREF(__pyx_t_17);
6754  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6755  __Pyx_GOTREF(__pyx_t_18);
6756  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6757  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6758  PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6759  __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6760  __Pyx_GOTREF(__pyx_t_16);
6761  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6762  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6763  __Pyx_GOTREF(__pyx_t_18);
6764  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6765  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6766 
6767  /* "PyClical.pyx":606
6768  * except RuntimeError as err:
6769  * raise ValueError(error_msg_prefix + " " + str(type(other))
6770  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6771  * + "\n\t" + str(err))
6772  * elif isinstance(ixt, index_set):
6773  */
6774  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_value); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6775  __Pyx_GOTREF(__pyx_t_16);
6776  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6777  __pyx_t_18 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6778  __Pyx_GOTREF(__pyx_t_18);
6779  __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6780  __Pyx_GOTREF(__pyx_t_17);
6781  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6782  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6783  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_kp_s__5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6784  __Pyx_GOTREF(__pyx_t_18);
6785  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6786 
6787  /* "PyClical.pyx":607
6788  * raise ValueError(error_msg_prefix + " " + str(type(other))
6789  * + " value " + repr(other) + ":"
6790  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6791  * elif isinstance(ixt, index_set):
6792  * if isinstance(other, numbers.Real):
6793  */
6794  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s__6); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6795  __Pyx_GOTREF(__pyx_t_17);
6796  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6797  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6798  __Pyx_GOTREF(__pyx_t_18);
6799  __Pyx_INCREF(__pyx_v_err);
6800  __Pyx_GIVEREF(__pyx_v_err);
6801  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
6802  __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6803  __Pyx_GOTREF(__pyx_t_16);
6804  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6805  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6806  __Pyx_GOTREF(__pyx_t_18);
6807  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6808  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6809 
6810  /* "PyClical.pyx":605
6811  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6812  * except RuntimeError as err:
6813  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6814  * + " value " + repr(other) + ":"
6815  * + "\n\t" + str(err))
6816  */
6817  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6818  __Pyx_GOTREF(__pyx_t_16);
6819  __Pyx_GIVEREF(__pyx_t_18);
6820  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
6821  __pyx_t_18 = 0;
6822  __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_16, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6823  __Pyx_GOTREF(__pyx_t_18);
6824  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6825  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6826  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6827  __PYX_ERR(0, 605, __pyx_L6_except_error)
6828  }
6829  goto __pyx_L6_except_error;
6830  __pyx_L6_except_error:;
6831 
6832  /* "PyClical.pyx":590
6833  * error_msg_prefix = "Cannot initialize clifford object from"
6834  * if ixt is None:
6835  * try: # <<<<<<<<<<<<<<
6836  * if isinstance(other, clifford):
6837  * self.instance = new Clifford((<clifford>other).unwrap())
6838  */
6839  __Pyx_XGIVEREF(__pyx_t_3);
6840  __Pyx_XGIVEREF(__pyx_t_4);
6841  __Pyx_XGIVEREF(__pyx_t_5);
6842  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6843  goto __pyx_L1_error;
6844  __pyx_L9_try_end:;
6845  }
6846 
6847  /* "PyClical.pyx":589
6848  * """
6849  * error_msg_prefix = "Cannot initialize clifford object from"
6850  * if ixt is None: # <<<<<<<<<<<<<<
6851  * try:
6852  * if isinstance(other, clifford):
6853  */
6854  goto __pyx_L3;
6855  }
6856 
6857  /* "PyClical.pyx":608
6858  * + " value " + repr(other) + ":"
6859  * + "\n\t" + str(err))
6860  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6861  * if isinstance(other, numbers.Real):
6862  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6863  */
6864  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6865  __pyx_t_1 = (__pyx_t_2 != 0);
6866  if (__pyx_t_1) {
6867 
6868  /* "PyClical.pyx":609
6869  * + "\n\t" + str(err))
6870  * elif isinstance(ixt, index_set):
6871  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6872  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6873  * elif isinstance(other, collections.Sequence):
6874  */
6875  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6876  __Pyx_GOTREF(__pyx_t_15);
6877  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_Real); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
6878  __Pyx_GOTREF(__pyx_t_7);
6879  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6880  __pyx_t_1 = PyObject_IsInstance(__pyx_v_other, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 609, __pyx_L1_error)
6881  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6882  __pyx_t_2 = (__pyx_t_1 != 0);
6883  if (__pyx_t_2) {
6884 
6885  /* "PyClical.pyx":610
6886  * elif isinstance(ixt, index_set):
6887  * if isinstance(other, numbers.Real):
6888  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6889  * elif isinstance(other, collections.Sequence):
6890  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6891  */
6892  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_other); if (unlikely((__pyx_t_9 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L1_error)
6893  try {
6894  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt)), ((scalar_t)__pyx_t_9));
6895  } catch(...) {
6896  __Pyx_CppExn2PyErr();
6897  __PYX_ERR(0, 610, __pyx_L1_error)
6898  }
6899  __pyx_v_self->instance = __pyx_t_6;
6900 
6901  /* "PyClical.pyx":609
6902  * + "\n\t" + str(err))
6903  * elif isinstance(ixt, index_set):
6904  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6905  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6906  * elif isinstance(other, collections.Sequence):
6907  */
6908  goto __pyx_L21;
6909  }
6910 
6911  /* "PyClical.pyx":611
6912  * if isinstance(other, numbers.Real):
6913  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6914  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6915  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6916  * else:
6917  */
6918  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6919  __Pyx_GOTREF(__pyx_t_7);
6920  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 611, __pyx_L1_error)
6921  __Pyx_GOTREF(__pyx_t_15);
6922  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6923  __pyx_t_2 = PyObject_IsInstance(__pyx_v_other, __pyx_t_15); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error)
6924  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6925  __pyx_t_1 = (__pyx_t_2 != 0);
6926  if (__pyx_t_1) {
6927 
6928  /* "PyClical.pyx":612
6929  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6930  * elif isinstance(other, collections.Sequence):
6931  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6932  * else:
6933  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6934  */
6935  try {
6936  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_list_to_vector(__pyx_v_other), __pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt)));
6937  } catch(...) {
6938  __Pyx_CppExn2PyErr();
6939  __PYX_ERR(0, 612, __pyx_L1_error)
6940  }
6941  __pyx_v_self->instance = __pyx_t_6;
6942 
6943  /* "PyClical.pyx":611
6944  * if isinstance(other, numbers.Real):
6945  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6946  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6947  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6948  * else:
6949  */
6950  goto __pyx_L21;
6951  }
6952 
6953  /* "PyClical.pyx":614
6954  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6955  * else:
6956  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6957  * + ", " + repr(ixt) + ").")
6958  * else:
6959  */
6960  /*else*/ {
6961  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
6962  __Pyx_GOTREF(__pyx_t_15);
6963  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6964  __Pyx_GOTREF(__pyx_t_7);
6965  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6966  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6967  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6968  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6969  __Pyx_GOTREF(__pyx_t_8);
6970  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6971  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6972  __Pyx_GOTREF(__pyx_t_7);
6973  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6974  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6975 
6976  /* "PyClical.pyx":615
6977  * else:
6978  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6979  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6980  * else:
6981  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6982  */
6983  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6984  __Pyx_GOTREF(__pyx_t_8);
6985  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6986  __pyx_t_7 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6987  __Pyx_GOTREF(__pyx_t_7);
6988  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
6989  __Pyx_GOTREF(__pyx_t_15);
6990  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6991  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6992  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6993  __Pyx_GOTREF(__pyx_t_7);
6994  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6995 
6996  /* "PyClical.pyx":614
6997  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6998  * else:
6999  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7000  * + ", " + repr(ixt) + ").")
7001  * else:
7002  */
7003  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7004  __Pyx_GOTREF(__pyx_t_15);
7005  __Pyx_GIVEREF(__pyx_t_7);
7006  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
7007  __pyx_t_7 = 0;
7008  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
7009  __Pyx_GOTREF(__pyx_t_7);
7010  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7011  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7012  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7013  __PYX_ERR(0, 614, __pyx_L1_error)
7014  }
7015  __pyx_L21:;
7016 
7017  /* "PyClical.pyx":608
7018  * + " value " + repr(other) + ":"
7019  * + "\n\t" + str(err))
7020  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7021  * if isinstance(other, numbers.Real):
7022  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7023  */
7024  goto __pyx_L3;
7025  }
7026 
7027  /* "PyClical.pyx":617
7028  * + ", " + repr(ixt) + ").")
7029  * else:
7030  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7031  * + ", " + str(type(ixt)) + ").")
7032  *
7033  */
7034  /*else*/ {
7035  __pyx_t_7 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7036  __Pyx_GOTREF(__pyx_t_7);
7037  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7038  __Pyx_GOTREF(__pyx_t_15);
7039  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
7040  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
7041  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
7042  __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 617, __pyx_L1_error)
7043  __Pyx_GOTREF(__pyx_t_8);
7044  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7045  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7046  __Pyx_GOTREF(__pyx_t_15);
7047  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7048  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7049 
7050  /* "PyClical.pyx":618
7051  * else:
7052  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7053  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7054  *
7055  * def __dealloc__(self):
7056  */
7057  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7058  __Pyx_GOTREF(__pyx_t_8);
7059  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7060  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7061  __Pyx_GOTREF(__pyx_t_15);
7062  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7063  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7064  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7065  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7066  __Pyx_GOTREF(__pyx_t_7);
7067  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7068  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7069  __Pyx_GOTREF(__pyx_t_15);
7070  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7071  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7072  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7073  __Pyx_GOTREF(__pyx_t_7);
7074  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7075 
7076  /* "PyClical.pyx":617
7077  * + ", " + repr(ixt) + ").")
7078  * else:
7079  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7080  * + ", " + str(type(ixt)) + ").")
7081  *
7082  */
7083  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7084  __Pyx_GOTREF(__pyx_t_15);
7085  __Pyx_GIVEREF(__pyx_t_7);
7086  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
7087  __pyx_t_7 = 0;
7088  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7089  __Pyx_GOTREF(__pyx_t_7);
7090  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7091  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7092  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7093  __PYX_ERR(0, 617, __pyx_L1_error)
7094  }
7095  __pyx_L3:;
7096 
7097  /* "PyClical.pyx":563
7098  * return clifford(self)
7099  *
7100  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7101  * """
7102  * Construct an object of type clifford.
7103  */
7104 
7105  /* function exit code */
7106  __pyx_r = 0;
7107  goto __pyx_L0;
7108  __pyx_L1_error:;
7109  __Pyx_XDECREF(__pyx_t_7);
7110  __Pyx_XDECREF(__pyx_t_8);
7111  __Pyx_XDECREF(__pyx_t_15);
7112  __Pyx_XDECREF(__pyx_t_16);
7113  __Pyx_XDECREF(__pyx_t_17);
7114  __Pyx_XDECREF(__pyx_t_18);
7115  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7116  __pyx_r = -1;
7117  __pyx_L0:;
7118  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7119  __Pyx_XDECREF(__pyx_v_err);
7120  __Pyx_RefNannyFinishContext();
7121  return __pyx_r;
7122  }
7123 
7124  /* "PyClical.pyx":620
7125  * + ", " + str(type(ixt)) + ").")
7126  *
7127  * def __dealloc__(self): # <<<<<<<<<<<<<<
7128  * """
7129  * Clean up by deallocating the instance of C++ class Clifford.
7130  */
7131 
7132  /* Python wrapper */
7133  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7134  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7135  __Pyx_RefNannyDeclarations
7136  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7137  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7138 
7139  /* function exit code */
7140  __Pyx_RefNannyFinishContext();
7141  }
7142 
7143  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7144  __Pyx_RefNannyDeclarations
7145  __Pyx_RefNannySetupContext("__dealloc__", 0);
7146 
7147  /* "PyClical.pyx":624
7148  * Clean up by deallocating the instance of C++ class Clifford.
7149  * """
7150  * del self.instance # <<<<<<<<<<<<<<
7151  *
7152  * def __contains__(self, x):
7153  */
7154  delete __pyx_v_self->instance;
7155 
7156  /* "PyClical.pyx":620
7157  * + ", " + str(type(ixt)) + ").")
7158  *
7159  * def __dealloc__(self): # <<<<<<<<<<<<<<
7160  * """
7161  * Clean up by deallocating the instance of C++ class Clifford.
7162  */
7163 
7164  /* function exit code */
7165  __Pyx_RefNannyFinishContext();
7166  }
7167 
7168  /* "PyClical.pyx":626
7169  * del self.instance
7170  *
7171  * def __contains__(self, x): # <<<<<<<<<<<<<<
7172  * """
7173  * Not applicable.
7174  */
7175 
7176  /* Python wrapper */
7177  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7178  static char __pyx_doc_8PyClical_8clifford_6__contains__[] = "\n Not applicable.\n\n >>> x=clifford(index_set({-3,4,7})); -3 in x\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
7179  #if CYTHON_COMPILING_IN_CPYTHON
7180  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7181  #endif
7182  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7183  int __pyx_r;
7184  __Pyx_RefNannyDeclarations
7185  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7186  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7187 
7188  /* function exit code */
7189  __Pyx_RefNannyFinishContext();
7190  return __pyx_r;
7191  }
7192 
7193  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7194  int __pyx_r;
7195  __Pyx_RefNannyDeclarations
7196  PyObject *__pyx_t_1 = NULL;
7197  __Pyx_RefNannySetupContext("__contains__", 0);
7198 
7199  /* "PyClical.pyx":635
7200  * TypeError: Not applicable.
7201  * """
7202  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7203  *
7204  * def __iter__(self):
7205  */
7206  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
7207  __Pyx_GOTREF(__pyx_t_1);
7208  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7209  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7210  __PYX_ERR(0, 635, __pyx_L1_error)
7211 
7212  /* "PyClical.pyx":626
7213  * del self.instance
7214  *
7215  * def __contains__(self, x): # <<<<<<<<<<<<<<
7216  * """
7217  * Not applicable.
7218  */
7219 
7220  /* function exit code */
7221  __pyx_L1_error:;
7222  __Pyx_XDECREF(__pyx_t_1);
7223  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7224  __pyx_r = -1;
7225  __Pyx_RefNannyFinishContext();
7226  return __pyx_r;
7227  }
7228 
7229  /* "PyClical.pyx":637
7230  * raise TypeError("Not applicable.")
7231  *
7232  * def __iter__(self): # <<<<<<<<<<<<<<
7233  * """
7234  * Not applicable.
7235  */
7236 
7237  /* Python wrapper */
7238  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7239  static char __pyx_doc_8PyClical_8clifford_8__iter__[] = "\n Not applicable.\n\n >>> for a in clifford(index_set({-3,4,7})): print a,\n Traceback (most recent call last):\n ...\n TypeError: Not applicable.\n ";
7240  #if CYTHON_COMPILING_IN_CPYTHON
7241  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7242  #endif
7243  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7244  PyObject *__pyx_r = 0;
7245  __Pyx_RefNannyDeclarations
7246  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7247  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7248 
7249  /* function exit code */
7250  __Pyx_RefNannyFinishContext();
7251  return __pyx_r;
7252  }
7253 
7254  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7255  PyObject *__pyx_r = NULL;
7256  __Pyx_RefNannyDeclarations
7257  PyObject *__pyx_t_1 = NULL;
7258  __Pyx_RefNannySetupContext("__iter__", 0);
7259 
7260  /* "PyClical.pyx":646
7261  * TypeError: Not applicable.
7262  * """
7263  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7264  *
7265  * def reframe(self, ixt):
7266  */
7267  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
7268  __Pyx_GOTREF(__pyx_t_1);
7269  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7270  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7271  __PYX_ERR(0, 646, __pyx_L1_error)
7272 
7273  /* "PyClical.pyx":637
7274  * raise TypeError("Not applicable.")
7275  *
7276  * def __iter__(self): # <<<<<<<<<<<<<<
7277  * """
7278  * Not applicable.
7279  */
7280 
7281  /* function exit code */
7282  __pyx_L1_error:;
7283  __Pyx_XDECREF(__pyx_t_1);
7284  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7285  __pyx_r = NULL;
7286  __Pyx_XGIVEREF(__pyx_r);
7287  __Pyx_RefNannyFinishContext();
7288  return __pyx_r;
7289  }
7290 
7291  /* "PyClical.pyx":648
7292  * raise TypeError("Not applicable.")
7293  *
7294  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7295  * """
7296  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7297  */
7298 
7299  /* Python wrapper */
7300  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7301  static char __pyx_doc_8PyClical_8clifford_10reframe[] = "\n Put self into a larger frame, containing the union of self.frame() and index set ixt.\n This can be used to make multiplication faster, by multiplying within a common frame.\n\n >>> clifford(\"2+3{1}\").reframe(index_set({1,2,3}))\n clifford(\"2+3{1}\")\n >>> s=index_set({1,2,3});t=index_set({-3,-2,-1});x=random_clifford(s); x.reframe(t).frame() == (s|t);\n True\n ";
7302  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7303  PyObject *__pyx_r = 0;
7304  __Pyx_RefNannyDeclarations
7305  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7306  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7307 
7308  /* function exit code */
7309  __Pyx_RefNannyFinishContext();
7310  return __pyx_r;
7311  }
7312 
7313  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7314  PyObject *__pyx_v_error_msg_prefix = NULL;
7315  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7316  PyObject *__pyx_v_err = NULL;
7317  PyObject *__pyx_r = NULL;
7318  __Pyx_RefNannyDeclarations
7319  int __pyx_t_1;
7320  int __pyx_t_2;
7321  PyObject *__pyx_t_3 = NULL;
7322  PyObject *__pyx_t_4 = NULL;
7323  PyObject *__pyx_t_5 = NULL;
7324  PyObject *__pyx_t_6 = NULL;
7325  Clifford *__pyx_t_7;
7326  int __pyx_t_8;
7327  PyObject *__pyx_t_9 = NULL;
7328  PyObject *__pyx_t_10 = NULL;
7329  PyObject *__pyx_t_11 = NULL;
7330  PyObject *__pyx_t_12 = NULL;
7331  PyObject *__pyx_t_13 = NULL;
7332  __Pyx_RefNannySetupContext("reframe", 0);
7333 
7334  /* "PyClical.pyx":658
7335  * True
7336  * """
7337  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7338  * if isinstance(ixt, index_set):
7339  * try:
7340  */
7341  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7342  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7343 
7344  /* "PyClical.pyx":659
7345  * """
7346  * error_msg_prefix = "Cannot reframe"
7347  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7348  * try:
7349  * result = clifford()
7350  */
7351  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7352  __pyx_t_2 = (__pyx_t_1 != 0);
7353  if (__pyx_t_2) {
7354 
7355  /* "PyClical.pyx":660
7356  * error_msg_prefix = "Cannot reframe"
7357  * if isinstance(ixt, index_set):
7358  * try: # <<<<<<<<<<<<<<
7359  * result = clifford()
7360  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7361  */
7362  {
7363  __Pyx_PyThreadState_declare
7364  __Pyx_PyThreadState_assign
7365  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7366  __Pyx_XGOTREF(__pyx_t_3);
7367  __Pyx_XGOTREF(__pyx_t_4);
7368  __Pyx_XGOTREF(__pyx_t_5);
7369  /*try:*/ {
7370 
7371  /* "PyClical.pyx":661
7372  * if isinstance(ixt, index_set):
7373  * try:
7374  * result = clifford() # <<<<<<<<<<<<<<
7375  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7376  * except RuntimeError as err:
7377  */
7378  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7379  __Pyx_GOTREF(__pyx_t_6);
7380  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7381  __pyx_t_6 = 0;
7382 
7383  /* "PyClical.pyx":662
7384  * try:
7385  * result = clifford()
7386  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7387  * except RuntimeError as err:
7388  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7389  */
7390  try {
7391  __pyx_t_7 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self), __pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_ixt)));
7392  } catch(...) {
7393  __Pyx_CppExn2PyErr();
7394  __PYX_ERR(0, 662, __pyx_L4_error)
7395  }
7396  __pyx_v_result->instance = __pyx_t_7;
7397 
7398  /* "PyClical.pyx":660
7399  * error_msg_prefix = "Cannot reframe"
7400  * if isinstance(ixt, index_set):
7401  * try: # <<<<<<<<<<<<<<
7402  * result = clifford()
7403  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7404  */
7405  }
7406  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7407  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7408  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7409  goto __pyx_L9_try_end;
7410  __pyx_L4_error:;
7411  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7412 
7413  /* "PyClical.pyx":663
7414  * result = clifford()
7415  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7416  * except RuntimeError as err: # <<<<<<<<<<<<<<
7417  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7418  * + str(ixt) + ":"
7419  */
7420  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7421  if (__pyx_t_8) {
7422  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7423  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7424  __Pyx_GOTREF(__pyx_t_6);
7425  __Pyx_GOTREF(__pyx_t_9);
7426  __Pyx_GOTREF(__pyx_t_10);
7427  __Pyx_INCREF(__pyx_t_9);
7428  __pyx_v_err = __pyx_t_9;
7429 
7430  /* "PyClical.pyx":664
7431  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7432  * except RuntimeError as err:
7433  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7434  * + str(ixt) + ":"
7435  * + "\n\t" + str(err))
7436  */
7437  __pyx_t_11 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_from); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7438  __Pyx_GOTREF(__pyx_t_11);
7439  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7440  __Pyx_GOTREF(__pyx_t_12);
7441  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7442  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7443  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
7444  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7445  __Pyx_GOTREF(__pyx_t_13);
7446  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7447  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7448  __Pyx_GOTREF(__pyx_t_12);
7449  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7450  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7451  __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_kp_s_to_frame); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7452  __Pyx_GOTREF(__pyx_t_13);
7453  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7454 
7455  /* "PyClical.pyx":665
7456  * except RuntimeError as err:
7457  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7458  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7459  * + "\n\t" + str(err))
7460  * else:
7461  */
7462  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7463  __Pyx_GOTREF(__pyx_t_12);
7464  __Pyx_INCREF(__pyx_v_ixt);
7465  __Pyx_GIVEREF(__pyx_v_ixt);
7466  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
7467  __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_12, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7468  __Pyx_GOTREF(__pyx_t_11);
7469  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7470  __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7471  __Pyx_GOTREF(__pyx_t_12);
7472  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7473  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7474  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_kp_s__5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7475  __Pyx_GOTREF(__pyx_t_11);
7476  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7477 
7478  /* "PyClical.pyx":666
7479  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7480  * + str(ixt) + ":"
7481  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7482  * else:
7483  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7484  */
7485  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7486  __Pyx_GOTREF(__pyx_t_12);
7487  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7488  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7489  __Pyx_GOTREF(__pyx_t_11);
7490  __Pyx_INCREF(__pyx_v_err);
7491  __Pyx_GIVEREF(__pyx_v_err);
7492  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
7493  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7494  __Pyx_GOTREF(__pyx_t_13);
7495  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7496  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7497  __Pyx_GOTREF(__pyx_t_11);
7498  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7499  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7500 
7501  /* "PyClical.pyx":664
7502  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7503  * except RuntimeError as err:
7504  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7505  * + str(ixt) + ":"
7506  * + "\n\t" + str(err))
7507  */
7508  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7509  __Pyx_GOTREF(__pyx_t_13);
7510  __Pyx_GIVEREF(__pyx_t_11);
7511  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
7512  __pyx_t_11 = 0;
7513  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7514  __Pyx_GOTREF(__pyx_t_11);
7515  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7516  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
7517  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7518  __PYX_ERR(0, 664, __pyx_L6_except_error)
7519  }
7520  goto __pyx_L6_except_error;
7521  __pyx_L6_except_error:;
7522 
7523  /* "PyClical.pyx":660
7524  * error_msg_prefix = "Cannot reframe"
7525  * if isinstance(ixt, index_set):
7526  * try: # <<<<<<<<<<<<<<
7527  * result = clifford()
7528  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7529  */
7530  __Pyx_XGIVEREF(__pyx_t_3);
7531  __Pyx_XGIVEREF(__pyx_t_4);
7532  __Pyx_XGIVEREF(__pyx_t_5);
7533  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7534  goto __pyx_L1_error;
7535  __pyx_L9_try_end:;
7536  }
7537 
7538  /* "PyClical.pyx":659
7539  * """
7540  * error_msg_prefix = "Cannot reframe"
7541  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7542  * try:
7543  * result = clifford()
7544  */
7545  goto __pyx_L3;
7546  }
7547 
7548  /* "PyClical.pyx":668
7549  * + "\n\t" + str(err))
7550  * else:
7551  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7552  * return result
7553  *
7554  */
7555  /*else*/ {
7556  __pyx_t_10 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_using); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 668, __pyx_L1_error)
7557  __Pyx_GOTREF(__pyx_t_10);
7558  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7559  __Pyx_GOTREF(__pyx_t_9);
7560  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7561  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7562  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7563  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7564  __Pyx_GOTREF(__pyx_t_6);
7565  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7566  __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7567  __Pyx_GOTREF(__pyx_t_9);
7568  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7569  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7570  __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7571  __Pyx_GOTREF(__pyx_t_6);
7572  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7573  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7574  __Pyx_GOTREF(__pyx_t_9);
7575  __Pyx_GIVEREF(__pyx_t_6);
7576  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
7577  __pyx_t_6 = 0;
7578  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7579  __Pyx_GOTREF(__pyx_t_6);
7580  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7581  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7582  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7583  __PYX_ERR(0, 668, __pyx_L1_error)
7584  }
7585  __pyx_L3:;
7586 
7587  /* "PyClical.pyx":669
7588  * else:
7589  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7590  * return result # <<<<<<<<<<<<<<
7591  *
7592  * def __richcmp__(lhs, rhs, int op):
7593  */
7594  __Pyx_XDECREF(__pyx_r);
7595  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7596  __pyx_r = ((PyObject *)__pyx_v_result);
7597  goto __pyx_L0;
7598 
7599  /* "PyClical.pyx":648
7600  * raise TypeError("Not applicable.")
7601  *
7602  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7603  * """
7604  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7605  */
7606 
7607  /* function exit code */
7608  __pyx_L1_error:;
7609  __Pyx_XDECREF(__pyx_t_6);
7610  __Pyx_XDECREF(__pyx_t_9);
7611  __Pyx_XDECREF(__pyx_t_10);
7612  __Pyx_XDECREF(__pyx_t_11);
7613  __Pyx_XDECREF(__pyx_t_12);
7614  __Pyx_XDECREF(__pyx_t_13);
7615  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7616  __pyx_r = NULL;
7617  __pyx_L0:;
7618  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7619  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7620  __Pyx_XDECREF(__pyx_v_err);
7621  __Pyx_XGIVEREF(__pyx_r);
7622  __Pyx_RefNannyFinishContext();
7623  return __pyx_r;
7624  }
7625 
7626  /* "PyClical.pyx":671
7627  * return result
7628  *
7629  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7630  * """
7631  * Compare objects of type clifford.
7632  */
7633 
7634  /* Python wrapper */
7635  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7636  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7637  PyObject *__pyx_r = 0;
7638  __Pyx_RefNannyDeclarations
7639  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7640  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7641 
7642  /* function exit code */
7643  __Pyx_RefNannyFinishContext();
7644  return __pyx_r;
7645  }
7646 
7647  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7648  PyObject *__pyx_r = NULL;
7649  __Pyx_RefNannyDeclarations
7650  int __pyx_t_1;
7651  int __pyx_t_2;
7652  int __pyx_t_3;
7653  PyObject *__pyx_t_4 = NULL;
7654  PyObject *__pyx_t_5 = NULL;
7655  PyObject *__pyx_t_6 = NULL;
7656  __Pyx_RefNannySetupContext("__richcmp__", 0);
7657 
7658  /* "PyClical.pyx":690
7659  * True
7660  * """
7661  * if op == 2: # == # <<<<<<<<<<<<<<
7662  * if (lhs is None) or (rhs is None):
7663  * return bool(lhs is rhs)
7664  */
7665  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7666  if (__pyx_t_1) {
7667 
7668  /* "PyClical.pyx":691
7669  * """
7670  * if op == 2: # ==
7671  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7672  * return bool(lhs is rhs)
7673  * else:
7674  */
7675  __pyx_t_2 = (__pyx_v_lhs == Py_None);
7676  __pyx_t_3 = (__pyx_t_2 != 0);
7677  if (!__pyx_t_3) {
7678  } else {
7679  __pyx_t_1 = __pyx_t_3;
7680  goto __pyx_L5_bool_binop_done;
7681  }
7682  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7683  __pyx_t_2 = (__pyx_t_3 != 0);
7684  __pyx_t_1 = __pyx_t_2;
7685  __pyx_L5_bool_binop_done:;
7686  if (__pyx_t_1) {
7687 
7688  /* "PyClical.pyx":692
7689  * if op == 2: # ==
7690  * if (lhs is None) or (rhs is None):
7691  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7692  * else:
7693  * return bool( toClifford(lhs) == toClifford(rhs) )
7694  */
7695  __Pyx_XDECREF(__pyx_r);
7696  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7697  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7698  __Pyx_GOTREF(__pyx_t_4);
7699  __pyx_r = __pyx_t_4;
7700  __pyx_t_4 = 0;
7701  goto __pyx_L0;
7702 
7703  /* "PyClical.pyx":691
7704  * """
7705  * if op == 2: # ==
7706  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7707  * return bool(lhs is rhs)
7708  * else:
7709  */
7710  }
7711 
7712  /* "PyClical.pyx":694
7713  * return bool(lhs is rhs)
7714  * else:
7715  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7716  * elif op == 3: # !=
7717  * if (lhs is None) or (rhs is None):
7718  */
7719  /*else*/ {
7720  __Pyx_XDECREF(__pyx_r);
7721  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7722  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7723  __Pyx_GOTREF(__pyx_t_4);
7724  __pyx_r = __pyx_t_4;
7725  __pyx_t_4 = 0;
7726  goto __pyx_L0;
7727  }
7728 
7729  /* "PyClical.pyx":690
7730  * True
7731  * """
7732  * if op == 2: # == # <<<<<<<<<<<<<<
7733  * if (lhs is None) or (rhs is None):
7734  * return bool(lhs is rhs)
7735  */
7736  }
7737 
7738  /* "PyClical.pyx":695
7739  * else:
7740  * return bool( toClifford(lhs) == toClifford(rhs) )
7741  * elif op == 3: # != # <<<<<<<<<<<<<<
7742  * if (lhs is None) or (rhs is None):
7743  * return not bool(lhs is rhs)
7744  */
7745  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7746  if (__pyx_t_1) {
7747 
7748  /* "PyClical.pyx":696
7749  * return bool( toClifford(lhs) == toClifford(rhs) )
7750  * elif op == 3: # !=
7751  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7752  * return not bool(lhs is rhs)
7753  * else:
7754  */
7755  __pyx_t_2 = (__pyx_v_lhs == Py_None);
7756  __pyx_t_3 = (__pyx_t_2 != 0);
7757  if (!__pyx_t_3) {
7758  } else {
7759  __pyx_t_1 = __pyx_t_3;
7760  goto __pyx_L8_bool_binop_done;
7761  }
7762  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7763  __pyx_t_2 = (__pyx_t_3 != 0);
7764  __pyx_t_1 = __pyx_t_2;
7765  __pyx_L8_bool_binop_done:;
7766  if (__pyx_t_1) {
7767 
7768  /* "PyClical.pyx":697
7769  * elif op == 3: # !=
7770  * if (lhs is None) or (rhs is None):
7771  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7772  * else:
7773  * return bool( toClifford(lhs) != toClifford(rhs) )
7774  */
7775  __Pyx_XDECREF(__pyx_r);
7776  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7777  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7778  __Pyx_GOTREF(__pyx_t_4);
7779  __pyx_r = __pyx_t_4;
7780  __pyx_t_4 = 0;
7781  goto __pyx_L0;
7782 
7783  /* "PyClical.pyx":696
7784  * return bool( toClifford(lhs) == toClifford(rhs) )
7785  * elif op == 3: # !=
7786  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7787  * return not bool(lhs is rhs)
7788  * else:
7789  */
7790  }
7791 
7792  /* "PyClical.pyx":699
7793  * return not bool(lhs is rhs)
7794  * else:
7795  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7796  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7797  * raise TypeError("This comparison operator is not implemented for "
7798  */
7799  /*else*/ {
7800  __Pyx_XDECREF(__pyx_r);
7801  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7802  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7803  __Pyx_GOTREF(__pyx_t_4);
7804  __pyx_r = __pyx_t_4;
7805  __pyx_t_4 = 0;
7806  goto __pyx_L0;
7807  }
7808 
7809  /* "PyClical.pyx":695
7810  * else:
7811  * return bool( toClifford(lhs) == toClifford(rhs) )
7812  * elif op == 3: # != # <<<<<<<<<<<<<<
7813  * if (lhs is None) or (rhs is None):
7814  * return not bool(lhs is rhs)
7815  */
7816  }
7817 
7818  /* "PyClical.pyx":700
7819  * else:
7820  * return bool( toClifford(lhs) != toClifford(rhs) )
7821  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7822  * raise TypeError("This comparison operator is not implemented for "
7823  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7824  */
7825  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, __pyx_ptype_8PyClical_clifford);
7826  __pyx_t_3 = (__pyx_t_2 != 0);
7827  if (!__pyx_t_3) {
7828  } else {
7829  __pyx_t_1 = __pyx_t_3;
7830  goto __pyx_L10_bool_binop_done;
7831  }
7832  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7833  __pyx_t_2 = (__pyx_t_3 != 0);
7834  __pyx_t_1 = __pyx_t_2;
7835  __pyx_L10_bool_binop_done:;
7836  if (__pyx_t_1) {
7837 
7838  /* "PyClical.pyx":702
7839  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7840  * raise TypeError("This comparison operator is not implemented for "
7841  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7842  * else:
7843  * return NotImplemented
7844  */
7845  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7846  __Pyx_GOTREF(__pyx_t_4);
7847  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7848  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7849  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
7850  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7851  __Pyx_GOTREF(__pyx_t_5);
7852  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7853  __pyx_t_4 = PyNumber_Add(__pyx_kp_s_This_comparison_operator_is_not, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7854  __Pyx_GOTREF(__pyx_t_4);
7855  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7856  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7857  __Pyx_GOTREF(__pyx_t_5);
7858  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7859  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7860  __Pyx_GOTREF(__pyx_t_4);
7861  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7862  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7863  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
7864  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7865  __Pyx_GOTREF(__pyx_t_6);
7866  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7867  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7868  __Pyx_GOTREF(__pyx_t_4);
7869  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7870  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7871  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7872  __Pyx_GOTREF(__pyx_t_6);
7873  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7874 
7875  /* "PyClical.pyx":701
7876  * return bool( toClifford(lhs) != toClifford(rhs) )
7877  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7878  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7879  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7880  * else:
7881  */
7882  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
7883  __Pyx_GOTREF(__pyx_t_4);
7884  __Pyx_GIVEREF(__pyx_t_6);
7885  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
7886  __pyx_t_6 = 0;
7887  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7888  __Pyx_GOTREF(__pyx_t_6);
7889  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7890  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7891  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7892  __PYX_ERR(0, 701, __pyx_L1_error)
7893 
7894  /* "PyClical.pyx":700
7895  * else:
7896  * return bool( toClifford(lhs) != toClifford(rhs) )
7897  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7898  * raise TypeError("This comparison operator is not implemented for "
7899  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7900  */
7901  }
7902 
7903  /* "PyClical.pyx":704
7904  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7905  * else:
7906  * return NotImplemented # <<<<<<<<<<<<<<
7907  *
7908  * def __getitem__(self, ixt):
7909  */
7910  /*else*/ {
7911  __Pyx_XDECREF(__pyx_r);
7912  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7913  __pyx_r = __pyx_builtin_NotImplemented;
7914  goto __pyx_L0;
7915  }
7916 
7917  /* "PyClical.pyx":671
7918  * return result
7919  *
7920  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7921  * """
7922  * Compare objects of type clifford.
7923  */
7924 
7925  /* function exit code */
7926  __pyx_L1_error:;
7927  __Pyx_XDECREF(__pyx_t_4);
7928  __Pyx_XDECREF(__pyx_t_5);
7929  __Pyx_XDECREF(__pyx_t_6);
7930  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7931  __pyx_r = NULL;
7932  __pyx_L0:;
7933  __Pyx_XGIVEREF(__pyx_r);
7934  __Pyx_RefNannyFinishContext();
7935  return __pyx_r;
7936  }
7937 
7938  /* "PyClical.pyx":706
7939  * return NotImplemented
7940  *
7941  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7942  * """
7943  * Subscripting: map from index set to scalar coordinate.
7944  */
7945 
7946  /* Python wrapper */
7947  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7948  static char __pyx_doc_8PyClical_8clifford_14__getitem__[] = "\n Subscripting: map from index set to scalar coordinate.\n\n >>> clifford(\"{1}\")[index_set(1)]\n 1.0\n >>> clifford(\"{1}\")[index_set({1})]\n 1.0\n >>> clifford(\"{1}\")[index_set({1,2})]\n 0.0\n >>> clifford(\"2{1,2}\")[index_set({1,2})]\n 2.0\n ";
7949  #if CYTHON_COMPILING_IN_CPYTHON
7950  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7951  #endif
7952  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7953  PyObject *__pyx_r = 0;
7954  __Pyx_RefNannyDeclarations
7955  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7956  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7957 
7958  /* function exit code */
7959  __Pyx_RefNannyFinishContext();
7960  return __pyx_r;
7961  }
7962 
7963  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7964  PyObject *__pyx_r = NULL;
7965  __Pyx_RefNannyDeclarations
7966  PyObject *__pyx_t_1 = NULL;
7967  __Pyx_RefNannySetupContext("__getitem__", 0);
7968 
7969  /* "PyClical.pyx":719
7970  * 2.0
7971  * """
7972  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7973  *
7974  * def __neg__(self):
7975  */
7976  __Pyx_XDECREF(__pyx_r);
7977  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->operator[](__pyx_f_8PyClical_toIndexSet(__pyx_v_ixt))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
7978  __Pyx_GOTREF(__pyx_t_1);
7979  __pyx_r = __pyx_t_1;
7980  __pyx_t_1 = 0;
7981  goto __pyx_L0;
7982 
7983  /* "PyClical.pyx":706
7984  * return NotImplemented
7985  *
7986  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7987  * """
7988  * Subscripting: map from index set to scalar coordinate.
7989  */
7990 
7991  /* function exit code */
7992  __pyx_L1_error:;
7993  __Pyx_XDECREF(__pyx_t_1);
7994  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7995  __pyx_r = NULL;
7996  __pyx_L0:;
7997  __Pyx_XGIVEREF(__pyx_r);
7998  __Pyx_RefNannyFinishContext();
7999  return __pyx_r;
8000  }
8001 
8002  /* "PyClical.pyx":721
8003  * return self.instance.getitem(toIndexSet(ixt))
8004  *
8005  * def __neg__(self): # <<<<<<<<<<<<<<
8006  * """
8007  * Unary -.
8008  */
8009 
8010  /* Python wrapper */
8011  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8012  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
8013  #if CYTHON_COMPILING_IN_CPYTHON
8014  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8015  #endif
8016  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8017  PyObject *__pyx_r = 0;
8018  __Pyx_RefNannyDeclarations
8019  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8020  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8021 
8022  /* function exit code */
8023  __Pyx_RefNannyFinishContext();
8024  return __pyx_r;
8025  }
8026 
8027  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8028  PyObject *__pyx_r = NULL;
8029  __Pyx_RefNannyDeclarations
8030  PyObject *__pyx_t_1 = NULL;
8031  PyObject *__pyx_t_2 = NULL;
8032  __Pyx_RefNannySetupContext("__neg__", 0);
8033 
8034  /* "PyClical.pyx":728
8035  * -{1}
8036  * """
8037  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8038  *
8039  * def __pos__(self):
8040  */
8041  __Pyx_XDECREF(__pyx_r);
8042  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
8043  __Pyx_GOTREF(__pyx_t_1);
8044  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->operator-()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)
8045  __Pyx_GOTREF(__pyx_t_2);
8046  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8047  __pyx_r = __pyx_t_2;
8048  __pyx_t_2 = 0;
8049  goto __pyx_L0;
8050 
8051  /* "PyClical.pyx":721
8052  * return self.instance.getitem(toIndexSet(ixt))
8053  *
8054  * def __neg__(self): # <<<<<<<<<<<<<<
8055  * """
8056  * Unary -.
8057  */
8058 
8059  /* function exit code */
8060  __pyx_L1_error:;
8061  __Pyx_XDECREF(__pyx_t_1);
8062  __Pyx_XDECREF(__pyx_t_2);
8063  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8064  __pyx_r = NULL;
8065  __pyx_L0:;
8066  __Pyx_XGIVEREF(__pyx_r);
8067  __Pyx_RefNannyFinishContext();
8068  return __pyx_r;
8069  }
8070 
8071  /* "PyClical.pyx":730
8072  * return clifford().wrap( self.instance.neg() )
8073  *
8074  * def __pos__(self): # <<<<<<<<<<<<<<
8075  * """
8076  * Unary +.
8077  */
8078 
8079  /* Python wrapper */
8080  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8081  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8082  #if CYTHON_COMPILING_IN_CPYTHON
8083  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8084  #endif
8085  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8086  PyObject *__pyx_r = 0;
8087  __Pyx_RefNannyDeclarations
8088  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8089  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8090 
8091  /* function exit code */
8092  __Pyx_RefNannyFinishContext();
8093  return __pyx_r;
8094  }
8095 
8096  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8097  PyObject *__pyx_r = NULL;
8098  __Pyx_RefNannyDeclarations
8099  PyObject *__pyx_t_1 = NULL;
8100  PyObject *__pyx_t_2 = NULL;
8101  __Pyx_RefNannySetupContext("__pos__", 0);
8102 
8103  /* "PyClical.pyx":737
8104  * {1}
8105  * """
8106  * return clifford(self) # <<<<<<<<<<<<<<
8107  *
8108  * def __add__(lhs, rhs):
8109  */
8110  __Pyx_XDECREF(__pyx_r);
8111  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
8112  __Pyx_GOTREF(__pyx_t_1);
8113  __Pyx_INCREF(((PyObject *)__pyx_v_self));
8114  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
8115  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
8116  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error)
8117  __Pyx_GOTREF(__pyx_t_2);
8118  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8119  __pyx_r = __pyx_t_2;
8120  __pyx_t_2 = 0;
8121  goto __pyx_L0;
8122 
8123  /* "PyClical.pyx":730
8124  * return clifford().wrap( self.instance.neg() )
8125  *
8126  * def __pos__(self): # <<<<<<<<<<<<<<
8127  * """
8128  * Unary +.
8129  */
8130 
8131  /* function exit code */
8132  __pyx_L1_error:;
8133  __Pyx_XDECREF(__pyx_t_1);
8134  __Pyx_XDECREF(__pyx_t_2);
8135  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8136  __pyx_r = NULL;
8137  __pyx_L0:;
8138  __Pyx_XGIVEREF(__pyx_r);
8139  __Pyx_RefNannyFinishContext();
8140  return __pyx_r;
8141  }
8142 
8143  /* "PyClical.pyx":739
8144  * return clifford(self)
8145  *
8146  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8147  * """
8148  * Geometric sum.
8149  */
8150 
8151  /* Python wrapper */
8152  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8153  static char __pyx_doc_8PyClical_8clifford_20__add__[] = "\n Geometric sum.\n\n >>> print clifford(1) + clifford(\"{2}\")\n 1+{2}\n >>> print clifford(\"{1}\") + clifford(\"{2}\")\n {1}+{2}\n ";
8154  #if CYTHON_COMPILING_IN_CPYTHON
8155  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8156  #endif
8157  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8158  PyObject *__pyx_r = 0;
8159  __Pyx_RefNannyDeclarations
8160  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8161  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8162 
8163  /* function exit code */
8164  __Pyx_RefNannyFinishContext();
8165  return __pyx_r;
8166  }
8167 
8168  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8169  PyObject *__pyx_r = NULL;
8170  __Pyx_RefNannyDeclarations
8171  PyObject *__pyx_t_1 = NULL;
8172  PyObject *__pyx_t_2 = NULL;
8173  __Pyx_RefNannySetupContext("__add__", 0);
8174 
8175  /* "PyClical.pyx":748
8176  * {1}+{2}
8177  * """
8178  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8179  *
8180  * def __iadd__(self, rhs):
8181  */
8182  __Pyx_XDECREF(__pyx_r);
8183  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8184  __Pyx_GOTREF(__pyx_t_1);
8185  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) + __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error)
8186  __Pyx_GOTREF(__pyx_t_2);
8187  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8188  __pyx_r = __pyx_t_2;
8189  __pyx_t_2 = 0;
8190  goto __pyx_L0;
8191 
8192  /* "PyClical.pyx":739
8193  * return clifford(self)
8194  *
8195  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8196  * """
8197  * Geometric sum.
8198  */
8199 
8200  /* function exit code */
8201  __pyx_L1_error:;
8202  __Pyx_XDECREF(__pyx_t_1);
8203  __Pyx_XDECREF(__pyx_t_2);
8204  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8205  __pyx_r = NULL;
8206  __pyx_L0:;
8207  __Pyx_XGIVEREF(__pyx_r);
8208  __Pyx_RefNannyFinishContext();
8209  return __pyx_r;
8210  }
8211 
8212  /* "PyClical.pyx":750
8213  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8214  *
8215  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8216  * """
8217  * Geometric sum.
8218  */
8219 
8220  /* Python wrapper */
8221  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8222  static char __pyx_doc_8PyClical_8clifford_22__iadd__[] = "\n Geometric sum.\n\n >>> x = clifford(1); x += clifford(\"{2}\"); print x\n 1+{2}\n ";
8223  #if CYTHON_COMPILING_IN_CPYTHON
8224  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8225  #endif
8226  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8227  PyObject *__pyx_r = 0;
8228  __Pyx_RefNannyDeclarations
8229  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8230  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8231 
8232  /* function exit code */
8233  __Pyx_RefNannyFinishContext();
8234  return __pyx_r;
8235  }
8236 
8237  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8238  PyObject *__pyx_r = NULL;
8239  __Pyx_RefNannyDeclarations
8240  PyObject *__pyx_t_1 = NULL;
8241  __Pyx_RefNannySetupContext("__iadd__", 0);
8242 
8243  /* "PyClical.pyx":757
8244  * 1+{2}
8245  * """
8246  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8247  *
8248  * def __sub__(lhs, rhs):
8249  */
8250  __Pyx_XDECREF(__pyx_r);
8251  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) + __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
8252  __Pyx_GOTREF(__pyx_t_1);
8253  __pyx_r = __pyx_t_1;
8254  __pyx_t_1 = 0;
8255  goto __pyx_L0;
8256 
8257  /* "PyClical.pyx":750
8258  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8259  *
8260  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8261  * """
8262  * Geometric sum.
8263  */
8264 
8265  /* function exit code */
8266  __pyx_L1_error:;
8267  __Pyx_XDECREF(__pyx_t_1);
8268  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8269  __pyx_r = NULL;
8270  __pyx_L0:;
8271  __Pyx_XGIVEREF(__pyx_r);
8272  __Pyx_RefNannyFinishContext();
8273  return __pyx_r;
8274  }
8275 
8276  /* "PyClical.pyx":759
8277  * return self.wrap( self.unwrap() + toClifford(rhs) )
8278  *
8279  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8280  * """
8281  * Geometric difference.
8282  */
8283 
8284  /* Python wrapper */
8285  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8286  static char __pyx_doc_8PyClical_8clifford_24__sub__[] = "\n Geometric difference.\n\n >>> print clifford(1) - clifford(\"{2}\")\n 1-{2}\n >>> print clifford(\"{1}\") - clifford(\"{2}\")\n {1}-{2}\n ";
8287  #if CYTHON_COMPILING_IN_CPYTHON
8288  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8289  #endif
8290  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8291  PyObject *__pyx_r = 0;
8292  __Pyx_RefNannyDeclarations
8293  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8294  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8295 
8296  /* function exit code */
8297  __Pyx_RefNannyFinishContext();
8298  return __pyx_r;
8299  }
8300 
8301  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8302  PyObject *__pyx_r = NULL;
8303  __Pyx_RefNannyDeclarations
8304  PyObject *__pyx_t_1 = NULL;
8305  PyObject *__pyx_t_2 = NULL;
8306  __Pyx_RefNannySetupContext("__sub__", 0);
8307 
8308  /* "PyClical.pyx":768
8309  * {1}-{2}
8310  * """
8311  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8312  *
8313  * def __isub__(self, rhs):
8314  */
8315  __Pyx_XDECREF(__pyx_r);
8316  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8317  __Pyx_GOTREF(__pyx_t_1);
8318  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) - __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error)
8319  __Pyx_GOTREF(__pyx_t_2);
8320  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8321  __pyx_r = __pyx_t_2;
8322  __pyx_t_2 = 0;
8323  goto __pyx_L0;
8324 
8325  /* "PyClical.pyx":759
8326  * return self.wrap( self.unwrap() + toClifford(rhs) )
8327  *
8328  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8329  * """
8330  * Geometric difference.
8331  */
8332 
8333  /* function exit code */
8334  __pyx_L1_error:;
8335  __Pyx_XDECREF(__pyx_t_1);
8336  __Pyx_XDECREF(__pyx_t_2);
8337  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8338  __pyx_r = NULL;
8339  __pyx_L0:;
8340  __Pyx_XGIVEREF(__pyx_r);
8341  __Pyx_RefNannyFinishContext();
8342  return __pyx_r;
8343  }
8344 
8345  /* "PyClical.pyx":770
8346  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8347  *
8348  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8349  * """
8350  * Geometric difference.
8351  */
8352 
8353  /* Python wrapper */
8354  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8355  static char __pyx_doc_8PyClical_8clifford_26__isub__[] = "\n Geometric difference.\n\n >>> x = clifford(1); x -= clifford(\"{2}\"); print x\n 1-{2}\n ";
8356  #if CYTHON_COMPILING_IN_CPYTHON
8357  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8358  #endif
8359  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8360  PyObject *__pyx_r = 0;
8361  __Pyx_RefNannyDeclarations
8362  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8363  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8364 
8365  /* function exit code */
8366  __Pyx_RefNannyFinishContext();
8367  return __pyx_r;
8368  }
8369 
8370  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8371  PyObject *__pyx_r = NULL;
8372  __Pyx_RefNannyDeclarations
8373  PyObject *__pyx_t_1 = NULL;
8374  __Pyx_RefNannySetupContext("__isub__", 0);
8375 
8376  /* "PyClical.pyx":777
8377  * 1-{2}
8378  * """
8379  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8380  *
8381  * def __mul__(lhs, rhs):
8382  */
8383  __Pyx_XDECREF(__pyx_r);
8384  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) - __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
8385  __Pyx_GOTREF(__pyx_t_1);
8386  __pyx_r = __pyx_t_1;
8387  __pyx_t_1 = 0;
8388  goto __pyx_L0;
8389 
8390  /* "PyClical.pyx":770
8391  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8392  *
8393  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8394  * """
8395  * Geometric difference.
8396  */
8397 
8398  /* function exit code */
8399  __pyx_L1_error:;
8400  __Pyx_XDECREF(__pyx_t_1);
8401  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8402  __pyx_r = NULL;
8403  __pyx_L0:;
8404  __Pyx_XGIVEREF(__pyx_r);
8405  __Pyx_RefNannyFinishContext();
8406  return __pyx_r;
8407  }
8408 
8409  /* "PyClical.pyx":779
8410  * return self.wrap( self.unwrap() - toClifford(rhs) )
8411  *
8412  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8413  * """
8414  * Geometric product.
8415  */
8416 
8417  /* Python wrapper */
8418  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8419  static char __pyx_doc_8PyClical_8clifford_28__mul__[] = "\n Geometric product.\n\n >>> print clifford(\"{1}\") * clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) * clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") * clifford(\"{1,2}\")\n {2}\n ";
8420  #if CYTHON_COMPILING_IN_CPYTHON
8421  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8422  #endif
8423  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8424  PyObject *__pyx_r = 0;
8425  __Pyx_RefNannyDeclarations
8426  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8427  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8428 
8429  /* function exit code */
8430  __Pyx_RefNannyFinishContext();
8431  return __pyx_r;
8432  }
8433 
8434  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8435  PyObject *__pyx_r = NULL;
8436  __Pyx_RefNannyDeclarations
8437  PyObject *__pyx_t_1 = NULL;
8438  PyObject *__pyx_t_2 = NULL;
8439  __Pyx_RefNannySetupContext("__mul__", 0);
8440 
8441  /* "PyClical.pyx":790
8442  * {2}
8443  * """
8444  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8445  *
8446  * def __imul__(self, rhs):
8447  */
8448  __Pyx_XDECREF(__pyx_r);
8449  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8450  __Pyx_GOTREF(__pyx_t_1);
8451  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) * __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)
8452  __Pyx_GOTREF(__pyx_t_2);
8453  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8454  __pyx_r = __pyx_t_2;
8455  __pyx_t_2 = 0;
8456  goto __pyx_L0;
8457 
8458  /* "PyClical.pyx":779
8459  * return self.wrap( self.unwrap() - toClifford(rhs) )
8460  *
8461  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8462  * """
8463  * Geometric product.
8464  */
8465 
8466  /* function exit code */
8467  __pyx_L1_error:;
8468  __Pyx_XDECREF(__pyx_t_1);
8469  __Pyx_XDECREF(__pyx_t_2);
8470  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8471  __pyx_r = NULL;
8472  __pyx_L0:;
8473  __Pyx_XGIVEREF(__pyx_r);
8474  __Pyx_RefNannyFinishContext();
8475  return __pyx_r;
8476  }
8477 
8478  /* "PyClical.pyx":792
8479  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8480  *
8481  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8482  * """
8483  * Geometric product.
8484  */
8485 
8486  /* Python wrapper */
8487  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8488  static char __pyx_doc_8PyClical_8clifford_30__imul__[] = "\n Geometric product.\n\n >>> x = clifford(2); x *= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{2}\"); print x\n {1,2}\n >>> x = clifford(\"{1}\"); x *= clifford(\"{1,2}\"); print x\n {2}\n ";
8489  #if CYTHON_COMPILING_IN_CPYTHON
8490  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8491  #endif
8492  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8493  PyObject *__pyx_r = 0;
8494  __Pyx_RefNannyDeclarations
8495  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8496  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8497 
8498  /* function exit code */
8499  __Pyx_RefNannyFinishContext();
8500  return __pyx_r;
8501  }
8502 
8503  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8504  PyObject *__pyx_r = NULL;
8505  __Pyx_RefNannyDeclarations
8506  PyObject *__pyx_t_1 = NULL;
8507  __Pyx_RefNannySetupContext("__imul__", 0);
8508 
8509  /* "PyClical.pyx":803
8510  * {2}
8511  * """
8512  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8513  *
8514  * def __mod__(lhs, rhs):
8515  */
8516  __Pyx_XDECREF(__pyx_r);
8517  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) * __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 803, __pyx_L1_error)
8518  __Pyx_GOTREF(__pyx_t_1);
8519  __pyx_r = __pyx_t_1;
8520  __pyx_t_1 = 0;
8521  goto __pyx_L0;
8522 
8523  /* "PyClical.pyx":792
8524  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8525  *
8526  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8527  * """
8528  * Geometric product.
8529  */
8530 
8531  /* function exit code */
8532  __pyx_L1_error:;
8533  __Pyx_XDECREF(__pyx_t_1);
8534  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8535  __pyx_r = NULL;
8536  __pyx_L0:;
8537  __Pyx_XGIVEREF(__pyx_r);
8538  __Pyx_RefNannyFinishContext();
8539  return __pyx_r;
8540  }
8541 
8542  /* "PyClical.pyx":805
8543  * return self.wrap( self.unwrap() * toClifford(rhs) )
8544  *
8545  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8546  * """
8547  * Contraction.
8548  */
8549 
8550  /* Python wrapper */
8551  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8552  static char __pyx_doc_8PyClical_8clifford_32__mod__[] = "\n Contraction.\n\n >>> print clifford(\"{1}\") % clifford(\"{2}\")\n 0\n >>> print clifford(2) % clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") % clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") % clifford(\"{1,2}\")\n {2}\n ";
8553  #if CYTHON_COMPILING_IN_CPYTHON
8554  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8555  #endif
8556  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8557  PyObject *__pyx_r = 0;
8558  __Pyx_RefNannyDeclarations
8559  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8560  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8561 
8562  /* function exit code */
8563  __Pyx_RefNannyFinishContext();
8564  return __pyx_r;
8565  }
8566 
8567  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8568  PyObject *__pyx_r = NULL;
8569  __Pyx_RefNannyDeclarations
8570  PyObject *__pyx_t_1 = NULL;
8571  PyObject *__pyx_t_2 = NULL;
8572  __Pyx_RefNannySetupContext("__mod__", 0);
8573 
8574  /* "PyClical.pyx":818
8575  * {2}
8576  * """
8577  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8578  *
8579  * def __imod__(self, rhs):
8580  */
8581  __Pyx_XDECREF(__pyx_r);
8582  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8583  __Pyx_GOTREF(__pyx_t_1);
8584  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) % __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
8585  __Pyx_GOTREF(__pyx_t_2);
8586  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8587  __pyx_r = __pyx_t_2;
8588  __pyx_t_2 = 0;
8589  goto __pyx_L0;
8590 
8591  /* "PyClical.pyx":805
8592  * return self.wrap( self.unwrap() * toClifford(rhs) )
8593  *
8594  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8595  * """
8596  * Contraction.
8597  */
8598 
8599  /* function exit code */
8600  __pyx_L1_error:;
8601  __Pyx_XDECREF(__pyx_t_1);
8602  __Pyx_XDECREF(__pyx_t_2);
8603  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8604  __pyx_r = NULL;
8605  __pyx_L0:;
8606  __Pyx_XGIVEREF(__pyx_r);
8607  __Pyx_RefNannyFinishContext();
8608  return __pyx_r;
8609  }
8610 
8611  /* "PyClical.pyx":820
8612  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8613  *
8614  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8615  * """
8616  * Contraction.
8617  */
8618 
8619  /* Python wrapper */
8620  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8621  static char __pyx_doc_8PyClical_8clifford_34__imod__[] = "\n Contraction.\n\n >>> x = clifford(\"{1}\"); x %= clifford(\"{2}\"); print x\n 0\n >>> x = clifford(2); x %= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1}\"); print x\n 1\n >>> x = clifford(\"{1}\"); x %= clifford(\"{1,2}\"); print x\n {2}\n ";
8622  #if CYTHON_COMPILING_IN_CPYTHON
8623  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8624  #endif
8625  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8626  PyObject *__pyx_r = 0;
8627  __Pyx_RefNannyDeclarations
8628  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8629  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8630 
8631  /* function exit code */
8632  __Pyx_RefNannyFinishContext();
8633  return __pyx_r;
8634  }
8635 
8636  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8637  PyObject *__pyx_r = NULL;
8638  __Pyx_RefNannyDeclarations
8639  PyObject *__pyx_t_1 = NULL;
8640  __Pyx_RefNannySetupContext("__imod__", 0);
8641 
8642  /* "PyClical.pyx":833
8643  * {2}
8644  * """
8645  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8646  *
8647  * def __and__(lhs, rhs):
8648  */
8649  __Pyx_XDECREF(__pyx_r);
8650  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) % __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
8651  __Pyx_GOTREF(__pyx_t_1);
8652  __pyx_r = __pyx_t_1;
8653  __pyx_t_1 = 0;
8654  goto __pyx_L0;
8655 
8656  /* "PyClical.pyx":820
8657  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8658  *
8659  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8660  * """
8661  * Contraction.
8662  */
8663 
8664  /* function exit code */
8665  __pyx_L1_error:;
8666  __Pyx_XDECREF(__pyx_t_1);
8667  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8668  __pyx_r = NULL;
8669  __pyx_L0:;
8670  __Pyx_XGIVEREF(__pyx_r);
8671  __Pyx_RefNannyFinishContext();
8672  return __pyx_r;
8673  }
8674 
8675  /* "PyClical.pyx":835
8676  * return self.wrap( self.unwrap() % toClifford(rhs) )
8677  *
8678  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8679  * """
8680  * Inner product.
8681  */
8682 
8683  /* Python wrapper */
8684  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8685  static char __pyx_doc_8PyClical_8clifford_36__and__[] = "\n Inner product.\n\n >>> print clifford(\"{1}\") & clifford(\"{2}\")\n 0\n >>> print clifford(2) & clifford(\"{2}\")\n 0\n >>> print clifford(\"{1}\") & clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") & clifford(\"{1,2}\")\n {2}\n ";
8686  #if CYTHON_COMPILING_IN_CPYTHON
8687  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8688  #endif
8689  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8690  PyObject *__pyx_r = 0;
8691  __Pyx_RefNannyDeclarations
8692  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8693  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8694 
8695  /* function exit code */
8696  __Pyx_RefNannyFinishContext();
8697  return __pyx_r;
8698  }
8699 
8700  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8701  PyObject *__pyx_r = NULL;
8702  __Pyx_RefNannyDeclarations
8703  PyObject *__pyx_t_1 = NULL;
8704  PyObject *__pyx_t_2 = NULL;
8705  __Pyx_RefNannySetupContext("__and__", 0);
8706 
8707  /* "PyClical.pyx":848
8708  * {2}
8709  * """
8710  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8711  *
8712  * def __iand__(self, rhs):
8713  */
8714  __Pyx_XDECREF(__pyx_r);
8715  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8716  __Pyx_GOTREF(__pyx_t_1);
8717  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) & __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
8718  __Pyx_GOTREF(__pyx_t_2);
8719  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8720  __pyx_r = __pyx_t_2;
8721  __pyx_t_2 = 0;
8722  goto __pyx_L0;
8723 
8724  /* "PyClical.pyx":835
8725  * return self.wrap( self.unwrap() % toClifford(rhs) )
8726  *
8727  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8728  * """
8729  * Inner product.
8730  */
8731 
8732  /* function exit code */
8733  __pyx_L1_error:;
8734  __Pyx_XDECREF(__pyx_t_1);
8735  __Pyx_XDECREF(__pyx_t_2);
8736  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8737  __pyx_r = NULL;
8738  __pyx_L0:;
8739  __Pyx_XGIVEREF(__pyx_r);
8740  __Pyx_RefNannyFinishContext();
8741  return __pyx_r;
8742  }
8743 
8744  /* "PyClical.pyx":850
8745  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8746  *
8747  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8748  * """
8749  * Inner product.
8750  */
8751 
8752  /* Python wrapper */
8753  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8754  static char __pyx_doc_8PyClical_8clifford_38__iand__[] = "\n Inner product.\n\n >>> x = clifford(\"{1}\"); x &= clifford(\"{2}\"); print x\n 0\n >>> x = clifford(2); x &= clifford(\"{2}\"); print x\n 0\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1}\"); print x\n 1\n >>> x = clifford(\"{1}\"); x &= clifford(\"{1,2}\"); print x\n {2}\n ";
8755  #if CYTHON_COMPILING_IN_CPYTHON
8756  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8757  #endif
8758  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8759  PyObject *__pyx_r = 0;
8760  __Pyx_RefNannyDeclarations
8761  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8762  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8763 
8764  /* function exit code */
8765  __Pyx_RefNannyFinishContext();
8766  return __pyx_r;
8767  }
8768 
8769  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8770  PyObject *__pyx_r = NULL;
8771  __Pyx_RefNannyDeclarations
8772  PyObject *__pyx_t_1 = NULL;
8773  __Pyx_RefNannySetupContext("__iand__", 0);
8774 
8775  /* "PyClical.pyx":863
8776  * {2}
8777  * """
8778  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8779  *
8780  * def __xor__(lhs, rhs):
8781  */
8782  __Pyx_XDECREF(__pyx_r);
8783  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) & __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error)
8784  __Pyx_GOTREF(__pyx_t_1);
8785  __pyx_r = __pyx_t_1;
8786  __pyx_t_1 = 0;
8787  goto __pyx_L0;
8788 
8789  /* "PyClical.pyx":850
8790  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8791  *
8792  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8793  * """
8794  * Inner product.
8795  */
8796 
8797  /* function exit code */
8798  __pyx_L1_error:;
8799  __Pyx_XDECREF(__pyx_t_1);
8800  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8801  __pyx_r = NULL;
8802  __pyx_L0:;
8803  __Pyx_XGIVEREF(__pyx_r);
8804  __Pyx_RefNannyFinishContext();
8805  return __pyx_r;
8806  }
8807 
8808  /* "PyClical.pyx":865
8809  * return self.wrap( self.unwrap() & toClifford(rhs) )
8810  *
8811  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8812  * """
8813  * Outer product.
8814  */
8815 
8816  /* Python wrapper */
8817  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8818  static char __pyx_doc_8PyClical_8clifford_40__xor__[] = "\n Outer product.\n\n >>> print clifford(\"{1}\") ^ clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) ^ clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") ^ clifford(\"{1}\")\n 0\n >>> print clifford(\"{1}\") ^ clifford(\"{1,2}\")\n 0\n ";
8819  #if CYTHON_COMPILING_IN_CPYTHON
8820  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8821  #endif
8822  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8823  PyObject *__pyx_r = 0;
8824  __Pyx_RefNannyDeclarations
8825  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8826  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8827 
8828  /* function exit code */
8829  __Pyx_RefNannyFinishContext();
8830  return __pyx_r;
8831  }
8832 
8833  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8834  PyObject *__pyx_r = NULL;
8835  __Pyx_RefNannyDeclarations
8836  PyObject *__pyx_t_1 = NULL;
8837  PyObject *__pyx_t_2 = NULL;
8838  __Pyx_RefNannySetupContext("__xor__", 0);
8839 
8840  /* "PyClical.pyx":878
8841  * 0
8842  * """
8843  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8844  *
8845  * def __ixor__(self, rhs):
8846  */
8847  __Pyx_XDECREF(__pyx_r);
8848  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8849  __Pyx_GOTREF(__pyx_t_1);
8850  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) ^ __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error)
8851  __Pyx_GOTREF(__pyx_t_2);
8852  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8853  __pyx_r = __pyx_t_2;
8854  __pyx_t_2 = 0;
8855  goto __pyx_L0;
8856 
8857  /* "PyClical.pyx":865
8858  * return self.wrap( self.unwrap() & toClifford(rhs) )
8859  *
8860  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8861  * """
8862  * Outer product.
8863  */
8864 
8865  /* function exit code */
8866  __pyx_L1_error:;
8867  __Pyx_XDECREF(__pyx_t_1);
8868  __Pyx_XDECREF(__pyx_t_2);
8869  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8870  __pyx_r = NULL;
8871  __pyx_L0:;
8872  __Pyx_XGIVEREF(__pyx_r);
8873  __Pyx_RefNannyFinishContext();
8874  return __pyx_r;
8875  }
8876 
8877  /* "PyClical.pyx":880
8878  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8879  *
8880  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8881  * """
8882  * Outer product.
8883  */
8884 
8885  /* Python wrapper */
8886  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8887  static char __pyx_doc_8PyClical_8clifford_42__ixor__[] = "\n Outer product.\n\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{2}\"); print x\n {1,2}\n >>> x = clifford(2); x ^= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1}\"); print x\n 0\n >>> x = clifford(\"{1}\"); x ^= clifford(\"{1,2}\"); print x\n 0\n ";
8888  #if CYTHON_COMPILING_IN_CPYTHON
8889  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8890  #endif
8891  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8892  PyObject *__pyx_r = 0;
8893  __Pyx_RefNannyDeclarations
8894  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8895  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8896 
8897  /* function exit code */
8898  __Pyx_RefNannyFinishContext();
8899  return __pyx_r;
8900  }
8901 
8902  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8903  PyObject *__pyx_r = NULL;
8904  __Pyx_RefNannyDeclarations
8905  PyObject *__pyx_t_1 = NULL;
8906  __Pyx_RefNannySetupContext("__ixor__", 0);
8907 
8908  /* "PyClical.pyx":893
8909  * 0
8910  * """
8911  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8912  *
8913  * def __div__(lhs, rhs):
8914  */
8915  __Pyx_XDECREF(__pyx_r);
8916  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) ^ __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
8917  __Pyx_GOTREF(__pyx_t_1);
8918  __pyx_r = __pyx_t_1;
8919  __pyx_t_1 = 0;
8920  goto __pyx_L0;
8921 
8922  /* "PyClical.pyx":880
8923  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8924  *
8925  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8926  * """
8927  * Outer product.
8928  */
8929 
8930  /* function exit code */
8931  __pyx_L1_error:;
8932  __Pyx_XDECREF(__pyx_t_1);
8933  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8934  __pyx_r = NULL;
8935  __pyx_L0:;
8936  __Pyx_XGIVEREF(__pyx_r);
8937  __Pyx_RefNannyFinishContext();
8938  return __pyx_r;
8939  }
8940 
8941  /* "PyClical.pyx":895
8942  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8943  *
8944  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8945  * """
8946  * Geometric quotient.
8947  */
8948 
8949  /* Python wrapper */
8950  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8951  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8952  static char __pyx_doc_8PyClical_8clifford_44__div__[] = "\n Geometric quotient.\n\n >>> print clifford(\"{1}\") / clifford(\"{2}\")\n {1,2}\n >>> print clifford(2) / clifford(\"{2}\")\n 2{2}\n >>> print clifford(\"{1}\") / clifford(\"{1}\")\n 1\n >>> print clifford(\"{1}\") / clifford(\"{1,2}\")\n -{2}\n ";
8953  #if CYTHON_COMPILING_IN_CPYTHON
8954  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8955  #endif
8956  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8957  PyObject *__pyx_r = 0;
8958  __Pyx_RefNannyDeclarations
8959  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8960  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8961 
8962  /* function exit code */
8963  __Pyx_RefNannyFinishContext();
8964  return __pyx_r;
8965  }
8966  #endif
8968  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8969  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8970  PyObject *__pyx_r = NULL;
8971  __Pyx_RefNannyDeclarations
8972  PyObject *__pyx_t_1 = NULL;
8973  PyObject *__pyx_t_2 = NULL;
8974  __Pyx_RefNannySetupContext("__div__", 0);
8975 
8976  /* "PyClical.pyx":908
8977  * -{2}
8978  * """
8979  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8980  *
8981  * def __idiv__(self, rhs):
8982  */
8983  __Pyx_XDECREF(__pyx_r);
8984  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8985  __Pyx_GOTREF(__pyx_t_1);
8986  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error)
8987  __Pyx_GOTREF(__pyx_t_2);
8988  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8989  __pyx_r = __pyx_t_2;
8990  __pyx_t_2 = 0;
8991  goto __pyx_L0;
8992 
8993  /* "PyClical.pyx":895
8994  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8995  *
8996  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8997  * """
8998  * Geometric quotient.
8999  */
9000 
9001  /* function exit code */
9002  __pyx_L1_error:;
9003  __Pyx_XDECREF(__pyx_t_1);
9004  __Pyx_XDECREF(__pyx_t_2);
9005  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9006  __pyx_r = NULL;
9007  __pyx_L0:;
9008  __Pyx_XGIVEREF(__pyx_r);
9009  __Pyx_RefNannyFinishContext();
9010  return __pyx_r;
9011  }
9012  #endif
9014  /* "PyClical.pyx":910
9015  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9016  *
9017  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9018  * """
9019  * Geometric quotient.
9020  */
9021 
9022  /* Python wrapper */
9023  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9024  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9025  static char __pyx_doc_8PyClical_8clifford_46__idiv__[] = "\n Geometric quotient.\n\n >>> x = clifford(\"{1}\"); x /= clifford(\"{2}\"); print x\n {1,2}\n >>> x = clifford(2); x /= clifford(\"{2}\"); print x\n 2{2}\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1}\"); print x\n 1\n >>> x = clifford(\"{1}\"); x /= clifford(\"{1,2}\"); print x\n -{2}\n ";
9026  #if CYTHON_COMPILING_IN_CPYTHON
9027  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9028  #endif
9029  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9030  PyObject *__pyx_r = 0;
9031  __Pyx_RefNannyDeclarations
9032  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9033  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9034 
9035  /* function exit code */
9036  __Pyx_RefNannyFinishContext();
9037  return __pyx_r;
9038  }
9039  #endif
9041  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9042  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9043  PyObject *__pyx_r = NULL;
9044  __Pyx_RefNannyDeclarations
9045  PyObject *__pyx_t_1 = NULL;
9046  __Pyx_RefNannySetupContext("__idiv__", 0);
9047 
9048  /* "PyClical.pyx":923
9049  * -{2}
9050  * """
9051  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9052  *
9053  * def inv(self):
9054  */
9055  __Pyx_XDECREF(__pyx_r);
9056  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) / __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
9057  __Pyx_GOTREF(__pyx_t_1);
9058  __pyx_r = __pyx_t_1;
9059  __pyx_t_1 = 0;
9060  goto __pyx_L0;
9061 
9062  /* "PyClical.pyx":910
9063  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9064  *
9065  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9066  * """
9067  * Geometric quotient.
9068  */
9069 
9070  /* function exit code */
9071  __pyx_L1_error:;
9072  __Pyx_XDECREF(__pyx_t_1);
9073  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9074  __pyx_r = NULL;
9075  __pyx_L0:;
9076  __Pyx_XGIVEREF(__pyx_r);
9077  __Pyx_RefNannyFinishContext();
9078  return __pyx_r;
9079  }
9080  #endif
9082  /* "PyClical.pyx":925
9083  * return self.wrap( self.unwrap() / toClifford(rhs) )
9084  *
9085  * def inv(self): # <<<<<<<<<<<<<<
9086  * """
9087  * Geometric multiplicative inverse.
9088  */
9089 
9090  /* Python wrapper */
9091  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9092  static char __pyx_doc_8PyClical_8clifford_48inv[] = "\n Geometric multiplicative inverse.\n\n >>> x = clifford(\"{1}\"); print x.inv()\n {1}\n >>> x = clifford(2); print x.inv()\n 0.5\n >>> x = clifford(\"{1,2}\"); print x.inv()\n -{1,2}\n ";
9093  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9094  PyObject *__pyx_r = 0;
9095  __Pyx_RefNannyDeclarations
9096  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9097  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9098 
9099  /* function exit code */
9100  __Pyx_RefNannyFinishContext();
9101  return __pyx_r;
9102  }
9103 
9104  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9105  PyObject *__pyx_r = NULL;
9106  __Pyx_RefNannyDeclarations
9107  PyObject *__pyx_t_1 = NULL;
9108  PyObject *__pyx_t_2 = NULL;
9109  __Pyx_RefNannySetupContext("inv", 0);
9110 
9111  /* "PyClical.pyx":936
9112  * -{1,2}
9113  * """
9114  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9115  *
9116  * def __or__(lhs, rhs):
9117  */
9118  __Pyx_XDECREF(__pyx_r);
9119  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9120  __Pyx_GOTREF(__pyx_t_1);
9121  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->inv()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
9122  __Pyx_GOTREF(__pyx_t_2);
9123  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9124  __pyx_r = __pyx_t_2;
9125  __pyx_t_2 = 0;
9126  goto __pyx_L0;
9127 
9128  /* "PyClical.pyx":925
9129  * return self.wrap( self.unwrap() / toClifford(rhs) )
9130  *
9131  * def inv(self): # <<<<<<<<<<<<<<
9132  * """
9133  * Geometric multiplicative inverse.
9134  */
9135 
9136  /* function exit code */
9137  __pyx_L1_error:;
9138  __Pyx_XDECREF(__pyx_t_1);
9139  __Pyx_XDECREF(__pyx_t_2);
9140  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9141  __pyx_r = NULL;
9142  __pyx_L0:;
9143  __Pyx_XGIVEREF(__pyx_r);
9144  __Pyx_RefNannyFinishContext();
9145  return __pyx_r;
9146  }
9147 
9148  /* "PyClical.pyx":938
9149  * return clifford().wrap( self.instance.inv() )
9150  *
9151  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9152  * """
9153  * Transform left hand side, using right hand side as a transformation.
9154  */
9155 
9156  /* Python wrapper */
9157  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9158  static char __pyx_doc_8PyClical_8clifford_50__or__[] = "\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print y|x\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); print y|exp(x)\n -{1}\n ";
9159  #if CYTHON_COMPILING_IN_CPYTHON
9160  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9161  #endif
9162  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9163  PyObject *__pyx_r = 0;
9164  __Pyx_RefNannyDeclarations
9165  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9166  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9167 
9168  /* function exit code */
9169  __Pyx_RefNannyFinishContext();
9170  return __pyx_r;
9171  }
9172 
9173  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9174  PyObject *__pyx_r = NULL;
9175  __Pyx_RefNannyDeclarations
9176  PyObject *__pyx_t_1 = NULL;
9177  PyObject *__pyx_t_2 = NULL;
9178  __Pyx_RefNannySetupContext("__or__", 0);
9179 
9180  /* "PyClical.pyx":947
9181  * -{1}
9182  * """
9183  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9184  *
9185  * def __ior__(self, rhs):
9186  */
9187  __Pyx_XDECREF(__pyx_r);
9188  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9189  __Pyx_GOTREF(__pyx_t_1);
9190  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) | __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 947, __pyx_L1_error)
9191  __Pyx_GOTREF(__pyx_t_2);
9192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9193  __pyx_r = __pyx_t_2;
9194  __pyx_t_2 = 0;
9195  goto __pyx_L0;
9196 
9197  /* "PyClical.pyx":938
9198  * return clifford().wrap( self.instance.inv() )
9199  *
9200  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9201  * """
9202  * Transform left hand side, using right hand side as a transformation.
9203  */
9204 
9205  /* function exit code */
9206  __pyx_L1_error:;
9207  __Pyx_XDECREF(__pyx_t_1);
9208  __Pyx_XDECREF(__pyx_t_2);
9209  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9210  __pyx_r = NULL;
9211  __pyx_L0:;
9212  __Pyx_XGIVEREF(__pyx_r);
9213  __Pyx_RefNannyFinishContext();
9214  return __pyx_r;
9215  }
9216 
9217  /* "PyClical.pyx":949
9218  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9219  *
9220  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9221  * """
9222  * Transform left hand side, using right hand side as a transformation.
9223  */
9224 
9225  /* Python wrapper */
9226  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9227  static char __pyx_doc_8PyClical_8clifford_52__ior__[] = "\n Transform left hand side, using right hand side as a transformation.\n\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=x; print y\n -{1}\n >>> x=clifford(\"{1,2}\") * pi/2; y=clifford(\"{1}\"); y|=exp(x); print y\n -{1}\n ";
9228  #if CYTHON_COMPILING_IN_CPYTHON
9229  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9230  #endif
9231  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9232  PyObject *__pyx_r = 0;
9233  __Pyx_RefNannyDeclarations
9234  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9235  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9236 
9237  /* function exit code */
9238  __Pyx_RefNannyFinishContext();
9239  return __pyx_r;
9240  }
9241 
9242  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9243  PyObject *__pyx_r = NULL;
9244  __Pyx_RefNannyDeclarations
9245  PyObject *__pyx_t_1 = NULL;
9246  __Pyx_RefNannySetupContext("__ior__", 0);
9247 
9248  /* "PyClical.pyx":958
9249  * -{1}
9250  * """
9251  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9252  *
9253  * def __pow__(self, m, dummy):
9254  */
9255  __Pyx_XDECREF(__pyx_r);
9256  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(__pyx_v_self, (__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self) | __pyx_f_8PyClical_toClifford(__pyx_v_rhs))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
9257  __Pyx_GOTREF(__pyx_t_1);
9258  __pyx_r = __pyx_t_1;
9259  __pyx_t_1 = 0;
9260  goto __pyx_L0;
9261 
9262  /* "PyClical.pyx":949
9263  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9264  *
9265  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9266  * """
9267  * Transform left hand side, using right hand side as a transformation.
9268  */
9269 
9270  /* function exit code */
9271  __pyx_L1_error:;
9272  __Pyx_XDECREF(__pyx_t_1);
9273  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9274  __pyx_r = NULL;
9275  __pyx_L0:;
9276  __Pyx_XGIVEREF(__pyx_r);
9277  __Pyx_RefNannyFinishContext();
9278  return __pyx_r;
9279  }
9280 
9281  /* "PyClical.pyx":960
9282  * return self.wrap( self.unwrap() | toClifford(rhs) )
9283  *
9284  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9285  * """
9286  * Power: self to the m.
9287  */
9288 
9289  /* Python wrapper */
9290  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9291  static char __pyx_doc_8PyClical_8clifford_54__pow__[] = "\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print x ** 2\n 1\n >>> x=clifford(\"2\"); print x ** 2\n 4\n >>> x=clifford(\"2+{1}\"); print x ** 0\n 1\n >>> x=clifford(\"2+{1}\"); print x ** 1\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print x ** 2\n 5+4{1}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * (i ** i)\n 1\n ";
9292  #if CYTHON_COMPILING_IN_CPYTHON
9293  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9294  #endif
9295  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9296  PyObject *__pyx_r = 0;
9297  __Pyx_RefNannyDeclarations
9298  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9299  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9300 
9301  /* function exit code */
9302  __Pyx_RefNannyFinishContext();
9303  return __pyx_r;
9304  }
9305 
9306  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9307  PyObject *__pyx_r = NULL;
9308  __Pyx_RefNannyDeclarations
9309  PyObject *__pyx_t_1 = NULL;
9310  __Pyx_RefNannySetupContext("__pow__", 0);
9311 
9312  /* "PyClical.pyx":977
9313  * 1
9314  * """
9315  * return pow(self, m) # <<<<<<<<<<<<<<
9316  *
9317  * def pow(self, m):
9318  */
9319  __Pyx_XDECREF(__pyx_r);
9320  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_self, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
9321  __Pyx_GOTREF(__pyx_t_1);
9322  __pyx_r = __pyx_t_1;
9323  __pyx_t_1 = 0;
9324  goto __pyx_L0;
9325 
9326  /* "PyClical.pyx":960
9327  * return self.wrap( self.unwrap() | toClifford(rhs) )
9328  *
9329  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9330  * """
9331  * Power: self to the m.
9332  */
9333 
9334  /* function exit code */
9335  __pyx_L1_error:;
9336  __Pyx_XDECREF(__pyx_t_1);
9337  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9338  __pyx_r = NULL;
9339  __pyx_L0:;
9340  __Pyx_XGIVEREF(__pyx_r);
9341  __Pyx_RefNannyFinishContext();
9342  return __pyx_r;
9343  }
9344 
9345  /* "PyClical.pyx":979
9346  * return pow(self, m)
9347  *
9348  * def pow(self, m): # <<<<<<<<<<<<<<
9349  * """
9350  * Power: self to the m.
9351  */
9352 
9353  /* Python wrapper */
9354  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9355  static char __pyx_doc_8PyClical_8clifford_56pow[] = "\n Power: self to the m.\n\n >>> x=clifford(\"{1}\"); print x.pow(2)\n 1\n >>> x=clifford(\"2\"); print x.pow(2)\n 4\n >>> x=clifford(\"2+{1}\"); print x.pow(0)\n 1\n >>> x=clifford(\"2+{1}\"); print x.pow(1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print x.pow(2)\n 5+4{1}\n >>> print clifford(\"1+{1}+{1,2}\").pow(3)\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * i.pow(i)\n 1\n ";
9356  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9357  PyObject *__pyx_r = 0;
9358  __Pyx_RefNannyDeclarations
9359  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9360  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9361 
9362  /* function exit code */
9363  __Pyx_RefNannyFinishContext();
9364  return __pyx_r;
9365  }
9366 
9367  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9368  PyObject *__pyx_r = NULL;
9369  __Pyx_RefNannyDeclarations
9370  PyObject *__pyx_t_1 = NULL;
9371  PyObject *__pyx_t_2 = NULL;
9372  int __pyx_t_3;
9373  int __pyx_t_4;
9374  int __pyx_t_5;
9375  __Pyx_RefNannySetupContext("pow", 0);
9376 
9377  /* "PyClical.pyx":998
9378  * 1
9379  * """
9380  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9381  * return clifford().wrap( self.instance.pow(m) )
9382  * else:
9383  */
9384  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9385  __Pyx_GOTREF(__pyx_t_1);
9386  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Integral); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
9387  __Pyx_GOTREF(__pyx_t_2);
9388  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9389  __pyx_t_3 = PyObject_IsInstance(__pyx_v_m, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 998, __pyx_L1_error)
9390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9391  __pyx_t_4 = (__pyx_t_3 != 0);
9392  if (__pyx_t_4) {
9393 
9394  /* "PyClical.pyx":999
9395  * """
9396  * if isinstance(m, numbers.Integral):
9397  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9398  * else:
9399  * return exp(m * log(self))
9400  */
9401  __Pyx_XDECREF(__pyx_r);
9402  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9403  __Pyx_GOTREF(__pyx_t_2);
9404  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L1_error)
9405  __pyx_t_1 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_2), __pyx_v_self->instance->pow(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
9406  __Pyx_GOTREF(__pyx_t_1);
9407  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9408  __pyx_r = __pyx_t_1;
9409  __pyx_t_1 = 0;
9410  goto __pyx_L0;
9411 
9412  /* "PyClical.pyx":998
9413  * 1
9414  * """
9415  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9416  * return clifford().wrap( self.instance.pow(m) )
9417  * else:
9418  */
9419  }
9420 
9421  /* "PyClical.pyx":1001
9422  * return clifford().wrap( self.instance.pow(m) )
9423  * else:
9424  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9425  *
9426  * def outer_pow(self, m):
9427  */
9428  /*else*/ {
9429  __Pyx_XDECREF(__pyx_r);
9430  __pyx_t_1 = __pyx_f_8PyClical_log(((PyObject *)__pyx_v_self), 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9431  __Pyx_GOTREF(__pyx_t_1);
9432  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9433  __Pyx_GOTREF(__pyx_t_2);
9434  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9435  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9436  __Pyx_GOTREF(__pyx_t_1);
9437  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9438  __pyx_r = __pyx_t_1;
9439  __pyx_t_1 = 0;
9440  goto __pyx_L0;
9441  }
9442 
9443  /* "PyClical.pyx":979
9444  * return pow(self, m)
9445  *
9446  * def pow(self, m): # <<<<<<<<<<<<<<
9447  * """
9448  * Power: self to the m.
9449  */
9450 
9451  /* function exit code */
9452  __pyx_L1_error:;
9453  __Pyx_XDECREF(__pyx_t_1);
9454  __Pyx_XDECREF(__pyx_t_2);
9455  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9456  __pyx_r = NULL;
9457  __pyx_L0:;
9458  __Pyx_XGIVEREF(__pyx_r);
9459  __Pyx_RefNannyFinishContext();
9460  return __pyx_r;
9461  }
9462 
9463  /* "PyClical.pyx":1003
9464  * return exp(m * log(self))
9465  *
9466  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9467  * """
9468  * Outer product power.
9469  */
9470 
9471  /* Python wrapper */
9472  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9473  static char __pyx_doc_8PyClical_8clifford_58outer_pow[] = "\n Outer product power.\n\n >>> x=clifford(\"2+{1}\"); print x.outer_pow(0)\n 1\n >>> x=clifford(\"2+{1}\"); print x.outer_pow(1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print x.outer_pow(2)\n 4+4{1}\n >>> print clifford(\"1+{1}+{1,2}\").outer_pow(3)\n 1+3{1}+3{1,2}\n\n ";
9474  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9475  PyObject *__pyx_r = 0;
9476  __Pyx_RefNannyDeclarations
9477  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9478  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9479 
9480  /* function exit code */
9481  __Pyx_RefNannyFinishContext();
9482  return __pyx_r;
9483  }
9484 
9485  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9486  PyObject *__pyx_r = NULL;
9487  __Pyx_RefNannyDeclarations
9488  PyObject *__pyx_t_1 = NULL;
9489  int __pyx_t_2;
9490  PyObject *__pyx_t_3 = NULL;
9491  __Pyx_RefNannySetupContext("outer_pow", 0);
9492 
9493  /* "PyClical.pyx":1017
9494  *
9495  * """
9496  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9497  *
9498  * def __call__(self, grade):
9499  */
9500  __Pyx_XDECREF(__pyx_r);
9501  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9502  __Pyx_GOTREF(__pyx_t_1);
9503  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L1_error)
9504  __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->outer_pow(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1017, __pyx_L1_error)
9505  __Pyx_GOTREF(__pyx_t_3);
9506  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9507  __pyx_r = __pyx_t_3;
9508  __pyx_t_3 = 0;
9509  goto __pyx_L0;
9510 
9511  /* "PyClical.pyx":1003
9512  * return exp(m * log(self))
9513  *
9514  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9515  * """
9516  * Outer product power.
9517  */
9518 
9519  /* function exit code */
9520  __pyx_L1_error:;
9521  __Pyx_XDECREF(__pyx_t_1);
9522  __Pyx_XDECREF(__pyx_t_3);
9523  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9524  __pyx_r = NULL;
9525  __pyx_L0:;
9526  __Pyx_XGIVEREF(__pyx_r);
9527  __Pyx_RefNannyFinishContext();
9528  return __pyx_r;
9529  }
9530 
9531  /* "PyClical.pyx":1019
9532  * return clifford().wrap( self.instance.outer_pow(m) )
9533  *
9534  * def __call__(self, grade): # <<<<<<<<<<<<<<
9535  * """
9536  * Pure grade-vector part.
9537  */
9538 
9539  /* Python wrapper */
9540  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9541  static char __pyx_doc_8PyClical_8clifford_60__call__[] = "\n Pure grade-vector part.\n\n >>> print clifford(\"{1}\")(1)\n {1}\n >>> print clifford(\"{1}\")(0)\n 0\n >>> print clifford(\"1+{1}+{1,2}\")(0)\n 1\n >>> print clifford(\"1+{1}+{1,2}\")(1)\n {1}\n >>> print clifford(\"1+{1}+{1,2}\")(2)\n {1,2}\n >>> print clifford(\"1+{1}+{1,2}\")(3)\n 0\n ";
9542  #if CYTHON_COMPILING_IN_CPYTHON
9543  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9544  #endif
9545  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9546  PyObject *__pyx_v_grade = 0;
9547  PyObject *__pyx_r = 0;
9548  __Pyx_RefNannyDeclarations
9549  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9550  {
9551  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9552  PyObject* values[1] = {0};
9553  if (unlikely(__pyx_kwds)) {
9554  Py_ssize_t kw_args;
9555  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9556  switch (pos_args) {
9557  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9558  CYTHON_FALLTHROUGH;
9559  case 0: break;
9560  default: goto __pyx_L5_argtuple_error;
9561  }
9562  kw_args = PyDict_Size(__pyx_kwds);
9563  switch (pos_args) {
9564  case 0:
9565  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9566  else goto __pyx_L5_argtuple_error;
9567  }
9568  if (unlikely(kw_args > 0)) {
9569  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9570  }
9571  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9572  goto __pyx_L5_argtuple_error;
9573  } else {
9574  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9575  }
9576  __pyx_v_grade = values[0];
9577  }
9578  goto __pyx_L4_argument_unpacking_done;
9579  __pyx_L5_argtuple_error:;
9580  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9581  __pyx_L3_error:;
9582  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9583  __Pyx_RefNannyFinishContext();
9584  return NULL;
9585  __pyx_L4_argument_unpacking_done:;
9586  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9587 
9588  /* function exit code */
9589  __Pyx_RefNannyFinishContext();
9590  return __pyx_r;
9591  }
9592 
9593  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9594  PyObject *__pyx_r = NULL;
9595  __Pyx_RefNannyDeclarations
9596  PyObject *__pyx_t_1 = NULL;
9597  int __pyx_t_2;
9598  PyObject *__pyx_t_3 = NULL;
9599  __Pyx_RefNannySetupContext("__call__", 0);
9600 
9601  /* "PyClical.pyx":1036
9602  * 0
9603  * """
9604  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9605  *
9606  * def scalar(self):
9607  */
9608  __Pyx_XDECREF(__pyx_r);
9609  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9610  __Pyx_GOTREF(__pyx_t_1);
9611  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_grade); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1036, __pyx_L1_error)
9612  __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->operator()(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
9613  __Pyx_GOTREF(__pyx_t_3);
9614  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9615  __pyx_r = __pyx_t_3;
9616  __pyx_t_3 = 0;
9617  goto __pyx_L0;
9618 
9619  /* "PyClical.pyx":1019
9620  * return clifford().wrap( self.instance.outer_pow(m) )
9621  *
9622  * def __call__(self, grade): # <<<<<<<<<<<<<<
9623  * """
9624  * Pure grade-vector part.
9625  */
9626 
9627  /* function exit code */
9628  __pyx_L1_error:;
9629  __Pyx_XDECREF(__pyx_t_1);
9630  __Pyx_XDECREF(__pyx_t_3);
9631  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9632  __pyx_r = NULL;
9633  __pyx_L0:;
9634  __Pyx_XGIVEREF(__pyx_r);
9635  __Pyx_RefNannyFinishContext();
9636  return __pyx_r;
9637  }
9638 
9639  /* "PyClical.pyx":1038
9640  * return clifford().wrap( self.instance.call(grade) )
9641  *
9642  * def scalar(self): # <<<<<<<<<<<<<<
9643  * """
9644  * Scalar part.
9645  */
9646 
9647  /* Python wrapper */
9648  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9649  static char __pyx_doc_8PyClical_8clifford_62scalar[] = "\n Scalar part.\n\n >>> clifford(\"1+{1}+{1,2}\").scalar()\n 1.0\n >>> clifford(\"{1,2}\").scalar()\n 0.0\n ";
9650  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9651  PyObject *__pyx_r = 0;
9652  __Pyx_RefNannyDeclarations
9653  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9654  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9655 
9656  /* function exit code */
9657  __Pyx_RefNannyFinishContext();
9658  return __pyx_r;
9659  }
9660 
9661  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9662  PyObject *__pyx_r = NULL;
9663  __Pyx_RefNannyDeclarations
9664  PyObject *__pyx_t_1 = NULL;
9665  __Pyx_RefNannySetupContext("scalar", 0);
9666 
9667  /* "PyClical.pyx":1047
9668  * 0.0
9669  * """
9670  * return self.instance.scalar() # <<<<<<<<<<<<<<
9671  *
9672  * def pure(self):
9673  */
9674  __Pyx_XDECREF(__pyx_r);
9675  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9676  __Pyx_GOTREF(__pyx_t_1);
9677  __pyx_r = __pyx_t_1;
9678  __pyx_t_1 = 0;
9679  goto __pyx_L0;
9680 
9681  /* "PyClical.pyx":1038
9682  * return clifford().wrap( self.instance.call(grade) )
9683  *
9684  * def scalar(self): # <<<<<<<<<<<<<<
9685  * """
9686  * Scalar part.
9687  */
9688 
9689  /* function exit code */
9690  __pyx_L1_error:;
9691  __Pyx_XDECREF(__pyx_t_1);
9692  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9693  __pyx_r = NULL;
9694  __pyx_L0:;
9695  __Pyx_XGIVEREF(__pyx_r);
9696  __Pyx_RefNannyFinishContext();
9697  return __pyx_r;
9698  }
9699 
9700  /* "PyClical.pyx":1049
9701  * return self.instance.scalar()
9702  *
9703  * def pure(self): # <<<<<<<<<<<<<<
9704  * """
9705  * Pure part.
9706  */
9707 
9708  /* Python wrapper */
9709  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9710  static char __pyx_doc_8PyClical_8clifford_64pure[] = "\n Pure part.\n\n >>> print clifford(\"1+{1}+{1,2}\").pure()\n {1}+{1,2}\n >>> print clifford(\"{1,2}\").pure()\n {1,2}\n ";
9711  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9712  PyObject *__pyx_r = 0;
9713  __Pyx_RefNannyDeclarations
9714  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9715  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9716 
9717  /* function exit code */
9718  __Pyx_RefNannyFinishContext();
9719  return __pyx_r;
9720  }
9721 
9722  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9723  PyObject *__pyx_r = NULL;
9724  __Pyx_RefNannyDeclarations
9725  PyObject *__pyx_t_1 = NULL;
9726  PyObject *__pyx_t_2 = NULL;
9727  __Pyx_RefNannySetupContext("pure", 0);
9728 
9729  /* "PyClical.pyx":1058
9730  * {1,2}
9731  * """
9732  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9733  *
9734  * def even(self):
9735  */
9736  __Pyx_XDECREF(__pyx_r);
9737  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9738  __Pyx_GOTREF(__pyx_t_1);
9739  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->pure()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
9740  __Pyx_GOTREF(__pyx_t_2);
9741  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9742  __pyx_r = __pyx_t_2;
9743  __pyx_t_2 = 0;
9744  goto __pyx_L0;
9745 
9746  /* "PyClical.pyx":1049
9747  * return self.instance.scalar()
9748  *
9749  * def pure(self): # <<<<<<<<<<<<<<
9750  * """
9751  * Pure part.
9752  */
9753 
9754  /* function exit code */
9755  __pyx_L1_error:;
9756  __Pyx_XDECREF(__pyx_t_1);
9757  __Pyx_XDECREF(__pyx_t_2);
9758  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9759  __pyx_r = NULL;
9760  __pyx_L0:;
9761  __Pyx_XGIVEREF(__pyx_r);
9762  __Pyx_RefNannyFinishContext();
9763  return __pyx_r;
9764  }
9765 
9766  /* "PyClical.pyx":1060
9767  * return clifford().wrap( self.instance.pure() )
9768  *
9769  * def even(self): # <<<<<<<<<<<<<<
9770  * """
9771  * Even part of multivector, sum of even grade terms.
9772  */
9773 
9774  /* Python wrapper */
9775  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9776  static char __pyx_doc_8PyClical_8clifford_66even[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").even()\n 1+{1,2}\n ";
9777  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9778  PyObject *__pyx_r = 0;
9779  __Pyx_RefNannyDeclarations
9780  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9781  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9782 
9783  /* function exit code */
9784  __Pyx_RefNannyFinishContext();
9785  return __pyx_r;
9786  }
9787 
9788  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9789  PyObject *__pyx_r = NULL;
9790  __Pyx_RefNannyDeclarations
9791  PyObject *__pyx_t_1 = NULL;
9792  PyObject *__pyx_t_2 = NULL;
9793  __Pyx_RefNannySetupContext("even", 0);
9794 
9795  /* "PyClical.pyx":1067
9796  * 1+{1,2}
9797  * """
9798  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9799  *
9800  * def odd(self):
9801  */
9802  __Pyx_XDECREF(__pyx_r);
9803  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9804  __Pyx_GOTREF(__pyx_t_1);
9805  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->even()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
9806  __Pyx_GOTREF(__pyx_t_2);
9807  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9808  __pyx_r = __pyx_t_2;
9809  __pyx_t_2 = 0;
9810  goto __pyx_L0;
9811 
9812  /* "PyClical.pyx":1060
9813  * return clifford().wrap( self.instance.pure() )
9814  *
9815  * def even(self): # <<<<<<<<<<<<<<
9816  * """
9817  * Even part of multivector, sum of even grade terms.
9818  */
9819 
9820  /* function exit code */
9821  __pyx_L1_error:;
9822  __Pyx_XDECREF(__pyx_t_1);
9823  __Pyx_XDECREF(__pyx_t_2);
9824  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9825  __pyx_r = NULL;
9826  __pyx_L0:;
9827  __Pyx_XGIVEREF(__pyx_r);
9828  __Pyx_RefNannyFinishContext();
9829  return __pyx_r;
9830  }
9831 
9832  /* "PyClical.pyx":1069
9833  * return clifford().wrap( self.instance.even() )
9834  *
9835  * def odd(self): # <<<<<<<<<<<<<<
9836  * """
9837  * Odd part of multivector, sum of odd grade terms.
9838  */
9839 
9840  /* Python wrapper */
9841  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9842  static char __pyx_doc_8PyClical_8clifford_68odd[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print clifford(\"1+{1}+{1,2}\").odd()\n {1}\n ";
9843  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9844  PyObject *__pyx_r = 0;
9845  __Pyx_RefNannyDeclarations
9846  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9847  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9848 
9849  /* function exit code */
9850  __Pyx_RefNannyFinishContext();
9851  return __pyx_r;
9852  }
9853 
9854  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9855  PyObject *__pyx_r = NULL;
9856  __Pyx_RefNannyDeclarations
9857  PyObject *__pyx_t_1 = NULL;
9858  PyObject *__pyx_t_2 = NULL;
9859  __Pyx_RefNannySetupContext("odd", 0);
9860 
9861  /* "PyClical.pyx":1076
9862  * {1}
9863  * """
9864  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9865  *
9866  * def vector_part(self, frm = None):
9867  */
9868  __Pyx_XDECREF(__pyx_r);
9869  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9870  __Pyx_GOTREF(__pyx_t_1);
9871  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->odd()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error)
9872  __Pyx_GOTREF(__pyx_t_2);
9873  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9874  __pyx_r = __pyx_t_2;
9875  __pyx_t_2 = 0;
9876  goto __pyx_L0;
9877 
9878  /* "PyClical.pyx":1069
9879  * return clifford().wrap( self.instance.even() )
9880  *
9881  * def odd(self): # <<<<<<<<<<<<<<
9882  * """
9883  * Odd part of multivector, sum of odd grade terms.
9884  */
9885 
9886  /* function exit code */
9887  __pyx_L1_error:;
9888  __Pyx_XDECREF(__pyx_t_1);
9889  __Pyx_XDECREF(__pyx_t_2);
9890  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9891  __pyx_r = NULL;
9892  __pyx_L0:;
9893  __Pyx_XGIVEREF(__pyx_r);
9894  __Pyx_RefNannyFinishContext();
9895  return __pyx_r;
9896  }
9897 
9898  /* "PyClical.pyx":1078
9899  * return clifford().wrap( self.instance.odd() )
9900  *
9901  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9902  * """
9903  * Vector part of multivector, as a Python list, with respect to frm.
9904  */
9905 
9906  /* Python wrapper */
9907  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9908  static char __pyx_doc_8PyClical_8clifford_70vector_part[] = "\n Vector part of multivector, as a Python list, with respect to frm.\n\n >>> print clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part()\n [2.0, 3.0]\n >>> print clifford(\"1+2{1}+3{2}+4{1,2}\").vector_part(index_set({-1,1,2}))\n [0.0, 2.0, 3.0]\n ";
9909  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9910  PyObject *__pyx_v_frm = 0;
9911  PyObject *__pyx_r = 0;
9912  __Pyx_RefNannyDeclarations
9913  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9914  {
9915  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9916  PyObject* values[1] = {0};
9917  values[0] = ((PyObject *)Py_None);
9918  if (unlikely(__pyx_kwds)) {
9919  Py_ssize_t kw_args;
9920  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9921  switch (pos_args) {
9922  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9923  CYTHON_FALLTHROUGH;
9924  case 0: break;
9925  default: goto __pyx_L5_argtuple_error;
9926  }
9927  kw_args = PyDict_Size(__pyx_kwds);
9928  switch (pos_args) {
9929  case 0:
9930  if (kw_args > 0) {
9931  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9932  if (value) { values[0] = value; kw_args--; }
9933  }
9934  }
9935  if (unlikely(kw_args > 0)) {
9936  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9937  }
9938  } else {
9939  switch (PyTuple_GET_SIZE(__pyx_args)) {
9940  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9941  CYTHON_FALLTHROUGH;
9942  case 0: break;
9943  default: goto __pyx_L5_argtuple_error;
9944  }
9945  }
9946  __pyx_v_frm = values[0];
9947  }
9948  goto __pyx_L4_argument_unpacking_done;
9949  __pyx_L5_argtuple_error:;
9950  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9951  __pyx_L3_error:;
9952  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9953  __Pyx_RefNannyFinishContext();
9954  return NULL;
9955  __pyx_L4_argument_unpacking_done:;
9956  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9957 
9958  /* function exit code */
9959  __Pyx_RefNannyFinishContext();
9960  return __pyx_r;
9961  }
9962 
9963  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9964  PyObject *__pyx_v_error_msg_prefix = NULL;
9965  std::vector<scalar_t> __pyx_v_vec;
9966  int __pyx_v_n;
9967  int __pyx_v_i;
9968  PyObject *__pyx_v_lst = NULL;
9969  PyObject *__pyx_v_err = NULL;
9970  PyObject *__pyx_r = NULL;
9971  __Pyx_RefNannyDeclarations
9972  PyObject *__pyx_t_1 = NULL;
9973  PyObject *__pyx_t_2 = NULL;
9974  PyObject *__pyx_t_3 = NULL;
9975  int __pyx_t_4;
9976  int __pyx_t_5;
9977  std::vector<scalar_t> __pyx_t_6;
9978  PyObject *__pyx_t_7 = NULL;
9979  int __pyx_t_8;
9980  int __pyx_t_9;
9981  PyObject *__pyx_t_10 = NULL;
9982  PyObject *__pyx_t_11 = NULL;
9983  PyObject *__pyx_t_12 = NULL;
9984  PyObject *__pyx_t_13 = NULL;
9985  PyObject *__pyx_t_14 = NULL;
9986  __Pyx_RefNannySetupContext("vector_part", 0);
9987 
9988  /* "PyClical.pyx":1087
9989  * [0.0, 2.0, 3.0]
9990  * """
9991  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9992  * cdef vector[scalar_t] vec
9993  * cdef int n
9994  */
9995  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9996  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9997 
9998  /* "PyClical.pyx":1091
9999  * cdef int n
10000  * cdef int i
10001  * try: # <<<<<<<<<<<<<<
10002  * if frm is None:
10003  * vec = self.instance.vector_part()
10004  */
10005  {
10006  __Pyx_PyThreadState_declare
10007  __Pyx_PyThreadState_assign
10008  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10009  __Pyx_XGOTREF(__pyx_t_1);
10010  __Pyx_XGOTREF(__pyx_t_2);
10011  __Pyx_XGOTREF(__pyx_t_3);
10012  /*try:*/ {
10013 
10014  /* "PyClical.pyx":1092
10015  * cdef int i
10016  * try:
10017  * if frm is None: # <<<<<<<<<<<<<<
10018  * vec = self.instance.vector_part()
10019  * else:
10020  */
10021  __pyx_t_4 = (__pyx_v_frm == Py_None);
10022  __pyx_t_5 = (__pyx_t_4 != 0);
10023  if (__pyx_t_5) {
10024 
10025  /* "PyClical.pyx":1093
10026  * try:
10027  * if frm is None:
10028  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10029  * else:
10030  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10031  */
10032  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10033  __pyx_v_vec = __pyx_t_6;
10034 
10035  /* "PyClical.pyx":1092
10036  * cdef int i
10037  * try:
10038  * if frm is None: # <<<<<<<<<<<<<<
10039  * vec = self.instance.vector_part()
10040  * else:
10041  */
10042  goto __pyx_L9;
10043  }
10044 
10045  /* "PyClical.pyx":1095
10046  * vec = self.instance.vector_part()
10047  * else:
10048  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10049  * n = vec.size()
10050  * lst = [0.0]*n
10051  */
10052  /*else*/ {
10053  try {
10054  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10055  } catch(...) {
10056  __Pyx_CppExn2PyErr();
10057  __PYX_ERR(0, 1095, __pyx_L3_error)
10058  }
10059  __pyx_v_vec = __pyx_t_6;
10060  }
10061  __pyx_L9:;
10062 
10063  /* "PyClical.pyx":1096
10064  * else:
10065  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10066  * n = vec.size() # <<<<<<<<<<<<<<
10067  * lst = [0.0]*n
10068  * for i in xrange(n):
10069  */
10070  __pyx_v_n = __pyx_v_vec.size();
10071 
10072  /* "PyClical.pyx":1097
10073  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10074  * n = vec.size()
10075  * lst = [0.0]*n # <<<<<<<<<<<<<<
10076  * for i in xrange(n):
10077  * lst[i] = vec[i]
10078  */
10079  __pyx_t_7 = PyList_New(1 * ((__pyx_v_n<0) ? 0:__pyx_v_n)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1097, __pyx_L3_error)
10080  __Pyx_GOTREF(__pyx_t_7);
10081  { Py_ssize_t __pyx_temp;
10082  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10083  __Pyx_INCREF(__pyx_float_0_0);
10084  __Pyx_GIVEREF(__pyx_float_0_0);
10085  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10086  }
10087  }
10088  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10089  __pyx_t_7 = 0;
10090 
10091  /* "PyClical.pyx":1098
10092  * n = vec.size()
10093  * lst = [0.0]*n
10094  * for i in xrange(n): # <<<<<<<<<<<<<<
10095  * lst[i] = vec[i]
10096  * return lst
10097  */
10098  __pyx_t_8 = __pyx_v_n;
10099  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
10100  __pyx_v_i = __pyx_t_9;
10101 
10102  /* "PyClical.pyx":1099
10103  * lst = [0.0]*n
10104  * for i in xrange(n):
10105  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10106  * return lst
10107  * except RuntimeError as err:
10108  */
10109  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10110  __Pyx_GOTREF(__pyx_t_7);
10111  if (unlikely(__Pyx_SetItemInt(__pyx_v_lst, __pyx_v_i, __pyx_t_7, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(0, 1099, __pyx_L3_error)
10112  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10113  }
10114 
10115  /* "PyClical.pyx":1100
10116  * for i in xrange(n):
10117  * lst[i] = vec[i]
10118  * return lst # <<<<<<<<<<<<<<
10119  * except RuntimeError as err:
10120  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10121  */
10122  __Pyx_XDECREF(__pyx_r);
10123  __Pyx_INCREF(__pyx_v_lst);
10124  __pyx_r = __pyx_v_lst;
10125  goto __pyx_L7_try_return;
10126 
10127  /* "PyClical.pyx":1091
10128  * cdef int n
10129  * cdef int i
10130  * try: # <<<<<<<<<<<<<<
10131  * if frm is None:
10132  * vec = self.instance.vector_part()
10133  */
10134  }
10135  __pyx_L3_error:;
10136  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10137 
10138  /* "PyClical.pyx":1101
10139  * lst[i] = vec[i]
10140  * return lst
10141  * except RuntimeError as err: # <<<<<<<<<<<<<<
10142  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10143  * + repr(frm) + " as frame:\n\t"
10144  */
10145  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10146  if (__pyx_t_8) {
10147  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10148  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10149  __Pyx_GOTREF(__pyx_t_7);
10150  __Pyx_GOTREF(__pyx_t_10);
10151  __Pyx_GOTREF(__pyx_t_11);
10152  __Pyx_INCREF(__pyx_t_10);
10153  __pyx_v_err = __pyx_t_10;
10154 
10155  /* "PyClical.pyx":1102
10156  * return lst
10157  * except RuntimeError as err:
10158  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10159  * + repr(frm) + " as frame:\n\t"
10160  * + str(err))
10161  */
10162  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10163  __Pyx_GOTREF(__pyx_t_12);
10164  __Pyx_INCREF(((PyObject *)__pyx_v_self));
10165  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
10166  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
10167  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10168  __Pyx_GOTREF(__pyx_t_13);
10169  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10170  __pyx_t_12 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10171  __Pyx_GOTREF(__pyx_t_12);
10172  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10173  __pyx_t_13 = PyNumber_Add(__pyx_t_12, __pyx_kp_s_using_invalid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10174  __Pyx_GOTREF(__pyx_t_13);
10175  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10176 
10177  /* "PyClical.pyx":1103
10178  * except RuntimeError as err:
10179  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10180  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10181  * + str(err))
10182  *
10183  */
10184  __pyx_t_12 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10185  __Pyx_GOTREF(__pyx_t_12);
10186  __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10187  __Pyx_GOTREF(__pyx_t_14);
10188  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10189  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10190  __pyx_t_12 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_as_frame); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10191  __Pyx_GOTREF(__pyx_t_12);
10192  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10193 
10194  /* "PyClical.pyx":1104
10195  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10196  * + repr(frm) + " as frame:\n\t"
10197  * + str(err)) # <<<<<<<<<<<<<<
10198  *
10199  * def involute(self):
10200  */
10201  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10202  __Pyx_GOTREF(__pyx_t_14);
10203  __Pyx_INCREF(__pyx_v_err);
10204  __Pyx_GIVEREF(__pyx_v_err);
10205  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
10206  __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_14, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10207  __Pyx_GOTREF(__pyx_t_13);
10208  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10209  __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10210  __Pyx_GOTREF(__pyx_t_14);
10211  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10212  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10213 
10214  /* "PyClical.pyx":1102
10215  * return lst
10216  * except RuntimeError as err:
10217  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10218  * + repr(frm) + " as frame:\n\t"
10219  * + str(err))
10220  */
10221  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10222  __Pyx_GOTREF(__pyx_t_13);
10223  __Pyx_GIVEREF(__pyx_t_14);
10224  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
10225  __pyx_t_14 = 0;
10226  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10227  __Pyx_GOTREF(__pyx_t_14);
10228  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10229  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
10230  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10231  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10232  }
10233  goto __pyx_L5_except_error;
10234  __pyx_L5_except_error:;
10235 
10236  /* "PyClical.pyx":1091
10237  * cdef int n
10238  * cdef int i
10239  * try: # <<<<<<<<<<<<<<
10240  * if frm is None:
10241  * vec = self.instance.vector_part()
10242  */
10243  __Pyx_XGIVEREF(__pyx_t_1);
10244  __Pyx_XGIVEREF(__pyx_t_2);
10245  __Pyx_XGIVEREF(__pyx_t_3);
10246  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10247  goto __pyx_L1_error;
10248  __pyx_L7_try_return:;
10249  __Pyx_XGIVEREF(__pyx_t_1);
10250  __Pyx_XGIVEREF(__pyx_t_2);
10251  __Pyx_XGIVEREF(__pyx_t_3);
10252  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10253  goto __pyx_L0;
10254  }
10255 
10256  /* "PyClical.pyx":1078
10257  * return clifford().wrap( self.instance.odd() )
10258  *
10259  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10260  * """
10261  * Vector part of multivector, as a Python list, with respect to frm.
10262  */
10263 
10264  /* function exit code */
10265  __pyx_L1_error:;
10266  __Pyx_XDECREF(__pyx_t_7);
10267  __Pyx_XDECREF(__pyx_t_10);
10268  __Pyx_XDECREF(__pyx_t_11);
10269  __Pyx_XDECREF(__pyx_t_12);
10270  __Pyx_XDECREF(__pyx_t_13);
10271  __Pyx_XDECREF(__pyx_t_14);
10272  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10273  __pyx_r = NULL;
10274  __pyx_L0:;
10275  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10276  __Pyx_XDECREF(__pyx_v_lst);
10277  __Pyx_XDECREF(__pyx_v_err);
10278  __Pyx_XGIVEREF(__pyx_r);
10279  __Pyx_RefNannyFinishContext();
10280  return __pyx_r;
10281  }
10282 
10283  /* "PyClical.pyx":1106
10284  * + str(err))
10285  *
10286  * def involute(self): # <<<<<<<<<<<<<<
10287  * """
10288  * Main involution, each {i} is replaced by -{i} in each term,
10289  */
10290 
10291  /* Python wrapper */
10292  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10293  static char __pyx_doc_8PyClical_8clifford_72involute[] = "\n Main involution, each {i} is replaced by -{i} in each term,\n eg. clifford(\"{1}\") -> -clifford(\"{1}\").\n\n >>> print clifford(\"{1}\").involute()\n -{1}\n >>> print (clifford(\"{2}\") * clifford(\"{1}\")).involute()\n -{1,2}\n >>> print (clifford(\"{1}\") * clifford(\"{2}\")).involute()\n {1,2}\n >>> print clifford(\"1+{1}+{1,2}\").involute()\n 1-{1}+{1,2}\n ";
10294  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10295  PyObject *__pyx_r = 0;
10296  __Pyx_RefNannyDeclarations
10297  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10298  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10299 
10300  /* function exit code */
10301  __Pyx_RefNannyFinishContext();
10302  return __pyx_r;
10303  }
10304 
10305  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10306  PyObject *__pyx_r = NULL;
10307  __Pyx_RefNannyDeclarations
10308  PyObject *__pyx_t_1 = NULL;
10309  PyObject *__pyx_t_2 = NULL;
10310  __Pyx_RefNannySetupContext("involute", 0);
10311 
10312  /* "PyClical.pyx":1120
10313  * 1-{1}+{1,2}
10314  * """
10315  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10316  *
10317  * def reverse(self):
10318  */
10319  __Pyx_XDECREF(__pyx_r);
10320  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10321  __Pyx_GOTREF(__pyx_t_1);
10322  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->involute()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
10323  __Pyx_GOTREF(__pyx_t_2);
10324  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10325  __pyx_r = __pyx_t_2;
10326  __pyx_t_2 = 0;
10327  goto __pyx_L0;
10328 
10329  /* "PyClical.pyx":1106
10330  * + str(err))
10331  *
10332  * def involute(self): # <<<<<<<<<<<<<<
10333  * """
10334  * Main involution, each {i} is replaced by -{i} in each term,
10335  */
10336 
10337  /* function exit code */
10338  __pyx_L1_error:;
10339  __Pyx_XDECREF(__pyx_t_1);
10340  __Pyx_XDECREF(__pyx_t_2);
10341  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10342  __pyx_r = NULL;
10343  __pyx_L0:;
10344  __Pyx_XGIVEREF(__pyx_r);
10345  __Pyx_RefNannyFinishContext();
10346  return __pyx_r;
10347  }
10348 
10349  /* "PyClical.pyx":1122
10350  * return clifford().wrap( self.instance.involute() )
10351  *
10352  * def reverse(self): # <<<<<<<<<<<<<<
10353  * """
10354  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10355  */
10356 
10357  /* Python wrapper */
10358  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10359  static char __pyx_doc_8PyClical_8clifford_74reverse[] = "\n Reversion, eg. clifford(\"{1}\")*clifford(\"{2}\") -> clifford(\"{2}\")*clifford(\"{1}\").\n\n >>> print clifford(\"{1}\").reverse()\n {1}\n >>> print (clifford(\"{2}\") * clifford(\"{1}\")).reverse()\n {1,2}\n >>> print (clifford(\"{1}\") * clifford(\"{2}\")).reverse()\n -{1,2}\n >>> print clifford(\"1+{1}+{1,2}\").reverse()\n 1+{1}-{1,2}\n ";
10360  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10361  PyObject *__pyx_r = 0;
10362  __Pyx_RefNannyDeclarations
10363  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10364  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10365 
10366  /* function exit code */
10367  __Pyx_RefNannyFinishContext();
10368  return __pyx_r;
10369  }
10370 
10371  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10372  PyObject *__pyx_r = NULL;
10373  __Pyx_RefNannyDeclarations
10374  PyObject *__pyx_t_1 = NULL;
10375  PyObject *__pyx_t_2 = NULL;
10376  __Pyx_RefNannySetupContext("reverse", 0);
10377 
10378  /* "PyClical.pyx":1135
10379  * 1+{1}-{1,2}
10380  * """
10381  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10382  *
10383  * def conj(self):
10384  */
10385  __Pyx_XDECREF(__pyx_r);
10386  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10387  __Pyx_GOTREF(__pyx_t_1);
10388  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->reverse()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
10389  __Pyx_GOTREF(__pyx_t_2);
10390  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10391  __pyx_r = __pyx_t_2;
10392  __pyx_t_2 = 0;
10393  goto __pyx_L0;
10394 
10395  /* "PyClical.pyx":1122
10396  * return clifford().wrap( self.instance.involute() )
10397  *
10398  * def reverse(self): # <<<<<<<<<<<<<<
10399  * """
10400  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10401  */
10402 
10403  /* function exit code */
10404  __pyx_L1_error:;
10405  __Pyx_XDECREF(__pyx_t_1);
10406  __Pyx_XDECREF(__pyx_t_2);
10407  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10408  __pyx_r = NULL;
10409  __pyx_L0:;
10410  __Pyx_XGIVEREF(__pyx_r);
10411  __Pyx_RefNannyFinishContext();
10412  return __pyx_r;
10413  }
10414 
10415  /* "PyClical.pyx":1137
10416  * return clifford().wrap( self.instance.reverse() )
10417  *
10418  * def conj(self): # <<<<<<<<<<<<<<
10419  * """
10420  * Conjugation, reverse o involute == involute o reverse.
10421  */
10422 
10423  /* Python wrapper */
10424  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10425  static char __pyx_doc_8PyClical_8clifford_76conj[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print (clifford(\"{1}\")).conj()\n -{1}\n >>> print (clifford(\"{2}\") * clifford(\"{1}\")).conj()\n {1,2}\n >>> print (clifford(\"{1}\") * clifford(\"{2}\")).conj()\n -{1,2}\n >>> print clifford(\"1+{1}+{1,2}\").conj()\n 1-{1}-{1,2}\n ";
10426  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10427  PyObject *__pyx_r = 0;
10428  __Pyx_RefNannyDeclarations
10429  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10430  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10431 
10432  /* function exit code */
10433  __Pyx_RefNannyFinishContext();
10434  return __pyx_r;
10435  }
10436 
10437  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10438  PyObject *__pyx_r = NULL;
10439  __Pyx_RefNannyDeclarations
10440  PyObject *__pyx_t_1 = NULL;
10441  PyObject *__pyx_t_2 = NULL;
10442  __Pyx_RefNannySetupContext("conj", 0);
10443 
10444  /* "PyClical.pyx":1150
10445  * 1-{1}-{1,2}
10446  * """
10447  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10448  *
10449  * def quad(self):
10450  */
10451  __Pyx_XDECREF(__pyx_r);
10452  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10453  __Pyx_GOTREF(__pyx_t_1);
10454  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->conj()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error)
10455  __Pyx_GOTREF(__pyx_t_2);
10456  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10457  __pyx_r = __pyx_t_2;
10458  __pyx_t_2 = 0;
10459  goto __pyx_L0;
10460 
10461  /* "PyClical.pyx":1137
10462  * return clifford().wrap( self.instance.reverse() )
10463  *
10464  * def conj(self): # <<<<<<<<<<<<<<
10465  * """
10466  * Conjugation, reverse o involute == involute o reverse.
10467  */
10468 
10469  /* function exit code */
10470  __pyx_L1_error:;
10471  __Pyx_XDECREF(__pyx_t_1);
10472  __Pyx_XDECREF(__pyx_t_2);
10473  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10474  __pyx_r = NULL;
10475  __pyx_L0:;
10476  __Pyx_XGIVEREF(__pyx_r);
10477  __Pyx_RefNannyFinishContext();
10478  return __pyx_r;
10479  }
10480 
10481  /* "PyClical.pyx":1152
10482  * return clifford().wrap( self.instance.conj() )
10483  *
10484  * def quad(self): # <<<<<<<<<<<<<<
10485  * """
10486  * Quadratic form == (rev(x)*x)(0).
10487  */
10488 
10489  /* Python wrapper */
10490  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10491  static char __pyx_doc_8PyClical_8clifford_78quad[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print clifford(\"1+{1}+{1,2}\").quad()\n 3.0\n >>> print clifford(\"1+{-1}+{1,2}+{1,2,3}\").quad()\n 2.0\n ";
10492  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10493  PyObject *__pyx_r = 0;
10494  __Pyx_RefNannyDeclarations
10495  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10496  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10497 
10498  /* function exit code */
10499  __Pyx_RefNannyFinishContext();
10500  return __pyx_r;
10501  }
10502 
10503  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10504  PyObject *__pyx_r = NULL;
10505  __Pyx_RefNannyDeclarations
10506  PyObject *__pyx_t_1 = NULL;
10507  __Pyx_RefNannySetupContext("quad", 0);
10508 
10509  /* "PyClical.pyx":1161
10510  * 2.0
10511  * """
10512  * return self.instance.quad() # <<<<<<<<<<<<<<
10513  *
10514  * def norm(self):
10515  */
10516  __Pyx_XDECREF(__pyx_r);
10517  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10518  __Pyx_GOTREF(__pyx_t_1);
10519  __pyx_r = __pyx_t_1;
10520  __pyx_t_1 = 0;
10521  goto __pyx_L0;
10522 
10523  /* "PyClical.pyx":1152
10524  * return clifford().wrap( self.instance.conj() )
10525  *
10526  * def quad(self): # <<<<<<<<<<<<<<
10527  * """
10528  * Quadratic form == (rev(x)*x)(0).
10529  */
10530 
10531  /* function exit code */
10532  __pyx_L1_error:;
10533  __Pyx_XDECREF(__pyx_t_1);
10534  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10535  __pyx_r = NULL;
10536  __pyx_L0:;
10537  __Pyx_XGIVEREF(__pyx_r);
10538  __Pyx_RefNannyFinishContext();
10539  return __pyx_r;
10540  }
10541 
10542  /* "PyClical.pyx":1163
10543  * return self.instance.quad()
10544  *
10545  * def norm(self): # <<<<<<<<<<<<<<
10546  * """
10547  * Norm == sum of squares of coordinates.
10548  */
10549 
10550  /* Python wrapper */
10551  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10552  static char __pyx_doc_8PyClical_8clifford_80norm[] = "\n Norm == sum of squares of coordinates.\n\n >>> clifford(\"1+{1}+{1,2}\").norm()\n 3.0\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").norm()\n 4.0\n ";
10553  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10554  PyObject *__pyx_r = 0;
10555  __Pyx_RefNannyDeclarations
10556  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10557  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10558 
10559  /* function exit code */
10560  __Pyx_RefNannyFinishContext();
10561  return __pyx_r;
10562  }
10563 
10564  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10565  PyObject *__pyx_r = NULL;
10566  __Pyx_RefNannyDeclarations
10567  PyObject *__pyx_t_1 = NULL;
10568  __Pyx_RefNannySetupContext("norm", 0);
10569 
10570  /* "PyClical.pyx":1172
10571  * 4.0
10572  * """
10573  * return self.instance.norm() # <<<<<<<<<<<<<<
10574  *
10575  * def abs(self):
10576  */
10577  __Pyx_XDECREF(__pyx_r);
10578  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10579  __Pyx_GOTREF(__pyx_t_1);
10580  __pyx_r = __pyx_t_1;
10581  __pyx_t_1 = 0;
10582  goto __pyx_L0;
10583 
10584  /* "PyClical.pyx":1163
10585  * return self.instance.quad()
10586  *
10587  * def norm(self): # <<<<<<<<<<<<<<
10588  * """
10589  * Norm == sum of squares of coordinates.
10590  */
10591 
10592  /* function exit code */
10593  __pyx_L1_error:;
10594  __Pyx_XDECREF(__pyx_t_1);
10595  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10596  __pyx_r = NULL;
10597  __pyx_L0:;
10598  __Pyx_XGIVEREF(__pyx_r);
10599  __Pyx_RefNannyFinishContext();
10600  return __pyx_r;
10601  }
10602 
10603  /* "PyClical.pyx":1174
10604  * return self.instance.norm()
10605  *
10606  * def abs(self): # <<<<<<<<<<<<<<
10607  * """
10608  * Absolute value: square root of norm.
10609  */
10610 
10611  /* Python wrapper */
10612  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10613  static char __pyx_doc_8PyClical_8clifford_82abs[] = "\n Absolute value: square root of norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").abs()\n 2.0\n ";
10614  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10615  PyObject *__pyx_r = 0;
10616  __Pyx_RefNannyDeclarations
10617  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10618  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10619 
10620  /* function exit code */
10621  __Pyx_RefNannyFinishContext();
10622  return __pyx_r;
10623  }
10624 
10625  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10626  PyObject *__pyx_r = NULL;
10627  __Pyx_RefNannyDeclarations
10628  PyObject *__pyx_t_1 = NULL;
10629  __Pyx_RefNannySetupContext("abs", 0);
10630 
10631  /* "PyClical.pyx":1181
10632  * 2.0
10633  * """
10634  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10635  *
10636  * def max_abs(self):
10637  */
10638  __Pyx_XDECREF(__pyx_r);
10639  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error)
10640  __Pyx_GOTREF(__pyx_t_1);
10641  __pyx_r = __pyx_t_1;
10642  __pyx_t_1 = 0;
10643  goto __pyx_L0;
10644 
10645  /* "PyClical.pyx":1174
10646  * return self.instance.norm()
10647  *
10648  * def abs(self): # <<<<<<<<<<<<<<
10649  * """
10650  * Absolute value: square root of norm.
10651  */
10652 
10653  /* function exit code */
10654  __pyx_L1_error:;
10655  __Pyx_XDECREF(__pyx_t_1);
10656  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10657  __pyx_r = NULL;
10658  __pyx_L0:;
10659  __Pyx_XGIVEREF(__pyx_r);
10660  __Pyx_RefNannyFinishContext();
10661  return __pyx_r;
10662  }
10663 
10664  /* "PyClical.pyx":1183
10665  * return glucat.abs( self.unwrap() )
10666  *
10667  * def max_abs(self): # <<<<<<<<<<<<<<
10668  * """
10669  * Maximum of absolute values of components of multivector: multivector infinity norm.
10670  */
10671 
10672  /* Python wrapper */
10673  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10674  static char __pyx_doc_8PyClical_8clifford_84max_abs[] = "\n Maximum of absolute values of components of multivector: multivector infinity norm.\n\n >>> clifford(\"1+{-1}+{1,2}+{1,2,3}\").max_abs()\n 1.0\n >>> clifford(\"3+2{1}+{1,2}\").max_abs()\n 3.0\n ";
10675  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10676  PyObject *__pyx_r = 0;
10677  __Pyx_RefNannyDeclarations
10678  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10679  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10680 
10681  /* function exit code */
10682  __Pyx_RefNannyFinishContext();
10683  return __pyx_r;
10684  }
10685 
10686  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10687  PyObject *__pyx_r = NULL;
10688  __Pyx_RefNannyDeclarations
10689  PyObject *__pyx_t_1 = NULL;
10690  __Pyx_RefNannySetupContext("max_abs", 0);
10691 
10692  /* "PyClical.pyx":1192
10693  * 3.0
10694  * """
10695  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10696  *
10697  * def truncated(self, limit):
10698  */
10699  __Pyx_XDECREF(__pyx_r);
10700  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10701  __Pyx_GOTREF(__pyx_t_1);
10702  __pyx_r = __pyx_t_1;
10703  __pyx_t_1 = 0;
10704  goto __pyx_L0;
10705 
10706  /* "PyClical.pyx":1183
10707  * return glucat.abs( self.unwrap() )
10708  *
10709  * def max_abs(self): # <<<<<<<<<<<<<<
10710  * """
10711  * Maximum of absolute values of components of multivector: multivector infinity norm.
10712  */
10713 
10714  /* function exit code */
10715  __pyx_L1_error:;
10716  __Pyx_XDECREF(__pyx_t_1);
10717  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10718  __pyx_r = NULL;
10719  __pyx_L0:;
10720  __Pyx_XGIVEREF(__pyx_r);
10721  __Pyx_RefNannyFinishContext();
10722  return __pyx_r;
10723  }
10724 
10725  /* "PyClical.pyx":1194
10726  * return self.instance.max_abs()
10727  *
10728  * def truncated(self, limit): # <<<<<<<<<<<<<<
10729  * """
10730  * Remove all terms of self with relative size smaller than limit.
10731  */
10732 
10733  /* Python wrapper */
10734  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10735  static char __pyx_doc_8PyClical_8clifford_86truncated[] = "\n Remove all terms of self with relative size smaller than limit.\n\n >>> clifford(\"1e8+{1}+1e-8{1,2}\").truncated(1.0e-6)\n clifford(\"100000000\")\n >>> clifford(\"1e4+{1}+1e-4{1,2}\").truncated(1.0e-6)\n clifford(\"10000+{1}\")\n ";
10736  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10737  PyObject *__pyx_r = 0;
10738  __Pyx_RefNannyDeclarations
10739  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10740  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10741 
10742  /* function exit code */
10743  __Pyx_RefNannyFinishContext();
10744  return __pyx_r;
10745  }
10746 
10747  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10748  PyObject *__pyx_r = NULL;
10749  __Pyx_RefNannyDeclarations
10750  PyObject *__pyx_t_1 = NULL;
10751  scalar_t __pyx_t_2;
10752  PyObject *__pyx_t_3 = NULL;
10753  __Pyx_RefNannySetupContext("truncated", 0);
10754 
10755  /* "PyClical.pyx":1203
10756  * clifford("10000+{1}")
10757  * """
10758  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10759  *
10760  * def isnan(self):
10761  */
10762  __Pyx_XDECREF(__pyx_r);
10763  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10764  __Pyx_GOTREF(__pyx_t_1);
10765  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_limit); if (unlikely((__pyx_t_2 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1203, __pyx_L1_error)
10766  __pyx_t_3 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), __pyx_v_self->instance->truncated(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error)
10767  __Pyx_GOTREF(__pyx_t_3);
10768  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10769  __pyx_r = __pyx_t_3;
10770  __pyx_t_3 = 0;
10771  goto __pyx_L0;
10772 
10773  /* "PyClical.pyx":1194
10774  * return self.instance.max_abs()
10775  *
10776  * def truncated(self, limit): # <<<<<<<<<<<<<<
10777  * """
10778  * Remove all terms of self with relative size smaller than limit.
10779  */
10780 
10781  /* function exit code */
10782  __pyx_L1_error:;
10783  __Pyx_XDECREF(__pyx_t_1);
10784  __Pyx_XDECREF(__pyx_t_3);
10785  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10786  __pyx_r = NULL;
10787  __pyx_L0:;
10788  __Pyx_XGIVEREF(__pyx_r);
10789  __Pyx_RefNannyFinishContext();
10790  return __pyx_r;
10791  }
10792 
10793  /* "PyClical.pyx":1205
10794  * return clifford().wrap( self.instance.truncated(limit) )
10795  *
10796  * def isnan(self): # <<<<<<<<<<<<<<
10797  * """
10798  * Check if a multivector contains any IEEE NaN values.
10799  */
10800 
10801  /* Python wrapper */
10802  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10803  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10804  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10805  PyObject *__pyx_r = 0;
10806  __Pyx_RefNannyDeclarations
10807  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10808  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10809 
10810  /* function exit code */
10811  __Pyx_RefNannyFinishContext();
10812  return __pyx_r;
10813  }
10814 
10815  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10816  PyObject *__pyx_r = NULL;
10817  __Pyx_RefNannyDeclarations
10818  PyObject *__pyx_t_1 = NULL;
10819  __Pyx_RefNannySetupContext("isnan", 0);
10820 
10821  /* "PyClical.pyx":1212
10822  * False
10823  * """
10824  * return self.instance.isnan() # <<<<<<<<<<<<<<
10825  *
10826  * def frame(self):
10827  */
10828  __Pyx_XDECREF(__pyx_r);
10829  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10830  __Pyx_GOTREF(__pyx_t_1);
10831  __pyx_r = __pyx_t_1;
10832  __pyx_t_1 = 0;
10833  goto __pyx_L0;
10834 
10835  /* "PyClical.pyx":1205
10836  * return clifford().wrap( self.instance.truncated(limit) )
10837  *
10838  * def isnan(self): # <<<<<<<<<<<<<<
10839  * """
10840  * Check if a multivector contains any IEEE NaN values.
10841  */
10842 
10843  /* function exit code */
10844  __pyx_L1_error:;
10845  __Pyx_XDECREF(__pyx_t_1);
10846  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10847  __pyx_r = NULL;
10848  __pyx_L0:;
10849  __Pyx_XGIVEREF(__pyx_r);
10850  __Pyx_RefNannyFinishContext();
10851  return __pyx_r;
10852  }
10853 
10854  /* "PyClical.pyx":1214
10855  * return self.instance.isnan()
10856  *
10857  * def frame(self): # <<<<<<<<<<<<<<
10858  * """
10859  * Subalgebra generated by all generators of terms of given multivector.
10860  */
10861 
10862  /* Python wrapper */
10863  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10864  static char __pyx_doc_8PyClical_8clifford_90frame[] = "\n Subalgebra generated by all generators of terms of given multivector.\n\n >>> print clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame()\n {-2,-1,1,2,7}\n >>> s=clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").frame(); type(s)\n <type 'PyClical.index_set'>\n ";
10865  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10866  PyObject *__pyx_r = 0;
10867  __Pyx_RefNannyDeclarations
10868  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10869  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10870 
10871  /* function exit code */
10872  __Pyx_RefNannyFinishContext();
10873  return __pyx_r;
10874  }
10875 
10876  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10877  PyObject *__pyx_r = NULL;
10878  __Pyx_RefNannyDeclarations
10879  PyObject *__pyx_t_1 = NULL;
10880  PyObject *__pyx_t_2 = NULL;
10881  __Pyx_RefNannySetupContext("frame", 0);
10882 
10883  /* "PyClical.pyx":1223
10884  * <type 'PyClical.index_set'>
10885  * """
10886  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10887  *
10888  * def __repr__(self):
10889  */
10890  __Pyx_XDECREF(__pyx_r);
10891  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10892  __Pyx_GOTREF(__pyx_t_1);
10893  __pyx_t_2 = __pyx_f_8PyClical_9index_set_wrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1), __pyx_v_self->instance->frame()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1223, __pyx_L1_error)
10894  __Pyx_GOTREF(__pyx_t_2);
10895  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10896  __pyx_r = __pyx_t_2;
10897  __pyx_t_2 = 0;
10898  goto __pyx_L0;
10899 
10900  /* "PyClical.pyx":1214
10901  * return self.instance.isnan()
10902  *
10903  * def frame(self): # <<<<<<<<<<<<<<
10904  * """
10905  * Subalgebra generated by all generators of terms of given multivector.
10906  */
10907 
10908  /* function exit code */
10909  __pyx_L1_error:;
10910  __Pyx_XDECREF(__pyx_t_1);
10911  __Pyx_XDECREF(__pyx_t_2);
10912  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10913  __pyx_r = NULL;
10914  __pyx_L0:;
10915  __Pyx_XGIVEREF(__pyx_r);
10916  __Pyx_RefNannyFinishContext();
10917  return __pyx_r;
10918  }
10919 
10920  /* "PyClical.pyx":1225
10921  * return index_set().wrap( self.instance.frame() )
10922  *
10923  * def __repr__(self): # <<<<<<<<<<<<<<
10924  * """
10925  * The official string representation of self.
10926  */
10927 
10928  /* Python wrapper */
10929  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10930  static char __pyx_doc_8PyClical_8clifford_92__repr__[] = "\n The \342\200\234official\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__repr__()\n 'clifford(\"1+3{-1}+2{1,2}+4{-2,7}\")'\n ";
10931  #if CYTHON_COMPILING_IN_CPYTHON
10932  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10933  #endif
10934  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10935  PyObject *__pyx_r = 0;
10936  __Pyx_RefNannyDeclarations
10937  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10938  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10939 
10940  /* function exit code */
10941  __Pyx_RefNannyFinishContext();
10942  return __pyx_r;
10943  }
10944 
10945  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10946  PyObject *__pyx_r = NULL;
10947  __Pyx_RefNannyDeclarations
10948  PyObject *__pyx_t_1 = NULL;
10949  __Pyx_RefNannySetupContext("__repr__", 0);
10950 
10951  /* "PyClical.pyx":1232
10952  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10953  * """
10954  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10955  *
10956  * def __str__(self):
10957  */
10958  __Pyx_XDECREF(__pyx_r);
10959  __pyx_t_1 = __Pyx_PyBytes_FromString(clifford_to_repr(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
10960  __Pyx_GOTREF(__pyx_t_1);
10961  __pyx_r = __pyx_t_1;
10962  __pyx_t_1 = 0;
10963  goto __pyx_L0;
10964 
10965  /* "PyClical.pyx":1225
10966  * return index_set().wrap( self.instance.frame() )
10967  *
10968  * def __repr__(self): # <<<<<<<<<<<<<<
10969  * """
10970  * The official string representation of self.
10971  */
10972 
10973  /* function exit code */
10974  __pyx_L1_error:;
10975  __Pyx_XDECREF(__pyx_t_1);
10976  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10977  __pyx_r = NULL;
10978  __pyx_L0:;
10979  __Pyx_XGIVEREF(__pyx_r);
10980  __Pyx_RefNannyFinishContext();
10981  return __pyx_r;
10982  }
10983 
10984  /* "PyClical.pyx":1234
10985  * return clifford_to_repr( self.unwrap() ).c_str()
10986  *
10987  * def __str__(self): # <<<<<<<<<<<<<<
10988  * """
10989  * The informal string representation of self.
10990  */
10991 
10992  /* Python wrapper */
10993  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10994  static char __pyx_doc_8PyClical_8clifford_94__str__[] = "\n The \342\200\234informal\342\200\235 string representation of self.\n\n >>> clifford(\"1+3{-1}+2{1,2}+4{-2,7}\").__str__()\n '1+3{-1}+2{1,2}+4{-2,7}'\n ";
10995  #if CYTHON_COMPILING_IN_CPYTHON
10996  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10997  #endif
10998  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10999  PyObject *__pyx_r = 0;
11000  __Pyx_RefNannyDeclarations
11001  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11002  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11003 
11004  /* function exit code */
11005  __Pyx_RefNannyFinishContext();
11006  return __pyx_r;
11007  }
11008 
11009  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11010  PyObject *__pyx_r = NULL;
11011  __Pyx_RefNannyDeclarations
11012  PyObject *__pyx_t_1 = NULL;
11013  __Pyx_RefNannySetupContext("__str__", 0);
11014 
11015  /* "PyClical.pyx":1241
11016  * '1+3{-1}+2{1,2}+4{-2,7}'
11017  * """
11018  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
11019  *
11020  * def clifford_hidden_doctests():
11021  */
11022  __Pyx_XDECREF(__pyx_r);
11023  __pyx_t_1 = __Pyx_PyBytes_FromString(clifford_to_str(__pyx_f_8PyClical_8clifford_unwrap(__pyx_v_self)).c_str()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error)
11024  __Pyx_GOTREF(__pyx_t_1);
11025  __pyx_r = __pyx_t_1;
11026  __pyx_t_1 = 0;
11027  goto __pyx_L0;
11028 
11029  /* "PyClical.pyx":1234
11030  * return clifford_to_repr( self.unwrap() ).c_str()
11031  *
11032  * def __str__(self): # <<<<<<<<<<<<<<
11033  * """
11034  * The informal string representation of self.
11035  */
11036 
11037  /* function exit code */
11038  __pyx_L1_error:;
11039  __Pyx_XDECREF(__pyx_t_1);
11040  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11041  __pyx_r = NULL;
11042  __pyx_L0:;
11043  __Pyx_XGIVEREF(__pyx_r);
11044  __Pyx_RefNannyFinishContext();
11045  return __pyx_r;
11046  }
11047 
11048  /* "(tree fragment)":1
11049  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11050  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11051  * def __setstate_cython__(self, __pyx_state):
11052  */
11053 
11054  /* Python wrapper */
11055  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11056  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11057  PyObject *__pyx_r = 0;
11058  __Pyx_RefNannyDeclarations
11059  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11060  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11061 
11062  /* function exit code */
11063  __Pyx_RefNannyFinishContext();
11064  return __pyx_r;
11065  }
11066 
11067  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11068  PyObject *__pyx_r = NULL;
11069  __Pyx_RefNannyDeclarations
11070  PyObject *__pyx_t_1 = NULL;
11071  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11072 
11073  /* "(tree fragment)":2
11074  * def __reduce_cython__(self):
11075  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11076  * def __setstate_cython__(self, __pyx_state):
11077  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11078  */
11079  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
11080  __Pyx_GOTREF(__pyx_t_1);
11081  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11082  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11083  __PYX_ERR(1, 2, __pyx_L1_error)
11084 
11085  /* "(tree fragment)":1
11086  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11087  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11088  * def __setstate_cython__(self, __pyx_state):
11089  */
11090 
11091  /* function exit code */
11092  __pyx_L1_error:;
11093  __Pyx_XDECREF(__pyx_t_1);
11094  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11095  __pyx_r = NULL;
11096  __Pyx_XGIVEREF(__pyx_r);
11097  __Pyx_RefNannyFinishContext();
11098  return __pyx_r;
11099  }
11100 
11101  /* "(tree fragment)":3
11102  * def __reduce_cython__(self):
11103  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11104  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11105  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11106  */
11107 
11108  /* Python wrapper */
11109  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11110  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11111  PyObject *__pyx_r = 0;
11112  __Pyx_RefNannyDeclarations
11113  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11114  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11115 
11116  /* function exit code */
11117  __Pyx_RefNannyFinishContext();
11118  return __pyx_r;
11119  }
11120 
11121  static PyObject *__pyx_pf_8PyClical_8clifford_98__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
11122  PyObject *__pyx_r = NULL;
11123  __Pyx_RefNannyDeclarations
11124  PyObject *__pyx_t_1 = NULL;
11125  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11126 
11127  /* "(tree fragment)":4
11128  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11129  * def __setstate_cython__(self, __pyx_state):
11130  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11131  */
11132  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
11133  __Pyx_GOTREF(__pyx_t_1);
11134  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11135  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11136  __PYX_ERR(1, 4, __pyx_L1_error)
11137 
11138  /* "(tree fragment)":3
11139  * def __reduce_cython__(self):
11140  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11141  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11142  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11143  */
11144 
11145  /* function exit code */
11146  __pyx_L1_error:;
11147  __Pyx_XDECREF(__pyx_t_1);
11148  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11149  __pyx_r = NULL;
11150  __Pyx_XGIVEREF(__pyx_r);
11151  __Pyx_RefNannyFinishContext();
11152  return __pyx_r;
11153  }
11154 
11155  /* "PyClical.pyx":1243
11156  * return clifford_to_str( self.unwrap() ).c_str()
11157  *
11158  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11159  * """
11160  * Tests for functions that Doctest cannot see.
11161  */
11162 
11163  /* Python wrapper */
11164  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11165  static char __pyx_doc_8PyClical_8clifford_hidden_doctests[] = "\n Tests for functions that Doctest cannot see.\n\n For clifford.__cinit__: Construct an object of type clifford.\n\n >>> print clifford(2)\n 2\n >>> print clifford(2L)\n 2\n >>> print clifford(2.0)\n 2\n >>> print clifford(1.0e-1)\n 0.1\n >>> print clifford(\"2\")\n 2\n >>> print clifford(\"2{1,2,3}\")\n 2{1,2,3}\n >>> print clifford(clifford(\"2{1,2,3}\"))\n 2{1,2,3}\n >>> print clifford(\"-{1}\")\n -{1}\n >>> print clifford(2,index_set({1,2}))\n 2{1,2}\n >>> print clifford([2,3],index_set({1,2}))\n 2{1}+3{2}\n >>> print clifford([1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'list'>.\n >>> print clifford(None)\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from <type 'NoneType'>.\n >>> print clifford(None,[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'NoneType'>, <type 'list'>).\n >>> print clifford([1,2],[1,2])\n Traceback (most recent call last):\n ...\n TypeError: Cannot initialize clifford object from (<type 'list'>, <type 'list'>).\n >>> print clifford(\"\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string ''.\n >>> print clifford(\"{\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{'.\n >>> print clifford(\"{1\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1'.\n >>> print clifford(\"+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '+'.\n >>> print clifford(\"-\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford"" object from invalid string '-'.\n >>> print clifford(\"{1}+\")\n Traceback (most recent call last):\n ...\n ValueError: Cannot initialize clifford object from invalid string '{1}+'.\n\n For clifford.__richcmp__: Compare objects of type clifford.\n\n >>> clifford(\"{1}\") == clifford(\"1{1}\")\n True\n >>> clifford(\"{1}\") != clifford(\"1.0{1}\")\n False\n >>> clifford(\"{1}\") != clifford(\"1.0\")\n True\n >>> clifford(\"{1,2}\") == None\n False\n >>> clifford(\"{1,2}\") != None\n True\n >>> None == clifford(\"{1,2}\")\n False\n >>> None != clifford(\"{1,2}\")\n True\n ";
11166  static PyMethodDef __pyx_mdef_8PyClical_9clifford_hidden_doctests = {"clifford_hidden_doctests", (PyCFunction)__pyx_pw_8PyClical_9clifford_hidden_doctests, METH_NOARGS, __pyx_doc_8PyClical_8clifford_hidden_doctests};
11167  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11168  PyObject *__pyx_r = 0;
11169  __Pyx_RefNannyDeclarations
11170  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11171  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11172 
11173  /* function exit code */
11174  __Pyx_RefNannyFinishContext();
11175  return __pyx_r;
11176  }
11177 
11178  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11179  PyObject *__pyx_r = NULL;
11180  __Pyx_RefNannyDeclarations
11181  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11182 
11183  /* "PyClical.pyx":1327
11184  * True
11185  * """
11186  * return # <<<<<<<<<<<<<<
11187  *
11188  * cpdef inline inv(obj):
11189  */
11190  __Pyx_XDECREF(__pyx_r);
11191  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11192  goto __pyx_L0;
11193 
11194  /* "PyClical.pyx":1243
11195  * return clifford_to_str( self.unwrap() ).c_str()
11196  *
11197  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11198  * """
11199  * Tests for functions that Doctest cannot see.
11200  */
11201 
11202  /* function exit code */
11203  __pyx_L0:;
11204  __Pyx_XGIVEREF(__pyx_r);
11205  __Pyx_RefNannyFinishContext();
11206  return __pyx_r;
11207  }
11208 
11209  /* "PyClical.pyx":1329
11210  * return
11211  *
11212  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11213  * """
11214  * Geometric multiplicative inverse.
11215  */
11216 
11217  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11218  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11219  PyObject *__pyx_r = NULL;
11220  __Pyx_RefNannyDeclarations
11221  PyObject *__pyx_t_1 = NULL;
11222  PyObject *__pyx_t_2 = NULL;
11223  PyObject *__pyx_t_3 = NULL;
11224  __Pyx_RefNannySetupContext("inv", 0);
11225 
11226  /* "PyClical.pyx":1342
11227  * nan
11228  * """
11229  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11230  *
11231  * cpdef inline scalar(obj):
11232  */
11233  __Pyx_XDECREF(__pyx_r);
11234  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
11235  __Pyx_GOTREF(__pyx_t_2);
11236  __Pyx_INCREF(__pyx_v_obj);
11237  __Pyx_GIVEREF(__pyx_v_obj);
11238  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11239  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
11240  __Pyx_GOTREF(__pyx_t_3);
11241  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11242  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
11243  __Pyx_GOTREF(__pyx_t_2);
11244  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11245  __pyx_t_3 = NULL;
11246  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11247  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11248  if (likely(__pyx_t_3)) {
11249  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11250  __Pyx_INCREF(__pyx_t_3);
11251  __Pyx_INCREF(function);
11252  __Pyx_DECREF_SET(__pyx_t_2, function);
11253  }
11254  }
11255  if (__pyx_t_3) {
11256  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11257  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11258  } else {
11259  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11260  }
11261  __Pyx_GOTREF(__pyx_t_1);
11262  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11263  __pyx_r = __pyx_t_1;
11264  __pyx_t_1 = 0;
11265  goto __pyx_L0;
11266 
11267  /* "PyClical.pyx":1329
11268  * return
11269  *
11270  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11271  * """
11272  * Geometric multiplicative inverse.
11273  */
11274 
11275  /* function exit code */
11276  __pyx_L1_error:;
11277  __Pyx_XDECREF(__pyx_t_1);
11278  __Pyx_XDECREF(__pyx_t_2);
11279  __Pyx_XDECREF(__pyx_t_3);
11280  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11281  __pyx_r = 0;
11282  __pyx_L0:;
11283  __Pyx_XGIVEREF(__pyx_r);
11284  __Pyx_RefNannyFinishContext();
11285  return __pyx_r;
11286  }
11287 
11288  /* Python wrapper */
11289  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11290  static char __pyx_doc_8PyClical_10inv[] = "\n Geometric multiplicative inverse.\n\n >>> print inv(clifford(\"{1}\"))\n {1}\n >>> print inv(clifford(\"{-1}\"))\n -{-1}\n >>> print inv(clifford(\"{-2,-1}\"))\n -{-2,-1}\n >>> print inv(clifford(\"{-1}+{1}\"))\n nan\n ";
11291  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11292  PyObject *__pyx_r = 0;
11293  __Pyx_RefNannyDeclarations
11294  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11295  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11296 
11297  /* function exit code */
11298  __Pyx_RefNannyFinishContext();
11299  return __pyx_r;
11300  }
11301 
11302  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11303  PyObject *__pyx_r = NULL;
11304  __Pyx_RefNannyDeclarations
11305  PyObject *__pyx_t_1 = NULL;
11306  __Pyx_RefNannySetupContext("inv", 0);
11307  __Pyx_XDECREF(__pyx_r);
11308  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11309  __Pyx_GOTREF(__pyx_t_1);
11310  __pyx_r = __pyx_t_1;
11311  __pyx_t_1 = 0;
11312  goto __pyx_L0;
11313 
11314  /* function exit code */
11315  __pyx_L1_error:;
11316  __Pyx_XDECREF(__pyx_t_1);
11317  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11318  __pyx_r = NULL;
11319  __pyx_L0:;
11320  __Pyx_XGIVEREF(__pyx_r);
11321  __Pyx_RefNannyFinishContext();
11322  return __pyx_r;
11323  }
11324 
11325  /* "PyClical.pyx":1344
11326  * return clifford(obj).inv()
11327  *
11328  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11329  * """
11330  * Scalar part.
11331  */
11332 
11333  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11334  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11335  PyObject *__pyx_r = NULL;
11336  __Pyx_RefNannyDeclarations
11337  PyObject *__pyx_t_1 = NULL;
11338  PyObject *__pyx_t_2 = NULL;
11339  PyObject *__pyx_t_3 = NULL;
11340  __Pyx_RefNannySetupContext("scalar", 0);
11341 
11342  /* "PyClical.pyx":1353
11343  * 0.0
11344  * """
11345  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11346  *
11347  * cpdef inline real(obj):
11348  */
11349  __Pyx_XDECREF(__pyx_r);
11350  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
11351  __Pyx_GOTREF(__pyx_t_2);
11352  __Pyx_INCREF(__pyx_v_obj);
11353  __Pyx_GIVEREF(__pyx_v_obj);
11354  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11355  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
11356  __Pyx_GOTREF(__pyx_t_3);
11357  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11358  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
11359  __Pyx_GOTREF(__pyx_t_2);
11360  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11361  __pyx_t_3 = NULL;
11362  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11363  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11364  if (likely(__pyx_t_3)) {
11365  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11366  __Pyx_INCREF(__pyx_t_3);
11367  __Pyx_INCREF(function);
11368  __Pyx_DECREF_SET(__pyx_t_2, function);
11369  }
11370  }
11371  if (__pyx_t_3) {
11372  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11374  } else {
11375  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11376  }
11377  __Pyx_GOTREF(__pyx_t_1);
11378  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11379  __pyx_r = __pyx_t_1;
11380  __pyx_t_1 = 0;
11381  goto __pyx_L0;
11382 
11383  /* "PyClical.pyx":1344
11384  * return clifford(obj).inv()
11385  *
11386  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11387  * """
11388  * Scalar part.
11389  */
11390 
11391  /* function exit code */
11392  __pyx_L1_error:;
11393  __Pyx_XDECREF(__pyx_t_1);
11394  __Pyx_XDECREF(__pyx_t_2);
11395  __Pyx_XDECREF(__pyx_t_3);
11396  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11397  __pyx_r = 0;
11398  __pyx_L0:;
11399  __Pyx_XGIVEREF(__pyx_r);
11400  __Pyx_RefNannyFinishContext();
11401  return __pyx_r;
11402  }
11403 
11404  /* Python wrapper */
11405  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11406  static char __pyx_doc_8PyClical_12scalar[] = "\n Scalar part.\n\n >>> scalar(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> scalar(clifford(\"{1,2}\"))\n 0.0\n ";
11407  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11408  PyObject *__pyx_r = 0;
11409  __Pyx_RefNannyDeclarations
11410  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11411  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11412 
11413  /* function exit code */
11414  __Pyx_RefNannyFinishContext();
11415  return __pyx_r;
11416  }
11417 
11418  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11419  PyObject *__pyx_r = NULL;
11420  __Pyx_RefNannyDeclarations
11421  PyObject *__pyx_t_1 = NULL;
11422  __Pyx_RefNannySetupContext("scalar", 0);
11423  __Pyx_XDECREF(__pyx_r);
11424  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11425  __Pyx_GOTREF(__pyx_t_1);
11426  __pyx_r = __pyx_t_1;
11427  __pyx_t_1 = 0;
11428  goto __pyx_L0;
11429 
11430  /* function exit code */
11431  __pyx_L1_error:;
11432  __Pyx_XDECREF(__pyx_t_1);
11433  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11434  __pyx_r = NULL;
11435  __pyx_L0:;
11436  __Pyx_XGIVEREF(__pyx_r);
11437  __Pyx_RefNannyFinishContext();
11438  return __pyx_r;
11439  }
11440 
11441  /* "PyClical.pyx":1355
11442  * return clifford(obj).scalar()
11443  *
11444  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11445  * """
11446  * Real part: synonym for scalar part.
11447  */
11448 
11449  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11450  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11451  PyObject *__pyx_r = NULL;
11452  __Pyx_RefNannyDeclarations
11453  PyObject *__pyx_t_1 = NULL;
11454  PyObject *__pyx_t_2 = NULL;
11455  PyObject *__pyx_t_3 = NULL;
11456  __Pyx_RefNannySetupContext("real", 0);
11457 
11458  /* "PyClical.pyx":1364
11459  * 0.0
11460  * """
11461  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11462  *
11463  * cpdef inline imag(obj):
11464  */
11465  __Pyx_XDECREF(__pyx_r);
11466  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
11467  __Pyx_GOTREF(__pyx_t_2);
11468  __Pyx_INCREF(__pyx_v_obj);
11469  __Pyx_GIVEREF(__pyx_v_obj);
11470  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11471  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
11472  __Pyx_GOTREF(__pyx_t_3);
11473  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11474  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
11475  __Pyx_GOTREF(__pyx_t_2);
11476  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11477  __pyx_t_3 = NULL;
11478  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11479  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11480  if (likely(__pyx_t_3)) {
11481  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11482  __Pyx_INCREF(__pyx_t_3);
11483  __Pyx_INCREF(function);
11484  __Pyx_DECREF_SET(__pyx_t_2, function);
11485  }
11486  }
11487  if (__pyx_t_3) {
11488  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11489  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11490  } else {
11491  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11492  }
11493  __Pyx_GOTREF(__pyx_t_1);
11494  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11495  __pyx_r = __pyx_t_1;
11496  __pyx_t_1 = 0;
11497  goto __pyx_L0;
11498 
11499  /* "PyClical.pyx":1355
11500  * return clifford(obj).scalar()
11501  *
11502  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11503  * """
11504  * Real part: synonym for scalar part.
11505  */
11506 
11507  /* function exit code */
11508  __pyx_L1_error:;
11509  __Pyx_XDECREF(__pyx_t_1);
11510  __Pyx_XDECREF(__pyx_t_2);
11511  __Pyx_XDECREF(__pyx_t_3);
11512  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11513  __pyx_r = 0;
11514  __pyx_L0:;
11515  __Pyx_XGIVEREF(__pyx_r);
11516  __Pyx_RefNannyFinishContext();
11517  return __pyx_r;
11518  }
11519 
11520  /* Python wrapper */
11521  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11522  static char __pyx_doc_8PyClical_14real[] = "\n Real part: synonym for scalar part.\n\n >>> real(clifford(\"1+{1}+{1,2}\"))\n 1.0\n >>> real(clifford(\"{1,2}\"))\n 0.0\n ";
11523  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11524  PyObject *__pyx_r = 0;
11525  __Pyx_RefNannyDeclarations
11526  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11527  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11528 
11529  /* function exit code */
11530  __Pyx_RefNannyFinishContext();
11531  return __pyx_r;
11532  }
11533 
11534  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11535  PyObject *__pyx_r = NULL;
11536  __Pyx_RefNannyDeclarations
11537  PyObject *__pyx_t_1 = NULL;
11538  __Pyx_RefNannySetupContext("real", 0);
11539  __Pyx_XDECREF(__pyx_r);
11540  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11541  __Pyx_GOTREF(__pyx_t_1);
11542  __pyx_r = __pyx_t_1;
11543  __pyx_t_1 = 0;
11544  goto __pyx_L0;
11545 
11546  /* function exit code */
11547  __pyx_L1_error:;
11548  __Pyx_XDECREF(__pyx_t_1);
11549  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11550  __pyx_r = NULL;
11551  __pyx_L0:;
11552  __Pyx_XGIVEREF(__pyx_r);
11553  __Pyx_RefNannyFinishContext();
11554  return __pyx_r;
11555  }
11556 
11557  /* "PyClical.pyx":1366
11558  * return clifford(obj).scalar()
11559  *
11560  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11561  * """
11562  * Imaginary part: deprecated (always 0).
11563  */
11564 
11565  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11566  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11567  PyObject *__pyx_r = NULL;
11568  __Pyx_RefNannyDeclarations
11569  __Pyx_RefNannySetupContext("imag", 0);
11570 
11571  /* "PyClical.pyx":1375
11572  * 0.0
11573  * """
11574  * return 0.0 # <<<<<<<<<<<<<<
11575  *
11576  * cpdef inline pure(obj):
11577  */
11578  __Pyx_XDECREF(__pyx_r);
11579  __Pyx_INCREF(__pyx_float_0_0);
11580  __pyx_r = __pyx_float_0_0;
11581  goto __pyx_L0;
11582 
11583  /* "PyClical.pyx":1366
11584  * return clifford(obj).scalar()
11585  *
11586  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11587  * """
11588  * Imaginary part: deprecated (always 0).
11589  */
11590 
11591  /* function exit code */
11592  __pyx_L0:;
11593  __Pyx_XGIVEREF(__pyx_r);
11594  __Pyx_RefNannyFinishContext();
11595  return __pyx_r;
11596  }
11597 
11598  /* Python wrapper */
11599  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11600  static char __pyx_doc_8PyClical_16imag[] = "\n Imaginary part: deprecated (always 0).\n\n >>> imag(clifford(\"1+{1}+{1,2}\"))\n 0.0\n >>> imag(clifford(\"{1,2}\"))\n 0.0\n ";
11601  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11602  PyObject *__pyx_r = 0;
11603  __Pyx_RefNannyDeclarations
11604  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11605  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11606 
11607  /* function exit code */
11608  __Pyx_RefNannyFinishContext();
11609  return __pyx_r;
11610  }
11611 
11612  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11613  PyObject *__pyx_r = NULL;
11614  __Pyx_RefNannyDeclarations
11615  PyObject *__pyx_t_1 = NULL;
11616  __Pyx_RefNannySetupContext("imag", 0);
11617  __Pyx_XDECREF(__pyx_r);
11618  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11619  __Pyx_GOTREF(__pyx_t_1);
11620  __pyx_r = __pyx_t_1;
11621  __pyx_t_1 = 0;
11622  goto __pyx_L0;
11623 
11624  /* function exit code */
11625  __pyx_L1_error:;
11626  __Pyx_XDECREF(__pyx_t_1);
11627  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11628  __pyx_r = NULL;
11629  __pyx_L0:;
11630  __Pyx_XGIVEREF(__pyx_r);
11631  __Pyx_RefNannyFinishContext();
11632  return __pyx_r;
11633  }
11634 
11635  /* "PyClical.pyx":1377
11636  * return 0.0
11637  *
11638  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11639  * """
11640  * Pure part
11641  */
11642 
11643  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11644  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11645  PyObject *__pyx_r = NULL;
11646  __Pyx_RefNannyDeclarations
11647  PyObject *__pyx_t_1 = NULL;
11648  PyObject *__pyx_t_2 = NULL;
11649  PyObject *__pyx_t_3 = NULL;
11650  __Pyx_RefNannySetupContext("pure", 0);
11651 
11652  /* "PyClical.pyx":1386
11653  * {1,2}
11654  * """
11655  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11656  *
11657  * cpdef inline even(obj):
11658  */
11659  __Pyx_XDECREF(__pyx_r);
11660  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
11661  __Pyx_GOTREF(__pyx_t_2);
11662  __Pyx_INCREF(__pyx_v_obj);
11663  __Pyx_GIVEREF(__pyx_v_obj);
11664  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11665  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error)
11666  __Pyx_GOTREF(__pyx_t_3);
11667  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11668  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pure); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
11669  __Pyx_GOTREF(__pyx_t_2);
11670  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11671  __pyx_t_3 = NULL;
11672  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11673  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11674  if (likely(__pyx_t_3)) {
11675  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11676  __Pyx_INCREF(__pyx_t_3);
11677  __Pyx_INCREF(function);
11678  __Pyx_DECREF_SET(__pyx_t_2, function);
11679  }
11680  }
11681  if (__pyx_t_3) {
11682  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11683  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11684  } else {
11685  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11686  }
11687  __Pyx_GOTREF(__pyx_t_1);
11688  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11689  __pyx_r = __pyx_t_1;
11690  __pyx_t_1 = 0;
11691  goto __pyx_L0;
11692 
11693  /* "PyClical.pyx":1377
11694  * return 0.0
11695  *
11696  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11697  * """
11698  * Pure part
11699  */
11700 
11701  /* function exit code */
11702  __pyx_L1_error:;
11703  __Pyx_XDECREF(__pyx_t_1);
11704  __Pyx_XDECREF(__pyx_t_2);
11705  __Pyx_XDECREF(__pyx_t_3);
11706  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11707  __pyx_r = 0;
11708  __pyx_L0:;
11709  __Pyx_XGIVEREF(__pyx_r);
11710  __Pyx_RefNannyFinishContext();
11711  return __pyx_r;
11712  }
11713 
11714  /* Python wrapper */
11715  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11716  static char __pyx_doc_8PyClical_18pure[] = "\n Pure part\n\n >>> print pure(clifford(\"1+{1}+{1,2}\"))\n {1}+{1,2}\n >>> print pure(clifford(\"{1,2}\"))\n {1,2}\n ";
11717  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11718  PyObject *__pyx_r = 0;
11719  __Pyx_RefNannyDeclarations
11720  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11721  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11722 
11723  /* function exit code */
11724  __Pyx_RefNannyFinishContext();
11725  return __pyx_r;
11726  }
11727 
11728  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11729  PyObject *__pyx_r = NULL;
11730  __Pyx_RefNannyDeclarations
11731  PyObject *__pyx_t_1 = NULL;
11732  __Pyx_RefNannySetupContext("pure", 0);
11733  __Pyx_XDECREF(__pyx_r);
11734  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11735  __Pyx_GOTREF(__pyx_t_1);
11736  __pyx_r = __pyx_t_1;
11737  __pyx_t_1 = 0;
11738  goto __pyx_L0;
11739 
11740  /* function exit code */
11741  __pyx_L1_error:;
11742  __Pyx_XDECREF(__pyx_t_1);
11743  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11744  __pyx_r = NULL;
11745  __pyx_L0:;
11746  __Pyx_XGIVEREF(__pyx_r);
11747  __Pyx_RefNannyFinishContext();
11748  return __pyx_r;
11749  }
11750 
11751  /* "PyClical.pyx":1388
11752  * return clifford(obj).pure()
11753  *
11754  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11755  * """
11756  * Even part of multivector, sum of even grade terms.
11757  */
11758 
11759  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11760  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11761  PyObject *__pyx_r = NULL;
11762  __Pyx_RefNannyDeclarations
11763  PyObject *__pyx_t_1 = NULL;
11764  PyObject *__pyx_t_2 = NULL;
11765  PyObject *__pyx_t_3 = NULL;
11766  __Pyx_RefNannySetupContext("even", 0);
11767 
11768  /* "PyClical.pyx":1395
11769  * 1+{1,2}
11770  * """
11771  * return clifford(obj).even() # <<<<<<<<<<<<<<
11772  *
11773  * cpdef inline odd(obj):
11774  */
11775  __Pyx_XDECREF(__pyx_r);
11776  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
11777  __Pyx_GOTREF(__pyx_t_2);
11778  __Pyx_INCREF(__pyx_v_obj);
11779  __Pyx_GIVEREF(__pyx_v_obj);
11780  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11781  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
11782  __Pyx_GOTREF(__pyx_t_3);
11783  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11784  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_even); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
11785  __Pyx_GOTREF(__pyx_t_2);
11786  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11787  __pyx_t_3 = NULL;
11788  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11789  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11790  if (likely(__pyx_t_3)) {
11791  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11792  __Pyx_INCREF(__pyx_t_3);
11793  __Pyx_INCREF(function);
11794  __Pyx_DECREF_SET(__pyx_t_2, function);
11795  }
11796  }
11797  if (__pyx_t_3) {
11798  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11799  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11800  } else {
11801  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11802  }
11803  __Pyx_GOTREF(__pyx_t_1);
11804  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11805  __pyx_r = __pyx_t_1;
11806  __pyx_t_1 = 0;
11807  goto __pyx_L0;
11808 
11809  /* "PyClical.pyx":1388
11810  * return clifford(obj).pure()
11811  *
11812  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11813  * """
11814  * Even part of multivector, sum of even grade terms.
11815  */
11816 
11817  /* function exit code */
11818  __pyx_L1_error:;
11819  __Pyx_XDECREF(__pyx_t_1);
11820  __Pyx_XDECREF(__pyx_t_2);
11821  __Pyx_XDECREF(__pyx_t_3);
11822  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11823  __pyx_r = 0;
11824  __pyx_L0:;
11825  __Pyx_XGIVEREF(__pyx_r);
11826  __Pyx_RefNannyFinishContext();
11827  return __pyx_r;
11828  }
11829 
11830  /* Python wrapper */
11831  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11832  static char __pyx_doc_8PyClical_20even[] = "\n Even part of multivector, sum of even grade terms.\n\n >>> print even(clifford(\"1+{1}+{1,2}\"))\n 1+{1,2}\n ";
11833  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11834  PyObject *__pyx_r = 0;
11835  __Pyx_RefNannyDeclarations
11836  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11837  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11838 
11839  /* function exit code */
11840  __Pyx_RefNannyFinishContext();
11841  return __pyx_r;
11842  }
11843 
11844  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11845  PyObject *__pyx_r = NULL;
11846  __Pyx_RefNannyDeclarations
11847  PyObject *__pyx_t_1 = NULL;
11848  __Pyx_RefNannySetupContext("even", 0);
11849  __Pyx_XDECREF(__pyx_r);
11850  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11851  __Pyx_GOTREF(__pyx_t_1);
11852  __pyx_r = __pyx_t_1;
11853  __pyx_t_1 = 0;
11854  goto __pyx_L0;
11855 
11856  /* function exit code */
11857  __pyx_L1_error:;
11858  __Pyx_XDECREF(__pyx_t_1);
11859  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11860  __pyx_r = NULL;
11861  __pyx_L0:;
11862  __Pyx_XGIVEREF(__pyx_r);
11863  __Pyx_RefNannyFinishContext();
11864  return __pyx_r;
11865  }
11866 
11867  /* "PyClical.pyx":1397
11868  * return clifford(obj).even()
11869  *
11870  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11871  * """
11872  * Odd part of multivector, sum of odd grade terms.
11873  */
11874 
11875  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11876  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11877  PyObject *__pyx_r = NULL;
11878  __Pyx_RefNannyDeclarations
11879  PyObject *__pyx_t_1 = NULL;
11880  PyObject *__pyx_t_2 = NULL;
11881  PyObject *__pyx_t_3 = NULL;
11882  __Pyx_RefNannySetupContext("odd", 0);
11883 
11884  /* "PyClical.pyx":1404
11885  * {1}
11886  * """
11887  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11888  *
11889  * cpdef inline involute(obj):
11890  */
11891  __Pyx_XDECREF(__pyx_r);
11892  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
11893  __Pyx_GOTREF(__pyx_t_2);
11894  __Pyx_INCREF(__pyx_v_obj);
11895  __Pyx_GIVEREF(__pyx_v_obj);
11896  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11897  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
11898  __Pyx_GOTREF(__pyx_t_3);
11899  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11900  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_odd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
11901  __Pyx_GOTREF(__pyx_t_2);
11902  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11903  __pyx_t_3 = NULL;
11904  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11905  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11906  if (likely(__pyx_t_3)) {
11907  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11908  __Pyx_INCREF(__pyx_t_3);
11909  __Pyx_INCREF(function);
11910  __Pyx_DECREF_SET(__pyx_t_2, function);
11911  }
11912  }
11913  if (__pyx_t_3) {
11914  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11915  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11916  } else {
11917  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11918  }
11919  __Pyx_GOTREF(__pyx_t_1);
11920  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11921  __pyx_r = __pyx_t_1;
11922  __pyx_t_1 = 0;
11923  goto __pyx_L0;
11924 
11925  /* "PyClical.pyx":1397
11926  * return clifford(obj).even()
11927  *
11928  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11929  * """
11930  * Odd part of multivector, sum of odd grade terms.
11931  */
11932 
11933  /* function exit code */
11934  __pyx_L1_error:;
11935  __Pyx_XDECREF(__pyx_t_1);
11936  __Pyx_XDECREF(__pyx_t_2);
11937  __Pyx_XDECREF(__pyx_t_3);
11938  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11939  __pyx_r = 0;
11940  __pyx_L0:;
11941  __Pyx_XGIVEREF(__pyx_r);
11942  __Pyx_RefNannyFinishContext();
11943  return __pyx_r;
11944  }
11945 
11946  /* Python wrapper */
11947  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11948  static char __pyx_doc_8PyClical_22odd[] = "\n Odd part of multivector, sum of odd grade terms.\n\n >>> print odd(clifford(\"1+{1}+{1,2}\"))\n {1}\n ";
11949  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11950  PyObject *__pyx_r = 0;
11951  __Pyx_RefNannyDeclarations
11952  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11953  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11954 
11955  /* function exit code */
11956  __Pyx_RefNannyFinishContext();
11957  return __pyx_r;
11958  }
11959 
11960  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11961  PyObject *__pyx_r = NULL;
11962  __Pyx_RefNannyDeclarations
11963  PyObject *__pyx_t_1 = NULL;
11964  __Pyx_RefNannySetupContext("odd", 0);
11965  __Pyx_XDECREF(__pyx_r);
11966  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11967  __Pyx_GOTREF(__pyx_t_1);
11968  __pyx_r = __pyx_t_1;
11969  __pyx_t_1 = 0;
11970  goto __pyx_L0;
11971 
11972  /* function exit code */
11973  __pyx_L1_error:;
11974  __Pyx_XDECREF(__pyx_t_1);
11975  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11976  __pyx_r = NULL;
11977  __pyx_L0:;
11978  __Pyx_XGIVEREF(__pyx_r);
11979  __Pyx_RefNannyFinishContext();
11980  return __pyx_r;
11981  }
11982 
11983  /* "PyClical.pyx":1406
11984  * return clifford(obj).odd()
11985  *
11986  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11987  * """
11988  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11989  */
11990 
11991  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11992  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11993  PyObject *__pyx_r = NULL;
11994  __Pyx_RefNannyDeclarations
11995  PyObject *__pyx_t_1 = NULL;
11996  PyObject *__pyx_t_2 = NULL;
11997  PyObject *__pyx_t_3 = NULL;
11998  __Pyx_RefNannySetupContext("involute", 0);
11999 
12000  /* "PyClical.pyx":1419
12001  * 1-{1}+{1,2}
12002  * """
12003  * return clifford(obj).involute() # <<<<<<<<<<<<<<
12004  *
12005  * cpdef inline reverse(obj):
12006  */
12007  __Pyx_XDECREF(__pyx_r);
12008  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
12009  __Pyx_GOTREF(__pyx_t_2);
12010  __Pyx_INCREF(__pyx_v_obj);
12011  __Pyx_GIVEREF(__pyx_v_obj);
12012  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12013  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error)
12014  __Pyx_GOTREF(__pyx_t_3);
12015  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12016  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_involute); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
12017  __Pyx_GOTREF(__pyx_t_2);
12018  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12019  __pyx_t_3 = NULL;
12020  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12021  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12022  if (likely(__pyx_t_3)) {
12023  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12024  __Pyx_INCREF(__pyx_t_3);
12025  __Pyx_INCREF(function);
12026  __Pyx_DECREF_SET(__pyx_t_2, function);
12027  }
12028  }
12029  if (__pyx_t_3) {
12030  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
12031  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12032  } else {
12033  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
12034  }
12035  __Pyx_GOTREF(__pyx_t_1);
12036  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12037  __pyx_r = __pyx_t_1;
12038  __pyx_t_1 = 0;
12039  goto __pyx_L0;
12040 
12041  /* "PyClical.pyx":1406
12042  * return clifford(obj).odd()
12043  *
12044  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12045  * """
12046  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12047  */
12048 
12049  /* function exit code */
12050  __pyx_L1_error:;
12051  __Pyx_XDECREF(__pyx_t_1);
12052  __Pyx_XDECREF(__pyx_t_2);
12053  __Pyx_XDECREF(__pyx_t_3);
12054  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12055  __pyx_r = 0;
12056  __pyx_L0:;
12057  __Pyx_XGIVEREF(__pyx_r);
12058  __Pyx_RefNannyFinishContext();
12059  return __pyx_r;
12060  }
12061 
12062  /* Python wrapper */
12063  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12064  static char __pyx_doc_8PyClical_24involute[] = "\n Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})\n\n >>> print involute(clifford(\"{1}\"))\n -{1}\n >>> print involute(clifford(\"{2}\") * clifford(\"{1}\"))\n -{1,2}\n >>> print involute(clifford(\"{1}\") * clifford(\"{2}\"))\n {1,2}\n >>> print involute(clifford(\"1+{1}+{1,2}\"))\n 1-{1}+{1,2}\n ";
12065  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12066  PyObject *__pyx_r = 0;
12067  __Pyx_RefNannyDeclarations
12068  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
12069  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
12070 
12071  /* function exit code */
12072  __Pyx_RefNannyFinishContext();
12073  return __pyx_r;
12074  }
12075 
12076  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12077  PyObject *__pyx_r = NULL;
12078  __Pyx_RefNannyDeclarations
12079  PyObject *__pyx_t_1 = NULL;
12080  __Pyx_RefNannySetupContext("involute", 0);
12081  __Pyx_XDECREF(__pyx_r);
12082  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
12083  __Pyx_GOTREF(__pyx_t_1);
12084  __pyx_r = __pyx_t_1;
12085  __pyx_t_1 = 0;
12086  goto __pyx_L0;
12087 
12088  /* function exit code */
12089  __pyx_L1_error:;
12090  __Pyx_XDECREF(__pyx_t_1);
12091  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12092  __pyx_r = NULL;
12093  __pyx_L0:;
12094  __Pyx_XGIVEREF(__pyx_r);
12095  __Pyx_RefNannyFinishContext();
12096  return __pyx_r;
12097  }
12098 
12099  /* "PyClical.pyx":1421
12100  * return clifford(obj).involute()
12101  *
12102  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12103  * """
12104  * Reversion, eg. {1}*{2} -> {2}*{1}
12105  */
12106 
12107  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12108  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12109  PyObject *__pyx_r = NULL;
12110  __Pyx_RefNannyDeclarations
12111  PyObject *__pyx_t_1 = NULL;
12112  PyObject *__pyx_t_2 = NULL;
12113  PyObject *__pyx_t_3 = NULL;
12114  __Pyx_RefNannySetupContext("reverse", 0);
12115 
12116  /* "PyClical.pyx":1434
12117  * 1+{1}-{1,2}
12118  * """
12119  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
12120  *
12121  * cpdef inline conj(obj):
12122  */
12123  __Pyx_XDECREF(__pyx_r);
12124  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
12125  __Pyx_GOTREF(__pyx_t_2);
12126  __Pyx_INCREF(__pyx_v_obj);
12127  __Pyx_GIVEREF(__pyx_v_obj);
12128  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12129  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
12130  __Pyx_GOTREF(__pyx_t_3);
12131  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12132  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
12133  __Pyx_GOTREF(__pyx_t_2);
12134  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12135  __pyx_t_3 = NULL;
12136  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12137  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12138  if (likely(__pyx_t_3)) {
12139  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12140  __Pyx_INCREF(__pyx_t_3);
12141  __Pyx_INCREF(function);
12142  __Pyx_DECREF_SET(__pyx_t_2, function);
12143  }
12144  }
12145  if (__pyx_t_3) {
12146  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12147  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12148  } else {
12149  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12150  }
12151  __Pyx_GOTREF(__pyx_t_1);
12152  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12153  __pyx_r = __pyx_t_1;
12154  __pyx_t_1 = 0;
12155  goto __pyx_L0;
12156 
12157  /* "PyClical.pyx":1421
12158  * return clifford(obj).involute()
12159  *
12160  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12161  * """
12162  * Reversion, eg. {1}*{2} -> {2}*{1}
12163  */
12164 
12165  /* function exit code */
12166  __pyx_L1_error:;
12167  __Pyx_XDECREF(__pyx_t_1);
12168  __Pyx_XDECREF(__pyx_t_2);
12169  __Pyx_XDECREF(__pyx_t_3);
12170  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12171  __pyx_r = 0;
12172  __pyx_L0:;
12173  __Pyx_XGIVEREF(__pyx_r);
12174  __Pyx_RefNannyFinishContext();
12175  return __pyx_r;
12176  }
12177 
12178  /* Python wrapper */
12179  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12180  static char __pyx_doc_8PyClical_26reverse[] = "\n Reversion, eg. {1}*{2} -> {2}*{1}\n\n >>> print reverse(clifford(\"{1}\"))\n {1}\n >>> print reverse(clifford(\"{2}\") * clifford(\"{1}\"))\n {1,2}\n >>> print reverse(clifford(\"{1}\") * clifford(\"{2}\"))\n -{1,2}\n >>> print reverse(clifford(\"1+{1}+{1,2}\"))\n 1+{1}-{1,2}\n ";
12181  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12182  PyObject *__pyx_r = 0;
12183  __Pyx_RefNannyDeclarations
12184  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12185  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12186 
12187  /* function exit code */
12188  __Pyx_RefNannyFinishContext();
12189  return __pyx_r;
12190  }
12191 
12192  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12193  PyObject *__pyx_r = NULL;
12194  __Pyx_RefNannyDeclarations
12195  PyObject *__pyx_t_1 = NULL;
12196  __Pyx_RefNannySetupContext("reverse", 0);
12197  __Pyx_XDECREF(__pyx_r);
12198  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12199  __Pyx_GOTREF(__pyx_t_1);
12200  __pyx_r = __pyx_t_1;
12201  __pyx_t_1 = 0;
12202  goto __pyx_L0;
12203 
12204  /* function exit code */
12205  __pyx_L1_error:;
12206  __Pyx_XDECREF(__pyx_t_1);
12207  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12208  __pyx_r = NULL;
12209  __pyx_L0:;
12210  __Pyx_XGIVEREF(__pyx_r);
12211  __Pyx_RefNannyFinishContext();
12212  return __pyx_r;
12213  }
12214 
12215  /* "PyClical.pyx":1436
12216  * return clifford(obj).reverse()
12217  *
12218  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12219  * """
12220  * Conjugation, reverse o involute == involute o reverse.
12221  */
12222 
12223  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12224  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12225  PyObject *__pyx_r = NULL;
12226  __Pyx_RefNannyDeclarations
12227  PyObject *__pyx_t_1 = NULL;
12228  PyObject *__pyx_t_2 = NULL;
12229  PyObject *__pyx_t_3 = NULL;
12230  __Pyx_RefNannySetupContext("conj", 0);
12231 
12232  /* "PyClical.pyx":1449
12233  * 1-{1}-{1,2}
12234  * """
12235  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12236  *
12237  * cpdef inline quad(obj):
12238  */
12239  __Pyx_XDECREF(__pyx_r);
12240  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
12241  __Pyx_GOTREF(__pyx_t_2);
12242  __Pyx_INCREF(__pyx_v_obj);
12243  __Pyx_GIVEREF(__pyx_v_obj);
12244  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12245  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error)
12246  __Pyx_GOTREF(__pyx_t_3);
12247  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12248  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_conj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
12249  __Pyx_GOTREF(__pyx_t_2);
12250  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12251  __pyx_t_3 = NULL;
12252  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12253  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12254  if (likely(__pyx_t_3)) {
12255  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12256  __Pyx_INCREF(__pyx_t_3);
12257  __Pyx_INCREF(function);
12258  __Pyx_DECREF_SET(__pyx_t_2, function);
12259  }
12260  }
12261  if (__pyx_t_3) {
12262  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12263  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12264  } else {
12265  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12266  }
12267  __Pyx_GOTREF(__pyx_t_1);
12268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12269  __pyx_r = __pyx_t_1;
12270  __pyx_t_1 = 0;
12271  goto __pyx_L0;
12272 
12273  /* "PyClical.pyx":1436
12274  * return clifford(obj).reverse()
12275  *
12276  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12277  * """
12278  * Conjugation, reverse o involute == involute o reverse.
12279  */
12280 
12281  /* function exit code */
12282  __pyx_L1_error:;
12283  __Pyx_XDECREF(__pyx_t_1);
12284  __Pyx_XDECREF(__pyx_t_2);
12285  __Pyx_XDECREF(__pyx_t_3);
12286  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12287  __pyx_r = 0;
12288  __pyx_L0:;
12289  __Pyx_XGIVEREF(__pyx_r);
12290  __Pyx_RefNannyFinishContext();
12291  return __pyx_r;
12292  }
12293 
12294  /* Python wrapper */
12295  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12296  static char __pyx_doc_8PyClical_28conj[] = "\n Conjugation, reverse o involute == involute o reverse.\n\n >>> print conj(clifford(\"{1}\"))\n -{1}\n >>> print conj(clifford(\"{2}\") * clifford(\"{1}\"))\n {1,2}\n >>> print conj(clifford(\"{1}\") * clifford(\"{2}\"))\n -{1,2}\n >>> print conj(clifford(\"1+{1}+{1,2}\"))\n 1-{1}-{1,2}\n ";
12297  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12298  PyObject *__pyx_r = 0;
12299  __Pyx_RefNannyDeclarations
12300  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12301  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12302 
12303  /* function exit code */
12304  __Pyx_RefNannyFinishContext();
12305  return __pyx_r;
12306  }
12307 
12308  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12309  PyObject *__pyx_r = NULL;
12310  __Pyx_RefNannyDeclarations
12311  PyObject *__pyx_t_1 = NULL;
12312  __Pyx_RefNannySetupContext("conj", 0);
12313  __Pyx_XDECREF(__pyx_r);
12314  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12315  __Pyx_GOTREF(__pyx_t_1);
12316  __pyx_r = __pyx_t_1;
12317  __pyx_t_1 = 0;
12318  goto __pyx_L0;
12319 
12320  /* function exit code */
12321  __pyx_L1_error:;
12322  __Pyx_XDECREF(__pyx_t_1);
12323  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12324  __pyx_r = NULL;
12325  __pyx_L0:;
12326  __Pyx_XGIVEREF(__pyx_r);
12327  __Pyx_RefNannyFinishContext();
12328  return __pyx_r;
12329  }
12330 
12331  /* "PyClical.pyx":1451
12332  * return clifford(obj).conj()
12333  *
12334  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12335  * """
12336  * Quadratic form == (rev(x)*x)(0).
12337  */
12338 
12339  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12340  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12341  PyObject *__pyx_r = NULL;
12342  __Pyx_RefNannyDeclarations
12343  PyObject *__pyx_t_1 = NULL;
12344  PyObject *__pyx_t_2 = NULL;
12345  PyObject *__pyx_t_3 = NULL;
12346  __Pyx_RefNannySetupContext("quad", 0);
12347 
12348  /* "PyClical.pyx":1460
12349  * 2.0
12350  * """
12351  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12352  *
12353  * cpdef inline norm(obj):
12354  */
12355  __Pyx_XDECREF(__pyx_r);
12356  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
12357  __Pyx_GOTREF(__pyx_t_2);
12358  __Pyx_INCREF(__pyx_v_obj);
12359  __Pyx_GIVEREF(__pyx_v_obj);
12360  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12361  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error)
12362  __Pyx_GOTREF(__pyx_t_3);
12363  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12364  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_quad); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
12365  __Pyx_GOTREF(__pyx_t_2);
12366  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12367  __pyx_t_3 = NULL;
12368  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12369  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12370  if (likely(__pyx_t_3)) {
12371  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12372  __Pyx_INCREF(__pyx_t_3);
12373  __Pyx_INCREF(function);
12374  __Pyx_DECREF_SET(__pyx_t_2, function);
12375  }
12376  }
12377  if (__pyx_t_3) {
12378  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12379  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12380  } else {
12381  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12382  }
12383  __Pyx_GOTREF(__pyx_t_1);
12384  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12385  __pyx_r = __pyx_t_1;
12386  __pyx_t_1 = 0;
12387  goto __pyx_L0;
12388 
12389  /* "PyClical.pyx":1451
12390  * return clifford(obj).conj()
12391  *
12392  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12393  * """
12394  * Quadratic form == (rev(x)*x)(0).
12395  */
12396 
12397  /* function exit code */
12398  __pyx_L1_error:;
12399  __Pyx_XDECREF(__pyx_t_1);
12400  __Pyx_XDECREF(__pyx_t_2);
12401  __Pyx_XDECREF(__pyx_t_3);
12402  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12403  __pyx_r = 0;
12404  __pyx_L0:;
12405  __Pyx_XGIVEREF(__pyx_r);
12406  __Pyx_RefNannyFinishContext();
12407  return __pyx_r;
12408  }
12409 
12410  /* Python wrapper */
12411  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12412  static char __pyx_doc_8PyClical_30quad[] = "\n Quadratic form == (rev(x)*x)(0).\n\n >>> print quad(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> print quad(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
12413  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12414  PyObject *__pyx_r = 0;
12415  __Pyx_RefNannyDeclarations
12416  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12417  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12418 
12419  /* function exit code */
12420  __Pyx_RefNannyFinishContext();
12421  return __pyx_r;
12422  }
12423 
12424  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12425  PyObject *__pyx_r = NULL;
12426  __Pyx_RefNannyDeclarations
12427  PyObject *__pyx_t_1 = NULL;
12428  __Pyx_RefNannySetupContext("quad", 0);
12429  __Pyx_XDECREF(__pyx_r);
12430  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12431  __Pyx_GOTREF(__pyx_t_1);
12432  __pyx_r = __pyx_t_1;
12433  __pyx_t_1 = 0;
12434  goto __pyx_L0;
12435 
12436  /* function exit code */
12437  __pyx_L1_error:;
12438  __Pyx_XDECREF(__pyx_t_1);
12439  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12440  __pyx_r = NULL;
12441  __pyx_L0:;
12442  __Pyx_XGIVEREF(__pyx_r);
12443  __Pyx_RefNannyFinishContext();
12444  return __pyx_r;
12445  }
12446 
12447  /* "PyClical.pyx":1462
12448  * return clifford(obj).quad()
12449  *
12450  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12451  * """
12452  * norm == sum of squares of coordinates.
12453  */
12454 
12455  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12456  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12457  PyObject *__pyx_r = NULL;
12458  __Pyx_RefNannyDeclarations
12459  PyObject *__pyx_t_1 = NULL;
12460  PyObject *__pyx_t_2 = NULL;
12461  PyObject *__pyx_t_3 = NULL;
12462  __Pyx_RefNannySetupContext("norm", 0);
12463 
12464  /* "PyClical.pyx":1471
12465  * 4.0
12466  * """
12467  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12468  *
12469  * cpdef inline abs(obj):
12470  */
12471  __Pyx_XDECREF(__pyx_r);
12472  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
12473  __Pyx_GOTREF(__pyx_t_2);
12474  __Pyx_INCREF(__pyx_v_obj);
12475  __Pyx_GIVEREF(__pyx_v_obj);
12476  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12477  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1471, __pyx_L1_error)
12478  __Pyx_GOTREF(__pyx_t_3);
12479  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12480  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_norm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
12481  __Pyx_GOTREF(__pyx_t_2);
12482  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12483  __pyx_t_3 = NULL;
12484  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12485  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12486  if (likely(__pyx_t_3)) {
12487  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12488  __Pyx_INCREF(__pyx_t_3);
12489  __Pyx_INCREF(function);
12490  __Pyx_DECREF_SET(__pyx_t_2, function);
12491  }
12492  }
12493  if (__pyx_t_3) {
12494  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12495  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12496  } else {
12497  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12498  }
12499  __Pyx_GOTREF(__pyx_t_1);
12500  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12501  __pyx_r = __pyx_t_1;
12502  __pyx_t_1 = 0;
12503  goto __pyx_L0;
12504 
12505  /* "PyClical.pyx":1462
12506  * return clifford(obj).quad()
12507  *
12508  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12509  * """
12510  * norm == sum of squares of coordinates.
12511  */
12512 
12513  /* function exit code */
12514  __pyx_L1_error:;
12515  __Pyx_XDECREF(__pyx_t_1);
12516  __Pyx_XDECREF(__pyx_t_2);
12517  __Pyx_XDECREF(__pyx_t_3);
12518  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12519  __pyx_r = 0;
12520  __pyx_L0:;
12521  __Pyx_XGIVEREF(__pyx_r);
12522  __Pyx_RefNannyFinishContext();
12523  return __pyx_r;
12524  }
12525 
12526  /* Python wrapper */
12527  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12528  static char __pyx_doc_8PyClical_32norm[] = "\n norm == sum of squares of coordinates.\n\n >>> norm(clifford(\"1+{1}+{1,2}\"))\n 3.0\n >>> norm(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 4.0\n ";
12529  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12530  PyObject *__pyx_r = 0;
12531  __Pyx_RefNannyDeclarations
12532  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12533  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12534 
12535  /* function exit code */
12536  __Pyx_RefNannyFinishContext();
12537  return __pyx_r;
12538  }
12539 
12540  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12541  PyObject *__pyx_r = NULL;
12542  __Pyx_RefNannyDeclarations
12543  PyObject *__pyx_t_1 = NULL;
12544  __Pyx_RefNannySetupContext("norm", 0);
12545  __Pyx_XDECREF(__pyx_r);
12546  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12547  __Pyx_GOTREF(__pyx_t_1);
12548  __pyx_r = __pyx_t_1;
12549  __pyx_t_1 = 0;
12550  goto __pyx_L0;
12551 
12552  /* function exit code */
12553  __pyx_L1_error:;
12554  __Pyx_XDECREF(__pyx_t_1);
12555  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12556  __pyx_r = NULL;
12557  __pyx_L0:;
12558  __Pyx_XGIVEREF(__pyx_r);
12559  __Pyx_RefNannyFinishContext();
12560  return __pyx_r;
12561  }
12562 
12563  /* "PyClical.pyx":1473
12564  * return clifford(obj).norm()
12565  *
12566  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12567  * """
12568  * Absolute value of multivector: multivector 2-norm.
12569  */
12570 
12571  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12572  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12573  PyObject *__pyx_r = NULL;
12574  __Pyx_RefNannyDeclarations
12575  PyObject *__pyx_t_1 = NULL;
12576  __Pyx_RefNannySetupContext("abs", 0);
12577 
12578  /* "PyClical.pyx":1480
12579  * 2.0
12580  * """
12581  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12582  *
12583  * cpdef inline max_abs(obj):
12584  */
12585  __Pyx_XDECREF(__pyx_r);
12586  __pyx_t_1 = PyFloat_FromDouble(abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __pyx_L1_error)
12587  __Pyx_GOTREF(__pyx_t_1);
12588  __pyx_r = __pyx_t_1;
12589  __pyx_t_1 = 0;
12590  goto __pyx_L0;
12591 
12592  /* "PyClical.pyx":1473
12593  * return clifford(obj).norm()
12594  *
12595  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12596  * """
12597  * Absolute value of multivector: multivector 2-norm.
12598  */
12599 
12600  /* function exit code */
12601  __pyx_L1_error:;
12602  __Pyx_XDECREF(__pyx_t_1);
12603  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12604  __pyx_r = 0;
12605  __pyx_L0:;
12606  __Pyx_XGIVEREF(__pyx_r);
12607  __Pyx_RefNannyFinishContext();
12608  return __pyx_r;
12609  }
12610 
12611  /* Python wrapper */
12612  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12613  static char __pyx_doc_8PyClical_34abs[] = "\n Absolute value of multivector: multivector 2-norm.\n\n >>> abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 2.0\n ";
12614  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12615  PyObject *__pyx_r = 0;
12616  __Pyx_RefNannyDeclarations
12617  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12618  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12619 
12620  /* function exit code */
12621  __Pyx_RefNannyFinishContext();
12622  return __pyx_r;
12623  }
12624 
12625  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12626  PyObject *__pyx_r = NULL;
12627  __Pyx_RefNannyDeclarations
12628  PyObject *__pyx_t_1 = NULL;
12629  __Pyx_RefNannySetupContext("abs", 0);
12630  __Pyx_XDECREF(__pyx_r);
12631  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12632  __Pyx_GOTREF(__pyx_t_1);
12633  __pyx_r = __pyx_t_1;
12634  __pyx_t_1 = 0;
12635  goto __pyx_L0;
12636 
12637  /* function exit code */
12638  __pyx_L1_error:;
12639  __Pyx_XDECREF(__pyx_t_1);
12640  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12641  __pyx_r = NULL;
12642  __pyx_L0:;
12643  __Pyx_XGIVEREF(__pyx_r);
12644  __Pyx_RefNannyFinishContext();
12645  return __pyx_r;
12646  }
12647 
12648  /* "PyClical.pyx":1482
12649  * return glucat.abs(toClifford(obj))
12650  *
12651  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12652  * """
12653  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12654  */
12655 
12656  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12657  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12658  PyObject *__pyx_r = NULL;
12659  __Pyx_RefNannyDeclarations
12660  PyObject *__pyx_t_1 = NULL;
12661  __Pyx_RefNannySetupContext("max_abs", 0);
12662 
12663  /* "PyClical.pyx":1492
12664  *
12665  * """
12666  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12667  *
12668  * cpdef inline pow(obj, m):
12669  */
12670  __Pyx_XDECREF(__pyx_r);
12671  __pyx_t_1 = PyFloat_FromDouble(max_abs(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
12672  __Pyx_GOTREF(__pyx_t_1);
12673  __pyx_r = __pyx_t_1;
12674  __pyx_t_1 = 0;
12675  goto __pyx_L0;
12676 
12677  /* "PyClical.pyx":1482
12678  * return glucat.abs(toClifford(obj))
12679  *
12680  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12681  * """
12682  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12683  */
12684 
12685  /* function exit code */
12686  __pyx_L1_error:;
12687  __Pyx_XDECREF(__pyx_t_1);
12688  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12689  __pyx_r = 0;
12690  __pyx_L0:;
12691  __Pyx_XGIVEREF(__pyx_r);
12692  __Pyx_RefNannyFinishContext();
12693  return __pyx_r;
12694  }
12695 
12696  /* Python wrapper */
12697  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12698  static char __pyx_doc_8PyClical_36max_abs[] = "\n Maximum absolute value of coordinates multivector: multivector infinity-norm.\n\n >>> max_abs(clifford(\"1+{-1}+{1,2}+{1,2,3}\"))\n 1.0\n >>> max_abs(clifford(\"3+2{1}+{1,2}\"))\n 3.0\n\n ";
12699  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12700  PyObject *__pyx_r = 0;
12701  __Pyx_RefNannyDeclarations
12702  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12703  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12704 
12705  /* function exit code */
12706  __Pyx_RefNannyFinishContext();
12707  return __pyx_r;
12708  }
12709 
12710  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12711  PyObject *__pyx_r = NULL;
12712  __Pyx_RefNannyDeclarations
12713  PyObject *__pyx_t_1 = NULL;
12714  __Pyx_RefNannySetupContext("max_abs", 0);
12715  __Pyx_XDECREF(__pyx_r);
12716  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12717  __Pyx_GOTREF(__pyx_t_1);
12718  __pyx_r = __pyx_t_1;
12719  __pyx_t_1 = 0;
12720  goto __pyx_L0;
12721 
12722  /* function exit code */
12723  __pyx_L1_error:;
12724  __Pyx_XDECREF(__pyx_t_1);
12725  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12726  __pyx_r = NULL;
12727  __pyx_L0:;
12728  __Pyx_XGIVEREF(__pyx_r);
12729  __Pyx_RefNannyFinishContext();
12730  return __pyx_r;
12731  }
12732 
12733  /* "PyClical.pyx":1494
12734  * return glucat.max_abs(toClifford(obj))
12735  *
12736  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12737  * """
12738  * Integer power of multivector: obj to the m.
12739  */
12740 
12741  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12742  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12743  PyObject *__pyx_r = NULL;
12744  __Pyx_RefNannyDeclarations
12745  PyObject *__pyx_t_1 = NULL;
12746  PyObject *__pyx_t_2 = NULL;
12747  PyObject *__pyx_t_3 = NULL;
12748  PyObject *__pyx_t_4 = NULL;
12749  PyObject *__pyx_t_5 = NULL;
12750  PyObject *__pyx_t_6 = NULL;
12751  int __pyx_t_7;
12752  PyObject *__pyx_t_8 = NULL;
12753  PyObject *__pyx_t_9 = NULL;
12754  PyObject *__pyx_t_10 = NULL;
12755  PyObject *__pyx_t_11 = NULL;
12756  __Pyx_RefNannySetupContext("pow", 0);
12757 
12758  /* "PyClical.pyx":1513
12759  * 1
12760  * """
12761  * try: # <<<<<<<<<<<<<<
12762  * math.pow(obj, m)
12763  * except:
12764  */
12765  {
12766  __Pyx_PyThreadState_declare
12767  __Pyx_PyThreadState_assign
12768  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12769  __Pyx_XGOTREF(__pyx_t_1);
12770  __Pyx_XGOTREF(__pyx_t_2);
12771  __Pyx_XGOTREF(__pyx_t_3);
12772  /*try:*/ {
12773 
12774  /* "PyClical.pyx":1514
12775  * """
12776  * try:
12777  * math.pow(obj, m) # <<<<<<<<<<<<<<
12778  * except:
12779  * return clifford(obj).pow(m)
12780  */
12781  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12782  __Pyx_GOTREF(__pyx_t_5);
12783  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_pow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L3_error)
12784  __Pyx_GOTREF(__pyx_t_6);
12785  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12786  __pyx_t_5 = NULL;
12787  __pyx_t_7 = 0;
12788  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12789  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12790  if (likely(__pyx_t_5)) {
12791  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12792  __Pyx_INCREF(__pyx_t_5);
12793  __Pyx_INCREF(function);
12794  __Pyx_DECREF_SET(__pyx_t_6, function);
12795  __pyx_t_7 = 1;
12796  }
12797  }
12798  #if CYTHON_FAST_PYCALL
12799  if (PyFunction_Check(__pyx_t_6)) {
12800  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12801  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L3_error)
12802  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12803  __Pyx_GOTREF(__pyx_t_4);
12804  } else
12805  #endif
12806  #if CYTHON_FAST_PYCCALL
12807  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12808  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12809  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L3_error)
12810  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12811  __Pyx_GOTREF(__pyx_t_4);
12812  } else
12813  #endif
12814  {
12815  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12816  __Pyx_GOTREF(__pyx_t_8);
12817  if (__pyx_t_5) {
12818  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12819  }
12820  __Pyx_INCREF(__pyx_v_obj);
12821  __Pyx_GIVEREF(__pyx_v_obj);
12822  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12823  __Pyx_INCREF(__pyx_v_m);
12824  __Pyx_GIVEREF(__pyx_v_m);
12825  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12826  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L3_error)
12827  __Pyx_GOTREF(__pyx_t_4);
12828  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12829  }
12830  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12831  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12832 
12833  /* "PyClical.pyx":1513
12834  * 1
12835  * """
12836  * try: # <<<<<<<<<<<<<<
12837  * math.pow(obj, m)
12838  * except:
12839  */
12840  }
12841  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12842  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12843  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12844  goto __pyx_L8_try_end;
12845  __pyx_L3_error:;
12846  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12847  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12848  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12849  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12850 
12851  /* "PyClical.pyx":1515
12852  * try:
12853  * math.pow(obj, m)
12854  * except: # <<<<<<<<<<<<<<
12855  * return clifford(obj).pow(m)
12856  *
12857  */
12858  /*except:*/ {
12859  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12860  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12861  __Pyx_GOTREF(__pyx_t_4);
12862  __Pyx_GOTREF(__pyx_t_6);
12863  __Pyx_GOTREF(__pyx_t_8);
12864 
12865  /* "PyClical.pyx":1516
12866  * math.pow(obj, m)
12867  * except:
12868  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12869  *
12870  * cpdef inline outer_pow(obj, m):
12871  */
12872  __Pyx_XDECREF(__pyx_r);
12873  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12874  __Pyx_GOTREF(__pyx_t_9);
12875  __Pyx_INCREF(__pyx_v_obj);
12876  __Pyx_GIVEREF(__pyx_v_obj);
12877  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12878  __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12879  __Pyx_GOTREF(__pyx_t_10);
12880  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12881  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_pow); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12882  __Pyx_GOTREF(__pyx_t_9);
12883  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12884  __pyx_t_10 = NULL;
12885  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
12886  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12887  if (likely(__pyx_t_10)) {
12888  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
12889  __Pyx_INCREF(__pyx_t_10);
12890  __Pyx_INCREF(function);
12891  __Pyx_DECREF_SET(__pyx_t_9, function);
12892  }
12893  }
12894  if (!__pyx_t_10) {
12895  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_m); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12896  __Pyx_GOTREF(__pyx_t_5);
12897  } else {
12898  #if CYTHON_FAST_PYCALL
12899  if (PyFunction_Check(__pyx_t_9)) {
12900  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_m};
12901  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12902  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12903  __Pyx_GOTREF(__pyx_t_5);
12904  } else
12905  #endif
12906  #if CYTHON_FAST_PYCCALL
12907  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
12908  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_m};
12909  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12910  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12911  __Pyx_GOTREF(__pyx_t_5);
12912  } else
12913  #endif
12914  {
12915  __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12916  __Pyx_GOTREF(__pyx_t_11);
12917  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
12918  __Pyx_INCREF(__pyx_v_m);
12919  __Pyx_GIVEREF(__pyx_v_m);
12920  PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12921  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12922  __Pyx_GOTREF(__pyx_t_5);
12923  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12924  }
12925  }
12926  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12927  __pyx_r = __pyx_t_5;
12928  __pyx_t_5 = 0;
12929  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12930  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12931  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12932  goto __pyx_L6_except_return;
12933  }
12934  __pyx_L5_except_error:;
12935 
12936  /* "PyClical.pyx":1513
12937  * 1
12938  * """
12939  * try: # <<<<<<<<<<<<<<
12940  * math.pow(obj, m)
12941  * except:
12942  */
12943  __Pyx_XGIVEREF(__pyx_t_1);
12944  __Pyx_XGIVEREF(__pyx_t_2);
12945  __Pyx_XGIVEREF(__pyx_t_3);
12946  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12947  goto __pyx_L1_error;
12948  __pyx_L6_except_return:;
12949  __Pyx_XGIVEREF(__pyx_t_1);
12950  __Pyx_XGIVEREF(__pyx_t_2);
12951  __Pyx_XGIVEREF(__pyx_t_3);
12952  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12953  goto __pyx_L0;
12954  __pyx_L8_try_end:;
12955  }
12956 
12957  /* "PyClical.pyx":1494
12958  * return glucat.max_abs(toClifford(obj))
12959  *
12960  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12961  * """
12962  * Integer power of multivector: obj to the m.
12963  */
12964 
12965  /* function exit code */
12966  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12967  goto __pyx_L0;
12968  __pyx_L1_error:;
12969  __Pyx_XDECREF(__pyx_t_4);
12970  __Pyx_XDECREF(__pyx_t_5);
12971  __Pyx_XDECREF(__pyx_t_6);
12972  __Pyx_XDECREF(__pyx_t_8);
12973  __Pyx_XDECREF(__pyx_t_9);
12974  __Pyx_XDECREF(__pyx_t_10);
12975  __Pyx_XDECREF(__pyx_t_11);
12976  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12977  __pyx_r = 0;
12978  __pyx_L0:;
12979  __Pyx_XGIVEREF(__pyx_r);
12980  __Pyx_RefNannyFinishContext();
12981  return __pyx_r;
12982  }
12983 
12984  /* Python wrapper */
12985  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12986  static char __pyx_doc_8PyClical_38pow[] = "\n Integer power of multivector: obj to the m.\n\n >>> x=clifford(\"{1}\"); print pow(x,2)\n 1\n >>> x=clifford(\"2\"); print pow(x,2)\n 4\n >>> x=clifford(\"2+{1}\"); print pow(x,0)\n 1\n >>> x=clifford(\"2+{1}\"); print pow(x,1)\n 2+{1}\n >>> x=clifford(\"2+{1}\"); print pow(x,2)\n 5+4{1}\n >>> print pow(clifford(\"1+{1}+{1,2}\"),3)\n 1+3{1}+3{1,2}\n >>> i=clifford(\"{1,2}\");print exp(pi/2) * pow(i, i)\n 1\n ";
12987  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12988  PyObject *__pyx_v_obj = 0;
12989  PyObject *__pyx_v_m = 0;
12990  PyObject *__pyx_r = 0;
12991  __Pyx_RefNannyDeclarations
12992  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12993  {
12994  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12995  PyObject* values[2] = {0,0};
12996  if (unlikely(__pyx_kwds)) {
12997  Py_ssize_t kw_args;
12998  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12999  switch (pos_args) {
13000  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13001  CYTHON_FALLTHROUGH;
13002  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13003  CYTHON_FALLTHROUGH;
13004  case 0: break;
13005  default: goto __pyx_L5_argtuple_error;
13006  }
13007  kw_args = PyDict_Size(__pyx_kwds);
13008  switch (pos_args) {
13009  case 0:
13010  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13011  else goto __pyx_L5_argtuple_error;
13012  CYTHON_FALLTHROUGH;
13013  case 1:
13014  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13015  else {
13016  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
13017  }
13018  }
13019  if (unlikely(kw_args > 0)) {
13020  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
13021  }
13022  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13023  goto __pyx_L5_argtuple_error;
13024  } else {
13025  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13026  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13027  }
13028  __pyx_v_obj = values[0];
13029  __pyx_v_m = values[1];
13030  }
13031  goto __pyx_L4_argument_unpacking_done;
13032  __pyx_L5_argtuple_error:;
13033  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
13034  __pyx_L3_error:;
13035  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13036  __Pyx_RefNannyFinishContext();
13037  return NULL;
13038  __pyx_L4_argument_unpacking_done:;
13039  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13040 
13041  /* function exit code */
13042  __Pyx_RefNannyFinishContext();
13043  return __pyx_r;
13044  }
13045 
13046  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13047  PyObject *__pyx_r = NULL;
13048  __Pyx_RefNannyDeclarations
13049  PyObject *__pyx_t_1 = NULL;
13050  __Pyx_RefNannySetupContext("pow", 0);
13051  __Pyx_XDECREF(__pyx_r);
13052  __pyx_t_1 = __pyx_f_8PyClical_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1494, __pyx_L1_error)
13053  __Pyx_GOTREF(__pyx_t_1);
13054  __pyx_r = __pyx_t_1;
13055  __pyx_t_1 = 0;
13056  goto __pyx_L0;
13057 
13058  /* function exit code */
13059  __pyx_L1_error:;
13060  __Pyx_XDECREF(__pyx_t_1);
13061  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13062  __pyx_r = NULL;
13063  __pyx_L0:;
13064  __Pyx_XGIVEREF(__pyx_r);
13065  __Pyx_RefNannyFinishContext();
13066  return __pyx_r;
13067  }
13068 
13069  /* "PyClical.pyx":1518
13070  * return clifford(obj).pow(m)
13071  *
13072  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13073  * """
13074  * Outer product power of multivector.
13075  */
13076 
13077  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13078  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13079  PyObject *__pyx_r = NULL;
13080  __Pyx_RefNannyDeclarations
13081  PyObject *__pyx_t_1 = NULL;
13082  PyObject *__pyx_t_2 = NULL;
13083  PyObject *__pyx_t_3 = NULL;
13084  PyObject *__pyx_t_4 = NULL;
13085  __Pyx_RefNannySetupContext("outer_pow", 0);
13086 
13087  /* "PyClical.pyx":1525
13088  * 1+3{1}+3{1,2}
13089  * """
13090  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
13091  *
13092  * cpdef inline complexifier(obj):
13093  */
13094  __Pyx_XDECREF(__pyx_r);
13095  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
13096  __Pyx_GOTREF(__pyx_t_2);
13097  __Pyx_INCREF(__pyx_v_obj);
13098  __Pyx_GIVEREF(__pyx_v_obj);
13099  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
13100  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error)
13101  __Pyx_GOTREF(__pyx_t_3);
13102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13103  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_outer_pow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
13104  __Pyx_GOTREF(__pyx_t_2);
13105  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13106  __pyx_t_3 = NULL;
13107  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13108  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
13109  if (likely(__pyx_t_3)) {
13110  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13111  __Pyx_INCREF(__pyx_t_3);
13112  __Pyx_INCREF(function);
13113  __Pyx_DECREF_SET(__pyx_t_2, function);
13114  }
13115  }
13116  if (!__pyx_t_3) {
13117  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
13118  __Pyx_GOTREF(__pyx_t_1);
13119  } else {
13120  #if CYTHON_FAST_PYCALL
13121  if (PyFunction_Check(__pyx_t_2)) {
13122  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_m};
13123  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
13124  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13125  __Pyx_GOTREF(__pyx_t_1);
13126  } else
13127  #endif
13128  #if CYTHON_FAST_PYCCALL
13129  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13130  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_m};
13131  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
13132  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13133  __Pyx_GOTREF(__pyx_t_1);
13134  } else
13135  #endif
13136  {
13137  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
13138  __Pyx_GOTREF(__pyx_t_4);
13139  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
13140  __Pyx_INCREF(__pyx_v_m);
13141  __Pyx_GIVEREF(__pyx_v_m);
13142  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
13143  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
13144  __Pyx_GOTREF(__pyx_t_1);
13145  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13146  }
13147  }
13148  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13149  __pyx_r = __pyx_t_1;
13150  __pyx_t_1 = 0;
13151  goto __pyx_L0;
13152 
13153  /* "PyClical.pyx":1518
13154  * return clifford(obj).pow(m)
13155  *
13156  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13157  * """
13158  * Outer product power of multivector.
13159  */
13160 
13161  /* function exit code */
13162  __pyx_L1_error:;
13163  __Pyx_XDECREF(__pyx_t_1);
13164  __Pyx_XDECREF(__pyx_t_2);
13165  __Pyx_XDECREF(__pyx_t_3);
13166  __Pyx_XDECREF(__pyx_t_4);
13167  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13168  __pyx_r = 0;
13169  __pyx_L0:;
13170  __Pyx_XGIVEREF(__pyx_r);
13171  __Pyx_RefNannyFinishContext();
13172  return __pyx_r;
13173  }
13174 
13175  /* Python wrapper */
13176  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13177  static char __pyx_doc_8PyClical_40outer_pow[] = "\n Outer product power of multivector.\n\n >>> print outer_pow(clifford(\"1+{1}+{1,2}\"),3)\n 1+3{1}+3{1,2}\n ";
13178  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13179  PyObject *__pyx_v_obj = 0;
13180  PyObject *__pyx_v_m = 0;
13181  PyObject *__pyx_r = 0;
13182  __Pyx_RefNannyDeclarations
13183  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
13184  {
13185  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13186  PyObject* values[2] = {0,0};
13187  if (unlikely(__pyx_kwds)) {
13188  Py_ssize_t kw_args;
13189  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13190  switch (pos_args) {
13191  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13192  CYTHON_FALLTHROUGH;
13193  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13194  CYTHON_FALLTHROUGH;
13195  case 0: break;
13196  default: goto __pyx_L5_argtuple_error;
13197  }
13198  kw_args = PyDict_Size(__pyx_kwds);
13199  switch (pos_args) {
13200  case 0:
13201  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13202  else goto __pyx_L5_argtuple_error;
13203  CYTHON_FALLTHROUGH;
13204  case 1:
13205  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13206  else {
13207  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
13208  }
13209  }
13210  if (unlikely(kw_args > 0)) {
13211  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
13212  }
13213  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13214  goto __pyx_L5_argtuple_error;
13215  } else {
13216  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13217  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13218  }
13219  __pyx_v_obj = values[0];
13220  __pyx_v_m = values[1];
13221  }
13222  goto __pyx_L4_argument_unpacking_done;
13223  __pyx_L5_argtuple_error:;
13224  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
13225  __pyx_L3_error:;
13226  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13227  __Pyx_RefNannyFinishContext();
13228  return NULL;
13229  __pyx_L4_argument_unpacking_done:;
13230  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13231 
13232  /* function exit code */
13233  __Pyx_RefNannyFinishContext();
13234  return __pyx_r;
13235  }
13236 
13237  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13238  PyObject *__pyx_r = NULL;
13239  __Pyx_RefNannyDeclarations
13240  PyObject *__pyx_t_1 = NULL;
13241  __Pyx_RefNannySetupContext("outer_pow", 0);
13242  __Pyx_XDECREF(__pyx_r);
13243  __pyx_t_1 = __pyx_f_8PyClical_outer_pow(__pyx_v_obj, __pyx_v_m, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1518, __pyx_L1_error)
13244  __Pyx_GOTREF(__pyx_t_1);
13245  __pyx_r = __pyx_t_1;
13246  __pyx_t_1 = 0;
13247  goto __pyx_L0;
13248 
13249  /* function exit code */
13250  __pyx_L1_error:;
13251  __Pyx_XDECREF(__pyx_t_1);
13252  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13253  __pyx_r = NULL;
13254  __pyx_L0:;
13255  __Pyx_XGIVEREF(__pyx_r);
13256  __Pyx_RefNannyFinishContext();
13257  return __pyx_r;
13258  }
13259 
13260  /* "PyClical.pyx":1527
13261  * return clifford(obj).outer_pow(m)
13262  *
13263  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13264  * """
13265  * Square root of -1 which commutes with all members of the frame of the given multivector.
13266  */
13267 
13268  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13269  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13270  PyObject *__pyx_r = NULL;
13271  __Pyx_RefNannyDeclarations
13272  PyObject *__pyx_t_1 = NULL;
13273  PyObject *__pyx_t_2 = NULL;
13274  __Pyx_RefNannySetupContext("complexifier", 0);
13275 
13276  /* "PyClical.pyx":1540
13277  * {-1}
13278  * """
13279  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13280  *
13281  * cpdef inline sqrt(obj, i = None):
13282  */
13283  __Pyx_XDECREF(__pyx_r);
13284  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13285  __Pyx_GOTREF(__pyx_t_1);
13286  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), complexifier(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error)
13287  __Pyx_GOTREF(__pyx_t_2);
13288  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13289  __pyx_r = __pyx_t_2;
13290  __pyx_t_2 = 0;
13291  goto __pyx_L0;
13292 
13293  /* "PyClical.pyx":1527
13294  * return clifford(obj).outer_pow(m)
13295  *
13296  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13297  * """
13298  * Square root of -1 which commutes with all members of the frame of the given multivector.
13299  */
13300 
13301  /* function exit code */
13302  __pyx_L1_error:;
13303  __Pyx_XDECREF(__pyx_t_1);
13304  __Pyx_XDECREF(__pyx_t_2);
13305  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13306  __pyx_r = 0;
13307  __pyx_L0:;
13308  __Pyx_XGIVEREF(__pyx_r);
13309  __Pyx_RefNannyFinishContext();
13310  return __pyx_r;
13311  }
13312 
13313  /* Python wrapper */
13314  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13315  static char __pyx_doc_8PyClical_42complexifier[] = "\n Square root of -1 which commutes with all members of the frame of the given multivector.\n\n >>> print complexifier(clifford(index_set({1})))\n {1,2,3}\n >>> print complexifier(clifford(index_set({-1})))\n {-1}\n >>> print complexifier(index_set({1}))\n {1,2,3}\n >>> print complexifier(index_set({-1}))\n {-1}\n ";
13316  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13317  PyObject *__pyx_r = 0;
13318  __Pyx_RefNannyDeclarations
13319  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13320  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13321 
13322  /* function exit code */
13323  __Pyx_RefNannyFinishContext();
13324  return __pyx_r;
13325  }
13326 
13327  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13328  PyObject *__pyx_r = NULL;
13329  __Pyx_RefNannyDeclarations
13330  PyObject *__pyx_t_1 = NULL;
13331  __Pyx_RefNannySetupContext("complexifier", 0);
13332  __Pyx_XDECREF(__pyx_r);
13333  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13334  __Pyx_GOTREF(__pyx_t_1);
13335  __pyx_r = __pyx_t_1;
13336  __pyx_t_1 = 0;
13337  goto __pyx_L0;
13338 
13339  /* function exit code */
13340  __pyx_L1_error:;
13341  __Pyx_XDECREF(__pyx_t_1);
13342  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13343  __pyx_r = NULL;
13344  __pyx_L0:;
13345  __Pyx_XGIVEREF(__pyx_r);
13346  __Pyx_RefNannyFinishContext();
13347  return __pyx_r;
13348  }
13349 
13350  /* "PyClical.pyx":1542
13351  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13352  *
13353  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13354  * """
13355  * Square root of multivector with optional complexifier.
13356  */
13357 
13358  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13359  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args) {
13360  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13361  PyObject *__pyx_r = NULL;
13362  __Pyx_RefNannyDeclarations
13363  int __pyx_t_1;
13364  int __pyx_t_2;
13365  PyObject *__pyx_t_3 = NULL;
13366  Clifford __pyx_t_4;
13367  PyObject *__pyx_t_5 = NULL;
13368  PyObject *__pyx_t_6 = NULL;
13369  PyObject *__pyx_t_7 = NULL;
13370  PyObject *__pyx_t_8 = NULL;
13371  PyObject *__pyx_t_9 = NULL;
13372  PyObject *__pyx_t_10 = NULL;
13373  PyObject *__pyx_t_11 = NULL;
13374  __Pyx_RefNannySetupContext("sqrt", 0);
13375  if (__pyx_optional_args) {
13376  if (__pyx_optional_args->__pyx_n > 0) {
13377  __pyx_v_i = __pyx_optional_args->i;
13378  }
13379  }
13380 
13381  /* "PyClical.pyx":1557
13382  * -1
13383  * """
13384  * if not (i is None): # <<<<<<<<<<<<<<
13385  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13386  * else:
13387  */
13388  __pyx_t_1 = (__pyx_v_i != Py_None);
13389  __pyx_t_2 = (__pyx_t_1 != 0);
13390  if (__pyx_t_2) {
13391 
13392  /* "PyClical.pyx":1558
13393  * """
13394  * if not (i is None):
13395  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13396  * else:
13397  * try:
13398  */
13399  __Pyx_XDECREF(__pyx_r);
13400  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13401  __Pyx_GOTREF(__pyx_t_3);
13402  try {
13403  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13404  } catch(...) {
13405  __Pyx_CppExn2PyErr();
13406  __PYX_ERR(0, 1558, __pyx_L1_error)
13407  }
13408  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1558, __pyx_L1_error)
13409  __Pyx_GOTREF(__pyx_t_5);
13410  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13411  __pyx_r = __pyx_t_5;
13412  __pyx_t_5 = 0;
13413  goto __pyx_L0;
13414 
13415  /* "PyClical.pyx":1557
13416  * -1
13417  * """
13418  * if not (i is None): # <<<<<<<<<<<<<<
13419  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13420  * else:
13421  */
13422  }
13423 
13424  /* "PyClical.pyx":1560
13425  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13426  * else:
13427  * try: # <<<<<<<<<<<<<<
13428  * return math.sqrt(obj)
13429  * except:
13430  */
13431  /*else*/ {
13432  {
13433  __Pyx_PyThreadState_declare
13434  __Pyx_PyThreadState_assign
13435  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13436  __Pyx_XGOTREF(__pyx_t_6);
13437  __Pyx_XGOTREF(__pyx_t_7);
13438  __Pyx_XGOTREF(__pyx_t_8);
13439  /*try:*/ {
13440 
13441  /* "PyClical.pyx":1561
13442  * else:
13443  * try:
13444  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13445  * except:
13446  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13447  */
13448  __Pyx_XDECREF(__pyx_r);
13449  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13450  __Pyx_GOTREF(__pyx_t_3);
13451  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1561, __pyx_L4_error)
13452  __Pyx_GOTREF(__pyx_t_9);
13453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13454  __pyx_t_3 = NULL;
13455  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13456  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13457  if (likely(__pyx_t_3)) {
13458  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13459  __Pyx_INCREF(__pyx_t_3);
13460  __Pyx_INCREF(function);
13461  __Pyx_DECREF_SET(__pyx_t_9, function);
13462  }
13463  }
13464  if (!__pyx_t_3) {
13465  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13466  __Pyx_GOTREF(__pyx_t_5);
13467  } else {
13468  #if CYTHON_FAST_PYCALL
13469  if (PyFunction_Check(__pyx_t_9)) {
13470  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13471  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13472  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13473  __Pyx_GOTREF(__pyx_t_5);
13474  } else
13475  #endif
13476  #if CYTHON_FAST_PYCCALL
13477  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13478  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13479  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13480  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13481  __Pyx_GOTREF(__pyx_t_5);
13482  } else
13483  #endif
13484  {
13485  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L4_error)
13486  __Pyx_GOTREF(__pyx_t_10);
13487  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13488  __Pyx_INCREF(__pyx_v_obj);
13489  __Pyx_GIVEREF(__pyx_v_obj);
13490  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13491  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13492  __Pyx_GOTREF(__pyx_t_5);
13493  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13494  }
13495  }
13496  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13497  __pyx_r = __pyx_t_5;
13498  __pyx_t_5 = 0;
13499  goto __pyx_L8_try_return;
13500 
13501  /* "PyClical.pyx":1560
13502  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13503  * else:
13504  * try: # <<<<<<<<<<<<<<
13505  * return math.sqrt(obj)
13506  * except:
13507  */
13508  }
13509  __pyx_L4_error:;
13510  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13511  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13512  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13513  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13514 
13515  /* "PyClical.pyx":1562
13516  * try:
13517  * return math.sqrt(obj)
13518  * except: # <<<<<<<<<<<<<<
13519  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13520  *
13521  */
13522  /*except:*/ {
13523  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13524  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13525  __Pyx_GOTREF(__pyx_t_5);
13526  __Pyx_GOTREF(__pyx_t_9);
13527  __Pyx_GOTREF(__pyx_t_10);
13528 
13529  /* "PyClical.pyx":1563
13530  * return math.sqrt(obj)
13531  * except:
13532  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13533  *
13534  * cpdef inline exp(obj):
13535  */
13536  __Pyx_XDECREF(__pyx_r);
13537  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13538  __Pyx_GOTREF(__pyx_t_3);
13539  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13540  __Pyx_GOTREF(__pyx_t_11);
13541  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13542  __pyx_r = __pyx_t_11;
13543  __pyx_t_11 = 0;
13544  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13545  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13546  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13547  goto __pyx_L7_except_return;
13548  }
13549  __pyx_L6_except_error:;
13550 
13551  /* "PyClical.pyx":1560
13552  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13553  * else:
13554  * try: # <<<<<<<<<<<<<<
13555  * return math.sqrt(obj)
13556  * except:
13557  */
13558  __Pyx_XGIVEREF(__pyx_t_6);
13559  __Pyx_XGIVEREF(__pyx_t_7);
13560  __Pyx_XGIVEREF(__pyx_t_8);
13561  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13562  goto __pyx_L1_error;
13563  __pyx_L8_try_return:;
13564  __Pyx_XGIVEREF(__pyx_t_6);
13565  __Pyx_XGIVEREF(__pyx_t_7);
13566  __Pyx_XGIVEREF(__pyx_t_8);
13567  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13568  goto __pyx_L0;
13569  __pyx_L7_except_return:;
13570  __Pyx_XGIVEREF(__pyx_t_6);
13571  __Pyx_XGIVEREF(__pyx_t_7);
13572  __Pyx_XGIVEREF(__pyx_t_8);
13573  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13574  goto __pyx_L0;
13575  }
13576  }
13577 
13578  /* "PyClical.pyx":1542
13579  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13580  *
13581  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13582  * """
13583  * Square root of multivector with optional complexifier.
13584  */
13585 
13586  /* function exit code */
13587  __pyx_L1_error:;
13588  __Pyx_XDECREF(__pyx_t_3);
13589  __Pyx_XDECREF(__pyx_t_5);
13590  __Pyx_XDECREF(__pyx_t_9);
13591  __Pyx_XDECREF(__pyx_t_10);
13592  __Pyx_XDECREF(__pyx_t_11);
13593  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13594  __pyx_r = 0;
13595  __pyx_L0:;
13596  __Pyx_XGIVEREF(__pyx_r);
13597  __Pyx_RefNannyFinishContext();
13598  return __pyx_r;
13599  }
13600 
13601  /* Python wrapper */
13602  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13603  static char __pyx_doc_8PyClical_44sqrt[] = "\n Square root of multivector with optional complexifier.\n\n >>> print sqrt(-1)\n {-1}\n >>> print sqrt(clifford(\"2{-1}\"))\n 1+{-1}\n >>> j=sqrt(-1,complexifier(index_set({1}))); print j; print j*j\n {1,2,3}\n -1\n >>> j=sqrt(-1,\"{1,2,3}\"); print j; print j*j\n {1,2,3}\n -1\n ";
13604  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13605  PyObject *__pyx_v_obj = 0;
13606  PyObject *__pyx_v_i = 0;
13607  PyObject *__pyx_r = 0;
13608  __Pyx_RefNannyDeclarations
13609  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13610  {
13611  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13612  PyObject* values[2] = {0,0};
13613  values[1] = ((PyObject *)Py_None);
13614  if (unlikely(__pyx_kwds)) {
13615  Py_ssize_t kw_args;
13616  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13617  switch (pos_args) {
13618  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13619  CYTHON_FALLTHROUGH;
13620  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13621  CYTHON_FALLTHROUGH;
13622  case 0: break;
13623  default: goto __pyx_L5_argtuple_error;
13624  }
13625  kw_args = PyDict_Size(__pyx_kwds);
13626  switch (pos_args) {
13627  case 0:
13628  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13629  else goto __pyx_L5_argtuple_error;
13630  CYTHON_FALLTHROUGH;
13631  case 1:
13632  if (kw_args > 0) {
13633  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13634  if (value) { values[1] = value; kw_args--; }
13635  }
13636  }
13637  if (unlikely(kw_args > 0)) {
13638  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13639  }
13640  } else {
13641  switch (PyTuple_GET_SIZE(__pyx_args)) {
13642  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13643  CYTHON_FALLTHROUGH;
13644  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13645  break;
13646  default: goto __pyx_L5_argtuple_error;
13647  }
13648  }
13649  __pyx_v_obj = values[0];
13650  __pyx_v_i = values[1];
13651  }
13652  goto __pyx_L4_argument_unpacking_done;
13653  __pyx_L5_argtuple_error:;
13654  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13655  __pyx_L3_error:;
13656  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13657  __Pyx_RefNannyFinishContext();
13658  return NULL;
13659  __pyx_L4_argument_unpacking_done:;
13660  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13661 
13662  /* function exit code */
13663  __Pyx_RefNannyFinishContext();
13664  return __pyx_r;
13665  }
13666 
13667  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13668  PyObject *__pyx_r = NULL;
13669  __Pyx_RefNannyDeclarations
13670  PyObject *__pyx_t_1 = NULL;
13671  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13672  __Pyx_RefNannySetupContext("sqrt", 0);
13673  __Pyx_XDECREF(__pyx_r);
13674  __pyx_t_2.__pyx_n = 1;
13675  __pyx_t_2.i = __pyx_v_i;
13676  __pyx_t_1 = __pyx_f_8PyClical_sqrt(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
13677  __Pyx_GOTREF(__pyx_t_1);
13678  __pyx_r = __pyx_t_1;
13679  __pyx_t_1 = 0;
13680  goto __pyx_L0;
13681 
13682  /* function exit code */
13683  __pyx_L1_error:;
13684  __Pyx_XDECREF(__pyx_t_1);
13685  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13686  __pyx_r = NULL;
13687  __pyx_L0:;
13688  __Pyx_XGIVEREF(__pyx_r);
13689  __Pyx_RefNannyFinishContext();
13690  return __pyx_r;
13691  }
13692 
13693  /* "PyClical.pyx":1565
13694  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13695  *
13696  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13697  * """
13698  * Exponential of multivector.
13699  */
13700 
13701  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13702  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13703  PyObject *__pyx_r = NULL;
13704  __Pyx_RefNannyDeclarations
13705  PyObject *__pyx_t_1 = NULL;
13706  PyObject *__pyx_t_2 = NULL;
13707  PyObject *__pyx_t_3 = NULL;
13708  PyObject *__pyx_t_4 = NULL;
13709  PyObject *__pyx_t_5 = NULL;
13710  PyObject *__pyx_t_6 = NULL;
13711  PyObject *__pyx_t_7 = NULL;
13712  PyObject *__pyx_t_8 = NULL;
13713  __Pyx_RefNannySetupContext("exp", 0);
13714 
13715  /* "PyClical.pyx":1574
13716  * {1,2}
13717  * """
13718  * try: # <<<<<<<<<<<<<<
13719  * return math.exp(obj)
13720  * except:
13721  */
13722  {
13723  __Pyx_PyThreadState_declare
13724  __Pyx_PyThreadState_assign
13725  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13726  __Pyx_XGOTREF(__pyx_t_1);
13727  __Pyx_XGOTREF(__pyx_t_2);
13728  __Pyx_XGOTREF(__pyx_t_3);
13729  /*try:*/ {
13730 
13731  /* "PyClical.pyx":1575
13732  * """
13733  * try:
13734  * return math.exp(obj) # <<<<<<<<<<<<<<
13735  * except:
13736  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13737  */
13738  __Pyx_XDECREF(__pyx_r);
13739  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13740  __Pyx_GOTREF(__pyx_t_5);
13741  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L3_error)
13742  __Pyx_GOTREF(__pyx_t_6);
13743  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13744  __pyx_t_5 = NULL;
13745  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13746  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13747  if (likely(__pyx_t_5)) {
13748  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13749  __Pyx_INCREF(__pyx_t_5);
13750  __Pyx_INCREF(function);
13751  __Pyx_DECREF_SET(__pyx_t_6, function);
13752  }
13753  }
13754  if (!__pyx_t_5) {
13755  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13756  __Pyx_GOTREF(__pyx_t_4);
13757  } else {
13758  #if CYTHON_FAST_PYCALL
13759  if (PyFunction_Check(__pyx_t_6)) {
13760  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13761  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13762  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13763  __Pyx_GOTREF(__pyx_t_4);
13764  } else
13765  #endif
13766  #if CYTHON_FAST_PYCCALL
13767  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13768  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13769  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13770  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13771  __Pyx_GOTREF(__pyx_t_4);
13772  } else
13773  #endif
13774  {
13775  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L3_error)
13776  __Pyx_GOTREF(__pyx_t_7);
13777  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13778  __Pyx_INCREF(__pyx_v_obj);
13779  __Pyx_GIVEREF(__pyx_v_obj);
13780  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13781  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13782  __Pyx_GOTREF(__pyx_t_4);
13783  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13784  }
13785  }
13786  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13787  __pyx_r = __pyx_t_4;
13788  __pyx_t_4 = 0;
13789  goto __pyx_L7_try_return;
13790 
13791  /* "PyClical.pyx":1574
13792  * {1,2}
13793  * """
13794  * try: # <<<<<<<<<<<<<<
13795  * return math.exp(obj)
13796  * except:
13797  */
13798  }
13799  __pyx_L3_error:;
13800  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13801  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13802  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13803  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13804 
13805  /* "PyClical.pyx":1576
13806  * try:
13807  * return math.exp(obj)
13808  * except: # <<<<<<<<<<<<<<
13809  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13810  *
13811  */
13812  /*except:*/ {
13813  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13814  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13815  __Pyx_GOTREF(__pyx_t_4);
13816  __Pyx_GOTREF(__pyx_t_6);
13817  __Pyx_GOTREF(__pyx_t_7);
13818 
13819  /* "PyClical.pyx":1577
13820  * return math.exp(obj)
13821  * except:
13822  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13823  *
13824  * cpdef inline log(obj,i = None):
13825  */
13826  __Pyx_XDECREF(__pyx_r);
13827  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13828  __Pyx_GOTREF(__pyx_t_5);
13829  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), exp(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13830  __Pyx_GOTREF(__pyx_t_8);
13831  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13832  __pyx_r = __pyx_t_8;
13833  __pyx_t_8 = 0;
13834  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13835  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13836  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13837  goto __pyx_L6_except_return;
13838  }
13839  __pyx_L5_except_error:;
13840 
13841  /* "PyClical.pyx":1574
13842  * {1,2}
13843  * """
13844  * try: # <<<<<<<<<<<<<<
13845  * return math.exp(obj)
13846  * except:
13847  */
13848  __Pyx_XGIVEREF(__pyx_t_1);
13849  __Pyx_XGIVEREF(__pyx_t_2);
13850  __Pyx_XGIVEREF(__pyx_t_3);
13851  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13852  goto __pyx_L1_error;
13853  __pyx_L7_try_return:;
13854  __Pyx_XGIVEREF(__pyx_t_1);
13855  __Pyx_XGIVEREF(__pyx_t_2);
13856  __Pyx_XGIVEREF(__pyx_t_3);
13857  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13858  goto __pyx_L0;
13859  __pyx_L6_except_return:;
13860  __Pyx_XGIVEREF(__pyx_t_1);
13861  __Pyx_XGIVEREF(__pyx_t_2);
13862  __Pyx_XGIVEREF(__pyx_t_3);
13863  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13864  goto __pyx_L0;
13865  }
13866 
13867  /* "PyClical.pyx":1565
13868  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13869  *
13870  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13871  * """
13872  * Exponential of multivector.
13873  */
13874 
13875  /* function exit code */
13876  __pyx_L1_error:;
13877  __Pyx_XDECREF(__pyx_t_4);
13878  __Pyx_XDECREF(__pyx_t_5);
13879  __Pyx_XDECREF(__pyx_t_6);
13880  __Pyx_XDECREF(__pyx_t_7);
13881  __Pyx_XDECREF(__pyx_t_8);
13882  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13883  __pyx_r = 0;
13884  __pyx_L0:;
13885  __Pyx_XGIVEREF(__pyx_r);
13886  __Pyx_RefNannyFinishContext();
13887  return __pyx_r;
13888  }
13889 
13890  /* Python wrapper */
13891  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13892  static char __pyx_doc_8PyClical_46exp[] = "\n Exponential of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print exp(x)\n 0.7071+0.7071{1,2}\n >>> x=clifford(\"{1,2}\") * pi/2; print exp(x)\n {1,2}\n ";
13893  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13894  PyObject *__pyx_r = 0;
13895  __Pyx_RefNannyDeclarations
13896  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13897  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13898 
13899  /* function exit code */
13900  __Pyx_RefNannyFinishContext();
13901  return __pyx_r;
13902  }
13903 
13904  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13905  PyObject *__pyx_r = NULL;
13906  __Pyx_RefNannyDeclarations
13907  PyObject *__pyx_t_1 = NULL;
13908  __Pyx_RefNannySetupContext("exp", 0);
13909  __Pyx_XDECREF(__pyx_r);
13910  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13911  __Pyx_GOTREF(__pyx_t_1);
13912  __pyx_r = __pyx_t_1;
13913  __pyx_t_1 = 0;
13914  goto __pyx_L0;
13915 
13916  /* function exit code */
13917  __pyx_L1_error:;
13918  __Pyx_XDECREF(__pyx_t_1);
13919  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13920  __pyx_r = NULL;
13921  __pyx_L0:;
13922  __Pyx_XGIVEREF(__pyx_r);
13923  __Pyx_RefNannyFinishContext();
13924  return __pyx_r;
13925  }
13926 
13927  /* "PyClical.pyx":1579
13928  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13929  *
13930  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13931  * """
13932  * Natural logarithm of multivector with optional complexifier.
13933  */
13934 
13935  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13936  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args) {
13937  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13938  PyObject *__pyx_r = NULL;
13939  __Pyx_RefNannyDeclarations
13940  int __pyx_t_1;
13941  int __pyx_t_2;
13942  PyObject *__pyx_t_3 = NULL;
13943  Clifford __pyx_t_4;
13944  PyObject *__pyx_t_5 = NULL;
13945  PyObject *__pyx_t_6 = NULL;
13946  PyObject *__pyx_t_7 = NULL;
13947  PyObject *__pyx_t_8 = NULL;
13948  PyObject *__pyx_t_9 = NULL;
13949  PyObject *__pyx_t_10 = NULL;
13950  PyObject *__pyx_t_11 = NULL;
13951  __Pyx_RefNannySetupContext("log", 0);
13952  if (__pyx_optional_args) {
13953  if (__pyx_optional_args->__pyx_n > 0) {
13954  __pyx_v_i = __pyx_optional_args->i;
13955  }
13956  }
13957 
13958  /* "PyClical.pyx":1594
13959  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13960  * """
13961  * if not (i is None): # <<<<<<<<<<<<<<
13962  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13963  * else:
13964  */
13965  __pyx_t_1 = (__pyx_v_i != Py_None);
13966  __pyx_t_2 = (__pyx_t_1 != 0);
13967  if (__pyx_t_2) {
13968 
13969  /* "PyClical.pyx":1595
13970  * """
13971  * if not (i is None):
13972  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13973  * else:
13974  * try:
13975  */
13976  __Pyx_XDECREF(__pyx_r);
13977  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13978  __Pyx_GOTREF(__pyx_t_3);
13979  try {
13980  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13981  } catch(...) {
13982  __Pyx_CppExn2PyErr();
13983  __PYX_ERR(0, 1595, __pyx_L1_error)
13984  }
13985  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1595, __pyx_L1_error)
13986  __Pyx_GOTREF(__pyx_t_5);
13987  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13988  __pyx_r = __pyx_t_5;
13989  __pyx_t_5 = 0;
13990  goto __pyx_L0;
13991 
13992  /* "PyClical.pyx":1594
13993  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13994  * """
13995  * if not (i is None): # <<<<<<<<<<<<<<
13996  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13997  * else:
13998  */
13999  }
14000 
14001  /* "PyClical.pyx":1597
14002  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14003  * else:
14004  * try: # <<<<<<<<<<<<<<
14005  * return math.log(obj)
14006  * except:
14007  */
14008  /*else*/ {
14009  {
14010  __Pyx_PyThreadState_declare
14011  __Pyx_PyThreadState_assign
14012  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14013  __Pyx_XGOTREF(__pyx_t_6);
14014  __Pyx_XGOTREF(__pyx_t_7);
14015  __Pyx_XGOTREF(__pyx_t_8);
14016  /*try:*/ {
14017 
14018  /* "PyClical.pyx":1598
14019  * else:
14020  * try:
14021  * return math.log(obj) # <<<<<<<<<<<<<<
14022  * except:
14023  * return clifford().wrap( glucat.log(toClifford(obj)) )
14024  */
14025  __Pyx_XDECREF(__pyx_r);
14026  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
14027  __Pyx_GOTREF(__pyx_t_3);
14028  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1598, __pyx_L4_error)
14029  __Pyx_GOTREF(__pyx_t_9);
14030  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14031  __pyx_t_3 = NULL;
14032  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14033  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14034  if (likely(__pyx_t_3)) {
14035  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14036  __Pyx_INCREF(__pyx_t_3);
14037  __Pyx_INCREF(function);
14038  __Pyx_DECREF_SET(__pyx_t_9, function);
14039  }
14040  }
14041  if (!__pyx_t_3) {
14042  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
14043  __Pyx_GOTREF(__pyx_t_5);
14044  } else {
14045  #if CYTHON_FAST_PYCALL
14046  if (PyFunction_Check(__pyx_t_9)) {
14047  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14048  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
14049  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14050  __Pyx_GOTREF(__pyx_t_5);
14051  } else
14052  #endif
14053  #if CYTHON_FAST_PYCCALL
14054  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14055  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14056  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
14057  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14058  __Pyx_GOTREF(__pyx_t_5);
14059  } else
14060  #endif
14061  {
14062  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1598, __pyx_L4_error)
14063  __Pyx_GOTREF(__pyx_t_10);
14064  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14065  __Pyx_INCREF(__pyx_v_obj);
14066  __Pyx_GIVEREF(__pyx_v_obj);
14067  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14068  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
14069  __Pyx_GOTREF(__pyx_t_5);
14070  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14071  }
14072  }
14073  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14074  __pyx_r = __pyx_t_5;
14075  __pyx_t_5 = 0;
14076  goto __pyx_L8_try_return;
14077 
14078  /* "PyClical.pyx":1597
14079  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14080  * else:
14081  * try: # <<<<<<<<<<<<<<
14082  * return math.log(obj)
14083  * except:
14084  */
14085  }
14086  __pyx_L4_error:;
14087  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14088  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14089  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14090  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14091 
14092  /* "PyClical.pyx":1599
14093  * try:
14094  * return math.log(obj)
14095  * except: # <<<<<<<<<<<<<<
14096  * return clifford().wrap( glucat.log(toClifford(obj)) )
14097  *
14098  */
14099  /*except:*/ {
14100  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14101  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
14102  __Pyx_GOTREF(__pyx_t_5);
14103  __Pyx_GOTREF(__pyx_t_9);
14104  __Pyx_GOTREF(__pyx_t_10);
14105 
14106  /* "PyClical.pyx":1600
14107  * return math.log(obj)
14108  * except:
14109  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
14110  *
14111  * cpdef inline cos(obj,i = None):
14112  */
14113  __Pyx_XDECREF(__pyx_r);
14114  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
14115  __Pyx_GOTREF(__pyx_t_3);
14116  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), log(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
14117  __Pyx_GOTREF(__pyx_t_11);
14118  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14119  __pyx_r = __pyx_t_11;
14120  __pyx_t_11 = 0;
14121  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14122  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14123  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14124  goto __pyx_L7_except_return;
14125  }
14126  __pyx_L6_except_error:;
14127 
14128  /* "PyClical.pyx":1597
14129  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14130  * else:
14131  * try: # <<<<<<<<<<<<<<
14132  * return math.log(obj)
14133  * except:
14134  */
14135  __Pyx_XGIVEREF(__pyx_t_6);
14136  __Pyx_XGIVEREF(__pyx_t_7);
14137  __Pyx_XGIVEREF(__pyx_t_8);
14138  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14139  goto __pyx_L1_error;
14140  __pyx_L8_try_return:;
14141  __Pyx_XGIVEREF(__pyx_t_6);
14142  __Pyx_XGIVEREF(__pyx_t_7);
14143  __Pyx_XGIVEREF(__pyx_t_8);
14144  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14145  goto __pyx_L0;
14146  __pyx_L7_except_return:;
14147  __Pyx_XGIVEREF(__pyx_t_6);
14148  __Pyx_XGIVEREF(__pyx_t_7);
14149  __Pyx_XGIVEREF(__pyx_t_8);
14150  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14151  goto __pyx_L0;
14152  }
14153  }
14154 
14155  /* "PyClical.pyx":1579
14156  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14157  *
14158  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14159  * """
14160  * Natural logarithm of multivector with optional complexifier.
14161  */
14162 
14163  /* function exit code */
14164  __pyx_L1_error:;
14165  __Pyx_XDECREF(__pyx_t_3);
14166  __Pyx_XDECREF(__pyx_t_5);
14167  __Pyx_XDECREF(__pyx_t_9);
14168  __Pyx_XDECREF(__pyx_t_10);
14169  __Pyx_XDECREF(__pyx_t_11);
14170  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14171  __pyx_r = 0;
14172  __pyx_L0:;
14173  __Pyx_XGIVEREF(__pyx_r);
14174  __Pyx_RefNannyFinishContext();
14175  return __pyx_r;
14176  }
14177 
14178  /* Python wrapper */
14179  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14180  static char __pyx_doc_8PyClical_48log[] = "\n Natural logarithm of multivector with optional complexifier.\n\n >>> x=clifford(\"{-1}\"); print (log(x,\"{-1}\") * 2/pi)\n {-1}\n >>> x=clifford(\"{1,2}\"); print (log(x,\"{1,2,3}\") * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print (log(x) * 2/pi)\n {1,2}\n >>> x=clifford(\"{1,2}\"); print (log(x,\"{1,2}\") * 2/pi)\n Traceback (most recent call last):\n ...\n RuntimeError: check_complex(val, i): i is not a valid complexifier for val\n ";
14181  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14182  PyObject *__pyx_v_obj = 0;
14183  PyObject *__pyx_v_i = 0;
14184  PyObject *__pyx_r = 0;
14185  __Pyx_RefNannyDeclarations
14186  __Pyx_RefNannySetupContext("log (wrapper)", 0);
14187  {
14188  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14189  PyObject* values[2] = {0,0};
14190  values[1] = ((PyObject *)Py_None);
14191  if (unlikely(__pyx_kwds)) {
14192  Py_ssize_t kw_args;
14193  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14194  switch (pos_args) {
14195  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14196  CYTHON_FALLTHROUGH;
14197  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14198  CYTHON_FALLTHROUGH;
14199  case 0: break;
14200  default: goto __pyx_L5_argtuple_error;
14201  }
14202  kw_args = PyDict_Size(__pyx_kwds);
14203  switch (pos_args) {
14204  case 0:
14205  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14206  else goto __pyx_L5_argtuple_error;
14207  CYTHON_FALLTHROUGH;
14208  case 1:
14209  if (kw_args > 0) {
14210  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14211  if (value) { values[1] = value; kw_args--; }
14212  }
14213  }
14214  if (unlikely(kw_args > 0)) {
14215  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
14216  }
14217  } else {
14218  switch (PyTuple_GET_SIZE(__pyx_args)) {
14219  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14220  CYTHON_FALLTHROUGH;
14221  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14222  break;
14223  default: goto __pyx_L5_argtuple_error;
14224  }
14225  }
14226  __pyx_v_obj = values[0];
14227  __pyx_v_i = values[1];
14228  }
14229  goto __pyx_L4_argument_unpacking_done;
14230  __pyx_L5_argtuple_error:;
14231  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
14232  __pyx_L3_error:;
14233  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14234  __Pyx_RefNannyFinishContext();
14235  return NULL;
14236  __pyx_L4_argument_unpacking_done:;
14237  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14238 
14239  /* function exit code */
14240  __Pyx_RefNannyFinishContext();
14241  return __pyx_r;
14242  }
14243 
14244  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14245  PyObject *__pyx_r = NULL;
14246  __Pyx_RefNannyDeclarations
14247  PyObject *__pyx_t_1 = NULL;
14248  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14249  __Pyx_RefNannySetupContext("log", 0);
14250  __Pyx_XDECREF(__pyx_r);
14251  __pyx_t_2.__pyx_n = 1;
14252  __pyx_t_2.i = __pyx_v_i;
14253  __pyx_t_1 = __pyx_f_8PyClical_log(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error)
14254  __Pyx_GOTREF(__pyx_t_1);
14255  __pyx_r = __pyx_t_1;
14256  __pyx_t_1 = 0;
14257  goto __pyx_L0;
14258 
14259  /* function exit code */
14260  __pyx_L1_error:;
14261  __Pyx_XDECREF(__pyx_t_1);
14262  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14263  __pyx_r = NULL;
14264  __pyx_L0:;
14265  __Pyx_XGIVEREF(__pyx_r);
14266  __Pyx_RefNannyFinishContext();
14267  return __pyx_r;
14268  }
14269 
14270  /* "PyClical.pyx":1602
14271  * return clifford().wrap( glucat.log(toClifford(obj)) )
14272  *
14273  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14274  * """
14275  * Cosine of multivector with optional complexifier.
14276  */
14277 
14278  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14279  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args) {
14280  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14281  PyObject *__pyx_r = NULL;
14282  __Pyx_RefNannyDeclarations
14283  int __pyx_t_1;
14284  int __pyx_t_2;
14285  PyObject *__pyx_t_3 = NULL;
14286  Clifford __pyx_t_4;
14287  PyObject *__pyx_t_5 = NULL;
14288  PyObject *__pyx_t_6 = NULL;
14289  PyObject *__pyx_t_7 = NULL;
14290  PyObject *__pyx_t_8 = NULL;
14291  PyObject *__pyx_t_9 = NULL;
14292  PyObject *__pyx_t_10 = NULL;
14293  PyObject *__pyx_t_11 = NULL;
14294  __Pyx_RefNannySetupContext("cos", 0);
14295  if (__pyx_optional_args) {
14296  if (__pyx_optional_args->__pyx_n > 0) {
14297  __pyx_v_i = __pyx_optional_args->i;
14298  }
14299  }
14300 
14301  /* "PyClical.pyx":1611
14302  * {1,2}
14303  * """
14304  * if not (i is None): # <<<<<<<<<<<<<<
14305  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14306  * else:
14307  */
14308  __pyx_t_1 = (__pyx_v_i != Py_None);
14309  __pyx_t_2 = (__pyx_t_1 != 0);
14310  if (__pyx_t_2) {
14311 
14312  /* "PyClical.pyx":1612
14313  * """
14314  * if not (i is None):
14315  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14316  * else:
14317  * try:
14318  */
14319  __Pyx_XDECREF(__pyx_r);
14320  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
14321  __Pyx_GOTREF(__pyx_t_3);
14322  try {
14323  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14324  } catch(...) {
14325  __Pyx_CppExn2PyErr();
14326  __PYX_ERR(0, 1612, __pyx_L1_error)
14327  }
14328  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1612, __pyx_L1_error)
14329  __Pyx_GOTREF(__pyx_t_5);
14330  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14331  __pyx_r = __pyx_t_5;
14332  __pyx_t_5 = 0;
14333  goto __pyx_L0;
14334 
14335  /* "PyClical.pyx":1611
14336  * {1,2}
14337  * """
14338  * if not (i is None): # <<<<<<<<<<<<<<
14339  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14340  * else:
14341  */
14342  }
14343 
14344  /* "PyClical.pyx":1614
14345  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14346  * else:
14347  * try: # <<<<<<<<<<<<<<
14348  * return math.cos(obj)
14349  * except:
14350  */
14351  /*else*/ {
14352  {
14353  __Pyx_PyThreadState_declare
14354  __Pyx_PyThreadState_assign
14355  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14356  __Pyx_XGOTREF(__pyx_t_6);
14357  __Pyx_XGOTREF(__pyx_t_7);
14358  __Pyx_XGOTREF(__pyx_t_8);
14359  /*try:*/ {
14360 
14361  /* "PyClical.pyx":1615
14362  * else:
14363  * try:
14364  * return math.cos(obj) # <<<<<<<<<<<<<<
14365  * except:
14366  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14367  */
14368  __Pyx_XDECREF(__pyx_r);
14369  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14370  __Pyx_GOTREF(__pyx_t_3);
14371  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_cos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1615, __pyx_L4_error)
14372  __Pyx_GOTREF(__pyx_t_9);
14373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14374  __pyx_t_3 = NULL;
14375  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14376  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14377  if (likely(__pyx_t_3)) {
14378  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14379  __Pyx_INCREF(__pyx_t_3);
14380  __Pyx_INCREF(function);
14381  __Pyx_DECREF_SET(__pyx_t_9, function);
14382  }
14383  }
14384  if (!__pyx_t_3) {
14385  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14386  __Pyx_GOTREF(__pyx_t_5);
14387  } else {
14388  #if CYTHON_FAST_PYCALL
14389  if (PyFunction_Check(__pyx_t_9)) {
14390  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14391  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14392  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14393  __Pyx_GOTREF(__pyx_t_5);
14394  } else
14395  #endif
14396  #if CYTHON_FAST_PYCCALL
14397  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14398  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14399  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14400  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14401  __Pyx_GOTREF(__pyx_t_5);
14402  } else
14403  #endif
14404  {
14405  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1615, __pyx_L4_error)
14406  __Pyx_GOTREF(__pyx_t_10);
14407  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14408  __Pyx_INCREF(__pyx_v_obj);
14409  __Pyx_GIVEREF(__pyx_v_obj);
14410  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14411  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14412  __Pyx_GOTREF(__pyx_t_5);
14413  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14414  }
14415  }
14416  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14417  __pyx_r = __pyx_t_5;
14418  __pyx_t_5 = 0;
14419  goto __pyx_L8_try_return;
14420 
14421  /* "PyClical.pyx":1614
14422  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14423  * else:
14424  * try: # <<<<<<<<<<<<<<
14425  * return math.cos(obj)
14426  * except:
14427  */
14428  }
14429  __pyx_L4_error:;
14430  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14431  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14432  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14433  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14434 
14435  /* "PyClical.pyx":1616
14436  * try:
14437  * return math.cos(obj)
14438  * except: # <<<<<<<<<<<<<<
14439  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14440  *
14441  */
14442  /*except:*/ {
14443  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14444  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14445  __Pyx_GOTREF(__pyx_t_5);
14446  __Pyx_GOTREF(__pyx_t_9);
14447  __Pyx_GOTREF(__pyx_t_10);
14448 
14449  /* "PyClical.pyx":1617
14450  * return math.cos(obj)
14451  * except:
14452  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14453  *
14454  * cpdef inline acos(obj,i = None):
14455  */
14456  __Pyx_XDECREF(__pyx_r);
14457  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14458  __Pyx_GOTREF(__pyx_t_3);
14459  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14460  __Pyx_GOTREF(__pyx_t_11);
14461  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14462  __pyx_r = __pyx_t_11;
14463  __pyx_t_11 = 0;
14464  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14465  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14466  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14467  goto __pyx_L7_except_return;
14468  }
14469  __pyx_L6_except_error:;
14470 
14471  /* "PyClical.pyx":1614
14472  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14473  * else:
14474  * try: # <<<<<<<<<<<<<<
14475  * return math.cos(obj)
14476  * except:
14477  */
14478  __Pyx_XGIVEREF(__pyx_t_6);
14479  __Pyx_XGIVEREF(__pyx_t_7);
14480  __Pyx_XGIVEREF(__pyx_t_8);
14481  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14482  goto __pyx_L1_error;
14483  __pyx_L8_try_return:;
14484  __Pyx_XGIVEREF(__pyx_t_6);
14485  __Pyx_XGIVEREF(__pyx_t_7);
14486  __Pyx_XGIVEREF(__pyx_t_8);
14487  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14488  goto __pyx_L0;
14489  __pyx_L7_except_return:;
14490  __Pyx_XGIVEREF(__pyx_t_6);
14491  __Pyx_XGIVEREF(__pyx_t_7);
14492  __Pyx_XGIVEREF(__pyx_t_8);
14493  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14494  goto __pyx_L0;
14495  }
14496  }
14497 
14498  /* "PyClical.pyx":1602
14499  * return clifford().wrap( glucat.log(toClifford(obj)) )
14500  *
14501  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14502  * """
14503  * Cosine of multivector with optional complexifier.
14504  */
14505 
14506  /* function exit code */
14507  __pyx_L1_error:;
14508  __Pyx_XDECREF(__pyx_t_3);
14509  __Pyx_XDECREF(__pyx_t_5);
14510  __Pyx_XDECREF(__pyx_t_9);
14511  __Pyx_XDECREF(__pyx_t_10);
14512  __Pyx_XDECREF(__pyx_t_11);
14513  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14514  __pyx_r = 0;
14515  __pyx_L0:;
14516  __Pyx_XGIVEREF(__pyx_r);
14517  __Pyx_RefNannyFinishContext();
14518  return __pyx_r;
14519  }
14520 
14521  /* Python wrapper */
14522  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14523  static char __pyx_doc_8PyClical_50cos[] = "\n Cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{1,2,3}\")\n {1,2}\n >>> x=clifford(\"{1,2}\"); print cos(acos(x))\n {1,2}\n ";
14524  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14525  PyObject *__pyx_v_obj = 0;
14526  PyObject *__pyx_v_i = 0;
14527  PyObject *__pyx_r = 0;
14528  __Pyx_RefNannyDeclarations
14529  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14530  {
14531  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14532  PyObject* values[2] = {0,0};
14533  values[1] = ((PyObject *)Py_None);
14534  if (unlikely(__pyx_kwds)) {
14535  Py_ssize_t kw_args;
14536  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14537  switch (pos_args) {
14538  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14539  CYTHON_FALLTHROUGH;
14540  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14541  CYTHON_FALLTHROUGH;
14542  case 0: break;
14543  default: goto __pyx_L5_argtuple_error;
14544  }
14545  kw_args = PyDict_Size(__pyx_kwds);
14546  switch (pos_args) {
14547  case 0:
14548  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14549  else goto __pyx_L5_argtuple_error;
14550  CYTHON_FALLTHROUGH;
14551  case 1:
14552  if (kw_args > 0) {
14553  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14554  if (value) { values[1] = value; kw_args--; }
14555  }
14556  }
14557  if (unlikely(kw_args > 0)) {
14558  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14559  }
14560  } else {
14561  switch (PyTuple_GET_SIZE(__pyx_args)) {
14562  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14563  CYTHON_FALLTHROUGH;
14564  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14565  break;
14566  default: goto __pyx_L5_argtuple_error;
14567  }
14568  }
14569  __pyx_v_obj = values[0];
14570  __pyx_v_i = values[1];
14571  }
14572  goto __pyx_L4_argument_unpacking_done;
14573  __pyx_L5_argtuple_error:;
14574  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14575  __pyx_L3_error:;
14576  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14577  __Pyx_RefNannyFinishContext();
14578  return NULL;
14579  __pyx_L4_argument_unpacking_done:;
14580  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14581 
14582  /* function exit code */
14583  __Pyx_RefNannyFinishContext();
14584  return __pyx_r;
14585  }
14586 
14587  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14588  PyObject *__pyx_r = NULL;
14589  __Pyx_RefNannyDeclarations
14590  PyObject *__pyx_t_1 = NULL;
14591  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14592  __Pyx_RefNannySetupContext("cos", 0);
14593  __Pyx_XDECREF(__pyx_r);
14594  __pyx_t_2.__pyx_n = 1;
14595  __pyx_t_2.i = __pyx_v_i;
14596  __pyx_t_1 = __pyx_f_8PyClical_cos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error)
14597  __Pyx_GOTREF(__pyx_t_1);
14598  __pyx_r = __pyx_t_1;
14599  __pyx_t_1 = 0;
14600  goto __pyx_L0;
14601 
14602  /* function exit code */
14603  __pyx_L1_error:;
14604  __Pyx_XDECREF(__pyx_t_1);
14605  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14606  __pyx_r = NULL;
14607  __pyx_L0:;
14608  __Pyx_XGIVEREF(__pyx_r);
14609  __Pyx_RefNannyFinishContext();
14610  return __pyx_r;
14611  }
14612 
14613  /* "PyClical.pyx":1619
14614  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14615  *
14616  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14617  * """
14618  * Inverse cosine of multivector with optional complexifier.
14619  */
14620 
14621  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14622  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args) {
14623  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14624  PyObject *__pyx_r = NULL;
14625  __Pyx_RefNannyDeclarations
14626  int __pyx_t_1;
14627  int __pyx_t_2;
14628  PyObject *__pyx_t_3 = NULL;
14629  Clifford __pyx_t_4;
14630  PyObject *__pyx_t_5 = NULL;
14631  PyObject *__pyx_t_6 = NULL;
14632  PyObject *__pyx_t_7 = NULL;
14633  PyObject *__pyx_t_8 = NULL;
14634  PyObject *__pyx_t_9 = NULL;
14635  PyObject *__pyx_t_10 = NULL;
14636  PyObject *__pyx_t_11 = NULL;
14637  __Pyx_RefNannySetupContext("acos", 0);
14638  if (__pyx_optional_args) {
14639  if (__pyx_optional_args->__pyx_n > 0) {
14640  __pyx_v_i = __pyx_optional_args->i;
14641  }
14642  }
14643 
14644  /* "PyClical.pyx":1632
14645  * {1,2}
14646  * """
14647  * if not (i is None): # <<<<<<<<<<<<<<
14648  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14649  * else:
14650  */
14651  __pyx_t_1 = (__pyx_v_i != Py_None);
14652  __pyx_t_2 = (__pyx_t_1 != 0);
14653  if (__pyx_t_2) {
14654 
14655  /* "PyClical.pyx":1633
14656  * """
14657  * if not (i is None):
14658  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14659  * else:
14660  * try:
14661  */
14662  __Pyx_XDECREF(__pyx_r);
14663  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14664  __Pyx_GOTREF(__pyx_t_3);
14665  try {
14666  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14667  } catch(...) {
14668  __Pyx_CppExn2PyErr();
14669  __PYX_ERR(0, 1633, __pyx_L1_error)
14670  }
14671  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1633, __pyx_L1_error)
14672  __Pyx_GOTREF(__pyx_t_5);
14673  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14674  __pyx_r = __pyx_t_5;
14675  __pyx_t_5 = 0;
14676  goto __pyx_L0;
14677 
14678  /* "PyClical.pyx":1632
14679  * {1,2}
14680  * """
14681  * if not (i is None): # <<<<<<<<<<<<<<
14682  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14683  * else:
14684  */
14685  }
14686 
14687  /* "PyClical.pyx":1635
14688  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14689  * else:
14690  * try: # <<<<<<<<<<<<<<
14691  * return math.acos(obj)
14692  * except:
14693  */
14694  /*else*/ {
14695  {
14696  __Pyx_PyThreadState_declare
14697  __Pyx_PyThreadState_assign
14698  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14699  __Pyx_XGOTREF(__pyx_t_6);
14700  __Pyx_XGOTREF(__pyx_t_7);
14701  __Pyx_XGOTREF(__pyx_t_8);
14702  /*try:*/ {
14703 
14704  /* "PyClical.pyx":1636
14705  * else:
14706  * try:
14707  * return math.acos(obj) # <<<<<<<<<<<<<<
14708  * except:
14709  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14710  */
14711  __Pyx_XDECREF(__pyx_r);
14712  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14713  __Pyx_GOTREF(__pyx_t_3);
14714  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1636, __pyx_L4_error)
14715  __Pyx_GOTREF(__pyx_t_9);
14716  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14717  __pyx_t_3 = NULL;
14718  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14719  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14720  if (likely(__pyx_t_3)) {
14721  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14722  __Pyx_INCREF(__pyx_t_3);
14723  __Pyx_INCREF(function);
14724  __Pyx_DECREF_SET(__pyx_t_9, function);
14725  }
14726  }
14727  if (!__pyx_t_3) {
14728  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14729  __Pyx_GOTREF(__pyx_t_5);
14730  } else {
14731  #if CYTHON_FAST_PYCALL
14732  if (PyFunction_Check(__pyx_t_9)) {
14733  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14734  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14735  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14736  __Pyx_GOTREF(__pyx_t_5);
14737  } else
14738  #endif
14739  #if CYTHON_FAST_PYCCALL
14740  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14741  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14742  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14743  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14744  __Pyx_GOTREF(__pyx_t_5);
14745  } else
14746  #endif
14747  {
14748  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1636, __pyx_L4_error)
14749  __Pyx_GOTREF(__pyx_t_10);
14750  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14751  __Pyx_INCREF(__pyx_v_obj);
14752  __Pyx_GIVEREF(__pyx_v_obj);
14753  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14754  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14755  __Pyx_GOTREF(__pyx_t_5);
14756  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14757  }
14758  }
14759  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14760  __pyx_r = __pyx_t_5;
14761  __pyx_t_5 = 0;
14762  goto __pyx_L8_try_return;
14763 
14764  /* "PyClical.pyx":1635
14765  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14766  * else:
14767  * try: # <<<<<<<<<<<<<<
14768  * return math.acos(obj)
14769  * except:
14770  */
14771  }
14772  __pyx_L4_error:;
14773  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14774  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14775  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14776  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14777 
14778  /* "PyClical.pyx":1637
14779  * try:
14780  * return math.acos(obj)
14781  * except: # <<<<<<<<<<<<<<
14782  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14783  *
14784  */
14785  /*except:*/ {
14786  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14787  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14788  __Pyx_GOTREF(__pyx_t_5);
14789  __Pyx_GOTREF(__pyx_t_9);
14790  __Pyx_GOTREF(__pyx_t_10);
14791 
14792  /* "PyClical.pyx":1638
14793  * return math.acos(obj)
14794  * except:
14795  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14796  *
14797  * cpdef inline cosh(obj):
14798  */
14799  __Pyx_XDECREF(__pyx_r);
14800  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14801  __Pyx_GOTREF(__pyx_t_3);
14802  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14803  __Pyx_GOTREF(__pyx_t_11);
14804  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14805  __pyx_r = __pyx_t_11;
14806  __pyx_t_11 = 0;
14807  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14808  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14809  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14810  goto __pyx_L7_except_return;
14811  }
14812  __pyx_L6_except_error:;
14813 
14814  /* "PyClical.pyx":1635
14815  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14816  * else:
14817  * try: # <<<<<<<<<<<<<<
14818  * return math.acos(obj)
14819  * except:
14820  */
14821  __Pyx_XGIVEREF(__pyx_t_6);
14822  __Pyx_XGIVEREF(__pyx_t_7);
14823  __Pyx_XGIVEREF(__pyx_t_8);
14824  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14825  goto __pyx_L1_error;
14826  __pyx_L8_try_return:;
14827  __Pyx_XGIVEREF(__pyx_t_6);
14828  __Pyx_XGIVEREF(__pyx_t_7);
14829  __Pyx_XGIVEREF(__pyx_t_8);
14830  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14831  goto __pyx_L0;
14832  __pyx_L7_except_return:;
14833  __Pyx_XGIVEREF(__pyx_t_6);
14834  __Pyx_XGIVEREF(__pyx_t_7);
14835  __Pyx_XGIVEREF(__pyx_t_8);
14836  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14837  goto __pyx_L0;
14838  }
14839  }
14840 
14841  /* "PyClical.pyx":1619
14842  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14843  *
14844  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14845  * """
14846  * Inverse cosine of multivector with optional complexifier.
14847  */
14848 
14849  /* function exit code */
14850  __pyx_L1_error:;
14851  __Pyx_XDECREF(__pyx_t_3);
14852  __Pyx_XDECREF(__pyx_t_5);
14853  __Pyx_XDECREF(__pyx_t_9);
14854  __Pyx_XDECREF(__pyx_t_10);
14855  __Pyx_XDECREF(__pyx_t_11);
14856  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14857  __pyx_r = 0;
14858  __pyx_L0:;
14859  __Pyx_XGIVEREF(__pyx_r);
14860  __Pyx_RefNannyFinishContext();
14861  return __pyx_r;
14862  }
14863 
14864  /* Python wrapper */
14865  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14866  static char __pyx_doc_8PyClical_52acos[] = "\n Inverse cosine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{1,2,3}\")\n {1,2}\n >>> x=clifford(\"{1,2}\"); print cos(acos(x),\"{-1,1,2,3,4}\")\n {1,2}\n >>> print acos(0) / pi\n 0.5\n >>> x=clifford(\"{1,2}\"); print cos(acos(x))\n {1,2}\n ";
14867  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14868  PyObject *__pyx_v_obj = 0;
14869  PyObject *__pyx_v_i = 0;
14870  PyObject *__pyx_r = 0;
14871  __Pyx_RefNannyDeclarations
14872  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14873  {
14874  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14875  PyObject* values[2] = {0,0};
14876  values[1] = ((PyObject *)Py_None);
14877  if (unlikely(__pyx_kwds)) {
14878  Py_ssize_t kw_args;
14879  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14880  switch (pos_args) {
14881  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14882  CYTHON_FALLTHROUGH;
14883  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14884  CYTHON_FALLTHROUGH;
14885  case 0: break;
14886  default: goto __pyx_L5_argtuple_error;
14887  }
14888  kw_args = PyDict_Size(__pyx_kwds);
14889  switch (pos_args) {
14890  case 0:
14891  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14892  else goto __pyx_L5_argtuple_error;
14893  CYTHON_FALLTHROUGH;
14894  case 1:
14895  if (kw_args > 0) {
14896  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14897  if (value) { values[1] = value; kw_args--; }
14898  }
14899  }
14900  if (unlikely(kw_args > 0)) {
14901  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14902  }
14903  } else {
14904  switch (PyTuple_GET_SIZE(__pyx_args)) {
14905  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14906  CYTHON_FALLTHROUGH;
14907  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14908  break;
14909  default: goto __pyx_L5_argtuple_error;
14910  }
14911  }
14912  __pyx_v_obj = values[0];
14913  __pyx_v_i = values[1];
14914  }
14915  goto __pyx_L4_argument_unpacking_done;
14916  __pyx_L5_argtuple_error:;
14917  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14918  __pyx_L3_error:;
14919  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14920  __Pyx_RefNannyFinishContext();
14921  return NULL;
14922  __pyx_L4_argument_unpacking_done:;
14923  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14924 
14925  /* function exit code */
14926  __Pyx_RefNannyFinishContext();
14927  return __pyx_r;
14928  }
14929 
14930  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14931  PyObject *__pyx_r = NULL;
14932  __Pyx_RefNannyDeclarations
14933  PyObject *__pyx_t_1 = NULL;
14934  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14935  __Pyx_RefNannySetupContext("acos", 0);
14936  __Pyx_XDECREF(__pyx_r);
14937  __pyx_t_2.__pyx_n = 1;
14938  __pyx_t_2.i = __pyx_v_i;
14939  __pyx_t_1 = __pyx_f_8PyClical_acos(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L1_error)
14940  __Pyx_GOTREF(__pyx_t_1);
14941  __pyx_r = __pyx_t_1;
14942  __pyx_t_1 = 0;
14943  goto __pyx_L0;
14944 
14945  /* function exit code */
14946  __pyx_L1_error:;
14947  __Pyx_XDECREF(__pyx_t_1);
14948  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14949  __pyx_r = NULL;
14950  __pyx_L0:;
14951  __Pyx_XGIVEREF(__pyx_r);
14952  __Pyx_RefNannyFinishContext();
14953  return __pyx_r;
14954  }
14955 
14956  /* "PyClical.pyx":1640
14957  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14958  *
14959  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14960  * """
14961  * Hyperbolic cosine of multivector.
14962  */
14963 
14964  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14965  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14966  PyObject *__pyx_r = NULL;
14967  __Pyx_RefNannyDeclarations
14968  PyObject *__pyx_t_1 = NULL;
14969  PyObject *__pyx_t_2 = NULL;
14970  PyObject *__pyx_t_3 = NULL;
14971  PyObject *__pyx_t_4 = NULL;
14972  PyObject *__pyx_t_5 = NULL;
14973  PyObject *__pyx_t_6 = NULL;
14974  PyObject *__pyx_t_7 = NULL;
14975  PyObject *__pyx_t_8 = NULL;
14976  __Pyx_RefNannySetupContext("cosh", 0);
14977 
14978  /* "PyClical.pyx":1651
14979  * {1,2}
14980  * """
14981  * try: # <<<<<<<<<<<<<<
14982  * return math.cosh(obj)
14983  * except:
14984  */
14985  {
14986  __Pyx_PyThreadState_declare
14987  __Pyx_PyThreadState_assign
14988  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14989  __Pyx_XGOTREF(__pyx_t_1);
14990  __Pyx_XGOTREF(__pyx_t_2);
14991  __Pyx_XGOTREF(__pyx_t_3);
14992  /*try:*/ {
14993 
14994  /* "PyClical.pyx":1652
14995  * """
14996  * try:
14997  * return math.cosh(obj) # <<<<<<<<<<<<<<
14998  * except:
14999  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15000  */
15001  __Pyx_XDECREF(__pyx_r);
15002  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
15003  __Pyx_GOTREF(__pyx_t_5);
15004  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cosh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1652, __pyx_L3_error)
15005  __Pyx_GOTREF(__pyx_t_6);
15006  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15007  __pyx_t_5 = NULL;
15008  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15009  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15010  if (likely(__pyx_t_5)) {
15011  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15012  __Pyx_INCREF(__pyx_t_5);
15013  __Pyx_INCREF(function);
15014  __Pyx_DECREF_SET(__pyx_t_6, function);
15015  }
15016  }
15017  if (!__pyx_t_5) {
15018  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
15019  __Pyx_GOTREF(__pyx_t_4);
15020  } else {
15021  #if CYTHON_FAST_PYCALL
15022  if (PyFunction_Check(__pyx_t_6)) {
15023  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
15024  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
15025  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15026  __Pyx_GOTREF(__pyx_t_4);
15027  } else
15028  #endif
15029  #if CYTHON_FAST_PYCCALL
15030  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
15031  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
15032  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
15033  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15034  __Pyx_GOTREF(__pyx_t_4);
15035  } else
15036  #endif
15037  {
15038  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L3_error)
15039  __Pyx_GOTREF(__pyx_t_7);
15040  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
15041  __Pyx_INCREF(__pyx_v_obj);
15042  __Pyx_GIVEREF(__pyx_v_obj);
15043  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15044  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
15045  __Pyx_GOTREF(__pyx_t_4);
15046  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15047  }
15048  }
15049  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15050  __pyx_r = __pyx_t_4;
15051  __pyx_t_4 = 0;
15052  goto __pyx_L7_try_return;
15053 
15054  /* "PyClical.pyx":1651
15055  * {1,2}
15056  * """
15057  * try: # <<<<<<<<<<<<<<
15058  * return math.cosh(obj)
15059  * except:
15060  */
15061  }
15062  __pyx_L3_error:;
15063  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15064  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15065  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15066  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15067 
15068  /* "PyClical.pyx":1653
15069  * try:
15070  * return math.cosh(obj)
15071  * except: # <<<<<<<<<<<<<<
15072  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15073  *
15074  */
15075  /*except:*/ {
15076  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15077  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
15078  __Pyx_GOTREF(__pyx_t_4);
15079  __Pyx_GOTREF(__pyx_t_6);
15080  __Pyx_GOTREF(__pyx_t_7);
15081 
15082  /* "PyClical.pyx":1654
15083  * return math.cosh(obj)
15084  * except:
15085  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15086  *
15087  * cpdef inline acosh(obj,i = None):
15088  */
15089  __Pyx_XDECREF(__pyx_r);
15090  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
15091  __Pyx_GOTREF(__pyx_t_5);
15092  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), cosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
15093  __Pyx_GOTREF(__pyx_t_8);
15094  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15095  __pyx_r = __pyx_t_8;
15096  __pyx_t_8 = 0;
15097  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15098  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15099  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15100  goto __pyx_L6_except_return;
15101  }
15102  __pyx_L5_except_error:;
15103 
15104  /* "PyClical.pyx":1651
15105  * {1,2}
15106  * """
15107  * try: # <<<<<<<<<<<<<<
15108  * return math.cosh(obj)
15109  * except:
15110  */
15111  __Pyx_XGIVEREF(__pyx_t_1);
15112  __Pyx_XGIVEREF(__pyx_t_2);
15113  __Pyx_XGIVEREF(__pyx_t_3);
15114  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15115  goto __pyx_L1_error;
15116  __pyx_L7_try_return:;
15117  __Pyx_XGIVEREF(__pyx_t_1);
15118  __Pyx_XGIVEREF(__pyx_t_2);
15119  __Pyx_XGIVEREF(__pyx_t_3);
15120  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15121  goto __pyx_L0;
15122  __pyx_L6_except_return:;
15123  __Pyx_XGIVEREF(__pyx_t_1);
15124  __Pyx_XGIVEREF(__pyx_t_2);
15125  __Pyx_XGIVEREF(__pyx_t_3);
15126  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15127  goto __pyx_L0;
15128  }
15129 
15130  /* "PyClical.pyx":1640
15131  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15132  *
15133  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15134  * """
15135  * Hyperbolic cosine of multivector.
15136  */
15137 
15138  /* function exit code */
15139  __pyx_L1_error:;
15140  __Pyx_XDECREF(__pyx_t_4);
15141  __Pyx_XDECREF(__pyx_t_5);
15142  __Pyx_XDECREF(__pyx_t_6);
15143  __Pyx_XDECREF(__pyx_t_7);
15144  __Pyx_XDECREF(__pyx_t_8);
15145  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15146  __pyx_r = 0;
15147  __pyx_L0:;
15148  __Pyx_XGIVEREF(__pyx_r);
15149  __Pyx_RefNannyFinishContext();
15150  return __pyx_r;
15151  }
15152 
15153  /* Python wrapper */
15154  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15155  static char __pyx_doc_8PyClical_54cosh[] = "\n Hyperbolic cosine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi; print cosh(x)\n -1\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print cosh(acosh(x))\n {1,2}\n ";
15156  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15157  PyObject *__pyx_r = 0;
15158  __Pyx_RefNannyDeclarations
15159  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
15160  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
15161 
15162  /* function exit code */
15163  __Pyx_RefNannyFinishContext();
15164  return __pyx_r;
15165  }
15166 
15167  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15168  PyObject *__pyx_r = NULL;
15169  __Pyx_RefNannyDeclarations
15170  PyObject *__pyx_t_1 = NULL;
15171  __Pyx_RefNannySetupContext("cosh", 0);
15172  __Pyx_XDECREF(__pyx_r);
15173  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
15174  __Pyx_GOTREF(__pyx_t_1);
15175  __pyx_r = __pyx_t_1;
15176  __pyx_t_1 = 0;
15177  goto __pyx_L0;
15178 
15179  /* function exit code */
15180  __pyx_L1_error:;
15181  __Pyx_XDECREF(__pyx_t_1);
15182  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15183  __pyx_r = NULL;
15184  __pyx_L0:;
15185  __Pyx_XGIVEREF(__pyx_r);
15186  __Pyx_RefNannyFinishContext();
15187  return __pyx_r;
15188  }
15189 
15190  /* "PyClical.pyx":1656
15191  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15192  *
15193  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15194  * """
15195  * Inverse hyperbolic cosine of multivector with optional complexifier.
15196  */
15197 
15198  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15199  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args) {
15200  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15201  PyObject *__pyx_r = NULL;
15202  __Pyx_RefNannyDeclarations
15203  int __pyx_t_1;
15204  int __pyx_t_2;
15205  PyObject *__pyx_t_3 = NULL;
15206  Clifford __pyx_t_4;
15207  PyObject *__pyx_t_5 = NULL;
15208  PyObject *__pyx_t_6 = NULL;
15209  PyObject *__pyx_t_7 = NULL;
15210  PyObject *__pyx_t_8 = NULL;
15211  PyObject *__pyx_t_9 = NULL;
15212  PyObject *__pyx_t_10 = NULL;
15213  PyObject *__pyx_t_11 = NULL;
15214  __Pyx_RefNannySetupContext("acosh", 0);
15215  if (__pyx_optional_args) {
15216  if (__pyx_optional_args->__pyx_n > 0) {
15217  __pyx_v_i = __pyx_optional_args->i;
15218  }
15219  }
15220 
15221  /* "PyClical.pyx":1671
15222  * {1,2}
15223  * """
15224  * if not (i is None): # <<<<<<<<<<<<<<
15225  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15226  * else:
15227  */
15228  __pyx_t_1 = (__pyx_v_i != Py_None);
15229  __pyx_t_2 = (__pyx_t_1 != 0);
15230  if (__pyx_t_2) {
15231 
15232  /* "PyClical.pyx":1672
15233  * """
15234  * if not (i is None):
15235  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15236  * else:
15237  * try:
15238  */
15239  __Pyx_XDECREF(__pyx_r);
15240  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
15241  __Pyx_GOTREF(__pyx_t_3);
15242  try {
15243  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15244  } catch(...) {
15245  __Pyx_CppExn2PyErr();
15246  __PYX_ERR(0, 1672, __pyx_L1_error)
15247  }
15248  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1672, __pyx_L1_error)
15249  __Pyx_GOTREF(__pyx_t_5);
15250  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15251  __pyx_r = __pyx_t_5;
15252  __pyx_t_5 = 0;
15253  goto __pyx_L0;
15254 
15255  /* "PyClical.pyx":1671
15256  * {1,2}
15257  * """
15258  * if not (i is None): # <<<<<<<<<<<<<<
15259  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15260  * else:
15261  */
15262  }
15263 
15264  /* "PyClical.pyx":1674
15265  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15266  * else:
15267  * try: # <<<<<<<<<<<<<<
15268  * return math.acosh(obj)
15269  * except:
15270  */
15271  /*else*/ {
15272  {
15273  __Pyx_PyThreadState_declare
15274  __Pyx_PyThreadState_assign
15275  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15276  __Pyx_XGOTREF(__pyx_t_6);
15277  __Pyx_XGOTREF(__pyx_t_7);
15278  __Pyx_XGOTREF(__pyx_t_8);
15279  /*try:*/ {
15280 
15281  /* "PyClical.pyx":1675
15282  * else:
15283  * try:
15284  * return math.acosh(obj) # <<<<<<<<<<<<<<
15285  * except:
15286  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15287  */
15288  __Pyx_XDECREF(__pyx_r);
15289  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
15290  __Pyx_GOTREF(__pyx_t_3);
15291  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_acosh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1675, __pyx_L4_error)
15292  __Pyx_GOTREF(__pyx_t_9);
15293  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15294  __pyx_t_3 = NULL;
15295  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15296  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15297  if (likely(__pyx_t_3)) {
15298  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15299  __Pyx_INCREF(__pyx_t_3);
15300  __Pyx_INCREF(function);
15301  __Pyx_DECREF_SET(__pyx_t_9, function);
15302  }
15303  }
15304  if (!__pyx_t_3) {
15305  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15306  __Pyx_GOTREF(__pyx_t_5);
15307  } else {
15308  #if CYTHON_FAST_PYCALL
15309  if (PyFunction_Check(__pyx_t_9)) {
15310  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15311  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15312  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15313  __Pyx_GOTREF(__pyx_t_5);
15314  } else
15315  #endif
15316  #if CYTHON_FAST_PYCCALL
15317  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15318  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15319  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15320  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15321  __Pyx_GOTREF(__pyx_t_5);
15322  } else
15323  #endif
15324  {
15325  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1675, __pyx_L4_error)
15326  __Pyx_GOTREF(__pyx_t_10);
15327  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15328  __Pyx_INCREF(__pyx_v_obj);
15329  __Pyx_GIVEREF(__pyx_v_obj);
15330  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15331  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15332  __Pyx_GOTREF(__pyx_t_5);
15333  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15334  }
15335  }
15336  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15337  __pyx_r = __pyx_t_5;
15338  __pyx_t_5 = 0;
15339  goto __pyx_L8_try_return;
15340 
15341  /* "PyClical.pyx":1674
15342  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15343  * else:
15344  * try: # <<<<<<<<<<<<<<
15345  * return math.acosh(obj)
15346  * except:
15347  */
15348  }
15349  __pyx_L4_error:;
15350  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15351  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15352  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15353  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15354 
15355  /* "PyClical.pyx":1676
15356  * try:
15357  * return math.acosh(obj)
15358  * except: # <<<<<<<<<<<<<<
15359  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15360  *
15361  */
15362  /*except:*/ {
15363  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15364  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15365  __Pyx_GOTREF(__pyx_t_5);
15366  __Pyx_GOTREF(__pyx_t_9);
15367  __Pyx_GOTREF(__pyx_t_10);
15368 
15369  /* "PyClical.pyx":1677
15370  * return math.acosh(obj)
15371  * except:
15372  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15373  *
15374  * cpdef inline sin(obj,i = None):
15375  */
15376  __Pyx_XDECREF(__pyx_r);
15377  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
15378  __Pyx_GOTREF(__pyx_t_3);
15379  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
15380  __Pyx_GOTREF(__pyx_t_11);
15381  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15382  __pyx_r = __pyx_t_11;
15383  __pyx_t_11 = 0;
15384  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15385  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15386  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15387  goto __pyx_L7_except_return;
15388  }
15389  __pyx_L6_except_error:;
15390 
15391  /* "PyClical.pyx":1674
15392  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15393  * else:
15394  * try: # <<<<<<<<<<<<<<
15395  * return math.acosh(obj)
15396  * except:
15397  */
15398  __Pyx_XGIVEREF(__pyx_t_6);
15399  __Pyx_XGIVEREF(__pyx_t_7);
15400  __Pyx_XGIVEREF(__pyx_t_8);
15401  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15402  goto __pyx_L1_error;
15403  __pyx_L8_try_return:;
15404  __Pyx_XGIVEREF(__pyx_t_6);
15405  __Pyx_XGIVEREF(__pyx_t_7);
15406  __Pyx_XGIVEREF(__pyx_t_8);
15407  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15408  goto __pyx_L0;
15409  __pyx_L7_except_return:;
15410  __Pyx_XGIVEREF(__pyx_t_6);
15411  __Pyx_XGIVEREF(__pyx_t_7);
15412  __Pyx_XGIVEREF(__pyx_t_8);
15413  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15414  goto __pyx_L0;
15415  }
15416  }
15417 
15418  /* "PyClical.pyx":1656
15419  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15420  *
15421  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15422  * """
15423  * Inverse hyperbolic cosine of multivector with optional complexifier.
15424  */
15425 
15426  /* function exit code */
15427  __pyx_L1_error:;
15428  __Pyx_XDECREF(__pyx_t_3);
15429  __Pyx_XDECREF(__pyx_t_5);
15430  __Pyx_XDECREF(__pyx_t_9);
15431  __Pyx_XDECREF(__pyx_t_10);
15432  __Pyx_XDECREF(__pyx_t_11);
15433  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15434  __pyx_r = 0;
15435  __pyx_L0:;
15436  __Pyx_XGIVEREF(__pyx_r);
15437  __Pyx_RefNannyFinishContext();
15438  return __pyx_r;
15439  }
15440 
15441  /* Python wrapper */
15442  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15443  static char __pyx_doc_8PyClical_56acosh[] = "\n Inverse hyperbolic cosine of multivector with optional complexifier.\n\n >>> print acosh(0,\"{-2,-1,1}\")\n 1.571{-2,-1,1}\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x,\"{-1,1,2,3,4}\"))\n {1,2,3}\n >>> print acosh(0)\n 1.571{-1}\n >>> x=clifford(\"{1,2,3}\"); print cosh(acosh(x))\n {1,2,3}\n >>> x=clifford(\"{1,2}\"); print cosh(acosh(x))\n {1,2}\n ";
15444  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15445  PyObject *__pyx_v_obj = 0;
15446  PyObject *__pyx_v_i = 0;
15447  PyObject *__pyx_r = 0;
15448  __Pyx_RefNannyDeclarations
15449  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15450  {
15451  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15452  PyObject* values[2] = {0,0};
15453  values[1] = ((PyObject *)Py_None);
15454  if (unlikely(__pyx_kwds)) {
15455  Py_ssize_t kw_args;
15456  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15457  switch (pos_args) {
15458  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15459  CYTHON_FALLTHROUGH;
15460  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15461  CYTHON_FALLTHROUGH;
15462  case 0: break;
15463  default: goto __pyx_L5_argtuple_error;
15464  }
15465  kw_args = PyDict_Size(__pyx_kwds);
15466  switch (pos_args) {
15467  case 0:
15468  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15469  else goto __pyx_L5_argtuple_error;
15470  CYTHON_FALLTHROUGH;
15471  case 1:
15472  if (kw_args > 0) {
15473  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15474  if (value) { values[1] = value; kw_args--; }
15475  }
15476  }
15477  if (unlikely(kw_args > 0)) {
15478  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15479  }
15480  } else {
15481  switch (PyTuple_GET_SIZE(__pyx_args)) {
15482  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15483  CYTHON_FALLTHROUGH;
15484  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15485  break;
15486  default: goto __pyx_L5_argtuple_error;
15487  }
15488  }
15489  __pyx_v_obj = values[0];
15490  __pyx_v_i = values[1];
15491  }
15492  goto __pyx_L4_argument_unpacking_done;
15493  __pyx_L5_argtuple_error:;
15494  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15495  __pyx_L3_error:;
15496  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15497  __Pyx_RefNannyFinishContext();
15498  return NULL;
15499  __pyx_L4_argument_unpacking_done:;
15500  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15501 
15502  /* function exit code */
15503  __Pyx_RefNannyFinishContext();
15504  return __pyx_r;
15505  }
15506 
15507  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15508  PyObject *__pyx_r = NULL;
15509  __Pyx_RefNannyDeclarations
15510  PyObject *__pyx_t_1 = NULL;
15511  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15512  __Pyx_RefNannySetupContext("acosh", 0);
15513  __Pyx_XDECREF(__pyx_r);
15514  __pyx_t_2.__pyx_n = 1;
15515  __pyx_t_2.i = __pyx_v_i;
15516  __pyx_t_1 = __pyx_f_8PyClical_acosh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1656, __pyx_L1_error)
15517  __Pyx_GOTREF(__pyx_t_1);
15518  __pyx_r = __pyx_t_1;
15519  __pyx_t_1 = 0;
15520  goto __pyx_L0;
15521 
15522  /* function exit code */
15523  __pyx_L1_error:;
15524  __Pyx_XDECREF(__pyx_t_1);
15525  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15526  __pyx_r = NULL;
15527  __pyx_L0:;
15528  __Pyx_XGIVEREF(__pyx_r);
15529  __Pyx_RefNannyFinishContext();
15530  return __pyx_r;
15531  }
15532 
15533  /* "PyClical.pyx":1679
15534  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15535  *
15536  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15537  * """
15538  * Sine of multivector with optional complexifier.
15539  */
15540 
15541  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15542  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args) {
15543  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15544  PyObject *__pyx_r = NULL;
15545  __Pyx_RefNannyDeclarations
15546  int __pyx_t_1;
15547  int __pyx_t_2;
15548  PyObject *__pyx_t_3 = NULL;
15549  Clifford __pyx_t_4;
15550  PyObject *__pyx_t_5 = NULL;
15551  PyObject *__pyx_t_6 = NULL;
15552  PyObject *__pyx_t_7 = NULL;
15553  PyObject *__pyx_t_8 = NULL;
15554  PyObject *__pyx_t_9 = NULL;
15555  PyObject *__pyx_t_10 = NULL;
15556  PyObject *__pyx_t_11 = NULL;
15557  __Pyx_RefNannySetupContext("sin", 0);
15558  if (__pyx_optional_args) {
15559  if (__pyx_optional_args->__pyx_n > 0) {
15560  __pyx_v_i = __pyx_optional_args->i;
15561  }
15562  }
15563 
15564  /* "PyClical.pyx":1690
15565  * {1,2,3}
15566  * """
15567  * if not (i is None): # <<<<<<<<<<<<<<
15568  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15569  * else:
15570  */
15571  __pyx_t_1 = (__pyx_v_i != Py_None);
15572  __pyx_t_2 = (__pyx_t_1 != 0);
15573  if (__pyx_t_2) {
15574 
15575  /* "PyClical.pyx":1691
15576  * """
15577  * if not (i is None):
15578  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15579  * else:
15580  * try:
15581  */
15582  __Pyx_XDECREF(__pyx_r);
15583  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15584  __Pyx_GOTREF(__pyx_t_3);
15585  try {
15586  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15587  } catch(...) {
15588  __Pyx_CppExn2PyErr();
15589  __PYX_ERR(0, 1691, __pyx_L1_error)
15590  }
15591  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1691, __pyx_L1_error)
15592  __Pyx_GOTREF(__pyx_t_5);
15593  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15594  __pyx_r = __pyx_t_5;
15595  __pyx_t_5 = 0;
15596  goto __pyx_L0;
15597 
15598  /* "PyClical.pyx":1690
15599  * {1,2,3}
15600  * """
15601  * if not (i is None): # <<<<<<<<<<<<<<
15602  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15603  * else:
15604  */
15605  }
15606 
15607  /* "PyClical.pyx":1693
15608  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15609  * else:
15610  * try: # <<<<<<<<<<<<<<
15611  * return math.sin(obj)
15612  * except:
15613  */
15614  /*else*/ {
15615  {
15616  __Pyx_PyThreadState_declare
15617  __Pyx_PyThreadState_assign
15618  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15619  __Pyx_XGOTREF(__pyx_t_6);
15620  __Pyx_XGOTREF(__pyx_t_7);
15621  __Pyx_XGOTREF(__pyx_t_8);
15622  /*try:*/ {
15623 
15624  /* "PyClical.pyx":1694
15625  * else:
15626  * try:
15627  * return math.sin(obj) # <<<<<<<<<<<<<<
15628  * except:
15629  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15630  */
15631  __Pyx_XDECREF(__pyx_r);
15632  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15633  __Pyx_GOTREF(__pyx_t_3);
15634  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1694, __pyx_L4_error)
15635  __Pyx_GOTREF(__pyx_t_9);
15636  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15637  __pyx_t_3 = NULL;
15638  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15639  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15640  if (likely(__pyx_t_3)) {
15641  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15642  __Pyx_INCREF(__pyx_t_3);
15643  __Pyx_INCREF(function);
15644  __Pyx_DECREF_SET(__pyx_t_9, function);
15645  }
15646  }
15647  if (!__pyx_t_3) {
15648  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15649  __Pyx_GOTREF(__pyx_t_5);
15650  } else {
15651  #if CYTHON_FAST_PYCALL
15652  if (PyFunction_Check(__pyx_t_9)) {
15653  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15654  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15655  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15656  __Pyx_GOTREF(__pyx_t_5);
15657  } else
15658  #endif
15659  #if CYTHON_FAST_PYCCALL
15660  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15661  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15662  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15663  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15664  __Pyx_GOTREF(__pyx_t_5);
15665  } else
15666  #endif
15667  {
15668  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1694, __pyx_L4_error)
15669  __Pyx_GOTREF(__pyx_t_10);
15670  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15671  __Pyx_INCREF(__pyx_v_obj);
15672  __Pyx_GIVEREF(__pyx_v_obj);
15673  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15674  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15675  __Pyx_GOTREF(__pyx_t_5);
15676  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15677  }
15678  }
15679  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15680  __pyx_r = __pyx_t_5;
15681  __pyx_t_5 = 0;
15682  goto __pyx_L8_try_return;
15683 
15684  /* "PyClical.pyx":1693
15685  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15686  * else:
15687  * try: # <<<<<<<<<<<<<<
15688  * return math.sin(obj)
15689  * except:
15690  */
15691  }
15692  __pyx_L4_error:;
15693  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15694  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15695  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15696  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15697 
15698  /* "PyClical.pyx":1695
15699  * try:
15700  * return math.sin(obj)
15701  * except: # <<<<<<<<<<<<<<
15702  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15703  *
15704  */
15705  /*except:*/ {
15706  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15707  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15708  __Pyx_GOTREF(__pyx_t_5);
15709  __Pyx_GOTREF(__pyx_t_9);
15710  __Pyx_GOTREF(__pyx_t_10);
15711 
15712  /* "PyClical.pyx":1696
15713  * return math.sin(obj)
15714  * except:
15715  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15716  *
15717  * cpdef inline asin(obj,i = None):
15718  */
15719  __Pyx_XDECREF(__pyx_r);
15720  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15721  __Pyx_GOTREF(__pyx_t_3);
15722  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15723  __Pyx_GOTREF(__pyx_t_11);
15724  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15725  __pyx_r = __pyx_t_11;
15726  __pyx_t_11 = 0;
15727  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15728  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15729  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15730  goto __pyx_L7_except_return;
15731  }
15732  __pyx_L6_except_error:;
15733 
15734  /* "PyClical.pyx":1693
15735  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15736  * else:
15737  * try: # <<<<<<<<<<<<<<
15738  * return math.sin(obj)
15739  * except:
15740  */
15741  __Pyx_XGIVEREF(__pyx_t_6);
15742  __Pyx_XGIVEREF(__pyx_t_7);
15743  __Pyx_XGIVEREF(__pyx_t_8);
15744  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15745  goto __pyx_L1_error;
15746  __pyx_L8_try_return:;
15747  __Pyx_XGIVEREF(__pyx_t_6);
15748  __Pyx_XGIVEREF(__pyx_t_7);
15749  __Pyx_XGIVEREF(__pyx_t_8);
15750  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15751  goto __pyx_L0;
15752  __pyx_L7_except_return:;
15753  __Pyx_XGIVEREF(__pyx_t_6);
15754  __Pyx_XGIVEREF(__pyx_t_7);
15755  __Pyx_XGIVEREF(__pyx_t_8);
15756  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15757  goto __pyx_L0;
15758  }
15759  }
15760 
15761  /* "PyClical.pyx":1679
15762  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15763  *
15764  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15765  * """
15766  * Sine of multivector with optional complexifier.
15767  */
15768 
15769  /* function exit code */
15770  __pyx_L1_error:;
15771  __Pyx_XDECREF(__pyx_t_3);
15772  __Pyx_XDECREF(__pyx_t_5);
15773  __Pyx_XDECREF(__pyx_t_9);
15774  __Pyx_XDECREF(__pyx_t_10);
15775  __Pyx_XDECREF(__pyx_t_11);
15776  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15777  __pyx_r = 0;
15778  __pyx_L0:;
15779  __Pyx_XGIVEREF(__pyx_r);
15780  __Pyx_RefNannyFinishContext();
15781  return __pyx_r;
15782  }
15783 
15784  /* Python wrapper */
15785  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15786  static char __pyx_doc_8PyClical_58sin[] = "\n Sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),s)\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),\"{-2,-1,1}\")\n {-1}\n >>> x=clifford(\"{1,2,3}\"); print asin(sin(x))\n {1,2,3}\n ";
15787  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15788  PyObject *__pyx_v_obj = 0;
15789  PyObject *__pyx_v_i = 0;
15790  PyObject *__pyx_r = 0;
15791  __Pyx_RefNannyDeclarations
15792  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15793  {
15794  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15795  PyObject* values[2] = {0,0};
15796  values[1] = ((PyObject *)Py_None);
15797  if (unlikely(__pyx_kwds)) {
15798  Py_ssize_t kw_args;
15799  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15800  switch (pos_args) {
15801  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15802  CYTHON_FALLTHROUGH;
15803  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15804  CYTHON_FALLTHROUGH;
15805  case 0: break;
15806  default: goto __pyx_L5_argtuple_error;
15807  }
15808  kw_args = PyDict_Size(__pyx_kwds);
15809  switch (pos_args) {
15810  case 0:
15811  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15812  else goto __pyx_L5_argtuple_error;
15813  CYTHON_FALLTHROUGH;
15814  case 1:
15815  if (kw_args > 0) {
15816  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15817  if (value) { values[1] = value; kw_args--; }
15818  }
15819  }
15820  if (unlikely(kw_args > 0)) {
15821  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15822  }
15823  } else {
15824  switch (PyTuple_GET_SIZE(__pyx_args)) {
15825  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15826  CYTHON_FALLTHROUGH;
15827  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15828  break;
15829  default: goto __pyx_L5_argtuple_error;
15830  }
15831  }
15832  __pyx_v_obj = values[0];
15833  __pyx_v_i = values[1];
15834  }
15835  goto __pyx_L4_argument_unpacking_done;
15836  __pyx_L5_argtuple_error:;
15837  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15838  __pyx_L3_error:;
15839  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15840  __Pyx_RefNannyFinishContext();
15841  return NULL;
15842  __pyx_L4_argument_unpacking_done:;
15843  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15844 
15845  /* function exit code */
15846  __Pyx_RefNannyFinishContext();
15847  return __pyx_r;
15848  }
15849 
15850  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15851  PyObject *__pyx_r = NULL;
15852  __Pyx_RefNannyDeclarations
15853  PyObject *__pyx_t_1 = NULL;
15854  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15855  __Pyx_RefNannySetupContext("sin", 0);
15856  __Pyx_XDECREF(__pyx_r);
15857  __pyx_t_2.__pyx_n = 1;
15858  __pyx_t_2.i = __pyx_v_i;
15859  __pyx_t_1 = __pyx_f_8PyClical_sin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error)
15860  __Pyx_GOTREF(__pyx_t_1);
15861  __pyx_r = __pyx_t_1;
15862  __pyx_t_1 = 0;
15863  goto __pyx_L0;
15864 
15865  /* function exit code */
15866  __pyx_L1_error:;
15867  __Pyx_XDECREF(__pyx_t_1);
15868  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15869  __pyx_r = NULL;
15870  __pyx_L0:;
15871  __Pyx_XGIVEREF(__pyx_r);
15872  __Pyx_RefNannyFinishContext();
15873  return __pyx_r;
15874  }
15875 
15876  /* "PyClical.pyx":1698
15877  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15878  *
15879  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15880  * """
15881  * Inverse sine of multivector with optional complexifier.
15882  */
15883 
15884  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15885  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args) {
15886  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15887  PyObject *__pyx_r = NULL;
15888  __Pyx_RefNannyDeclarations
15889  int __pyx_t_1;
15890  int __pyx_t_2;
15891  PyObject *__pyx_t_3 = NULL;
15892  Clifford __pyx_t_4;
15893  PyObject *__pyx_t_5 = NULL;
15894  PyObject *__pyx_t_6 = NULL;
15895  PyObject *__pyx_t_7 = NULL;
15896  PyObject *__pyx_t_8 = NULL;
15897  PyObject *__pyx_t_9 = NULL;
15898  PyObject *__pyx_t_10 = NULL;
15899  PyObject *__pyx_t_11 = NULL;
15900  __Pyx_RefNannySetupContext("asin", 0);
15901  if (__pyx_optional_args) {
15902  if (__pyx_optional_args->__pyx_n > 0) {
15903  __pyx_v_i = __pyx_optional_args->i;
15904  }
15905  }
15906 
15907  /* "PyClical.pyx":1711
15908  * {1,2,3}
15909  * """
15910  * if not (i is None): # <<<<<<<<<<<<<<
15911  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15912  * else:
15913  */
15914  __pyx_t_1 = (__pyx_v_i != Py_None);
15915  __pyx_t_2 = (__pyx_t_1 != 0);
15916  if (__pyx_t_2) {
15917 
15918  /* "PyClical.pyx":1712
15919  * """
15920  * if not (i is None):
15921  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15922  * else:
15923  * try:
15924  */
15925  __Pyx_XDECREF(__pyx_r);
15926  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15927  __Pyx_GOTREF(__pyx_t_3);
15928  try {
15929  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15930  } catch(...) {
15931  __Pyx_CppExn2PyErr();
15932  __PYX_ERR(0, 1712, __pyx_L1_error)
15933  }
15934  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1712, __pyx_L1_error)
15935  __Pyx_GOTREF(__pyx_t_5);
15936  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15937  __pyx_r = __pyx_t_5;
15938  __pyx_t_5 = 0;
15939  goto __pyx_L0;
15940 
15941  /* "PyClical.pyx":1711
15942  * {1,2,3}
15943  * """
15944  * if not (i is None): # <<<<<<<<<<<<<<
15945  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15946  * else:
15947  */
15948  }
15949 
15950  /* "PyClical.pyx":1714
15951  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15952  * else:
15953  * try: # <<<<<<<<<<<<<<
15954  * return math.asin(obj)
15955  * except:
15956  */
15957  /*else*/ {
15958  {
15959  __Pyx_PyThreadState_declare
15960  __Pyx_PyThreadState_assign
15961  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15962  __Pyx_XGOTREF(__pyx_t_6);
15963  __Pyx_XGOTREF(__pyx_t_7);
15964  __Pyx_XGOTREF(__pyx_t_8);
15965  /*try:*/ {
15966 
15967  /* "PyClical.pyx":1715
15968  * else:
15969  * try:
15970  * return math.asin(obj) # <<<<<<<<<<<<<<
15971  * except:
15972  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15973  */
15974  __Pyx_XDECREF(__pyx_r);
15975  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15976  __Pyx_GOTREF(__pyx_t_3);
15977  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1715, __pyx_L4_error)
15978  __Pyx_GOTREF(__pyx_t_9);
15979  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15980  __pyx_t_3 = NULL;
15981  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15982  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15983  if (likely(__pyx_t_3)) {
15984  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15985  __Pyx_INCREF(__pyx_t_3);
15986  __Pyx_INCREF(function);
15987  __Pyx_DECREF_SET(__pyx_t_9, function);
15988  }
15989  }
15990  if (!__pyx_t_3) {
15991  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15992  __Pyx_GOTREF(__pyx_t_5);
15993  } else {
15994  #if CYTHON_FAST_PYCALL
15995  if (PyFunction_Check(__pyx_t_9)) {
15996  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15997  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15998  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15999  __Pyx_GOTREF(__pyx_t_5);
16000  } else
16001  #endif
16002  #if CYTHON_FAST_PYCCALL
16003  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16004  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16005  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
16006  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16007  __Pyx_GOTREF(__pyx_t_5);
16008  } else
16009  #endif
16010  {
16011  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L4_error)
16012  __Pyx_GOTREF(__pyx_t_10);
16013  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16014  __Pyx_INCREF(__pyx_v_obj);
16015  __Pyx_GIVEREF(__pyx_v_obj);
16016  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16017  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
16018  __Pyx_GOTREF(__pyx_t_5);
16019  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16020  }
16021  }
16022  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16023  __pyx_r = __pyx_t_5;
16024  __pyx_t_5 = 0;
16025  goto __pyx_L8_try_return;
16026 
16027  /* "PyClical.pyx":1714
16028  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16029  * else:
16030  * try: # <<<<<<<<<<<<<<
16031  * return math.asin(obj)
16032  * except:
16033  */
16034  }
16035  __pyx_L4_error:;
16036  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16037  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16038  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16039  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16040 
16041  /* "PyClical.pyx":1716
16042  * try:
16043  * return math.asin(obj)
16044  * except: # <<<<<<<<<<<<<<
16045  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16046  *
16047  */
16048  /*except:*/ {
16049  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16050  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
16051  __Pyx_GOTREF(__pyx_t_5);
16052  __Pyx_GOTREF(__pyx_t_9);
16053  __Pyx_GOTREF(__pyx_t_10);
16054 
16055  /* "PyClical.pyx":1717
16056  * return math.asin(obj)
16057  * except:
16058  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16059  *
16060  * cpdef inline sinh(obj):
16061  */
16062  __Pyx_XDECREF(__pyx_r);
16063  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
16064  __Pyx_GOTREF(__pyx_t_3);
16065  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
16066  __Pyx_GOTREF(__pyx_t_11);
16067  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16068  __pyx_r = __pyx_t_11;
16069  __pyx_t_11 = 0;
16070  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16071  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16072  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16073  goto __pyx_L7_except_return;
16074  }
16075  __pyx_L6_except_error:;
16076 
16077  /* "PyClical.pyx":1714
16078  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16079  * else:
16080  * try: # <<<<<<<<<<<<<<
16081  * return math.asin(obj)
16082  * except:
16083  */
16084  __Pyx_XGIVEREF(__pyx_t_6);
16085  __Pyx_XGIVEREF(__pyx_t_7);
16086  __Pyx_XGIVEREF(__pyx_t_8);
16087  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16088  goto __pyx_L1_error;
16089  __pyx_L8_try_return:;
16090  __Pyx_XGIVEREF(__pyx_t_6);
16091  __Pyx_XGIVEREF(__pyx_t_7);
16092  __Pyx_XGIVEREF(__pyx_t_8);
16093  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16094  goto __pyx_L0;
16095  __pyx_L7_except_return:;
16096  __Pyx_XGIVEREF(__pyx_t_6);
16097  __Pyx_XGIVEREF(__pyx_t_7);
16098  __Pyx_XGIVEREF(__pyx_t_8);
16099  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16100  goto __pyx_L0;
16101  }
16102  }
16103 
16104  /* "PyClical.pyx":1698
16105  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16106  *
16107  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16108  * """
16109  * Inverse sine of multivector with optional complexifier.
16110  */
16111 
16112  /* function exit code */
16113  __pyx_L1_error:;
16114  __Pyx_XDECREF(__pyx_t_3);
16115  __Pyx_XDECREF(__pyx_t_5);
16116  __Pyx_XDECREF(__pyx_t_9);
16117  __Pyx_XDECREF(__pyx_t_10);
16118  __Pyx_XDECREF(__pyx_t_11);
16119  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16120  __pyx_r = 0;
16121  __pyx_L0:;
16122  __Pyx_XGIVEREF(__pyx_r);
16123  __Pyx_RefNannyFinishContext();
16124  return __pyx_r;
16125  }
16126 
16127  /* Python wrapper */
16128  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16129  static char __pyx_doc_8PyClical_60asin[] = "\n Inverse sine of multivector with optional complexifier.\n\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),s)\n {-1}\n >>> s=\"{-1}\"; x=clifford(s); print asin(sin(x,s),\"{-2,-1,1}\")\n {-1}\n >>> print asin(1) / pi\n 0.5\n >>> x=clifford(\"{1,2,3}\"); print asin(sin(x))\n {1,2,3}\n ";
16130  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16131  PyObject *__pyx_v_obj = 0;
16132  PyObject *__pyx_v_i = 0;
16133  PyObject *__pyx_r = 0;
16134  __Pyx_RefNannyDeclarations
16135  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
16136  {
16137  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16138  PyObject* values[2] = {0,0};
16139  values[1] = ((PyObject *)Py_None);
16140  if (unlikely(__pyx_kwds)) {
16141  Py_ssize_t kw_args;
16142  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16143  switch (pos_args) {
16144  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16145  CYTHON_FALLTHROUGH;
16146  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16147  CYTHON_FALLTHROUGH;
16148  case 0: break;
16149  default: goto __pyx_L5_argtuple_error;
16150  }
16151  kw_args = PyDict_Size(__pyx_kwds);
16152  switch (pos_args) {
16153  case 0:
16154  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16155  else goto __pyx_L5_argtuple_error;
16156  CYTHON_FALLTHROUGH;
16157  case 1:
16158  if (kw_args > 0) {
16159  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16160  if (value) { values[1] = value; kw_args--; }
16161  }
16162  }
16163  if (unlikely(kw_args > 0)) {
16164  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
16165  }
16166  } else {
16167  switch (PyTuple_GET_SIZE(__pyx_args)) {
16168  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16169  CYTHON_FALLTHROUGH;
16170  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16171  break;
16172  default: goto __pyx_L5_argtuple_error;
16173  }
16174  }
16175  __pyx_v_obj = values[0];
16176  __pyx_v_i = values[1];
16177  }
16178  goto __pyx_L4_argument_unpacking_done;
16179  __pyx_L5_argtuple_error:;
16180  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
16181  __pyx_L3_error:;
16182  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16183  __Pyx_RefNannyFinishContext();
16184  return NULL;
16185  __pyx_L4_argument_unpacking_done:;
16186  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16187 
16188  /* function exit code */
16189  __Pyx_RefNannyFinishContext();
16190  return __pyx_r;
16191  }
16192 
16193  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16194  PyObject *__pyx_r = NULL;
16195  __Pyx_RefNannyDeclarations
16196  PyObject *__pyx_t_1 = NULL;
16197  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
16198  __Pyx_RefNannySetupContext("asin", 0);
16199  __Pyx_XDECREF(__pyx_r);
16200  __pyx_t_2.__pyx_n = 1;
16201  __pyx_t_2.i = __pyx_v_i;
16202  __pyx_t_1 = __pyx_f_8PyClical_asin(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error)
16203  __Pyx_GOTREF(__pyx_t_1);
16204  __pyx_r = __pyx_t_1;
16205  __pyx_t_1 = 0;
16206  goto __pyx_L0;
16207 
16208  /* function exit code */
16209  __pyx_L1_error:;
16210  __Pyx_XDECREF(__pyx_t_1);
16211  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16212  __pyx_r = NULL;
16213  __pyx_L0:;
16214  __Pyx_XGIVEREF(__pyx_r);
16215  __Pyx_RefNannyFinishContext();
16216  return __pyx_r;
16217  }
16218 
16219  /* "PyClical.pyx":1719
16220  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16221  *
16222  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16223  * """
16224  * Hyperbolic sine of multivector.
16225  */
16226 
16227  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16228  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16229  PyObject *__pyx_r = NULL;
16230  __Pyx_RefNannyDeclarations
16231  PyObject *__pyx_t_1 = NULL;
16232  PyObject *__pyx_t_2 = NULL;
16233  PyObject *__pyx_t_3 = NULL;
16234  PyObject *__pyx_t_4 = NULL;
16235  PyObject *__pyx_t_5 = NULL;
16236  PyObject *__pyx_t_6 = NULL;
16237  PyObject *__pyx_t_7 = NULL;
16238  PyObject *__pyx_t_8 = NULL;
16239  __Pyx_RefNannySetupContext("sinh", 0);
16240 
16241  /* "PyClical.pyx":1728
16242  * 0.5{1,2}
16243  * """
16244  * try: # <<<<<<<<<<<<<<
16245  * return math.sinh(obj)
16246  * except:
16247  */
16248  {
16249  __Pyx_PyThreadState_declare
16250  __Pyx_PyThreadState_assign
16251  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16252  __Pyx_XGOTREF(__pyx_t_1);
16253  __Pyx_XGOTREF(__pyx_t_2);
16254  __Pyx_XGOTREF(__pyx_t_3);
16255  /*try:*/ {
16256 
16257  /* "PyClical.pyx":1729
16258  * """
16259  * try:
16260  * return math.sinh(obj) # <<<<<<<<<<<<<<
16261  * except:
16262  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16263  */
16264  __Pyx_XDECREF(__pyx_r);
16265  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
16266  __Pyx_GOTREF(__pyx_t_5);
16267  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sinh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1729, __pyx_L3_error)
16268  __Pyx_GOTREF(__pyx_t_6);
16269  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16270  __pyx_t_5 = NULL;
16271  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16272  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16273  if (likely(__pyx_t_5)) {
16274  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16275  __Pyx_INCREF(__pyx_t_5);
16276  __Pyx_INCREF(function);
16277  __Pyx_DECREF_SET(__pyx_t_6, function);
16278  }
16279  }
16280  if (!__pyx_t_5) {
16281  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16282  __Pyx_GOTREF(__pyx_t_4);
16283  } else {
16284  #if CYTHON_FAST_PYCALL
16285  if (PyFunction_Check(__pyx_t_6)) {
16286  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16287  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16288  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16289  __Pyx_GOTREF(__pyx_t_4);
16290  } else
16291  #endif
16292  #if CYTHON_FAST_PYCCALL
16293  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16294  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16295  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16296  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16297  __Pyx_GOTREF(__pyx_t_4);
16298  } else
16299  #endif
16300  {
16301  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1729, __pyx_L3_error)
16302  __Pyx_GOTREF(__pyx_t_7);
16303  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16304  __Pyx_INCREF(__pyx_v_obj);
16305  __Pyx_GIVEREF(__pyx_v_obj);
16306  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16307  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16308  __Pyx_GOTREF(__pyx_t_4);
16309  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16310  }
16311  }
16312  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16313  __pyx_r = __pyx_t_4;
16314  __pyx_t_4 = 0;
16315  goto __pyx_L7_try_return;
16316 
16317  /* "PyClical.pyx":1728
16318  * 0.5{1,2}
16319  * """
16320  * try: # <<<<<<<<<<<<<<
16321  * return math.sinh(obj)
16322  * except:
16323  */
16324  }
16325  __pyx_L3_error:;
16326  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16327  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16328  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16329  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16330 
16331  /* "PyClical.pyx":1730
16332  * try:
16333  * return math.sinh(obj)
16334  * except: # <<<<<<<<<<<<<<
16335  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16336  *
16337  */
16338  /*except:*/ {
16339  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16340  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16341  __Pyx_GOTREF(__pyx_t_4);
16342  __Pyx_GOTREF(__pyx_t_6);
16343  __Pyx_GOTREF(__pyx_t_7);
16344 
16345  /* "PyClical.pyx":1731
16346  * return math.sinh(obj)
16347  * except:
16348  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16349  *
16350  * cpdef inline asinh(obj,i = None):
16351  */
16352  __Pyx_XDECREF(__pyx_r);
16353  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
16354  __Pyx_GOTREF(__pyx_t_5);
16355  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), sinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
16356  __Pyx_GOTREF(__pyx_t_8);
16357  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16358  __pyx_r = __pyx_t_8;
16359  __pyx_t_8 = 0;
16360  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16361  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16362  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16363  goto __pyx_L6_except_return;
16364  }
16365  __pyx_L5_except_error:;
16366 
16367  /* "PyClical.pyx":1728
16368  * 0.5{1,2}
16369  * """
16370  * try: # <<<<<<<<<<<<<<
16371  * return math.sinh(obj)
16372  * except:
16373  */
16374  __Pyx_XGIVEREF(__pyx_t_1);
16375  __Pyx_XGIVEREF(__pyx_t_2);
16376  __Pyx_XGIVEREF(__pyx_t_3);
16377  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16378  goto __pyx_L1_error;
16379  __pyx_L7_try_return:;
16380  __Pyx_XGIVEREF(__pyx_t_1);
16381  __Pyx_XGIVEREF(__pyx_t_2);
16382  __Pyx_XGIVEREF(__pyx_t_3);
16383  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16384  goto __pyx_L0;
16385  __pyx_L6_except_return:;
16386  __Pyx_XGIVEREF(__pyx_t_1);
16387  __Pyx_XGIVEREF(__pyx_t_2);
16388  __Pyx_XGIVEREF(__pyx_t_3);
16389  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16390  goto __pyx_L0;
16391  }
16392 
16393  /* "PyClical.pyx":1719
16394  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16395  *
16396  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16397  * """
16398  * Hyperbolic sine of multivector.
16399  */
16400 
16401  /* function exit code */
16402  __pyx_L1_error:;
16403  __Pyx_XDECREF(__pyx_t_4);
16404  __Pyx_XDECREF(__pyx_t_5);
16405  __Pyx_XDECREF(__pyx_t_6);
16406  __Pyx_XDECREF(__pyx_t_7);
16407  __Pyx_XDECREF(__pyx_t_8);
16408  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16409  __pyx_r = 0;
16410  __pyx_L0:;
16411  __Pyx_XGIVEREF(__pyx_r);
16412  __Pyx_RefNannyFinishContext();
16413  return __pyx_r;
16414  }
16415 
16416  /* Python wrapper */
16417  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16418  static char __pyx_doc_8PyClical_62sinh[] = "\n Hyperbolic sine of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/2; print sinh(x)\n {1,2}\n >>> x=clifford(\"{1,2}\") * pi/6; print sinh(x)\n 0.5{1,2}\n ";
16419  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16420  PyObject *__pyx_r = 0;
16421  __Pyx_RefNannyDeclarations
16422  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16423  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16424 
16425  /* function exit code */
16426  __Pyx_RefNannyFinishContext();
16427  return __pyx_r;
16428  }
16429 
16430  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16431  PyObject *__pyx_r = NULL;
16432  __Pyx_RefNannyDeclarations
16433  PyObject *__pyx_t_1 = NULL;
16434  __Pyx_RefNannySetupContext("sinh", 0);
16435  __Pyx_XDECREF(__pyx_r);
16436  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
16437  __Pyx_GOTREF(__pyx_t_1);
16438  __pyx_r = __pyx_t_1;
16439  __pyx_t_1 = 0;
16440  goto __pyx_L0;
16441 
16442  /* function exit code */
16443  __pyx_L1_error:;
16444  __Pyx_XDECREF(__pyx_t_1);
16445  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16446  __pyx_r = NULL;
16447  __pyx_L0:;
16448  __Pyx_XGIVEREF(__pyx_r);
16449  __Pyx_RefNannyFinishContext();
16450  return __pyx_r;
16451  }
16452 
16453  /* "PyClical.pyx":1733
16454  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16455  *
16456  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16457  * """
16458  * Inverse hyperbolic sine of multivector with optional complexifier.
16459  */
16460 
16461  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16462  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args) {
16463  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16464  PyObject *__pyx_r = NULL;
16465  __Pyx_RefNannyDeclarations
16466  int __pyx_t_1;
16467  int __pyx_t_2;
16468  PyObject *__pyx_t_3 = NULL;
16469  Clifford __pyx_t_4;
16470  PyObject *__pyx_t_5 = NULL;
16471  PyObject *__pyx_t_6 = NULL;
16472  PyObject *__pyx_t_7 = NULL;
16473  PyObject *__pyx_t_8 = NULL;
16474  PyObject *__pyx_t_9 = NULL;
16475  PyObject *__pyx_t_10 = NULL;
16476  PyObject *__pyx_t_11 = NULL;
16477  __Pyx_RefNannySetupContext("asinh", 0);
16478  if (__pyx_optional_args) {
16479  if (__pyx_optional_args->__pyx_n > 0) {
16480  __pyx_v_i = __pyx_optional_args->i;
16481  }
16482  }
16483 
16484  /* "PyClical.pyx":1744
16485  * {1,2}
16486  * """
16487  * if not (i is None): # <<<<<<<<<<<<<<
16488  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16489  * else:
16490  */
16491  __pyx_t_1 = (__pyx_v_i != Py_None);
16492  __pyx_t_2 = (__pyx_t_1 != 0);
16493  if (__pyx_t_2) {
16494 
16495  /* "PyClical.pyx":1745
16496  * """
16497  * if not (i is None):
16498  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16499  * else:
16500  * try:
16501  */
16502  __Pyx_XDECREF(__pyx_r);
16503  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
16504  __Pyx_GOTREF(__pyx_t_3);
16505  try {
16506  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16507  } catch(...) {
16508  __Pyx_CppExn2PyErr();
16509  __PYX_ERR(0, 1745, __pyx_L1_error)
16510  }
16511  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1745, __pyx_L1_error)
16512  __Pyx_GOTREF(__pyx_t_5);
16513  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16514  __pyx_r = __pyx_t_5;
16515  __pyx_t_5 = 0;
16516  goto __pyx_L0;
16517 
16518  /* "PyClical.pyx":1744
16519  * {1,2}
16520  * """
16521  * if not (i is None): # <<<<<<<<<<<<<<
16522  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16523  * else:
16524  */
16525  }
16526 
16527  /* "PyClical.pyx":1747
16528  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16529  * else:
16530  * try: # <<<<<<<<<<<<<<
16531  * return math.asinh(obj)
16532  * except:
16533  */
16534  /*else*/ {
16535  {
16536  __Pyx_PyThreadState_declare
16537  __Pyx_PyThreadState_assign
16538  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16539  __Pyx_XGOTREF(__pyx_t_6);
16540  __Pyx_XGOTREF(__pyx_t_7);
16541  __Pyx_XGOTREF(__pyx_t_8);
16542  /*try:*/ {
16543 
16544  /* "PyClical.pyx":1748
16545  * else:
16546  * try:
16547  * return math.asinh(obj) # <<<<<<<<<<<<<<
16548  * except:
16549  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16550  */
16551  __Pyx_XDECREF(__pyx_r);
16552  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16553  __Pyx_GOTREF(__pyx_t_3);
16554  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asinh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1748, __pyx_L4_error)
16555  __Pyx_GOTREF(__pyx_t_9);
16556  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16557  __pyx_t_3 = NULL;
16558  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16559  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16560  if (likely(__pyx_t_3)) {
16561  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16562  __Pyx_INCREF(__pyx_t_3);
16563  __Pyx_INCREF(function);
16564  __Pyx_DECREF_SET(__pyx_t_9, function);
16565  }
16566  }
16567  if (!__pyx_t_3) {
16568  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16569  __Pyx_GOTREF(__pyx_t_5);
16570  } else {
16571  #if CYTHON_FAST_PYCALL
16572  if (PyFunction_Check(__pyx_t_9)) {
16573  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16574  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16575  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16576  __Pyx_GOTREF(__pyx_t_5);
16577  } else
16578  #endif
16579  #if CYTHON_FAST_PYCCALL
16580  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16581  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16582  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16583  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16584  __Pyx_GOTREF(__pyx_t_5);
16585  } else
16586  #endif
16587  {
16588  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1748, __pyx_L4_error)
16589  __Pyx_GOTREF(__pyx_t_10);
16590  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16591  __Pyx_INCREF(__pyx_v_obj);
16592  __Pyx_GIVEREF(__pyx_v_obj);
16593  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16594  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16595  __Pyx_GOTREF(__pyx_t_5);
16596  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16597  }
16598  }
16599  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16600  __pyx_r = __pyx_t_5;
16601  __pyx_t_5 = 0;
16602  goto __pyx_L8_try_return;
16603 
16604  /* "PyClical.pyx":1747
16605  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16606  * else:
16607  * try: # <<<<<<<<<<<<<<
16608  * return math.asinh(obj)
16609  * except:
16610  */
16611  }
16612  __pyx_L4_error:;
16613  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16614  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16615  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16616  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16617 
16618  /* "PyClical.pyx":1749
16619  * try:
16620  * return math.asinh(obj)
16621  * except: # <<<<<<<<<<<<<<
16622  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16623  *
16624  */
16625  /*except:*/ {
16626  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16627  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16628  __Pyx_GOTREF(__pyx_t_5);
16629  __Pyx_GOTREF(__pyx_t_9);
16630  __Pyx_GOTREF(__pyx_t_10);
16631 
16632  /* "PyClical.pyx":1750
16633  * return math.asinh(obj)
16634  * except:
16635  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16636  *
16637  * cpdef inline tan(obj,i = None):
16638  */
16639  __Pyx_XDECREF(__pyx_r);
16640  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16641  __Pyx_GOTREF(__pyx_t_3);
16642  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16643  __Pyx_GOTREF(__pyx_t_11);
16644  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16645  __pyx_r = __pyx_t_11;
16646  __pyx_t_11 = 0;
16647  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16648  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16649  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16650  goto __pyx_L7_except_return;
16651  }
16652  __pyx_L6_except_error:;
16653 
16654  /* "PyClical.pyx":1747
16655  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16656  * else:
16657  * try: # <<<<<<<<<<<<<<
16658  * return math.asinh(obj)
16659  * except:
16660  */
16661  __Pyx_XGIVEREF(__pyx_t_6);
16662  __Pyx_XGIVEREF(__pyx_t_7);
16663  __Pyx_XGIVEREF(__pyx_t_8);
16664  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16665  goto __pyx_L1_error;
16666  __pyx_L8_try_return:;
16667  __Pyx_XGIVEREF(__pyx_t_6);
16668  __Pyx_XGIVEREF(__pyx_t_7);
16669  __Pyx_XGIVEREF(__pyx_t_8);
16670  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16671  goto __pyx_L0;
16672  __pyx_L7_except_return:;
16673  __Pyx_XGIVEREF(__pyx_t_6);
16674  __Pyx_XGIVEREF(__pyx_t_7);
16675  __Pyx_XGIVEREF(__pyx_t_8);
16676  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16677  goto __pyx_L0;
16678  }
16679  }
16680 
16681  /* "PyClical.pyx":1733
16682  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16683  *
16684  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16685  * """
16686  * Inverse hyperbolic sine of multivector with optional complexifier.
16687  */
16688 
16689  /* function exit code */
16690  __pyx_L1_error:;
16691  __Pyx_XDECREF(__pyx_t_3);
16692  __Pyx_XDECREF(__pyx_t_5);
16693  __Pyx_XDECREF(__pyx_t_9);
16694  __Pyx_XDECREF(__pyx_t_10);
16695  __Pyx_XDECREF(__pyx_t_11);
16696  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16697  __pyx_r = 0;
16698  __pyx_L0:;
16699  __Pyx_XGIVEREF(__pyx_r);
16700  __Pyx_RefNannyFinishContext();
16701  return __pyx_r;
16702  }
16703 
16704  /* Python wrapper */
16705  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16706  static char __pyx_doc_8PyClical_64asinh[] = "\n Inverse hyperbolic sine of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print asinh(x,\"{1,2,3}\") * 2/pi\n {1,2}\n >>> x=clifford(\"{1,2}\"); print asinh(x) * 2/pi\n {1,2}\n >>> x=clifford(\"{1,2}\") / 2; print asinh(x) * 6/pi\n {1,2}\n ";
16707  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16708  PyObject *__pyx_v_obj = 0;
16709  PyObject *__pyx_v_i = 0;
16710  PyObject *__pyx_r = 0;
16711  __Pyx_RefNannyDeclarations
16712  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16713  {
16714  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16715  PyObject* values[2] = {0,0};
16716  values[1] = ((PyObject *)Py_None);
16717  if (unlikely(__pyx_kwds)) {
16718  Py_ssize_t kw_args;
16719  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16720  switch (pos_args) {
16721  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16722  CYTHON_FALLTHROUGH;
16723  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16724  CYTHON_FALLTHROUGH;
16725  case 0: break;
16726  default: goto __pyx_L5_argtuple_error;
16727  }
16728  kw_args = PyDict_Size(__pyx_kwds);
16729  switch (pos_args) {
16730  case 0:
16731  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16732  else goto __pyx_L5_argtuple_error;
16733  CYTHON_FALLTHROUGH;
16734  case 1:
16735  if (kw_args > 0) {
16736  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16737  if (value) { values[1] = value; kw_args--; }
16738  }
16739  }
16740  if (unlikely(kw_args > 0)) {
16741  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16742  }
16743  } else {
16744  switch (PyTuple_GET_SIZE(__pyx_args)) {
16745  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16746  CYTHON_FALLTHROUGH;
16747  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16748  break;
16749  default: goto __pyx_L5_argtuple_error;
16750  }
16751  }
16752  __pyx_v_obj = values[0];
16753  __pyx_v_i = values[1];
16754  }
16755  goto __pyx_L4_argument_unpacking_done;
16756  __pyx_L5_argtuple_error:;
16757  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16758  __pyx_L3_error:;
16759  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16760  __Pyx_RefNannyFinishContext();
16761  return NULL;
16762  __pyx_L4_argument_unpacking_done:;
16763  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16764 
16765  /* function exit code */
16766  __Pyx_RefNannyFinishContext();
16767  return __pyx_r;
16768  }
16769 
16770  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16771  PyObject *__pyx_r = NULL;
16772  __Pyx_RefNannyDeclarations
16773  PyObject *__pyx_t_1 = NULL;
16774  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16775  __Pyx_RefNannySetupContext("asinh", 0);
16776  __Pyx_XDECREF(__pyx_r);
16777  __pyx_t_2.__pyx_n = 1;
16778  __pyx_t_2.i = __pyx_v_i;
16779  __pyx_t_1 = __pyx_f_8PyClical_asinh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1733, __pyx_L1_error)
16780  __Pyx_GOTREF(__pyx_t_1);
16781  __pyx_r = __pyx_t_1;
16782  __pyx_t_1 = 0;
16783  goto __pyx_L0;
16784 
16785  /* function exit code */
16786  __pyx_L1_error:;
16787  __Pyx_XDECREF(__pyx_t_1);
16788  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16789  __pyx_r = NULL;
16790  __pyx_L0:;
16791  __Pyx_XGIVEREF(__pyx_r);
16792  __Pyx_RefNannyFinishContext();
16793  return __pyx_r;
16794  }
16795 
16796  /* "PyClical.pyx":1752
16797  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16798  *
16799  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16800  * """
16801  * Tangent of multivector with optional complexifier.
16802  */
16803 
16804  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16805  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args) {
16806  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16807  PyObject *__pyx_r = NULL;
16808  __Pyx_RefNannyDeclarations
16809  int __pyx_t_1;
16810  int __pyx_t_2;
16811  PyObject *__pyx_t_3 = NULL;
16812  Clifford __pyx_t_4;
16813  PyObject *__pyx_t_5 = NULL;
16814  PyObject *__pyx_t_6 = NULL;
16815  PyObject *__pyx_t_7 = NULL;
16816  PyObject *__pyx_t_8 = NULL;
16817  PyObject *__pyx_t_9 = NULL;
16818  PyObject *__pyx_t_10 = NULL;
16819  PyObject *__pyx_t_11 = NULL;
16820  __Pyx_RefNannySetupContext("tan", 0);
16821  if (__pyx_optional_args) {
16822  if (__pyx_optional_args->__pyx_n > 0) {
16823  __pyx_v_i = __pyx_optional_args->i;
16824  }
16825  }
16826 
16827  /* "PyClical.pyx":1761
16828  * 0.7616{1,2}
16829  * """
16830  * if not (i is None): # <<<<<<<<<<<<<<
16831  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16832  * else:
16833  */
16834  __pyx_t_1 = (__pyx_v_i != Py_None);
16835  __pyx_t_2 = (__pyx_t_1 != 0);
16836  if (__pyx_t_2) {
16837 
16838  /* "PyClical.pyx":1762
16839  * """
16840  * if not (i is None):
16841  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16842  * else:
16843  * try:
16844  */
16845  __Pyx_XDECREF(__pyx_r);
16846  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16847  __Pyx_GOTREF(__pyx_t_3);
16848  try {
16849  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16850  } catch(...) {
16851  __Pyx_CppExn2PyErr();
16852  __PYX_ERR(0, 1762, __pyx_L1_error)
16853  }
16854  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1762, __pyx_L1_error)
16855  __Pyx_GOTREF(__pyx_t_5);
16856  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16857  __pyx_r = __pyx_t_5;
16858  __pyx_t_5 = 0;
16859  goto __pyx_L0;
16860 
16861  /* "PyClical.pyx":1761
16862  * 0.7616{1,2}
16863  * """
16864  * if not (i is None): # <<<<<<<<<<<<<<
16865  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16866  * else:
16867  */
16868  }
16869 
16870  /* "PyClical.pyx":1764
16871  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16872  * else:
16873  * try: # <<<<<<<<<<<<<<
16874  * return math.tan(obj)
16875  * except:
16876  */
16877  /*else*/ {
16878  {
16879  __Pyx_PyThreadState_declare
16880  __Pyx_PyThreadState_assign
16881  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16882  __Pyx_XGOTREF(__pyx_t_6);
16883  __Pyx_XGOTREF(__pyx_t_7);
16884  __Pyx_XGOTREF(__pyx_t_8);
16885  /*try:*/ {
16886 
16887  /* "PyClical.pyx":1765
16888  * else:
16889  * try:
16890  * return math.tan(obj) # <<<<<<<<<<<<<<
16891  * except:
16892  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16893  */
16894  __Pyx_XDECREF(__pyx_r);
16895  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16896  __Pyx_GOTREF(__pyx_t_3);
16897  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1765, __pyx_L4_error)
16898  __Pyx_GOTREF(__pyx_t_9);
16899  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16900  __pyx_t_3 = NULL;
16901  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16902  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16903  if (likely(__pyx_t_3)) {
16904  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16905  __Pyx_INCREF(__pyx_t_3);
16906  __Pyx_INCREF(function);
16907  __Pyx_DECREF_SET(__pyx_t_9, function);
16908  }
16909  }
16910  if (!__pyx_t_3) {
16911  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16912  __Pyx_GOTREF(__pyx_t_5);
16913  } else {
16914  #if CYTHON_FAST_PYCALL
16915  if (PyFunction_Check(__pyx_t_9)) {
16916  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16917  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16918  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16919  __Pyx_GOTREF(__pyx_t_5);
16920  } else
16921  #endif
16922  #if CYTHON_FAST_PYCCALL
16923  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16924  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16925  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16926  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16927  __Pyx_GOTREF(__pyx_t_5);
16928  } else
16929  #endif
16930  {
16931  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1765, __pyx_L4_error)
16932  __Pyx_GOTREF(__pyx_t_10);
16933  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16934  __Pyx_INCREF(__pyx_v_obj);
16935  __Pyx_GIVEREF(__pyx_v_obj);
16936  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16937  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16938  __Pyx_GOTREF(__pyx_t_5);
16939  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16940  }
16941  }
16942  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16943  __pyx_r = __pyx_t_5;
16944  __pyx_t_5 = 0;
16945  goto __pyx_L8_try_return;
16946 
16947  /* "PyClical.pyx":1764
16948  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16949  * else:
16950  * try: # <<<<<<<<<<<<<<
16951  * return math.tan(obj)
16952  * except:
16953  */
16954  }
16955  __pyx_L4_error:;
16956  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16957  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16958  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16959  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16960 
16961  /* "PyClical.pyx":1766
16962  * try:
16963  * return math.tan(obj)
16964  * except: # <<<<<<<<<<<<<<
16965  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16966  *
16967  */
16968  /*except:*/ {
16969  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16970  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16971  __Pyx_GOTREF(__pyx_t_5);
16972  __Pyx_GOTREF(__pyx_t_9);
16973  __Pyx_GOTREF(__pyx_t_10);
16974 
16975  /* "PyClical.pyx":1767
16976  * return math.tan(obj)
16977  * except:
16978  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16979  *
16980  * cpdef inline atan(obj,i = None):
16981  */
16982  __Pyx_XDECREF(__pyx_r);
16983  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16984  __Pyx_GOTREF(__pyx_t_3);
16985  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16986  __Pyx_GOTREF(__pyx_t_11);
16987  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16988  __pyx_r = __pyx_t_11;
16989  __pyx_t_11 = 0;
16990  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16991  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16992  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16993  goto __pyx_L7_except_return;
16994  }
16995  __pyx_L6_except_error:;
16996 
16997  /* "PyClical.pyx":1764
16998  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16999  * else:
17000  * try: # <<<<<<<<<<<<<<
17001  * return math.tan(obj)
17002  * except:
17003  */
17004  __Pyx_XGIVEREF(__pyx_t_6);
17005  __Pyx_XGIVEREF(__pyx_t_7);
17006  __Pyx_XGIVEREF(__pyx_t_8);
17007  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17008  goto __pyx_L1_error;
17009  __pyx_L8_try_return:;
17010  __Pyx_XGIVEREF(__pyx_t_6);
17011  __Pyx_XGIVEREF(__pyx_t_7);
17012  __Pyx_XGIVEREF(__pyx_t_8);
17013  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17014  goto __pyx_L0;
17015  __pyx_L7_except_return:;
17016  __Pyx_XGIVEREF(__pyx_t_6);
17017  __Pyx_XGIVEREF(__pyx_t_7);
17018  __Pyx_XGIVEREF(__pyx_t_8);
17019  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17020  goto __pyx_L0;
17021  }
17022  }
17023 
17024  /* "PyClical.pyx":1752
17025  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17026  *
17027  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17028  * """
17029  * Tangent of multivector with optional complexifier.
17030  */
17031 
17032  /* function exit code */
17033  __pyx_L1_error:;
17034  __Pyx_XDECREF(__pyx_t_3);
17035  __Pyx_XDECREF(__pyx_t_5);
17036  __Pyx_XDECREF(__pyx_t_9);
17037  __Pyx_XDECREF(__pyx_t_10);
17038  __Pyx_XDECREF(__pyx_t_11);
17039  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17040  __pyx_r = 0;
17041  __pyx_L0:;
17042  __Pyx_XGIVEREF(__pyx_r);
17043  __Pyx_RefNannyFinishContext();
17044  return __pyx_r;
17045  }
17046 
17047  /* Python wrapper */
17048  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17049  static char __pyx_doc_8PyClical_66tan[] = "\n Tangent of multivector with optional complexifier.\n\n >>> x=clifford(\"{1,2}\"); print tan(x,\"{1,2,3}\")\n 0.7616{1,2}\n >>> x=clifford(\"{1,2}\"); print tan(x)\n 0.7616{1,2}\n ";
17050  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17051  PyObject *__pyx_v_obj = 0;
17052  PyObject *__pyx_v_i = 0;
17053  PyObject *__pyx_r = 0;
17054  __Pyx_RefNannyDeclarations
17055  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
17056  {
17057  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17058  PyObject* values[2] = {0,0};
17059  values[1] = ((PyObject *)Py_None);
17060  if (unlikely(__pyx_kwds)) {
17061  Py_ssize_t kw_args;
17062  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17063  switch (pos_args) {
17064  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17065  CYTHON_FALLTHROUGH;
17066  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17067  CYTHON_FALLTHROUGH;
17068  case 0: break;
17069  default: goto __pyx_L5_argtuple_error;
17070  }
17071  kw_args = PyDict_Size(__pyx_kwds);
17072  switch (pos_args) {
17073  case 0:
17074  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17075  else goto __pyx_L5_argtuple_error;
17076  CYTHON_FALLTHROUGH;
17077  case 1:
17078  if (kw_args > 0) {
17079  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17080  if (value) { values[1] = value; kw_args--; }
17081  }
17082  }
17083  if (unlikely(kw_args > 0)) {
17084  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
17085  }
17086  } else {
17087  switch (PyTuple_GET_SIZE(__pyx_args)) {
17088  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17089  CYTHON_FALLTHROUGH;
17090  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17091  break;
17092  default: goto __pyx_L5_argtuple_error;
17093  }
17094  }
17095  __pyx_v_obj = values[0];
17096  __pyx_v_i = values[1];
17097  }
17098  goto __pyx_L4_argument_unpacking_done;
17099  __pyx_L5_argtuple_error:;
17100  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
17101  __pyx_L3_error:;
17102  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17103  __Pyx_RefNannyFinishContext();
17104  return NULL;
17105  __pyx_L4_argument_unpacking_done:;
17106  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17107 
17108  /* function exit code */
17109  __Pyx_RefNannyFinishContext();
17110  return __pyx_r;
17111  }
17112 
17113  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17114  PyObject *__pyx_r = NULL;
17115  __Pyx_RefNannyDeclarations
17116  PyObject *__pyx_t_1 = NULL;
17117  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
17118  __Pyx_RefNannySetupContext("tan", 0);
17119  __Pyx_XDECREF(__pyx_r);
17120  __pyx_t_2.__pyx_n = 1;
17121  __pyx_t_2.i = __pyx_v_i;
17122  __pyx_t_1 = __pyx_f_8PyClical_tan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error)
17123  __Pyx_GOTREF(__pyx_t_1);
17124  __pyx_r = __pyx_t_1;
17125  __pyx_t_1 = 0;
17126  goto __pyx_L0;
17127 
17128  /* function exit code */
17129  __pyx_L1_error:;
17130  __Pyx_XDECREF(__pyx_t_1);
17131  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17132  __pyx_r = NULL;
17133  __pyx_L0:;
17134  __Pyx_XGIVEREF(__pyx_r);
17135  __Pyx_RefNannyFinishContext();
17136  return __pyx_r;
17137  }
17138 
17139  /* "PyClical.pyx":1769
17140  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17141  *
17142  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17143  * """
17144  * Inverse tangent of multivector with optional complexifier.
17145  */
17146 
17147  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17148  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args) {
17149  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17150  PyObject *__pyx_r = NULL;
17151  __Pyx_RefNannyDeclarations
17152  int __pyx_t_1;
17153  int __pyx_t_2;
17154  PyObject *__pyx_t_3 = NULL;
17155  Clifford __pyx_t_4;
17156  PyObject *__pyx_t_5 = NULL;
17157  PyObject *__pyx_t_6 = NULL;
17158  PyObject *__pyx_t_7 = NULL;
17159  PyObject *__pyx_t_8 = NULL;
17160  PyObject *__pyx_t_9 = NULL;
17161  PyObject *__pyx_t_10 = NULL;
17162  PyObject *__pyx_t_11 = NULL;
17163  __Pyx_RefNannySetupContext("atan", 0);
17164  if (__pyx_optional_args) {
17165  if (__pyx_optional_args->__pyx_n > 0) {
17166  __pyx_v_i = __pyx_optional_args->i;
17167  }
17168  }
17169 
17170  /* "PyClical.pyx":1778
17171  * {1}
17172  * """
17173  * if not (i is None): # <<<<<<<<<<<<<<
17174  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17175  * else:
17176  */
17177  __pyx_t_1 = (__pyx_v_i != Py_None);
17178  __pyx_t_2 = (__pyx_t_1 != 0);
17179  if (__pyx_t_2) {
17180 
17181  /* "PyClical.pyx":1779
17182  * """
17183  * if not (i is None):
17184  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17185  * else:
17186  * try:
17187  */
17188  __Pyx_XDECREF(__pyx_r);
17189  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
17190  __Pyx_GOTREF(__pyx_t_3);
17191  try {
17192  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17193  } catch(...) {
17194  __Pyx_CppExn2PyErr();
17195  __PYX_ERR(0, 1779, __pyx_L1_error)
17196  }
17197  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error)
17198  __Pyx_GOTREF(__pyx_t_5);
17199  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17200  __pyx_r = __pyx_t_5;
17201  __pyx_t_5 = 0;
17202  goto __pyx_L0;
17203 
17204  /* "PyClical.pyx":1778
17205  * {1}
17206  * """
17207  * if not (i is None): # <<<<<<<<<<<<<<
17208  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17209  * else:
17210  */
17211  }
17212 
17213  /* "PyClical.pyx":1781
17214  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17215  * else:
17216  * try: # <<<<<<<<<<<<<<
17217  * return math.atan(obj)
17218  * except:
17219  */
17220  /*else*/ {
17221  {
17222  __Pyx_PyThreadState_declare
17223  __Pyx_PyThreadState_assign
17224  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17225  __Pyx_XGOTREF(__pyx_t_6);
17226  __Pyx_XGOTREF(__pyx_t_7);
17227  __Pyx_XGOTREF(__pyx_t_8);
17228  /*try:*/ {
17229 
17230  /* "PyClical.pyx":1782
17231  * else:
17232  * try:
17233  * return math.atan(obj) # <<<<<<<<<<<<<<
17234  * except:
17235  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17236  */
17237  __Pyx_XDECREF(__pyx_r);
17238  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
17239  __Pyx_GOTREF(__pyx_t_3);
17240  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1782, __pyx_L4_error)
17241  __Pyx_GOTREF(__pyx_t_9);
17242  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17243  __pyx_t_3 = NULL;
17244  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17245  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17246  if (likely(__pyx_t_3)) {
17247  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17248  __Pyx_INCREF(__pyx_t_3);
17249  __Pyx_INCREF(function);
17250  __Pyx_DECREF_SET(__pyx_t_9, function);
17251  }
17252  }
17253  if (!__pyx_t_3) {
17254  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17255  __Pyx_GOTREF(__pyx_t_5);
17256  } else {
17257  #if CYTHON_FAST_PYCALL
17258  if (PyFunction_Check(__pyx_t_9)) {
17259  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17260  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17261  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17262  __Pyx_GOTREF(__pyx_t_5);
17263  } else
17264  #endif
17265  #if CYTHON_FAST_PYCCALL
17266  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17267  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17268  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17269  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17270  __Pyx_GOTREF(__pyx_t_5);
17271  } else
17272  #endif
17273  {
17274  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L4_error)
17275  __Pyx_GOTREF(__pyx_t_10);
17276  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17277  __Pyx_INCREF(__pyx_v_obj);
17278  __Pyx_GIVEREF(__pyx_v_obj);
17279  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17280  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17281  __Pyx_GOTREF(__pyx_t_5);
17282  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17283  }
17284  }
17285  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17286  __pyx_r = __pyx_t_5;
17287  __pyx_t_5 = 0;
17288  goto __pyx_L8_try_return;
17289 
17290  /* "PyClical.pyx":1781
17291  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17292  * else:
17293  * try: # <<<<<<<<<<<<<<
17294  * return math.atan(obj)
17295  * except:
17296  */
17297  }
17298  __pyx_L4_error:;
17299  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17300  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17301  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17302  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17303 
17304  /* "PyClical.pyx":1783
17305  * try:
17306  * return math.atan(obj)
17307  * except: # <<<<<<<<<<<<<<
17308  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17309  *
17310  */
17311  /*except:*/ {
17312  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17313  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17314  __Pyx_GOTREF(__pyx_t_5);
17315  __Pyx_GOTREF(__pyx_t_9);
17316  __Pyx_GOTREF(__pyx_t_10);
17317 
17318  /* "PyClical.pyx":1784
17319  * return math.atan(obj)
17320  * except:
17321  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17322  *
17323  * cpdef inline tanh(obj):
17324  */
17325  __Pyx_XDECREF(__pyx_r);
17326  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
17327  __Pyx_GOTREF(__pyx_t_3);
17328  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
17329  __Pyx_GOTREF(__pyx_t_11);
17330  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17331  __pyx_r = __pyx_t_11;
17332  __pyx_t_11 = 0;
17333  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17334  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17335  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17336  goto __pyx_L7_except_return;
17337  }
17338  __pyx_L6_except_error:;
17339 
17340  /* "PyClical.pyx":1781
17341  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17342  * else:
17343  * try: # <<<<<<<<<<<<<<
17344  * return math.atan(obj)
17345  * except:
17346  */
17347  __Pyx_XGIVEREF(__pyx_t_6);
17348  __Pyx_XGIVEREF(__pyx_t_7);
17349  __Pyx_XGIVEREF(__pyx_t_8);
17350  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17351  goto __pyx_L1_error;
17352  __pyx_L8_try_return:;
17353  __Pyx_XGIVEREF(__pyx_t_6);
17354  __Pyx_XGIVEREF(__pyx_t_7);
17355  __Pyx_XGIVEREF(__pyx_t_8);
17356  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17357  goto __pyx_L0;
17358  __pyx_L7_except_return:;
17359  __Pyx_XGIVEREF(__pyx_t_6);
17360  __Pyx_XGIVEREF(__pyx_t_7);
17361  __Pyx_XGIVEREF(__pyx_t_8);
17362  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17363  goto __pyx_L0;
17364  }
17365  }
17366 
17367  /* "PyClical.pyx":1769
17368  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17369  *
17370  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17371  * """
17372  * Inverse tangent of multivector with optional complexifier.
17373  */
17374 
17375  /* function exit code */
17376  __pyx_L1_error:;
17377  __Pyx_XDECREF(__pyx_t_3);
17378  __Pyx_XDECREF(__pyx_t_5);
17379  __Pyx_XDECREF(__pyx_t_9);
17380  __Pyx_XDECREF(__pyx_t_10);
17381  __Pyx_XDECREF(__pyx_t_11);
17382  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17383  __pyx_r = 0;
17384  __pyx_L0:;
17385  __Pyx_XGIVEREF(__pyx_r);
17386  __Pyx_RefNannyFinishContext();
17387  return __pyx_r;
17388  }
17389 
17390  /* Python wrapper */
17391  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17392  static char __pyx_doc_8PyClical_68atan[] = "\n Inverse tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1}\"); print tan(atan(x,s),s)\n {1}\n >>> x=clifford(\"{1}\"); print tan(atan(x))\n {1}\n ";
17393  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17394  PyObject *__pyx_v_obj = 0;
17395  PyObject *__pyx_v_i = 0;
17396  PyObject *__pyx_r = 0;
17397  __Pyx_RefNannyDeclarations
17398  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17399  {
17400  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17401  PyObject* values[2] = {0,0};
17402  values[1] = ((PyObject *)Py_None);
17403  if (unlikely(__pyx_kwds)) {
17404  Py_ssize_t kw_args;
17405  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17406  switch (pos_args) {
17407  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17408  CYTHON_FALLTHROUGH;
17409  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17410  CYTHON_FALLTHROUGH;
17411  case 0: break;
17412  default: goto __pyx_L5_argtuple_error;
17413  }
17414  kw_args = PyDict_Size(__pyx_kwds);
17415  switch (pos_args) {
17416  case 0:
17417  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17418  else goto __pyx_L5_argtuple_error;
17419  CYTHON_FALLTHROUGH;
17420  case 1:
17421  if (kw_args > 0) {
17422  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17423  if (value) { values[1] = value; kw_args--; }
17424  }
17425  }
17426  if (unlikely(kw_args > 0)) {
17427  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
17428  }
17429  } else {
17430  switch (PyTuple_GET_SIZE(__pyx_args)) {
17431  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17432  CYTHON_FALLTHROUGH;
17433  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17434  break;
17435  default: goto __pyx_L5_argtuple_error;
17436  }
17437  }
17438  __pyx_v_obj = values[0];
17439  __pyx_v_i = values[1];
17440  }
17441  goto __pyx_L4_argument_unpacking_done;
17442  __pyx_L5_argtuple_error:;
17443  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
17444  __pyx_L3_error:;
17445  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17446  __Pyx_RefNannyFinishContext();
17447  return NULL;
17448  __pyx_L4_argument_unpacking_done:;
17449  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17450 
17451  /* function exit code */
17452  __Pyx_RefNannyFinishContext();
17453  return __pyx_r;
17454  }
17455 
17456  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17457  PyObject *__pyx_r = NULL;
17458  __Pyx_RefNannyDeclarations
17459  PyObject *__pyx_t_1 = NULL;
17460  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17461  __Pyx_RefNannySetupContext("atan", 0);
17462  __Pyx_XDECREF(__pyx_r);
17463  __pyx_t_2.__pyx_n = 1;
17464  __pyx_t_2.i = __pyx_v_i;
17465  __pyx_t_1 = __pyx_f_8PyClical_atan(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1769, __pyx_L1_error)
17466  __Pyx_GOTREF(__pyx_t_1);
17467  __pyx_r = __pyx_t_1;
17468  __pyx_t_1 = 0;
17469  goto __pyx_L0;
17470 
17471  /* function exit code */
17472  __pyx_L1_error:;
17473  __Pyx_XDECREF(__pyx_t_1);
17474  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17475  __pyx_r = NULL;
17476  __pyx_L0:;
17477  __Pyx_XGIVEREF(__pyx_r);
17478  __Pyx_RefNannyFinishContext();
17479  return __pyx_r;
17480  }
17481 
17482  /* "PyClical.pyx":1786
17483  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17484  *
17485  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17486  * """
17487  * Hyperbolic tangent of multivector.
17488  */
17489 
17490  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17491  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17492  PyObject *__pyx_r = NULL;
17493  __Pyx_RefNannyDeclarations
17494  PyObject *__pyx_t_1 = NULL;
17495  PyObject *__pyx_t_2 = NULL;
17496  PyObject *__pyx_t_3 = NULL;
17497  PyObject *__pyx_t_4 = NULL;
17498  PyObject *__pyx_t_5 = NULL;
17499  PyObject *__pyx_t_6 = NULL;
17500  PyObject *__pyx_t_7 = NULL;
17501  PyObject *__pyx_t_8 = NULL;
17502  __Pyx_RefNannySetupContext("tanh", 0);
17503 
17504  /* "PyClical.pyx":1793
17505  * {1,2}
17506  * """
17507  * try: # <<<<<<<<<<<<<<
17508  * return math.tanh(obj)
17509  * except:
17510  */
17511  {
17512  __Pyx_PyThreadState_declare
17513  __Pyx_PyThreadState_assign
17514  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17515  __Pyx_XGOTREF(__pyx_t_1);
17516  __Pyx_XGOTREF(__pyx_t_2);
17517  __Pyx_XGOTREF(__pyx_t_3);
17518  /*try:*/ {
17519 
17520  /* "PyClical.pyx":1794
17521  * """
17522  * try:
17523  * return math.tanh(obj) # <<<<<<<<<<<<<<
17524  * except:
17525  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17526  */
17527  __Pyx_XDECREF(__pyx_r);
17528  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
17529  __Pyx_GOTREF(__pyx_t_5);
17530  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tanh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1794, __pyx_L3_error)
17531  __Pyx_GOTREF(__pyx_t_6);
17532  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17533  __pyx_t_5 = NULL;
17534  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17535  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17536  if (likely(__pyx_t_5)) {
17537  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17538  __Pyx_INCREF(__pyx_t_5);
17539  __Pyx_INCREF(function);
17540  __Pyx_DECREF_SET(__pyx_t_6, function);
17541  }
17542  }
17543  if (!__pyx_t_5) {
17544  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17545  __Pyx_GOTREF(__pyx_t_4);
17546  } else {
17547  #if CYTHON_FAST_PYCALL
17548  if (PyFunction_Check(__pyx_t_6)) {
17549  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17550  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17551  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17552  __Pyx_GOTREF(__pyx_t_4);
17553  } else
17554  #endif
17555  #if CYTHON_FAST_PYCCALL
17556  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17557  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17558  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17559  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17560  __Pyx_GOTREF(__pyx_t_4);
17561  } else
17562  #endif
17563  {
17564  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1794, __pyx_L3_error)
17565  __Pyx_GOTREF(__pyx_t_7);
17566  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
17567  __Pyx_INCREF(__pyx_v_obj);
17568  __Pyx_GIVEREF(__pyx_v_obj);
17569  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
17570  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17571  __Pyx_GOTREF(__pyx_t_4);
17572  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17573  }
17574  }
17575  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17576  __pyx_r = __pyx_t_4;
17577  __pyx_t_4 = 0;
17578  goto __pyx_L7_try_return;
17579 
17580  /* "PyClical.pyx":1793
17581  * {1,2}
17582  * """
17583  * try: # <<<<<<<<<<<<<<
17584  * return math.tanh(obj)
17585  * except:
17586  */
17587  }
17588  __pyx_L3_error:;
17589  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17590  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17591  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17592  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17593 
17594  /* "PyClical.pyx":1795
17595  * try:
17596  * return math.tanh(obj)
17597  * except: # <<<<<<<<<<<<<<
17598  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17599  *
17600  */
17601  /*except:*/ {
17602  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17603  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17604  __Pyx_GOTREF(__pyx_t_4);
17605  __Pyx_GOTREF(__pyx_t_6);
17606  __Pyx_GOTREF(__pyx_t_7);
17607 
17608  /* "PyClical.pyx":1796
17609  * return math.tanh(obj)
17610  * except:
17611  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17612  *
17613  * cpdef inline atanh(obj,i = None):
17614  */
17615  __Pyx_XDECREF(__pyx_r);
17616  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
17617  __Pyx_GOTREF(__pyx_t_5);
17618  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), tanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
17619  __Pyx_GOTREF(__pyx_t_8);
17620  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17621  __pyx_r = __pyx_t_8;
17622  __pyx_t_8 = 0;
17623  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17624  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17625  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17626  goto __pyx_L6_except_return;
17627  }
17628  __pyx_L5_except_error:;
17629 
17630  /* "PyClical.pyx":1793
17631  * {1,2}
17632  * """
17633  * try: # <<<<<<<<<<<<<<
17634  * return math.tanh(obj)
17635  * except:
17636  */
17637  __Pyx_XGIVEREF(__pyx_t_1);
17638  __Pyx_XGIVEREF(__pyx_t_2);
17639  __Pyx_XGIVEREF(__pyx_t_3);
17640  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17641  goto __pyx_L1_error;
17642  __pyx_L7_try_return:;
17643  __Pyx_XGIVEREF(__pyx_t_1);
17644  __Pyx_XGIVEREF(__pyx_t_2);
17645  __Pyx_XGIVEREF(__pyx_t_3);
17646  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17647  goto __pyx_L0;
17648  __pyx_L6_except_return:;
17649  __Pyx_XGIVEREF(__pyx_t_1);
17650  __Pyx_XGIVEREF(__pyx_t_2);
17651  __Pyx_XGIVEREF(__pyx_t_3);
17652  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17653  goto __pyx_L0;
17654  }
17655 
17656  /* "PyClical.pyx":1786
17657  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17658  *
17659  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17660  * """
17661  * Hyperbolic tangent of multivector.
17662  */
17663 
17664  /* function exit code */
17665  __pyx_L1_error:;
17666  __Pyx_XDECREF(__pyx_t_4);
17667  __Pyx_XDECREF(__pyx_t_5);
17668  __Pyx_XDECREF(__pyx_t_6);
17669  __Pyx_XDECREF(__pyx_t_7);
17670  __Pyx_XDECREF(__pyx_t_8);
17671  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17672  __pyx_r = 0;
17673  __pyx_L0:;
17674  __Pyx_XGIVEREF(__pyx_r);
17675  __Pyx_RefNannyFinishContext();
17676  return __pyx_r;
17677  }
17678 
17679  /* Python wrapper */
17680  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17681  static char __pyx_doc_8PyClical_70tanh[] = "\n Hyperbolic tangent of multivector.\n\n >>> x=clifford(\"{1,2}\") * pi/4; print tanh(x)\n {1,2}\n ";
17682  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17683  PyObject *__pyx_r = 0;
17684  __Pyx_RefNannyDeclarations
17685  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17686  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17687 
17688  /* function exit code */
17689  __Pyx_RefNannyFinishContext();
17690  return __pyx_r;
17691  }
17692 
17693  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17694  PyObject *__pyx_r = NULL;
17695  __Pyx_RefNannyDeclarations
17696  PyObject *__pyx_t_1 = NULL;
17697  __Pyx_RefNannySetupContext("tanh", 0);
17698  __Pyx_XDECREF(__pyx_r);
17699  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17700  __Pyx_GOTREF(__pyx_t_1);
17701  __pyx_r = __pyx_t_1;
17702  __pyx_t_1 = 0;
17703  goto __pyx_L0;
17704 
17705  /* function exit code */
17706  __pyx_L1_error:;
17707  __Pyx_XDECREF(__pyx_t_1);
17708  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17709  __pyx_r = NULL;
17710  __pyx_L0:;
17711  __Pyx_XGIVEREF(__pyx_r);
17712  __Pyx_RefNannyFinishContext();
17713  return __pyx_r;
17714  }
17715 
17716  /* "PyClical.pyx":1798
17717  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17718  *
17719  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17720  * """
17721  * Inverse hyperbolic tangent of multivector with optional complexifier.
17722  */
17723 
17724  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17725  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args) {
17726  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17727  PyObject *__pyx_r = NULL;
17728  __Pyx_RefNannyDeclarations
17729  int __pyx_t_1;
17730  int __pyx_t_2;
17731  PyObject *__pyx_t_3 = NULL;
17732  Clifford __pyx_t_4;
17733  PyObject *__pyx_t_5 = NULL;
17734  PyObject *__pyx_t_6 = NULL;
17735  PyObject *__pyx_t_7 = NULL;
17736  PyObject *__pyx_t_8 = NULL;
17737  PyObject *__pyx_t_9 = NULL;
17738  PyObject *__pyx_t_10 = NULL;
17739  PyObject *__pyx_t_11 = NULL;
17740  __Pyx_RefNannySetupContext("atanh", 0);
17741  if (__pyx_optional_args) {
17742  if (__pyx_optional_args->__pyx_n > 0) {
17743  __pyx_v_i = __pyx_optional_args->i;
17744  }
17745  }
17746 
17747  /* "PyClical.pyx":1807
17748  * {1,2}
17749  * """
17750  * if not (i is None): # <<<<<<<<<<<<<<
17751  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17752  * else:
17753  */
17754  __pyx_t_1 = (__pyx_v_i != Py_None);
17755  __pyx_t_2 = (__pyx_t_1 != 0);
17756  if (__pyx_t_2) {
17757 
17758  /* "PyClical.pyx":1808
17759  * """
17760  * if not (i is None):
17761  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17762  * else:
17763  * try:
17764  */
17765  __Pyx_XDECREF(__pyx_r);
17766  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17767  __Pyx_GOTREF(__pyx_t_3);
17768  try {
17769  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17770  } catch(...) {
17771  __Pyx_CppExn2PyErr();
17772  __PYX_ERR(0, 1808, __pyx_L1_error)
17773  }
17774  __pyx_t_5 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1808, __pyx_L1_error)
17775  __Pyx_GOTREF(__pyx_t_5);
17776  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17777  __pyx_r = __pyx_t_5;
17778  __pyx_t_5 = 0;
17779  goto __pyx_L0;
17780 
17781  /* "PyClical.pyx":1807
17782  * {1,2}
17783  * """
17784  * if not (i is None): # <<<<<<<<<<<<<<
17785  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17786  * else:
17787  */
17788  }
17789 
17790  /* "PyClical.pyx":1810
17791  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17792  * else:
17793  * try: # <<<<<<<<<<<<<<
17794  * return math.atanh(obj)
17795  * except:
17796  */
17797  /*else*/ {
17798  {
17799  __Pyx_PyThreadState_declare
17800  __Pyx_PyThreadState_assign
17801  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17802  __Pyx_XGOTREF(__pyx_t_6);
17803  __Pyx_XGOTREF(__pyx_t_7);
17804  __Pyx_XGOTREF(__pyx_t_8);
17805  /*try:*/ {
17806 
17807  /* "PyClical.pyx":1811
17808  * else:
17809  * try:
17810  * return math.atanh(obj) # <<<<<<<<<<<<<<
17811  * except:
17812  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17813  */
17814  __Pyx_XDECREF(__pyx_r);
17815  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17816  __Pyx_GOTREF(__pyx_t_3);
17817  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_atanh); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1811, __pyx_L4_error)
17818  __Pyx_GOTREF(__pyx_t_9);
17819  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17820  __pyx_t_3 = NULL;
17821  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17822  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17823  if (likely(__pyx_t_3)) {
17824  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17825  __Pyx_INCREF(__pyx_t_3);
17826  __Pyx_INCREF(function);
17827  __Pyx_DECREF_SET(__pyx_t_9, function);
17828  }
17829  }
17830  if (!__pyx_t_3) {
17831  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17832  __Pyx_GOTREF(__pyx_t_5);
17833  } else {
17834  #if CYTHON_FAST_PYCALL
17835  if (PyFunction_Check(__pyx_t_9)) {
17836  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17837  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17838  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17839  __Pyx_GOTREF(__pyx_t_5);
17840  } else
17841  #endif
17842  #if CYTHON_FAST_PYCCALL
17843  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17844  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17845  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17846  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17847  __Pyx_GOTREF(__pyx_t_5);
17848  } else
17849  #endif
17850  {
17851  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1811, __pyx_L4_error)
17852  __Pyx_GOTREF(__pyx_t_10);
17853  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17854  __Pyx_INCREF(__pyx_v_obj);
17855  __Pyx_GIVEREF(__pyx_v_obj);
17856  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17857  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17858  __Pyx_GOTREF(__pyx_t_5);
17859  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17860  }
17861  }
17862  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17863  __pyx_r = __pyx_t_5;
17864  __pyx_t_5 = 0;
17865  goto __pyx_L8_try_return;
17866 
17867  /* "PyClical.pyx":1810
17868  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17869  * else:
17870  * try: # <<<<<<<<<<<<<<
17871  * return math.atanh(obj)
17872  * except:
17873  */
17874  }
17875  __pyx_L4_error:;
17876  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17877  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17878  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17879  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17880 
17881  /* "PyClical.pyx":1812
17882  * try:
17883  * return math.atanh(obj)
17884  * except: # <<<<<<<<<<<<<<
17885  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17886  *
17887  */
17888  /*except:*/ {
17889  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17890  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17891  __Pyx_GOTREF(__pyx_t_5);
17892  __Pyx_GOTREF(__pyx_t_9);
17893  __Pyx_GOTREF(__pyx_t_10);
17894 
17895  /* "PyClical.pyx":1813
17896  * return math.atanh(obj)
17897  * except:
17898  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17899  *
17900  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17901  */
17902  __Pyx_XDECREF(__pyx_r);
17903  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17904  __Pyx_GOTREF(__pyx_t_3);
17905  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17906  __Pyx_GOTREF(__pyx_t_11);
17907  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17908  __pyx_r = __pyx_t_11;
17909  __pyx_t_11 = 0;
17910  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17911  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17912  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17913  goto __pyx_L7_except_return;
17914  }
17915  __pyx_L6_except_error:;
17916 
17917  /* "PyClical.pyx":1810
17918  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17919  * else:
17920  * try: # <<<<<<<<<<<<<<
17921  * return math.atanh(obj)
17922  * except:
17923  */
17924  __Pyx_XGIVEREF(__pyx_t_6);
17925  __Pyx_XGIVEREF(__pyx_t_7);
17926  __Pyx_XGIVEREF(__pyx_t_8);
17927  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17928  goto __pyx_L1_error;
17929  __pyx_L8_try_return:;
17930  __Pyx_XGIVEREF(__pyx_t_6);
17931  __Pyx_XGIVEREF(__pyx_t_7);
17932  __Pyx_XGIVEREF(__pyx_t_8);
17933  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17934  goto __pyx_L0;
17935  __pyx_L7_except_return:;
17936  __Pyx_XGIVEREF(__pyx_t_6);
17937  __Pyx_XGIVEREF(__pyx_t_7);
17938  __Pyx_XGIVEREF(__pyx_t_8);
17939  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17940  goto __pyx_L0;
17941  }
17942  }
17943 
17944  /* "PyClical.pyx":1798
17945  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17946  *
17947  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17948  * """
17949  * Inverse hyperbolic tangent of multivector with optional complexifier.
17950  */
17951 
17952  /* function exit code */
17953  __pyx_L1_error:;
17954  __Pyx_XDECREF(__pyx_t_3);
17955  __Pyx_XDECREF(__pyx_t_5);
17956  __Pyx_XDECREF(__pyx_t_9);
17957  __Pyx_XDECREF(__pyx_t_10);
17958  __Pyx_XDECREF(__pyx_t_11);
17959  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17960  __pyx_r = 0;
17961  __pyx_L0:;
17962  __Pyx_XGIVEREF(__pyx_r);
17963  __Pyx_RefNannyFinishContext();
17964  return __pyx_r;
17965  }
17966 
17967  /* Python wrapper */
17968  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17969  static char __pyx_doc_8PyClical_72atanh[] = "\n Inverse hyperbolic tangent of multivector with optional complexifier.\n\n >>> s=index_set({1,2,3}); x=clifford(\"{1,2}\"); print tanh(atanh(x,s))\n {1,2}\n >>> x=clifford(\"{1,2}\"); print tanh(atanh(x))\n {1,2}\n ";
17970  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17971  PyObject *__pyx_v_obj = 0;
17972  PyObject *__pyx_v_i = 0;
17973  PyObject *__pyx_r = 0;
17974  __Pyx_RefNannyDeclarations
17975  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17976  {
17977  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17978  PyObject* values[2] = {0,0};
17979  values[1] = ((PyObject *)Py_None);
17980  if (unlikely(__pyx_kwds)) {
17981  Py_ssize_t kw_args;
17982  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17983  switch (pos_args) {
17984  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17985  CYTHON_FALLTHROUGH;
17986  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17987  CYTHON_FALLTHROUGH;
17988  case 0: break;
17989  default: goto __pyx_L5_argtuple_error;
17990  }
17991  kw_args = PyDict_Size(__pyx_kwds);
17992  switch (pos_args) {
17993  case 0:
17994  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17995  else goto __pyx_L5_argtuple_error;
17996  CYTHON_FALLTHROUGH;
17997  case 1:
17998  if (kw_args > 0) {
17999  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
18000  if (value) { values[1] = value; kw_args--; }
18001  }
18002  }
18003  if (unlikely(kw_args > 0)) {
18004  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
18005  }
18006  } else {
18007  switch (PyTuple_GET_SIZE(__pyx_args)) {
18008  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18009  CYTHON_FALLTHROUGH;
18010  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18011  break;
18012  default: goto __pyx_L5_argtuple_error;
18013  }
18014  }
18015  __pyx_v_obj = values[0];
18016  __pyx_v_i = values[1];
18017  }
18018  goto __pyx_L4_argument_unpacking_done;
18019  __pyx_L5_argtuple_error:;
18020  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
18021  __pyx_L3_error:;
18022  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18023  __Pyx_RefNannyFinishContext();
18024  return NULL;
18025  __pyx_L4_argument_unpacking_done:;
18026  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
18027 
18028  /* function exit code */
18029  __Pyx_RefNannyFinishContext();
18030  return __pyx_r;
18031  }
18032 
18033  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18034  PyObject *__pyx_r = NULL;
18035  __Pyx_RefNannyDeclarations
18036  PyObject *__pyx_t_1 = NULL;
18037  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
18038  __Pyx_RefNannySetupContext("atanh", 0);
18039  __Pyx_XDECREF(__pyx_r);
18040  __pyx_t_2.__pyx_n = 1;
18041  __pyx_t_2.i = __pyx_v_i;
18042  __pyx_t_1 = __pyx_f_8PyClical_atanh(__pyx_v_obj, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error)
18043  __Pyx_GOTREF(__pyx_t_1);
18044  __pyx_r = __pyx_t_1;
18045  __pyx_t_1 = 0;
18046  goto __pyx_L0;
18047 
18048  /* function exit code */
18049  __pyx_L1_error:;
18050  __Pyx_XDECREF(__pyx_t_1);
18051  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18052  __pyx_r = NULL;
18053  __pyx_L0:;
18054  __Pyx_XGIVEREF(__pyx_r);
18055  __Pyx_RefNannyFinishContext();
18056  return __pyx_r;
18057  }
18058 
18059  /* "PyClical.pyx":1815
18060  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18061  *
18062  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18063  * """
18064  * Random multivector within a frame.
18065  */
18066 
18067  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18068  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_random_clifford(struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_random_clifford *__pyx_optional_args) {
18069  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
18070  PyObject *__pyx_r = NULL;
18071  __Pyx_RefNannyDeclarations
18072  PyObject *__pyx_t_1 = NULL;
18073  PyObject *__pyx_t_2 = NULL;
18074  scalar_t __pyx_t_3;
18075  PyObject *__pyx_t_4 = NULL;
18076  __Pyx_RefNannySetupContext("random_clifford", 0);
18077  if (__pyx_optional_args) {
18078  if (__pyx_optional_args->__pyx_n > 0) {
18079  __pyx_v_fill = __pyx_optional_args->fill;
18080  }
18081  }
18082 
18083  /* "PyClical.pyx":1822
18084  * {-3,-1,2}
18085  * """
18086  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
18087  *
18088  * cpdef inline cga3(obj):
18089  */
18090  __Pyx_XDECREF(__pyx_r);
18091  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
18092  __Pyx_GOTREF(__pyx_t_1);
18093  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
18094  __Pyx_GOTREF(__pyx_t_2);
18095  __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_fill); if (unlikely((__pyx_t_3 == ((scalar_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1822, __pyx_L1_error)
18096  __pyx_t_4 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance->random(__pyx_f_8PyClical_9index_set_unwrap(__pyx_v_ixt), ((scalar_t)__pyx_t_3))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1822, __pyx_L1_error)
18097  __Pyx_GOTREF(__pyx_t_4);
18098  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18099  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18100  __pyx_r = __pyx_t_4;
18101  __pyx_t_4 = 0;
18102  goto __pyx_L0;
18103 
18104  /* "PyClical.pyx":1815
18105  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18106  *
18107  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18108  * """
18109  * Random multivector within a frame.
18110  */
18111 
18112  /* function exit code */
18113  __pyx_L1_error:;
18114  __Pyx_XDECREF(__pyx_t_1);
18115  __Pyx_XDECREF(__pyx_t_2);
18116  __Pyx_XDECREF(__pyx_t_4);
18117  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18118  __pyx_r = 0;
18119  __pyx_L0:;
18120  __Pyx_XGIVEREF(__pyx_r);
18121  __Pyx_RefNannyFinishContext();
18122  return __pyx_r;
18123  }
18124 
18125  /* Python wrapper */
18126  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18127  static char __pyx_doc_8PyClical_74random_clifford[] = "\n Random multivector within a frame.\n\n >>> print random_clifford(index_set({-3,-1,2})).frame()\n {-3,-1,2}\n ";
18128  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18129  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
18130  PyObject *__pyx_v_fill = 0;
18131  PyObject *__pyx_r = 0;
18132  __Pyx_RefNannyDeclarations
18133  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
18134  {
18135  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
18136  PyObject* values[2] = {0,0};
18137  values[1] = ((PyObject *)__pyx_float_1_0);
18138  if (unlikely(__pyx_kwds)) {
18139  Py_ssize_t kw_args;
18140  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18141  switch (pos_args) {
18142  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18143  CYTHON_FALLTHROUGH;
18144  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18145  CYTHON_FALLTHROUGH;
18146  case 0: break;
18147  default: goto __pyx_L5_argtuple_error;
18148  }
18149  kw_args = PyDict_Size(__pyx_kwds);
18150  switch (pos_args) {
18151  case 0:
18152  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
18153  else goto __pyx_L5_argtuple_error;
18154  CYTHON_FALLTHROUGH;
18155  case 1:
18156  if (kw_args > 0) {
18157  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
18158  if (value) { values[1] = value; kw_args--; }
18159  }
18160  }
18161  if (unlikely(kw_args > 0)) {
18162  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
18163  }
18164  } else {
18165  switch (PyTuple_GET_SIZE(__pyx_args)) {
18166  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18167  CYTHON_FALLTHROUGH;
18168  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18169  break;
18170  default: goto __pyx_L5_argtuple_error;
18171  }
18172  }
18173  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
18174  __pyx_v_fill = values[1];
18175  }
18176  goto __pyx_L4_argument_unpacking_done;
18177  __pyx_L5_argtuple_error:;
18178  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
18179  __pyx_L3_error:;
18180  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18181  __Pyx_RefNannyFinishContext();
18182  return NULL;
18183  __pyx_L4_argument_unpacking_done:;
18184  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
18185  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
18186 
18187  /* function exit code */
18188  goto __pyx_L0;
18189  __pyx_L1_error:;
18190  __pyx_r = NULL;
18191  __pyx_L0:;
18192  __Pyx_RefNannyFinishContext();
18193  return __pyx_r;
18194  }
18195 
18196  static PyObject *__pyx_pf_8PyClical_74random_clifford(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt, PyObject *__pyx_v_fill) {
18197  PyObject *__pyx_r = NULL;
18198  __Pyx_RefNannyDeclarations
18199  PyObject *__pyx_t_1 = NULL;
18200  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
18201  __Pyx_RefNannySetupContext("random_clifford", 0);
18202  __Pyx_XDECREF(__pyx_r);
18203  __pyx_t_2.__pyx_n = 1;
18204  __pyx_t_2.fill = __pyx_v_fill;
18205  __pyx_t_1 = __pyx_f_8PyClical_random_clifford(__pyx_v_ixt, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L1_error)
18206  __Pyx_GOTREF(__pyx_t_1);
18207  __pyx_r = __pyx_t_1;
18208  __pyx_t_1 = 0;
18209  goto __pyx_L0;
18210 
18211  /* function exit code */
18212  __pyx_L1_error:;
18213  __Pyx_XDECREF(__pyx_t_1);
18214  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18215  __pyx_r = NULL;
18216  __pyx_L0:;
18217  __Pyx_XGIVEREF(__pyx_r);
18218  __Pyx_RefNannyFinishContext();
18219  return __pyx_r;
18220  }
18221 
18222  /* "PyClical.pyx":1824
18223  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18224  *
18225  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18226  * """
18227  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18228  */
18229 
18230  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18231  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18232  PyObject *__pyx_r = NULL;
18233  __Pyx_RefNannyDeclarations
18234  PyObject *__pyx_t_1 = NULL;
18235  PyObject *__pyx_t_2 = NULL;
18236  __Pyx_RefNannySetupContext("cga3", 0);
18237 
18238  /* "PyClical.pyx":1831
18239  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18240  * """
18241  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18242  *
18243  * cpdef inline cga3std(obj):
18244  */
18245  __Pyx_XDECREF(__pyx_r);
18246  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
18247  __Pyx_GOTREF(__pyx_t_1);
18248  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), cga3::cga3(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
18249  __Pyx_GOTREF(__pyx_t_2);
18250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18251  __pyx_r = __pyx_t_2;
18252  __pyx_t_2 = 0;
18253  goto __pyx_L0;
18254 
18255  /* "PyClical.pyx":1824
18256  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18257  *
18258  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18259  * """
18260  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18261  */
18262 
18263  /* function exit code */
18264  __pyx_L1_error:;
18265  __Pyx_XDECREF(__pyx_t_1);
18266  __Pyx_XDECREF(__pyx_t_2);
18267  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18268  __pyx_r = 0;
18269  __pyx_L0:;
18270  __Pyx_XGIVEREF(__pyx_r);
18271  __Pyx_RefNannyFinishContext();
18272  return __pyx_r;
18273  }
18274 
18275  /* Python wrapper */
18276  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18277  static char __pyx_doc_8PyClical_76cga3[] = "\n Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3(x)\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n ";
18278  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18279  PyObject *__pyx_r = 0;
18280  __Pyx_RefNannyDeclarations
18281  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18282  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18283 
18284  /* function exit code */
18285  __Pyx_RefNannyFinishContext();
18286  return __pyx_r;
18287  }
18288 
18289  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18290  PyObject *__pyx_r = NULL;
18291  __Pyx_RefNannyDeclarations
18292  PyObject *__pyx_t_1 = NULL;
18293  __Pyx_RefNannySetupContext("cga3", 0);
18294  __Pyx_XDECREF(__pyx_r);
18295  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
18296  __Pyx_GOTREF(__pyx_t_1);
18297  __pyx_r = __pyx_t_1;
18298  __pyx_t_1 = 0;
18299  goto __pyx_L0;
18300 
18301  /* function exit code */
18302  __pyx_L1_error:;
18303  __Pyx_XDECREF(__pyx_t_1);
18304  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18305  __pyx_r = NULL;
18306  __pyx_L0:;
18307  __Pyx_XGIVEREF(__pyx_r);
18308  __Pyx_RefNannyFinishContext();
18309  return __pyx_r;
18310  }
18311 
18312  /* "PyClical.pyx":1833
18313  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18314  *
18315  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18316  * """
18317  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18318  */
18319 
18320  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18321  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18322  PyObject *__pyx_r = NULL;
18323  __Pyx_RefNannyDeclarations
18324  PyObject *__pyx_t_1 = NULL;
18325  PyObject *__pyx_t_2 = NULL;
18326  __Pyx_RefNannySetupContext("cga3std", 0);
18327 
18328  /* "PyClical.pyx":1842
18329  * 0
18330  * """
18331  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18332  *
18333  * cpdef inline agc3(obj):
18334  */
18335  __Pyx_XDECREF(__pyx_r);
18336  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
18337  __Pyx_GOTREF(__pyx_t_1);
18338  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), cga3::cga3std(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L1_error)
18339  __Pyx_GOTREF(__pyx_t_2);
18340  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18341  __pyx_r = __pyx_t_2;
18342  __pyx_t_2 = 0;
18343  goto __pyx_L0;
18344 
18345  /* "PyClical.pyx":1833
18346  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18347  *
18348  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18349  * """
18350  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18351  */
18352 
18353  /* function exit code */
18354  __pyx_L1_error:;
18355  __Pyx_XDECREF(__pyx_t_1);
18356  __Pyx_XDECREF(__pyx_t_2);
18357  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18358  __pyx_r = 0;
18359  __pyx_L0:;
18360  __Pyx_XGIVEREF(__pyx_r);
18361  __Pyx_RefNannyFinishContext();
18362  return __pyx_r;
18363  }
18364 
18365  /* Python wrapper */
18366  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18367  static char __pyx_doc_8PyClical_78cga3std[] = "\n Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3std(cga3(x))\n 87{-1}+4{1}+18{2}+2{3}+85{4}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print cga3std(cga3(x))-cga3(x)\n 0\n ";
18368  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18369  PyObject *__pyx_r = 0;
18370  __Pyx_RefNannyDeclarations
18371  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18372  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18373 
18374  /* function exit code */
18375  __Pyx_RefNannyFinishContext();
18376  return __pyx_r;
18377  }
18378 
18379  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18380  PyObject *__pyx_r = NULL;
18381  __Pyx_RefNannyDeclarations
18382  PyObject *__pyx_t_1 = NULL;
18383  __Pyx_RefNannySetupContext("cga3std", 0);
18384  __Pyx_XDECREF(__pyx_r);
18385  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
18386  __Pyx_GOTREF(__pyx_t_1);
18387  __pyx_r = __pyx_t_1;
18388  __pyx_t_1 = 0;
18389  goto __pyx_L0;
18390 
18391  /* function exit code */
18392  __pyx_L1_error:;
18393  __Pyx_XDECREF(__pyx_t_1);
18394  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18395  __pyx_r = NULL;
18396  __pyx_L0:;
18397  __Pyx_XGIVEREF(__pyx_r);
18398  __Pyx_RefNannyFinishContext();
18399  return __pyx_r;
18400  }
18401 
18402  /* "PyClical.pyx":1844
18403  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18404  *
18405  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18406  * """
18407  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18408  */
18409 
18410  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18411  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18412  PyObject *__pyx_r = NULL;
18413  __Pyx_RefNannyDeclarations
18414  PyObject *__pyx_t_1 = NULL;
18415  PyObject *__pyx_t_2 = NULL;
18416  __Pyx_RefNannySetupContext("agc3", 0);
18417 
18418  /* "PyClical.pyx":1853
18419  * 0
18420  * """
18421  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18422  *
18423  * # Some abbreviations.
18424  */
18425  __Pyx_XDECREF(__pyx_r);
18426  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
18427  __Pyx_GOTREF(__pyx_t_1);
18428  __pyx_t_2 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1), cga3::agc3(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L1_error)
18429  __Pyx_GOTREF(__pyx_t_2);
18430  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18431  __pyx_r = __pyx_t_2;
18432  __pyx_t_2 = 0;
18433  goto __pyx_L0;
18434 
18435  /* "PyClical.pyx":1844
18436  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18437  *
18438  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18439  * """
18440  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18441  */
18442 
18443  /* function exit code */
18444  __pyx_L1_error:;
18445  __Pyx_XDECREF(__pyx_t_1);
18446  __Pyx_XDECREF(__pyx_t_2);
18447  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18448  __pyx_r = 0;
18449  __pyx_L0:;
18450  __Pyx_XGIVEREF(__pyx_r);
18451  __Pyx_RefNannyFinishContext();
18452  return __pyx_r;
18453  }
18454 
18455  /* Python wrapper */
18456  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18457  static char __pyx_doc_8PyClical_80agc3[] = "\n Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.\n\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print agc3(cga3(x))\n 2{1}+9{2}+{3}\n >>> x=clifford(\"2{1}+9{2}+{3}\"); print agc3(cga3(x))-x\n 0\n ";
18458  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18459  PyObject *__pyx_r = 0;
18460  __Pyx_RefNannyDeclarations
18461  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18462  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18463 
18464  /* function exit code */
18465  __Pyx_RefNannyFinishContext();
18466  return __pyx_r;
18467  }
18468 
18469  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18470  PyObject *__pyx_r = NULL;
18471  __Pyx_RefNannyDeclarations
18472  PyObject *__pyx_t_1 = NULL;
18473  __Pyx_RefNannySetupContext("agc3", 0);
18474  __Pyx_XDECREF(__pyx_r);
18475  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
18476  __Pyx_GOTREF(__pyx_t_1);
18477  __pyx_r = __pyx_t_1;
18478  __pyx_t_1 = 0;
18479  goto __pyx_L0;
18480 
18481  /* function exit code */
18482  __pyx_L1_error:;
18483  __Pyx_XDECREF(__pyx_t_1);
18484  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18485  __pyx_r = NULL;
18486  __pyx_L0:;
18487  __Pyx_XGIVEREF(__pyx_r);
18488  __Pyx_RefNannyFinishContext();
18489  return __pyx_r;
18490  }
18491 
18492  /* "PyClical.pyx":1887
18493  * """
18494  *
18495  * def e(obj): # <<<<<<<<<<<<<<
18496  * """
18497  * Abbreviation for clifford(index_set(obj)).
18498  */
18499 
18500  /* Python wrapper */
18501  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18502  static char __pyx_doc_8PyClical_82e[] = "\n Abbreviation for clifford(index_set(obj)).\n\n >>> print e(1)\n {1}\n >>> print e(-1)\n {-1}\n >>> print e(0)\n 1\n ";
18503  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18504  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18505  PyObject *__pyx_r = 0;
18506  __Pyx_RefNannyDeclarations
18507  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18508  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18509 
18510  /* function exit code */
18511  __Pyx_RefNannyFinishContext();
18512  return __pyx_r;
18513  }
18514 
18515  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18516  PyObject *__pyx_r = NULL;
18517  __Pyx_RefNannyDeclarations
18518  PyObject *__pyx_t_1 = NULL;
18519  PyObject *__pyx_t_2 = NULL;
18520  __Pyx_RefNannySetupContext("e", 0);
18521 
18522  /* "PyClical.pyx":1898
18523  * 1
18524  * """
18525  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18526  *
18527  * def istpq(p, q):
18528  */
18529  __Pyx_XDECREF(__pyx_r);
18530  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18531  __Pyx_GOTREF(__pyx_t_1);
18532  __Pyx_INCREF(__pyx_v_obj);
18533  __Pyx_GIVEREF(__pyx_v_obj);
18534  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
18535  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
18536  __Pyx_GOTREF(__pyx_t_2);
18537  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18538  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18539  __Pyx_GOTREF(__pyx_t_1);
18540  __Pyx_GIVEREF(__pyx_t_2);
18541  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
18542  __pyx_t_2 = 0;
18543  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
18544  __Pyx_GOTREF(__pyx_t_2);
18545  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18546  __pyx_r = __pyx_t_2;
18547  __pyx_t_2 = 0;
18548  goto __pyx_L0;
18549 
18550  /* "PyClical.pyx":1887
18551  * """
18552  *
18553  * def e(obj): # <<<<<<<<<<<<<<
18554  * """
18555  * Abbreviation for clifford(index_set(obj)).
18556  */
18557 
18558  /* function exit code */
18559  __pyx_L1_error:;
18560  __Pyx_XDECREF(__pyx_t_1);
18561  __Pyx_XDECREF(__pyx_t_2);
18562  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18563  __pyx_r = NULL;
18564  __pyx_L0:;
18565  __Pyx_XGIVEREF(__pyx_r);
18566  __Pyx_RefNannyFinishContext();
18567  return __pyx_r;
18568  }
18569 
18570  /* "PyClical.pyx":1900
18571  * return clifford(index_set(obj))
18572  *
18573  * def istpq(p, q): # <<<<<<<<<<<<<<
18574  * """
18575  * Abbreviation for index_set({-q,...p}).
18576  */
18577 
18578  /* Python wrapper */
18579  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18580  static char __pyx_doc_8PyClical_84istpq[] = "\n Abbreviation for index_set({-q,...p}).\n\n >>> print istpq(2,3)\n {-3,-2,-1,1,2}\n ";
18581  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18582  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18583  PyObject *__pyx_v_p = 0;
18584  PyObject *__pyx_v_q = 0;
18585  PyObject *__pyx_r = 0;
18586  __Pyx_RefNannyDeclarations
18587  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18588  {
18589  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18590  PyObject* values[2] = {0,0};
18591  if (unlikely(__pyx_kwds)) {
18592  Py_ssize_t kw_args;
18593  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18594  switch (pos_args) {
18595  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18596  CYTHON_FALLTHROUGH;
18597  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18598  CYTHON_FALLTHROUGH;
18599  case 0: break;
18600  default: goto __pyx_L5_argtuple_error;
18601  }
18602  kw_args = PyDict_Size(__pyx_kwds);
18603  switch (pos_args) {
18604  case 0:
18605  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18606  else goto __pyx_L5_argtuple_error;
18607  CYTHON_FALLTHROUGH;
18608  case 1:
18609  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18610  else {
18611  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
18612  }
18613  }
18614  if (unlikely(kw_args > 0)) {
18615  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
18616  }
18617  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18618  goto __pyx_L5_argtuple_error;
18619  } else {
18620  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18621  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18622  }
18623  __pyx_v_p = values[0];
18624  __pyx_v_q = values[1];
18625  }
18626  goto __pyx_L4_argument_unpacking_done;
18627  __pyx_L5_argtuple_error:;
18628  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
18629  __pyx_L3_error:;
18630  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18631  __Pyx_RefNannyFinishContext();
18632  return NULL;
18633  __pyx_L4_argument_unpacking_done:;
18634  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18635 
18636  /* function exit code */
18637  __Pyx_RefNannyFinishContext();
18638  return __pyx_r;
18639  }
18640 
18641  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18642  PyObject *__pyx_r = NULL;
18643  __Pyx_RefNannyDeclarations
18644  PyObject *__pyx_t_1 = NULL;
18645  PyObject *__pyx_t_2 = NULL;
18646  PyObject *__pyx_t_3 = NULL;
18647  __Pyx_RefNannySetupContext("istpq", 0);
18648 
18649  /* "PyClical.pyx":1907
18650  * {-3,-2,-1,1,2}
18651  * """
18652  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18653  *
18654  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18655  */
18656  __Pyx_XDECREF(__pyx_r);
18657  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
18658  __Pyx_GOTREF(__pyx_t_1);
18659  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18660  __Pyx_GOTREF(__pyx_t_2);
18661  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18662  __Pyx_GOTREF(__pyx_t_3);
18663  __Pyx_GIVEREF(__pyx_t_1);
18664  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18665  __Pyx_GIVEREF(__pyx_t_2);
18666  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18667  __pyx_t_1 = 0;
18668  __pyx_t_2 = 0;
18669  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18670  __Pyx_GOTREF(__pyx_t_2);
18671  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18672  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18673  __Pyx_GOTREF(__pyx_t_3);
18674  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18675  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18676  __Pyx_GOTREF(__pyx_t_2);
18677  __Pyx_GIVEREF(__pyx_t_3);
18678  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
18679  __pyx_t_3 = 0;
18680  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18681  __Pyx_GOTREF(__pyx_t_3);
18682  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18683  __pyx_r = __pyx_t_3;
18684  __pyx_t_3 = 0;
18685  goto __pyx_L0;
18686 
18687  /* "PyClical.pyx":1900
18688  * return clifford(index_set(obj))
18689  *
18690  * def istpq(p, q): # <<<<<<<<<<<<<<
18691  * """
18692  * Abbreviation for index_set({-q,...p}).
18693  */
18694 
18695  /* function exit code */
18696  __pyx_L1_error:;
18697  __Pyx_XDECREF(__pyx_t_1);
18698  __Pyx_XDECREF(__pyx_t_2);
18699  __Pyx_XDECREF(__pyx_t_3);
18700  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18701  __pyx_r = NULL;
18702  __pyx_L0:;
18703  __Pyx_XGIVEREF(__pyx_r);
18704  __Pyx_RefNannyFinishContext();
18705  return __pyx_r;
18706  }
18707 
18708  /* "PyClical.pyx":1913
18709  *
18710  * # Doctest interface.
18711  * def _test(): # <<<<<<<<<<<<<<
18712  * import PyClical, doctest
18713  * return doctest.testmod(PyClical)
18714  */
18715 
18716  /* Python wrapper */
18717  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18718  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18719  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18720  PyObject *__pyx_r = 0;
18721  __Pyx_RefNannyDeclarations
18722  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18723  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18724 
18725  /* function exit code */
18726  __Pyx_RefNannyFinishContext();
18727  return __pyx_r;
18728  }
18729 
18730  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18731  PyObject *__pyx_v_PyClical = NULL;
18732  PyObject *__pyx_v_doctest = NULL;
18733  PyObject *__pyx_r = NULL;
18734  __Pyx_RefNannyDeclarations
18735  PyObject *__pyx_t_1 = NULL;
18736  PyObject *__pyx_t_2 = NULL;
18737  PyObject *__pyx_t_3 = NULL;
18738  PyObject *__pyx_t_4 = NULL;
18739  __Pyx_RefNannySetupContext("_test", 0);
18740 
18741  /* "PyClical.pyx":1914
18742  * # Doctest interface.
18743  * def _test():
18744  * import PyClical, doctest # <<<<<<<<<<<<<<
18745  * return doctest.testmod(PyClical)
18746  *
18747  */
18748  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18749  __Pyx_GOTREF(__pyx_t_1);
18750  __pyx_v_PyClical = __pyx_t_1;
18751  __pyx_t_1 = 0;
18752  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18753  __Pyx_GOTREF(__pyx_t_1);
18754  __pyx_v_doctest = __pyx_t_1;
18755  __pyx_t_1 = 0;
18756 
18757  /* "PyClical.pyx":1915
18758  * def _test():
18759  * import PyClical, doctest
18760  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18761  *
18762  * if __name__ == "__main__":
18763  */
18764  __Pyx_XDECREF(__pyx_r);
18765  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_doctest, __pyx_n_s_testmod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error)
18766  __Pyx_GOTREF(__pyx_t_2);
18767  __pyx_t_3 = NULL;
18768  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18769  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18770  if (likely(__pyx_t_3)) {
18771  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18772  __Pyx_INCREF(__pyx_t_3);
18773  __Pyx_INCREF(function);
18774  __Pyx_DECREF_SET(__pyx_t_2, function);
18775  }
18776  }
18777  if (!__pyx_t_3) {
18778  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18779  __Pyx_GOTREF(__pyx_t_1);
18780  } else {
18781  #if CYTHON_FAST_PYCALL
18782  if (PyFunction_Check(__pyx_t_2)) {
18783  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18784  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18785  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18786  __Pyx_GOTREF(__pyx_t_1);
18787  } else
18788  #endif
18789  #if CYTHON_FAST_PYCCALL
18790  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18791  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18792  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18793  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18794  __Pyx_GOTREF(__pyx_t_1);
18795  } else
18796  #endif
18797  {
18798  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
18799  __Pyx_GOTREF(__pyx_t_4);
18800  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18801  __Pyx_INCREF(__pyx_v_PyClical);
18802  __Pyx_GIVEREF(__pyx_v_PyClical);
18803  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18804  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18805  __Pyx_GOTREF(__pyx_t_1);
18806  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18807  }
18808  }
18809  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18810  __pyx_r = __pyx_t_1;
18811  __pyx_t_1 = 0;
18812  goto __pyx_L0;
18813 
18814  /* "PyClical.pyx":1913
18815  *
18816  * # Doctest interface.
18817  * def _test(): # <<<<<<<<<<<<<<
18818  * import PyClical, doctest
18819  * return doctest.testmod(PyClical)
18820  */
18821 
18822  /* function exit code */
18823  __pyx_L1_error:;
18824  __Pyx_XDECREF(__pyx_t_1);
18825  __Pyx_XDECREF(__pyx_t_2);
18826  __Pyx_XDECREF(__pyx_t_3);
18827  __Pyx_XDECREF(__pyx_t_4);
18828  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18829  __pyx_r = NULL;
18830  __pyx_L0:;
18831  __Pyx_XDECREF(__pyx_v_PyClical);
18832  __Pyx_XDECREF(__pyx_v_doctest);
18833  __Pyx_XGIVEREF(__pyx_r);
18834  __Pyx_RefNannyFinishContext();
18835  return __pyx_r;
18836  }
18837  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18838 
18839  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18840  struct __pyx_obj_8PyClical_index_set *p;
18841  PyObject *o;
18842  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18843  o = (*t->tp_alloc)(t, 0);
18844  } else {
18845  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18846  }
18847  if (unlikely(!o)) return 0;
18848  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18849  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18850  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18851  return o;
18852  bad:
18853  Py_DECREF(o); o = 0;
18854  return NULL;
18855  }
18856 
18857  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18858  #if CYTHON_USE_TP_FINALIZE
18859  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
18860  if (PyObject_CallFinalizerFromDealloc(o)) return;
18861  }
18862  #endif
18863  {
18864  PyObject *etype, *eval, *etb;
18865  PyErr_Fetch(&etype, &eval, &etb);
18866  ++Py_REFCNT(o);
18867  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18868  --Py_REFCNT(o);
18869  PyErr_Restore(etype, eval, etb);
18870  }
18871  (*Py_TYPE(o)->tp_free)(o);
18872  }
18873  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18874  PyObject *r;
18875  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18876  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18877  Py_DECREF(x);
18878  return r;
18879  }
18880 
18881  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18882  if (v) {
18883  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18884  }
18885  else {
18886  PyErr_Format(PyExc_NotImplementedError,
18887  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18888  return -1;
18889  }
18890  }
18891 
18892  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18893  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18894  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18895  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18896  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18897  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18898  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18899  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18900  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18901  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18902  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18903  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18904  {0, 0, 0, 0}
18905  };
18906 
18907  static PyNumberMethods __pyx_tp_as_number_index_set = {
18908  0, /*nb_add*/
18909  0, /*nb_subtract*/
18910  0, /*nb_multiply*/
18911  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18912  0, /*nb_divide*/
18913  #endif
18914  0, /*nb_remainder*/
18915  0, /*nb_divmod*/
18916  0, /*nb_power*/
18917  0, /*nb_negative*/
18918  0, /*nb_positive*/
18919  0, /*nb_absolute*/
18920  0, /*nb_nonzero*/
18921  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18922  0, /*nb_lshift*/
18923  0, /*nb_rshift*/
18924  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18925  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18926  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18927  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18928  0, /*nb_coerce*/
18929  #endif
18930  0, /*nb_int*/
18931  #if PY_MAJOR_VERSION < 3
18932  0, /*nb_long*/
18933  #else
18934  0, /*reserved*/
18935  #endif
18936  0, /*nb_float*/
18937  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18938  0, /*nb_oct*/
18939  #endif
18940  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18941  0, /*nb_hex*/
18942  #endif
18943  0, /*nb_inplace_add*/
18944  0, /*nb_inplace_subtract*/
18945  0, /*nb_inplace_multiply*/
18946  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18947  0, /*nb_inplace_divide*/
18948  #endif
18949  0, /*nb_inplace_remainder*/
18950  0, /*nb_inplace_power*/
18951  0, /*nb_inplace_lshift*/
18952  0, /*nb_inplace_rshift*/
18953  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18954  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18955  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18956  0, /*nb_floor_divide*/
18957  0, /*nb_true_divide*/
18958  0, /*nb_inplace_floor_divide*/
18959  0, /*nb_inplace_true_divide*/
18960  0, /*nb_index*/
18961  #if PY_VERSION_HEX >= 0x03050000
18962  0, /*nb_matrix_multiply*/
18963  #endif
18964  #if PY_VERSION_HEX >= 0x03050000
18965  0, /*nb_inplace_matrix_multiply*/
18966  #endif
18967  };
18968 
18969  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18970  0, /*sq_length*/
18971  0, /*sq_concat*/
18972  0, /*sq_repeat*/
18973  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18974  0, /*sq_slice*/
18975  0, /*sq_ass_item*/
18976  0, /*sq_ass_slice*/
18977  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18978  0, /*sq_inplace_concat*/
18979  0, /*sq_inplace_repeat*/
18980  };
18981 
18982  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18983  0, /*mp_length*/
18984  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18985  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18986  };
18987 
18988  static PyTypeObject __pyx_type_8PyClical_index_set = {
18989  PyVarObject_HEAD_INIT(0, 0)
18990  "PyClical.index_set", /*tp_name*/
18991  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18992  0, /*tp_itemsize*/
18993  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18994  0, /*tp_print*/
18995  0, /*tp_getattr*/
18996  0, /*tp_setattr*/
18997  #if PY_MAJOR_VERSION < 3
18998  0, /*tp_compare*/
18999  #endif
19000  #if PY_MAJOR_VERSION >= 3
19001  0, /*tp_as_async*/
19002  #endif
19003  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
19004  &__pyx_tp_as_number_index_set, /*tp_as_number*/
19005  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
19006  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
19007  0, /*tp_hash*/
19008  0, /*tp_call*/
19009  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
19010  0, /*tp_getattro*/
19011  0, /*tp_setattro*/
19012  0, /*tp_as_buffer*/
19013  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19014  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
19015  0, /*tp_traverse*/
19016  0, /*tp_clear*/
19017  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
19018  0, /*tp_weaklistoffset*/
19019  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
19020  0, /*tp_iternext*/
19021  __pyx_methods_8PyClical_index_set, /*tp_methods*/
19022  0, /*tp_members*/
19023  0, /*tp_getset*/
19024  0, /*tp_base*/
19025  0, /*tp_dict*/
19026  0, /*tp_descr_get*/
19027  0, /*tp_descr_set*/
19028  0, /*tp_dictoffset*/
19029  0, /*tp_init*/
19030  0, /*tp_alloc*/
19031  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
19032  0, /*tp_free*/
19033  0, /*tp_is_gc*/
19034  0, /*tp_bases*/
19035  0, /*tp_mro*/
19036  0, /*tp_cache*/
19037  0, /*tp_subclasses*/
19038  0, /*tp_weaklist*/
19039  0, /*tp_del*/
19040  0, /*tp_version_tag*/
19041  #if PY_VERSION_HEX >= 0x030400a1
19042  0, /*tp_finalize*/
19043  #endif
19044  };
19045  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
19046 
19047  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
19048  struct __pyx_obj_8PyClical_clifford *p;
19049  PyObject *o;
19050  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19051  o = (*t->tp_alloc)(t, 0);
19052  } else {
19053  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19054  }
19055  if (unlikely(!o)) return 0;
19056  p = ((struct __pyx_obj_8PyClical_clifford *)o);
19057  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
19058  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
19059  return o;
19060  bad:
19061  Py_DECREF(o); o = 0;
19062  return NULL;
19063  }
19064 
19065  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
19066  #if CYTHON_USE_TP_FINALIZE
19067  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
19068  if (PyObject_CallFinalizerFromDealloc(o)) return;
19069  }
19070  #endif
19071  {
19072  PyObject *etype, *eval, *etb;
19073  PyErr_Fetch(&etype, &eval, &etb);
19074  ++Py_REFCNT(o);
19075  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
19076  --Py_REFCNT(o);
19077  PyErr_Restore(etype, eval, etb);
19078  }
19079  (*Py_TYPE(o)->tp_free)(o);
19080  }
19081  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
19082  PyObject *r;
19083  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19084  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19085  Py_DECREF(x);
19086  return r;
19087  }
19088 
19089  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
19090  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
19091  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
19092  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
19093  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
19094  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
19095  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
19096  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
19097  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
19098  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
19099  {"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
19100  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
19101  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
19102  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
19103  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
19104  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
19105  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
19106  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
19107  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
19108  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
19109  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
19110  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
19111  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
19112  {0, 0, 0, 0}
19113  };
19114 
19115  static PyNumberMethods __pyx_tp_as_number_clifford = {
19116  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
19117  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
19118  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
19119  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19120  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
19121  #endif
19122  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
19123  0, /*nb_divmod*/
19124  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
19125  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
19126  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
19127  0, /*nb_absolute*/
19128  0, /*nb_nonzero*/
19129  0, /*nb_invert*/
19130  0, /*nb_lshift*/
19131  0, /*nb_rshift*/
19132  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
19133  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
19134  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
19135  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19136  0, /*nb_coerce*/
19137  #endif
19138  0, /*nb_int*/
19139  #if PY_MAJOR_VERSION < 3
19140  0, /*nb_long*/
19141  #else
19142  0, /*reserved*/
19143  #endif
19144  0, /*nb_float*/
19145  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19146  0, /*nb_oct*/
19147  #endif
19148  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19149  0, /*nb_hex*/
19150  #endif
19151  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
19152  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
19153  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
19154  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19155  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
19156  #endif
19157  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
19158  0, /*nb_inplace_power*/
19159  0, /*nb_inplace_lshift*/
19160  0, /*nb_inplace_rshift*/
19161  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
19162  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
19163  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
19164  0, /*nb_floor_divide*/
19165  0, /*nb_true_divide*/
19166  0, /*nb_inplace_floor_divide*/
19167  0, /*nb_inplace_true_divide*/
19168  0, /*nb_index*/
19169  #if PY_VERSION_HEX >= 0x03050000
19170  0, /*nb_matrix_multiply*/
19171  #endif
19172  #if PY_VERSION_HEX >= 0x03050000
19173  0, /*nb_inplace_matrix_multiply*/
19174  #endif
19175  };
19176 
19177  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
19178  0, /*sq_length*/
19179  0, /*sq_concat*/
19180  0, /*sq_repeat*/
19181  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
19182  0, /*sq_slice*/
19183  0, /*sq_ass_item*/
19184  0, /*sq_ass_slice*/
19185  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
19186  0, /*sq_inplace_concat*/
19187  0, /*sq_inplace_repeat*/
19188  };
19189 
19190  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
19191  0, /*mp_length*/
19192  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
19193  0, /*mp_ass_subscript*/
19194  };
19195 
19196  static PyTypeObject __pyx_type_8PyClical_clifford = {
19197  PyVarObject_HEAD_INIT(0, 0)
19198  "PyClical.clifford", /*tp_name*/
19199  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
19200  0, /*tp_itemsize*/
19201  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
19202  0, /*tp_print*/
19203  0, /*tp_getattr*/
19204  0, /*tp_setattr*/
19205  #if PY_MAJOR_VERSION < 3
19206  0, /*tp_compare*/
19207  #endif
19208  #if PY_MAJOR_VERSION >= 3
19209  0, /*tp_as_async*/
19210  #endif
19211  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
19212  &__pyx_tp_as_number_clifford, /*tp_as_number*/
19213  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
19214  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
19215  0, /*tp_hash*/
19216  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
19217  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
19218  0, /*tp_getattro*/
19219  0, /*tp_setattro*/
19220  0, /*tp_as_buffer*/
19221  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19222  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
19223  0, /*tp_traverse*/
19224  0, /*tp_clear*/
19225  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
19226  0, /*tp_weaklistoffset*/
19227  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
19228  0, /*tp_iternext*/
19229  __pyx_methods_8PyClical_clifford, /*tp_methods*/
19230  0, /*tp_members*/
19231  0, /*tp_getset*/
19232  0, /*tp_base*/
19233  0, /*tp_dict*/
19234  0, /*tp_descr_get*/
19235  0, /*tp_descr_set*/
19236  0, /*tp_dictoffset*/
19237  0, /*tp_init*/
19238  0, /*tp_alloc*/
19239  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19240  0, /*tp_free*/
19241  0, /*tp_is_gc*/
19242  0, /*tp_bases*/
19243  0, /*tp_mro*/
19244  0, /*tp_cache*/
19245  0, /*tp_subclasses*/
19246  0, /*tp_weaklist*/
19247  0, /*tp_del*/
19248  0, /*tp_version_tag*/
19249  #if PY_VERSION_HEX >= 0x030400a1
19250  0, /*tp_finalize*/
19251  #endif
19252  };
19253 
19254  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19255  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19256 
19257  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19258  PyObject *o;
19259  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
19260  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19261  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19262  (void) PyObject_INIT(o, t);
19263  PyObject_GC_Track(o);
19264  } else {
19265  o = (*t->tp_alloc)(t, 0);
19266  if (unlikely(!o)) return 0;
19267  }
19268  return o;
19269  }
19270 
19271  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19272  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19273  PyObject_GC_UnTrack(o);
19274  Py_CLEAR(p->__pyx_v_idx);
19275  Py_CLEAR(p->__pyx_v_self);
19276  Py_CLEAR(p->__pyx_t_0);
19277  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8PyClical___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__)))) {
19278  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19279  } else {
19280  (*Py_TYPE(o)->tp_free)(o);
19281  }
19282  }
19283 
19284  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19285  int e;
19286  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19287  if (p->__pyx_v_idx) {
19288  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19289  }
19290  if (p->__pyx_v_self) {
19291  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19292  }
19293  if (p->__pyx_t_0) {
19294  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19295  }
19296  return 0;
19297  }
19298 
19299  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19300  PyVarObject_HEAD_INIT(0, 0)
19301  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19302  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19303  0, /*tp_itemsize*/
19304  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19305  0, /*tp_print*/
19306  0, /*tp_getattr*/
19307  0, /*tp_setattr*/
19308  #if PY_MAJOR_VERSION < 3
19309  0, /*tp_compare*/
19310  #endif
19311  #if PY_MAJOR_VERSION >= 3
19312  0, /*tp_as_async*/
19313  #endif
19314  0, /*tp_repr*/
19315  0, /*tp_as_number*/
19316  0, /*tp_as_sequence*/
19317  0, /*tp_as_mapping*/
19318  0, /*tp_hash*/
19319  0, /*tp_call*/
19320  0, /*tp_str*/
19321  0, /*tp_getattro*/
19322  0, /*tp_setattro*/
19323  0, /*tp_as_buffer*/
19324  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19325  0, /*tp_doc*/
19326  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19327  0, /*tp_clear*/
19328  0, /*tp_richcompare*/
19329  0, /*tp_weaklistoffset*/
19330  0, /*tp_iter*/
19331  0, /*tp_iternext*/
19332  0, /*tp_methods*/
19333  0, /*tp_members*/
19334  0, /*tp_getset*/
19335  0, /*tp_base*/
19336  0, /*tp_dict*/
19337  0, /*tp_descr_get*/
19338  0, /*tp_descr_set*/
19339  0, /*tp_dictoffset*/
19340  0, /*tp_init*/
19341  0, /*tp_alloc*/
19342  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19343  0, /*tp_free*/
19344  0, /*tp_is_gc*/
19345  0, /*tp_bases*/
19346  0, /*tp_mro*/
19347  0, /*tp_cache*/
19348  0, /*tp_subclasses*/
19349  0, /*tp_weaklist*/
19350  0, /*tp_del*/
19351  0, /*tp_version_tag*/
19352  #if PY_VERSION_HEX >= 0x030400a1
19353  0, /*tp_finalize*/
19354  #endif
19355  };
19356 
19357  static PyMethodDef __pyx_methods[] = {
19358  {"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19359  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19360  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19361  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19362  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19363  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19364  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19365  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19366  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19367  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19368  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19369  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19370  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19371  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19372  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19373  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19374  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19375  {"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19376  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19377  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19378  {"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19379  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19380  {"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19381  {"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19382  {"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19383  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19384  {"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19385  {"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19386  {"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19387  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19388  {"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19389  {"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19390  {"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19391  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19392  {"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19393  {"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19394  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19395  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19396  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19397  {0, 0, 0, 0}
19398  };
19399 
19400  #if PY_MAJOR_VERSION >= 3
19401  #if CYTHON_PEP489_MULTI_PHASE_INIT
19402  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19403  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19404  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19405  {Py_mod_create, (void*)__pyx_pymod_create},
19406  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19407  {0, NULL}
19408  };
19409  #endif
19410 
19411  static struct PyModuleDef __pyx_moduledef = {
19412  PyModuleDef_HEAD_INIT,
19413  "PyClical",
19414  0, /* m_doc */
19415  #if CYTHON_PEP489_MULTI_PHASE_INIT
19416  0, /* m_size */
19417  #else
19418  -1, /* m_size */
19419  #endif
19420  __pyx_methods /* m_methods */,
19421  #if CYTHON_PEP489_MULTI_PHASE_INIT
19422  __pyx_moduledef_slots, /* m_slots */
19423  #else
19424  NULL, /* m_reload */
19425  #endif
19426  NULL, /* m_traverse */
19427  NULL, /* m_clear */
19428  NULL /* m_free */
19429  };
19430  #endif
19431 
19432 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19433  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
19434  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
19435  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19436  {&__pyx_kp_u_Abbreviation_for_index_set_q_p, __pyx_k_Abbreviation_for_index_set_q_p, sizeof(__pyx_k_Abbreviation_for_index_set_q_p), 0, 1, 0, 0},
19437  {&__pyx_kp_u_Absolute_value_of_multivector_m, __pyx_k_Absolute_value_of_multivector_m, sizeof(__pyx_k_Absolute_value_of_multivector_m), 0, 1, 0, 0},
19438  {&__pyx_kp_u_Absolute_value_square_root_of_n, __pyx_k_Absolute_value_square_root_of_n, sizeof(__pyx_k_Absolute_value_square_root_of_n), 0, 1, 0, 0},
19439  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
19440  {&__pyx_kp_s_Cannot_initialize_index_set_obje, __pyx_k_Cannot_initialize_index_set_obje, sizeof(__pyx_k_Cannot_initialize_index_set_obje), 0, 0, 1, 0},
19441  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
19442  {&__pyx_kp_s_Cannot_take_vector_part_of, __pyx_k_Cannot_take_vector_part_of, sizeof(__pyx_k_Cannot_take_vector_part_of), 0, 0, 1, 0},
19443  {&__pyx_kp_u_Cardinality_Number_of_indices_i, __pyx_k_Cardinality_Number_of_indices_i, sizeof(__pyx_k_Cardinality_Number_of_indices_i), 0, 1, 0, 0},
19444  {&__pyx_kp_u_Check_if_a_multivector_contains, __pyx_k_Check_if_a_multivector_contains, sizeof(__pyx_k_Check_if_a_multivector_contains), 0, 1, 0, 0},
19445  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19446  {&__pyx_kp_u_Conjugation_reverse_o_involute_2, __pyx_k_Conjugation_reverse_o_involute_2, sizeof(__pyx_k_Conjugation_reverse_o_involute_2), 0, 1, 0, 0},
19447  {&__pyx_kp_u_Contraction_print_clifford_1_cl, __pyx_k_Contraction_print_clifford_1_cl, sizeof(__pyx_k_Contraction_print_clifford_1_cl), 0, 1, 0, 0},
19448  {&__pyx_kp_u_Contraction_x_clifford_1_x_clif, __pyx_k_Contraction_x_clifford_1_x_clif, sizeof(__pyx_k_Contraction_x_clifford_1_x_clif), 0, 1, 0, 0},
19449  {&__pyx_kp_u_Convert_CGA3_null_vector_to_Euc, __pyx_k_Convert_CGA3_null_vector_to_Euc, sizeof(__pyx_k_Convert_CGA3_null_vector_to_Euc), 0, 1, 0, 0},
19450  {&__pyx_kp_u_Convert_CGA3_null_vector_to_sta, __pyx_k_Convert_CGA3_null_vector_to_sta, sizeof(__pyx_k_Convert_CGA3_null_vector_to_sta), 0, 1, 0, 0},
19451  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19452  {&__pyx_kp_u_Copy_this_clifford_object_x_cli, __pyx_k_Copy_this_clifford_object_x_cli, sizeof(__pyx_k_Copy_this_clifford_object_x_cli), 0, 1, 0, 0},
19453  {&__pyx_kp_u_Copy_this_index_set_object_s_in, __pyx_k_Copy_this_index_set_object_s_in, sizeof(__pyx_k_Copy_this_index_set_object_s_in), 0, 1, 0, 0},
19454  {&__pyx_kp_u_Cosine_of_multivector_with_opti, __pyx_k_Cosine_of_multivector_with_opti, sizeof(__pyx_k_Cosine_of_multivector_with_opti), 0, 1, 0, 0},
19455  {&__pyx_kp_u_Even_part_of_multivector_sum_of, __pyx_k_Even_part_of_multivector_sum_of, sizeof(__pyx_k_Even_part_of_multivector_sum_of), 0, 1, 0, 0},
19456  {&__pyx_kp_u_Even_part_of_multivector_sum_of_2, __pyx_k_Even_part_of_multivector_sum_of_2, sizeof(__pyx_k_Even_part_of_multivector_sum_of_2), 0, 1, 0, 0},
19457  {&__pyx_kp_u_Exponential_of_multivector_x_cl, __pyx_k_Exponential_of_multivector_x_cl, sizeof(__pyx_k_Exponential_of_multivector_x_cl), 0, 1, 0, 0},
19458  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19459  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19460  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19461  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19462  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19463  {&__pyx_kp_u_Geometric_product_x_clifford_2, __pyx_k_Geometric_product_x_clifford_2, sizeof(__pyx_k_Geometric_product_x_clifford_2), 0, 1, 0, 0},
19464  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19465  {&__pyx_kp_u_Geometric_quotient_x_clifford_1, __pyx_k_Geometric_quotient_x_clifford_1, sizeof(__pyx_k_Geometric_quotient_x_clifford_1), 0, 1, 0, 0},
19466  {&__pyx_kp_u_Geometric_sum_print_clifford_1, __pyx_k_Geometric_sum_print_clifford_1, sizeof(__pyx_k_Geometric_sum_print_clifford_1), 0, 1, 0, 0},
19467  {&__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl, __pyx_k_Geometric_sum_x_clifford_1_x_cl, sizeof(__pyx_k_Geometric_sum_x_clifford_1_x_cl), 0, 1, 0, 0},
19468  {&__pyx_kp_u_Get_the_value_of_an_index_set_o, __pyx_k_Get_the_value_of_an_index_set_o, sizeof(__pyx_k_Get_the_value_of_an_index_set_o), 0, 1, 0, 0},
19469  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19470  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19471  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19472  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19473  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19474  {&__pyx_kp_u_Inner_product_print_clifford_1, __pyx_k_Inner_product_print_clifford_1, sizeof(__pyx_k_Inner_product_print_clifford_1), 0, 1, 0, 0},
19475  {&__pyx_kp_u_Inner_product_x_clifford_1_x_cl, __pyx_k_Inner_product_x_clifford_1_x_cl, sizeof(__pyx_k_Inner_product_x_clifford_1_x_cl), 0, 1, 0, 0},
19476  {&__pyx_kp_u_Integer_power_of_multivector_ob, __pyx_k_Integer_power_of_multivector_ob, sizeof(__pyx_k_Integer_power_of_multivector_ob), 0, 1, 0, 0},
19477  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19478  {&__pyx_kp_u_Inverse_cosine_of_multivector_w, __pyx_k_Inverse_cosine_of_multivector_w, sizeof(__pyx_k_Inverse_cosine_of_multivector_w), 0, 1, 0, 0},
19479  {&__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu, __pyx_k_Inverse_hyperbolic_cosine_of_mu, sizeof(__pyx_k_Inverse_hyperbolic_cosine_of_mu), 0, 1, 0, 0},
19480  {&__pyx_kp_u_Inverse_hyperbolic_sine_of_mult, __pyx_k_Inverse_hyperbolic_sine_of_mult, sizeof(__pyx_k_Inverse_hyperbolic_sine_of_mult), 0, 1, 0, 0},
19481  {&__pyx_kp_u_Inverse_hyperbolic_tangent_of_m, __pyx_k_Inverse_hyperbolic_tangent_of_m, sizeof(__pyx_k_Inverse_hyperbolic_tangent_of_m), 0, 1, 0, 0},
19482  {&__pyx_kp_u_Inverse_sine_of_multivector_wit, __pyx_k_Inverse_sine_of_multivector_wit, sizeof(__pyx_k_Inverse_sine_of_multivector_wit), 0, 1, 0, 0},
19483  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19484  {&__pyx_kp_u_Iterate_over_the_indices_of_an, __pyx_k_Iterate_over_the_indices_of_an, sizeof(__pyx_k_Iterate_over_the_indices_of_an), 0, 1, 0, 0},
19485  {&__pyx_kp_u_Main_involution_each_i_is_repla, __pyx_k_Main_involution_each_i_is_repla, sizeof(__pyx_k_Main_involution_each_i_is_repla), 0, 1, 0, 0},
19486  {&__pyx_kp_u_Main_involution_each_i_is_repla_2, __pyx_k_Main_involution_each_i_is_repla_2, sizeof(__pyx_k_Main_involution_each_i_is_repla_2), 0, 1, 0, 0},
19487  {&__pyx_kp_u_Maximum_absolute_value_of_coord, __pyx_k_Maximum_absolute_value_of_coord, sizeof(__pyx_k_Maximum_absolute_value_of_coord), 0, 1, 0, 0},
19488  {&__pyx_kp_u_Maximum_member_index_set_1_1_2, __pyx_k_Maximum_member_index_set_1_1_2, sizeof(__pyx_k_Maximum_member_index_set_1_1_2), 0, 1, 0, 0},
19489  {&__pyx_kp_u_Maximum_of_absolute_values_of_c, __pyx_k_Maximum_of_absolute_values_of_c, sizeof(__pyx_k_Maximum_of_absolute_values_of_c), 0, 1, 0, 0},
19490  {&__pyx_kp_u_Maximum_positive_index_or_0_if, __pyx_k_Maximum_positive_index_or_0_if, sizeof(__pyx_k_Maximum_positive_index_or_0_if), 0, 1, 0, 0},
19491  {&__pyx_kp_u_Minimum_member_index_set_1_1_2, __pyx_k_Minimum_member_index_set_1_1_2, sizeof(__pyx_k_Minimum_member_index_set_1_1_2), 0, 1, 0, 0},
19492  {&__pyx_kp_u_Minimum_negative_index_or_0_if, __pyx_k_Minimum_negative_index_or_0_if, sizeof(__pyx_k_Minimum_negative_index_or_0_if), 0, 1, 0, 0},
19493  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19494  {&__pyx_kp_u_Norm_sum_of_squares_of_coordina, __pyx_k_Norm_sum_of_squares_of_coordina, sizeof(__pyx_k_Norm_sum_of_squares_of_coordina), 0, 1, 0, 0},
19495  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19496  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
19497  {&__pyx_kp_u_Not_applicable_for_a_in_cliffor, __pyx_k_Not_applicable_for_a_in_cliffor, sizeof(__pyx_k_Not_applicable_for_a_in_cliffor), 0, 1, 0, 0},
19498  {&__pyx_kp_u_Number_of_negative_indices_incl, __pyx_k_Number_of_negative_indices_incl, sizeof(__pyx_k_Number_of_negative_indices_incl), 0, 1, 0, 0},
19499  {&__pyx_kp_u_Number_of_positive_indices_incl, __pyx_k_Number_of_positive_indices_incl, sizeof(__pyx_k_Number_of_positive_indices_incl), 0, 1, 0, 0},
19500  {&__pyx_kp_u_Odd_part_of_multivector_sum_of, __pyx_k_Odd_part_of_multivector_sum_of, sizeof(__pyx_k_Odd_part_of_multivector_sum_of), 0, 1, 0, 0},
19501  {&__pyx_kp_u_Odd_part_of_multivector_sum_of_2, __pyx_k_Odd_part_of_multivector_sum_of_2, sizeof(__pyx_k_Odd_part_of_multivector_sum_of_2), 0, 1, 0, 0},
19502  {&__pyx_kp_u_Outer_product_power_of_multivec, __pyx_k_Outer_product_power_of_multivec, sizeof(__pyx_k_Outer_product_power_of_multivec), 0, 1, 0, 0},
19503  {&__pyx_kp_u_Outer_product_power_x_clifford, __pyx_k_Outer_product_power_x_clifford, sizeof(__pyx_k_Outer_product_power_x_clifford), 0, 1, 0, 0},
19504  {&__pyx_kp_u_Outer_product_print_clifford_1, __pyx_k_Outer_product_print_clifford_1, sizeof(__pyx_k_Outer_product_print_clifford_1), 0, 1, 0, 0},
19505  {&__pyx_kp_u_Outer_product_x_clifford_1_x_cl, __pyx_k_Outer_product_x_clifford_1_x_cl, sizeof(__pyx_k_Outer_product_x_clifford_1_x_cl), 0, 1, 0, 0},
19506  {&__pyx_kp_u_Power_self_to_the_m_x_clifford, __pyx_k_Power_self_to_the_m_x_clifford, sizeof(__pyx_k_Power_self_to_the_m_x_clifford), 0, 1, 0, 0},
19507  {&__pyx_kp_u_Power_self_to_the_m_x_clifford_2, __pyx_k_Power_self_to_the_m_x_clifford_2, sizeof(__pyx_k_Power_self_to_the_m_x_clifford_2), 0, 1, 0, 0},
19508  {&__pyx_kp_u_Pure_grade_vector_part_print_cl, __pyx_k_Pure_grade_vector_part_print_cl, sizeof(__pyx_k_Pure_grade_vector_part_print_cl), 0, 1, 0, 0},
19509  {&__pyx_kp_u_Pure_part_print_clifford_1_1_1, __pyx_k_Pure_part_print_clifford_1_1_1, sizeof(__pyx_k_Pure_part_print_clifford_1_1_1), 0, 1, 0, 0},
19510  {&__pyx_kp_u_Pure_part_print_pure_clifford_1, __pyx_k_Pure_part_print_pure_clifford_1, sizeof(__pyx_k_Pure_part_print_pure_clifford_1), 0, 1, 0, 0},
19511  {&__pyx_kp_u_Put_self_into_a_larger_frame_co, __pyx_k_Put_self_into_a_larger_frame_co, sizeof(__pyx_k_Put_self_into_a_larger_frame_co), 0, 1, 0, 0},
19512  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19513  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19514  {&__pyx_kp_u_Quadratic_form_rev_x_x_0_print, __pyx_k_Quadratic_form_rev_x_x_0_print, sizeof(__pyx_k_Quadratic_form_rev_x_x_0_print), 0, 1, 0, 0},
19515  {&__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2, __pyx_k_Quadratic_form_rev_x_x_0_print_2, sizeof(__pyx_k_Quadratic_form_rev_x_x_0_print_2), 0, 1, 0, 0},
19516  {&__pyx_kp_u_Random_multivector_within_a_fra, __pyx_k_Random_multivector_within_a_fra, sizeof(__pyx_k_Random_multivector_within_a_fra), 0, 1, 0, 0},
19517  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19518  {&__pyx_kp_u_Real_part_synonym_for_scalar_pa, __pyx_k_Real_part_synonym_for_scalar_pa, sizeof(__pyx_k_Real_part_synonym_for_scalar_pa), 0, 1, 0, 0},
19519  {&__pyx_kp_u_Remove_all_terms_of_self_with_r, __pyx_k_Remove_all_terms_of_self_with_r, sizeof(__pyx_k_Remove_all_terms_of_self_with_r), 0, 1, 0, 0},
19520  {&__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve, __pyx_k_Reversion_eg_1_2_2_1_print_reve, sizeof(__pyx_k_Reversion_eg_1_2_2_1_print_reve), 0, 1, 0, 0},
19521  {&__pyx_kp_u_Reversion_eg_clifford_1_cliffor, __pyx_k_Reversion_eg_clifford_1_cliffor, sizeof(__pyx_k_Reversion_eg_clifford_1_cliffor), 0, 1, 0, 0},
19522  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19523  {&__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc, __pyx_k_Scalar_part_clifford_1_1_1_2_sc, sizeof(__pyx_k_Scalar_part_clifford_1_1_1_2_sc), 0, 1, 0, 0},
19524  {&__pyx_kp_u_Scalar_part_scalar_clifford_1_1, __pyx_k_Scalar_part_scalar_clifford_1_1, sizeof(__pyx_k_Scalar_part_scalar_clifford_1_1), 0, 1, 0, 0},
19525  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19526  {&__pyx_kp_u_Set_complement_not_print_index, __pyx_k_Set_complement_not_print_index, sizeof(__pyx_k_Set_complement_not_print_index), 0, 1, 0, 0},
19527  {&__pyx_kp_u_Set_intersection_and_print_inde, __pyx_k_Set_intersection_and_print_inde, sizeof(__pyx_k_Set_intersection_and_print_inde), 0, 1, 0, 0},
19528  {&__pyx_kp_u_Set_intersection_and_x_index_se, __pyx_k_Set_intersection_and_x_index_se, sizeof(__pyx_k_Set_intersection_and_x_index_se), 0, 1, 0, 0},
19529  {&__pyx_kp_u_Set_the_value_of_an_index_set_o, __pyx_k_Set_the_value_of_an_index_set_o, sizeof(__pyx_k_Set_the_value_of_an_index_set_o), 0, 1, 0, 0},
19530  {&__pyx_kp_u_Set_union_or_print_index_set_1, __pyx_k_Set_union_or_print_index_set_1, sizeof(__pyx_k_Set_union_or_print_index_set_1), 0, 1, 0, 0},
19531  {&__pyx_kp_u_Set_union_or_x_index_set_1_x_in, __pyx_k_Set_union_or_x_index_set_1_x_in, sizeof(__pyx_k_Set_union_or_x_index_set_1_x_in), 0, 1, 0, 0},
19532  {&__pyx_kp_u_Sign_of_geometric_product_of_tw, __pyx_k_Sign_of_geometric_product_of_tw, sizeof(__pyx_k_Sign_of_geometric_product_of_tw), 0, 1, 0, 0},
19533  {&__pyx_kp_u_Sign_of_geometric_square_of_a_C, __pyx_k_Sign_of_geometric_square_of_a_C, sizeof(__pyx_k_Sign_of_geometric_square_of_a_C), 0, 1, 0, 0},
19534  {&__pyx_kp_u_Sine_of_multivector_with_option, __pyx_k_Sine_of_multivector_with_option, sizeof(__pyx_k_Sine_of_multivector_with_option), 0, 1, 0, 0},
19535  {&__pyx_kp_u_Square_root_of_1_which_commutes, __pyx_k_Square_root_of_1_which_commutes, sizeof(__pyx_k_Square_root_of_1_which_commutes), 0, 1, 0, 0},
19536  {&__pyx_kp_u_Square_root_of_multivector_with, __pyx_k_Square_root_of_multivector_with, sizeof(__pyx_k_Square_root_of_multivector_with), 0, 1, 0, 0},
19537  {&__pyx_kp_u_Subalgebra_generated_by_all_gen, __pyx_k_Subalgebra_generated_by_all_gen, sizeof(__pyx_k_Subalgebra_generated_by_all_gen), 0, 1, 0, 0},
19538  {&__pyx_kp_u_Subscripting_map_from_index_set, __pyx_k_Subscripting_map_from_index_set, sizeof(__pyx_k_Subscripting_map_from_index_set), 0, 1, 0, 0},
19539  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19540  {&__pyx_kp_u_Symmetric_set_difference_exclus_2, __pyx_k_Symmetric_set_difference_exclus_2, sizeof(__pyx_k_Symmetric_set_difference_exclus_2), 0, 1, 0, 0},
19541  {&__pyx_kp_u_Tangent_of_multivector_with_opt, __pyx_k_Tangent_of_multivector_with_opt, sizeof(__pyx_k_Tangent_of_multivector_with_opt), 0, 1, 0, 0},
19542  {&__pyx_kp_u_Tests_for_functions_that_Doctes, __pyx_k_Tests_for_functions_that_Doctes, sizeof(__pyx_k_Tests_for_functions_that_Doctes), 0, 1, 0, 0},
19543  {&__pyx_kp_u_Tests_for_functions_that_Doctes_2, __pyx_k_Tests_for_functions_that_Doctes_2, sizeof(__pyx_k_Tests_for_functions_that_Doctes_2), 0, 1, 0, 0},
19544  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19545  {&__pyx_kp_u_The_informal_string_representat_2, __pyx_k_The_informal_string_representat_2, sizeof(__pyx_k_The_informal_string_representat_2), 0, 1, 0, 0},
19546  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19547  {&__pyx_kp_u_The_official_string_representat_2, __pyx_k_The_official_string_representat_2, sizeof(__pyx_k_The_official_string_representat_2), 0, 1, 0, 0},
19548  {&__pyx_kp_s_This_comparison_operator_is_not, __pyx_k_This_comparison_operator_is_not, sizeof(__pyx_k_This_comparison_operator_is_not), 0, 0, 1, 0},
19549  {&__pyx_kp_u_Transform_left_hand_side_using, __pyx_k_Transform_left_hand_side_using, sizeof(__pyx_k_Transform_left_hand_side_using), 0, 1, 0, 0},
19550  {&__pyx_kp_u_Transform_left_hand_side_using_2, __pyx_k_Transform_left_hand_side_using_2, sizeof(__pyx_k_Transform_left_hand_side_using_2), 0, 1, 0, 0},
19551  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19552  {&__pyx_kp_u_Unary_print_clifford_1_1, __pyx_k_Unary_print_clifford_1_1, sizeof(__pyx_k_Unary_print_clifford_1_1), 0, 1, 0, 0},
19553  {&__pyx_kp_u_Unary_print_clifford_1_1_2, __pyx_k_Unary_print_clifford_1_1_2, sizeof(__pyx_k_Unary_print_clifford_1_1_2), 0, 1, 0, 0},
19554  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19555  {&__pyx_kp_u_Vector_part_of_multivector_as_a, __pyx_k_Vector_part_of_multivector_as_a, sizeof(__pyx_k_Vector_part_of_multivector_as_a), 0, 1, 0, 0},
19556  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
19557  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
19558  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
19559  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
19560  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
19561  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
19562  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
19563  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19564  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
19565  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19566  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
19567  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
19568  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19569  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
19570  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19571  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
19572  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19573  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
19574  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19575  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
19576  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19577  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
19578  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
19579  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
19580  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19581  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
19582  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
19583  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
19584  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
19585  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
19586  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
19587  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
19588  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
19589  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
19590  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
19591  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
19592  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
19593  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
19594  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
19595  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
19596  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
19597  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
19598  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
19599  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
19600  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
19601  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
19602  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
19603  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
19604  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
19605  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
19606  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
19607  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
19608  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
19609  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
19610  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
19611  {&__pyx_kp_u_clifford_hidden_doctests_line_12, __pyx_k_clifford_hidden_doctests_line_12, sizeof(__pyx_k_clifford_hidden_doctests_line_12), 0, 1, 0, 0},
19612  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
19613  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
19614  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
19615  {&__pyx_kp_u_clifford_max_abs_line_1183, __pyx_k_clifford_max_abs_line_1183, sizeof(__pyx_k_clifford_max_abs_line_1183), 0, 1, 0, 0},
19616  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
19617  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
19618  {&__pyx_kp_u_clifford_outer_pow_line_1003, __pyx_k_clifford_outer_pow_line_1003, sizeof(__pyx_k_clifford_outer_pow_line_1003), 0, 1, 0, 0},
19619  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
19620  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
19621  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
19622  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
19623  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
19624  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
19625  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
19626  {&__pyx_kp_u_clifford_vector_part_line_1078, __pyx_k_clifford_vector_part_line_1078, sizeof(__pyx_k_clifford_vector_part_line_1078), 0, 1, 0, 0},
19627  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19628  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
19629  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
19630  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
19631  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
19632  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
19633  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
19634  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
19635  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
19636  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19637  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19638  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19639  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19640  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
19641  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19642  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
19643  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19644  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
19645  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19646  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
19647  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
19648  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
19649  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19650  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
19651  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
19652  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19653  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19654  {&__pyx_kp_u_index_set___and___line_269, __pyx_k_index_set___and___line_269, sizeof(__pyx_k_index_set___and___line_269), 0, 1, 0, 0},
19655  {&__pyx_kp_u_index_set___getitem___line_189, __pyx_k_index_set___getitem___line_189, sizeof(__pyx_k_index_set___getitem___line_189), 0, 1, 0, 0},
19656  {&__pyx_kp_u_index_set___iand___line_280, __pyx_k_index_set___iand___line_280, sizeof(__pyx_k_index_set___iand___line_280), 0, 1, 0, 0},
19657  {&__pyx_kp_u_index_set___invert___line_238, __pyx_k_index_set___invert___line_238, sizeof(__pyx_k_index_set___invert___line_238), 0, 1, 0, 0},
19658  {&__pyx_kp_u_index_set___ior___line_302, __pyx_k_index_set___ior___line_302, sizeof(__pyx_k_index_set___ior___line_302), 0, 1, 0, 0},
19659  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19660  {&__pyx_kp_u_index_set___iter___line_227, __pyx_k_index_set___iter___line_227, sizeof(__pyx_k_index_set___iter___line_227), 0, 1, 0, 0},
19661  {&__pyx_kp_u_index_set___ixor___line_258, __pyx_k_index_set___ixor___line_258, sizeof(__pyx_k_index_set___ixor___line_258), 0, 1, 0, 0},
19662  {&__pyx_kp_u_index_set___or___line_291, __pyx_k_index_set___or___line_291, sizeof(__pyx_k_index_set___or___line_291), 0, 1, 0, 0},
19663  {&__pyx_kp_u_index_set___repr___line_382, __pyx_k_index_set___repr___line_382, sizeof(__pyx_k_index_set___repr___line_382), 0, 1, 0, 0},
19664  {&__pyx_kp_u_index_set___setitem___line_177, __pyx_k_index_set___setitem___line_177, sizeof(__pyx_k_index_set___setitem___line_177), 0, 1, 0, 0},
19665  {&__pyx_kp_u_index_set___str___line_393, __pyx_k_index_set___str___line_393, sizeof(__pyx_k_index_set___str___line_393), 0, 1, 0, 0},
19666  {&__pyx_kp_u_index_set___xor___line_247, __pyx_k_index_set___xor___line_247, sizeof(__pyx_k_index_set___xor___line_247), 0, 1, 0, 0},
19667  {&__pyx_kp_u_index_set_copy_line_64, __pyx_k_index_set_copy_line_64, sizeof(__pyx_k_index_set_copy_line_64), 0, 1, 0, 0},
19668  {&__pyx_kp_u_index_set_count_line_313, __pyx_k_index_set_count_line_313, sizeof(__pyx_k_index_set_count_line_313), 0, 1, 0, 0},
19669  {&__pyx_kp_u_index_set_count_neg_line_322, __pyx_k_index_set_count_neg_line_322, sizeof(__pyx_k_index_set_count_neg_line_322), 0, 1, 0, 0},
19670  {&__pyx_kp_u_index_set_count_pos_line_331, __pyx_k_index_set_count_pos_line_331, sizeof(__pyx_k_index_set_count_pos_line_331), 0, 1, 0, 0},
19671  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19672  {&__pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_k_index_set_hidden_doctests_line_4, sizeof(__pyx_k_index_set_hidden_doctests_line_4), 0, 1, 0, 0},
19673  {&__pyx_kp_u_index_set_max_line_349, __pyx_k_index_set_max_line_349, sizeof(__pyx_k_index_set_max_line_349), 0, 1, 0, 0},
19674  {&__pyx_kp_u_index_set_min_line_340, __pyx_k_index_set_min_line_340, sizeof(__pyx_k_index_set_min_line_340), 0, 1, 0, 0},
19675  {&__pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_k_index_set_sign_of_mult_line_364, sizeof(__pyx_k_index_set_sign_of_mult_line_364), 0, 1, 0, 0},
19676  {&__pyx_kp_u_index_set_sign_of_square_line_37, __pyx_k_index_set_sign_of_square_line_37, sizeof(__pyx_k_index_set_sign_of_square_line_37), 0, 1, 0, 0},
19677  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19678  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19679  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19680  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19681  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19682  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19683  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19684  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19685  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19686  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19687  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19688  {&__pyx_kp_u_lexicographic_compare_eg_3_4_5, __pyx_k_lexicographic_compare_eg_3_4_5, sizeof(__pyx_k_lexicographic_compare_eg_3_4_5), 0, 1, 0, 0},
19689  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19690  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19691  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19692  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19693  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19694  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19695  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19696  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19697  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19698  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19699  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19700  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19701  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19702  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19703  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
19704  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19705  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19706  {&__pyx_kp_u_norm_sum_of_squares_of_coordina, __pyx_k_norm_sum_of_squares_of_coordina, sizeof(__pyx_k_norm_sum_of_squares_of_coordina), 0, 1, 0, 0},
19707  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19708  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19709  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19710  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19711  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19712  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19713  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19714  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19715  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19716  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19717  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19718  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19719  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19720  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19721  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19722  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19723  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19724  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19725  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19726  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19727  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19728  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19729  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19730  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19731  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19732  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19733  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19734  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19735  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19736  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19737  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19738  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19739  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19740  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19741  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19742  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19743  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19744  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19745  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19746  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19747  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19748  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19749  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19750  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19751  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19752  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19753  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19754  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19755  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19756  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19757  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19758  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19759  {0, 0, 0, 0, 0, 0, 0}
19760 };
19761 static int __Pyx_InitCachedBuiltins(void) {
19762  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19763  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19764  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19765  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19766  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19767  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19768  #if PY_MAJOR_VERSION >= 3
19769  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19770  #else
19771  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19772  #endif
19773  return 0;
19774  __pyx_L1_error:;
19775  return -1;
19776 }
19777 
19778 static int __Pyx_InitCachedConstants(void) {
19779  __Pyx_RefNannyDeclarations
19780  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19781 
19782  /* "(tree fragment)":2
19783  * def __reduce_cython__(self):
19784  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19785  * def __setstate_cython__(self, __pyx_state):
19786  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19787  */
19788  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error)
19789  __Pyx_GOTREF(__pyx_tuple__3);
19790  __Pyx_GIVEREF(__pyx_tuple__3);
19791 
19792  /* "(tree fragment)":4
19793  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19794  * def __setstate_cython__(self, __pyx_state):
19795  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19796  */
19797  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error)
19798  __Pyx_GOTREF(__pyx_tuple__4);
19799  __Pyx_GIVEREF(__pyx_tuple__4);
19800 
19801  /* "PyClical.pyx":635
19802  * TypeError: Not applicable.
19803  * """
19804  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19805  *
19806  * def __iter__(self):
19807  */
19808  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19809  __Pyx_GOTREF(__pyx_tuple__10);
19810  __Pyx_GIVEREF(__pyx_tuple__10);
19811 
19812  /* "PyClical.pyx":646
19813  * TypeError: Not applicable.
19814  * """
19815  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19816  *
19817  * def reframe(self, ixt):
19818  */
19819  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 646, __pyx_L1_error)
19820  __Pyx_GOTREF(__pyx_tuple__11);
19821  __Pyx_GIVEREF(__pyx_tuple__11);
19822 
19823  /* "(tree fragment)":2
19824  * def __reduce_cython__(self):
19825  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19826  * def __setstate_cython__(self, __pyx_state):
19827  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19828  */
19829  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 2, __pyx_L1_error)
19830  __Pyx_GOTREF(__pyx_tuple__12);
19831  __Pyx_GIVEREF(__pyx_tuple__12);
19832 
19833  /* "(tree fragment)":4
19834  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19835  * def __setstate_cython__(self, __pyx_state):
19836  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19837  */
19838  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 4, __pyx_L1_error)
19839  __Pyx_GOTREF(__pyx_tuple__13);
19840  __Pyx_GIVEREF(__pyx_tuple__13);
19841 
19842  /* "PyClical.pyx":404
19843  * return index_set_to_str( self.unwrap() ).c_str()
19844  *
19845  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19846  * """
19847  * Tests for functions that Doctest cannot see.
19848  */
19849  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_index_set_hidden_doctests, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 404, __pyx_L1_error)
19850 
19851  /* "PyClical.pyx":1243
19852  * return clifford_to_str( self.unwrap() ).c_str()
19853  *
19854  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19855  * """
19856  * Tests for functions that Doctest cannot see.
19857  */
19858  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_clifford_hidden_doctests, 1243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 1243, __pyx_L1_error)
19859 
19860  /* "PyClical.pyx":1856
19861  *
19862  * # Some abbreviations.
19863  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19864  * pi = tau / 2.0
19865  *
19866  */
19867  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1856, __pyx_L1_error)
19868  __Pyx_GOTREF(__pyx_tuple__16);
19869  __Pyx_GIVEREF(__pyx_tuple__16);
19870 
19871  /* "PyClical.pyx":1887
19872  * """
19873  *
19874  * def e(obj): # <<<<<<<<<<<<<<
19875  * """
19876  * Abbreviation for clifford(index_set(obj)).
19877  */
19878  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19879  __Pyx_GOTREF(__pyx_tuple__17);
19880  __Pyx_GIVEREF(__pyx_tuple__17);
19881  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_e, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 1887, __pyx_L1_error)
19882 
19883  /* "PyClical.pyx":1900
19884  * return clifford(index_set(obj))
19885  *
19886  * def istpq(p, q): # <<<<<<<<<<<<<<
19887  * """
19888  * Abbreviation for index_set({-q,...p}).
19889  */
19890  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1900, __pyx_L1_error)
19891  __Pyx_GOTREF(__pyx_tuple__19);
19892  __Pyx_GIVEREF(__pyx_tuple__19);
19893  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_istpq, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 1900, __pyx_L1_error)
19894 
19895  /* "PyClical.pyx":1909
19896  * return index_set(set(range(-q,p+1)))
19897  *
19898  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19899  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19900  *
19901  */
19902  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19903  __Pyx_GOTREF(__pyx_tuple__21);
19904  __Pyx_GIVEREF(__pyx_tuple__21);
19905  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1909, __pyx_L1_error)
19906  __Pyx_GOTREF(__pyx_tuple__22);
19907  __Pyx_GIVEREF(__pyx_tuple__22);
19908 
19909  /* "PyClical.pyx":1910
19910  *
19911  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19912  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19913  *
19914  * # Doctest interface.
19915  */
19916  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1910, __pyx_L1_error)
19917  __Pyx_GOTREF(__pyx_tuple__23);
19918  __Pyx_GIVEREF(__pyx_tuple__23);
19919  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1910, __pyx_L1_error)
19920  __Pyx_GOTREF(__pyx_tuple__24);
19921  __Pyx_GIVEREF(__pyx_tuple__24);
19922 
19923  /* "PyClical.pyx":1913
19924  *
19925  * # Doctest interface.
19926  * def _test(): # <<<<<<<<<<<<<<
19927  * import PyClical, doctest
19928  * return doctest.testmod(PyClical)
19929  */
19930  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1913, __pyx_L1_error)
19931  __Pyx_GOTREF(__pyx_tuple__25);
19932  __Pyx_GIVEREF(__pyx_tuple__25);
19933  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_test, 1913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 1913, __pyx_L1_error)
19934  __Pyx_RefNannyFinishContext();
19935  return 0;
19936  __pyx_L1_error:;
19937  __Pyx_RefNannyFinishContext();
19938  return -1;
19939 }
19940 
19941 static int __Pyx_InitGlobals(void) {
19942  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19943  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19944  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19945  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19946  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19947  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19948  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19949  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19950  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19951  return 0;
19952  __pyx_L1_error:;
19953  return -1;
19954 }
19955 
19956 #if PY_MAJOR_VERSION < 3
19957 PyMODINIT_FUNC initPyClical(void); /*proto*/
19958 PyMODINIT_FUNC initPyClical(void)
19959 #else
19960 PyMODINIT_FUNC PyInit_PyClical(void); /*proto*/
19961 PyMODINIT_FUNC PyInit_PyClical(void)
19962 #if CYTHON_PEP489_MULTI_PHASE_INIT
19963 {
19964  return PyModuleDef_Init(&__pyx_moduledef);
19965 }
19966 static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
19967  PyObject *value = PyObject_GetAttrString(spec, from_name);
19968  int result = 0;
19969  if (likely(value)) {
19970  result = PyDict_SetItemString(moddict, to_name, value);
19971  Py_DECREF(value);
19972  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19973  PyErr_Clear();
19974  } else {
19975  result = -1;
19976  }
19977  return result;
19978 }
19979 static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19980  PyObject *module = NULL, *moddict, *modname;
19981  if (__pyx_m)
19982  return __Pyx_NewRef(__pyx_m);
19983  modname = PyObject_GetAttrString(spec, "name");
19984  if (unlikely(!modname)) goto bad;
19985  module = PyModule_NewObject(modname);
19986  Py_DECREF(modname);
19987  if (unlikely(!module)) goto bad;
19988  moddict = PyModule_GetDict(module);
19989  if (unlikely(!moddict)) goto bad;
19990  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
19991  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
19992  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
19993  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
19994  return module;
19995 bad:
19996  Py_XDECREF(module);
19997  return NULL;
19998 }
19999 
20000 
20001 static int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20002 #endif
20003 #endif
20004 {
20005  PyObject *__pyx_t_1 = NULL;
20006  PyObject *__pyx_t_2 = NULL;
20007  PyObject *__pyx_t_3 = NULL;
20008  int __pyx_t_4;
20009  __Pyx_RefNannyDeclarations
20010  #if CYTHON_PEP489_MULTI_PHASE_INIT
20011  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
20012  #endif
20013  #if CYTHON_REFNANNY
20014  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20015  if (!__Pyx_RefNanny) {
20016  PyErr_Clear();
20017  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20018  if (!__Pyx_RefNanny)
20019  Py_FatalError("failed to import 'refnanny' module");
20020  }
20021  #endif
20022  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20023  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20024  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20025  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20026  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20027  #ifdef __Pyx_CyFunction_USED
20028  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20029  #endif
20030  #ifdef __Pyx_FusedFunction_USED
20031  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20032  #endif
20033  #ifdef __Pyx_Coroutine_USED
20034  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20035  #endif
20036  #ifdef __Pyx_Generator_USED
20037  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20038  #endif
20039  #ifdef __Pyx_AsyncGen_USED
20040  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20041  #endif
20042  #ifdef __Pyx_StopAsyncIteration_USED
20043  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20044  #endif
20045  /*--- Library function declarations ---*/
20046  /*--- Threads initialization code ---*/
20047  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20048  #ifdef WITH_THREAD /* Python build with threading support? */
20049  PyEval_InitThreads();
20050  #endif
20051  #endif
20052  /*--- Module creation code ---*/
20053  #if CYTHON_PEP489_MULTI_PHASE_INIT
20054  __pyx_m = __pyx_pyinit_module;
20055  Py_INCREF(__pyx_m);
20056  #else
20057  #if PY_MAJOR_VERSION < 3
20058  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20059  #else
20060  __pyx_m = PyModule_Create(&__pyx_moduledef);
20061  #endif
20062  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20063  #endif
20064  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20065  Py_INCREF(__pyx_d);
20066  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20067  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20068  #if CYTHON_COMPILING_IN_PYPY
20069  Py_INCREF(__pyx_b);
20070  #endif
20071  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20072  /*--- Initialize various global constants etc. ---*/
20073  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20074  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20075  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20076  #endif
20077  if (__pyx_module_is_main_PyClical) {
20078  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20079  }
20080  #if PY_MAJOR_VERSION >= 3
20081  {
20082  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20083  if (!PyDict_GetItemString(modules, "PyClical")) {
20084  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
20085  }
20086  }
20087  #endif
20088  /*--- Builtin init code ---*/
20089  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20090  /*--- Constants init code ---*/
20091  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20092  /*--- Global init code ---*/
20093  /*--- Variable export code ---*/
20094  /*--- Function export code ---*/
20095  /*--- Type init code ---*/
20096  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
20097  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
20098  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
20099  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
20100  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20101  __pyx_type_8PyClical_index_set.tp_print = 0;
20102  #if CYTHON_COMPILING_IN_CPYTHON
20103  {
20104  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20105  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20106  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20107  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
20108  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
20109  }
20110  }
20111  #endif
20112  #if CYTHON_COMPILING_IN_CPYTHON
20113  {
20114  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20115  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20116  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20117  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
20118  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
20119  }
20120  }
20121  #endif
20122  #if CYTHON_COMPILING_IN_CPYTHON
20123  {
20124  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20125  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20126  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20127  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
20128  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
20129  }
20130  }
20131  #endif
20132  #if CYTHON_COMPILING_IN_CPYTHON
20133  {
20134  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20135  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20136  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20137  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
20138  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
20139  }
20140  }
20141  #endif
20142  #if CYTHON_COMPILING_IN_CPYTHON
20143  {
20144  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20145  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20146  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20147  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
20148  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
20149  }
20150  }
20151  #endif
20152  #if CYTHON_COMPILING_IN_CPYTHON
20153  {
20154  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20155  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20156  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20157  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
20158  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
20159  }
20160  }
20161  #endif
20162  #if CYTHON_COMPILING_IN_CPYTHON
20163  {
20164  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20165  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20166  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20167  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
20168  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
20169  }
20170  }
20171  #endif
20172  #if CYTHON_COMPILING_IN_CPYTHON
20173  {
20174  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20175  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20176  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20177  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
20178  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
20179  }
20180  }
20181  #endif
20182  #if CYTHON_COMPILING_IN_CPYTHON
20183  {
20184  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20185  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20186  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20187  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
20188  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
20189  }
20190  }
20191  #endif
20192  #if CYTHON_COMPILING_IN_CPYTHON
20193  {
20194  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20195  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20196  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20197  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
20198  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
20199  }
20200  }
20201  #endif
20202  #if CYTHON_COMPILING_IN_CPYTHON
20203  {
20204  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20205  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20206  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20207  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
20208  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
20209  }
20210  }
20211  #endif
20212  #if CYTHON_COMPILING_IN_CPYTHON
20213  {
20214  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20215  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20216  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20217  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
20218  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
20219  }
20220  }
20221  #endif
20222  #if CYTHON_COMPILING_IN_CPYTHON
20223  {
20224  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20225  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20226  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20227  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
20228  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
20229  }
20230  }
20231  #endif
20232  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20233  if (PyObject_SetAttrString(__pyx_m, "index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20234  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20235  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
20236  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
20237  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
20238  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
20239  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
20240  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20241  __pyx_type_8PyClical_clifford.tp_print = 0;
20242  #if CYTHON_COMPILING_IN_CPYTHON
20243  {
20244  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20245  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20246  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20247  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
20248  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
20249  }
20250  }
20251  #endif
20252  #if CYTHON_COMPILING_IN_CPYTHON
20253  {
20254  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20255  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20256  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20257  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
20258  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
20259  }
20260  }
20261  #endif
20262  #if CYTHON_COMPILING_IN_CPYTHON
20263  {
20264  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20265  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20266  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20267  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
20268  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
20269  }
20270  }
20271  #endif
20272  #if CYTHON_COMPILING_IN_CPYTHON
20273  {
20274  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20275  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20276  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20277  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
20278  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
20279  }
20280  }
20281  #endif
20282  #if CYTHON_COMPILING_IN_CPYTHON
20283  {
20284  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20285  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20286  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20287  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
20288  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
20289  }
20290  }
20291  #endif
20292  #if CYTHON_COMPILING_IN_CPYTHON
20293  {
20294  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20295  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20296  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20297  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
20298  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
20299  }
20300  }
20301  #endif
20302  #if CYTHON_COMPILING_IN_CPYTHON
20303  {
20304  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20305  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20306  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20307  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
20308  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
20309  }
20310  }
20311  #endif
20312  #if CYTHON_COMPILING_IN_CPYTHON
20313  {
20314  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20315  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20316  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20317  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
20318  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
20319  }
20320  }
20321  #endif
20322  #if CYTHON_COMPILING_IN_CPYTHON
20323  {
20324  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20325  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20326  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20327  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
20328  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
20329  }
20330  }
20331  #endif
20332  #if CYTHON_COMPILING_IN_CPYTHON
20333  {
20334  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20335  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20336  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20337  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20338  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20339  }
20340  }
20341  #endif
20342  #if CYTHON_COMPILING_IN_CPYTHON
20343  {
20344  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20345  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20346  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20347  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20348  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20349  }
20350  }
20351  #endif
20352  #if CYTHON_COMPILING_IN_CPYTHON
20353  {
20354  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20355  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20356  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20357  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20358  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20359  }
20360  }
20361  #endif
20362  #if CYTHON_COMPILING_IN_CPYTHON
20363  {
20364  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20365  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20366  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20367  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20368  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20369  }
20370  }
20371  #endif
20372  #if CYTHON_COMPILING_IN_CPYTHON
20373  {
20374  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20375  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20376  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20377  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20378  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20379  }
20380  }
20381  #endif
20382  #if CYTHON_COMPILING_IN_CPYTHON
20383  {
20384  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20385  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20386  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20387  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20388  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20389  }
20390  }
20391  #endif
20392  #if CYTHON_COMPILING_IN_CPYTHON
20393  {
20394  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20395  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20396  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20397  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20398  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20399  }
20400  }
20401  #endif
20402  #if CYTHON_COMPILING_IN_CPYTHON
20403  {
20404  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20405  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20406  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20407  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20408  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20409  }
20410  }
20411  #endif
20412  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20413  #if CYTHON_COMPILING_IN_CPYTHON
20414  {
20415  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20416  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20417  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20418  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
20419  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
20420  }
20421  }
20422  #endif
20423  #endif
20424  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20425  #if CYTHON_COMPILING_IN_CPYTHON
20426  {
20427  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20428  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20429  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20430  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20431  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20432  }
20433  }
20434  #endif
20435  #endif
20436  #if CYTHON_COMPILING_IN_CPYTHON
20437  {
20438  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20439  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20440  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20441  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20442  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20443  }
20444  }
20445  #endif
20446  #if CYTHON_COMPILING_IN_CPYTHON
20447  {
20448  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20449  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20450  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20451  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20452  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20453  }
20454  }
20455  #endif
20456  #if CYTHON_COMPILING_IN_CPYTHON
20457  {
20458  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20459  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20460  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20461  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20462  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20463  }
20464  }
20465  #endif
20466  #if CYTHON_COMPILING_IN_CPYTHON
20467  {
20468  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20469  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20470  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20471  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20472  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20473  }
20474  }
20475  #endif
20476  #if CYTHON_COMPILING_IN_CPYTHON
20477  {
20478  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20479  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20480  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20481  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20482  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20483  }
20484  }
20485  #endif
20486  #if CYTHON_COMPILING_IN_CPYTHON
20487  {
20488  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20489  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20490  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20491  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20492  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20493  }
20494  }
20495  #endif
20496  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20497  if (PyObject_SetAttrString(__pyx_m, "clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20498  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20499  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20500  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
20501  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20502  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20503  /*--- Type import code ---*/
20504  /*--- Variable import code ---*/
20505  /*--- Function import code ---*/
20506  /*--- Execution code ---*/
20507  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20508  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20509  #endif
20510 
20511  /* "PyClical.pyx":28
20512  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
20513  *
20514  * import math # <<<<<<<<<<<<<<
20515  * import numbers
20516  * import collections
20517  */
20518  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
20519  __Pyx_GOTREF(__pyx_t_1);
20520  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
20521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20522 
20523  /* "PyClical.pyx":29
20524  *
20525  * import math
20526  * import numbers # <<<<<<<<<<<<<<
20527  * import collections
20528  *
20529  */
20530  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
20531  __Pyx_GOTREF(__pyx_t_1);
20532  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
20533  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20534 
20535  /* "PyClical.pyx":30
20536  * import math
20537  * import numbers
20538  * import collections # <<<<<<<<<<<<<<
20539  *
20540  * __version__ = "0.8.2"
20541  */
20542  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
20543  __Pyx_GOTREF(__pyx_t_1);
20544  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
20545  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20546 
20547  /* "PyClical.pyx":32
20548  * import collections
20549  *
20550  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
20551  *
20552  * from PyClical cimport *
20553  */
20554  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
20555 
20556  /* "PyClical.pyx":404
20557  * return index_set_to_str( self.unwrap() ).c_str()
20558  *
20559  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20560  * """
20561  * Tests for functions that Doctest cannot see.
20562  */
20563  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_1index_set_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
20564  __Pyx_GOTREF(__pyx_t_1);
20565  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
20566  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20567 
20568  /* "PyClical.pyx":1243
20569  * return clifford_to_str( self.unwrap() ).c_str()
20570  *
20571  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20572  * """
20573  * Tests for functions that Doctest cannot see.
20574  */
20575  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_9clifford_hidden_doctests, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
20576  __Pyx_GOTREF(__pyx_t_1);
20577  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20578  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20579 
20580  /* "PyClical.pyx":1856
20581  *
20582  * # Some abbreviations.
20583  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20584  * pi = tau / 2.0
20585  *
20586  */
20587  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20588  __Pyx_GOTREF(__pyx_t_1);
20589  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20590  __Pyx_GOTREF(__pyx_t_2);
20591  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20592  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20593  __Pyx_GOTREF(__pyx_t_1);
20594  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20595  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20596  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20597 
20598  /* "PyClical.pyx":1857
20599  * # Some abbreviations.
20600  * tau = atan(clifford(1.0)) * 8.0
20601  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20602  *
20603  * cl = clifford
20604  */
20605  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20606  __Pyx_GOTREF(__pyx_t_1);
20607  __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
20608  __Pyx_GOTREF(__pyx_t_2);
20609  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20610  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20611  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20612 
20613  /* "PyClical.pyx":1859
20614  * pi = tau / 2.0
20615  *
20616  * cl = clifford # <<<<<<<<<<<<<<
20617  * """
20618  * Abbreviation for clifford.
20619  */
20620  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20621 
20622  /* "PyClical.pyx":1879
20623  * """
20624  *
20625  * ist = index_set # <<<<<<<<<<<<<<
20626  * """
20627  * Abbreviation for index_set.
20628  */
20629  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20630 
20631  /* "PyClical.pyx":1887
20632  * """
20633  *
20634  * def e(obj): # <<<<<<<<<<<<<<
20635  * """
20636  * Abbreviation for clifford(index_set(obj)).
20637  */
20638  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_83e, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
20639  __Pyx_GOTREF(__pyx_t_2);
20640  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20641  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20642 
20643  /* "PyClical.pyx":1900
20644  * return clifford(index_set(obj))
20645  *
20646  * def istpq(p, q): # <<<<<<<<<<<<<<
20647  * """
20648  * Abbreviation for index_set({-q,...p}).
20649  */
20650  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_85istpq, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L1_error)
20651  __Pyx_GOTREF(__pyx_t_2);
20652  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20653  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20654 
20655  /* "PyClical.pyx":1909
20656  * return index_set(set(range(-q,p+1)))
20657  *
20658  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20659  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20660  *
20661  */
20662  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20663  __Pyx_GOTREF(__pyx_t_2);
20664  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20665  __Pyx_GOTREF(__pyx_t_1);
20666  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20667  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20668  __Pyx_GOTREF(__pyx_t_2);
20669  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
20670  __Pyx_GOTREF(__pyx_t_3);
20671  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20672  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20673  __Pyx_GOTREF(__pyx_t_2);
20674  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20675  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20676  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20677  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20678 
20679  /* "PyClical.pyx":1910
20680  *
20681  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20682  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20683  *
20684  * # Doctest interface.
20685  */
20686  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20687  __Pyx_GOTREF(__pyx_t_2);
20688  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L1_error)
20689  __Pyx_GOTREF(__pyx_t_3);
20690  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20691  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20692  __Pyx_GOTREF(__pyx_t_2);
20693  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
20694  __Pyx_GOTREF(__pyx_t_1);
20695  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20696  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20697  __Pyx_GOTREF(__pyx_t_2);
20698  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20699  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20700  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20701  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20702 
20703  /* "PyClical.pyx":1913
20704  *
20705  * # Doctest interface.
20706  * def _test(): # <<<<<<<<<<<<<<
20707  * import PyClical, doctest
20708  * return doctest.testmod(PyClical)
20709  */
20710  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8PyClical_87_test, NULL, __pyx_n_s_PyClical); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1913, __pyx_L1_error)
20711  __Pyx_GOTREF(__pyx_t_2);
20712  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20713  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20714 
20715  /* "PyClical.pyx":1917
20716  * return doctest.testmod(PyClical)
20717  *
20718  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20719  * _test()
20720  */
20721  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20722  __Pyx_GOTREF(__pyx_t_2);
20723  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_main, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1917, __pyx_L1_error)
20724  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20725  if (__pyx_t_4) {
20726 
20727  /* "PyClical.pyx":1918
20728  *
20729  * if __name__ == "__main__":
20730  * _test() # <<<<<<<<<<<<<<
20731  */
20732  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20733  __Pyx_GOTREF(__pyx_t_1);
20734  __pyx_t_3 = NULL;
20735  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
20736  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
20737  if (likely(__pyx_t_3)) {
20738  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20739  __Pyx_INCREF(__pyx_t_3);
20740  __Pyx_INCREF(function);
20741  __Pyx_DECREF_SET(__pyx_t_1, function);
20742  }
20743  }
20744  if (__pyx_t_3) {
20745  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20746  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20747  } else {
20748  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20749  }
20750  __Pyx_GOTREF(__pyx_t_2);
20751  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20752  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20753 
20754  /* "PyClical.pyx":1917
20755  * return doctest.testmod(PyClical)
20756  *
20757  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20758  * _test()
20759  */
20760  }
20761 
20762  /* "PyClical.pyx":1
20763  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20764  * # distutils: language = c++
20765  * #
20766  */
20767  __pyx_t_2 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
20768  __Pyx_GOTREF(__pyx_t_2);
20769  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_copy_line_64, __pyx_kp_u_Copy_this_index_set_object_s_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20770  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___setitem___line_177, __pyx_kp_u_Set_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20771  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___getitem___line_189, __pyx_kp_u_Get_the_value_of_an_index_set_o) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20772  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iter___line_227, __pyx_kp_u_Iterate_over_the_indices_of_an) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20773  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___invert___line_238, __pyx_kp_u_Set_complement_not_print_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20774  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___xor___line_247, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20775  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ixor___line_258, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20776  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___and___line_269, __pyx_kp_u_Set_intersection_and_print_inde) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20777  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___iand___line_280, __pyx_kp_u_Set_intersection_and_x_index_se) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20778  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___or___line_291, __pyx_kp_u_Set_union_or_print_index_set_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20779  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___ior___line_302, __pyx_kp_u_Set_union_or_x_index_set_1_x_in) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20780  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_line_313, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20781  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_neg_line_322, __pyx_kp_u_Number_of_negative_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20782  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_count_pos_line_331, __pyx_kp_u_Number_of_positive_indices_incl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20783  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_min_line_340, __pyx_kp_u_Minimum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20784  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_max_line_349, __pyx_kp_u_Maximum_member_index_set_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20785  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_mult_line_364, __pyx_kp_u_Sign_of_geometric_product_of_tw) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20786  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_sign_of_square_line_37, __pyx_kp_u_Sign_of_geometric_square_of_a_C) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20787  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___repr___line_382, __pyx_kp_u_The_official_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20788  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set___str___line_393, __pyx_kp_u_The_informal_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20789  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_index_set_hidden_doctests_line_4, __pyx_kp_u_Tests_for_functions_that_Doctes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20790  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_compare_line_490, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20791  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_min_neg_line_502, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20792  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_pos_line_511, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20793  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_copy_line_554, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20794  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iter___line_637, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20795  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reframe_line_648, __pyx_kp_u_Put_self_into_a_larger_frame_co) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20796  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___getitem___line_706, __pyx_kp_u_Subscripting_map_from_index_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20797  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___neg___line_721, __pyx_kp_u_Unary_print_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20798  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pos___line_730, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20799  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___add___line_739, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20800  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iadd___line_750, __pyx_kp_u_Geometric_sum_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20801  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___sub___line_759, __pyx_kp_u_Geometric_difference_print_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20802  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___isub___line_770, __pyx_kp_u_Geometric_difference_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20803  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mul___line_779, __pyx_kp_u_Geometric_product_print_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20804  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imul___line_792, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20805  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___mod___line_805, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20806  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___imod___line_820, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20807  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___and___line_835, __pyx_kp_u_Inner_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20808  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___iand___line_850, __pyx_kp_u_Inner_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20809  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___xor___line_865, __pyx_kp_u_Outer_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20810  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ixor___line_880, __pyx_kp_u_Outer_product_x_clifford_1_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20811  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___div___line_895, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20812  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___idiv___line_910, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20813  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_inv_line_925, __pyx_kp_u_Geometric_multiplicative_invers) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20814  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___or___line_938, __pyx_kp_u_Transform_left_hand_side_using) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20815  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___ior___line_949, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20816  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___pow___line_960, __pyx_kp_u_Power_self_to_the_m_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20817  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pow_line_979, __pyx_kp_u_Power_self_to_the_m_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20818  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_outer_pow_line_1003, __pyx_kp_u_Outer_product_power_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20819  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___call___line_1019, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20820  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_scalar_line_1038, __pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20821  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_pure_line_1049, __pyx_kp_u_Pure_part_print_clifford_1_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20822  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_even_line_1060, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20823  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_odd_line_1069, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20824  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_vector_part_line_1078, __pyx_kp_u_Vector_part_of_multivector_as_a) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20825  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_involute_line_1106, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20826  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_reverse_line_1122, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20827  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_conj_line_1137, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20828  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_quad_line_1152, __pyx_kp_u_Quadratic_form_rev_x_x_0_print) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20829  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_norm_line_1163, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20830  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_abs_line_1174, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20831  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_max_abs_line_1183, __pyx_kp_u_Maximum_of_absolute_values_of_c) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20832  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_truncated_line_1194, __pyx_kp_u_Remove_all_terms_of_self_with_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20833  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_isnan_line_1205, __pyx_kp_u_Check_if_a_multivector_contains) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20834  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_frame_line_1214, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20835  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___repr___line_1225, __pyx_kp_u_The_official_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20836  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford___str___line_1234, __pyx_kp_u_The_informal_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20837  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_clifford_hidden_doctests_line_12, __pyx_kp_u_Tests_for_functions_that_Doctes_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20838  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_inv_line_1329, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20839  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_scalar_line_1344, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20840  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_real_line_1355, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20841  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_imag_line_1366, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20842  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pure_line_1377, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20843  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_even_line_1388, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20844  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_odd_line_1397, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20845  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_involute_line_1406, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20846  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_reverse_line_1421, __pyx_kp_u_Reversion_eg_1_2_2_1_print_reve) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20847  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_conj_line_1436, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20848  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_quad_line_1451, __pyx_kp_u_Quadratic_form_rev_x_x_0_print_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20849  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_norm_line_1462, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20850  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_abs_line_1473, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20851  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_abs_line_1482, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20852  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_pow_line_1494, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20853  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_outer_pow_line_1518, __pyx_kp_u_Outer_product_power_of_multivec) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20854  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_complexifier_line_1527, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20855  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sqrt_line_1542, __pyx_kp_u_Square_root_of_multivector_with) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20856  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_exp_line_1565, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20857  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_log_line_1579, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20858  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cos_line_1602, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20859  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acos_line_1619, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20860  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cosh_line_1640, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20861  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_acosh_line_1656, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20862  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sin_line_1679, __pyx_kp_u_Sine_of_multivector_with_option) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20863  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asin_line_1698, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20864  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_sinh_line_1719, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20865  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_asinh_line_1733, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20866  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tan_line_1752, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20867  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atan_line_1769, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20868  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_tanh_line_1786, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20869  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_atanh_line_1798, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20870  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_random_clifford_line_1815, __pyx_kp_u_Random_multivector_within_a_fra) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20871  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3_line_1824, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20872  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_cga3std_line_1833, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20873  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_agc3_line_1844, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20874  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_e_line_1887, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20875  if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_istpq_line_1900, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20876  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20877  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20878 
20879  /*--- Wrapped vars code ---*/
20880 
20881  goto __pyx_L0;
20882  __pyx_L1_error:;
20883  __Pyx_XDECREF(__pyx_t_1);
20884  __Pyx_XDECREF(__pyx_t_2);
20885  __Pyx_XDECREF(__pyx_t_3);
20886  if (__pyx_m) {
20887  if (__pyx_d) {
20888  __Pyx_AddTraceback("init PyClical", 0, __pyx_lineno, __pyx_filename);
20889  }
20890  Py_DECREF(__pyx_m); __pyx_m = 0;
20891  } else if (!PyErr_Occurred()) {
20892  PyErr_SetString(PyExc_ImportError, "init PyClical");
20893  }
20894  __pyx_L0:;
20895  __Pyx_RefNannyFinishContext();
20896  #if CYTHON_PEP489_MULTI_PHASE_INIT
20897  return (__pyx_m != NULL) ? 0 : -1;
20898  #elif PY_MAJOR_VERSION >= 3
20899  return __pyx_m;
20900  #else
20901  return;
20902  #endif
20903 }
20904 
20905 /* --- Runtime support code --- */
20906 /* Refnanny */
20907 #if CYTHON_REFNANNY
20908 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20909  PyObject *m = NULL, *p = NULL;
20910  void *r = NULL;
20911  m = PyImport_ImportModule((char *)modname);
20912  if (!m) goto end;
20913  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
20914  if (!p) goto end;
20915  r = PyLong_AsVoidPtr(p);
20916 end:
20917  Py_XDECREF(p);
20918  Py_XDECREF(m);
20919  return (__Pyx_RefNannyAPIStruct *)r;
20920 }
20921 #endif
20922 
20923 /* GetBuiltinName */
20924 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20925  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20926  if (unlikely(!result)) {
20927  PyErr_Format(PyExc_NameError,
20928 #if PY_MAJOR_VERSION >= 3
20929  "name '%U' is not defined", name);
20930 #else
20931  "name '%.200s' is not defined", PyString_AS_STRING(name));
20932 #endif
20933  }
20934  return result;
20935 }
20936 
20937 /* PyObjectCall */
20938 #if CYTHON_COMPILING_IN_CPYTHON
20939 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20940  PyObject *result;
20941  ternaryfunc call = func->ob_type->tp_call;
20942  if (unlikely(!call))
20943  return PyObject_Call(func, arg, kw);
20944  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20945  return NULL;
20946  result = (*call)(func, arg, kw);
20947  Py_LeaveRecursiveCall();
20948  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20949  PyErr_SetString(
20950  PyExc_SystemError,
20951  "NULL result without error in PyObject_Call");
20952  }
20953  return result;
20954 }
20955 #endif
20956 
20957 /* PyErrFetchRestore */
20958 #if CYTHON_FAST_THREAD_STATE
20959 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20960  PyObject *tmp_type, *tmp_value, *tmp_tb;
20961  tmp_type = tstate->curexc_type;
20962  tmp_value = tstate->curexc_value;
20963  tmp_tb = tstate->curexc_traceback;
20964  tstate->curexc_type = type;
20965  tstate->curexc_value = value;
20966  tstate->curexc_traceback = tb;
20967  Py_XDECREF(tmp_type);
20968  Py_XDECREF(tmp_value);
20969  Py_XDECREF(tmp_tb);
20970 }
20971 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20972  *type = tstate->curexc_type;
20973  *value = tstate->curexc_value;
20974  *tb = tstate->curexc_traceback;
20975  tstate->curexc_type = 0;
20976  tstate->curexc_value = 0;
20977  tstate->curexc_traceback = 0;
20978 }
20979 #endif
20980 
20981 /* WriteUnraisableException */
20982 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20983  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20984  int full_traceback, CYTHON_UNUSED int nogil) {
20985  PyObject *old_exc, *old_val, *old_tb;
20986  PyObject *ctx;
20987  __Pyx_PyThreadState_declare
20988 #ifdef WITH_THREAD
20989  PyGILState_STATE state;
20990  if (nogil)
20991  state = PyGILState_Ensure();
20992 #ifdef _MSC_VER
20993  else state = (PyGILState_STATE)-1;
20994 #endif
20995 #endif
20996  __Pyx_PyThreadState_assign
20997  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20998  if (full_traceback) {
20999  Py_XINCREF(old_exc);
21000  Py_XINCREF(old_val);
21001  Py_XINCREF(old_tb);
21002  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21003  PyErr_PrintEx(1);
21004  }
21005  #if PY_MAJOR_VERSION < 3
21006  ctx = PyString_FromString(name);
21007  #else
21008  ctx = PyUnicode_FromString(name);
21009  #endif
21010  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21011  if (!ctx) {
21012  PyErr_WriteUnraisable(Py_None);
21013  } else {
21014  PyErr_WriteUnraisable(ctx);
21015  Py_DECREF(ctx);
21016  }
21017 #ifdef WITH_THREAD
21018  if (nogil)
21019  PyGILState_Release(state);
21020 #endif
21021 }
21022 
21023 /* PyCFunctionFastCall */
21024 #if CYTHON_FAST_PYCCALL
21025 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
21026  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
21027  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
21028  PyObject *self = PyCFunction_GET_SELF(func);
21029  int flags = PyCFunction_GET_FLAGS(func);
21030  assert(PyCFunction_Check(func));
21031  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
21032  assert(nargs >= 0);
21033  assert(nargs == 0 || args != NULL);
21034  /* _PyCFunction_FastCallDict() must not be called with an exception set,
21035  because it may clear it (directly or indirectly) and so the
21036  caller loses its exception */
21037  assert(!PyErr_Occurred());
21038  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
21039  return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
21040  } else {
21041  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
21042  }
21043 }
21044 #endif
21045 
21046 /* PyFunctionFastCall */
21047 #if CYTHON_FAST_PYCALL
21048 #include "frameobject.h"
21049 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
21050  PyObject *globals) {
21051  PyFrameObject *f;
21052  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21053  PyObject **fastlocals;
21054  Py_ssize_t i;
21055  PyObject *result;
21056  assert(globals != NULL);
21057  /* XXX Perhaps we should create a specialized
21058  PyFrame_New() that doesn't take locals, but does
21059  take builtins without sanity checking them.
21060  */
21061  assert(tstate != NULL);
21062  f = PyFrame_New(tstate, co, globals, NULL);
21063  if (f == NULL) {
21064  return NULL;
21065  }
21066  fastlocals = f->f_localsplus;
21067  for (i = 0; i < na; i++) {
21068  Py_INCREF(*args);
21069  fastlocals[i] = *args++;
21070  }
21071  result = PyEval_EvalFrameEx(f,0);
21072  ++tstate->recursion_depth;
21073  Py_DECREF(f);
21074  --tstate->recursion_depth;
21075  return result;
21076 }
21077 #if 1 || PY_VERSION_HEX < 0x030600B1
21078 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
21079  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
21080  PyObject *globals = PyFunction_GET_GLOBALS(func);
21081  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
21082  PyObject *closure;
21083 #if PY_MAJOR_VERSION >= 3
21084  PyObject *kwdefs;
21085 #endif
21086  PyObject *kwtuple, **k;
21087  PyObject **d;
21088  Py_ssize_t nd;
21089  Py_ssize_t nk;
21090  PyObject *result;
21091  assert(kwargs == NULL || PyDict_Check(kwargs));
21092  nk = kwargs ? PyDict_Size(kwargs) : 0;
21093  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
21094  return NULL;
21095  }
21096  if (
21097 #if PY_MAJOR_VERSION >= 3
21098  co->co_kwonlyargcount == 0 &&
21099 #endif
21100  likely(kwargs == NULL || nk == 0) &&
21101  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
21102  if (argdefs == NULL && co->co_argcount == nargs) {
21103  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
21104  goto done;
21105  }
21106  else if (nargs == 0 && argdefs != NULL
21107  && co->co_argcount == Py_SIZE(argdefs)) {
21108  /* function called with no arguments, but all parameters have
21109  a default value: use default values as arguments .*/
21110  args = &PyTuple_GET_ITEM(argdefs, 0);
21111  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
21112  goto done;
21113  }
21114  }
21115  if (kwargs != NULL) {
21116  Py_ssize_t pos, i;
21117  kwtuple = PyTuple_New(2 * nk);
21118  if (kwtuple == NULL) {
21119  result = NULL;
21120  goto done;
21121  }
21122  k = &PyTuple_GET_ITEM(kwtuple, 0);
21123  pos = i = 0;
21124  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
21125  Py_INCREF(k[i]);
21126  Py_INCREF(k[i+1]);
21127  i += 2;
21128  }
21129  nk = i / 2;
21130  }
21131  else {
21132  kwtuple = NULL;
21133  k = NULL;
21134  }
21135  closure = PyFunction_GET_CLOSURE(func);
21136 #if PY_MAJOR_VERSION >= 3
21137  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
21138 #endif
21139  if (argdefs != NULL) {
21140  d = &PyTuple_GET_ITEM(argdefs, 0);
21141  nd = Py_SIZE(argdefs);
21142  }
21143  else {
21144  d = NULL;
21145  nd = 0;
21146  }
21147 #if PY_MAJOR_VERSION >= 3
21148  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
21149  args, nargs,
21150  k, (int)nk,
21151  d, (int)nd, kwdefs, closure);
21152 #else
21153  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
21154  args, nargs,
21155  k, (int)nk,
21156  d, (int)nd, closure);
21157 #endif
21158  Py_XDECREF(kwtuple);
21159 done:
21160  Py_LeaveRecursiveCall();
21161  return result;
21162 }
21163 #endif
21164 #endif
21165 
21166 /* PyObjectCallMethO */
21167 #if CYTHON_COMPILING_IN_CPYTHON
21168 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21169  PyObject *self, *result;
21170  PyCFunction cfunc;
21171  cfunc = PyCFunction_GET_FUNCTION(func);
21172  self = PyCFunction_GET_SELF(func);
21173  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21174  return NULL;
21175  result = cfunc(self, arg);
21176  Py_LeaveRecursiveCall();
21177  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21178  PyErr_SetString(
21179  PyExc_SystemError,
21180  "NULL result without error in PyObject_Call");
21181  }
21182  return result;
21183 }
21184 #endif
21185 
21186 /* PyObjectCallOneArg */
21187 #if CYTHON_COMPILING_IN_CPYTHON
21188 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21189  PyObject *result;
21190  PyObject *args = PyTuple_New(1);
21191  if (unlikely(!args)) return NULL;
21192  Py_INCREF(arg);
21193  PyTuple_SET_ITEM(args, 0, arg);
21194  result = __Pyx_PyObject_Call(func, args, NULL);
21195  Py_DECREF(args);
21196  return result;
21197 }
21198 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21199 #if CYTHON_FAST_PYCALL
21200  if (PyFunction_Check(func)) {
21201  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21202  }
21203 #endif
21204  if (likely(PyCFunction_Check(func))) {
21205  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21206  return __Pyx_PyObject_CallMethO(func, arg);
21207 #if CYTHON_FAST_PYCCALL
21208  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21209  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21210 #endif
21211  }
21212  }
21213  return __Pyx__PyObject_CallOneArg(func, arg);
21214 }
21215 #else
21216 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21217  PyObject *result;
21218  PyObject *args = PyTuple_Pack(1, arg);
21219  if (unlikely(!args)) return NULL;
21220  result = __Pyx_PyObject_Call(func, args, NULL);
21221  Py_DECREF(args);
21222  return result;
21223 }
21224 #endif
21225 
21226 /* PyObjectCallNoArg */
21227 #if CYTHON_COMPILING_IN_CPYTHON
21228 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21229 #if CYTHON_FAST_PYCALL
21230  if (PyFunction_Check(func)) {
21231  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21232  }
21233 #endif
21234 #ifdef __Pyx_CyFunction_USED
21235  if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
21236 #else
21237  if (likely(PyCFunction_Check(func))) {
21238 #endif
21239  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21240  return __Pyx_PyObject_CallMethO(func, NULL);
21241  }
21242  }
21243  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21244 }
21245 #endif
21246 
21247 /* RaiseDoubleKeywords */
21248  static void __Pyx_RaiseDoubleKeywordsError(
21249  const char* func_name,
21250  PyObject* kw_name)
21251 {
21252  PyErr_Format(PyExc_TypeError,
21253  #if PY_MAJOR_VERSION >= 3
21254  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21255  #else
21256  "%s() got multiple values for keyword argument '%s'", func_name,
21257  PyString_AsString(kw_name));
21258  #endif
21259 }
21260 
21261 /* ParseKeywords */
21262  static int __Pyx_ParseOptionalKeywords(
21263  PyObject *kwds,
21264  PyObject **argnames[],
21265  PyObject *kwds2,
21266  PyObject *values[],
21267  Py_ssize_t num_pos_args,
21268  const char* function_name)
21269 {
21270  PyObject *key = 0, *value = 0;
21271  Py_ssize_t pos = 0;
21272  PyObject*** name;
21273  PyObject*** first_kw_arg = argnames + num_pos_args;
21274  while (PyDict_Next(kwds, &pos, &key, &value)) {
21275  name = first_kw_arg;
21276  while (*name && (**name != key)) name++;
21277  if (*name) {
21278  values[name-argnames] = value;
21279  continue;
21280  }
21281  name = first_kw_arg;
21282  #if PY_MAJOR_VERSION < 3
21283  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
21284  while (*name) {
21285  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21286  && _PyString_Eq(**name, key)) {
21287  values[name-argnames] = value;
21288  break;
21289  }
21290  name++;
21291  }
21292  if (*name) continue;
21293  else {
21294  PyObject*** argname = argnames;
21295  while (argname != first_kw_arg) {
21296  if ((**argname == key) || (
21297  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21298  && _PyString_Eq(**argname, key))) {
21299  goto arg_passed_twice;
21300  }
21301  argname++;
21302  }
21303  }
21304  } else
21305  #endif
21306  if (likely(PyUnicode_Check(key))) {
21307  while (*name) {
21308  int cmp = (**name == key) ? 0 :
21309  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21310  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
21311  #endif
21312  PyUnicode_Compare(**name, key);
21313  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21314  if (cmp == 0) {
21315  values[name-argnames] = value;
21316  break;
21317  }
21318  name++;
21319  }
21320  if (*name) continue;
21321  else {
21322  PyObject*** argname = argnames;
21323  while (argname != first_kw_arg) {
21324  int cmp = (**argname == key) ? 0 :
21325  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21326  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
21327  #endif
21328  PyUnicode_Compare(**argname, key);
21329  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21330  if (cmp == 0) goto arg_passed_twice;
21331  argname++;
21332  }
21333  }
21334  } else
21335  goto invalid_keyword_type;
21336  if (kwds2) {
21337  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21338  } else {
21339  goto invalid_keyword;
21340  }
21341  }
21342  return 0;
21343 arg_passed_twice:
21344  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21345  goto bad;
21346 invalid_keyword_type:
21347  PyErr_Format(PyExc_TypeError,
21348  "%.200s() keywords must be strings", function_name);
21349  goto bad;
21350 invalid_keyword:
21351  PyErr_Format(PyExc_TypeError,
21352  #if PY_MAJOR_VERSION < 3
21353  "%.200s() got an unexpected keyword argument '%.200s'",
21354  function_name, PyString_AsString(key));
21355  #else
21356  "%s() got an unexpected keyword argument '%U'",
21357  function_name, key);
21358  #endif
21359 bad:
21360  return -1;
21361 }
21362 
21363 /* RaiseArgTupleInvalid */
21364  static void __Pyx_RaiseArgtupleInvalid(
21365  const char* func_name,
21366  int exact,
21367  Py_ssize_t num_min,
21368  Py_ssize_t num_max,
21369  Py_ssize_t num_found)
21370 {
21371  Py_ssize_t num_expected;
21372  const char *more_or_less;
21373  if (num_found < num_min) {
21374  num_expected = num_min;
21375  more_or_less = "at least";
21376  } else {
21377  num_expected = num_max;
21378  more_or_less = "at most";
21379  }
21380  if (exact) {
21381  more_or_less = "exactly";
21382  }
21383  PyErr_Format(PyExc_TypeError,
21384  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21385  func_name, more_or_less, num_expected,
21386  (num_expected == 1) ? "" : "s", num_found);
21387 }
21388 
21389 /* GetModuleGlobalName */
21390  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
21391  PyObject *result;
21392 #if !CYTHON_AVOID_BORROWED_REFS
21393  result = PyDict_GetItem(__pyx_d, name);
21394  if (likely(result)) {
21395  Py_INCREF(result);
21396  } else {
21397 #else
21398  result = PyObject_GetItem(__pyx_d, name);
21399  if (!result) {
21400  PyErr_Clear();
21401 #endif
21402  result = __Pyx_GetBuiltinName(name);
21403  }
21404  return result;
21405 }
21406 
21407 /* SaveResetException */
21408  #if CYTHON_FAST_THREAD_STATE
21409 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21410  #if PY_VERSION_HEX >= 0x030700A2
21411  *type = tstate->exc_state.exc_type;
21412  *value = tstate->exc_state.exc_value;
21413  *tb = tstate->exc_state.exc_traceback;
21414  #else
21415  *type = tstate->exc_type;
21416  *value = tstate->exc_value;
21417  *tb = tstate->exc_traceback;
21418  #endif
21419  Py_XINCREF(*type);
21420  Py_XINCREF(*value);
21421  Py_XINCREF(*tb);
21422 }
21423 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21424  PyObject *tmp_type, *tmp_value, *tmp_tb;
21425  #if PY_VERSION_HEX >= 0x030700A2
21426  tmp_type = tstate->exc_state.exc_type;
21427  tmp_value = tstate->exc_state.exc_value;
21428  tmp_tb = tstate->exc_state.exc_traceback;
21429  tstate->exc_state.exc_type = type;
21430  tstate->exc_state.exc_value = value;
21431  tstate->exc_state.exc_traceback = tb;
21432  #else
21433  tmp_type = tstate->exc_type;
21434  tmp_value = tstate->exc_value;
21435  tmp_tb = tstate->exc_traceback;
21436  tstate->exc_type = type;
21437  tstate->exc_value = value;
21438  tstate->exc_traceback = tb;
21439  #endif
21440  Py_XDECREF(tmp_type);
21441  Py_XDECREF(tmp_value);
21442  Py_XDECREF(tmp_tb);
21443 }
21444 #endif
21445 
21446 /* PyErrExceptionMatches */
21447  #if CYTHON_FAST_THREAD_STATE
21448 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21449  Py_ssize_t i, n;
21450  n = PyTuple_GET_SIZE(tuple);
21451 #if PY_MAJOR_VERSION >= 3
21452  for (i=0; i<n; i++) {
21453  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21454  }
21455 #endif
21456  for (i=0; i<n; i++) {
21457  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21458  }
21459  return 0;
21460 }
21461 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21462  PyObject *exc_type = tstate->curexc_type;
21463  if (exc_type == err) return 1;
21464  if (unlikely(!exc_type)) return 0;
21465  if (unlikely(PyTuple_Check(err)))
21466  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21467  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21468 }
21469 #endif
21470 
21471 /* GetException */
21472  #if CYTHON_FAST_THREAD_STATE
21473 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21474 #else
21475 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
21476 #endif
21477  PyObject *local_type, *local_value, *local_tb;
21478 #if CYTHON_FAST_THREAD_STATE
21479  PyObject *tmp_type, *tmp_value, *tmp_tb;
21480  local_type = tstate->curexc_type;
21481  local_value = tstate->curexc_value;
21482  local_tb = tstate->curexc_traceback;
21483  tstate->curexc_type = 0;
21484  tstate->curexc_value = 0;
21485  tstate->curexc_traceback = 0;
21486 #else
21487  PyErr_Fetch(&local_type, &local_value, &local_tb);
21488 #endif
21489  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21490 #if CYTHON_FAST_THREAD_STATE
21491  if (unlikely(tstate->curexc_type))
21492 #else
21493  if (unlikely(PyErr_Occurred()))
21494 #endif
21495  goto bad;
21496  #if PY_MAJOR_VERSION >= 3
21497  if (local_tb) {
21498  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21499  goto bad;
21500  }
21501  #endif
21502  Py_XINCREF(local_tb);
21503  Py_XINCREF(local_type);
21504  Py_XINCREF(local_value);
21505  *type = local_type;
21506  *value = local_value;
21507  *tb = local_tb;
21508 #if CYTHON_FAST_THREAD_STATE
21509  #if PY_VERSION_HEX >= 0x030700A2
21510  tmp_type = tstate->exc_state.exc_type;
21511  tmp_value = tstate->exc_state.exc_value;
21512  tmp_tb = tstate->exc_state.exc_traceback;
21513  tstate->exc_state.exc_type = local_type;
21514  tstate->exc_state.exc_value = local_value;
21515  tstate->exc_state.exc_traceback = local_tb;
21516  #else
21517  tmp_type = tstate->exc_type;
21518  tmp_value = tstate->exc_value;
21519  tmp_tb = tstate->exc_traceback;
21520  tstate->exc_type = local_type;
21521  tstate->exc_value = local_value;
21522  tstate->exc_traceback = local_tb;
21523  #endif
21524  Py_XDECREF(tmp_type);
21525  Py_XDECREF(tmp_value);
21526  Py_XDECREF(tmp_tb);
21527 #else
21528  PyErr_SetExcInfo(local_type, local_value, local_tb);
21529 #endif
21530  return 0;
21531 bad:
21532  *type = 0;
21533  *value = 0;
21534  *tb = 0;
21535  Py_XDECREF(local_type);
21536  Py_XDECREF(local_value);
21537  Py_XDECREF(local_tb);
21538  return -1;
21539 }
21540 
21541 /* RaiseException */
21542  #if PY_MAJOR_VERSION < 3
21543 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21544  CYTHON_UNUSED PyObject *cause) {
21545  __Pyx_PyThreadState_declare
21546  Py_XINCREF(type);
21547  if (!value || value == Py_None)
21548  value = NULL;
21549  else
21550  Py_INCREF(value);
21551  if (!tb || tb == Py_None)
21552  tb = NULL;
21553  else {
21554  Py_INCREF(tb);
21555  if (!PyTraceBack_Check(tb)) {
21556  PyErr_SetString(PyExc_TypeError,
21557  "raise: arg 3 must be a traceback or None");
21558  goto raise_error;
21559  }
21560  }
21561  if (PyType_Check(type)) {
21562 #if CYTHON_COMPILING_IN_PYPY
21563  if (!value) {
21564  Py_INCREF(Py_None);
21565  value = Py_None;
21566  }
21567 #endif
21568  PyErr_NormalizeException(&type, &value, &tb);
21569  } else {
21570  if (value) {
21571  PyErr_SetString(PyExc_TypeError,
21572  "instance exception may not have a separate value");
21573  goto raise_error;
21574  }
21575  value = type;
21576  type = (PyObject*) Py_TYPE(type);
21577  Py_INCREF(type);
21578  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21579  PyErr_SetString(PyExc_TypeError,
21580  "raise: exception class must be a subclass of BaseException");
21581  goto raise_error;
21582  }
21583  }
21584  __Pyx_PyThreadState_assign
21585  __Pyx_ErrRestore(type, value, tb);
21586  return;
21587 raise_error:
21588  Py_XDECREF(value);
21589  Py_XDECREF(type);
21590  Py_XDECREF(tb);
21591  return;
21592 }
21593 #else
21594 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21595  PyObject* owned_instance = NULL;
21596  if (tb == Py_None) {
21597  tb = 0;
21598  } else if (tb && !PyTraceBack_Check(tb)) {
21599  PyErr_SetString(PyExc_TypeError,
21600  "raise: arg 3 must be a traceback or None");
21601  goto bad;
21602  }
21603  if (value == Py_None)
21604  value = 0;
21605  if (PyExceptionInstance_Check(type)) {
21606  if (value) {
21607  PyErr_SetString(PyExc_TypeError,
21608  "instance exception may not have a separate value");
21609  goto bad;
21610  }
21611  value = type;
21612  type = (PyObject*) Py_TYPE(value);
21613  } else if (PyExceptionClass_Check(type)) {
21614  PyObject *instance_class = NULL;
21615  if (value && PyExceptionInstance_Check(value)) {
21616  instance_class = (PyObject*) Py_TYPE(value);
21617  if (instance_class != type) {
21618  int is_subclass = PyObject_IsSubclass(instance_class, type);
21619  if (!is_subclass) {
21620  instance_class = NULL;
21621  } else if (unlikely(is_subclass == -1)) {
21622  goto bad;
21623  } else {
21624  type = instance_class;
21625  }
21626  }
21627  }
21628  if (!instance_class) {
21629  PyObject *args;
21630  if (!value)
21631  args = PyTuple_New(0);
21632  else if (PyTuple_Check(value)) {
21633  Py_INCREF(value);
21634  args = value;
21635  } else
21636  args = PyTuple_Pack(1, value);
21637  if (!args)
21638  goto bad;
21639  owned_instance = PyObject_Call(type, args, NULL);
21640  Py_DECREF(args);
21641  if (!owned_instance)
21642  goto bad;
21643  value = owned_instance;
21644  if (!PyExceptionInstance_Check(value)) {
21645  PyErr_Format(PyExc_TypeError,
21646  "calling %R should have returned an instance of "
21647  "BaseException, not %R",
21648  type, Py_TYPE(value));
21649  goto bad;
21650  }
21651  }
21652  } else {
21653  PyErr_SetString(PyExc_TypeError,
21654  "raise: exception class must be a subclass of BaseException");
21655  goto bad;
21656  }
21657  if (cause) {
21658  PyObject *fixed_cause;
21659  if (cause == Py_None) {
21660  fixed_cause = NULL;
21661  } else if (PyExceptionClass_Check(cause)) {
21662  fixed_cause = PyObject_CallObject(cause, NULL);
21663  if (fixed_cause == NULL)
21664  goto bad;
21665  } else if (PyExceptionInstance_Check(cause)) {
21666  fixed_cause = cause;
21667  Py_INCREF(fixed_cause);
21668  } else {
21669  PyErr_SetString(PyExc_TypeError,
21670  "exception causes must derive from "
21671  "BaseException");
21672  goto bad;
21673  }
21674  PyException_SetCause(value, fixed_cause);
21675  }
21676  PyErr_SetObject(type, value);
21677  if (tb) {
21678 #if CYTHON_COMPILING_IN_PYPY
21679  PyObject *tmp_type, *tmp_value, *tmp_tb;
21680  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21681  Py_INCREF(tb);
21682  PyErr_Restore(tmp_type, tmp_value, tb);
21683  Py_XDECREF(tmp_tb);
21684 #else
21685  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21686  PyObject* tmp_tb = tstate->curexc_traceback;
21687  if (tb != tmp_tb) {
21688  Py_INCREF(tb);
21689  tstate->curexc_traceback = tb;
21690  Py_XDECREF(tmp_tb);
21691  }
21692 #endif
21693  }
21694 bad:
21695  Py_XDECREF(owned_instance);
21696  return;
21697 }
21698 #endif
21699 
21700 /* PyIntBinop */
21701  #if !CYTHON_COMPILING_IN_PYPY
21702 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
21703  #if PY_MAJOR_VERSION < 3
21704  if (likely(PyInt_CheckExact(op1))) {
21705  const long b = intval;
21706  long x;
21707  long a = PyInt_AS_LONG(op1);
21708  x = (long)((unsigned long)a + b);
21709  if (likely((x^a) >= 0 || (x^b) >= 0))
21710  return PyInt_FromLong(x);
21711  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21712  }
21713  #endif
21714  #if CYTHON_USE_PYLONG_INTERNALS
21715  if (likely(PyLong_CheckExact(op1))) {
21716  const long b = intval;
21717  long a, x;
21718 #ifdef HAVE_LONG_LONG
21719  const PY_LONG_LONG llb = intval;
21720  PY_LONG_LONG lla, llx;
21721 #endif
21722  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21723  const Py_ssize_t size = Py_SIZE(op1);
21724  if (likely(__Pyx_sst_abs(size) <= 1)) {
21725  a = likely(size) ? digits[0] : 0;
21726  if (size == -1) a = -a;
21727  } else {
21728  switch (size) {
21729  case -2:
21730  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21731  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21732  break;
21733 #ifdef HAVE_LONG_LONG
21734  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21735  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21736  goto long_long;
21737 #endif
21738  }
21739  case 2:
21740  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21741  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21742  break;
21743 #ifdef HAVE_LONG_LONG
21744  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21745  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21746  goto long_long;
21747 #endif
21748  }
21749  case -3:
21750  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21751  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21752  break;
21753 #ifdef HAVE_LONG_LONG
21754  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21755  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21756  goto long_long;
21757 #endif
21758  }
21759  case 3:
21760  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21761  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21762  break;
21763 #ifdef HAVE_LONG_LONG
21764  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21765  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21766  goto long_long;
21767 #endif
21768  }
21769  case -4:
21770  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21771  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21772  break;
21773 #ifdef HAVE_LONG_LONG
21774  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21775  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21776  goto long_long;
21777 #endif
21778  }
21779  case 4:
21780  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21781  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21782  break;
21783 #ifdef HAVE_LONG_LONG
21784  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21785  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21786  goto long_long;
21787 #endif
21788  }
21789  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21790  }
21791  }
21792  x = a + b;
21793  return PyLong_FromLong(x);
21794 #ifdef HAVE_LONG_LONG
21795  long_long:
21796  llx = lla + llb;
21797  return PyLong_FromLongLong(llx);
21798 #endif
21799 
21800 
21801  }
21802  #endif
21803  if (PyFloat_CheckExact(op1)) {
21804  const long b = intval;
21805  double a = PyFloat_AS_DOUBLE(op1);
21806  double result;
21807  PyFPE_START_PROTECT("add", return NULL)
21808  result = ((double)a) + (double)b;
21809  PyFPE_END_PROTECT(result)
21810  return PyFloat_FromDouble(result);
21811  }
21812  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21813 }
21814 #endif
21815 
21816 /* SetItemInt */
21817  static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21818  int r;
21819  if (!j) return -1;
21820  r = PyObject_SetItem(o, j, v);
21821  Py_DECREF(j);
21822  return r;
21823 }
21824 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21825  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21826 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21827  if (is_list || PyList_CheckExact(o)) {
21828  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21829  if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
21830  PyObject* old = PyList_GET_ITEM(o, n);
21831  Py_INCREF(v);
21832  PyList_SET_ITEM(o, n, v);
21833  Py_DECREF(old);
21834  return 1;
21835  }
21836  } else {
21837  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21838  if (likely(m && m->sq_ass_item)) {
21839  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21840  Py_ssize_t l = m->sq_length(o);
21841  if (likely(l >= 0)) {
21842  i += l;
21843  } else {
21844  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21845  return -1;
21846  PyErr_Clear();
21847  }
21848  }
21849  return m->sq_ass_item(o, i, v);
21850  }
21851  }
21852 #else
21853 #if CYTHON_COMPILING_IN_PYPY
21854  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
21855 #else
21856  if (is_list || PySequence_Check(o)) {
21857 #endif
21858  return PySequence_SetItem(o, i, v);
21859  }
21860 #endif
21861  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21862 }
21863 
21864 /* ArgTypeTest */
21865  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21866 {
21867  if (unlikely(!type)) {
21868  PyErr_SetString(PyExc_SystemError, "Missing type object");
21869  return 0;
21870  }
21871  else if (exact) {
21872  #if PY_MAJOR_VERSION == 2
21873  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21874  #endif
21875  }
21876  else {
21877  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21878  }
21879  PyErr_Format(PyExc_TypeError,
21880  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21881  name, type->tp_name, Py_TYPE(obj)->tp_name);
21882  return 0;
21883 }
21884 
21885 /* Import */
21886  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21887  PyObject *empty_list = 0;
21888  PyObject *module = 0;
21889  PyObject *global_dict = 0;
21890  PyObject *empty_dict = 0;
21891  PyObject *list;
21892  #if PY_MAJOR_VERSION < 3
21893  PyObject *py_import;
21894  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21895  if (!py_import)
21896  goto bad;
21897  #endif
21898  if (from_list)
21899  list = from_list;
21900  else {
21901  empty_list = PyList_New(0);
21902  if (!empty_list)
21903  goto bad;
21904  list = empty_list;
21905  }
21906  global_dict = PyModule_GetDict(__pyx_m);
21907  if (!global_dict)
21908  goto bad;
21909  empty_dict = PyDict_New();
21910  if (!empty_dict)
21911  goto bad;
21912  {
21913  #if PY_MAJOR_VERSION >= 3
21914  if (level == -1) {
21915  if (strchr(__Pyx_MODULE_NAME, '.')) {
21916  module = PyImport_ImportModuleLevelObject(
21917  name, global_dict, empty_dict, list, 1);
21918  if (!module) {
21919  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21920  goto bad;
21921  PyErr_Clear();
21922  }
21923  }
21924  level = 0;
21925  }
21926  #endif
21927  if (!module) {
21928  #if PY_MAJOR_VERSION < 3
21929  PyObject *py_level = PyInt_FromLong(level);
21930  if (!py_level)
21931  goto bad;
21932  module = PyObject_CallFunctionObjArgs(py_import,
21933  name, global_dict, empty_dict, list, py_level, NULL);
21934  Py_DECREF(py_level);
21935  #else
21936  module = PyImport_ImportModuleLevelObject(
21937  name, global_dict, empty_dict, list, level);
21938  #endif
21939  }
21940  }
21941 bad:
21942  #if PY_MAJOR_VERSION < 3
21943  Py_XDECREF(py_import);
21944  #endif
21945  Py_XDECREF(empty_list);
21946  Py_XDECREF(empty_dict);
21947  return module;
21948 }
21949 
21950 /* SetVTable */
21951  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21952 #if PY_VERSION_HEX >= 0x02070000
21953  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21954 #else
21955  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21956 #endif
21957  if (!ob)
21958  goto bad;
21959  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21960  goto bad;
21961  Py_DECREF(ob);
21962  return 0;
21963 bad:
21964  Py_XDECREF(ob);
21965  return -1;
21966 }
21967 
21968 /* SetupReduce */
21969  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21970  int ret;
21971  PyObject *name_attr;
21972  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21973  if (likely(name_attr)) {
21974  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21975  } else {
21976  ret = -1;
21977  }
21978  if (unlikely(ret < 0)) {
21979  PyErr_Clear();
21980  ret = 0;
21981  }
21982  Py_XDECREF(name_attr);
21983  return ret;
21984 }
21985 static int __Pyx_setup_reduce(PyObject* type_obj) {
21986  int ret = 0;
21987  PyObject *object_reduce = NULL;
21988  PyObject *object_reduce_ex = NULL;
21989  PyObject *reduce = NULL;
21990  PyObject *reduce_ex = NULL;
21991  PyObject *reduce_cython = NULL;
21992  PyObject *setstate = NULL;
21993  PyObject *setstate_cython = NULL;
21994 #if CYTHON_USE_PYTYPE_LOOKUP
21995  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21996 #else
21997  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21998 #endif
21999 #if CYTHON_USE_PYTYPE_LOOKUP
22000  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22001 #else
22002  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22003 #endif
22004  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
22005  if (reduce_ex == object_reduce_ex) {
22006 #if CYTHON_USE_PYTYPE_LOOKUP
22007  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22008 #else
22009  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22010 #endif
22011  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
22012  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22013  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
22014  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
22015  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
22016  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22017  if (!setstate) PyErr_Clear();
22018  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22019  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
22020  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
22021  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
22022  }
22023  PyType_Modified((PyTypeObject*)type_obj);
22024  }
22025  }
22026  goto GOOD;
22027 BAD:
22028  if (!PyErr_Occurred())
22029  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22030  ret = -1;
22031 GOOD:
22032 #if !CYTHON_USE_PYTYPE_LOOKUP
22033  Py_XDECREF(object_reduce);
22034  Py_XDECREF(object_reduce_ex);
22035 #endif
22036  Py_XDECREF(reduce);
22037  Py_XDECREF(reduce_ex);
22038  Py_XDECREF(reduce_cython);
22039  Py_XDECREF(setstate);
22040  Py_XDECREF(setstate_cython);
22041  return ret;
22042 }
22043 
22044 /* PyFloatBinop */
22045  #if !CYTHON_COMPILING_IN_PYPY
22046 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
22047  const double b = floatval;
22048  double a, result;
22049  if (likely(PyFloat_CheckExact(op1))) {
22050  a = PyFloat_AS_DOUBLE(op1);
22051  } else
22052  #if PY_MAJOR_VERSION < 3
22053  if (likely(PyInt_CheckExact(op1))) {
22054  a = (double) PyInt_AS_LONG(op1);
22055  } else
22056  #endif
22057  if (likely(PyLong_CheckExact(op1))) {
22058  #if CYTHON_USE_PYLONG_INTERNALS
22059  const digit* digits = ((PyLongObject*)op1)->ob_digit;
22060  const Py_ssize_t size = Py_SIZE(op1);
22061  switch (size) {
22062  case 0: a = 0.0; break;
22063  case -1: a = -(double) digits[0]; break;
22064  case 1: a = (double) digits[0]; break;
22065  case -2:
22066  case 2:
22067  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
22068  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22069  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22070  if (size == -2)
22071  a = -a;
22072  break;
22073  }
22074  }
22075  case -3:
22076  case 3:
22077  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
22078  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22079  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22080  if (size == -3)
22081  a = -a;
22082  break;
22083  }
22084  }
22085  case -4:
22086  case 4:
22087  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
22088  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22089  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22090  if (size == -4)
22091  a = -a;
22092  break;
22093  }
22094  }
22095  default:
22096  #else
22097  {
22098  #endif
22099  a = PyLong_AsDouble(op1);
22100  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
22101  }
22102  } else {
22103  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
22104  }
22105  PyFPE_START_PROTECT("divide", return NULL)
22106  result = a / b;
22107  PyFPE_END_PROTECT(result)
22108  return PyFloat_FromDouble(result);
22109 }
22110 #endif
22111 
22112 /* BytesEquals */
22113  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22114 #if CYTHON_COMPILING_IN_PYPY
22115  return PyObject_RichCompareBool(s1, s2, equals);
22116 #else
22117  if (s1 == s2) {
22118  return (equals == Py_EQ);
22119  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22120  const char *ps1, *ps2;
22121  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22122  if (length != PyBytes_GET_SIZE(s2))
22123  return (equals == Py_NE);
22124  ps1 = PyBytes_AS_STRING(s1);
22125  ps2 = PyBytes_AS_STRING(s2);
22126  if (ps1[0] != ps2[0]) {
22127  return (equals == Py_NE);
22128  } else if (length == 1) {
22129  return (equals == Py_EQ);
22130  } else {
22131  int result;
22132 #if CYTHON_USE_UNICODE_INTERNALS
22133  Py_hash_t hash1, hash2;
22134  hash1 = ((PyBytesObject*)s1)->ob_shash;
22135  hash2 = ((PyBytesObject*)s2)->ob_shash;
22136  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22137  return (equals == Py_NE);
22138  }
22139 #endif
22140  result = memcmp(ps1, ps2, (size_t)length);
22141  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22142  }
22143  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22144  return (equals == Py_NE);
22145  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22146  return (equals == Py_NE);
22147  } else {
22148  int result;
22149  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22150  if (!py_result)
22151  return -1;
22152  result = __Pyx_PyObject_IsTrue(py_result);
22153  Py_DECREF(py_result);
22154  return result;
22155  }
22156 #endif
22157 }
22158 
22159 /* UnicodeEquals */
22160  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22161 #if CYTHON_COMPILING_IN_PYPY
22162  return PyObject_RichCompareBool(s1, s2, equals);
22163 #else
22164 #if PY_MAJOR_VERSION < 3
22165  PyObject* owned_ref = NULL;
22166 #endif
22167  int s1_is_unicode, s2_is_unicode;
22168  if (s1 == s2) {
22169  goto return_eq;
22170  }
22171  s1_is_unicode = PyUnicode_CheckExact(s1);
22172  s2_is_unicode = PyUnicode_CheckExact(s2);
22173 #if PY_MAJOR_VERSION < 3
22174  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22175  owned_ref = PyUnicode_FromObject(s2);
22176  if (unlikely(!owned_ref))
22177  return -1;
22178  s2 = owned_ref;
22179  s2_is_unicode = 1;
22180  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22181  owned_ref = PyUnicode_FromObject(s1);
22182  if (unlikely(!owned_ref))
22183  return -1;
22184  s1 = owned_ref;
22185  s1_is_unicode = 1;
22186  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22187  return __Pyx_PyBytes_Equals(s1, s2, equals);
22188  }
22189 #endif
22190  if (s1_is_unicode & s2_is_unicode) {
22191  Py_ssize_t length;
22192  int kind;
22193  void *data1, *data2;
22194  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22195  return -1;
22196  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22197  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22198  goto return_ne;
22199  }
22200 #if CYTHON_USE_UNICODE_INTERNALS
22201  {
22202  Py_hash_t hash1, hash2;
22203  #if CYTHON_PEP393_ENABLED
22204  hash1 = ((PyASCIIObject*)s1)->hash;
22205  hash2 = ((PyASCIIObject*)s2)->hash;
22206  #else
22207  hash1 = ((PyUnicodeObject*)s1)->hash;
22208  hash2 = ((PyUnicodeObject*)s2)->hash;
22209  #endif
22210  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22211  goto return_ne;
22212  }
22213  }
22214 #endif
22215  kind = __Pyx_PyUnicode_KIND(s1);
22216  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22217  goto return_ne;
22218  }
22219  data1 = __Pyx_PyUnicode_DATA(s1);
22220  data2 = __Pyx_PyUnicode_DATA(s2);
22221  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22222  goto return_ne;
22223  } else if (length == 1) {
22224  goto return_eq;
22225  } else {
22226  int result = memcmp(data1, data2, (size_t)(length * kind));
22227  #if PY_MAJOR_VERSION < 3
22228  Py_XDECREF(owned_ref);
22229  #endif
22230  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22231  }
22232  } else if ((s1 == Py_None) & s2_is_unicode) {
22233  goto return_ne;
22234  } else if ((s2 == Py_None) & s1_is_unicode) {
22235  goto return_ne;
22236  } else {
22237  int result;
22238  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22239  if (!py_result)
22240  return -1;
22241  result = __Pyx_PyObject_IsTrue(py_result);
22242  Py_DECREF(py_result);
22243  return result;
22244  }
22245 return_eq:
22246  #if PY_MAJOR_VERSION < 3
22247  Py_XDECREF(owned_ref);
22248  #endif
22249  return (equals == Py_EQ);
22250 return_ne:
22251  #if PY_MAJOR_VERSION < 3
22252  Py_XDECREF(owned_ref);
22253  #endif
22254  return (equals == Py_NE);
22255 #endif
22256 }
22257 
22258 /* CLineInTraceback */
22259  #ifndef CYTHON_CLINE_IN_TRACEBACK
22260 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
22261  PyObject *use_cline;
22262  PyObject *ptype, *pvalue, *ptraceback;
22263 #if CYTHON_COMPILING_IN_CPYTHON
22264  PyObject **cython_runtime_dict;
22265 #endif
22266  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22267 #if CYTHON_COMPILING_IN_CPYTHON
22268  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22269  if (likely(cython_runtime_dict)) {
22270  use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
22271  } else
22272 #endif
22273  {
22274  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22275  if (use_cline_obj) {
22276  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22277  Py_DECREF(use_cline_obj);
22278  } else {
22279  PyErr_Clear();
22280  use_cline = NULL;
22281  }
22282  }
22283  if (!use_cline) {
22284  c_line = 0;
22285  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22286  }
22287  else if (PyObject_Not(use_cline) != 0) {
22288  c_line = 0;
22289  }
22290  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22291  return c_line;
22292 }
22293 #endif
22294 
22295 /* CodeObjectCache */
22296  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22297  int start = 0, mid = 0, end = count - 1;
22298  if (end >= 0 && code_line > entries[end].code_line) {
22299  return count;
22300  }
22301  while (start < end) {
22302  mid = start + (end - start) / 2;
22303  if (code_line < entries[mid].code_line) {
22304  end = mid;
22305  } else if (code_line > entries[mid].code_line) {
22306  start = mid + 1;
22307  } else {
22308  return mid;
22309  }
22310  }
22311  if (code_line <= entries[mid].code_line) {
22312  return mid;
22313  } else {
22314  return mid + 1;
22315  }
22316 }
22317 static PyCodeObject *__pyx_find_code_object(int code_line) {
22318  PyCodeObject* code_object;
22319  int pos;
22320  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
22321  return NULL;
22322  }
22323  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22324  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
22325  return NULL;
22326  }
22327  code_object = __pyx_code_cache.entries[pos].code_object;
22328  Py_INCREF(code_object);
22329  return code_object;
22330 }
22331 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22332  int pos, i;
22333  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22334  if (unlikely(!code_line)) {
22335  return;
22336  }
22337  if (unlikely(!entries)) {
22338  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22339  if (likely(entries)) {
22340  __pyx_code_cache.entries = entries;
22341  __pyx_code_cache.max_count = 64;
22342  __pyx_code_cache.count = 1;
22343  entries[0].code_line = code_line;
22344  entries[0].code_object = code_object;
22345  Py_INCREF(code_object);
22346  }
22347  return;
22348  }
22349  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22350  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
22351  PyCodeObject* tmp = entries[pos].code_object;
22352  entries[pos].code_object = code_object;
22353  Py_DECREF(tmp);
22354  return;
22355  }
22356  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22357  int new_max = __pyx_code_cache.max_count + 64;
22358  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22359  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22360  if (unlikely(!entries)) {
22361  return;
22362  }
22363  __pyx_code_cache.entries = entries;
22364  __pyx_code_cache.max_count = new_max;
22365  }
22366  for (i=__pyx_code_cache.count; i>pos; i--) {
22367  entries[i] = entries[i-1];
22368  }
22369  entries[pos].code_line = code_line;
22370  entries[pos].code_object = code_object;
22371  __pyx_code_cache.count++;
22372  Py_INCREF(code_object);
22373 }
22374 
22375 /* AddTraceback */
22376  #include "compile.h"
22377 #include "frameobject.h"
22378 #include "traceback.h"
22379 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22380  const char *funcname, int c_line,
22381  int py_line, const char *filename) {
22382  PyCodeObject *py_code = 0;
22383  PyObject *py_srcfile = 0;
22384  PyObject *py_funcname = 0;
22385  #if PY_MAJOR_VERSION < 3
22386  py_srcfile = PyString_FromString(filename);
22387  #else
22388  py_srcfile = PyUnicode_FromString(filename);
22389  #endif
22390  if (!py_srcfile) goto bad;
22391  if (c_line) {
22392  #if PY_MAJOR_VERSION < 3
22393  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22394  #else
22395  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22396  #endif
22397  }
22398  else {
22399  #if PY_MAJOR_VERSION < 3
22400  py_funcname = PyString_FromString(funcname);
22401  #else
22402  py_funcname = PyUnicode_FromString(funcname);
22403  #endif
22404  }
22405  if (!py_funcname) goto bad;
22406  py_code = __Pyx_PyCode_New(
22407  0,
22408  0,
22409  0,
22410  0,
22411  0,
22412  __pyx_empty_bytes, /*PyObject *code,*/
22413  __pyx_empty_tuple, /*PyObject *consts,*/
22414  __pyx_empty_tuple, /*PyObject *names,*/
22415  __pyx_empty_tuple, /*PyObject *varnames,*/
22416  __pyx_empty_tuple, /*PyObject *freevars,*/
22417  __pyx_empty_tuple, /*PyObject *cellvars,*/
22418  py_srcfile, /*PyObject *filename,*/
22419  py_funcname, /*PyObject *name,*/
22420  py_line,
22421  __pyx_empty_bytes /*PyObject *lnotab*/
22422  );
22423  Py_DECREF(py_srcfile);
22424  Py_DECREF(py_funcname);
22425  return py_code;
22426 bad:
22427  Py_XDECREF(py_srcfile);
22428  Py_XDECREF(py_funcname);
22429  return NULL;
22430 }
22431 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22432  int py_line, const char *filename) {
22433  PyCodeObject *py_code = 0;
22434  PyFrameObject *py_frame = 0;
22435  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22436  if (c_line) {
22437  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22438  }
22439  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22440  if (!py_code) {
22441  py_code = __Pyx_CreateCodeObjectForTraceback(
22442  funcname, c_line, py_line, filename);
22443  if (!py_code) goto bad;
22444  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22445  }
22446  py_frame = PyFrame_New(
22447  tstate, /*PyThreadState *tstate,*/
22448  py_code, /*PyCodeObject *code,*/
22449  __pyx_d, /*PyObject *globals,*/
22450  0 /*PyObject *locals*/
22451  );
22452  if (!py_frame) goto bad;
22453  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22454  PyTraceBack_Here(py_frame);
22455 bad:
22456  Py_XDECREF(py_code);
22457  Py_XDECREF(py_frame);
22458 }
22459 
22460 /* CIntFromPyVerify */
22461  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22462  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22463 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22464  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22465 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22466  {\
22467  func_type value = func_value;\
22468  if (sizeof(target_type) < sizeof(func_type)) {\
22469  if (unlikely(value != (func_type) (target_type) value)) {\
22470  func_type zero = 0;\
22471  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22472  return (target_type) -1;\
22473  if (is_unsigned && unlikely(value < zero))\
22474  goto raise_neg_overflow;\
22475  else\
22476  goto raise_overflow;\
22477  }\
22478  }\
22479  return (target_type) value;\
22480  }
22481 
22482 /* CIntToPy */
22483  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22484  const int neg_one = (int) -1, const_zero = (int) 0;
22485  const int is_unsigned = neg_one > const_zero;
22486  if (is_unsigned) {
22487  if (sizeof(int) < sizeof(long)) {
22488  return PyInt_FromLong((long) value);
22489  } else if (sizeof(int) <= sizeof(unsigned long)) {
22490  return PyLong_FromUnsignedLong((unsigned long) value);
22491 #ifdef HAVE_LONG_LONG
22492  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22493  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22494 #endif
22495  }
22496  } else {
22497  if (sizeof(int) <= sizeof(long)) {
22498  return PyInt_FromLong((long) value);
22499 #ifdef HAVE_LONG_LONG
22500  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22501  return PyLong_FromLongLong((PY_LONG_LONG) value);
22502 #endif
22503  }
22504  }
22505  {
22506  int one = 1; int little = (int)*(unsigned char *)&one;
22507  unsigned char *bytes = (unsigned char *)&value;
22508  return _PyLong_FromByteArray(bytes, sizeof(int),
22509  little, !is_unsigned);
22510  }
22511 }
22512 
22513 /* CIntFromPy */
22514  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22515  const int neg_one = (int) -1, const_zero = (int) 0;
22516  const int is_unsigned = neg_one > const_zero;
22517 #if PY_MAJOR_VERSION < 3
22518  if (likely(PyInt_Check(x))) {
22519  if (sizeof(int) < sizeof(long)) {
22520  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22521  } else {
22522  long val = PyInt_AS_LONG(x);
22523  if (is_unsigned && unlikely(val < 0)) {
22524  goto raise_neg_overflow;
22525  }
22526  return (int) val;
22527  }
22528  } else
22529 #endif
22530  if (likely(PyLong_Check(x))) {
22531  if (is_unsigned) {
22532 #if CYTHON_USE_PYLONG_INTERNALS
22533  const digit* digits = ((PyLongObject*)x)->ob_digit;
22534  switch (Py_SIZE(x)) {
22535  case 0: return (int) 0;
22536  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22537  case 2:
22538  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22539  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22540  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22541  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22542  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22543  }
22544  }
22545  break;
22546  case 3:
22547  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22548  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22549  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22550  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22551  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22552  }
22553  }
22554  break;
22555  case 4:
22556  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22557  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22558  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22559  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22560  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22561  }
22562  }
22563  break;
22564  }
22565 #endif
22566 #if CYTHON_COMPILING_IN_CPYTHON
22567  if (unlikely(Py_SIZE(x) < 0)) {
22568  goto raise_neg_overflow;
22569  }
22570 #else
22571  {
22572  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22573  if (unlikely(result < 0))
22574  return (int) -1;
22575  if (unlikely(result == 1))
22576  goto raise_neg_overflow;
22577  }
22578 #endif
22579  if (sizeof(int) <= sizeof(unsigned long)) {
22580  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22581 #ifdef HAVE_LONG_LONG
22582  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22583  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22584 #endif
22585  }
22586  } else {
22587 #if CYTHON_USE_PYLONG_INTERNALS
22588  const digit* digits = ((PyLongObject*)x)->ob_digit;
22589  switch (Py_SIZE(x)) {
22590  case 0: return (int) 0;
22591  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22592  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22593  case -2:
22594  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22595  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22596  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22597  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22598  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22599  }
22600  }
22601  break;
22602  case 2:
22603  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22604  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22605  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22606  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22607  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22608  }
22609  }
22610  break;
22611  case -3:
22612  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22613  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22614  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22615  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22616  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22617  }
22618  }
22619  break;
22620  case 3:
22621  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22622  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22623  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22624  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22625  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22626  }
22627  }
22628  break;
22629  case -4:
22630  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22631  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22632  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22633  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22634  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22635  }
22636  }
22637  break;
22638  case 4:
22639  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22640  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22641  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22642  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22643  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22644  }
22645  }
22646  break;
22647  }
22648 #endif
22649  if (sizeof(int) <= sizeof(long)) {
22650  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22651 #ifdef HAVE_LONG_LONG
22652  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22653  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22654 #endif
22655  }
22656  }
22657  {
22658 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22659  PyErr_SetString(PyExc_RuntimeError,
22660  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22661 #else
22662  int val;
22663  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22664  #if PY_MAJOR_VERSION < 3
22665  if (likely(v) && !PyLong_Check(v)) {
22666  PyObject *tmp = v;
22667  v = PyNumber_Long(tmp);
22668  Py_DECREF(tmp);
22669  }
22670  #endif
22671  if (likely(v)) {
22672  int one = 1; int is_little = (int)*(unsigned char *)&one;
22673  unsigned char *bytes = (unsigned char *)&val;
22674  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22675  bytes, sizeof(val),
22676  is_little, !is_unsigned);
22677  Py_DECREF(v);
22678  if (likely(!ret))
22679  return val;
22680  }
22681 #endif
22682  return (int) -1;
22683  }
22684  } else {
22685  int val;
22686  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22687  if (!tmp) return (int) -1;
22688  val = __Pyx_PyInt_As_int(tmp);
22689  Py_DECREF(tmp);
22690  return val;
22691  }
22692 raise_overflow:
22693  PyErr_SetString(PyExc_OverflowError,
22694  "value too large to convert to int");
22695  return (int) -1;
22696 raise_neg_overflow:
22697  PyErr_SetString(PyExc_OverflowError,
22698  "can't convert negative value to int");
22699  return (int) -1;
22700 }
22701 
22702 /* CIntToPy */
22703  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22704  const long neg_one = (long) -1, const_zero = (long) 0;
22705  const int is_unsigned = neg_one > const_zero;
22706  if (is_unsigned) {
22707  if (sizeof(long) < sizeof(long)) {
22708  return PyInt_FromLong((long) value);
22709  } else if (sizeof(long) <= sizeof(unsigned long)) {
22710  return PyLong_FromUnsignedLong((unsigned long) value);
22711 #ifdef HAVE_LONG_LONG
22712  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22713  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22714 #endif
22715  }
22716  } else {
22717  if (sizeof(long) <= sizeof(long)) {
22718  return PyInt_FromLong((long) value);
22719 #ifdef HAVE_LONG_LONG
22720  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22721  return PyLong_FromLongLong((PY_LONG_LONG) value);
22722 #endif
22723  }
22724  }
22725  {
22726  int one = 1; int little = (int)*(unsigned char *)&one;
22727  unsigned char *bytes = (unsigned char *)&value;
22728  return _PyLong_FromByteArray(bytes, sizeof(long),
22729  little, !is_unsigned);
22730  }
22731 }
22732 
22733 /* CIntFromPy */
22734  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22735  const long neg_one = (long) -1, const_zero = (long) 0;
22736  const int is_unsigned = neg_one > const_zero;
22737 #if PY_MAJOR_VERSION < 3
22738  if (likely(PyInt_Check(x))) {
22739  if (sizeof(long) < sizeof(long)) {
22740  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22741  } else {
22742  long val = PyInt_AS_LONG(x);
22743  if (is_unsigned && unlikely(val < 0)) {
22744  goto raise_neg_overflow;
22745  }
22746  return (long) val;
22747  }
22748  } else
22749 #endif
22750  if (likely(PyLong_Check(x))) {
22751  if (is_unsigned) {
22752 #if CYTHON_USE_PYLONG_INTERNALS
22753  const digit* digits = ((PyLongObject*)x)->ob_digit;
22754  switch (Py_SIZE(x)) {
22755  case 0: return (long) 0;
22756  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22757  case 2:
22758  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22759  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22760  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22761  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22762  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22763  }
22764  }
22765  break;
22766  case 3:
22767  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22768  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22769  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22770  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22771  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22772  }
22773  }
22774  break;
22775  case 4:
22776  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22777  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22778  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22779  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22780  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22781  }
22782  }
22783  break;
22784  }
22785 #endif
22786 #if CYTHON_COMPILING_IN_CPYTHON
22787  if (unlikely(Py_SIZE(x) < 0)) {
22788  goto raise_neg_overflow;
22789  }
22790 #else
22791  {
22792  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22793  if (unlikely(result < 0))
22794  return (long) -1;
22795  if (unlikely(result == 1))
22796  goto raise_neg_overflow;
22797  }
22798 #endif
22799  if (sizeof(long) <= sizeof(unsigned long)) {
22800  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22801 #ifdef HAVE_LONG_LONG
22802  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22803  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22804 #endif
22805  }
22806  } else {
22807 #if CYTHON_USE_PYLONG_INTERNALS
22808  const digit* digits = ((PyLongObject*)x)->ob_digit;
22809  switch (Py_SIZE(x)) {
22810  case 0: return (long) 0;
22811  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22812  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22813  case -2:
22814  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22815  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22816  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22817  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22818  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22819  }
22820  }
22821  break;
22822  case 2:
22823  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22824  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22825  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22826  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22827  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22828  }
22829  }
22830  break;
22831  case -3:
22832  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22833  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22834  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22835  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22836  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22837  }
22838  }
22839  break;
22840  case 3:
22841  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22842  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22843  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22844  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22845  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22846  }
22847  }
22848  break;
22849  case -4:
22850  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22851  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22852  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22853  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22854  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22855  }
22856  }
22857  break;
22858  case 4:
22859  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22860  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22861  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22862  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22863  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22864  }
22865  }
22866  break;
22867  }
22868 #endif
22869  if (sizeof(long) <= sizeof(long)) {
22870  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22871 #ifdef HAVE_LONG_LONG
22872  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22873  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22874 #endif
22875  }
22876  }
22877  {
22878 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22879  PyErr_SetString(PyExc_RuntimeError,
22880  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22881 #else
22882  long val;
22883  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22884  #if PY_MAJOR_VERSION < 3
22885  if (likely(v) && !PyLong_Check(v)) {
22886  PyObject *tmp = v;
22887  v = PyNumber_Long(tmp);
22888  Py_DECREF(tmp);
22889  }
22890  #endif
22891  if (likely(v)) {
22892  int one = 1; int is_little = (int)*(unsigned char *)&one;
22893  unsigned char *bytes = (unsigned char *)&val;
22894  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22895  bytes, sizeof(val),
22896  is_little, !is_unsigned);
22897  Py_DECREF(v);
22898  if (likely(!ret))
22899  return val;
22900  }
22901 #endif
22902  return (long) -1;
22903  }
22904  } else {
22905  long val;
22906  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22907  if (!tmp) return (long) -1;
22908  val = __Pyx_PyInt_As_long(tmp);
22909  Py_DECREF(tmp);
22910  return val;
22911  }
22912 raise_overflow:
22913  PyErr_SetString(PyExc_OverflowError,
22914  "value too large to convert to long");
22915  return (long) -1;
22916 raise_neg_overflow:
22917  PyErr_SetString(PyExc_OverflowError,
22918  "can't convert negative value to long");
22919  return (long) -1;
22920 }
22921 
22922 /* FastTypeChecks */
22923  #if CYTHON_COMPILING_IN_CPYTHON
22924 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22925  while (a) {
22926  a = a->tp_base;
22927  if (a == b)
22928  return 1;
22929  }
22930  return b == &PyBaseObject_Type;
22931 }
22932 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22933  PyObject *mro;
22934  if (a == b) return 1;
22935  mro = a->tp_mro;
22936  if (likely(mro)) {
22937  Py_ssize_t i, n;
22938  n = PyTuple_GET_SIZE(mro);
22939  for (i = 0; i < n; i++) {
22940  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22941  return 1;
22942  }
22943  return 0;
22944  }
22945  return __Pyx_InBases(a, b);
22946 }
22947 #if PY_MAJOR_VERSION == 2
22948 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22949  PyObject *exception, *value, *tb;
22950  int res;
22951  __Pyx_PyThreadState_declare
22952  __Pyx_PyThreadState_assign
22953  __Pyx_ErrFetch(&exception, &value, &tb);
22954  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22955  if (unlikely(res == -1)) {
22956  PyErr_WriteUnraisable(err);
22957  res = 0;
22958  }
22959  if (!res) {
22960  res = PyObject_IsSubclass(err, exc_type2);
22961  if (unlikely(res == -1)) {
22962  PyErr_WriteUnraisable(err);
22963  res = 0;
22964  }
22965  }
22966  __Pyx_ErrRestore(exception, value, tb);
22967  return res;
22968 }
22969 #else
22970 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22971  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22972  if (!res) {
22973  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22974  }
22975  return res;
22976 }
22977 #endif
22978 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22979  if (likely(err == exc_type)) return 1;
22980  if (likely(PyExceptionClass_Check(err))) {
22981  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22982  }
22983  return PyErr_GivenExceptionMatches(err, exc_type);
22984 }
22985 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22986  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22987  if (likely(PyExceptionClass_Check(err))) {
22988  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22989  }
22990  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22991 }
22992 #endif
22993 
22994 /* FetchCommonType */
22995  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22996  PyObject* fake_module;
22997  PyTypeObject* cached_type = NULL;
22998  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22999  if (!fake_module) return NULL;
23000  Py_INCREF(fake_module);
23001  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
23002  if (cached_type) {
23003  if (!PyType_Check((PyObject*)cached_type)) {
23004  PyErr_Format(PyExc_TypeError,
23005  "Shared Cython type %.200s is not a type object",
23006  type->tp_name);
23007  goto bad;
23008  }
23009  if (cached_type->tp_basicsize != type->tp_basicsize) {
23010  PyErr_Format(PyExc_TypeError,
23011  "Shared Cython type %.200s has the wrong size, try recompiling",
23012  type->tp_name);
23013  goto bad;
23014  }
23015  } else {
23016  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
23017  PyErr_Clear();
23018  if (PyType_Ready(type) < 0) goto bad;
23019  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
23020  goto bad;
23021  Py_INCREF(type);
23022  cached_type = type;
23023  }
23024 done:
23025  Py_DECREF(fake_module);
23026  return cached_type;
23027 bad:
23028  Py_XDECREF(cached_type);
23029  cached_type = NULL;
23030  goto done;
23031 }
23032 
23033 /* SwapException */
23034  #if CYTHON_FAST_THREAD_STATE
23035 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23036  PyObject *tmp_type, *tmp_value, *tmp_tb;
23037  #if PY_VERSION_HEX >= 0x030700A2
23038  tmp_type = tstate->exc_state.exc_type;
23039  tmp_value = tstate->exc_state.exc_value;
23040  tmp_tb = tstate->exc_state.exc_traceback;
23041  tstate->exc_state.exc_type = *type;
23042  tstate->exc_state.exc_value = *value;
23043  tstate->exc_state.exc_traceback = *tb;
23044  #else
23045  tmp_type = tstate->exc_type;
23046  tmp_value = tstate->exc_value;
23047  tmp_tb = tstate->exc_traceback;
23048  tstate->exc_type = *type;
23049  tstate->exc_value = *value;
23050  tstate->exc_traceback = *tb;
23051  #endif
23052  *type = tmp_type;
23053  *value = tmp_value;
23054  *tb = tmp_tb;
23055 }
23056 #else
23057 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
23058  PyObject *tmp_type, *tmp_value, *tmp_tb;
23059  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
23060  PyErr_SetExcInfo(*type, *value, *tb);
23061  *type = tmp_type;
23062  *value = tmp_value;
23063  *tb = tmp_tb;
23064 }
23065 #endif
23066 
23067 /* PyObjectCallMethod1 */
23068  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23069  PyObject *result = NULL;
23070 #if CYTHON_UNPACK_METHODS
23071  if (likely(PyMethod_Check(method))) {
23072  PyObject *self = PyMethod_GET_SELF(method);
23073  if (likely(self)) {
23074  PyObject *args;
23075  PyObject *function = PyMethod_GET_FUNCTION(method);
23076  #if CYTHON_FAST_PYCALL
23077  if (PyFunction_Check(function)) {
23078  PyObject *args[2] = {self, arg};
23079  result = __Pyx_PyFunction_FastCall(function, args, 2);
23080  goto done;
23081  }
23082  #endif
23083  #if CYTHON_FAST_PYCCALL
23084  if (__Pyx_PyFastCFunction_Check(function)) {
23085  PyObject *args[2] = {self, arg};
23086  result = __Pyx_PyCFunction_FastCall(function, args, 2);
23087  goto done;
23088  }
23089  #endif
23090  args = PyTuple_New(2);
23091  if (unlikely(!args)) goto done;
23092  Py_INCREF(self);
23093  PyTuple_SET_ITEM(args, 0, self);
23094  Py_INCREF(arg);
23095  PyTuple_SET_ITEM(args, 1, arg);
23096  Py_INCREF(function);
23097  result = __Pyx_PyObject_Call(function, args, NULL);
23098  Py_DECREF(args);
23099  Py_DECREF(function);
23100  return result;
23101  }
23102  }
23103 #endif
23104  result = __Pyx_PyObject_CallOneArg(method, arg);
23105  goto done;
23106 done:
23107  return result;
23108 }
23109 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23110  PyObject *method, *result = NULL;
23111  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
23112  if (unlikely(!method)) goto done;
23113  result = __Pyx__PyObject_CallMethod1(method, arg);
23114 done:
23115  Py_XDECREF(method);
23116  return result;
23117 }
23118 
23119 /* CoroutineBase */
23120  #include <structmember.h>
23121 #include <frameobject.h>
23122 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23123 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23124  PyObject *et, *ev, *tb;
23125  PyObject *value = NULL;
23126  __Pyx_ErrFetch(&et, &ev, &tb);
23127  if (!et) {
23128  Py_XDECREF(tb);
23129  Py_XDECREF(ev);
23130  Py_INCREF(Py_None);
23131  *pvalue = Py_None;
23132  return 0;
23133  }
23134  if (likely(et == PyExc_StopIteration)) {
23135  if (!ev) {
23136  Py_INCREF(Py_None);
23137  value = Py_None;
23138  }
23139 #if PY_VERSION_HEX >= 0x030300A0
23140  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23141  value = ((PyStopIterationObject *)ev)->value;
23142  Py_INCREF(value);
23143  Py_DECREF(ev);
23144  }
23145 #endif
23146  else if (unlikely(PyTuple_Check(ev))) {
23147  if (PyTuple_GET_SIZE(ev) >= 1) {
23148 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23149  value = PyTuple_GET_ITEM(ev, 0);
23150  Py_INCREF(value);
23151 #else
23152  value = PySequence_ITEM(ev, 0);
23153 #endif
23154  } else {
23155  Py_INCREF(Py_None);
23156  value = Py_None;
23157  }
23158  Py_DECREF(ev);
23159  }
23160  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23161  value = ev;
23162  }
23163  if (likely(value)) {
23164  Py_XDECREF(tb);
23165  Py_DECREF(et);
23166  *pvalue = value;
23167  return 0;
23168  }
23169  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23170  __Pyx_ErrRestore(et, ev, tb);
23171  return -1;
23172  }
23173  PyErr_NormalizeException(&et, &ev, &tb);
23174  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23175  __Pyx_ErrRestore(et, ev, tb);
23176  return -1;
23177  }
23178  Py_XDECREF(tb);
23179  Py_DECREF(et);
23180 #if PY_VERSION_HEX >= 0x030300A0
23181  value = ((PyStopIterationObject *)ev)->value;
23182  Py_INCREF(value);
23183  Py_DECREF(ev);
23184 #else
23185  {
23186  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23187  Py_DECREF(ev);
23188  if (likely(args)) {
23189  value = PySequence_GetItem(args, 0);
23190  Py_DECREF(args);
23191  }
23192  if (unlikely(!value)) {
23193  __Pyx_ErrRestore(NULL, NULL, NULL);
23194  Py_INCREF(Py_None);
23195  value = Py_None;
23196  }
23197  }
23198 #endif
23199  *pvalue = value;
23200  return 0;
23201 }
23202 static CYTHON_INLINE
23203 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
23204  PyObject *exc_type = self->exc_type;
23205  PyObject *exc_value = self->exc_value;
23206  PyObject *exc_traceback = self->exc_traceback;
23207  self->exc_type = NULL;
23208  self->exc_value = NULL;
23209  self->exc_traceback = NULL;
23210  Py_XDECREF(exc_type);
23211  Py_XDECREF(exc_value);
23212  Py_XDECREF(exc_traceback);
23213 }
23214 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23215 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23216  const char *msg;
23217  if (0) {
23218  #ifdef __Pyx_Coroutine_USED
23219  } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
23220  msg = "coroutine already executing";
23221  #endif
23222  #ifdef __Pyx_AsyncGen_USED
23223  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
23224  msg = "async generator already executing";
23225  #endif
23226  } else {
23227  msg = "generator already executing";
23228  }
23229  PyErr_SetString(PyExc_ValueError, msg);
23230 }
23231 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
23232 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
23233  const char *msg;
23234  if (0) {
23235  #ifdef __Pyx_Coroutine_USED
23236  } else if (__Pyx_Coroutine_CheckExact(gen)) {
23237  msg = "can't send non-None value to a just-started coroutine";
23238  #endif
23239  #ifdef __Pyx_AsyncGen_USED
23240  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
23241  msg = "can't send non-None value to a just-started async generator";
23242  #endif
23243  } else {
23244  msg = "can't send non-None value to a just-started generator";
23245  }
23246  PyErr_SetString(PyExc_TypeError, msg);
23247 }
23248 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
23249 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
23250  #ifdef __Pyx_Coroutine_USED
23251  if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
23252  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
23253  } else
23254  #endif
23255  if (value) {
23256  #ifdef __Pyx_AsyncGen_USED
23257  if (__Pyx_AsyncGen_CheckExact(gen))
23258  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
23259  else
23260  #endif
23261  PyErr_SetNone(PyExc_StopIteration);
23262  }
23263 }
23264 static
23265 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
23266  __Pyx_PyThreadState_declare
23267  PyThreadState *tstate;
23268  PyObject *retval;
23269  assert(!self->is_running);
23270  if (unlikely(self->resume_label == 0)) {
23271  if (unlikely(value && value != Py_None)) {
23272  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
23273  }
23274  }
23275  if (unlikely(self->resume_label == -1)) {
23276  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
23277  }
23278 #if CYTHON_FAST_THREAD_STATE
23279  __Pyx_PyThreadState_assign
23280  tstate = __pyx_tstate;
23281 #else
23282  tstate = __Pyx_PyThreadState_Current;
23283 #endif
23284  if (self->exc_type) {
23285 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23286 #else
23287  if (self->exc_traceback) {
23288  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23289  PyFrameObject *f = tb->tb_frame;
23290  Py_XINCREF(tstate->frame);
23291  assert(f->f_back == NULL);
23292  f->f_back = tstate->frame;
23293  }
23294 #endif
23295  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
23296  &self->exc_traceback);
23297  } else {
23298  __Pyx_Coroutine_ExceptionClear(self);
23299  __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
23300  }
23301  self->is_running = 1;
23302  retval = self->body((PyObject *) self, tstate, value);
23303  self->is_running = 0;
23304  return retval;
23305 }
23306 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
23307  if (likely(self->exc_traceback)) {
23308 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23309 #else
23310  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23311  PyFrameObject *f = tb->tb_frame;
23312  Py_CLEAR(f->f_back);
23313 #endif
23314  }
23315 }
23316 static CYTHON_INLINE
23317 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23318  if (unlikely(!retval)) {
23319  __Pyx_PyThreadState_declare
23320  __Pyx_PyThreadState_assign
23321  if (!__Pyx_PyErr_Occurred()) {
23322  PyObject *exc = PyExc_StopIteration;
23323  #ifdef __Pyx_AsyncGen_USED
23324  if (__Pyx_AsyncGen_CheckExact(gen))
23325  exc = __Pyx_PyExc_StopAsyncIteration;
23326  #endif
23327  __Pyx_PyErr_SetNone(exc);
23328  }
23329  }
23330  return retval;
23331 }
23332 static CYTHON_INLINE
23333 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23334  PyObject *ret;
23335  PyObject *val = NULL;
23336  __Pyx_Coroutine_Undelegate(gen);
23337  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23338  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23339  Py_XDECREF(val);
23340  return ret;
23341 }
23342 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23343  PyObject *retval;
23344  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23345  PyObject *yf = gen->yieldfrom;
23346  if (unlikely(gen->is_running))
23347  return __Pyx_Coroutine_AlreadyRunningError(gen);
23348  if (yf) {
23349  PyObject *ret;
23350  gen->is_running = 1;
23351  #ifdef __Pyx_Generator_USED
23352  if (__Pyx_Generator_CheckExact(yf)) {
23353  ret = __Pyx_Coroutine_Send(yf, value);
23354  } else
23355  #endif
23356  #ifdef __Pyx_Coroutine_USED
23357  if (__Pyx_Coroutine_CheckExact(yf)) {
23358  ret = __Pyx_Coroutine_Send(yf, value);
23359  } else
23360  #endif
23361  #ifdef __Pyx_AsyncGen_USED
23362  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23363  ret = __Pyx_async_gen_asend_send(yf, value);
23364  } else
23365  #endif
23366  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23367  if (PyGen_CheckExact(yf)) {
23368  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23369  } else
23370  #endif
23371  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23372  if (PyCoro_CheckExact(yf)) {
23373  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23374  } else
23375  #endif
23376  {
23377  if (value == Py_None)
23378  ret = Py_TYPE(yf)->tp_iternext(yf);
23379  else
23380  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23381  }
23382  gen->is_running = 0;
23383  if (likely(ret)) {
23384  return ret;
23385  }
23386  retval = __Pyx_Coroutine_FinishDelegation(gen);
23387  } else {
23388  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23389  }
23390  return __Pyx_Coroutine_MethodReturn(self, retval);
23391 }
23392 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23393  PyObject *retval = NULL;
23394  int err = 0;
23395  #ifdef __Pyx_Generator_USED
23396  if (__Pyx_Generator_CheckExact(yf)) {
23397  retval = __Pyx_Coroutine_Close(yf);
23398  if (!retval)
23399  return -1;
23400  } else
23401  #endif
23402  #ifdef __Pyx_Coroutine_USED
23403  if (__Pyx_Coroutine_CheckExact(yf)) {
23404  retval = __Pyx_Coroutine_Close(yf);
23405  if (!retval)
23406  return -1;
23407  } else
23408  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23409  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
23410  if (!retval)
23411  return -1;
23412  } else
23413  #endif
23414  #ifdef __Pyx_AsyncGen_USED
23415  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23416  retval = __Pyx_async_gen_asend_close(yf, NULL);
23417  } else
23418  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23419  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23420  } else
23421  #endif
23422  {
23423  PyObject *meth;
23424  gen->is_running = 1;
23425  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23426  if (unlikely(!meth)) {
23427  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23428  PyErr_WriteUnraisable(yf);
23429  }
23430  PyErr_Clear();
23431  } else {
23432  retval = PyObject_CallFunction(meth, NULL);
23433  Py_DECREF(meth);
23434  if (!retval)
23435  err = -1;
23436  }
23437  gen->is_running = 0;
23438  }
23439  Py_XDECREF(retval);
23440  return err;
23441 }
23442 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23443  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23444  PyObject *yf = gen->yieldfrom;
23445  if (unlikely(gen->is_running))
23446  return __Pyx_Coroutine_AlreadyRunningError(gen);
23447  if (yf) {
23448  PyObject *ret;
23449  gen->is_running = 1;
23450  #ifdef __Pyx_Generator_USED
23451  if (__Pyx_Generator_CheckExact(yf)) {
23452  ret = __Pyx_Generator_Next(yf);
23453  } else
23454  #endif
23455  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23456  if (PyGen_CheckExact(yf)) {
23457  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23458  } else
23459  #endif
23460  ret = Py_TYPE(yf)->tp_iternext(yf);
23461  gen->is_running = 0;
23462  if (likely(ret)) {
23463  return ret;
23464  }
23465  return __Pyx_Coroutine_FinishDelegation(gen);
23466  }
23467  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23468 }
23469 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23470  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23471  PyObject *retval, *raised_exception;
23472  PyObject *yf = gen->yieldfrom;
23473  int err = 0;
23474  if (unlikely(gen->is_running))
23475  return __Pyx_Coroutine_AlreadyRunningError(gen);
23476  if (yf) {
23477  Py_INCREF(yf);
23478  err = __Pyx_Coroutine_CloseIter(gen, yf);
23479  __Pyx_Coroutine_Undelegate(gen);
23480  Py_DECREF(yf);
23481  }
23482  if (err == 0)
23483  PyErr_SetNone(PyExc_GeneratorExit);
23484  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23485  if (unlikely(retval)) {
23486  const char *msg;
23487  Py_DECREF(retval);
23488  if ((0)) {
23489  #ifdef __Pyx_Coroutine_USED
23490  } else if (__Pyx_Coroutine_CheckExact(self)) {
23491  msg = "coroutine ignored GeneratorExit";
23492  #endif
23493  #ifdef __Pyx_AsyncGen_USED
23494  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23495 #if PY_VERSION_HEX < 0x03060000
23496  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23497 #else
23498  msg = "async generator ignored GeneratorExit";
23499 #endif
23500  #endif
23501  } else {
23502  msg = "generator ignored GeneratorExit";
23503  }
23504  PyErr_SetString(PyExc_RuntimeError, msg);
23505  return NULL;
23506  }
23507  raised_exception = PyErr_Occurred();
23508  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23509  if (raised_exception) PyErr_Clear();
23510  Py_INCREF(Py_None);
23511  return Py_None;
23512  }
23513  return NULL;
23514 }
23515 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23516  PyObject *args, int close_on_genexit) {
23517  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23518  PyObject *yf = gen->yieldfrom;
23519  if (unlikely(gen->is_running))
23520  return __Pyx_Coroutine_AlreadyRunningError(gen);
23521  if (yf) {
23522  PyObject *ret;
23523  Py_INCREF(yf);
23524  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23525  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23526  Py_DECREF(yf);
23527  __Pyx_Coroutine_Undelegate(gen);
23528  if (err < 0)
23529  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23530  goto throw_here;
23531  }
23532  gen->is_running = 1;
23533  if (0
23534  #ifdef __Pyx_Generator_USED
23535  || __Pyx_Generator_CheckExact(yf)
23536  #endif
23537  #ifdef __Pyx_Coroutine_USED
23538  || __Pyx_Coroutine_CheckExact(yf)
23539  #endif
23540  ) {
23541  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23542  #ifdef __Pyx_Coroutine_USED
23543  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23544  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23545  #endif
23546  } else {
23547  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23548  if (unlikely(!meth)) {
23549  Py_DECREF(yf);
23550  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23551  gen->is_running = 0;
23552  return NULL;
23553  }
23554  PyErr_Clear();
23555  __Pyx_Coroutine_Undelegate(gen);
23556  gen->is_running = 0;
23557  goto throw_here;
23558  }
23559  if (likely(args)) {
23560  ret = PyObject_CallObject(meth, args);
23561  } else {
23562  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23563  }
23564  Py_DECREF(meth);
23565  }
23566  gen->is_running = 0;
23567  Py_DECREF(yf);
23568  if (!ret) {
23569  ret = __Pyx_Coroutine_FinishDelegation(gen);
23570  }
23571  return __Pyx_Coroutine_MethodReturn(self, ret);
23572  }
23573 throw_here:
23574  __Pyx_Raise(typ, val, tb, NULL);
23575  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23576 }
23577 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23578  PyObject *typ;
23579  PyObject *val = NULL;
23580  PyObject *tb = NULL;
23581  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23582  return NULL;
23583  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23584 }
23585 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23586  Py_VISIT(gen->closure);
23587  Py_VISIT(gen->classobj);
23588  Py_VISIT(gen->yieldfrom);
23589  Py_VISIT(gen->exc_type);
23590  Py_VISIT(gen->exc_value);
23591  Py_VISIT(gen->exc_traceback);
23592  return 0;
23593 }
23594 static int __Pyx_Coroutine_clear(PyObject *self) {
23595  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23596  Py_CLEAR(gen->closure);
23597  Py_CLEAR(gen->classobj);
23598  Py_CLEAR(gen->yieldfrom);
23599  Py_CLEAR(gen->exc_type);
23600  Py_CLEAR(gen->exc_value);
23601  Py_CLEAR(gen->exc_traceback);
23602 #ifdef __Pyx_AsyncGen_USED
23603  if (__Pyx_AsyncGen_CheckExact(self)) {
23604  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23605  }
23606 #endif
23607  Py_CLEAR(gen->gi_name);
23608  Py_CLEAR(gen->gi_qualname);
23609  Py_CLEAR(gen->gi_modulename);
23610  return 0;
23611 }
23612 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23613  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23614  PyObject_GC_UnTrack(gen);
23615  if (gen->gi_weakreflist != NULL)
23616  PyObject_ClearWeakRefs(self);
23617  if (gen->resume_label >= 0) {
23618  PyObject_GC_Track(self);
23619 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23620  if (PyObject_CallFinalizerFromDealloc(self))
23621 #else
23622  Py_TYPE(gen)->tp_del(self);
23623  if (self->ob_refcnt > 0)
23624 #endif
23625  {
23626  return;
23627  }
23628  PyObject_GC_UnTrack(self);
23629  }
23630 #ifdef __Pyx_AsyncGen_USED
23631  if (__Pyx_AsyncGen_CheckExact(self)) {
23632  /* We have to handle this case for asynchronous generators
23633  right here, because this code has to be between UNTRACK
23634  and GC_Del. */
23635  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23636  }
23637 #endif
23638  __Pyx_Coroutine_clear(self);
23639  PyObject_GC_Del(gen);
23640 }
23641 static void __Pyx_Coroutine_del(PyObject *self) {
23642  PyObject *error_type, *error_value, *error_traceback;
23643  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23644  __Pyx_PyThreadState_declare
23645  if (gen->resume_label < 0) {
23646  return;
23647  }
23648 #if !CYTHON_USE_TP_FINALIZE
23649  assert(self->ob_refcnt == 0);
23650  self->ob_refcnt = 1;
23651 #endif
23652  __Pyx_PyThreadState_assign
23653  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23654 #ifdef __Pyx_AsyncGen_USED
23655  if (__Pyx_AsyncGen_CheckExact(self)) {
23656  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23657  PyObject *finalizer = agen->ag_finalizer;
23658  if (finalizer && !agen->ag_closed) {
23659  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23660  if (unlikely(!res)) {
23661  PyErr_WriteUnraisable(self);
23662  } else {
23663  Py_DECREF(res);
23664  }
23665  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23666  return;
23667  }
23668  }
23669 #endif
23670  if (unlikely(gen->resume_label == 0 && !error_value)) {
23671 #ifdef __Pyx_Coroutine_USED
23672 #ifdef __Pyx_Generator_USED
23673  if (!__Pyx_Generator_CheckExact(self))
23674 #endif
23675  {
23676  PyObject_GC_UnTrack(self);
23677 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23678  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23679  PyErr_WriteUnraisable(self);
23680 #else
23681  {PyObject *msg;
23682  char *cmsg;
23683  #if CYTHON_COMPILING_IN_PYPY
23684  msg = NULL;
23685  cmsg = (char*) "coroutine was never awaited";
23686  #else
23687  char *cname;
23688  PyObject *qualname;
23689  qualname = gen->gi_qualname;
23690  cname = PyString_AS_STRING(qualname);
23691  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23692  if (unlikely(!msg)) {
23693  PyErr_Clear();
23694  cmsg = (char*) "coroutine was never awaited";
23695  } else {
23696  cmsg = PyString_AS_STRING(msg);
23697  }
23698  #endif
23699  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23700  PyErr_WriteUnraisable(self);
23701  Py_XDECREF(msg);}
23702 #endif
23703  PyObject_GC_Track(self);
23704  }
23705 #endif
23706  } else {
23707  PyObject *res = __Pyx_Coroutine_Close(self);
23708  if (unlikely(!res)) {
23709  if (PyErr_Occurred())
23710  PyErr_WriteUnraisable(self);
23711  } else {
23712  Py_DECREF(res);
23713  }
23714  }
23715  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23716 #if !CYTHON_USE_TP_FINALIZE
23717  assert(self->ob_refcnt > 0);
23718  if (--self->ob_refcnt == 0) {
23719  return;
23720  }
23721  {
23722  Py_ssize_t refcnt = self->ob_refcnt;
23723  _Py_NewReference(self);
23724  self->ob_refcnt = refcnt;
23725  }
23726 #if CYTHON_COMPILING_IN_CPYTHON
23727  assert(PyType_IS_GC(self->ob_type) &&
23728  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23729  _Py_DEC_REFTOTAL;
23730 #endif
23731 #ifdef COUNT_ALLOCS
23732  --Py_TYPE(self)->tp_frees;
23733  --Py_TYPE(self)->tp_allocs;
23734 #endif
23735 #endif
23736 }
23737 static PyObject *
23738 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
23739 {
23740  PyObject *name = self->gi_name;
23741  if (unlikely(!name)) name = Py_None;
23742  Py_INCREF(name);
23743  return name;
23744 }
23745 static int
23746 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
23747 {
23748  PyObject *tmp;
23749 #if PY_MAJOR_VERSION >= 3
23750  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23751 #else
23752  if (unlikely(value == NULL || !PyString_Check(value))) {
23753 #endif
23754  PyErr_SetString(PyExc_TypeError,
23755  "__name__ must be set to a string object");
23756  return -1;
23757  }
23758  tmp = self->gi_name;
23759  Py_INCREF(value);
23760  self->gi_name = value;
23761  Py_XDECREF(tmp);
23762  return 0;
23763 }
23764 static PyObject *
23765 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
23766 {
23767  PyObject *name = self->gi_qualname;
23768  if (unlikely(!name)) name = Py_None;
23769  Py_INCREF(name);
23770  return name;
23771 }
23772 static int
23773 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
23774 {
23775  PyObject *tmp;
23776 #if PY_MAJOR_VERSION >= 3
23777  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23778 #else
23779  if (unlikely(value == NULL || !PyString_Check(value))) {
23780 #endif
23781  PyErr_SetString(PyExc_TypeError,
23782  "__qualname__ must be set to a string object");
23783  return -1;
23784  }
23785  tmp = self->gi_qualname;
23786  Py_INCREF(value);
23787  self->gi_qualname = value;
23788  Py_XDECREF(tmp);
23789  return 0;
23790 }
23791 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23792  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
23793  PyObject *name, PyObject *qualname, PyObject *module_name) {
23794  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23795  if (unlikely(!gen))
23796  return NULL;
23797  return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
23798 }
23799 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23800  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
23801  PyObject *name, PyObject *qualname, PyObject *module_name) {
23802  gen->body = body;
23803  gen->closure = closure;
23804  Py_XINCREF(closure);
23805  gen->is_running = 0;
23806  gen->resume_label = 0;
23807  gen->classobj = NULL;
23808  gen->yieldfrom = NULL;
23809  gen->exc_type = NULL;
23810  gen->exc_value = NULL;
23811  gen->exc_traceback = NULL;
23812  gen->gi_weakreflist = NULL;
23813  Py_XINCREF(qualname);
23814  gen->gi_qualname = qualname;
23815  Py_XINCREF(name);
23816  gen->gi_name = name;
23817  Py_XINCREF(module_name);
23818  gen->gi_modulename = module_name;
23819  PyObject_GC_Track(gen);
23820  return gen;
23821 }
23822 
23823 /* PatchModuleWithCoroutine */
23824  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23825 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23826  int result;
23827  PyObject *globals, *result_obj;
23828  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23829  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23830  #ifdef __Pyx_Coroutine_USED
23831  (PyObject*)__pyx_CoroutineType);
23832  #else
23833  Py_None);
23834  #endif
23835  if (unlikely(result < 0)) goto ignore;
23836  result = PyDict_SetItemString(globals, "_cython_generator_type",
23837  #ifdef __Pyx_Generator_USED
23838  (PyObject*)__pyx_GeneratorType);
23839  #else
23840  Py_None);
23841  #endif
23842  if (unlikely(result < 0)) goto ignore;
23843  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23844  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23845  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23846  if (unlikely(!result_obj)) goto ignore;
23847  Py_DECREF(result_obj);
23848  Py_DECREF(globals);
23849  return module;
23850 ignore:
23851  Py_XDECREF(globals);
23852  PyErr_WriteUnraisable(module);
23853  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23854  Py_DECREF(module);
23855  module = NULL;
23856  }
23857 #else
23858  py_code++;
23859 #endif
23860  return module;
23861 }
23862 
23863 /* PatchGeneratorABC */
23864  #ifndef CYTHON_REGISTER_ABCS
23865 #define CYTHON_REGISTER_ABCS 1
23866 #endif
23867 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23868 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23869 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23870  module = __Pyx_Coroutine_patch_module(
23871  module, ""
23872 "if _cython_generator_type is not None:\n"
23873 " try: Generator = _module.Generator\n"
23874 " except AttributeError: pass\n"
23875 " else: Generator.register(_cython_generator_type)\n"
23876 "if _cython_coroutine_type is not None:\n"
23877 " try: Coroutine = _module.Coroutine\n"
23878 " except AttributeError: pass\n"
23879 " else: Coroutine.register(_cython_coroutine_type)\n"
23880  );
23881  return module;
23882 }
23883 #endif
23884 static int __Pyx_patch_abc(void) {
23885 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23886  static int abc_patched = 0;
23887  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23888  PyObject *module;
23889  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23890  if (!module) {
23891  PyErr_WriteUnraisable(NULL);
23892  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23893  ((PY_MAJOR_VERSION >= 3) ?
23894  "Cython module failed to register with collections.abc module" :
23895  "Cython module failed to register with collections module"), 1) < 0)) {
23896  return -1;
23897  }
23898  } else {
23899  module = __Pyx_patch_abc_module(module);
23900  abc_patched = 1;
23901  if (unlikely(!module))
23902  return -1;
23903  Py_DECREF(module);
23904  }
23905  module = PyImport_ImportModule("backports_abc");
23906  if (module) {
23907  module = __Pyx_patch_abc_module(module);
23908  Py_XDECREF(module);
23909  }
23910  if (!module) {
23911  PyErr_Clear();
23912  }
23913  }
23914 #else
23915  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23916 #endif
23917  return 0;
23918 }
23919 
23920 /* Generator */
23921  static PyMethodDef __pyx_Generator_methods[] = {
23922  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23923  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23924  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23925  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23926  {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
23927  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23928  {0, 0, 0, 0}
23929 };
23930 static PyMemberDef __pyx_Generator_memberlist[] = {
23931  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23932  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23933  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23934  {0, 0, 0, 0, 0}
23935 };
23936 static PyGetSetDef __pyx_Generator_getsets[] = {
23937  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23938  (char*) PyDoc_STR("name of the generator"), 0},
23939  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23940  (char*) PyDoc_STR("qualified name of the generator"), 0},
23941  {0, 0, 0, 0, 0}
23942 };
23943 static PyTypeObject __pyx_GeneratorType_type = {
23944  PyVarObject_HEAD_INIT(0, 0)
23945  "generator",
23946  sizeof(__pyx_CoroutineObject),
23947  0,
23948  (destructor) __Pyx_Coroutine_dealloc,
23949  0,
23950  0,
23951  0,
23952  0,
23953  0,
23954  0,
23955  0,
23956  0,
23957  0,
23958  0,
23959  0,
23960  0,
23961  0,
23962  0,
23963  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23964  0,
23965  (traverseproc) __Pyx_Coroutine_traverse,
23966  0,
23967  0,
23968  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23969  0,
23970  (iternextfunc) __Pyx_Generator_Next,
23971  __pyx_Generator_methods,
23972  __pyx_Generator_memberlist,
23973  __pyx_Generator_getsets,
23974  0,
23975  0,
23976  0,
23977  0,
23978  0,
23979  0,
23980  0,
23981  0,
23982  0,
23983  0,
23984  0,
23985  0,
23986  0,
23987  0,
23988  0,
23989 #if CYTHON_USE_TP_FINALIZE
23990  0,
23991 #else
23992  __Pyx_Coroutine_del,
23993 #endif
23994  0,
23995 #if CYTHON_USE_TP_FINALIZE
23996  __Pyx_Coroutine_del,
23997 #elif PY_VERSION_HEX >= 0x030400a1
23998  0,
23999 #endif
24000 };
24001 static int __pyx_Generator_init(void) {
24002  __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
24003  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
24004  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
24005  if (unlikely(!__pyx_GeneratorType)) {
24006  return -1;
24007  }
24008  return 0;
24009 }
24010 
24011 /* CheckBinaryVersion */
24012  static int __Pyx_check_binary_version(void) {
24013  char ctversion[4], rtversion[4];
24014  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24015  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
24016  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
24017  char message[200];
24018  PyOS_snprintf(message, sizeof(message),
24019  "compiletime version %s of module '%.100s' "
24020  "does not match runtime version %s",
24021  ctversion, __Pyx_MODULE_NAME, rtversion);
24022  return PyErr_WarnEx(NULL, message, 1);
24023  }
24024  return 0;
24025 }
24026 
24027 /* InitStrings */
24028  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24029  while (t->p) {
24030  #if PY_MAJOR_VERSION < 3
24031  if (t->is_unicode) {
24032  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24033  } else if (t->intern) {
24034  *t->p = PyString_InternFromString(t->s);
24035  } else {
24036  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24037  }
24038  #else
24039  if (t->is_unicode | t->is_str) {
24040  if (t->intern) {
24041  *t->p = PyUnicode_InternFromString(t->s);
24042  } else if (t->encoding) {
24043  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24044  } else {
24045  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24046  }
24047  } else {
24048  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24049  }
24050  #endif
24051  if (!*t->p)
24052  return -1;
24053  if (PyObject_Hash(*t->p) == -1)
24054  PyErr_Clear();
24055  ++t;
24056  }
24057  return 0;
24058 }
24059 
24060 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24061  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24062 }
24063 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24064  Py_ssize_t ignore;
24065  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24066 }
24067 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24068 #if !CYTHON_PEP393_ENABLED
24069 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24070  char* defenc_c;
24071  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24072  if (!defenc) return NULL;
24073  defenc_c = PyBytes_AS_STRING(defenc);
24074 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24075  {
24076  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24077  char* c;
24078  for (c = defenc_c; c < end; c++) {
24079  if ((unsigned char) (*c) >= 128) {
24080  PyUnicode_AsASCIIString(o);
24081  return NULL;
24082  }
24083  }
24084  }
24085 #endif
24086  *length = PyBytes_GET_SIZE(defenc);
24087  return defenc_c;
24088 }
24089 #else
24090 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24091  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24092 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24093  if (likely(PyUnicode_IS_ASCII(o))) {
24094  *length = PyUnicode_GET_LENGTH(o);
24095  return PyUnicode_AsUTF8(o);
24096  } else {
24097  PyUnicode_AsASCIIString(o);
24098  return NULL;
24099  }
24100 #else
24101  return PyUnicode_AsUTF8AndSize(o, length);
24102 #endif
24103 }
24104 #endif
24105 #endif
24106 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24107 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24108  if (
24109 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24110  __Pyx_sys_getdefaultencoding_not_ascii &&
24111 #endif
24112  PyUnicode_Check(o)) {
24113  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24114  } else
24115 #endif
24116 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24117  if (PyByteArray_Check(o)) {
24118  *length = PyByteArray_GET_SIZE(o);
24119  return PyByteArray_AS_STRING(o);
24120  } else
24121 #endif
24122  {
24123  char* result;
24124  int r = PyBytes_AsStringAndSize(o, &result, length);
24125  if (unlikely(r < 0)) {
24126  return NULL;
24127  } else {
24128  return result;
24129  }
24130  }
24131 }
24132 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24133  int is_true = x == Py_True;
24134  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24135  else return PyObject_IsTrue(x);
24136 }
24137 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24138 #if PY_MAJOR_VERSION >= 3
24139  if (PyLong_Check(result)) {
24140  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24141  "__int__ returned non-int (type %.200s). "
24142  "The ability to return an instance of a strict subclass of int "
24143  "is deprecated, and may be removed in a future version of Python.",
24144  Py_TYPE(result)->tp_name)) {
24145  Py_DECREF(result);
24146  return NULL;
24147  }
24148  return result;
24149  }
24150 #endif
24151  PyErr_Format(PyExc_TypeError,
24152  "__%.4s__ returned non-%.4s (type %.200s)",
24153  type_name, type_name, Py_TYPE(result)->tp_name);
24154  Py_DECREF(result);
24155  return NULL;
24156 }
24157 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24158 #if CYTHON_USE_TYPE_SLOTS
24159  PyNumberMethods *m;
24160 #endif
24161  const char *name = NULL;
24162  PyObject *res = NULL;
24163 #if PY_MAJOR_VERSION < 3
24164  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24165 #else
24166  if (likely(PyLong_Check(x)))
24167 #endif
24168  return __Pyx_NewRef(x);
24169 #if CYTHON_USE_TYPE_SLOTS
24170  m = Py_TYPE(x)->tp_as_number;
24171  #if PY_MAJOR_VERSION < 3
24172  if (m && m->nb_int) {
24173  name = "int";
24174  res = m->nb_int(x);
24175  }
24176  else if (m && m->nb_long) {
24177  name = "long";
24178  res = m->nb_long(x);
24179  }
24180  #else
24181  if (likely(m && m->nb_int)) {
24182  name = "int";
24183  res = m->nb_int(x);
24184  }
24185  #endif
24186 #else
24187  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24188  res = PyNumber_Int(x);
24189  }
24190 #endif
24191  if (likely(res)) {
24192 #if PY_MAJOR_VERSION < 3
24193  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24194 #else
24195  if (unlikely(!PyLong_CheckExact(res))) {
24196 #endif
24197  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24198  }
24199  }
24200  else if (!PyErr_Occurred()) {
24201  PyErr_SetString(PyExc_TypeError,
24202  "an integer is required");
24203  }
24204  return res;
24205 }
24206 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24207  Py_ssize_t ival;
24208  PyObject *x;
24209 #if PY_MAJOR_VERSION < 3
24210  if (likely(PyInt_CheckExact(b))) {
24211  if (sizeof(Py_ssize_t) >= sizeof(long))
24212  return PyInt_AS_LONG(b);
24213  else
24214  return PyInt_AsSsize_t(x);
24215  }
24216 #endif
24217  if (likely(PyLong_CheckExact(b))) {
24218  #if CYTHON_USE_PYLONG_INTERNALS
24219  const digit* digits = ((PyLongObject*)b)->ob_digit;
24220  const Py_ssize_t size = Py_SIZE(b);
24221  if (likely(__Pyx_sst_abs(size) <= 1)) {
24222  ival = likely(size) ? digits[0] : 0;
24223  if (size == -1) ival = -ival;
24224  return ival;
24225  } else {
24226  switch (size) {
24227  case 2:
24228  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24229  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24230  }
24231  break;
24232  case -2:
24233  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24234  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24235  }
24236  break;
24237  case 3:
24238  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24239  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24240  }
24241  break;
24242  case -3:
24243  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24244  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24245  }
24246  break;
24247  case 4:
24248  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24249  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24250  }
24251  break;
24252  case -4:
24253  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24254  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24255  }
24256  break;
24257  }
24258  }
24259  #endif
24260  return PyLong_AsSsize_t(b);
24261  }
24262  x = PyNumber_Index(b);
24263  if (!x) return -1;
24264  ival = PyInt_AsSsize_t(x);
24265  Py_DECREF(x);
24266  return ival;
24267 }
24268 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24269  return PyInt_FromSize_t(ival);
24270 }
24271 
24272 
24273 #endif /* Py_PYTHON_H */
int compare(const index_set< LO, HI > &a, const index_set< LO, HI > &b)
"lexicographic compare" eg. {3,4,5} is less than {3,7,8}
const Multivector< Scalar_T, LO, HI > sqrt(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Square root of multivector with specified complexifier.
String clifford_to_str(const Multivector_T &mv)
The "informal" string representation of Multivector_T mv.
Definition: PyClical.h:98
const Multivector< Scalar_T, LO, HI > acosh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic cosine of multivector with specified complexifier.
String index_set_to_repr(const Index_Set_T &ist)
The “official” string representation of Index_Set_T ist.
Definition: PyClical.h:69
const Multivector< Scalar_T, LO, HI > sinh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic sine of multivector.
index_set< lo_ndx, hi_ndx > IndexSet
Definition: PyClical.h:157
Scalar_T abs(const Multivector< Scalar_T, LO, HI > &val)
Absolute value == sqrt(norm)
const Multivector< Scalar_T, LO, HI > log(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Natural logarithm of multivector with specified complexifier.
String clifford_to_repr(const Multivector_T &mv)
The “official” string representation of Multivector_T mv.
Definition: PyClical.h:87
Multivector_T cga3(const Multivector_T &x)
Convert Euclidean 3D vector to Conformal Geometric Algebra null vector [DL (10.50)].
Definition: PyClical.h:115
const Multivector< Scalar_T, LO, HI > sin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > atanh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic tangent of multivector with specified complexifier.
const framed_multi< Scalar_T, LO, HI > exp(const framed_multi< Scalar_T, LO, HI > &val)
Exponential of multivector.
const Multivector< Scalar_T, LO, HI > cos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Cosine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > tanh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic tangent of multivector.
index_t min_neg(const index_set< LO, HI > &ist)
Minimum negative index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asin(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse sine of multivector with specified complexifier.
matrix_multi< scalar_t > Clifford
Definition: PyClical.h:160
const Multivector< Scalar_T, LO, HI > complexifier(const Multivector< Scalar_T, LO, HI > &val)
Square root of -1 which commutes with all members of the frame of the given multivector.
PyObject * PyFloat_FromDouble(Scalar_T v)
Definition: PyClical.h:59
const Multivector< Scalar_T, LO, HI > atan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse tangent of multivector with specified complexifier.
double scalar_t
Definition: PyClical.h:159
const Multivector< Scalar_T, LO, HI > tan(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Tangent of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > acos(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse cosine of multivector with specified complexifier.
String index_set_to_str(const Index_Set_T &ist)
The "informal" string representation of Index_Set_T ist.
Definition: PyClical.h:78
index_t max_pos(const index_set< LO, HI > &ist)
Maximum positive index, or 0 if none.
const Multivector< Scalar_T, LO, HI > asinh(const Multivector< Scalar_T, LO, HI > &val, const Multivector< Scalar_T, LO, HI > &i, const bool prechecked=false)
Inverse hyperbolic sine of multivector with specified complexifier.
const Multivector< Scalar_T, LO, HI > operator &(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Inner product.
Scalar_T max_abs(const Multivector< Scalar_T, LO, HI > &val)
Maximum of absolute values of components of multivector: multivector infinity norm.
def e(obj)
Definition: PyClical.pyx:1887
const Multivector< Scalar_T, LO, HI > cosh(const Multivector< Scalar_T, LO, HI > &val)
Hyperbolic cosine of multivector.
bool operator!=(const Multivector< Scalar_T, LO, HI > &lhs, const RHS< Scalar_T, LO, HI > &rhs)
Test for inequality of multivectors.
Multivector_T cga3std(const Multivector_T &X)
Convert CGA3 null vector to standard Conformal Geometric Algebra null vector [DL (10.52)].
Definition: PyClical.h:126
Multivector_T agc3(const Multivector_T &X)
Convert CGA3 null vector to Euclidean 3D vector [DL (10.50)].
Definition: PyClical.h:138