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  "-g",
28  "-march=native",
29  "-finline-limit=4000",
30  "--param",
31  "inline-unit-growth=200",
32  "-funroll-loops",
33  "-fvariable-expansion-in-unroller",
34  "-DNDEBUG",
35  "-DHAVE_BITS_WORDSIZE_H",
36  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
37  "-D_GLUCAT_USE_DENSE_MATRICES",
38  "-D_GLUCAT_CHECK_ISNAN",
39  "-Wno-unused-local-typedefs",
40  "-Wno-misleading-indentation",
41  "-fno-check-new",
42  "-fexceptions"
43  ],
44  "include_dirs": [
45  ".",
46  ".."
47  ],
48  "language": "c++",
49  "name": "PyClical",
50  "sources": [
51  "PyClical.pyx"
52  ]
53  },
54  "module_name": "PyClical"
55 }
56 END: Cython Metadata */
57 
58 #define PY_SSIZE_T_CLEAN
59 #include "Python.h"
60 #ifndef Py_PYTHON_H
61  #error Python headers needed to compile C extensions, please install development version of Python.
62 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
63  #error Cython requires Python 2.6+ or Python 3.3+.
64 #else
65 #define CYTHON_ABI "0_27_3"
66 #define CYTHON_FUTURE_DIVISION 0
67 #include <stddef.h>
68 #ifndef offsetof
69  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
70 #endif
71 #if !defined(WIN32) && !defined(MS_WINDOWS)
72  #ifndef __stdcall
73  #define __stdcall
74  #endif
75  #ifndef __cdecl
76  #define __cdecl
77  #endif
78  #ifndef __fastcall
79  #define __fastcall
80  #endif
81 #endif
82 #ifndef DL_IMPORT
83  #define DL_IMPORT(t) t
84 #endif
85 #ifndef DL_EXPORT
86  #define DL_EXPORT(t) t
87 #endif
88 #define __PYX_COMMA ,
89 #ifndef HAVE_LONG_LONG
90  #if PY_VERSION_HEX >= 0x02070000
91  #define HAVE_LONG_LONG
92  #endif
93 #endif
94 #ifndef PY_LONG_LONG
95  #define PY_LONG_LONG LONG_LONG
96 #endif
97 #ifndef Py_HUGE_VAL
98  #define Py_HUGE_VAL HUGE_VAL
99 #endif
100 #ifdef PYPY_VERSION
101  #define CYTHON_COMPILING_IN_PYPY 1
102  #define CYTHON_COMPILING_IN_PYSTON 0
103  #define CYTHON_COMPILING_IN_CPYTHON 0
104  #undef CYTHON_USE_TYPE_SLOTS
105  #define CYTHON_USE_TYPE_SLOTS 0
106  #undef CYTHON_USE_PYTYPE_LOOKUP
107  #define CYTHON_USE_PYTYPE_LOOKUP 0
108  #if PY_VERSION_HEX < 0x03050000
109  #undef CYTHON_USE_ASYNC_SLOTS
110  #define CYTHON_USE_ASYNC_SLOTS 0
111  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
112  #define CYTHON_USE_ASYNC_SLOTS 1
113  #endif
114  #undef CYTHON_USE_PYLIST_INTERNALS
115  #define CYTHON_USE_PYLIST_INTERNALS 0
116  #undef CYTHON_USE_UNICODE_INTERNALS
117  #define CYTHON_USE_UNICODE_INTERNALS 0
118  #undef CYTHON_USE_UNICODE_WRITER
119  #define CYTHON_USE_UNICODE_WRITER 0
120  #undef CYTHON_USE_PYLONG_INTERNALS
121  #define CYTHON_USE_PYLONG_INTERNALS 0
122  #undef CYTHON_AVOID_BORROWED_REFS
123  #define CYTHON_AVOID_BORROWED_REFS 1
124  #undef CYTHON_ASSUME_SAFE_MACROS
125  #define CYTHON_ASSUME_SAFE_MACROS 0
126  #undef CYTHON_UNPACK_METHODS
127  #define CYTHON_UNPACK_METHODS 0
128  #undef CYTHON_FAST_THREAD_STATE
129  #define CYTHON_FAST_THREAD_STATE 0
130  #undef CYTHON_FAST_PYCALL
131  #define CYTHON_FAST_PYCALL 0
132  #undef CYTHON_PEP489_MULTI_PHASE_INIT
133  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
134  #undef CYTHON_USE_TP_FINALIZE
135  #define CYTHON_USE_TP_FINALIZE 0
136 #elif defined(PYSTON_VERSION)
137  #define CYTHON_COMPILING_IN_PYPY 0
138  #define CYTHON_COMPILING_IN_PYSTON 1
139  #define CYTHON_COMPILING_IN_CPYTHON 0
140  #ifndef CYTHON_USE_TYPE_SLOTS
141  #define CYTHON_USE_TYPE_SLOTS 1
142  #endif
143  #undef CYTHON_USE_PYTYPE_LOOKUP
144  #define CYTHON_USE_PYTYPE_LOOKUP 0
145  #undef CYTHON_USE_ASYNC_SLOTS
146  #define CYTHON_USE_ASYNC_SLOTS 0
147  #undef CYTHON_USE_PYLIST_INTERNALS
148  #define CYTHON_USE_PYLIST_INTERNALS 0
149  #ifndef CYTHON_USE_UNICODE_INTERNALS
150  #define CYTHON_USE_UNICODE_INTERNALS 1
151  #endif
152  #undef CYTHON_USE_UNICODE_WRITER
153  #define CYTHON_USE_UNICODE_WRITER 0
154  #undef CYTHON_USE_PYLONG_INTERNALS
155  #define CYTHON_USE_PYLONG_INTERNALS 0
156  #ifndef CYTHON_AVOID_BORROWED_REFS
157  #define CYTHON_AVOID_BORROWED_REFS 0
158  #endif
159  #ifndef CYTHON_ASSUME_SAFE_MACROS
160  #define CYTHON_ASSUME_SAFE_MACROS 1
161  #endif
162  #ifndef CYTHON_UNPACK_METHODS
163  #define CYTHON_UNPACK_METHODS 1
164  #endif
165  #undef CYTHON_FAST_THREAD_STATE
166  #define CYTHON_FAST_THREAD_STATE 0
167  #undef CYTHON_FAST_PYCALL
168  #define CYTHON_FAST_PYCALL 0
169  #undef CYTHON_PEP489_MULTI_PHASE_INIT
170  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
171  #undef CYTHON_USE_TP_FINALIZE
172  #define CYTHON_USE_TP_FINALIZE 0
173 #else
174  #define CYTHON_COMPILING_IN_PYPY 0
175  #define CYTHON_COMPILING_IN_PYSTON 0
176  #define CYTHON_COMPILING_IN_CPYTHON 1
177  #ifndef CYTHON_USE_TYPE_SLOTS
178  #define CYTHON_USE_TYPE_SLOTS 1
179  #endif
180  #if PY_VERSION_HEX < 0x02070000
181  #undef CYTHON_USE_PYTYPE_LOOKUP
182  #define CYTHON_USE_PYTYPE_LOOKUP 0
183  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
184  #define CYTHON_USE_PYTYPE_LOOKUP 1
185  #endif
186  #if PY_MAJOR_VERSION < 3
187  #undef CYTHON_USE_ASYNC_SLOTS
188  #define CYTHON_USE_ASYNC_SLOTS 0
189  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
190  #define CYTHON_USE_ASYNC_SLOTS 1
191  #endif
192  #if PY_VERSION_HEX < 0x02070000
193  #undef CYTHON_USE_PYLONG_INTERNALS
194  #define CYTHON_USE_PYLONG_INTERNALS 0
195  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
196  #define CYTHON_USE_PYLONG_INTERNALS 1
197  #endif
198  #ifndef CYTHON_USE_PYLIST_INTERNALS
199  #define CYTHON_USE_PYLIST_INTERNALS 1
200  #endif
201  #ifndef CYTHON_USE_UNICODE_INTERNALS
202  #define CYTHON_USE_UNICODE_INTERNALS 1
203  #endif
204  #if PY_VERSION_HEX < 0x030300F0
205  #undef CYTHON_USE_UNICODE_WRITER
206  #define CYTHON_USE_UNICODE_WRITER 0
207  #elif !defined(CYTHON_USE_UNICODE_WRITER)
208  #define CYTHON_USE_UNICODE_WRITER 1
209  #endif
210  #ifndef CYTHON_AVOID_BORROWED_REFS
211  #define CYTHON_AVOID_BORROWED_REFS 0
212  #endif
213  #ifndef CYTHON_ASSUME_SAFE_MACROS
214  #define CYTHON_ASSUME_SAFE_MACROS 1
215  #endif
216  #ifndef CYTHON_UNPACK_METHODS
217  #define CYTHON_UNPACK_METHODS 1
218  #endif
219  #ifndef CYTHON_FAST_THREAD_STATE
220  #define CYTHON_FAST_THREAD_STATE 1
221  #endif
222  #ifndef CYTHON_FAST_PYCALL
223  #define CYTHON_FAST_PYCALL 1
224  #endif
225  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
226  #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
227  #endif
228  #ifndef CYTHON_USE_TP_FINALIZE
229  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
230  #endif
231 #endif
232 #if !defined(CYTHON_FAST_PYCCALL)
233 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
234 #endif
235 #if CYTHON_USE_PYLONG_INTERNALS
236  #include "longintrepr.h"
237  #undef SHIFT
238  #undef BASE
239  #undef MASK
240 #endif
241 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
242  #define Py_OptimizeFlag 0
243 #endif
244 #define __PYX_BUILD_PY_SSIZE_T "n"
245 #define CYTHON_FORMAT_SSIZE_T "z"
246 #if PY_MAJOR_VERSION < 3
247  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
248  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
249  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
250  #define __Pyx_DefaultClassType PyClass_Type
251 #else
252  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
253  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
254  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
255  #define __Pyx_DefaultClassType PyType_Type
256 #endif
257 #ifndef Py_TPFLAGS_CHECKTYPES
258  #define Py_TPFLAGS_CHECKTYPES 0
259 #endif
260 #ifndef Py_TPFLAGS_HAVE_INDEX
261  #define Py_TPFLAGS_HAVE_INDEX 0
262 #endif
263 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
264  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
265 #endif
266 #ifndef Py_TPFLAGS_HAVE_FINALIZE
267  #define Py_TPFLAGS_HAVE_FINALIZE 0
268 #endif
269 #if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
270  #ifndef METH_FASTCALL
271  #define METH_FASTCALL 0x80
272  #endif
273  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
274  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
275  Py_ssize_t nargs, PyObject *kwnames);
276 #else
277  #define __Pyx_PyCFunctionFast _PyCFunctionFast
278  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
279 #endif
280 #if CYTHON_FAST_PYCCALL
281 #define __Pyx_PyFastCFunction_Check(func)\
282  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
283 #else
284 #define __Pyx_PyFastCFunction_Check(func) 0
285 #endif
286 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
287  #define __Pyx_PyThreadState_Current PyThreadState_GET()
288 #elif PY_VERSION_HEX >= 0x03060000
289  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
290 #elif PY_VERSION_HEX >= 0x03000000
291  #define __Pyx_PyThreadState_Current PyThreadState_GET()
292 #else
293  #define __Pyx_PyThreadState_Current _PyThreadState_Current
294 #endif
295 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
296 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
297 #else
298 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
299 #endif
300 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
301  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
302  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
303 #else
304  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
305  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
306 #endif
307 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
308  #define CYTHON_PEP393_ENABLED 1
309  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
310  0 : _PyUnicode_Ready((PyObject *)(op)))
311  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
312  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
313  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
314  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
315  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
316  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
317  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
318  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
319 #else
320  #define CYTHON_PEP393_ENABLED 0
321  #define PyUnicode_1BYTE_KIND 1
322  #define PyUnicode_2BYTE_KIND 2
323  #define PyUnicode_4BYTE_KIND 4
324  #define __Pyx_PyUnicode_READY(op) (0)
325  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
326  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
327  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
328  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
329  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
330  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
331  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
332  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
333 #endif
334 #if CYTHON_COMPILING_IN_PYPY
335  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
336  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
337 #else
338  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
339  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
340  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
341 #endif
342 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
343  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
344 #endif
345 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
346  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
347 #endif
348 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
349  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
350 #endif
351 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
352  #define PyObject_Malloc(s) PyMem_Malloc(s)
353  #define PyObject_Free(p) PyMem_Free(p)
354  #define PyObject_Realloc(p) PyMem_Realloc(p)
355 #endif
356 #if CYTHON_COMPILING_IN_PYSTON
357  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
358  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
359 #else
360  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
361  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
362 #endif
363 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
364 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
365 #if PY_MAJOR_VERSION >= 3
366  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
367 #else
368  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
369 #endif
370 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
371  #define PyObject_ASCII(o) PyObject_Repr(o)
372 #endif
373 #if PY_MAJOR_VERSION >= 3
374  #define PyBaseString_Type PyUnicode_Type
375  #define PyStringObject PyUnicodeObject
376  #define PyString_Type PyUnicode_Type
377  #define PyString_Check PyUnicode_Check
378  #define PyString_CheckExact PyUnicode_CheckExact
379 #endif
380 #if PY_MAJOR_VERSION >= 3
381  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
382  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
383 #else
384  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
385  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
386 #endif
387 #ifndef PySet_CheckExact
388  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
389 #endif
390 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
391 #if PY_MAJOR_VERSION >= 3
392  #define PyIntObject PyLongObject
393  #define PyInt_Type PyLong_Type
394  #define PyInt_Check(op) PyLong_Check(op)
395  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
396  #define PyInt_FromString PyLong_FromString
397  #define PyInt_FromUnicode PyLong_FromUnicode
398  #define PyInt_FromLong PyLong_FromLong
399  #define PyInt_FromSize_t PyLong_FromSize_t
400  #define PyInt_FromSsize_t PyLong_FromSsize_t
401  #define PyInt_AsLong PyLong_AsLong
402  #define PyInt_AS_LONG PyLong_AS_LONG
403  #define PyInt_AsSsize_t PyLong_AsSsize_t
404  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
405  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
406  #define PyNumber_Int PyNumber_Long
407 #endif
408 #if PY_MAJOR_VERSION >= 3
409  #define PyBoolObject PyLongObject
410 #endif
411 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
412  #ifndef PyUnicode_InternFromString
413  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
414  #endif
415 #endif
416 #if PY_VERSION_HEX < 0x030200A4
417  typedef long Py_hash_t;
418  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
419  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
420 #else
421  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
422  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
423 #endif
424 #if PY_MAJOR_VERSION >= 3
425  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
426 #else
427  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
428 #endif
429 #ifndef __has_attribute
430  #define __has_attribute(x) 0
431 #endif
432 #ifndef __has_cpp_attribute
433  #define __has_cpp_attribute(x) 0
434 #endif
435 #if CYTHON_USE_ASYNC_SLOTS
436  #if PY_VERSION_HEX >= 0x030500B1
437  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
438  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
439  #else
440  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
441  #endif
442 #else
443  #define __Pyx_PyType_AsAsync(obj) NULL
444 #endif
445 #ifndef __Pyx_PyAsyncMethodsStruct
446  typedef struct {
447  unaryfunc am_await;
448  unaryfunc am_aiter;
449  unaryfunc am_anext;
450  } __Pyx_PyAsyncMethodsStruct;
451 #endif
452 #ifndef CYTHON_RESTRICT
453  #if defined(__GNUC__)
454  #define CYTHON_RESTRICT __restrict__
455  #elif defined(_MSC_VER) && _MSC_VER >= 1400
456  #define CYTHON_RESTRICT __restrict
457  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
458  #define CYTHON_RESTRICT restrict
459  #else
460  #define CYTHON_RESTRICT
461  #endif
462 #endif
463 #ifndef CYTHON_UNUSED
464 # if defined(__GNUC__)
465 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
466 # define CYTHON_UNUSED __attribute__ ((__unused__))
467 # else
468 # define CYTHON_UNUSED
469 # endif
470 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
471 # define CYTHON_UNUSED __attribute__ ((__unused__))
472 # else
473 # define CYTHON_UNUSED
474 # endif
475 #endif
476 #ifndef CYTHON_MAYBE_UNUSED_VAR
477 # if defined(__cplusplus)
478  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
479 # else
480 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
481 # endif
482 #endif
483 #ifndef CYTHON_NCP_UNUSED
484 # if CYTHON_COMPILING_IN_CPYTHON
485 # define CYTHON_NCP_UNUSED
486 # else
487 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
488 # endif
489 #endif
490 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
491 #ifdef _MSC_VER
492  #ifndef _MSC_STDINT_H_
493  #if _MSC_VER < 1300
494  typedef unsigned char uint8_t;
495  typedef unsigned int uint32_t;
496  #else
497  typedef unsigned __int8 uint8_t;
498  typedef unsigned __int32 uint32_t;
499  #endif
500  #endif
501 #else
502  #include <stdint.h>
503 #endif
504 #ifndef CYTHON_FALLTHROUGH
505  #if defined(__cplusplus) && __cplusplus >= 201103L
506  #if __has_cpp_attribute(fallthrough)
507  #define CYTHON_FALLTHROUGH [[fallthrough]]
508  #elif __has_cpp_attribute(clang::fallthrough)
509  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
510  #elif __has_cpp_attribute(gnu::fallthrough)
511  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
512  #endif
513  #endif
514  #ifndef CYTHON_FALLTHROUGH
515  #if __has_attribute(fallthrough)
516  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
517  #else
518  #define CYTHON_FALLTHROUGH
519  #endif
520  #endif
521  #if defined(__clang__ ) && defined(__apple_build_version__)
522  #if __apple_build_version__ < 7000000
523  #undef CYTHON_FALLTHROUGH
524  #define CYTHON_FALLTHROUGH
525  #endif
526  #endif
527 #endif
528 
529 #ifndef __cplusplus
530  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
531 #endif
532 #ifndef CYTHON_INLINE
533  #if defined(__clang__)
534  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
535  #else
536  #define CYTHON_INLINE inline
537  #endif
538 #endif
539 template<typename T>
540 void __Pyx_call_destructor(T& x) {
541  x.~T();
542 }
543 template<typename T>
544 class __Pyx_FakeReference {
545  public:
546  __Pyx_FakeReference() : ptr(NULL) { }
547  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
548  T *operator->() { return ptr; }
549  T *operator&() { return ptr; }
550  operator T&() { return *ptr; }
551  template<typename U> bool operator ==(U other) { return *ptr == other; }
552  template<typename U> bool operator !=(U other) { return *ptr != other; }
553  private:
554  T *ptr;
555 };
556 
557 #if defined(WIN32) || defined(MS_WINDOWS)
558  #define _USE_MATH_DEFINES
559 #endif
560 #include <math.h>
561 #ifdef NAN
562 #define __PYX_NAN() ((float) NAN)
563 #else
564 static CYTHON_INLINE float __PYX_NAN() {
565  float value;
566  memset(&value, 0xFF, sizeof(value));
567  return value;
568 }
569 #endif
570 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
571 #define __Pyx_truncl trunc
572 #else
573 #define __Pyx_truncl truncl
574 #endif
575 
576 
577 #define __PYX_ERR(f_index, lineno, Ln_error) \
578 { \
579  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
580 }
581 
582 #ifndef __PYX_EXTERN_C
583  #ifdef __cplusplus
584  #define __PYX_EXTERN_C extern "C"
585  #else
586  #define __PYX_EXTERN_C extern
587  #endif
588 #endif
589 
590 #define __PYX_HAVE__PyClical
591 #define __PYX_HAVE_API__PyClical
592 #include <vector>
593 #include "ios"
594 #include "new"
595 #include "stdexcept"
596 #include "typeinfo"
597 #include "PyClical.h"
598 #ifdef _OPENMP
599 #include <omp.h>
600 #endif /* _OPENMP */
601 
602 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
603 #define CYTHON_WITHOUT_ASSERTIONS
604 #endif
605 
606 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
607  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
608 
609 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
610 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
611 #define __PYX_DEFAULT_STRING_ENCODING ""
612 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
613 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
614 #define __Pyx_uchar_cast(c) ((unsigned char)c)
615 #define __Pyx_long_cast(x) ((long)x)
616 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
617  (sizeof(type) < sizeof(Py_ssize_t)) ||\
618  (sizeof(type) > sizeof(Py_ssize_t) &&\
619  likely(v < (type)PY_SSIZE_T_MAX ||\
620  v == (type)PY_SSIZE_T_MAX) &&\
621  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
622  v == (type)PY_SSIZE_T_MIN))) ||\
623  (sizeof(type) == sizeof(Py_ssize_t) &&\
624  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
625  v == (type)PY_SSIZE_T_MAX))) )
626 #if defined (__cplusplus) && __cplusplus >= 201103L
627  #include <cstdlib>
628  #define __Pyx_sst_abs(value) std::abs(value)
629 #elif SIZEOF_INT >= SIZEOF_SIZE_T
630  #define __Pyx_sst_abs(value) abs(value)
631 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
632  #define __Pyx_sst_abs(value) labs(value)
633 #elif defined (_MSC_VER)
634  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
635 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
636  #define __Pyx_sst_abs(value) llabs(value)
637 #elif defined (__GNUC__)
638  #define __Pyx_sst_abs(value) __builtin_llabs(value)
639 #else
640  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
641 #endif
642 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
643 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
644 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
645 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
646 #define __Pyx_PyBytes_FromString PyBytes_FromString
647 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
648 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
649 #if PY_MAJOR_VERSION < 3
650  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
651  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
652 #else
653  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
654  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
655 #endif
656 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
657 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
658 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
659 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
660 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
661 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
662 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
663 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
664 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
665 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
666 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
667 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
668 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
669 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
670 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
671 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
672 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
673  const Py_UNICODE *u_end = u;
674  while (*u_end++) ;
675  return (size_t)(u_end - u - 1);
676 }
677 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
678 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
679 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
680 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
681 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
682 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
683 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
684 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
685 #define __Pyx_PySequence_Tuple(obj)\
686  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
687 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
688 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
689 #if CYTHON_ASSUME_SAFE_MACROS
690 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
691 #else
692 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
693 #endif
694 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
695 #if PY_MAJOR_VERSION >= 3
696 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
697 #else
698 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
699 #endif
700 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
701 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
702 static int __Pyx_sys_getdefaultencoding_not_ascii;
703 static int __Pyx_init_sys_getdefaultencoding_params(void) {
704  PyObject* sys;
705  PyObject* default_encoding = NULL;
706  PyObject* ascii_chars_u = NULL;
707  PyObject* ascii_chars_b = NULL;
708  const char* default_encoding_c;
709  sys = PyImport_ImportModule("sys");
710  if (!sys) goto bad;
711  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
712  Py_DECREF(sys);
713  if (!default_encoding) goto bad;
714  default_encoding_c = PyBytes_AsString(default_encoding);
715  if (!default_encoding_c) goto bad;
716  if (strcmp(default_encoding_c, "ascii") == 0) {
717  __Pyx_sys_getdefaultencoding_not_ascii = 0;
718  } else {
719  char ascii_chars[128];
720  int c;
721  for (c = 0; c < 128; c++) {
722  ascii_chars[c] = c;
723  }
724  __Pyx_sys_getdefaultencoding_not_ascii = 1;
725  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
726  if (!ascii_chars_u) goto bad;
727  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
728  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
729  PyErr_Format(
730  PyExc_ValueError,
731  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
732  default_encoding_c);
733  goto bad;
734  }
735  Py_DECREF(ascii_chars_u);
736  Py_DECREF(ascii_chars_b);
737  }
738  Py_DECREF(default_encoding);
739  return 0;
740 bad:
741  Py_XDECREF(default_encoding);
742  Py_XDECREF(ascii_chars_u);
743  Py_XDECREF(ascii_chars_b);
744  return -1;
745 }
746 #endif
747 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
748 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
749 #else
750 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
751 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
752 static char* __PYX_DEFAULT_STRING_ENCODING;
753 static int __Pyx_init_sys_getdefaultencoding_params(void) {
754  PyObject* sys;
755  PyObject* default_encoding = NULL;
756  char* default_encoding_c;
757  sys = PyImport_ImportModule("sys");
758  if (!sys) goto bad;
759  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
760  Py_DECREF(sys);
761  if (!default_encoding) goto bad;
762  default_encoding_c = PyBytes_AsString(default_encoding);
763  if (!default_encoding_c) goto bad;
764  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
765  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
766  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
767  Py_DECREF(default_encoding);
768  return 0;
769 bad:
770  Py_XDECREF(default_encoding);
771  return -1;
772 }
773 #endif
774 #endif
775 
776 
777 /* Test for GCC > 2.95 */
778 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
779  #define likely(x) __builtin_expect(!!(x), 1)
780  #define unlikely(x) __builtin_expect(!!(x), 0)
781 #else /* !__GNUC__ or GCC < 2.95 */
782  #define likely(x) (x)
783  #define unlikely(x) (x)
784 #endif /* __GNUC__ */
785 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
786 
787 static PyObject *__pyx_m = NULL;
788 static PyObject *__pyx_d;
789 static PyObject *__pyx_b;
790 static PyObject *__pyx_cython_runtime;
791 static PyObject *__pyx_empty_tuple;
792 static PyObject *__pyx_empty_bytes;
793 static PyObject *__pyx_empty_unicode;
794 static int __pyx_lineno;
795 static int __pyx_clineno = 0;
796 static const char * __pyx_cfilenm= __FILE__;
797 static const char *__pyx_filename;
798 
799 
800 static const char *__pyx_f[] = {
801  "PyClical.pyx",
802  "stringsource",
803 };
804 
805 /*--- Type declarations ---*/
806 struct __pyx_obj_8PyClical_index_set;
807 struct __pyx_obj_8PyClical_clifford;
808 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
809 struct __pyx_opt_args_8PyClical_sqrt;
810 struct __pyx_opt_args_8PyClical_log;
811 struct __pyx_opt_args_8PyClical_cos;
812 struct __pyx_opt_args_8PyClical_acos;
813 struct __pyx_opt_args_8PyClical_acosh;
814 struct __pyx_opt_args_8PyClical_sin;
815 struct __pyx_opt_args_8PyClical_asin;
816 struct __pyx_opt_args_8PyClical_asinh;
817 struct __pyx_opt_args_8PyClical_tan;
818 struct __pyx_opt_args_8PyClical_atan;
819 struct __pyx_opt_args_8PyClical_atanh;
820 struct __pyx_opt_args_8PyClical_random_clifford;
821 
822 /* "PyClical.pyx":1542
823  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
824  *
825  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
826  * """
827  * Square root of multivector with optional complexifier.
828  */
829 struct __pyx_opt_args_8PyClical_sqrt {
830  int __pyx_n;
831  PyObject *i;
832 };
833 
834 /* "PyClical.pyx":1579
835  * return clifford().wrap( glucat.exp(toClifford(obj)) )
836  *
837  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
838  * """
839  * Natural logarithm of multivector with optional complexifier.
840  */
841 struct __pyx_opt_args_8PyClical_log {
842  int __pyx_n;
843  PyObject *i;
844 };
845 
846 /* "PyClical.pyx":1602
847  * return clifford().wrap( glucat.log(toClifford(obj)) )
848  *
849  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
850  * """
851  * Cosine of multivector with optional complexifier.
852  */
853 struct __pyx_opt_args_8PyClical_cos {
854  int __pyx_n;
855  PyObject *i;
856 };
857 
858 /* "PyClical.pyx":1619
859  * return clifford().wrap( glucat.cos(toClifford(obj)) )
860  *
861  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
862  * """
863  * Inverse cosine of multivector with optional complexifier.
864  */
865 struct __pyx_opt_args_8PyClical_acos {
866  int __pyx_n;
867  PyObject *i;
868 };
869 
870 /* "PyClical.pyx":1656
871  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
872  *
873  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
874  * """
875  * Inverse hyperbolic cosine of multivector with optional complexifier.
876  */
877 struct __pyx_opt_args_8PyClical_acosh {
878  int __pyx_n;
879  PyObject *i;
880 };
881 
882 /* "PyClical.pyx":1679
883  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
884  *
885  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
886  * """
887  * Sine of multivector with optional complexifier.
888  */
889 struct __pyx_opt_args_8PyClical_sin {
890  int __pyx_n;
891  PyObject *i;
892 };
893 
894 /* "PyClical.pyx":1698
895  * return clifford().wrap( glucat.sin(toClifford(obj)) )
896  *
897  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
898  * """
899  * Inverse sine of multivector with optional complexifier.
900  */
901 struct __pyx_opt_args_8PyClical_asin {
902  int __pyx_n;
903  PyObject *i;
904 };
905 
906 /* "PyClical.pyx":1733
907  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
908  *
909  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
910  * """
911  * Inverse hyperbolic sine of multivector with optional complexifier.
912  */
913 struct __pyx_opt_args_8PyClical_asinh {
914  int __pyx_n;
915  PyObject *i;
916 };
917 
918 /* "PyClical.pyx":1752
919  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
920  *
921  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
922  * """
923  * Tangent of multivector with optional complexifier.
924  */
925 struct __pyx_opt_args_8PyClical_tan {
926  int __pyx_n;
927  PyObject *i;
928 };
929 
930 /* "PyClical.pyx":1769
931  * return clifford().wrap( glucat.tan(toClifford(obj)) )
932  *
933  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
934  * """
935  * Inverse tangent of multivector with optional complexifier.
936  */
937 struct __pyx_opt_args_8PyClical_atan {
938  int __pyx_n;
939  PyObject *i;
940 };
941 
942 /* "PyClical.pyx":1798
943  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
944  *
945  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
946  * """
947  * Inverse hyperbolic tangent of multivector with optional complexifier.
948  */
949 struct __pyx_opt_args_8PyClical_atanh {
950  int __pyx_n;
951  PyObject *i;
952 };
953 
954 /* "PyClical.pyx":1815
955  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
956  *
957  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
958  * """
959  * Random multivector within a frame.
960  */
961 struct __pyx_opt_args_8PyClical_random_clifford {
962  int __pyx_n;
963  PyObject *fill;
964 };
965 
966 /* "PyClical.pyx":37
967  *
968  * # Forward reference
969  * cdef class index_set # <<<<<<<<<<<<<<
970  *
971  * cdef inline IndexSet toIndexSet(obj):
972  */
973 struct __pyx_obj_8PyClical_index_set {
974  PyObject_HEAD
975  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
976  IndexSet *instance;
977 };
978 
979 
980 /* "PyClical.pyx":530
981  *
982  * # Forward reference.
983  * cdef class clifford # <<<<<<<<<<<<<<
984  *
985  * cdef inline Clifford toClifford(obj):
986  */
987 struct __pyx_obj_8PyClical_clifford {
988  PyObject_HEAD
989  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
990  Clifford *instance;
991 };
992 
993 
994 /* "PyClical.pyx":227
995  * return self.instance.getitem(idx)
996  *
997  * def __iter__(self): # <<<<<<<<<<<<<<
998  * """
999  * Iterate over the indices of an index_set.
1000  */
1001 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1002  PyObject_HEAD
1003  PyObject *__pyx_v_idx;
1004  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1005  PyObject *__pyx_t_0;
1006  Py_ssize_t __pyx_t_1;
1007  PyObject *(*__pyx_t_2)(PyObject *);
1008 };
1009 
1010 
1011 
1012 /* "PyClical.pyx":45
1013  * return index_set(obj).instance[0]
1014  *
1015  * cdef class index_set: # <<<<<<<<<<<<<<
1016  * """
1017  * Python class index_set wraps C++ class IndexSet.
1018  */
1019 
1020 struct __pyx_vtabstruct_8PyClical_index_set {
1021  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1022  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1023  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1024 };
1025 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1026 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1027 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1028 
1029 
1030 /* "PyClical.pyx":535
1031  * return clifford(obj).instance[0]
1032  *
1033  * cdef class clifford: # <<<<<<<<<<<<<<
1034  * """
1035  * Python class clifford wraps C++ class Clifford.
1036  */
1037 
1038 struct __pyx_vtabstruct_8PyClical_clifford {
1039  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1040  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1041  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1042 };
1043 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1044 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1045 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1046 
1047 /* --- Runtime support code (head) --- */
1048 /* Refnanny.proto */
1049 #ifndef CYTHON_REFNANNY
1050  #define CYTHON_REFNANNY 0
1051 #endif
1052 #if CYTHON_REFNANNY
1053  typedef struct {
1054  void (*INCREF)(void*, PyObject*, int);
1055  void (*DECREF)(void*, PyObject*, int);
1056  void (*GOTREF)(void*, PyObject*, int);
1057  void (*GIVEREF)(void*, PyObject*, int);
1058  void* (*SetupContext)(const char*, int, const char*);
1059  void (*FinishContext)(void**);
1060  } __Pyx_RefNannyAPIStruct;
1061  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1062  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1063  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1064 #ifdef WITH_THREAD
1065  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1066  if (acquire_gil) {\
1067  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1068  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1069  PyGILState_Release(__pyx_gilstate_save);\
1070  } else {\
1071  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1072  }
1073 #else
1074  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1075  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1076 #endif
1077  #define __Pyx_RefNannyFinishContext()\
1078  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1079  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1080  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1081  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1082  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1083  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1084  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1085  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1086  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1087 #else
1088  #define __Pyx_RefNannyDeclarations
1089  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1090  #define __Pyx_RefNannyFinishContext()
1091  #define __Pyx_INCREF(r) Py_INCREF(r)
1092  #define __Pyx_DECREF(r) Py_DECREF(r)
1093  #define __Pyx_GOTREF(r)
1094  #define __Pyx_GIVEREF(r)
1095  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1096  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1097  #define __Pyx_XGOTREF(r)
1098  #define __Pyx_XGIVEREF(r)
1099 #endif
1100 #define __Pyx_XDECREF_SET(r, v) do {\
1101  PyObject *tmp = (PyObject *) r;\
1102  r = v; __Pyx_XDECREF(tmp);\
1103  } while (0)
1104 #define __Pyx_DECREF_SET(r, v) do {\
1105  PyObject *tmp = (PyObject *) r;\
1106  r = v; __Pyx_DECREF(tmp);\
1107  } while (0)
1108 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1109 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1110 
1111 /* PyObjectGetAttrStr.proto */
1112 #if CYTHON_USE_TYPE_SLOTS
1113 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1114  PyTypeObject* tp = Py_TYPE(obj);
1115  if (likely(tp->tp_getattro))
1116  return tp->tp_getattro(obj, attr_name);
1117 #if PY_MAJOR_VERSION < 3
1118  if (likely(tp->tp_getattr))
1119  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1120 #endif
1121  return PyObject_GetAttr(obj, attr_name);
1122 }
1123 #else
1124 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1125 #endif
1126 
1127 /* GetBuiltinName.proto */
1128 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1129 
1130 /* PyObjectCall.proto */
1131 #if CYTHON_COMPILING_IN_CPYTHON
1132 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1133 #else
1134 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1135 #endif
1136 
1137 /* PyThreadStateGet.proto */
1138 #if CYTHON_FAST_THREAD_STATE
1139 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1140 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1141 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1142 #else
1143 #define __Pyx_PyThreadState_declare
1144 #define __Pyx_PyThreadState_assign
1145 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1146 #endif
1147 
1148 /* PyErrFetchRestore.proto */
1149 #if CYTHON_FAST_THREAD_STATE
1150 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1151 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1152 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1153 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1154 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1155 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1156 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1157 #if CYTHON_COMPILING_IN_CPYTHON
1158 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1159 #else
1160 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1161 #endif
1162 #else
1163 #define __Pyx_PyErr_Clear() PyErr_Clear()
1164 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1165 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1166 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1167 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1168 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1169 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1170 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1171 #endif
1172 
1173 /* WriteUnraisableException.proto */
1174 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1175  int lineno, const char *filename,
1176  int full_traceback, int nogil);
1177 
1178 /* PyCFunctionFastCall.proto */
1179 #if CYTHON_FAST_PYCCALL
1180 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1181 #else
1182 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1183 #endif
1184 
1185 /* PyFunctionFastCall.proto */
1186 #if CYTHON_FAST_PYCALL
1187 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1188  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1189 #if 1 || PY_VERSION_HEX < 0x030600B1
1190 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1191 #else
1192 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1193 #endif
1194 #endif
1195 
1196 /* PyObjectCallMethO.proto */
1197 #if CYTHON_COMPILING_IN_CPYTHON
1198 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1199 #endif
1200 
1201 /* PyObjectCallOneArg.proto */
1202 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1203 
1204 /* PyObjectCallNoArg.proto */
1205 #if CYTHON_COMPILING_IN_CPYTHON
1206 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1207 #else
1208 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1209 #endif
1210 
1211 /* RaiseDoubleKeywords.proto */
1212 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1213 
1214 /* ParseKeywords.proto */
1215 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1216  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1217  const char* function_name);
1218 
1219 /* RaiseArgTupleInvalid.proto */
1220 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1221  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1222 
1223 /* GetModuleGlobalName.proto */
1224 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1225 
1226 /* SaveResetException.proto */
1227 #if CYTHON_FAST_THREAD_STATE
1228 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1229 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1230 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1231 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1232 #else
1233 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1234 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1235 #endif
1236 
1237 /* PyErrExceptionMatches.proto */
1238 #if CYTHON_FAST_THREAD_STATE
1239 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1240 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1241 #else
1242 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1243 #endif
1244 
1245 /* GetException.proto */
1246 #if CYTHON_FAST_THREAD_STATE
1247 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1248 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1249 #else
1250 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1251 #endif
1252 
1253 /* RaiseException.proto */
1254 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1255 
1256 /* PyIntBinop.proto */
1257 #if !CYTHON_COMPILING_IN_PYPY
1258 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1259 #else
1260 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1261  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1262 #endif
1263 
1264 /* PySequenceContains.proto */
1265 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1266  int result = PySequence_Contains(seq, item);
1267  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1268 }
1269 
1270 /* SetItemInt.proto */
1271 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1272  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1273  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1274  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1275  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1276 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1277 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1278  int is_list, int wraparound, int boundscheck);
1279 
1280 /* ArgTypeTest.proto */
1281 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1282  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1283  __Pyx__ArgTypeTest(obj, type, name, exact))
1284 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1285 
1286 /* Import.proto */
1287 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1288 
1289 /* IncludeStringH.proto */
1290 #include <string.h>
1291 
1292 /* SetVTable.proto */
1293 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1294 
1295 /* SetupReduce.proto */
1296 static int __Pyx_setup_reduce(PyObject* type_obj);
1297 
1298 /* PyFloatBinop.proto */
1299 #if !CYTHON_COMPILING_IN_PYPY
1300 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
1301 #else
1302 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
1303  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1304  #endif
1305 
1306 /* BytesEquals.proto */
1307 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1308 
1309 /* UnicodeEquals.proto */
1310 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1311 
1312 /* StrEquals.proto */
1313 #if PY_MAJOR_VERSION >= 3
1314 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1315 #else
1316 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1317 #endif
1318 
1319 /* CLineInTraceback.proto */
1320 #ifdef CYTHON_CLINE_IN_TRACEBACK
1321 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1322 #else
1323 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1324 #endif
1325 
1326 /* CodeObjectCache.proto */
1327 typedef struct {
1328  PyCodeObject* code_object;
1329  int code_line;
1330 } __Pyx_CodeObjectCacheEntry;
1331 struct __Pyx_CodeObjectCache {
1332  int count;
1333  int max_count;
1334  __Pyx_CodeObjectCacheEntry* entries;
1335 };
1336 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1337 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1338 static PyCodeObject *__pyx_find_code_object(int code_line);
1339 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1340 
1341 /* AddTraceback.proto */
1342 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1343  int py_line, const char *filename);
1344 
1345 /* CppExceptionConversion.proto */
1346 #ifndef __Pyx_CppExn2PyErr
1347 #include <new>
1348 #include <typeinfo>
1349 #include <stdexcept>
1350 #include <ios>
1351 static void __Pyx_CppExn2PyErr() {
1352  try {
1353  if (PyErr_Occurred())
1354  ; // let the latest Python exn pass through and ignore the current one
1355  else
1356  throw;
1357  } catch (const std::bad_alloc& exn) {
1358  PyErr_SetString(PyExc_MemoryError, exn.what());
1359  } catch (const std::bad_cast& exn) {
1360  PyErr_SetString(PyExc_TypeError, exn.what());
1361  } catch (const std::bad_typeid& exn) {
1362  PyErr_SetString(PyExc_TypeError, exn.what());
1363  } catch (const std::domain_error& exn) {
1364  PyErr_SetString(PyExc_ValueError, exn.what());
1365  } catch (const std::invalid_argument& exn) {
1366  PyErr_SetString(PyExc_ValueError, exn.what());
1367  } catch (const std::ios_base::failure& exn) {
1368  PyErr_SetString(PyExc_IOError, exn.what());
1369  } catch (const std::out_of_range& exn) {
1370  PyErr_SetString(PyExc_IndexError, exn.what());
1371  } catch (const std::overflow_error& exn) {
1372  PyErr_SetString(PyExc_OverflowError, exn.what());
1373  } catch (const std::range_error& exn) {
1374  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1375  } catch (const std::underflow_error& exn) {
1376  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1377  } catch (const std::exception& exn) {
1378  PyErr_SetString(PyExc_RuntimeError, exn.what());
1379  }
1380  catch (...)
1381  {
1382  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1383  }
1384 }
1385 #endif
1386 
1387 /* CIntToPy.proto */
1388 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1389 
1390 /* CIntFromPy.proto */
1391 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1392 
1393 /* CIntToPy.proto */
1394 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1395 
1396 /* CIntFromPy.proto */
1397 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1398 
1399 /* FastTypeChecks.proto */
1400 #if CYTHON_COMPILING_IN_CPYTHON
1401 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1402 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1403 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1404 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1405 #else
1406 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1407 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1408 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1409 #endif
1410 
1411 /* FetchCommonType.proto */
1412 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1413 
1414 /* SwapException.proto */
1415 #if CYTHON_FAST_THREAD_STATE
1416 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1417 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1418 #else
1419 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1420 #endif
1421 
1422 /* PyObjectCallMethod1.proto */
1423 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1424 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
1425 
1426 /* CoroutineBase.proto */
1427 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1428 typedef struct {
1429  PyObject_HEAD
1430  __pyx_coroutine_body_t body;
1431  PyObject *closure;
1432  PyObject *exc_type;
1433  PyObject *exc_value;
1434  PyObject *exc_traceback;
1435  PyObject *gi_weakreflist;
1436  PyObject *classobj;
1437  PyObject *yieldfrom;
1438  PyObject *gi_name;
1439  PyObject *gi_qualname;
1440  PyObject *gi_modulename;
1441  int resume_label;
1442  char is_running;
1443 } __pyx_CoroutineObject;
1444 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1445  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
1446  PyObject *name, PyObject *qualname, PyObject *module_name);
1447 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1448  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
1449  PyObject *name, PyObject *qualname, PyObject *module_name);
1450 static int __Pyx_Coroutine_clear(PyObject *self);
1451 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1452 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1453 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1454 #define __Pyx_Coroutine_SwapException(self) {\
1455  __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
1456  __Pyx_Coroutine_ResetFrameBackpointer(self);\
1457  }
1458 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1459  __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
1460  (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
1461  }
1462 #if CYTHON_FAST_THREAD_STATE
1463 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1464  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1465 #else
1466 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1467  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1468 #endif
1469 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1470 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
1471 
1472 /* PatchModuleWithCoroutine.proto */
1473 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1474 
1475 /* PatchGeneratorABC.proto */
1476 static int __Pyx_patch_abc(void);
1477 
1478 /* Generator.proto */
1479 #define __Pyx_Generator_USED
1480 static PyTypeObject *__pyx_GeneratorType = 0;
1481 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1482 #define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
1483  __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
1484 static PyObject *__Pyx_Generator_Next(PyObject *self);
1485 static int __pyx_Generator_init(void);
1486 
1487 /* CheckBinaryVersion.proto */
1488 static int __Pyx_check_binary_version(void);
1489 
1490 /* InitStrings.proto */
1491 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1492 
1493 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1494 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1495 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1496 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1497 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1498 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1499 
1500 /* Module declarations from 'libcpp.vector' */
1501 
1502 /* Module declarations from 'glucat' */
1503 
1504 /* Module declarations from 'PyClical' */
1505 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1506 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1507 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1508 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1509 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1510 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1511 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1512 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1513 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1514 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1515 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1516 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1517 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1518 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1519 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1520 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1521 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1522 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1523 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1524 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1525 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1526 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1527 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1528 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1529 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1530 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1531 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1532 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1533 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1534 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1535 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1536 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1537 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1538 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1539 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1540 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1541 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1542 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1543 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1544 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1545 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1546 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*/
1547 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1548 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1549 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1550 #define __Pyx_MODULE_NAME "PyClical"
1551 extern int __pyx_module_is_main_PyClical;
1552 int __pyx_module_is_main_PyClical = 0;
1553 
1554 /* Implementation of 'PyClical' */
1555 static PyObject *__pyx_builtin_IndexError;
1556 static PyObject *__pyx_builtin_RuntimeError;
1557 static PyObject *__pyx_builtin_TypeError;
1558 static PyObject *__pyx_builtin_ValueError;
1559 static PyObject *__pyx_builtin_NotImplemented;
1560 static PyObject *__pyx_builtin_range;
1561 static PyObject *__pyx_builtin_xrange;
1562 static const char __pyx_k_[] = ".";
1563 static const char __pyx_k_e[] = "e";
1564 static const char __pyx_k_i[] = "i";
1565 static const char __pyx_k_m[] = "m";
1566 static const char __pyx_k_p[] = "p";
1567 static const char __pyx_k_q[] = "q";
1568 static const char __pyx_k__2[] = " ";
1569 static const char __pyx_k__5[] = ":";
1570 static const char __pyx_k__6[] = "\n\t";
1571 static const char __pyx_k__7[] = " (";
1572 static const char __pyx_k__8[] = ", ";
1573 static const char __pyx_k__9[] = ").";
1574 static const char __pyx_k_cl[] = "cl";
1575 static const char __pyx_k_pi[] = "pi";
1576 static const char __pyx_k_cos[] = "cos";
1577 static const char __pyx_k_exp[] = "exp";
1578 static const char __pyx_k_frm[] = "frm";
1579 static const char __pyx_k_inv[] = "inv";
1580 static const char __pyx_k_ist[] = "ist";
1581 static const char __pyx_k_ixt[] = "ixt";
1582 static const char __pyx_k_lhs[] = "lhs";
1583 static const char __pyx_k_log[] = "log";
1584 static const char __pyx_k_max[] = "max";
1585 static const char __pyx_k_min[] = "min";
1586 static const char __pyx_k_obj[] = "obj";
1587 static const char __pyx_k_odd[] = "odd";
1588 static const char __pyx_k_pow[] = "pow";
1589 static const char __pyx_k_rhs[] = "rhs";
1590 static const char __pyx_k_sin[] = "sin";
1591 static const char __pyx_k_tan[] = "tan";
1592 static const char __pyx_k_tau[] = "tau";
1593 static const char __pyx_k_Real[] = "Real";
1594 static const char __pyx_k_acos[] = "acos";
1595 static const char __pyx_k_args[] = "args";
1596 static const char __pyx_k_asin[] = "asin";
1597 static const char __pyx_k_atan[] = "atan";
1598 static const char __pyx_k_conj[] = "conj";
1599 static const char __pyx_k_copy[] = "copy";
1600 static const char __pyx_k_cosh[] = "cosh";
1601 static const char __pyx_k_even[] = "even";
1602 static const char __pyx_k_fill[] = "fill";
1603 static const char __pyx_k_from[] = " from ";
1604 static const char __pyx_k_iter[] = "__iter__";
1605 static const char __pyx_k_main[] = "__main__";
1606 static const char __pyx_k_math[] = "math";
1607 static const char __pyx_k_name[] = "__name__";
1608 static const char __pyx_k_norm[] = "norm";
1609 static const char __pyx_k_pure[] = "pure";
1610 static const char __pyx_k_quad[] = "quad";
1611 static const char __pyx_k_send[] = "send";
1612 static const char __pyx_k_sinh[] = "sinh";
1613 static const char __pyx_k_sqrt[] = "sqrt";
1614 static const char __pyx_k_tanh[] = "tanh";
1615 static const char __pyx_k_test[] = "_test";
1616 static const char __pyx_k_0_8_2[] = "0.8.2";
1617 static const char __pyx_k_acosh[] = "acosh";
1618 static const char __pyx_k_asinh[] = "asinh";
1619 static const char __pyx_k_atanh[] = "atanh";
1620 static const char __pyx_k_close[] = "close";
1621 static const char __pyx_k_grade[] = "grade";
1622 static const char __pyx_k_istpq[] = "istpq";
1623 static const char __pyx_k_nbar3[] = "nbar3";
1624 static const char __pyx_k_ninf3[] = "ninf3";
1625 static const char __pyx_k_other[] = "other";
1626 static const char __pyx_k_range[] = "range";
1627 static const char __pyx_k_throw[] = "throw";
1628 static const char __pyx_k_using[] = " using (";
1629 static const char __pyx_k_value[] = " value ";
1630 static const char __pyx_k_import[] = "__import__";
1631 static const char __pyx_k_reduce[] = "__reduce__";
1632 static const char __pyx_k_scalar[] = "scalar";
1633 static const char __pyx_k_test_2[] = "__test__";
1634 static const char __pyx_k_xrange[] = "xrange";
1635 static const char __pyx_k_doctest[] = "doctest";
1636 static const char __pyx_k_invalid[] = " invalid ";
1637 static const char __pyx_k_numbers[] = "numbers";
1638 static const char __pyx_k_reverse[] = "reverse";
1639 static const char __pyx_k_testmod[] = "testmod";
1640 static const char __pyx_k_version[] = "__version__";
1641 static const char __pyx_k_Integral[] = "Integral";
1642 static const char __pyx_k_PyClical[] = "PyClical";
1643 static const char __pyx_k_Sequence[] = "Sequence";
1644 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1645 static const char __pyx_k_getstate[] = "__getstate__";
1646 static const char __pyx_k_involute[] = "involute";
1647 static const char __pyx_k_setstate[] = "__setstate__";
1648 static const char __pyx_k_to_frame[] = " to frame ";
1649 static const char __pyx_k_TypeError[] = "TypeError";
1650 static const char __pyx_k_outer_pow[] = "outer_pow";
1651 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1652 static const char __pyx_k_IndexError[] = "IndexError";
1653 static const char __pyx_k_ValueError[] = "ValueError";
1654 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1655 static const char __pyx_k_collections[] = "collections";
1656 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1657 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1658 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1659 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1660 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1661 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1662 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1663 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1664 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1665 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1666 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1667 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1668 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1669 static const char __pyx_k_using_invalid[] = " using invalid ";
1670 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1671 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1672 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1673 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1674 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1675 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1676 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1677 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1678 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1679 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1680 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1681 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1682 static const char __pyx_k_invalid_string[] = " invalid string ";
1683 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1684 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1685 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1686 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1687 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1688 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1689 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1690 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1691 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1692 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1693 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1694 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1695 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1696 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1697 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1698 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1699 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1700 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1701 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1702 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1703 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1704 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1705 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1706 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1707 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1708 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1709 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1710 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1711 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1712 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1713 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1714 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1715 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1716 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1717 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1718 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1719 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1720 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1721 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1722 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1723 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1724 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1725 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1726 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1727 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1728 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1729 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1730 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1731 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1732 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1733 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1734 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1735 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1736 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1737 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1738 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1739 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1740 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1741 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1742 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1743 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1744 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1745 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1746 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1747 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1748 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1749 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1750 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1751 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1752 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1753 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1754 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1755 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1756 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1757 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1758 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1759 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1760 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1761 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1762 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1763 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1764 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1765 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1766 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1767 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1768 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1769 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1770 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1771 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1772 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 ";
1773 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 ";
1774 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 ";
1775 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 ";
1776 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 ";
1777 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 ";
1778 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 ";
1779 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 ";
1780 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 ";
1781 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 ";
1782 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 ";
1783 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 ";
1784 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 ";
1785 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 ";
1786 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 ";
1787 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 ";
1788 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 ";
1789 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 ";
1790 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 ";
1791 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 ";
1792 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 ";
1793 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1794 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1795 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1796 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 ";
1797 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 ";
1798 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 ";
1799 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 ";
1800 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 ";
1801 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 ";
1802 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 ";
1803 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 ";
1804 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 ";
1805 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 ";
1806 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 ";
1807 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 ";
1808 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 ";
1809 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 ";
1810 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 ";
1811 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 ";
1812 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 ";
1813 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 ";
1814 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 ";
1815 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 ";
1816 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 ";
1817 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 ";
1818 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 ";
1819 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 ";
1820 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 ";
1821 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 ";
1822 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 ";
1823 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 ";
1824 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 ";
1825 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 ";
1826 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 ";
1827 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 ";
1828 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 ";
1829 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 ";
1830 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 ";
1831 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 ";
1832 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 ";
1833 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 ";
1834 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 ";
1835 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 ";
1836 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 ";
1837 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 ";
1838 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 ";
1839 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 ";
1840 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 ";
1841 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 ";
1842 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 ";
1843 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 ";
1844 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 ";
1845 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 ";
1846 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 ";
1847 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 ";
1848 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 ";
1849 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 ";
1850 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 ";
1851 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 ";
1852 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 ";
1853 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 ";
1854 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 ";
1855 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 ";
1856 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 ";
1857 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 ";
1858 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 ";
1859 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 ";
1860 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 ";
1861 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 ";
1862 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 ";
1863 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 ";
1864  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 ";
1865  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 ";
1866  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
1867  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 ";
1868  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
1869  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 ";
1870  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
1871  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
1872  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 ";
1873  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 ";
1874  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 ";
1875  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 ";
1876  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 ";
1877  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
1878  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
1879  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
1880  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
1881  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 ";
1882  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 ";
1883  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 ";
1884  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 ";
1885  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 ";
1886  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 ";
1887  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 ";
1888  static PyObject *__pyx_kp_s_;
1889  static PyObject *__pyx_kp_s_0_8_2;
1890  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1891  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1892  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1893  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1894  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1895  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1896  static PyObject *__pyx_kp_s_Cannot_reframe;
1897  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1898  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1899  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1900  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1901  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1902  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1903  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1904  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1905  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1906  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1907  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1908  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1909  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1910  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1911  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1912  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1913  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1914  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1915  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1916  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1917  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1918  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1919  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1920  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1921  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1922  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1923  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1924  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1925  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1926  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1927  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1928  static PyObject *__pyx_n_s_IndexError;
1929  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1930  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1931  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1932  static PyObject *__pyx_n_s_Integral;
1933  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1934  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1935  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1936  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1937  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1938  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1939  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1940  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1941  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1942  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1943  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1944  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1945  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1946  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1947  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1948  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1949  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1950  static PyObject *__pyx_n_s_NotImplemented;
1951  static PyObject *__pyx_kp_s_Not_applicable;
1952  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1953  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1954  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1955  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1956  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1957  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1958  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1959  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1960  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1961  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1962  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1963  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1964  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1965  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1966  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1967  static PyObject *__pyx_n_s_PyClical;
1968  static PyObject *__pyx_kp_s_PyClical_pyx;
1969  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1970  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1971  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1972  static PyObject *__pyx_n_s_Real;
1973  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1974  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1975  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1976  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1977  static PyObject *__pyx_n_s_RuntimeError;
1978  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1979  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1980  static PyObject *__pyx_n_s_Sequence;
1981  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1982  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1983  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1984  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1985  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1986  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1987  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1988  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1989  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1990  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1991  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1992  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1993  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1994  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1995  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1996  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1997  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1998  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1999  static PyObject *__pyx_kp_u_The_informal_string_representat;
2000  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2001  static PyObject *__pyx_kp_u_The_official_string_representat;
2002  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2003  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2004  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2005  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2006  static PyObject *__pyx_n_s_TypeError;
2007  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2008  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2009  static PyObject *__pyx_n_s_ValueError;
2010  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2011  static PyObject *__pyx_kp_s__2;
2012  static PyObject *__pyx_kp_s__5;
2013  static PyObject *__pyx_kp_s__6;
2014  static PyObject *__pyx_kp_s__7;
2015  static PyObject *__pyx_kp_s__8;
2016  static PyObject *__pyx_kp_s__9;
2017  static PyObject *__pyx_kp_u_abs_line_1473;
2018  static PyObject *__pyx_n_s_acos;
2019  static PyObject *__pyx_kp_u_acos_line_1619;
2020  static PyObject *__pyx_n_s_acosh;
2021  static PyObject *__pyx_kp_u_acosh_line_1656;
2022  static PyObject *__pyx_kp_u_agc3_line_1844;
2023  static PyObject *__pyx_n_s_args;
2024  static PyObject *__pyx_kp_s_as_frame;
2025  static PyObject *__pyx_n_s_asin;
2026  static PyObject *__pyx_kp_u_asin_line_1698;
2027  static PyObject *__pyx_n_s_asinh;
2028  static PyObject *__pyx_kp_u_asinh_line_1733;
2029  static PyObject *__pyx_n_s_atan;
2030  static PyObject *__pyx_kp_u_atan_line_1769;
2031  static PyObject *__pyx_n_s_atanh;
2032  static PyObject *__pyx_kp_u_atanh_line_1798;
2033  static PyObject *__pyx_kp_u_cga3_line_1824;
2034  static PyObject *__pyx_kp_u_cga3std_line_1833;
2035  static PyObject *__pyx_n_s_cl;
2036  static PyObject *__pyx_kp_u_clifford___add___line_739;
2037  static PyObject *__pyx_kp_u_clifford___and___line_835;
2038  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2039  static PyObject *__pyx_kp_u_clifford___div___line_895;
2040  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2041  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2042  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2043  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2044  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2045  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2046  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2047  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2048  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2049  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2050  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2051  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2052  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2053  static PyObject *__pyx_kp_u_clifford___or___line_938;
2054  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2055  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2056  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2057  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2058  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2059  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2060  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2061  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2062  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2063  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2064  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2065  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2066  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2067  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2068  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2069  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2070  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2071  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2072  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2073  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2074  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2075  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2076  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2077  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2078  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2079  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2080  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2081  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2082  static PyObject *__pyx_n_s_cline_in_traceback;
2083  static PyObject *__pyx_n_s_close;
2084  static PyObject *__pyx_n_s_collections;
2085  static PyObject *__pyx_kp_u_compare_line_490;
2086  static PyObject *__pyx_kp_u_complexifier_line_1527;
2087  static PyObject *__pyx_n_s_conj;
2088  static PyObject *__pyx_kp_u_conj_line_1436;
2089  static PyObject *__pyx_n_s_copy;
2090  static PyObject *__pyx_n_s_cos;
2091  static PyObject *__pyx_kp_u_cos_line_1602;
2092  static PyObject *__pyx_n_s_cosh;
2093  static PyObject *__pyx_kp_u_cosh_line_1640;
2094  static PyObject *__pyx_n_s_doctest;
2095  static PyObject *__pyx_n_s_e;
2096  static PyObject *__pyx_kp_u_e_line_1887;
2097  static PyObject *__pyx_n_s_even;
2098  static PyObject *__pyx_kp_u_even_line_1388;
2099  static PyObject *__pyx_n_s_exp;
2100  static PyObject *__pyx_kp_u_exp_line_1565;
2101  static PyObject *__pyx_n_s_fill;
2102  static PyObject *__pyx_n_s_frm;
2103  static PyObject *__pyx_kp_s_from;
2104  static PyObject *__pyx_n_s_getstate;
2105  static PyObject *__pyx_n_s_grade;
2106  static PyObject *__pyx_n_s_i;
2107  static PyObject *__pyx_kp_u_imag_line_1366;
2108  static PyObject *__pyx_n_s_import;
2109  static PyObject *__pyx_kp_u_index_set___and___line_269;
2110  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2111  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2112  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2113  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2114  static PyObject *__pyx_n_s_index_set___iter;
2115  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2116  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2117  static PyObject *__pyx_kp_u_index_set___or___line_291;
2118  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2119  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2120  static PyObject *__pyx_kp_u_index_set___str___line_393;
2121  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2122  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2123  static PyObject *__pyx_kp_u_index_set_count_line_313;
2124  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2125  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2126  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2127  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2128  static PyObject *__pyx_kp_u_index_set_max_line_349;
2129  static PyObject *__pyx_kp_u_index_set_min_line_340;
2130  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2131  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2132  static PyObject *__pyx_n_s_inv;
2133  static PyObject *__pyx_kp_u_inv_line_1329;
2134  static PyObject *__pyx_kp_s_invalid;
2135  static PyObject *__pyx_kp_s_invalid_string;
2136  static PyObject *__pyx_n_s_involute;
2137  static PyObject *__pyx_kp_u_involute_line_1406;
2138  static PyObject *__pyx_n_s_ist;
2139  static PyObject *__pyx_n_s_istpq;
2140  static PyObject *__pyx_kp_u_istpq_line_1900;
2141  static PyObject *__pyx_n_s_iter;
2142  static PyObject *__pyx_n_s_ixt;
2143  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2144  static PyObject *__pyx_n_s_lhs;
2145  static PyObject *__pyx_n_s_log;
2146  static PyObject *__pyx_kp_u_log_line_1579;
2147  static PyObject *__pyx_n_s_m;
2148  static PyObject *__pyx_n_s_main;
2149  static PyObject *__pyx_n_s_math;
2150  static PyObject *__pyx_n_s_max;
2151  static PyObject *__pyx_kp_u_max_abs_line_1482;
2152  static PyObject *__pyx_kp_u_max_pos_line_511;
2153  static PyObject *__pyx_n_s_min;
2154  static PyObject *__pyx_kp_u_min_neg_line_502;
2155  static PyObject *__pyx_n_s_name;
2156  static PyObject *__pyx_n_s_nbar3;
2157  static PyObject *__pyx_n_s_ninf3;
2158  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2159  static PyObject *__pyx_n_s_norm;
2160  static PyObject *__pyx_kp_u_norm_line_1462;
2161  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2162  static PyObject *__pyx_n_s_numbers;
2163  static PyObject *__pyx_n_s_obj;
2164  static PyObject *__pyx_n_s_odd;
2165  static PyObject *__pyx_kp_u_odd_line_1397;
2166  static PyObject *__pyx_n_s_other;
2167  static PyObject *__pyx_n_s_outer_pow;
2168  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2169  static PyObject *__pyx_n_s_p;
2170  static PyObject *__pyx_n_s_pi;
2171  static PyObject *__pyx_n_s_pow;
2172  static PyObject *__pyx_kp_u_pow_line_1494;
2173  static PyObject *__pyx_n_s_pure;
2174  static PyObject *__pyx_kp_u_pure_line_1377;
2175  static PyObject *__pyx_n_s_pyx_vtable;
2176  static PyObject *__pyx_n_s_q;
2177  static PyObject *__pyx_n_s_quad;
2178  static PyObject *__pyx_kp_u_quad_line_1451;
2179  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2180  static PyObject *__pyx_n_s_range;
2181  static PyObject *__pyx_kp_u_real_line_1355;
2182  static PyObject *__pyx_n_s_reduce;
2183  static PyObject *__pyx_n_s_reduce_cython;
2184  static PyObject *__pyx_n_s_reduce_ex;
2185  static PyObject *__pyx_n_s_reverse;
2186  static PyObject *__pyx_kp_u_reverse_line_1421;
2187  static PyObject *__pyx_n_s_rhs;
2188  static PyObject *__pyx_n_s_scalar;
2189  static PyObject *__pyx_kp_u_scalar_line_1344;
2190  static PyObject *__pyx_n_s_send;
2191  static PyObject *__pyx_n_s_setstate;
2192  static PyObject *__pyx_n_s_setstate_cython;
2193  static PyObject *__pyx_n_s_sin;
2194  static PyObject *__pyx_kp_u_sin_line_1679;
2195  static PyObject *__pyx_n_s_sinh;
2196  static PyObject *__pyx_kp_u_sinh_line_1719;
2197  static PyObject *__pyx_n_s_sqrt;
2198  static PyObject *__pyx_kp_u_sqrt_line_1542;
2199  static PyObject *__pyx_n_s_tan;
2200  static PyObject *__pyx_kp_u_tan_line_1752;
2201  static PyObject *__pyx_n_s_tanh;
2202  static PyObject *__pyx_kp_u_tanh_line_1786;
2203  static PyObject *__pyx_n_s_tau;
2204  static PyObject *__pyx_n_s_test;
2205  static PyObject *__pyx_n_s_test_2;
2206  static PyObject *__pyx_n_s_testmod;
2207  static PyObject *__pyx_n_s_throw;
2208  static PyObject *__pyx_kp_s_to_frame;
2209  static PyObject *__pyx_kp_s_using;
2210  static PyObject *__pyx_kp_s_using_invalid;
2211  static PyObject *__pyx_kp_s_value;
2212  static PyObject *__pyx_n_s_version;
2213  static PyObject *__pyx_n_s_xrange;
2214 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2215 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2216 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2217 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2218 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 */
2219 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2220 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2221 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2222 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2223 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2224 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2225 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2226 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2227 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2228 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2229 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2230 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2231 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2232 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2233 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2234 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2235 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2236 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2237 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2238 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2239 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2240 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 */
2241 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2242 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2243 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2244 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2245 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2246 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 */
2247 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2248 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 */
2249 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2250 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2251 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2252 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2253 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2254 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2255 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2256 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2257 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2258 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2259 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2260 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2261 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2262 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2263 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2264 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2265 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2266 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2267 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2268 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2269 #endif
2270 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2271 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2272 #endif
2273 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2274 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2275 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2276 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2277 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2278 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2279 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2280 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2281 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2282 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2283 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2284 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2285 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2286 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2287 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2288 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2289 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2290 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2291 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2292 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2293 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2294 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2295 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2296 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2297 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2298 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 */
2299 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2300 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2301 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2302 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2303 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2304 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2305 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2306 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2307 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2308 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2309 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2310 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2311 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2312 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2313 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2314 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2315 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2316 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2317 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2318 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2319 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2320 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2321 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2322 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2323 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2324 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2325 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2326 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2327 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2328 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2329 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2330 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2331 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2332 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 */
2333 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2334 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2335 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2336 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2337 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2338 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2339 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2340 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2341 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2342 static PyObject *__pyx_float_0_0;
2343 static PyObject *__pyx_float_1_0;
2344 static PyObject *__pyx_float_2_0;
2345 static PyObject *__pyx_float_8_0;
2346 static PyObject *__pyx_int_0;
2347 static PyObject *__pyx_int_1;
2348 static PyObject *__pyx_int_4;
2349 static PyObject *__pyx_int_neg_1;
2350 static PyObject *__pyx_tuple__3;
2351 static PyObject *__pyx_tuple__4;
2352 static PyObject *__pyx_tuple__10;
2353 static PyObject *__pyx_tuple__11;
2354 static PyObject *__pyx_tuple__12;
2355 static PyObject *__pyx_tuple__13;
2356 static PyObject *__pyx_tuple__16;
2357 static PyObject *__pyx_tuple__17;
2358 static PyObject *__pyx_tuple__19;
2359 static PyObject *__pyx_tuple__21;
2360 static PyObject *__pyx_tuple__22;
2361 static PyObject *__pyx_tuple__23;
2362 static PyObject *__pyx_tuple__24;
2363 static PyObject *__pyx_tuple__25;
2364 static PyObject *__pyx_codeobj__14;
2365 static PyObject *__pyx_codeobj__15;
2366 static PyObject *__pyx_codeobj__18;
2367 static PyObject *__pyx_codeobj__20;
2368 static PyObject *__pyx_codeobj__26;
2369 
2370 /* "PyClical.pyx":39
2371  * cdef class index_set
2372  *
2373  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2374  * """
2375  * Return the C++ IndexSet instance wrapped by index_set(obj).
2376  */
2377 
2378 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2379  IndexSet __pyx_r;
2380  __Pyx_RefNannyDeclarations
2381  PyObject *__pyx_t_1 = NULL;
2382  PyObject *__pyx_t_2 = NULL;
2383  __Pyx_RefNannySetupContext("toIndexSet", 0);
2384 
2385  /* "PyClical.pyx":43
2386  * Return the C++ IndexSet instance wrapped by index_set(obj).
2387  * """
2388  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2389  *
2390  * cdef class index_set:
2391  */
2392  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
2393  __Pyx_GOTREF(__pyx_t_1);
2394  __Pyx_INCREF(__pyx_v_obj);
2395  __Pyx_GIVEREF(__pyx_v_obj);
2396  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
2397  __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)
2398  __Pyx_GOTREF(__pyx_t_2);
2399  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2400  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
2401  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2402  goto __pyx_L0;
2403 
2404  /* "PyClical.pyx":39
2405  * cdef class index_set
2406  *
2407  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2408  * """
2409  * Return the C++ IndexSet instance wrapped by index_set(obj).
2410  */
2411 
2412  /* function exit code */
2413  __pyx_L1_error:;
2414  __Pyx_XDECREF(__pyx_t_1);
2415  __Pyx_XDECREF(__pyx_t_2);
2416  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2417  __Pyx_pretend_to_initialize(&__pyx_r);
2418  __pyx_L0:;
2419  __Pyx_RefNannyFinishContext();
2420  return __pyx_r;
2421 }
2422 
2423 /* "PyClical.pyx":51
2424  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2425  *
2426  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2427  * """
2428  * Wrap an instance of the C++ class IndexSet.
2429  */
2430 
2431 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2432  PyObject *__pyx_r = NULL;
2433  __Pyx_RefNannyDeclarations
2434  __Pyx_RefNannySetupContext("wrap", 0);
2435 
2436  /* "PyClical.pyx":55
2437  * Wrap an instance of the C++ class IndexSet.
2438  * """
2439  * self.instance[0] = other # <<<<<<<<<<<<<<
2440  * return self
2441  *
2442  */
2443  (__pyx_v_self->instance[0]) = __pyx_v_other;
2444 
2445  /* "PyClical.pyx":56
2446  * """
2447  * self.instance[0] = other
2448  * return self # <<<<<<<<<<<<<<
2449  *
2450  * cdef inline IndexSet unwrap(index_set self):
2451  */
2452  __Pyx_XDECREF(__pyx_r);
2453  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2454  __pyx_r = ((PyObject *)__pyx_v_self);
2455  goto __pyx_L0;
2456 
2457  /* "PyClical.pyx":51
2458  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2459  *
2460  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2461  * """
2462  * Wrap an instance of the C++ class IndexSet.
2463  */
2464 
2465  /* function exit code */
2466  __pyx_L0:;
2467  __Pyx_XGIVEREF(__pyx_r);
2468  __Pyx_RefNannyFinishContext();
2469  return __pyx_r;
2470 }
2471 
2472 /* "PyClical.pyx":58
2473  * return self
2474  *
2475  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2476  * """
2477  * Return the wrapped C++ IndexSet instance.
2478  */
2479 
2480 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2481  IndexSet __pyx_r;
2482  __Pyx_RefNannyDeclarations
2483  __Pyx_RefNannySetupContext("unwrap", 0);
2484 
2485  /* "PyClical.pyx":62
2486  * Return the wrapped C++ IndexSet instance.
2487  * """
2488  * return self.instance[0] # <<<<<<<<<<<<<<
2489  *
2490  * cpdef copy(index_set self):
2491  */
2492  __pyx_r = (__pyx_v_self->instance[0]);
2493  goto __pyx_L0;
2494 
2495  /* "PyClical.pyx":58
2496  * return self
2497  *
2498  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2499  * """
2500  * Return the wrapped C++ IndexSet instance.
2501  */
2502 
2503  /* function exit code */
2504  __pyx_L0:;
2505  __Pyx_RefNannyFinishContext();
2506  return __pyx_r;
2507 }
2508 
2509 /* "PyClical.pyx":64
2510  * return self.instance[0]
2511  *
2512  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2513  * """
2514  * Copy this index_set object.
2515  */
2516 
2517 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2518 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2519  PyObject *__pyx_r = NULL;
2520  __Pyx_RefNannyDeclarations
2521  PyObject *__pyx_t_1 = NULL;
2522  PyObject *__pyx_t_2 = NULL;
2523  PyObject *__pyx_t_3 = NULL;
2524  PyObject *__pyx_t_4 = NULL;
2525  __Pyx_RefNannySetupContext("copy", 0);
2526  /* Check if called by wrapper */
2527  if (unlikely(__pyx_skip_dispatch)) ;
2528  /* Check if overridden in Python */
2529  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2530  __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)
2531  __Pyx_GOTREF(__pyx_t_1);
2532  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2533  __Pyx_XDECREF(__pyx_r);
2534  __Pyx_INCREF(__pyx_t_1);
2535  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2536  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2537  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2538  if (likely(__pyx_t_4)) {
2539  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2540  __Pyx_INCREF(__pyx_t_4);
2541  __Pyx_INCREF(function);
2542  __Pyx_DECREF_SET(__pyx_t_3, function);
2543  }
2544  }
2545  if (__pyx_t_4) {
2546  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2547  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2548  } else {
2549  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2550  }
2551  __Pyx_GOTREF(__pyx_t_2);
2552  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2553  __pyx_r = __pyx_t_2;
2554  __pyx_t_2 = 0;
2555  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2556  goto __pyx_L0;
2557  }
2558  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2559  }
2560 
2561  /* "PyClical.pyx":71
2562  * {1}
2563  * """
2564  * return index_set(self) # <<<<<<<<<<<<<<
2565  *
2566  * def __cinit__(self, other = 0):
2567  */
2568  __Pyx_XDECREF(__pyx_r);
2569  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2570  __Pyx_GOTREF(__pyx_t_1);
2571  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2572  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
2573  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
2574  __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)
2575  __Pyx_GOTREF(__pyx_t_2);
2576  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2577  __pyx_r = __pyx_t_2;
2578  __pyx_t_2 = 0;
2579  goto __pyx_L0;
2580 
2581  /* "PyClical.pyx":64
2582  * return self.instance[0]
2583  *
2584  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2585  * """
2586  * Copy this index_set object.
2587  */
2588 
2589  /* function exit code */
2590  __pyx_L1_error:;
2591  __Pyx_XDECREF(__pyx_t_1);
2592  __Pyx_XDECREF(__pyx_t_2);
2593  __Pyx_XDECREF(__pyx_t_3);
2594  __Pyx_XDECREF(__pyx_t_4);
2595  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2596  __pyx_r = 0;
2597  __pyx_L0:;
2598  __Pyx_XGIVEREF(__pyx_r);
2599  __Pyx_RefNannyFinishContext();
2600  return __pyx_r;
2601 }
2602 
2603 /* Python wrapper */
2604 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2605 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 ";
2606 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2607  PyObject *__pyx_r = 0;
2608  __Pyx_RefNannyDeclarations
2609  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2610  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2611 
2612  /* function exit code */
2613  __Pyx_RefNannyFinishContext();
2614  return __pyx_r;
2615 }
2616 
2617 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2618  PyObject *__pyx_r = NULL;
2619  __Pyx_RefNannyDeclarations
2620  PyObject *__pyx_t_1 = NULL;
2621  __Pyx_RefNannySetupContext("copy", 0);
2622  __Pyx_XDECREF(__pyx_r);
2623  __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)
2624  __Pyx_GOTREF(__pyx_t_1);
2625  __pyx_r = __pyx_t_1;
2626  __pyx_t_1 = 0;
2627  goto __pyx_L0;
2628 
2629  /* function exit code */
2630  __pyx_L1_error:;
2631  __Pyx_XDECREF(__pyx_t_1);
2632  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2633  __pyx_r = NULL;
2634  __pyx_L0:;
2635  __Pyx_XGIVEREF(__pyx_r);
2636  __Pyx_RefNannyFinishContext();
2637  return __pyx_r;
2638 }
2639 
2640 /* "PyClical.pyx":73
2641  * return index_set(self)
2642  *
2643  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2644  * """
2645  * Construct an object of type index_set.
2646  */
2647 
2648 /* Python wrapper */
2649 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2650 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2651  PyObject *__pyx_v_other = 0;
2652  int __pyx_r;
2653  __Pyx_RefNannyDeclarations
2654  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2655  {
2656  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2657  PyObject* values[1] = {0};
2658  values[0] = ((PyObject *)__pyx_int_0);
2659  if (unlikely(__pyx_kwds)) {
2660  Py_ssize_t kw_args;
2661  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2662  switch (pos_args) {
2663  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2664  CYTHON_FALLTHROUGH;
2665  case 0: break;
2666  default: goto __pyx_L5_argtuple_error;
2667  }
2668  kw_args = PyDict_Size(__pyx_kwds);
2669  switch (pos_args) {
2670  case 0:
2671  if (kw_args > 0) {
2672  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2673  if (value) { values[0] = value; kw_args--; }
2674  }
2675  }
2676  if (unlikely(kw_args > 0)) {
2677  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2678  }
2679  } else {
2680  switch (PyTuple_GET_SIZE(__pyx_args)) {
2681  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2682  CYTHON_FALLTHROUGH;
2683  case 0: break;
2684  default: goto __pyx_L5_argtuple_error;
2685  }
2686  }
2687  __pyx_v_other = values[0];
2688  }
2689  goto __pyx_L4_argument_unpacking_done;
2690  __pyx_L5_argtuple_error:;
2691  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2692  __pyx_L3_error:;
2693  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2694  __Pyx_RefNannyFinishContext();
2695  return -1;
2696  __pyx_L4_argument_unpacking_done:;
2697  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2698 
2699  /* function exit code */
2700  __Pyx_RefNannyFinishContext();
2701  return __pyx_r;
2702 }
2703 
2704 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2705  PyObject *__pyx_v_error_msg_prefix = NULL;
2706  PyObject *__pyx_v_idx = NULL;
2707  int __pyx_r;
2708  __Pyx_RefNannyDeclarations
2709  int __pyx_t_1;
2710  int __pyx_t_2;
2711  IndexSet *__pyx_t_3;
2712  PyObject *__pyx_t_4 = NULL;
2713  PyObject *__pyx_t_5 = NULL;
2714  int __pyx_t_6;
2715  int __pyx_t_7;
2716  PyObject *__pyx_t_8 = NULL;
2717  PyObject *__pyx_t_9 = NULL;
2718  PyObject *__pyx_t_10 = NULL;
2719  Py_ssize_t __pyx_t_11;
2720  PyObject *(*__pyx_t_12)(PyObject *);
2721  PyObject *__pyx_t_13 = NULL;
2722  PyObject *__pyx_t_14 = NULL;
2723  PyObject *__pyx_t_15 = NULL;
2724  PyObject *__pyx_t_16 = NULL;
2725  char *__pyx_t_17;
2726  __Pyx_RefNannySetupContext("__cinit__", 0);
2727 
2728  /* "PyClical.pyx":92
2729  * {}
2730  * """
2731  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2732  * if isinstance(other, index_set):
2733  * self.instance = new IndexSet((<index_set>other).unwrap())
2734  */
2735  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2736  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2737 
2738  /* "PyClical.pyx":93
2739  * """
2740  * error_msg_prefix = "Cannot initialize index_set object from"
2741  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2742  * self.instance = new IndexSet((<index_set>other).unwrap())
2743  * elif isinstance(other, numbers.Integral):
2744  */
2745  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2746  __pyx_t_2 = (__pyx_t_1 != 0);
2747  if (__pyx_t_2) {
2748 
2749  /* "PyClical.pyx":94
2750  * error_msg_prefix = "Cannot initialize index_set object from"
2751  * if isinstance(other, index_set):
2752  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2753  * elif isinstance(other, numbers.Integral):
2754  * self.instance = new IndexSet(<int>other)
2755  */
2756  try {
2757  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2758  } catch(...) {
2759  __Pyx_CppExn2PyErr();
2760  __PYX_ERR(0, 94, __pyx_L1_error)
2761  }
2762  __pyx_v_self->instance = __pyx_t_3;
2763 
2764  /* "PyClical.pyx":93
2765  * """
2766  * error_msg_prefix = "Cannot initialize index_set object from"
2767  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2768  * self.instance = new IndexSet((<index_set>other).unwrap())
2769  * elif isinstance(other, numbers.Integral):
2770  */
2771  goto __pyx_L3;
2772  }
2773 
2774  /* "PyClical.pyx":95
2775  * if isinstance(other, index_set):
2776  * self.instance = new IndexSet((<index_set>other).unwrap())
2777  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2778  * self.instance = new IndexSet(<int>other)
2779  * elif isinstance(other, (set, frozenset)):
2780  */
2781  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2782  __Pyx_GOTREF(__pyx_t_4);
2783  __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)
2784  __Pyx_GOTREF(__pyx_t_5);
2785  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2786  __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)
2787  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2788  __pyx_t_1 = (__pyx_t_2 != 0);
2789  if (__pyx_t_1) {
2790 
2791  /* "PyClical.pyx":96
2792  * self.instance = new IndexSet((<index_set>other).unwrap())
2793  * elif isinstance(other, numbers.Integral):
2794  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2795  * elif isinstance(other, (set, frozenset)):
2796  * try:
2797  */
2798  __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)
2799  try {
2800  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2801  } catch(...) {
2802  __Pyx_CppExn2PyErr();
2803  __PYX_ERR(0, 96, __pyx_L1_error)
2804  }
2805  __pyx_v_self->instance = __pyx_t_3;
2806 
2807  /* "PyClical.pyx":95
2808  * if isinstance(other, index_set):
2809  * self.instance = new IndexSet((<index_set>other).unwrap())
2810  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2811  * self.instance = new IndexSet(<int>other)
2812  * elif isinstance(other, (set, frozenset)):
2813  */
2814  goto __pyx_L3;
2815  }
2816 
2817  /* "PyClical.pyx":97
2818  * elif isinstance(other, numbers.Integral):
2819  * self.instance = new IndexSet(<int>other)
2820  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2821  * try:
2822  * self.instance = new IndexSet()
2823  */
2824  __pyx_t_2 = PySet_Check(__pyx_v_other);
2825  __pyx_t_7 = (__pyx_t_2 != 0);
2826  if (!__pyx_t_7) {
2827  } else {
2828  __pyx_t_1 = __pyx_t_7;
2829  goto __pyx_L4_bool_binop_done;
2830  }
2831  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2832  __pyx_t_2 = (__pyx_t_7 != 0);
2833  __pyx_t_1 = __pyx_t_2;
2834  __pyx_L4_bool_binop_done:;
2835  __pyx_t_2 = (__pyx_t_1 != 0);
2836  if (__pyx_t_2) {
2837 
2838  /* "PyClical.pyx":98
2839  * self.instance = new IndexSet(<int>other)
2840  * elif isinstance(other, (set, frozenset)):
2841  * try: # <<<<<<<<<<<<<<
2842  * self.instance = new IndexSet()
2843  * for idx in other:
2844  */
2845  {
2846  __Pyx_PyThreadState_declare
2847  __Pyx_PyThreadState_assign
2848  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2849  __Pyx_XGOTREF(__pyx_t_8);
2850  __Pyx_XGOTREF(__pyx_t_9);
2851  __Pyx_XGOTREF(__pyx_t_10);
2852  /*try:*/ {
2853 
2854  /* "PyClical.pyx":99
2855  * elif isinstance(other, (set, frozenset)):
2856  * try:
2857  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2858  * for idx in other:
2859  * self[idx] = True
2860  */
2861  __pyx_t_3 = new IndexSet();
2862  __pyx_v_self->instance = __pyx_t_3;
2863 
2864  /* "PyClical.pyx":100
2865  * try:
2866  * self.instance = new IndexSet()
2867  * for idx in other: # <<<<<<<<<<<<<<
2868  * self[idx] = True
2869  * except IndexError:
2870  */
2871  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2872  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2873  __pyx_t_12 = NULL;
2874  } else {
2875  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
2876  __Pyx_GOTREF(__pyx_t_5);
2877  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
2878  }
2879  for (;;) {
2880  if (likely(!__pyx_t_12)) {
2881  if (likely(PyList_CheckExact(__pyx_t_5))) {
2882  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
2883  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2884  __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)
2885  #else
2886  __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)
2887  __Pyx_GOTREF(__pyx_t_4);
2888  #endif
2889  } else {
2890  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2891  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2892  __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)
2893  #else
2894  __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)
2895  __Pyx_GOTREF(__pyx_t_4);
2896  #endif
2897  }
2898  } else {
2899  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2900  if (unlikely(!__pyx_t_4)) {
2901  PyObject* exc_type = PyErr_Occurred();
2902  if (exc_type) {
2903  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2904  else __PYX_ERR(0, 100, __pyx_L6_error)
2905  }
2906  break;
2907  }
2908  __Pyx_GOTREF(__pyx_t_4);
2909  }
2910  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2911  __pyx_t_4 = 0;
2912 
2913  /* "PyClical.pyx":101
2914  * self.instance = new IndexSet()
2915  * for idx in other:
2916  * self[idx] = True # <<<<<<<<<<<<<<
2917  * except IndexError:
2918  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2919  */
2920  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
2921 
2922  /* "PyClical.pyx":100
2923  * try:
2924  * self.instance = new IndexSet()
2925  * for idx in other: # <<<<<<<<<<<<<<
2926  * self[idx] = True
2927  * except IndexError:
2928  */
2929  }
2930  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2931 
2932  /* "PyClical.pyx":98
2933  * self.instance = new IndexSet(<int>other)
2934  * elif isinstance(other, (set, frozenset)):
2935  * try: # <<<<<<<<<<<<<<
2936  * self.instance = new IndexSet()
2937  * for idx in other:
2938  */
2939  }
2940  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2941  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2942  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2943  goto __pyx_L11_try_end;
2944  __pyx_L6_error:;
2945  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2946  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2947 
2948  /* "PyClical.pyx":102
2949  * for idx in other:
2950  * self[idx] = True
2951  * except IndexError: # <<<<<<<<<<<<<<
2952  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2953  * except (RuntimeError, TypeError):
2954  */
2955  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2956  if (__pyx_t_6) {
2957  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2958  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
2959  __Pyx_GOTREF(__pyx_t_5);
2960  __Pyx_GOTREF(__pyx_t_4);
2961  __Pyx_GOTREF(__pyx_t_13);
2962 
2963  /* "PyClical.pyx":103
2964  * self[idx] = True
2965  * except IndexError:
2966  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2967  * except (RuntimeError, TypeError):
2968  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2969  */
2970  __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)
2971  __Pyx_GOTREF(__pyx_t_14);
2972  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2973  __Pyx_GOTREF(__pyx_t_15);
2974  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2975  __Pyx_GOTREF(__pyx_t_16);
2976  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2977  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2978  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2979  __Pyx_GOTREF(__pyx_t_15);
2980  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2981  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2982  __Pyx_GOTREF(__pyx_t_16);
2983  __Pyx_GIVEREF(__pyx_t_15);
2984  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2985  __pyx_t_15 = 0;
2986  __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)
2987  __Pyx_GOTREF(__pyx_t_15);
2988  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2989  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2990  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2991  __PYX_ERR(0, 103, __pyx_L8_except_error)
2992  }
2993 
2994  /* "PyClical.pyx":104
2995  * except IndexError:
2996  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2997  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
2998  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2999  * elif isinstance(other, str):
3000  */
3001  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3002  if (__pyx_t_6) {
3003  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3004  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3005  __Pyx_GOTREF(__pyx_t_13);
3006  __Pyx_GOTREF(__pyx_t_4);
3007  __Pyx_GOTREF(__pyx_t_5);
3008 
3009  /* "PyClical.pyx":105
3010  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3011  * except (RuntimeError, TypeError):
3012  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3013  * elif isinstance(other, str):
3014  * try:
3015  */
3016  __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)
3017  __Pyx_GOTREF(__pyx_t_15);
3018  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3019  __Pyx_GOTREF(__pyx_t_16);
3020  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3021  __Pyx_GOTREF(__pyx_t_14);
3022  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3023  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3024  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3025  __Pyx_GOTREF(__pyx_t_16);
3026  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3027  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3028  __Pyx_GOTREF(__pyx_t_14);
3029  __Pyx_GIVEREF(__pyx_t_16);
3030  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
3031  __pyx_t_16 = 0;
3032  __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)
3033  __Pyx_GOTREF(__pyx_t_16);
3034  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3035  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3036  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3037  __PYX_ERR(0, 105, __pyx_L8_except_error)
3038  }
3039  goto __pyx_L8_except_error;
3040  __pyx_L8_except_error:;
3041 
3042  /* "PyClical.pyx":98
3043  * self.instance = new IndexSet(<int>other)
3044  * elif isinstance(other, (set, frozenset)):
3045  * try: # <<<<<<<<<<<<<<
3046  * self.instance = new IndexSet()
3047  * for idx in other:
3048  */
3049  __Pyx_XGIVEREF(__pyx_t_8);
3050  __Pyx_XGIVEREF(__pyx_t_9);
3051  __Pyx_XGIVEREF(__pyx_t_10);
3052  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3053  goto __pyx_L1_error;
3054  __pyx_L11_try_end:;
3055  }
3056 
3057  /* "PyClical.pyx":97
3058  * elif isinstance(other, numbers.Integral):
3059  * self.instance = new IndexSet(<int>other)
3060  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3061  * try:
3062  * self.instance = new IndexSet()
3063  */
3064  goto __pyx_L3;
3065  }
3066 
3067  /* "PyClical.pyx":106
3068  * except (RuntimeError, TypeError):
3069  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3070  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3071  * try:
3072  * self.instance = new IndexSet(<char *>other)
3073  */
3074  __pyx_t_2 = PyString_Check(__pyx_v_other);
3075  __pyx_t_1 = (__pyx_t_2 != 0);
3076  if (__pyx_t_1) {
3077 
3078  /* "PyClical.pyx":107
3079  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3080  * elif isinstance(other, str):
3081  * try: # <<<<<<<<<<<<<<
3082  * self.instance = new IndexSet(<char *>other)
3083  * except RuntimeError:
3084  */
3085  {
3086  __Pyx_PyThreadState_declare
3087  __Pyx_PyThreadState_assign
3088  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3089  __Pyx_XGOTREF(__pyx_t_10);
3090  __Pyx_XGOTREF(__pyx_t_9);
3091  __Pyx_XGOTREF(__pyx_t_8);
3092  /*try:*/ {
3093 
3094  /* "PyClical.pyx":108
3095  * elif isinstance(other, str):
3096  * try:
3097  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3098  * except RuntimeError:
3099  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3100  */
3101  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3102  try {
3103  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3104  } catch(...) {
3105  __Pyx_CppExn2PyErr();
3106  __PYX_ERR(0, 108, __pyx_L18_error)
3107  }
3108  __pyx_v_self->instance = __pyx_t_3;
3109 
3110  /* "PyClical.pyx":107
3111  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3112  * elif isinstance(other, str):
3113  * try: # <<<<<<<<<<<<<<
3114  * self.instance = new IndexSet(<char *>other)
3115  * except RuntimeError:
3116  */
3117  }
3118  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3119  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3120  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3121  goto __pyx_L23_try_end;
3122  __pyx_L18_error:;
3123  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3124  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3125  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3126  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3127  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3128  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3129 
3130  /* "PyClical.pyx":109
3131  * try:
3132  * self.instance = new IndexSet(<char *>other)
3133  * except RuntimeError: # <<<<<<<<<<<<<<
3134  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3135  * else:
3136  */
3137  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3138  if (__pyx_t_6) {
3139  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3140  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3141  __Pyx_GOTREF(__pyx_t_5);
3142  __Pyx_GOTREF(__pyx_t_4);
3143  __Pyx_GOTREF(__pyx_t_13);
3144 
3145  /* "PyClical.pyx":110
3146  * self.instance = new IndexSet(<char *>other)
3147  * except RuntimeError:
3148  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3149  * else:
3150  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3151  */
3152  __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)
3153  __Pyx_GOTREF(__pyx_t_16);
3154  __pyx_t_14 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3155  __Pyx_GOTREF(__pyx_t_14);
3156  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3157  __Pyx_GOTREF(__pyx_t_15);
3158  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3159  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3160  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3161  __Pyx_GOTREF(__pyx_t_14);
3162  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3163  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3164  __Pyx_GOTREF(__pyx_t_15);
3165  __Pyx_GIVEREF(__pyx_t_14);
3166  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
3167  __pyx_t_14 = 0;
3168  __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)
3169  __Pyx_GOTREF(__pyx_t_14);
3170  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3171  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3172  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3173  __PYX_ERR(0, 110, __pyx_L20_except_error)
3174  }
3175  goto __pyx_L20_except_error;
3176  __pyx_L20_except_error:;
3177 
3178  /* "PyClical.pyx":107
3179  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3180  * elif isinstance(other, str):
3181  * try: # <<<<<<<<<<<<<<
3182  * self.instance = new IndexSet(<char *>other)
3183  * except RuntimeError:
3184  */
3185  __Pyx_XGIVEREF(__pyx_t_10);
3186  __Pyx_XGIVEREF(__pyx_t_9);
3187  __Pyx_XGIVEREF(__pyx_t_8);
3188  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3189  goto __pyx_L1_error;
3190  __pyx_L23_try_end:;
3191  }
3192 
3193  /* "PyClical.pyx":106
3194  * except (RuntimeError, TypeError):
3195  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3196  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3197  * try:
3198  * self.instance = new IndexSet(<char *>other)
3199  */
3200  goto __pyx_L3;
3201  }
3202 
3203  /* "PyClical.pyx":112
3204  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3205  * else:
3206  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3207  *
3208  * def __dealloc__(self):
3209  */
3210  /*else*/ {
3211  __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)
3212  __Pyx_GOTREF(__pyx_t_13);
3213  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3214  __Pyx_GOTREF(__pyx_t_4);
3215  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
3216  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
3217  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
3218  __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)
3219  __Pyx_GOTREF(__pyx_t_5);
3220  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3221  __pyx_t_4 = PyNumber_Add(__pyx_t_13, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3222  __Pyx_GOTREF(__pyx_t_4);
3223  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3224  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3225  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3226  __Pyx_GOTREF(__pyx_t_5);
3227  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3228  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3229  __Pyx_GOTREF(__pyx_t_4);
3230  __Pyx_GIVEREF(__pyx_t_5);
3231  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
3232  __pyx_t_5 = 0;
3233  __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)
3234  __Pyx_GOTREF(__pyx_t_5);
3235  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3236  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3237  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3238  __PYX_ERR(0, 112, __pyx_L1_error)
3239  }
3240  __pyx_L3:;
3241 
3242  /* "PyClical.pyx":73
3243  * return index_set(self)
3244  *
3245  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3246  * """
3247  * Construct an object of type index_set.
3248  */
3249 
3250  /* function exit code */
3251  __pyx_r = 0;
3252  goto __pyx_L0;
3253  __pyx_L1_error:;
3254  __Pyx_XDECREF(__pyx_t_4);
3255  __Pyx_XDECREF(__pyx_t_5);
3256  __Pyx_XDECREF(__pyx_t_13);
3257  __Pyx_XDECREF(__pyx_t_14);
3258  __Pyx_XDECREF(__pyx_t_15);
3259  __Pyx_XDECREF(__pyx_t_16);
3260  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3261  __pyx_r = -1;
3262  __pyx_L0:;
3263  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3264  __Pyx_XDECREF(__pyx_v_idx);
3265  __Pyx_RefNannyFinishContext();
3266  return __pyx_r;
3267 }
3268 
3269 /* "PyClical.pyx":114
3270  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3271  *
3272  * def __dealloc__(self): # <<<<<<<<<<<<<<
3273  * """
3274  * Clean up by deallocating the instance of C++ class IndexSet.
3275  */
3276 
3277 /* Python wrapper */
3278 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3279 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3280  __Pyx_RefNannyDeclarations
3281  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3282  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3283 
3284  /* function exit code */
3285  __Pyx_RefNannyFinishContext();
3286 }
3287 
3288 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3289  __Pyx_RefNannyDeclarations
3290  __Pyx_RefNannySetupContext("__dealloc__", 0);
3291 
3292  /* "PyClical.pyx":118
3293  * Clean up by deallocating the instance of C++ class IndexSet.
3294  * """
3295  * del self.instance # <<<<<<<<<<<<<<
3296  *
3297  * def __richcmp__(lhs, rhs, int op):
3298  */
3299  delete __pyx_v_self->instance;
3300 
3301  /* "PyClical.pyx":114
3302  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3303  *
3304  * def __dealloc__(self): # <<<<<<<<<<<<<<
3305  * """
3306  * Clean up by deallocating the instance of C++ class IndexSet.
3307  */
3308 
3309  /* function exit code */
3310  __Pyx_RefNannyFinishContext();
3311 }
3312 
3313 /* "PyClical.pyx":120
3314  * del self.instance
3315  *
3316  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3317  * """
3318  * Compare two objects of class index_set.
3319  */
3320 
3321 /* Python wrapper */
3322 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3323 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3324  PyObject *__pyx_r = 0;
3325  __Pyx_RefNannyDeclarations
3326  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3327  __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
3328 
3329  /* function exit code */
3330  __Pyx_RefNannyFinishContext();
3331  return __pyx_r;
3332 }
3333 
3334 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3335  PyObject *__pyx_v_eq = NULL;
3336  PyObject *__pyx_v_lt = NULL;
3337  PyObject *__pyx_r = NULL;
3338  __Pyx_RefNannyDeclarations
3339  int __pyx_t_1;
3340  int __pyx_t_2;
3341  int __pyx_t_3;
3342  PyObject *__pyx_t_4 = NULL;
3343  __Pyx_RefNannySetupContext("__richcmp__", 0);
3344 
3345  /* "PyClical.pyx":141
3346  * False
3347  * """
3348  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3349  * eq = bool(lhs is rhs)
3350  * if op == 2: # ==
3351  */
3352  __pyx_t_2 = (__pyx_v_lhs == Py_None);
3353  __pyx_t_3 = (__pyx_t_2 != 0);
3354  if (!__pyx_t_3) {
3355  } else {
3356  __pyx_t_1 = __pyx_t_3;
3357  goto __pyx_L4_bool_binop_done;
3358  }
3359  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3360  __pyx_t_2 = (__pyx_t_3 != 0);
3361  __pyx_t_1 = __pyx_t_2;
3362  __pyx_L4_bool_binop_done:;
3363  if (__pyx_t_1) {
3364 
3365  /* "PyClical.pyx":142
3366  * """
3367  * if (lhs is None) or (rhs is None):
3368  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3369  * if op == 2: # ==
3370  * return eq
3371  */
3372  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
3373  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3374  __Pyx_GOTREF(__pyx_t_4);
3375  __pyx_v_eq = __pyx_t_4;
3376  __pyx_t_4 = 0;
3377 
3378  /* "PyClical.pyx":143
3379  * if (lhs is None) or (rhs is None):
3380  * eq = bool(lhs is rhs)
3381  * if op == 2: # == # <<<<<<<<<<<<<<
3382  * return eq
3383  * elif op == 3: # !=
3384  */
3385  switch (__pyx_v_op) {
3386  case 2:
3387 
3388  /* "PyClical.pyx":144
3389  * eq = bool(lhs is rhs)
3390  * if op == 2: # ==
3391  * return eq # <<<<<<<<<<<<<<
3392  * elif op == 3: # !=
3393  * return not eq
3394  */
3395  __Pyx_XDECREF(__pyx_r);
3396  __Pyx_INCREF(__pyx_v_eq);
3397  __pyx_r = __pyx_v_eq;
3398  goto __pyx_L0;
3399 
3400  /* "PyClical.pyx":143
3401  * if (lhs is None) or (rhs is None):
3402  * eq = bool(lhs is rhs)
3403  * if op == 2: # == # <<<<<<<<<<<<<<
3404  * return eq
3405  * elif op == 3: # !=
3406  */
3407  break;
3408 
3409  /* "PyClical.pyx":145
3410  * if op == 2: # ==
3411  * return eq
3412  * elif op == 3: # != # <<<<<<<<<<<<<<
3413  * return not eq
3414  * else:
3415  */
3416  case 3:
3417 
3418  /* "PyClical.pyx":146
3419  * return eq
3420  * elif op == 3: # !=
3421  * return not eq # <<<<<<<<<<<<<<
3422  * else:
3423  * if op == 0: # <
3424  */
3425  __Pyx_XDECREF(__pyx_r);
3426  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3427  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3428  __Pyx_GOTREF(__pyx_t_4);
3429  __pyx_r = __pyx_t_4;
3430  __pyx_t_4 = 0;
3431  goto __pyx_L0;
3432 
3433  /* "PyClical.pyx":145
3434  * if op == 2: # ==
3435  * return eq
3436  * elif op == 3: # != # <<<<<<<<<<<<<<
3437  * return not eq
3438  * else:
3439  */
3440  break;
3441  default:
3442 
3443  /* "PyClical.pyx":148
3444  * return not eq
3445  * else:
3446  * if op == 0: # < # <<<<<<<<<<<<<<
3447  * return False
3448  * elif op == 1: # <=
3449  */
3450  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3451  if (__pyx_t_1) {
3452 
3453  /* "PyClical.pyx":149
3454  * else:
3455  * if op == 0: # <
3456  * return False # <<<<<<<<<<<<<<
3457  * elif op == 1: # <=
3458  * return eq
3459  */
3460  __Pyx_XDECREF(__pyx_r);
3461  __Pyx_INCREF(Py_False);
3462  __pyx_r = Py_False;
3463  goto __pyx_L0;
3464 
3465  /* "PyClical.pyx":148
3466  * return not eq
3467  * else:
3468  * if op == 0: # < # <<<<<<<<<<<<<<
3469  * return False
3470  * elif op == 1: # <=
3471  */
3472  }
3473 
3474  /* "PyClical.pyx":150
3475  * if op == 0: # <
3476  * return False
3477  * elif op == 1: # <= # <<<<<<<<<<<<<<
3478  * return eq
3479  * elif op == 4: # >
3480  */
3481  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3482  if (__pyx_t_1) {
3483 
3484  /* "PyClical.pyx":151
3485  * return False
3486  * elif op == 1: # <=
3487  * return eq # <<<<<<<<<<<<<<
3488  * elif op == 4: # >
3489  * return False
3490  */
3491  __Pyx_XDECREF(__pyx_r);
3492  __Pyx_INCREF(__pyx_v_eq);
3493  __pyx_r = __pyx_v_eq;
3494  goto __pyx_L0;
3495 
3496  /* "PyClical.pyx":150
3497  * if op == 0: # <
3498  * return False
3499  * elif op == 1: # <= # <<<<<<<<<<<<<<
3500  * return eq
3501  * elif op == 4: # >
3502  */
3503  }
3504 
3505  /* "PyClical.pyx":152
3506  * elif op == 1: # <=
3507  * return eq
3508  * elif op == 4: # > # <<<<<<<<<<<<<<
3509  * return False
3510  * elif op == 5: # >=
3511  */
3512  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3513  if (__pyx_t_1) {
3514 
3515  /* "PyClical.pyx":153
3516  * return eq
3517  * elif op == 4: # >
3518  * return False # <<<<<<<<<<<<<<
3519  * elif op == 5: # >=
3520  * return eq
3521  */
3522  __Pyx_XDECREF(__pyx_r);
3523  __Pyx_INCREF(Py_False);
3524  __pyx_r = Py_False;
3525  goto __pyx_L0;
3526 
3527  /* "PyClical.pyx":152
3528  * elif op == 1: # <=
3529  * return eq
3530  * elif op == 4: # > # <<<<<<<<<<<<<<
3531  * return False
3532  * elif op == 5: # >=
3533  */
3534  }
3535 
3536  /* "PyClical.pyx":154
3537  * elif op == 4: # >
3538  * return False
3539  * elif op == 5: # >= # <<<<<<<<<<<<<<
3540  * return eq
3541  * else:
3542  */
3543  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3544  if (__pyx_t_1) {
3545 
3546  /* "PyClical.pyx":155
3547  * return False
3548  * elif op == 5: # >=
3549  * return eq # <<<<<<<<<<<<<<
3550  * else:
3551  * return NotImplemented
3552  */
3553  __Pyx_XDECREF(__pyx_r);
3554  __Pyx_INCREF(__pyx_v_eq);
3555  __pyx_r = __pyx_v_eq;
3556  goto __pyx_L0;
3557 
3558  /* "PyClical.pyx":154
3559  * elif op == 4: # >
3560  * return False
3561  * elif op == 5: # >= # <<<<<<<<<<<<<<
3562  * return eq
3563  * else:
3564  */
3565  }
3566 
3567  /* "PyClical.pyx":157
3568  * return eq
3569  * else:
3570  * return NotImplemented # <<<<<<<<<<<<<<
3571  * else:
3572  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3573  */
3574  /*else*/ {
3575  __Pyx_XDECREF(__pyx_r);
3576  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3577  __pyx_r = __pyx_builtin_NotImplemented;
3578  goto __pyx_L0;
3579  }
3580  break;
3581  }
3582 
3583  /* "PyClical.pyx":141
3584  * False
3585  * """
3586  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3587  * eq = bool(lhs is rhs)
3588  * if op == 2: # ==
3589  */
3590  }
3591 
3592  /* "PyClical.pyx":159
3593  * return NotImplemented
3594  * else:
3595  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3596  * if op == 2: # ==
3597  * return eq
3598  */
3599  /*else*/ {
3600  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3601  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3602  __Pyx_GOTREF(__pyx_t_4);
3603  __pyx_v_eq = __pyx_t_4;
3604  __pyx_t_4 = 0;
3605 
3606  /* "PyClical.pyx":160
3607  * else:
3608  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3609  * if op == 2: # == # <<<<<<<<<<<<<<
3610  * return eq
3611  * elif op == 3: # !=
3612  */
3613  switch (__pyx_v_op) {
3614  case 2:
3615 
3616  /* "PyClical.pyx":161
3617  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3618  * if op == 2: # ==
3619  * return eq # <<<<<<<<<<<<<<
3620  * elif op == 3: # !=
3621  * return not eq
3622  */
3623  __Pyx_XDECREF(__pyx_r);
3624  __Pyx_INCREF(__pyx_v_eq);
3625  __pyx_r = __pyx_v_eq;
3626  goto __pyx_L0;
3627 
3628  /* "PyClical.pyx":160
3629  * else:
3630  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3631  * if op == 2: # == # <<<<<<<<<<<<<<
3632  * return eq
3633  * elif op == 3: # !=
3634  */
3635  break;
3636 
3637  /* "PyClical.pyx":162
3638  * if op == 2: # ==
3639  * return eq
3640  * elif op == 3: # != # <<<<<<<<<<<<<<
3641  * return not eq
3642  * else:
3643  */
3644  case 3:
3645 
3646  /* "PyClical.pyx":163
3647  * return eq
3648  * elif op == 3: # !=
3649  * return not eq # <<<<<<<<<<<<<<
3650  * else:
3651  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3652  */
3653  __Pyx_XDECREF(__pyx_r);
3654  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3655  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3656  __Pyx_GOTREF(__pyx_t_4);
3657  __pyx_r = __pyx_t_4;
3658  __pyx_t_4 = 0;
3659  goto __pyx_L0;
3660 
3661  /* "PyClical.pyx":162
3662  * if op == 2: # ==
3663  * return eq
3664  * elif op == 3: # != # <<<<<<<<<<<<<<
3665  * return not eq
3666  * else:
3667  */
3668  break;
3669  default:
3670 
3671  /* "PyClical.pyx":165
3672  * return not eq
3673  * else:
3674  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3675  * if op == 0: # <
3676  * return lt
3677  */
3678  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3679  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3680  __Pyx_GOTREF(__pyx_t_4);
3681  __pyx_v_lt = __pyx_t_4;
3682  __pyx_t_4 = 0;
3683 
3684  /* "PyClical.pyx":166
3685  * else:
3686  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3687  * if op == 0: # < # <<<<<<<<<<<<<<
3688  * return lt
3689  * elif op == 1: # <=
3690  */
3691  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3692  if (__pyx_t_1) {
3693 
3694  /* "PyClical.pyx":167
3695  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3696  * if op == 0: # <
3697  * return lt # <<<<<<<<<<<<<<
3698  * elif op == 1: # <=
3699  * return lt or eq
3700  */
3701  __Pyx_XDECREF(__pyx_r);
3702  __Pyx_INCREF(__pyx_v_lt);
3703  __pyx_r = __pyx_v_lt;
3704  goto __pyx_L0;
3705 
3706  /* "PyClical.pyx":166
3707  * else:
3708  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3709  * if op == 0: # < # <<<<<<<<<<<<<<
3710  * return lt
3711  * elif op == 1: # <=
3712  */
3713  }
3714 
3715  /* "PyClical.pyx":168
3716  * if op == 0: # <
3717  * return lt
3718  * elif op == 1: # <= # <<<<<<<<<<<<<<
3719  * return lt or eq
3720  * elif op == 4: # >
3721  */
3722  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3723  if (__pyx_t_1) {
3724 
3725  /* "PyClical.pyx":169
3726  * return lt
3727  * elif op == 1: # <=
3728  * return lt or eq # <<<<<<<<<<<<<<
3729  * elif op == 4: # >
3730  * return not (lt or eq)
3731  */
3732  __Pyx_XDECREF(__pyx_r);
3733  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3734  if (!__pyx_t_1) {
3735  } else {
3736  __Pyx_INCREF(__pyx_v_lt);
3737  __pyx_t_4 = __pyx_v_lt;
3738  goto __pyx_L8_bool_binop_done;
3739  }
3740  __Pyx_INCREF(__pyx_v_eq);
3741  __pyx_t_4 = __pyx_v_eq;
3742  __pyx_L8_bool_binop_done:;
3743  __pyx_r = __pyx_t_4;
3744  __pyx_t_4 = 0;
3745  goto __pyx_L0;
3746 
3747  /* "PyClical.pyx":168
3748  * if op == 0: # <
3749  * return lt
3750  * elif op == 1: # <= # <<<<<<<<<<<<<<
3751  * return lt or eq
3752  * elif op == 4: # >
3753  */
3754  }
3755 
3756  /* "PyClical.pyx":170
3757  * elif op == 1: # <=
3758  * return lt or eq
3759  * elif op == 4: # > # <<<<<<<<<<<<<<
3760  * return not (lt or eq)
3761  * elif op == 5: # >=
3762  */
3763  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3764  if (__pyx_t_1) {
3765 
3766  /* "PyClical.pyx":171
3767  * return lt or eq
3768  * elif op == 4: # >
3769  * return not (lt or eq) # <<<<<<<<<<<<<<
3770  * elif op == 5: # >=
3771  * return not lt
3772  */
3773  __Pyx_XDECREF(__pyx_r);
3774  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3775  if (!__pyx_t_2) {
3776  } else {
3777  __pyx_t_1 = __pyx_t_2;
3778  goto __pyx_L10_bool_binop_done;
3779  }
3780  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3781  __pyx_t_1 = __pyx_t_2;
3782  __pyx_L10_bool_binop_done:;
3783  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3784  __Pyx_GOTREF(__pyx_t_4);
3785  __pyx_r = __pyx_t_4;
3786  __pyx_t_4 = 0;
3787  goto __pyx_L0;
3788 
3789  /* "PyClical.pyx":170
3790  * elif op == 1: # <=
3791  * return lt or eq
3792  * elif op == 4: # > # <<<<<<<<<<<<<<
3793  * return not (lt or eq)
3794  * elif op == 5: # >=
3795  */
3796  }
3797 
3798  /* "PyClical.pyx":172
3799  * elif op == 4: # >
3800  * return not (lt or eq)
3801  * elif op == 5: # >= # <<<<<<<<<<<<<<
3802  * return not lt
3803  * else:
3804  */
3805  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3806  if (__pyx_t_1) {
3807 
3808  /* "PyClical.pyx":173
3809  * return not (lt or eq)
3810  * elif op == 5: # >=
3811  * return not lt # <<<<<<<<<<<<<<
3812  * else:
3813  * return NotImplemented
3814  */
3815  __Pyx_XDECREF(__pyx_r);
3816  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3817  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3818  __Pyx_GOTREF(__pyx_t_4);
3819  __pyx_r = __pyx_t_4;
3820  __pyx_t_4 = 0;
3821  goto __pyx_L0;
3822 
3823  /* "PyClical.pyx":172
3824  * elif op == 4: # >
3825  * return not (lt or eq)
3826  * elif op == 5: # >= # <<<<<<<<<<<<<<
3827  * return not lt
3828  * else:
3829  */
3830  }
3831 
3832  /* "PyClical.pyx":175
3833  * return not lt
3834  * else:
3835  * return NotImplemented # <<<<<<<<<<<<<<
3836  *
3837  * def __setitem__(self, idx, val):
3838  */
3839  /*else*/ {
3840  __Pyx_XDECREF(__pyx_r);
3841  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3842  __pyx_r = __pyx_builtin_NotImplemented;
3843  goto __pyx_L0;
3844  }
3845  break;
3846  }
3847  }
3848 
3849  /* "PyClical.pyx":120
3850  * del self.instance
3851  *
3852  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3853  * """
3854  * Compare two objects of class index_set.
3855  */
3856 
3857  /* function exit code */
3858  __pyx_L1_error:;
3859  __Pyx_XDECREF(__pyx_t_4);
3860  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3861  __pyx_r = NULL;
3862  __pyx_L0:;
3863  __Pyx_XDECREF(__pyx_v_eq);
3864  __Pyx_XDECREF(__pyx_v_lt);
3865  __Pyx_XGIVEREF(__pyx_r);
3866  __Pyx_RefNannyFinishContext();
3867  return __pyx_r;
3868 }
3869 
3870 /* "PyClical.pyx":177
3871  * return NotImplemented
3872  *
3873  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3874  * """
3875  * Set the value of an index_set object at index idx to value val.
3876  */
3877 
3878 /* Python wrapper */
3879 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3880 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 ";
3881 #if CYTHON_COMPILING_IN_CPYTHON
3882 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3883 #endif
3884 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3885  int __pyx_r;
3886  __Pyx_RefNannyDeclarations
3887  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3888  __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));
3889 
3890  /* function exit code */
3891  __Pyx_RefNannyFinishContext();
3892  return __pyx_r;
3893 }
3894 
3895 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) {
3896  int __pyx_r;
3897  __Pyx_RefNannyDeclarations
3898  int __pyx_t_1;
3899  int __pyx_t_2;
3900  __Pyx_RefNannySetupContext("__setitem__", 0);
3901 
3902  /* "PyClical.pyx":186
3903  * {2}
3904  * """
3905  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3906  * return
3907  *
3908  */
3909  __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)
3910  __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)
3911  try {
3912  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3913  } catch(...) {
3914  __Pyx_CppExn2PyErr();
3915  __PYX_ERR(0, 186, __pyx_L1_error)
3916  }
3917 
3918  /* "PyClical.pyx":187
3919  * """
3920  * self.instance.set(idx, val)
3921  * return # <<<<<<<<<<<<<<
3922  *
3923  * def __getitem__(self, idx):
3924  */
3925  __pyx_r = 0;
3926  goto __pyx_L0;
3927 
3928  /* "PyClical.pyx":177
3929  * return NotImplemented
3930  *
3931  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3932  * """
3933  * Set the value of an index_set object at index idx to value val.
3934  */
3935 
3936  /* function exit code */
3937  __pyx_L1_error:;
3938  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3939  __pyx_r = -1;
3940  __pyx_L0:;
3941  __Pyx_RefNannyFinishContext();
3942  return __pyx_r;
3943 }
3944 
3945 /* "PyClical.pyx":189
3946  * return
3947  *
3948  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3949  * """
3950  * Get the value of an index_set object at an index.
3951  */
3952 
3953 /* Python wrapper */
3954 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3955 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 ";
3956 #if CYTHON_COMPILING_IN_CPYTHON
3957 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3958 #endif
3959 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3960  PyObject *__pyx_r = 0;
3961  __Pyx_RefNannyDeclarations
3962  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
3963  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3964 
3965  /* function exit code */
3966  __Pyx_RefNannyFinishContext();
3967  return __pyx_r;
3968 }
3969 
3970 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3971  PyObject *__pyx_r = NULL;
3972  __Pyx_RefNannyDeclarations
3973  int __pyx_t_1;
3974  PyObject *__pyx_t_2 = NULL;
3975  __Pyx_RefNannySetupContext("__getitem__", 0);
3976 
3977  /* "PyClical.pyx":206
3978  * False
3979  * """
3980  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3981  *
3982  * def __contains__(self, idx):
3983  */
3984  __Pyx_XDECREF(__pyx_r);
3985  __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)
3986  __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)
3987  __Pyx_GOTREF(__pyx_t_2);
3988  __pyx_r = __pyx_t_2;
3989  __pyx_t_2 = 0;
3990  goto __pyx_L0;
3991 
3992  /* "PyClical.pyx":189
3993  * return
3994  *
3995  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3996  * """
3997  * Get the value of an index_set object at an index.
3998  */
3999 
4000  /* function exit code */
4001  __pyx_L1_error:;
4002  __Pyx_XDECREF(__pyx_t_2);
4003  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4004  __pyx_r = NULL;
4005  __pyx_L0:;
4006  __Pyx_XGIVEREF(__pyx_r);
4007  __Pyx_RefNannyFinishContext();
4008  return __pyx_r;
4009 }
4010 
4011 /* "PyClical.pyx":208
4012  * return self.instance.getitem(idx)
4013  *
4014  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4015  * """
4016  * Check that an index_set object contains the index idx: idx in self.
4017  */
4018 
4019 /* Python wrapper */
4020 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4021 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 ";
4022 #if CYTHON_COMPILING_IN_CPYTHON
4023 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4024 #endif
4025 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4026  int __pyx_r;
4027  __Pyx_RefNannyDeclarations
4028  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4029  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4030 
4031  /* function exit code */
4032  __Pyx_RefNannyFinishContext();
4033  return __pyx_r;
4034 }
4035 
4036 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4037  int __pyx_r;
4038  __Pyx_RefNannyDeclarations
4039  int __pyx_t_1;
4040  __Pyx_RefNannySetupContext("__contains__", 0);
4041 
4042  /* "PyClical.pyx":225
4043  * False
4044  * """
4045  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4046  *
4047  * def __iter__(self):
4048  */
4049  __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)
4050  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4051  goto __pyx_L0;
4052 
4053  /* "PyClical.pyx":208
4054  * return self.instance.getitem(idx)
4055  *
4056  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4057  * """
4058  * Check that an index_set object contains the index idx: idx in self.
4059  */
4060 
4061  /* function exit code */
4062  __pyx_L1_error:;
4063  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4064  __pyx_r = -1;
4065  __pyx_L0:;
4066  __Pyx_RefNannyFinishContext();
4067  return __pyx_r;
4068 }
4069 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4070 
4071 /* "PyClical.pyx":227
4072  * return self.instance.getitem(idx)
4073  *
4074  * def __iter__(self): # <<<<<<<<<<<<<<
4075  * """
4076  * Iterate over the indices of an index_set.
4077  */
4078 
4079 /* Python wrapper */
4080 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4081 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 ";
4082 #if CYTHON_COMPILING_IN_CPYTHON
4083 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4084 #endif
4085 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4086  PyObject *__pyx_r = 0;
4087  __Pyx_RefNannyDeclarations
4088  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4089  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4090 
4091  /* function exit code */
4092  __Pyx_RefNannyFinishContext();
4093  return __pyx_r;
4094 }
4095 
4096 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4097  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4098  PyObject *__pyx_r = NULL;
4099  __Pyx_RefNannyDeclarations
4100  __Pyx_RefNannySetupContext("__iter__", 0);
4101  __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);
4102  if (unlikely(!__pyx_cur_scope)) {
4103  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4104  __Pyx_INCREF(Py_None);
4105  __PYX_ERR(0, 227, __pyx_L1_error)
4106  } else {
4107  __Pyx_GOTREF(__pyx_cur_scope);
4108  }
4109  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4110  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4111  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4112  {
4113  __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)
4114  __Pyx_DECREF(__pyx_cur_scope);
4115  __Pyx_RefNannyFinishContext();
4116  return (PyObject *) gen;
4117  }
4118 
4119  /* function exit code */
4120  __pyx_L1_error:;
4121  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4122  __pyx_r = NULL;
4123  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4124  __Pyx_XGIVEREF(__pyx_r);
4125  __Pyx_RefNannyFinishContext();
4126  return __pyx_r;
4127 }
4128 
4129 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4130 {
4131  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4132  PyObject *__pyx_r = NULL;
4133  PyObject *__pyx_t_1 = NULL;
4134  PyObject *__pyx_t_2 = NULL;
4135  PyObject *__pyx_t_3 = NULL;
4136  PyObject *__pyx_t_4 = NULL;
4137  Py_ssize_t __pyx_t_5;
4138  PyObject *(*__pyx_t_6)(PyObject *);
4139  int __pyx_t_7;
4140  int __pyx_t_8;
4141  __Pyx_RefNannyDeclarations
4142  __Pyx_RefNannySetupContext("__iter__", 0);
4143  switch (__pyx_generator->resume_label) {
4144  case 0: goto __pyx_L3_first_run;
4145  case 1: goto __pyx_L7_resume_from_yield;
4146  default: /* CPython raises the right error here */
4147  __Pyx_RefNannyFinishContext();
4148  return NULL;
4149  }
4150  __pyx_L3_first_run:;
4151  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4152 
4153  /* "PyClical.pyx":234
4154  * -3 4 7
4155  * """
4156  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4157  * if idx in self:
4158  * yield idx
4159  */
4160  __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)
4161  __Pyx_GOTREF(__pyx_t_2);
4162  __pyx_t_3 = NULL;
4163  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4164  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4165  if (likely(__pyx_t_3)) {
4166  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4167  __Pyx_INCREF(__pyx_t_3);
4168  __Pyx_INCREF(function);
4169  __Pyx_DECREF_SET(__pyx_t_2, function);
4170  }
4171  }
4172  if (__pyx_t_3) {
4173  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4174  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4175  } else {
4176  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4177  }
4178  __Pyx_GOTREF(__pyx_t_1);
4179  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4180  __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)
4181  __Pyx_GOTREF(__pyx_t_3);
4182  __pyx_t_4 = NULL;
4183  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4184  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4185  if (likely(__pyx_t_4)) {
4186  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4187  __Pyx_INCREF(__pyx_t_4);
4188  __Pyx_INCREF(function);
4189  __Pyx_DECREF_SET(__pyx_t_3, function);
4190  }
4191  }
4192  if (__pyx_t_4) {
4193  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4194  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4195  } else {
4196  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4197  }
4198  __Pyx_GOTREF(__pyx_t_2);
4199  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4200  __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)
4201  __Pyx_GOTREF(__pyx_t_3);
4202  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4203  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4204  __Pyx_GOTREF(__pyx_t_2);
4205  __Pyx_GIVEREF(__pyx_t_1);
4206  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4207  __Pyx_GIVEREF(__pyx_t_3);
4208  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4209  __pyx_t_1 = 0;
4210  __pyx_t_3 = 0;
4211  __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)
4212  __Pyx_GOTREF(__pyx_t_3);
4213  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4214  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4215  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4216  __pyx_t_6 = NULL;
4217  } else {
4218  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4219  __Pyx_GOTREF(__pyx_t_2);
4220  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4221  }
4222  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4223  for (;;) {
4224  if (likely(!__pyx_t_6)) {
4225  if (likely(PyList_CheckExact(__pyx_t_2))) {
4226  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4227  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4228  __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)
4229  #else
4230  __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)
4231  __Pyx_GOTREF(__pyx_t_3);
4232  #endif
4233  } else {
4234  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4235  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4236  __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)
4237  #else
4238  __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)
4239  __Pyx_GOTREF(__pyx_t_3);
4240  #endif
4241  }
4242  } else {
4243  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4244  if (unlikely(!__pyx_t_3)) {
4245  PyObject* exc_type = PyErr_Occurred();
4246  if (exc_type) {
4247  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4248  else __PYX_ERR(0, 234, __pyx_L1_error)
4249  }
4250  break;
4251  }
4252  __Pyx_GOTREF(__pyx_t_3);
4253  }
4254  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4255  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4256  __Pyx_GIVEREF(__pyx_t_3);
4257  __pyx_t_3 = 0;
4258 
4259  /* "PyClical.pyx":235
4260  * """
4261  * for idx in range(self.min(), self.max()+1):
4262  * if idx in self: # <<<<<<<<<<<<<<
4263  * yield idx
4264  *
4265  */
4266  __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)
4267  __pyx_t_8 = (__pyx_t_7 != 0);
4268  if (__pyx_t_8) {
4269 
4270  /* "PyClical.pyx":236
4271  * for idx in range(self.min(), self.max()+1):
4272  * if idx in self:
4273  * yield idx # <<<<<<<<<<<<<<
4274  *
4275  * def __invert__(self):
4276  */
4277  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4278  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4279  __Pyx_XGIVEREF(__pyx_t_2);
4280  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4281  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4282  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4283  __Pyx_XGIVEREF(__pyx_r);
4284  __Pyx_RefNannyFinishContext();
4285  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4286  /* return from generator, yielding value */
4287  __pyx_generator->resume_label = 1;
4288  return __pyx_r;
4289  __pyx_L7_resume_from_yield:;
4290  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4291  __pyx_cur_scope->__pyx_t_0 = 0;
4292  __Pyx_XGOTREF(__pyx_t_2);
4293  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4294  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4295  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4296 
4297  /* "PyClical.pyx":235
4298  * """
4299  * for idx in range(self.min(), self.max()+1):
4300  * if idx in self: # <<<<<<<<<<<<<<
4301  * yield idx
4302  *
4303  */
4304  }
4305 
4306  /* "PyClical.pyx":234
4307  * -3 4 7
4308  * """
4309  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4310  * if idx in self:
4311  * yield idx
4312  */
4313  }
4314  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4315  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4316 
4317  /* "PyClical.pyx":227
4318  * return self.instance.getitem(idx)
4319  *
4320  * def __iter__(self): # <<<<<<<<<<<<<<
4321  * """
4322  * Iterate over the indices of an index_set.
4323  */
4324 
4325  /* function exit code */
4326  PyErr_SetNone(PyExc_StopIteration);
4327  goto __pyx_L0;
4328  __pyx_L1_error:;
4329  __Pyx_XDECREF(__pyx_t_1);
4330  __Pyx_XDECREF(__pyx_t_2);
4331  __Pyx_XDECREF(__pyx_t_3);
4332  __Pyx_XDECREF(__pyx_t_4);
4333  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4334  __pyx_L0:;
4335  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4336  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4337  __pyx_generator->resume_label = -1;
4338  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4339  __Pyx_RefNannyFinishContext();
4340  return __pyx_r;
4341 }
4342 
4343 /* "PyClical.pyx":238
4344  * yield idx
4345  *
4346  * def __invert__(self): # <<<<<<<<<<<<<<
4347  * """
4348  * Set complement: not.
4349  */
4350 
4351 /* Python wrapper */
4352 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4353 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 ";
4354 #if CYTHON_COMPILING_IN_CPYTHON
4355 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4356 #endif
4357 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4358  PyObject *__pyx_r = 0;
4359  __Pyx_RefNannyDeclarations
4360  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4361  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4362 
4363  /* function exit code */
4364  __Pyx_RefNannyFinishContext();
4365  return __pyx_r;
4366 }
4367 
4368 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4369  PyObject *__pyx_r = NULL;
4370  __Pyx_RefNannyDeclarations
4371  PyObject *__pyx_t_1 = NULL;
4372  PyObject *__pyx_t_2 = NULL;
4373  __Pyx_RefNannySetupContext("__invert__", 0);
4374 
4375  /* "PyClical.pyx":245
4376  * {-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}
4377  * """
4378  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4379  *
4380  * def __xor__(lhs, rhs):
4381  */
4382  __Pyx_XDECREF(__pyx_r);
4383  __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)
4384  __Pyx_GOTREF(__pyx_t_1);
4385  __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)
4386  __Pyx_GOTREF(__pyx_t_2);
4387  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4388  __pyx_r = __pyx_t_2;
4389  __pyx_t_2 = 0;
4390  goto __pyx_L0;
4391 
4392  /* "PyClical.pyx":238
4393  * yield idx
4394  *
4395  * def __invert__(self): # <<<<<<<<<<<<<<
4396  * """
4397  * Set complement: not.
4398  */
4399 
4400  /* function exit code */
4401  __pyx_L1_error:;
4402  __Pyx_XDECREF(__pyx_t_1);
4403  __Pyx_XDECREF(__pyx_t_2);
4404  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4405  __pyx_r = NULL;
4406  __pyx_L0:;
4407  __Pyx_XGIVEREF(__pyx_r);
4408  __Pyx_RefNannyFinishContext();
4409  return __pyx_r;
4410 }
4411 
4412 /* "PyClical.pyx":247
4413  * return index_set().wrap( self.instance.invert() )
4414  *
4415  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4416  * """
4417  * Symmetric set difference: exclusive or.
4418  */
4419 
4420 /* Python wrapper */
4421 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4422 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 ";
4423 #if CYTHON_COMPILING_IN_CPYTHON
4424 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4425 #endif
4426 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4427  PyObject *__pyx_r = 0;
4428  __Pyx_RefNannyDeclarations
4429  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4430  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4431 
4432  /* function exit code */
4433  __Pyx_RefNannyFinishContext();
4434  return __pyx_r;
4435 }
4436 
4437 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4438  PyObject *__pyx_r = NULL;
4439  __Pyx_RefNannyDeclarations
4440  PyObject *__pyx_t_1 = NULL;
4441  PyObject *__pyx_t_2 = NULL;
4442  __Pyx_RefNannySetupContext("__xor__", 0);
4443 
4444  /* "PyClical.pyx":256
4445  * {1}
4446  * """
4447  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4448  *
4449  * def __ixor__(self, rhs):
4450  */
4451  __Pyx_XDECREF(__pyx_r);
4452  __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)
4453  __Pyx_GOTREF(__pyx_t_1);
4454  __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)
4455  __Pyx_GOTREF(__pyx_t_2);
4456  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4457  __pyx_r = __pyx_t_2;
4458  __pyx_t_2 = 0;
4459  goto __pyx_L0;
4460 
4461  /* "PyClical.pyx":247
4462  * return index_set().wrap( self.instance.invert() )
4463  *
4464  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4465  * """
4466  * Symmetric set difference: exclusive or.
4467  */
4468 
4469  /* function exit code */
4470  __pyx_L1_error:;
4471  __Pyx_XDECREF(__pyx_t_1);
4472  __Pyx_XDECREF(__pyx_t_2);
4473  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4474  __pyx_r = NULL;
4475  __pyx_L0:;
4476  __Pyx_XGIVEREF(__pyx_r);
4477  __Pyx_RefNannyFinishContext();
4478  return __pyx_r;
4479 }
4480 
4481 /* "PyClical.pyx":258
4482  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4483  *
4484  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4485  * """
4486  * Symmetric set difference: exclusive or.
4487  */
4488 
4489 /* Python wrapper */
4490 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4491 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 ";
4492 #if CYTHON_COMPILING_IN_CPYTHON
4493 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4494 #endif
4495 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4496  PyObject *__pyx_r = 0;
4497  __Pyx_RefNannyDeclarations
4498  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4499  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4500 
4501  /* function exit code */
4502  __Pyx_RefNannyFinishContext();
4503  return __pyx_r;
4504 }
4505 
4506 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4507  PyObject *__pyx_r = NULL;
4508  __Pyx_RefNannyDeclarations
4509  PyObject *__pyx_t_1 = NULL;
4510  __Pyx_RefNannySetupContext("__ixor__", 0);
4511 
4512  /* "PyClical.pyx":267
4513  * {1}
4514  * """
4515  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4516  *
4517  * def __and__(lhs, rhs):
4518  */
4519  __Pyx_XDECREF(__pyx_r);
4520  __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)
4521  __Pyx_GOTREF(__pyx_t_1);
4522  __pyx_r = __pyx_t_1;
4523  __pyx_t_1 = 0;
4524  goto __pyx_L0;
4525 
4526  /* "PyClical.pyx":258
4527  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4528  *
4529  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4530  * """
4531  * Symmetric set difference: exclusive or.
4532  */
4533 
4534  /* function exit code */
4535  __pyx_L1_error:;
4536  __Pyx_XDECREF(__pyx_t_1);
4537  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4538  __pyx_r = NULL;
4539  __pyx_L0:;
4540  __Pyx_XGIVEREF(__pyx_r);
4541  __Pyx_RefNannyFinishContext();
4542  return __pyx_r;
4543 }
4544 
4545 /* "PyClical.pyx":269
4546  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4547  *
4548  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4549  * """
4550  * Set intersection: and.
4551  */
4552 
4553 /* Python wrapper */
4554 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4555 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 ";
4556 #if CYTHON_COMPILING_IN_CPYTHON
4557 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4558 #endif
4559 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4560  PyObject *__pyx_r = 0;
4561  __Pyx_RefNannyDeclarations
4562  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4563  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4564 
4565  /* function exit code */
4566  __Pyx_RefNannyFinishContext();
4567  return __pyx_r;
4568 }
4569 
4570 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4571  PyObject *__pyx_r = NULL;
4572  __Pyx_RefNannyDeclarations
4573  PyObject *__pyx_t_1 = NULL;
4574  PyObject *__pyx_t_2 = NULL;
4575  __Pyx_RefNannySetupContext("__and__", 0);
4576 
4577  /* "PyClical.pyx":278
4578  * {2}
4579  * """
4580  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4581  *
4582  * def __iand__(self, rhs):
4583  */
4584  __Pyx_XDECREF(__pyx_r);
4585  __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)
4586  __Pyx_GOTREF(__pyx_t_1);
4587  __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)
4588  __Pyx_GOTREF(__pyx_t_2);
4589  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4590  __pyx_r = __pyx_t_2;
4591  __pyx_t_2 = 0;
4592  goto __pyx_L0;
4593 
4594  /* "PyClical.pyx":269
4595  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4596  *
4597  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4598  * """
4599  * Set intersection: and.
4600  */
4601 
4602  /* function exit code */
4603  __pyx_L1_error:;
4604  __Pyx_XDECREF(__pyx_t_1);
4605  __Pyx_XDECREF(__pyx_t_2);
4606  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4607  __pyx_r = NULL;
4608  __pyx_L0:;
4609  __Pyx_XGIVEREF(__pyx_r);
4610  __Pyx_RefNannyFinishContext();
4611  return __pyx_r;
4612 }
4613 
4614 /* "PyClical.pyx":280
4615  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4616  *
4617  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4618  * """
4619  * Set intersection: and.
4620  */
4621 
4622 /* Python wrapper */
4623 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4624 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 ";
4625 #if CYTHON_COMPILING_IN_CPYTHON
4626 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4627 #endif
4628 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4629  PyObject *__pyx_r = 0;
4630  __Pyx_RefNannyDeclarations
4631  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4632  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4633 
4634  /* function exit code */
4635  __Pyx_RefNannyFinishContext();
4636  return __pyx_r;
4637 }
4638 
4639 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4640  PyObject *__pyx_r = NULL;
4641  __Pyx_RefNannyDeclarations
4642  PyObject *__pyx_t_1 = NULL;
4643  __Pyx_RefNannySetupContext("__iand__", 0);
4644 
4645  /* "PyClical.pyx":289
4646  * {2}
4647  * """
4648  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4649  *
4650  * def __or__(lhs, rhs):
4651  */
4652  __Pyx_XDECREF(__pyx_r);
4653  __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)
4654  __Pyx_GOTREF(__pyx_t_1);
4655  __pyx_r = __pyx_t_1;
4656  __pyx_t_1 = 0;
4657  goto __pyx_L0;
4658 
4659  /* "PyClical.pyx":280
4660  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4661  *
4662  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4663  * """
4664  * Set intersection: and.
4665  */
4666 
4667  /* function exit code */
4668  __pyx_L1_error:;
4669  __Pyx_XDECREF(__pyx_t_1);
4670  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4671  __pyx_r = NULL;
4672  __pyx_L0:;
4673  __Pyx_XGIVEREF(__pyx_r);
4674  __Pyx_RefNannyFinishContext();
4675  return __pyx_r;
4676 }
4677 
4678 /* "PyClical.pyx":291
4679  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4680  *
4681  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4682  * """
4683  * Set union: or.
4684  */
4685 
4686 /* Python wrapper */
4687 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4688 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 ";
4689 #if CYTHON_COMPILING_IN_CPYTHON
4690 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4691 #endif
4692 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4693  PyObject *__pyx_r = 0;
4694  __Pyx_RefNannyDeclarations
4695  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4696  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4697 
4698  /* function exit code */
4699  __Pyx_RefNannyFinishContext();
4700  return __pyx_r;
4701 }
4702 
4703 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4704  PyObject *__pyx_r = NULL;
4705  __Pyx_RefNannyDeclarations
4706  PyObject *__pyx_t_1 = NULL;
4707  PyObject *__pyx_t_2 = NULL;
4708  __Pyx_RefNannySetupContext("__or__", 0);
4709 
4710  /* "PyClical.pyx":300
4711  * {1,2}
4712  * """
4713  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4714  *
4715  * def __ior__(self, rhs):
4716  */
4717  __Pyx_XDECREF(__pyx_r);
4718  __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)
4719  __Pyx_GOTREF(__pyx_t_1);
4720  __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)
4721  __Pyx_GOTREF(__pyx_t_2);
4722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4723  __pyx_r = __pyx_t_2;
4724  __pyx_t_2 = 0;
4725  goto __pyx_L0;
4726 
4727  /* "PyClical.pyx":291
4728  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4729  *
4730  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4731  * """
4732  * Set union: or.
4733  */
4734 
4735  /* function exit code */
4736  __pyx_L1_error:;
4737  __Pyx_XDECREF(__pyx_t_1);
4738  __Pyx_XDECREF(__pyx_t_2);
4739  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4740  __pyx_r = NULL;
4741  __pyx_L0:;
4742  __Pyx_XGIVEREF(__pyx_r);
4743  __Pyx_RefNannyFinishContext();
4744  return __pyx_r;
4745 }
4746 
4747 /* "PyClical.pyx":302
4748  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4749  *
4750  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4751  * """
4752  * Set union: or.
4753  */
4754 
4755 /* Python wrapper */
4756 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4757 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 ";
4758 #if CYTHON_COMPILING_IN_CPYTHON
4759 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4760 #endif
4761 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4762  PyObject *__pyx_r = 0;
4763  __Pyx_RefNannyDeclarations
4764  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4765  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4766 
4767  /* function exit code */
4768  __Pyx_RefNannyFinishContext();
4769  return __pyx_r;
4770 }
4771 
4772 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4773  PyObject *__pyx_r = NULL;
4774  __Pyx_RefNannyDeclarations
4775  PyObject *__pyx_t_1 = NULL;
4776  __Pyx_RefNannySetupContext("__ior__", 0);
4777 
4778  /* "PyClical.pyx":311
4779  * {1,2}
4780  * """
4781  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4782  *
4783  * def count(self):
4784  */
4785  __Pyx_XDECREF(__pyx_r);
4786  __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)
4787  __Pyx_GOTREF(__pyx_t_1);
4788  __pyx_r = __pyx_t_1;
4789  __pyx_t_1 = 0;
4790  goto __pyx_L0;
4791 
4792  /* "PyClical.pyx":302
4793  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4794  *
4795  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4796  * """
4797  * Set union: or.
4798  */
4799 
4800  /* function exit code */
4801  __pyx_L1_error:;
4802  __Pyx_XDECREF(__pyx_t_1);
4803  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4804  __pyx_r = NULL;
4805  __pyx_L0:;
4806  __Pyx_XGIVEREF(__pyx_r);
4807  __Pyx_RefNannyFinishContext();
4808  return __pyx_r;
4809 }
4810 
4811 /* "PyClical.pyx":313
4812  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4813  *
4814  * def count(self): # <<<<<<<<<<<<<<
4815  * """
4816  * Cardinality: Number of indices included in set.
4817  */
4818 
4819 /* Python wrapper */
4820 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4821 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 ";
4822 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4823  PyObject *__pyx_r = 0;
4824  __Pyx_RefNannyDeclarations
4825  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4826  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4827 
4828  /* function exit code */
4829  __Pyx_RefNannyFinishContext();
4830  return __pyx_r;
4831 }
4832 
4833 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4834  PyObject *__pyx_r = NULL;
4835  __Pyx_RefNannyDeclarations
4836  PyObject *__pyx_t_1 = NULL;
4837  __Pyx_RefNannySetupContext("count", 0);
4838 
4839  /* "PyClical.pyx":320
4840  * 3
4841  * """
4842  * return self.instance.count() # <<<<<<<<<<<<<<
4843  *
4844  * def count_neg(self):
4845  */
4846  __Pyx_XDECREF(__pyx_r);
4847  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4848  __Pyx_GOTREF(__pyx_t_1);
4849  __pyx_r = __pyx_t_1;
4850  __pyx_t_1 = 0;
4851  goto __pyx_L0;
4852 
4853  /* "PyClical.pyx":313
4854  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4855  *
4856  * def count(self): # <<<<<<<<<<<<<<
4857  * """
4858  * Cardinality: Number of indices included in set.
4859  */
4860 
4861  /* function exit code */
4862  __pyx_L1_error:;
4863  __Pyx_XDECREF(__pyx_t_1);
4864  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4865  __pyx_r = NULL;
4866  __pyx_L0:;
4867  __Pyx_XGIVEREF(__pyx_r);
4868  __Pyx_RefNannyFinishContext();
4869  return __pyx_r;
4870 }
4871 
4872 /* "PyClical.pyx":322
4873  * return self.instance.count()
4874  *
4875  * def count_neg(self): # <<<<<<<<<<<<<<
4876  * """
4877  * Number of negative indices included in set.
4878  */
4879 
4880 /* Python wrapper */
4881 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4882 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 ";
4883 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4884  PyObject *__pyx_r = 0;
4885  __Pyx_RefNannyDeclarations
4886  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4887  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4888 
4889  /* function exit code */
4890  __Pyx_RefNannyFinishContext();
4891  return __pyx_r;
4892 }
4893 
4894 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4895  PyObject *__pyx_r = NULL;
4896  __Pyx_RefNannyDeclarations
4897  PyObject *__pyx_t_1 = NULL;
4898  __Pyx_RefNannySetupContext("count_neg", 0);
4899 
4900  /* "PyClical.pyx":329
4901  * 1
4902  * """
4903  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4904  *
4905  * def count_pos(self):
4906  */
4907  __Pyx_XDECREF(__pyx_r);
4908  __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)
4909  __Pyx_GOTREF(__pyx_t_1);
4910  __pyx_r = __pyx_t_1;
4911  __pyx_t_1 = 0;
4912  goto __pyx_L0;
4913 
4914  /* "PyClical.pyx":322
4915  * return self.instance.count()
4916  *
4917  * def count_neg(self): # <<<<<<<<<<<<<<
4918  * """
4919  * Number of negative indices included in set.
4920  */
4921 
4922  /* function exit code */
4923  __pyx_L1_error:;
4924  __Pyx_XDECREF(__pyx_t_1);
4925  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4926  __pyx_r = NULL;
4927  __pyx_L0:;
4928  __Pyx_XGIVEREF(__pyx_r);
4929  __Pyx_RefNannyFinishContext();
4930  return __pyx_r;
4931 }
4932 
4933 /* "PyClical.pyx":331
4934  * return self.instance.count_neg()
4935  *
4936  * def count_pos(self): # <<<<<<<<<<<<<<
4937  * """
4938  * Number of positive indices included in set.
4939  */
4940 
4941 /* Python wrapper */
4942 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4943 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 ";
4944 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4945  PyObject *__pyx_r = 0;
4946  __Pyx_RefNannyDeclarations
4947  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
4948  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4949 
4950  /* function exit code */
4951  __Pyx_RefNannyFinishContext();
4952  return __pyx_r;
4953 }
4954 
4955 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4956  PyObject *__pyx_r = NULL;
4957  __Pyx_RefNannyDeclarations
4958  PyObject *__pyx_t_1 = NULL;
4959  __Pyx_RefNannySetupContext("count_pos", 0);
4960 
4961  /* "PyClical.pyx":338
4962  * 2
4963  * """
4964  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4965  *
4966  * def min(self):
4967  */
4968  __Pyx_XDECREF(__pyx_r);
4969  __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)
4970  __Pyx_GOTREF(__pyx_t_1);
4971  __pyx_r = __pyx_t_1;
4972  __pyx_t_1 = 0;
4973  goto __pyx_L0;
4974 
4975  /* "PyClical.pyx":331
4976  * return self.instance.count_neg()
4977  *
4978  * def count_pos(self): # <<<<<<<<<<<<<<
4979  * """
4980  * Number of positive indices included in set.
4981  */
4982 
4983  /* function exit code */
4984  __pyx_L1_error:;
4985  __Pyx_XDECREF(__pyx_t_1);
4986  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4987  __pyx_r = NULL;
4988  __pyx_L0:;
4989  __Pyx_XGIVEREF(__pyx_r);
4990  __Pyx_RefNannyFinishContext();
4991  return __pyx_r;
4992 }
4993 
4994 /* "PyClical.pyx":340
4995  * return self.instance.count_pos()
4996  *
4997  * def min(self): # <<<<<<<<<<<<<<
4998  * """
4999  * Minimum member.
5000  */
5001 
5002 /* Python wrapper */
5003 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5004 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5005 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5006  PyObject *__pyx_r = 0;
5007  __Pyx_RefNannyDeclarations
5008  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5009  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5010 
5011  /* function exit code */
5012  __Pyx_RefNannyFinishContext();
5013  return __pyx_r;
5014 }
5015 
5016 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5017  PyObject *__pyx_r = NULL;
5018  __Pyx_RefNannyDeclarations
5019  PyObject *__pyx_t_1 = NULL;
5020  __Pyx_RefNannySetupContext("min", 0);
5021 
5022  /* "PyClical.pyx":347
5023  * -1
5024  * """
5025  * return self.instance.min() # <<<<<<<<<<<<<<
5026  *
5027  * def max(self):
5028  */
5029  __Pyx_XDECREF(__pyx_r);
5030  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5031  __Pyx_GOTREF(__pyx_t_1);
5032  __pyx_r = __pyx_t_1;
5033  __pyx_t_1 = 0;
5034  goto __pyx_L0;
5035 
5036  /* "PyClical.pyx":340
5037  * return self.instance.count_pos()
5038  *
5039  * def min(self): # <<<<<<<<<<<<<<
5040  * """
5041  * Minimum member.
5042  */
5043 
5044  /* function exit code */
5045  __pyx_L1_error:;
5046  __Pyx_XDECREF(__pyx_t_1);
5047  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5048  __pyx_r = NULL;
5049  __pyx_L0:;
5050  __Pyx_XGIVEREF(__pyx_r);
5051  __Pyx_RefNannyFinishContext();
5052  return __pyx_r;
5053 }
5054 
5055 /* "PyClical.pyx":349
5056  * return self.instance.min()
5057  *
5058  * def max(self): # <<<<<<<<<<<<<<
5059  * """
5060  * Maximum member.
5061  */
5062 
5063 /* Python wrapper */
5064 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5065 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5066 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5067  PyObject *__pyx_r = 0;
5068  __Pyx_RefNannyDeclarations
5069  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5070  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5071 
5072  /* function exit code */
5073  __Pyx_RefNannyFinishContext();
5074  return __pyx_r;
5075 }
5076 
5077 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5078  PyObject *__pyx_r = NULL;
5079  __Pyx_RefNannyDeclarations
5080  PyObject *__pyx_t_1 = NULL;
5081  __Pyx_RefNannySetupContext("max", 0);
5082 
5083  /* "PyClical.pyx":356
5084  * 2
5085  * """
5086  * return self.instance.max() # <<<<<<<<<<<<<<
5087  *
5088  * def hash_fn(self):
5089  */
5090  __Pyx_XDECREF(__pyx_r);
5091  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5092  __Pyx_GOTREF(__pyx_t_1);
5093  __pyx_r = __pyx_t_1;
5094  __pyx_t_1 = 0;
5095  goto __pyx_L0;
5096 
5097  /* "PyClical.pyx":349
5098  * return self.instance.min()
5099  *
5100  * def max(self): # <<<<<<<<<<<<<<
5101  * """
5102  * Maximum member.
5103  */
5104 
5105  /* function exit code */
5106  __pyx_L1_error:;
5107  __Pyx_XDECREF(__pyx_t_1);
5108  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5109  __pyx_r = NULL;
5110  __pyx_L0:;
5111  __Pyx_XGIVEREF(__pyx_r);
5112  __Pyx_RefNannyFinishContext();
5113  return __pyx_r;
5114 }
5115 
5116 /* "PyClical.pyx":358
5117  * return self.instance.max()
5118  *
5119  * def hash_fn(self): # <<<<<<<<<<<<<<
5120  * """
5121  * Hash function.
5122  */
5123 
5124 /* Python wrapper */
5125 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5126 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5127 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5128  PyObject *__pyx_r = 0;
5129  __Pyx_RefNannyDeclarations
5130  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5131  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5132 
5133  /* function exit code */
5134  __Pyx_RefNannyFinishContext();
5135  return __pyx_r;
5136 }
5137 
5138 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5139  PyObject *__pyx_r = NULL;
5140  __Pyx_RefNannyDeclarations
5141  PyObject *__pyx_t_1 = NULL;
5142  __Pyx_RefNannySetupContext("hash_fn", 0);
5143 
5144  /* "PyClical.pyx":362
5145  * Hash function.
5146  * """
5147  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5148  *
5149  * def sign_of_mult(self, rhs):
5150  */
5151  __Pyx_XDECREF(__pyx_r);
5152  __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)
5153  __Pyx_GOTREF(__pyx_t_1);
5154  __pyx_r = __pyx_t_1;
5155  __pyx_t_1 = 0;
5156  goto __pyx_L0;
5157 
5158  /* "PyClical.pyx":358
5159  * return self.instance.max()
5160  *
5161  * def hash_fn(self): # <<<<<<<<<<<<<<
5162  * """
5163  * Hash function.
5164  */
5165 
5166  /* function exit code */
5167  __pyx_L1_error:;
5168  __Pyx_XDECREF(__pyx_t_1);
5169  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5170  __pyx_r = NULL;
5171  __pyx_L0:;
5172  __Pyx_XGIVEREF(__pyx_r);
5173  __Pyx_RefNannyFinishContext();
5174  return __pyx_r;
5175 }
5176 
5177 /* "PyClical.pyx":364
5178  * return self.instance.hash_fn()
5179  *
5180  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5181  * """
5182  * Sign of geometric product of two Clifford basis elements.
5183  */
5184 
5185 /* Python wrapper */
5186 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5187 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 ";
5188 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5189  PyObject *__pyx_r = 0;
5190  __Pyx_RefNannyDeclarations
5191  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5192  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5193 
5194  /* function exit code */
5195  __Pyx_RefNannyFinishContext();
5196  return __pyx_r;
5197 }
5198 
5199 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5200  PyObject *__pyx_r = NULL;
5201  __Pyx_RefNannyDeclarations
5202  PyObject *__pyx_t_1 = NULL;
5203  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5204 
5205  /* "PyClical.pyx":371
5206  * 1
5207  * """
5208  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5209  *
5210  * def sign_of_square(self):
5211  */
5212  __Pyx_XDECREF(__pyx_r);
5213  __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)
5214  __Pyx_GOTREF(__pyx_t_1);
5215  __pyx_r = __pyx_t_1;
5216  __pyx_t_1 = 0;
5217  goto __pyx_L0;
5218 
5219  /* "PyClical.pyx":364
5220  * return self.instance.hash_fn()
5221  *
5222  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5223  * """
5224  * Sign of geometric product of two Clifford basis elements.
5225  */
5226 
5227  /* function exit code */
5228  __pyx_L1_error:;
5229  __Pyx_XDECREF(__pyx_t_1);
5230  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5231  __pyx_r = NULL;
5232  __pyx_L0:;
5233  __Pyx_XGIVEREF(__pyx_r);
5234  __Pyx_RefNannyFinishContext();
5235  return __pyx_r;
5236 }
5237 
5238 /* "PyClical.pyx":373
5239  * return self.instance.sign_of_mult(toIndexSet(rhs))
5240  *
5241  * def sign_of_square(self): # <<<<<<<<<<<<<<
5242  * """
5243  * Sign of geometric square of a Clifford basis element.
5244  */
5245 
5246 /* Python wrapper */
5247 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5248 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 ";
5249 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5250  PyObject *__pyx_r = 0;
5251  __Pyx_RefNannyDeclarations
5252  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5253  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5254 
5255  /* function exit code */
5256  __Pyx_RefNannyFinishContext();
5257  return __pyx_r;
5258 }
5259 
5260 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5261  PyObject *__pyx_r = NULL;
5262  __Pyx_RefNannyDeclarations
5263  PyObject *__pyx_t_1 = NULL;
5264  __Pyx_RefNannySetupContext("sign_of_square", 0);
5265 
5266  /* "PyClical.pyx":380
5267  * -1
5268  * """
5269  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5270  *
5271  * def __repr__(self):
5272  */
5273  __Pyx_XDECREF(__pyx_r);
5274  __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)
5275  __Pyx_GOTREF(__pyx_t_1);
5276  __pyx_r = __pyx_t_1;
5277  __pyx_t_1 = 0;
5278  goto __pyx_L0;
5279 
5280  /* "PyClical.pyx":373
5281  * return self.instance.sign_of_mult(toIndexSet(rhs))
5282  *
5283  * def sign_of_square(self): # <<<<<<<<<<<<<<
5284  * """
5285  * Sign of geometric square of a Clifford basis element.
5286  */
5287 
5288  /* function exit code */
5289  __pyx_L1_error:;
5290  __Pyx_XDECREF(__pyx_t_1);
5291  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5292  __pyx_r = NULL;
5293  __pyx_L0:;
5294  __Pyx_XGIVEREF(__pyx_r);
5295  __Pyx_RefNannyFinishContext();
5296  return __pyx_r;
5297 }
5298 
5299 /* "PyClical.pyx":382
5300  * return self.instance.sign_of_square()
5301  *
5302  * def __repr__(self): # <<<<<<<<<<<<<<
5303  * """
5304  * The official string representation of self.
5305  */
5306 
5307 /* Python wrapper */
5308 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5309 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 ";
5310 #if CYTHON_COMPILING_IN_CPYTHON
5311 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5312 #endif
5313 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5314  PyObject *__pyx_r = 0;
5315  __Pyx_RefNannyDeclarations
5316  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5317  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5318 
5319  /* function exit code */
5320  __Pyx_RefNannyFinishContext();
5321  return __pyx_r;
5322 }
5323 
5324 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5325  PyObject *__pyx_r = NULL;
5326  __Pyx_RefNannyDeclarations
5327  PyObject *__pyx_t_1 = NULL;
5328  __Pyx_RefNannySetupContext("__repr__", 0);
5329 
5330  /* "PyClical.pyx":391
5331  * 'index_set({1,2})'
5332  * """
5333  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5334  *
5335  * def __str__(self):
5336  */
5337  __Pyx_XDECREF(__pyx_r);
5338  __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)
5339  __Pyx_GOTREF(__pyx_t_1);
5340  __pyx_r = __pyx_t_1;
5341  __pyx_t_1 = 0;
5342  goto __pyx_L0;
5343 
5344  /* "PyClical.pyx":382
5345  * return self.instance.sign_of_square()
5346  *
5347  * def __repr__(self): # <<<<<<<<<<<<<<
5348  * """
5349  * The official string representation of self.
5350  */
5351 
5352  /* function exit code */
5353  __pyx_L1_error:;
5354  __Pyx_XDECREF(__pyx_t_1);
5355  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5356  __pyx_r = NULL;
5357  __pyx_L0:;
5358  __Pyx_XGIVEREF(__pyx_r);
5359  __Pyx_RefNannyFinishContext();
5360  return __pyx_r;
5361 }
5362 
5363 /* "PyClical.pyx":393
5364  * return index_set_to_repr( self.unwrap() ).c_str()
5365  *
5366  * def __str__(self): # <<<<<<<<<<<<<<
5367  * """
5368  * The informal string representation of self.
5369  */
5370 
5371 /* Python wrapper */
5372 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5373 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 ";
5374 #if CYTHON_COMPILING_IN_CPYTHON
5375 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5376 #endif
5377 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5378  PyObject *__pyx_r = 0;
5379  __Pyx_RefNannyDeclarations
5380  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5381  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5382 
5383  /* function exit code */
5384  __Pyx_RefNannyFinishContext();
5385  return __pyx_r;
5386 }
5387 
5388 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5389  PyObject *__pyx_r = NULL;
5390  __Pyx_RefNannyDeclarations
5391  PyObject *__pyx_t_1 = NULL;
5392  __Pyx_RefNannySetupContext("__str__", 0);
5393 
5394  /* "PyClical.pyx":402
5395  * '{1,2}'
5396  * """
5397  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5398  *
5399  * def index_set_hidden_doctests():
5400  */
5401  __Pyx_XDECREF(__pyx_r);
5402  __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)
5403  __Pyx_GOTREF(__pyx_t_1);
5404  __pyx_r = __pyx_t_1;
5405  __pyx_t_1 = 0;
5406  goto __pyx_L0;
5407 
5408  /* "PyClical.pyx":393
5409  * return index_set_to_repr( self.unwrap() ).c_str()
5410  *
5411  * def __str__(self): # <<<<<<<<<<<<<<
5412  * """
5413  * The informal string representation of self.
5414  */
5415 
5416  /* function exit code */
5417  __pyx_L1_error:;
5418  __Pyx_XDECREF(__pyx_t_1);
5419  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5420  __pyx_r = NULL;
5421  __pyx_L0:;
5422  __Pyx_XGIVEREF(__pyx_r);
5423  __Pyx_RefNannyFinishContext();
5424  return __pyx_r;
5425 }
5426 
5427 /* "(tree fragment)":1
5428  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5429  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5430  * def __setstate_cython__(self, __pyx_state):
5431  */
5432 
5433 /* Python wrapper */
5434 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5435 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5436  PyObject *__pyx_r = 0;
5437  __Pyx_RefNannyDeclarations
5438  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5439  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5440 
5441  /* function exit code */
5442  __Pyx_RefNannyFinishContext();
5443  return __pyx_r;
5444 }
5445 
5446 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5447  PyObject *__pyx_r = NULL;
5448  __Pyx_RefNannyDeclarations
5449  PyObject *__pyx_t_1 = NULL;
5450  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5451 
5452  /* "(tree fragment)":2
5453  * def __reduce_cython__(self):
5454  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5455  * def __setstate_cython__(self, __pyx_state):
5456  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5457  */
5458  __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)
5459  __Pyx_GOTREF(__pyx_t_1);
5460  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5461  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5462  __PYX_ERR(1, 2, __pyx_L1_error)
5463 
5464  /* "(tree fragment)":1
5465  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5466  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5467  * def __setstate_cython__(self, __pyx_state):
5468  */
5469 
5470  /* function exit code */
5471  __pyx_L1_error:;
5472  __Pyx_XDECREF(__pyx_t_1);
5473  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5474  __pyx_r = NULL;
5475  __Pyx_XGIVEREF(__pyx_r);
5476  __Pyx_RefNannyFinishContext();
5477  return __pyx_r;
5478 }
5479 
5480 /* "(tree fragment)":3
5481  * def __reduce_cython__(self):
5482  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5483  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5484  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5485  */
5486 
5487 /* Python wrapper */
5488 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5489 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5490  PyObject *__pyx_r = 0;
5491  __Pyx_RefNannyDeclarations
5492  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5493  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5494 
5495  /* function exit code */
5496  __Pyx_RefNannyFinishContext();
5497  return __pyx_r;
5498 }
5499 
5500 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) {
5501  PyObject *__pyx_r = NULL;
5502  __Pyx_RefNannyDeclarations
5503  PyObject *__pyx_t_1 = NULL;
5504  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5505 
5506  /* "(tree fragment)":4
5507  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5508  * def __setstate_cython__(self, __pyx_state):
5509  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5510  */
5511  __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)
5512  __Pyx_GOTREF(__pyx_t_1);
5513  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5514  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5515  __PYX_ERR(1, 4, __pyx_L1_error)
5516 
5517  /* "(tree fragment)":3
5518  * def __reduce_cython__(self):
5519  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5520  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5521  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5522  */
5523 
5524  /* function exit code */
5525  __pyx_L1_error:;
5526  __Pyx_XDECREF(__pyx_t_1);
5527  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5528  __pyx_r = NULL;
5529  __Pyx_XGIVEREF(__pyx_r);
5530  __Pyx_RefNannyFinishContext();
5531  return __pyx_r;
5532 }
5533 
5534 /* "PyClical.pyx":404
5535  * return index_set_to_str( self.unwrap() ).c_str()
5536  *
5537  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5538  * """
5539  * Tests for functions that Doctest cannot see.
5540  */
5541 
5542 /* Python wrapper */
5543 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5544 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 ";
5545  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};
5546  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5547  PyObject *__pyx_r = 0;
5548  __Pyx_RefNannyDeclarations
5549  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5550  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5551 
5552  /* function exit code */
5553  __Pyx_RefNannyFinishContext();
5554  return __pyx_r;
5555  }
5556 
5557  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5558  PyObject *__pyx_r = NULL;
5559  __Pyx_RefNannyDeclarations
5560  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5561 
5562  /* "PyClical.pyx":488
5563  * False
5564  * """
5565  * return # <<<<<<<<<<<<<<
5566  *
5567  * cpdef inline compare(lhs,rhs):
5568  */
5569  __Pyx_XDECREF(__pyx_r);
5570  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5571  goto __pyx_L0;
5572 
5573  /* "PyClical.pyx":404
5574  * return index_set_to_str( self.unwrap() ).c_str()
5575  *
5576  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5577  * """
5578  * Tests for functions that Doctest cannot see.
5579  */
5580 
5581  /* function exit code */
5582  __pyx_L0:;
5583  __Pyx_XGIVEREF(__pyx_r);
5584  __Pyx_RefNannyFinishContext();
5585  return __pyx_r;
5586  }
5587 
5588  /* "PyClical.pyx":490
5589  * return
5590  *
5591  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5592  * """
5593  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5594  */
5595 
5596  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5597  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5598  PyObject *__pyx_r = NULL;
5599  __Pyx_RefNannyDeclarations
5600  PyObject *__pyx_t_1 = NULL;
5601  __Pyx_RefNannySetupContext("compare", 0);
5602 
5603  /* "PyClical.pyx":500
5604  * 1
5605  * """
5606  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5607  *
5608  * cpdef inline min_neg(obj):
5609  */
5610  __Pyx_XDECREF(__pyx_r);
5611  __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)
5612  __Pyx_GOTREF(__pyx_t_1);
5613  __pyx_r = __pyx_t_1;
5614  __pyx_t_1 = 0;
5615  goto __pyx_L0;
5616 
5617  /* "PyClical.pyx":490
5618  * return
5619  *
5620  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5621  * """
5622  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5623  */
5624 
5625  /* function exit code */
5626  __pyx_L1_error:;
5627  __Pyx_XDECREF(__pyx_t_1);
5628  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5629  __pyx_r = 0;
5630  __pyx_L0:;
5631  __Pyx_XGIVEREF(__pyx_r);
5632  __Pyx_RefNannyFinishContext();
5633  return __pyx_r;
5634  }
5635 
5636  /* Python wrapper */
5637  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5638  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 ";
5639  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5640  PyObject *__pyx_v_lhs = 0;
5641  PyObject *__pyx_v_rhs = 0;
5642  PyObject *__pyx_r = 0;
5643  __Pyx_RefNannyDeclarations
5644  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5645  {
5646  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5647  PyObject* values[2] = {0,0};
5648  if (unlikely(__pyx_kwds)) {
5649  Py_ssize_t kw_args;
5650  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5651  switch (pos_args) {
5652  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5653  CYTHON_FALLTHROUGH;
5654  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5655  CYTHON_FALLTHROUGH;
5656  case 0: break;
5657  default: goto __pyx_L5_argtuple_error;
5658  }
5659  kw_args = PyDict_Size(__pyx_kwds);
5660  switch (pos_args) {
5661  case 0:
5662  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5663  else goto __pyx_L5_argtuple_error;
5664  CYTHON_FALLTHROUGH;
5665  case 1:
5666  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5667  else {
5668  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5669  }
5670  }
5671  if (unlikely(kw_args > 0)) {
5672  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5673  }
5674  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5675  goto __pyx_L5_argtuple_error;
5676  } else {
5677  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5678  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5679  }
5680  __pyx_v_lhs = values[0];
5681  __pyx_v_rhs = values[1];
5682  }
5683  goto __pyx_L4_argument_unpacking_done;
5684  __pyx_L5_argtuple_error:;
5685  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5686  __pyx_L3_error:;
5687  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5688  __Pyx_RefNannyFinishContext();
5689  return NULL;
5690  __pyx_L4_argument_unpacking_done:;
5691  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5692 
5693  /* function exit code */
5694  __Pyx_RefNannyFinishContext();
5695  return __pyx_r;
5696  }
5697 
5698  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5699  PyObject *__pyx_r = NULL;
5700  __Pyx_RefNannyDeclarations
5701  PyObject *__pyx_t_1 = NULL;
5702  __Pyx_RefNannySetupContext("compare", 0);
5703  __Pyx_XDECREF(__pyx_r);
5704  __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)
5705  __Pyx_GOTREF(__pyx_t_1);
5706  __pyx_r = __pyx_t_1;
5707  __pyx_t_1 = 0;
5708  goto __pyx_L0;
5709 
5710  /* function exit code */
5711  __pyx_L1_error:;
5712  __Pyx_XDECREF(__pyx_t_1);
5713  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5714  __pyx_r = NULL;
5715  __pyx_L0:;
5716  __Pyx_XGIVEREF(__pyx_r);
5717  __Pyx_RefNannyFinishContext();
5718  return __pyx_r;
5719  }
5720 
5721  /* "PyClical.pyx":502
5722  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5723  *
5724  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5725  * """
5726  * Minimum negative index, or 0 if none.
5727  */
5728 
5729  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5730  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5731  PyObject *__pyx_r = NULL;
5732  __Pyx_RefNannyDeclarations
5733  PyObject *__pyx_t_1 = NULL;
5734  __Pyx_RefNannySetupContext("min_neg", 0);
5735 
5736  /* "PyClical.pyx":509
5737  * 0
5738  * """
5739  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5740  *
5741  * cpdef inline max_pos(obj):
5742  */
5743  __Pyx_XDECREF(__pyx_r);
5744  __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)
5745  __Pyx_GOTREF(__pyx_t_1);
5746  __pyx_r = __pyx_t_1;
5747  __pyx_t_1 = 0;
5748  goto __pyx_L0;
5749 
5750  /* "PyClical.pyx":502
5751  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5752  *
5753  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5754  * """
5755  * Minimum negative index, or 0 if none.
5756  */
5757 
5758  /* function exit code */
5759  __pyx_L1_error:;
5760  __Pyx_XDECREF(__pyx_t_1);
5761  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5762  __pyx_r = 0;
5763  __pyx_L0:;
5764  __Pyx_XGIVEREF(__pyx_r);
5765  __Pyx_RefNannyFinishContext();
5766  return __pyx_r;
5767  }
5768 
5769  /* Python wrapper */
5770  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5771  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 ";
5772  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5773  PyObject *__pyx_r = 0;
5774  __Pyx_RefNannyDeclarations
5775  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5776  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5777 
5778  /* function exit code */
5779  __Pyx_RefNannyFinishContext();
5780  return __pyx_r;
5781  }
5782 
5783  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5784  PyObject *__pyx_r = NULL;
5785  __Pyx_RefNannyDeclarations
5786  PyObject *__pyx_t_1 = NULL;
5787  __Pyx_RefNannySetupContext("min_neg", 0);
5788  __Pyx_XDECREF(__pyx_r);
5789  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5790  __Pyx_GOTREF(__pyx_t_1);
5791  __pyx_r = __pyx_t_1;
5792  __pyx_t_1 = 0;
5793  goto __pyx_L0;
5794 
5795  /* function exit code */
5796  __pyx_L1_error:;
5797  __Pyx_XDECREF(__pyx_t_1);
5798  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5799  __pyx_r = NULL;
5800  __pyx_L0:;
5801  __Pyx_XGIVEREF(__pyx_r);
5802  __Pyx_RefNannyFinishContext();
5803  return __pyx_r;
5804  }
5805 
5806  /* "PyClical.pyx":511
5807  * return glucat.min_neg( toIndexSet(obj) )
5808  *
5809  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5810  * """
5811  * Maximum positive index, or 0 if none.
5812  */
5813 
5814  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5815  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5816  PyObject *__pyx_r = NULL;
5817  __Pyx_RefNannyDeclarations
5818  PyObject *__pyx_t_1 = NULL;
5819  __Pyx_RefNannySetupContext("max_pos", 0);
5820 
5821  /* "PyClical.pyx":518
5822  * 2
5823  * """
5824  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5825  *
5826  * cdef inline vector[scalar_t] list_to_vector(lst):
5827  */
5828  __Pyx_XDECREF(__pyx_r);
5829  __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)
5830  __Pyx_GOTREF(__pyx_t_1);
5831  __pyx_r = __pyx_t_1;
5832  __pyx_t_1 = 0;
5833  goto __pyx_L0;
5834 
5835  /* "PyClical.pyx":511
5836  * return glucat.min_neg( toIndexSet(obj) )
5837  *
5838  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5839  * """
5840  * Maximum positive index, or 0 if none.
5841  */
5842 
5843  /* function exit code */
5844  __pyx_L1_error:;
5845  __Pyx_XDECREF(__pyx_t_1);
5846  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5847  __pyx_r = 0;
5848  __pyx_L0:;
5849  __Pyx_XGIVEREF(__pyx_r);
5850  __Pyx_RefNannyFinishContext();
5851  return __pyx_r;
5852  }
5853 
5854  /* Python wrapper */
5855  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5856  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 ";
5857  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5858  PyObject *__pyx_r = 0;
5859  __Pyx_RefNannyDeclarations
5860  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5861  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5862 
5863  /* function exit code */
5864  __Pyx_RefNannyFinishContext();
5865  return __pyx_r;
5866  }
5867 
5868  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5869  PyObject *__pyx_r = NULL;
5870  __Pyx_RefNannyDeclarations
5871  PyObject *__pyx_t_1 = NULL;
5872  __Pyx_RefNannySetupContext("max_pos", 0);
5873  __Pyx_XDECREF(__pyx_r);
5874  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5875  __Pyx_GOTREF(__pyx_t_1);
5876  __pyx_r = __pyx_t_1;
5877  __pyx_t_1 = 0;
5878  goto __pyx_L0;
5879 
5880  /* function exit code */
5881  __pyx_L1_error:;
5882  __Pyx_XDECREF(__pyx_t_1);
5883  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5884  __pyx_r = NULL;
5885  __pyx_L0:;
5886  __Pyx_XGIVEREF(__pyx_r);
5887  __Pyx_RefNannyFinishContext();
5888  return __pyx_r;
5889  }
5890 
5891  /* "PyClical.pyx":520
5892  * return glucat.max_pos( toIndexSet(obj) )
5893  *
5894  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5895  * """
5896  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5897  */
5898 
5899  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5900  std::vector<scalar_t> __pyx_v_v;
5901  PyObject *__pyx_v_s = NULL;
5902  std::vector<scalar_t> __pyx_r;
5903  __Pyx_RefNannyDeclarations
5904  PyObject *__pyx_t_1 = NULL;
5905  Py_ssize_t __pyx_t_2;
5906  PyObject *(*__pyx_t_3)(PyObject *);
5907  PyObject *__pyx_t_4 = NULL;
5908  scalar_t __pyx_t_5;
5909  __Pyx_RefNannySetupContext("list_to_vector", 0);
5910 
5911  /* "PyClical.pyx":525
5912  * """
5913  * cdef vector[scalar_t] v
5914  * for s in lst: # <<<<<<<<<<<<<<
5915  * v.push_back(<scalar_t>s)
5916  * return v
5917  */
5918  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5919  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5920  __pyx_t_3 = NULL;
5921  } else {
5922  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5923  __Pyx_GOTREF(__pyx_t_1);
5924  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5925  }
5926  for (;;) {
5927  if (likely(!__pyx_t_3)) {
5928  if (likely(PyList_CheckExact(__pyx_t_1))) {
5929  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5930  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5931  __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)
5932  #else
5933  __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)
5934  __Pyx_GOTREF(__pyx_t_4);
5935  #endif
5936  } else {
5937  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5938  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5939  __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)
5940  #else
5941  __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)
5942  __Pyx_GOTREF(__pyx_t_4);
5943  #endif
5944  }
5945  } else {
5946  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5947  if (unlikely(!__pyx_t_4)) {
5948  PyObject* exc_type = PyErr_Occurred();
5949  if (exc_type) {
5950  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5951  else __PYX_ERR(0, 525, __pyx_L1_error)
5952  }
5953  break;
5954  }
5955  __Pyx_GOTREF(__pyx_t_4);
5956  }
5957  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5958  __pyx_t_4 = 0;
5959 
5960  /* "PyClical.pyx":526
5961  * cdef vector[scalar_t] v
5962  * for s in lst:
5963  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
5964  * return v
5965  *
5966  */
5967  __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)
5968  try {
5969  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
5970  } catch(...) {
5971  __Pyx_CppExn2PyErr();
5972  __PYX_ERR(0, 526, __pyx_L1_error)
5973  }
5974 
5975  /* "PyClical.pyx":525
5976  * """
5977  * cdef vector[scalar_t] v
5978  * for s in lst: # <<<<<<<<<<<<<<
5979  * v.push_back(<scalar_t>s)
5980  * return v
5981  */
5982  }
5983  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5984 
5985  /* "PyClical.pyx":527
5986  * for s in lst:
5987  * v.push_back(<scalar_t>s)
5988  * return v # <<<<<<<<<<<<<<
5989  *
5990  * # Forward reference.
5991  */
5992  __pyx_r = __pyx_v_v;
5993  goto __pyx_L0;
5994 
5995  /* "PyClical.pyx":520
5996  * return glucat.max_pos( toIndexSet(obj) )
5997  *
5998  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5999  * """
6000  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6001  */
6002 
6003  /* function exit code */
6004  __pyx_L1_error:;
6005  __Pyx_XDECREF(__pyx_t_1);
6006  __Pyx_XDECREF(__pyx_t_4);
6007  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6008  __Pyx_pretend_to_initialize(&__pyx_r);
6009  __pyx_L0:;
6010  __Pyx_XDECREF(__pyx_v_s);
6011  __Pyx_RefNannyFinishContext();
6012  return __pyx_r;
6013  }
6014 
6015  /* "PyClical.pyx":532
6016  * cdef class clifford
6017  *
6018  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6019  * return clifford(obj).instance[0]
6020  *
6021  */
6022 
6023  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6024  Clifford __pyx_r;
6025  __Pyx_RefNannyDeclarations
6026  PyObject *__pyx_t_1 = NULL;
6027  PyObject *__pyx_t_2 = NULL;
6028  __Pyx_RefNannySetupContext("toClifford", 0);
6029 
6030  /* "PyClical.pyx":533
6031  *
6032  * cdef inline Clifford toClifford(obj):
6033  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6034  *
6035  * cdef class clifford:
6036  */
6037  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
6038  __Pyx_GOTREF(__pyx_t_1);
6039  __Pyx_INCREF(__pyx_v_obj);
6040  __Pyx_GIVEREF(__pyx_v_obj);
6041  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
6042  __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)
6043  __Pyx_GOTREF(__pyx_t_2);
6044  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6045  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
6046  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6047  goto __pyx_L0;
6048 
6049  /* "PyClical.pyx":532
6050  * cdef class clifford
6051  *
6052  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6053  * return clifford(obj).instance[0]
6054  *
6055  */
6056 
6057  /* function exit code */
6058  __pyx_L1_error:;
6059  __Pyx_XDECREF(__pyx_t_1);
6060  __Pyx_XDECREF(__pyx_t_2);
6061  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6062  __Pyx_pretend_to_initialize(&__pyx_r);
6063  __pyx_L0:;
6064  __Pyx_RefNannyFinishContext();
6065  return __pyx_r;
6066  }
6067 
6068  /* "PyClical.pyx":541
6069  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6070  *
6071  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6072  * """
6073  * Wrap an instance of the C++ class Clifford.
6074  */
6075 
6076  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6077  PyObject *__pyx_r = NULL;
6078  __Pyx_RefNannyDeclarations
6079  __Pyx_RefNannySetupContext("wrap", 0);
6080 
6081  /* "PyClical.pyx":545
6082  * Wrap an instance of the C++ class Clifford.
6083  * """
6084  * self.instance[0] = other # <<<<<<<<<<<<<<
6085  * return self
6086  *
6087  */
6088  (__pyx_v_self->instance[0]) = __pyx_v_other;
6089 
6090  /* "PyClical.pyx":546
6091  * """
6092  * self.instance[0] = other
6093  * return self # <<<<<<<<<<<<<<
6094  *
6095  * cdef inline Clifford unwrap(clifford self):
6096  */
6097  __Pyx_XDECREF(__pyx_r);
6098  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6099  __pyx_r = ((PyObject *)__pyx_v_self);
6100  goto __pyx_L0;
6101 
6102  /* "PyClical.pyx":541
6103  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6104  *
6105  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6106  * """
6107  * Wrap an instance of the C++ class Clifford.
6108  */
6109 
6110  /* function exit code */
6111  __pyx_L0:;
6112  __Pyx_XGIVEREF(__pyx_r);
6113  __Pyx_RefNannyFinishContext();
6114  return __pyx_r;
6115  }
6116 
6117  /* "PyClical.pyx":548
6118  * return self
6119  *
6120  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6121  * """
6122  * Return the wrapped C++ Clifford instance.
6123  */
6124 
6125  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6126  Clifford __pyx_r;
6127  __Pyx_RefNannyDeclarations
6128  __Pyx_RefNannySetupContext("unwrap", 0);
6129 
6130  /* "PyClical.pyx":552
6131  * Return the wrapped C++ Clifford instance.
6132  * """
6133  * return self.instance[0] # <<<<<<<<<<<<<<
6134  *
6135  * cpdef copy(clifford self):
6136  */
6137  __pyx_r = (__pyx_v_self->instance[0]);
6138  goto __pyx_L0;
6139 
6140  /* "PyClical.pyx":548
6141  * return self
6142  *
6143  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6144  * """
6145  * Return the wrapped C++ Clifford instance.
6146  */
6147 
6148  /* function exit code */
6149  __pyx_L0:;
6150  __Pyx_RefNannyFinishContext();
6151  return __pyx_r;
6152  }
6153 
6154  /* "PyClical.pyx":554
6155  * return self.instance[0]
6156  *
6157  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6158  * """
6159  * Copy this clifford object.
6160  */
6161 
6162  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6163  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6164  PyObject *__pyx_r = NULL;
6165  __Pyx_RefNannyDeclarations
6166  PyObject *__pyx_t_1 = NULL;
6167  PyObject *__pyx_t_2 = NULL;
6168  PyObject *__pyx_t_3 = NULL;
6169  PyObject *__pyx_t_4 = NULL;
6170  __Pyx_RefNannySetupContext("copy", 0);
6171  /* Check if called by wrapper */
6172  if (unlikely(__pyx_skip_dispatch)) ;
6173  /* Check if overridden in Python */
6174  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
6175  __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)
6176  __Pyx_GOTREF(__pyx_t_1);
6177  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
6178  __Pyx_XDECREF(__pyx_r);
6179  __Pyx_INCREF(__pyx_t_1);
6180  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6181  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6182  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6183  if (likely(__pyx_t_4)) {
6184  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6185  __Pyx_INCREF(__pyx_t_4);
6186  __Pyx_INCREF(function);
6187  __Pyx_DECREF_SET(__pyx_t_3, function);
6188  }
6189  }
6190  if (__pyx_t_4) {
6191  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6192  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6193  } else {
6194  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6195  }
6196  __Pyx_GOTREF(__pyx_t_2);
6197  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6198  __pyx_r = __pyx_t_2;
6199  __pyx_t_2 = 0;
6200  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6201  goto __pyx_L0;
6202  }
6203  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6204  }
6205 
6206  /* "PyClical.pyx":561
6207  * {2}
6208  * """
6209  * return clifford(self) # <<<<<<<<<<<<<<
6210  *
6211  * def __cinit__(self, other = 0, ixt = None):
6212  */
6213  __Pyx_XDECREF(__pyx_r);
6214  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
6215  __Pyx_GOTREF(__pyx_t_1);
6216  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6217  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6218  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
6219  __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)
6220  __Pyx_GOTREF(__pyx_t_2);
6221  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6222  __pyx_r = __pyx_t_2;
6223  __pyx_t_2 = 0;
6224  goto __pyx_L0;
6225 
6226  /* "PyClical.pyx":554
6227  * return self.instance[0]
6228  *
6229  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6230  * """
6231  * Copy this clifford object.
6232  */
6233 
6234  /* function exit code */
6235  __pyx_L1_error:;
6236  __Pyx_XDECREF(__pyx_t_1);
6237  __Pyx_XDECREF(__pyx_t_2);
6238  __Pyx_XDECREF(__pyx_t_3);
6239  __Pyx_XDECREF(__pyx_t_4);
6240  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6241  __pyx_r = 0;
6242  __pyx_L0:;
6243  __Pyx_XGIVEREF(__pyx_r);
6244  __Pyx_RefNannyFinishContext();
6245  return __pyx_r;
6246  }
6247 
6248  /* Python wrapper */
6249  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6250  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 ";
6251  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6252  PyObject *__pyx_r = 0;
6253  __Pyx_RefNannyDeclarations
6254  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6255  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6256 
6257  /* function exit code */
6258  __Pyx_RefNannyFinishContext();
6259  return __pyx_r;
6260  }
6261 
6262  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6263  PyObject *__pyx_r = NULL;
6264  __Pyx_RefNannyDeclarations
6265  PyObject *__pyx_t_1 = NULL;
6266  __Pyx_RefNannySetupContext("copy", 0);
6267  __Pyx_XDECREF(__pyx_r);
6268  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6269  __Pyx_GOTREF(__pyx_t_1);
6270  __pyx_r = __pyx_t_1;
6271  __pyx_t_1 = 0;
6272  goto __pyx_L0;
6273 
6274  /* function exit code */
6275  __pyx_L1_error:;
6276  __Pyx_XDECREF(__pyx_t_1);
6277  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6278  __pyx_r = NULL;
6279  __pyx_L0:;
6280  __Pyx_XGIVEREF(__pyx_r);
6281  __Pyx_RefNannyFinishContext();
6282  return __pyx_r;
6283  }
6284 
6285  /* "PyClical.pyx":563
6286  * return clifford(self)
6287  *
6288  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6289  * """
6290  * Construct an object of type clifford.
6291  */
6292 
6293  /* Python wrapper */
6294  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6295  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6296  PyObject *__pyx_v_other = 0;
6297  PyObject *__pyx_v_ixt = 0;
6298  int __pyx_r;
6299  __Pyx_RefNannyDeclarations
6300  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6301  {
6302  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6303  PyObject* values[2] = {0,0};
6304  values[0] = ((PyObject *)__pyx_int_0);
6305  values[1] = ((PyObject *)Py_None);
6306  if (unlikely(__pyx_kwds)) {
6307  Py_ssize_t kw_args;
6308  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6309  switch (pos_args) {
6310  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6311  CYTHON_FALLTHROUGH;
6312  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6313  CYTHON_FALLTHROUGH;
6314  case 0: break;
6315  default: goto __pyx_L5_argtuple_error;
6316  }
6317  kw_args = PyDict_Size(__pyx_kwds);
6318  switch (pos_args) {
6319  case 0:
6320  if (kw_args > 0) {
6321  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
6322  if (value) { values[0] = value; kw_args--; }
6323  }
6324  CYTHON_FALLTHROUGH;
6325  case 1:
6326  if (kw_args > 0) {
6327  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
6328  if (value) { values[1] = value; kw_args--; }
6329  }
6330  }
6331  if (unlikely(kw_args > 0)) {
6332  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6333  }
6334  } else {
6335  switch (PyTuple_GET_SIZE(__pyx_args)) {
6336  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6337  CYTHON_FALLTHROUGH;
6338  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6339  CYTHON_FALLTHROUGH;
6340  case 0: break;
6341  default: goto __pyx_L5_argtuple_error;
6342  }
6343  }
6344  __pyx_v_other = values[0];
6345  __pyx_v_ixt = values[1];
6346  }
6347  goto __pyx_L4_argument_unpacking_done;
6348  __pyx_L5_argtuple_error:;
6349  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6350  __pyx_L3_error:;
6351  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6352  __Pyx_RefNannyFinishContext();
6353  return -1;
6354  __pyx_L4_argument_unpacking_done:;
6355  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6356 
6357  /* function exit code */
6358  __Pyx_RefNannyFinishContext();
6359  return __pyx_r;
6360  }
6361 
6362  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6363  PyObject *__pyx_v_error_msg_prefix = NULL;
6364  PyObject *__pyx_v_err = NULL;
6365  int __pyx_r;
6366  __Pyx_RefNannyDeclarations
6367  int __pyx_t_1;
6368  int __pyx_t_2;
6369  PyObject *__pyx_t_3 = NULL;
6370  PyObject *__pyx_t_4 = NULL;
6371  PyObject *__pyx_t_5 = NULL;
6372  Clifford *__pyx_t_6;
6373  PyObject *__pyx_t_7 = NULL;
6374  PyObject *__pyx_t_8 = NULL;
6375  scalar_t __pyx_t_9;
6376  PyObject *__pyx_t_10 = NULL;
6377  PyObject *__pyx_t_11 = NULL;
6378  PyObject *__pyx_t_12 = NULL;
6379  char *__pyx_t_13;
6380  int __pyx_t_14;
6381  PyObject *__pyx_t_15 = NULL;
6382  PyObject *__pyx_t_16 = NULL;
6383  PyObject *__pyx_t_17 = NULL;
6384  PyObject *__pyx_t_18 = NULL;
6385  __Pyx_RefNannySetupContext("__cinit__", 0);
6386 
6387  /* "PyClical.pyx":588
6388  * 2{1}+3{2}
6389  * """
6390  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6391  * if ixt is None:
6392  * try:
6393  */
6394  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6395  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6396 
6397  /* "PyClical.pyx":589
6398  * """
6399  * error_msg_prefix = "Cannot initialize clifford object from"
6400  * if ixt is None: # <<<<<<<<<<<<<<
6401  * try:
6402  * if isinstance(other, clifford):
6403  */
6404  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6405  __pyx_t_2 = (__pyx_t_1 != 0);
6406  if (__pyx_t_2) {
6407 
6408  /* "PyClical.pyx":590
6409  * error_msg_prefix = "Cannot initialize clifford object from"
6410  * if ixt is None:
6411  * try: # <<<<<<<<<<<<<<
6412  * if isinstance(other, clifford):
6413  * self.instance = new Clifford((<clifford>other).unwrap())
6414  */
6415  {
6416  __Pyx_PyThreadState_declare
6417  __Pyx_PyThreadState_assign
6418  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6419  __Pyx_XGOTREF(__pyx_t_3);
6420  __Pyx_XGOTREF(__pyx_t_4);
6421  __Pyx_XGOTREF(__pyx_t_5);
6422  /*try:*/ {
6423 
6424  /* "PyClical.pyx":591
6425  * if ixt is None:
6426  * try:
6427  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6428  * self.instance = new Clifford((<clifford>other).unwrap())
6429  * elif isinstance(other, index_set):
6430  */
6431  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6432  __pyx_t_1 = (__pyx_t_2 != 0);
6433  if (__pyx_t_1) {
6434 
6435  /* "PyClical.pyx":592
6436  * try:
6437  * if isinstance(other, clifford):
6438  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6439  * elif isinstance(other, index_set):
6440  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6441  */
6442  try {
6443  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6444  } catch(...) {
6445  __Pyx_CppExn2PyErr();
6446  __PYX_ERR(0, 592, __pyx_L4_error)
6447  }
6448  __pyx_v_self->instance = __pyx_t_6;
6449 
6450  /* "PyClical.pyx":591
6451  * if ixt is None:
6452  * try:
6453  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6454  * self.instance = new Clifford((<clifford>other).unwrap())
6455  * elif isinstance(other, index_set):
6456  */
6457  goto __pyx_L10;
6458  }
6459 
6460  /* "PyClical.pyx":593
6461  * if isinstance(other, clifford):
6462  * self.instance = new Clifford((<clifford>other).unwrap())
6463  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6464  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6465  * elif isinstance(other, numbers.Real):
6466  */
6467  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6468  __pyx_t_2 = (__pyx_t_1 != 0);
6469  if (__pyx_t_2) {
6470 
6471  /* "PyClical.pyx":594
6472  * self.instance = new Clifford((<clifford>other).unwrap())
6473  * elif isinstance(other, index_set):
6474  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6475  * elif isinstance(other, numbers.Real):
6476  * self.instance = new Clifford(<scalar_t>other)
6477  */
6478  try {
6479  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6480  } catch(...) {
6481  __Pyx_CppExn2PyErr();
6482  __PYX_ERR(0, 594, __pyx_L4_error)
6483  }
6484  __pyx_v_self->instance = __pyx_t_6;
6485 
6486  /* "PyClical.pyx":593
6487  * if isinstance(other, clifford):
6488  * self.instance = new Clifford((<clifford>other).unwrap())
6489  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6490  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6491  * elif isinstance(other, numbers.Real):
6492  */
6493  goto __pyx_L10;
6494  }
6495 
6496  /* "PyClical.pyx":595
6497  * elif isinstance(other, index_set):
6498  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6499  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6500  * self.instance = new Clifford(<scalar_t>other)
6501  * elif isinstance(other, str):
6502  */
6503  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6504  __Pyx_GOTREF(__pyx_t_7);
6505  __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)
6506  __Pyx_GOTREF(__pyx_t_8);
6507  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6508  __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)
6509  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6510  __pyx_t_1 = (__pyx_t_2 != 0);
6511  if (__pyx_t_1) {
6512 
6513  /* "PyClical.pyx":596
6514  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6515  * elif isinstance(other, numbers.Real):
6516  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6517  * elif isinstance(other, str):
6518  * try:
6519  */
6520  __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)
6521  try {
6522  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6523  } catch(...) {
6524  __Pyx_CppExn2PyErr();
6525  __PYX_ERR(0, 596, __pyx_L4_error)
6526  }
6527  __pyx_v_self->instance = __pyx_t_6;
6528 
6529  /* "PyClical.pyx":595
6530  * elif isinstance(other, index_set):
6531  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6532  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6533  * self.instance = new Clifford(<scalar_t>other)
6534  * elif isinstance(other, str):
6535  */
6536  goto __pyx_L10;
6537  }
6538 
6539  /* "PyClical.pyx":597
6540  * elif isinstance(other, numbers.Real):
6541  * self.instance = new Clifford(<scalar_t>other)
6542  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6543  * try:
6544  * self.instance = new Clifford(<char *>other)
6545  */
6546  __pyx_t_1 = PyString_Check(__pyx_v_other);
6547  __pyx_t_2 = (__pyx_t_1 != 0);
6548  if (__pyx_t_2) {
6549 
6550  /* "PyClical.pyx":598
6551  * self.instance = new Clifford(<scalar_t>other)
6552  * elif isinstance(other, str):
6553  * try: # <<<<<<<<<<<<<<
6554  * self.instance = new Clifford(<char *>other)
6555  * except RuntimeError:
6556  */
6557  {
6558  __Pyx_PyThreadState_declare
6559  __Pyx_PyThreadState_assign
6560  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6561  __Pyx_XGOTREF(__pyx_t_10);
6562  __Pyx_XGOTREF(__pyx_t_11);
6563  __Pyx_XGOTREF(__pyx_t_12);
6564  /*try:*/ {
6565 
6566  /* "PyClical.pyx":599
6567  * elif isinstance(other, str):
6568  * try:
6569  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6570  * except RuntimeError:
6571  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6572  */
6573  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6574  try {
6575  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6576  } catch(...) {
6577  __Pyx_CppExn2PyErr();
6578  __PYX_ERR(0, 599, __pyx_L11_error)
6579  }
6580  __pyx_v_self->instance = __pyx_t_6;
6581 
6582  /* "PyClical.pyx":598
6583  * self.instance = new Clifford(<scalar_t>other)
6584  * elif isinstance(other, str):
6585  * try: # <<<<<<<<<<<<<<
6586  * self.instance = new Clifford(<char *>other)
6587  * except RuntimeError:
6588  */
6589  }
6590  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6591  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6592  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6593  goto __pyx_L16_try_end;
6594  __pyx_L11_error:;
6595  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6596  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6597 
6598  /* "PyClical.pyx":600
6599  * try:
6600  * self.instance = new Clifford(<char *>other)
6601  * except RuntimeError: # <<<<<<<<<<<<<<
6602  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6603  * else:
6604  */
6605  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6606  if (__pyx_t_14) {
6607  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6608  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6609  __Pyx_GOTREF(__pyx_t_8);
6610  __Pyx_GOTREF(__pyx_t_7);
6611  __Pyx_GOTREF(__pyx_t_15);
6612 
6613  /* "PyClical.pyx":601
6614  * self.instance = new Clifford(<char *>other)
6615  * except RuntimeError:
6616  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6617  * else:
6618  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6619  */
6620  __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)
6621  __Pyx_GOTREF(__pyx_t_16);
6622  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6623  __Pyx_GOTREF(__pyx_t_17);
6624  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6625  __Pyx_GOTREF(__pyx_t_18);
6626  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6627  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6628  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6629  __Pyx_GOTREF(__pyx_t_17);
6630  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6631  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6632  __Pyx_GOTREF(__pyx_t_18);
6633  __Pyx_GIVEREF(__pyx_t_17);
6634  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
6635  __pyx_t_17 = 0;
6636  __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)
6637  __Pyx_GOTREF(__pyx_t_17);
6638  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6639  __Pyx_Raise(__pyx_t_17, 0, 0, 0);
6640  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6641  __PYX_ERR(0, 601, __pyx_L13_except_error)
6642  }
6643  goto __pyx_L13_except_error;
6644  __pyx_L13_except_error:;
6645 
6646  /* "PyClical.pyx":598
6647  * self.instance = new Clifford(<scalar_t>other)
6648  * elif isinstance(other, str):
6649  * try: # <<<<<<<<<<<<<<
6650  * self.instance = new Clifford(<char *>other)
6651  * except RuntimeError:
6652  */
6653  __Pyx_XGIVEREF(__pyx_t_10);
6654  __Pyx_XGIVEREF(__pyx_t_11);
6655  __Pyx_XGIVEREF(__pyx_t_12);
6656  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6657  goto __pyx_L4_error;
6658  __pyx_L16_try_end:;
6659  }
6660 
6661  /* "PyClical.pyx":597
6662  * elif isinstance(other, numbers.Real):
6663  * self.instance = new Clifford(<scalar_t>other)
6664  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6665  * try:
6666  * self.instance = new Clifford(<char *>other)
6667  */
6668  goto __pyx_L10;
6669  }
6670 
6671  /* "PyClical.pyx":603
6672  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6673  * else:
6674  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6675  * except RuntimeError as err:
6676  * raise ValueError(error_msg_prefix + " " + str(type(other))
6677  */
6678  /*else*/ {
6679  __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)
6680  __Pyx_GOTREF(__pyx_t_15);
6681  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6682  __Pyx_GOTREF(__pyx_t_7);
6683  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6684  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6685  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6686  __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)
6687  __Pyx_GOTREF(__pyx_t_8);
6688  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6689  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6690  __Pyx_GOTREF(__pyx_t_7);
6691  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6692  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6693  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6694  __Pyx_GOTREF(__pyx_t_8);
6695  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6696  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6697  __Pyx_GOTREF(__pyx_t_7);
6698  __Pyx_GIVEREF(__pyx_t_8);
6699  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
6700  __pyx_t_8 = 0;
6701  __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)
6702  __Pyx_GOTREF(__pyx_t_8);
6703  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6704  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6705  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6706  __PYX_ERR(0, 603, __pyx_L4_error)
6707  }
6708  __pyx_L10:;
6709 
6710  /* "PyClical.pyx":590
6711  * error_msg_prefix = "Cannot initialize clifford object from"
6712  * if ixt is None:
6713  * try: # <<<<<<<<<<<<<<
6714  * if isinstance(other, clifford):
6715  * self.instance = new Clifford((<clifford>other).unwrap())
6716  */
6717  }
6718  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6719  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6720  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6721  goto __pyx_L9_try_end;
6722  __pyx_L4_error:;
6723  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6724  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6725  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6726  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6727  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6728  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6729 
6730  /* "PyClical.pyx":604
6731  * else:
6732  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6733  * except RuntimeError as err: # <<<<<<<<<<<<<<
6734  * raise ValueError(error_msg_prefix + " " + str(type(other))
6735  * + " value " + repr(other) + ":"
6736  */
6737  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6738  if (__pyx_t_14) {
6739  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6740  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6741  __Pyx_GOTREF(__pyx_t_8);
6742  __Pyx_GOTREF(__pyx_t_7);
6743  __Pyx_GOTREF(__pyx_t_15);
6744  __Pyx_INCREF(__pyx_t_7);
6745  __pyx_v_err = __pyx_t_7;
6746 
6747  /* "PyClical.pyx":605
6748  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6749  * except RuntimeError as err:
6750  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6751  * + " value " + repr(other) + ":"
6752  * + "\n\t" + str(err))
6753  */
6754  __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)
6755  __Pyx_GOTREF(__pyx_t_17);
6756  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6757  __Pyx_GOTREF(__pyx_t_18);
6758  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6759  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6760  PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6761  __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)
6762  __Pyx_GOTREF(__pyx_t_16);
6763  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6764  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6765  __Pyx_GOTREF(__pyx_t_18);
6766  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6767  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6768 
6769  /* "PyClical.pyx":606
6770  * except RuntimeError as err:
6771  * raise ValueError(error_msg_prefix + " " + str(type(other))
6772  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6773  * + "\n\t" + str(err))
6774  * elif isinstance(ixt, index_set):
6775  */
6776  __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)
6777  __Pyx_GOTREF(__pyx_t_16);
6778  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6779  __pyx_t_18 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6780  __Pyx_GOTREF(__pyx_t_18);
6781  __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6782  __Pyx_GOTREF(__pyx_t_17);
6783  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6784  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6785  __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)
6786  __Pyx_GOTREF(__pyx_t_18);
6787  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6788 
6789  /* "PyClical.pyx":607
6790  * raise ValueError(error_msg_prefix + " " + str(type(other))
6791  * + " value " + repr(other) + ":"
6792  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6793  * elif isinstance(ixt, index_set):
6794  * if isinstance(other, numbers.Real):
6795  */
6796  __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)
6797  __Pyx_GOTREF(__pyx_t_17);
6798  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6799  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6800  __Pyx_GOTREF(__pyx_t_18);
6801  __Pyx_INCREF(__pyx_v_err);
6802  __Pyx_GIVEREF(__pyx_v_err);
6803  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
6804  __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)
6805  __Pyx_GOTREF(__pyx_t_16);
6806  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6807  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6808  __Pyx_GOTREF(__pyx_t_18);
6809  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6810  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6811 
6812  /* "PyClical.pyx":605
6813  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6814  * except RuntimeError as err:
6815  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6816  * + " value " + repr(other) + ":"
6817  * + "\n\t" + str(err))
6818  */
6819  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6820  __Pyx_GOTREF(__pyx_t_16);
6821  __Pyx_GIVEREF(__pyx_t_18);
6822  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
6823  __pyx_t_18 = 0;
6824  __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)
6825  __Pyx_GOTREF(__pyx_t_18);
6826  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6827  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6828  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6829  __PYX_ERR(0, 605, __pyx_L6_except_error)
6830  }
6831  goto __pyx_L6_except_error;
6832  __pyx_L6_except_error:;
6833 
6834  /* "PyClical.pyx":590
6835  * error_msg_prefix = "Cannot initialize clifford object from"
6836  * if ixt is None:
6837  * try: # <<<<<<<<<<<<<<
6838  * if isinstance(other, clifford):
6839  * self.instance = new Clifford((<clifford>other).unwrap())
6840  */
6841  __Pyx_XGIVEREF(__pyx_t_3);
6842  __Pyx_XGIVEREF(__pyx_t_4);
6843  __Pyx_XGIVEREF(__pyx_t_5);
6844  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6845  goto __pyx_L1_error;
6846  __pyx_L9_try_end:;
6847  }
6848 
6849  /* "PyClical.pyx":589
6850  * """
6851  * error_msg_prefix = "Cannot initialize clifford object from"
6852  * if ixt is None: # <<<<<<<<<<<<<<
6853  * try:
6854  * if isinstance(other, clifford):
6855  */
6856  goto __pyx_L3;
6857  }
6858 
6859  /* "PyClical.pyx":608
6860  * + " value " + repr(other) + ":"
6861  * + "\n\t" + str(err))
6862  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6863  * if isinstance(other, numbers.Real):
6864  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6865  */
6866  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6867  __pyx_t_1 = (__pyx_t_2 != 0);
6868  if (__pyx_t_1) {
6869 
6870  /* "PyClical.pyx":609
6871  * + "\n\t" + str(err))
6872  * elif isinstance(ixt, index_set):
6873  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6874  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6875  * elif isinstance(other, collections.Sequence):
6876  */
6877  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6878  __Pyx_GOTREF(__pyx_t_15);
6879  __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)
6880  __Pyx_GOTREF(__pyx_t_7);
6881  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6882  __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)
6883  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6884  __pyx_t_2 = (__pyx_t_1 != 0);
6885  if (__pyx_t_2) {
6886 
6887  /* "PyClical.pyx":610
6888  * elif isinstance(ixt, index_set):
6889  * if isinstance(other, numbers.Real):
6890  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6891  * elif isinstance(other, collections.Sequence):
6892  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6893  */
6894  __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)
6895  try {
6896  __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));
6897  } catch(...) {
6898  __Pyx_CppExn2PyErr();
6899  __PYX_ERR(0, 610, __pyx_L1_error)
6900  }
6901  __pyx_v_self->instance = __pyx_t_6;
6902 
6903  /* "PyClical.pyx":609
6904  * + "\n\t" + str(err))
6905  * elif isinstance(ixt, index_set):
6906  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6907  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6908  * elif isinstance(other, collections.Sequence):
6909  */
6910  goto __pyx_L21;
6911  }
6912 
6913  /* "PyClical.pyx":611
6914  * if isinstance(other, numbers.Real):
6915  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6916  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6917  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6918  * else:
6919  */
6920  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6921  __Pyx_GOTREF(__pyx_t_7);
6922  __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)
6923  __Pyx_GOTREF(__pyx_t_15);
6924  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6925  __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)
6926  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6927  __pyx_t_1 = (__pyx_t_2 != 0);
6928  if (__pyx_t_1) {
6929 
6930  /* "PyClical.pyx":612
6931  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6932  * elif isinstance(other, collections.Sequence):
6933  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6934  * else:
6935  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6936  */
6937  try {
6938  __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)));
6939  } catch(...) {
6940  __Pyx_CppExn2PyErr();
6941  __PYX_ERR(0, 612, __pyx_L1_error)
6942  }
6943  __pyx_v_self->instance = __pyx_t_6;
6944 
6945  /* "PyClical.pyx":611
6946  * if isinstance(other, numbers.Real):
6947  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6948  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6949  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6950  * else:
6951  */
6952  goto __pyx_L21;
6953  }
6954 
6955  /* "PyClical.pyx":614
6956  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6957  * else:
6958  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6959  * + ", " + repr(ixt) + ").")
6960  * else:
6961  */
6962  /*else*/ {
6963  __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)
6964  __Pyx_GOTREF(__pyx_t_15);
6965  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6966  __Pyx_GOTREF(__pyx_t_7);
6967  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6968  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6969  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6970  __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)
6971  __Pyx_GOTREF(__pyx_t_8);
6972  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6973  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6974  __Pyx_GOTREF(__pyx_t_7);
6975  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6976  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6977 
6978  /* "PyClical.pyx":615
6979  * else:
6980  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6981  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6982  * else:
6983  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6984  */
6985  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6986  __Pyx_GOTREF(__pyx_t_8);
6987  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6988  __pyx_t_7 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6989  __Pyx_GOTREF(__pyx_t_7);
6990  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
6991  __Pyx_GOTREF(__pyx_t_15);
6992  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6993  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6994  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6995  __Pyx_GOTREF(__pyx_t_7);
6996  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6997 
6998  /* "PyClical.pyx":614
6999  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7000  * else:
7001  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7002  * + ", " + repr(ixt) + ").")
7003  * else:
7004  */
7005  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7006  __Pyx_GOTREF(__pyx_t_15);
7007  __Pyx_GIVEREF(__pyx_t_7);
7008  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
7009  __pyx_t_7 = 0;
7010  __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)
7011  __Pyx_GOTREF(__pyx_t_7);
7012  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7013  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7014  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7015  __PYX_ERR(0, 614, __pyx_L1_error)
7016  }
7017  __pyx_L21:;
7018 
7019  /* "PyClical.pyx":608
7020  * + " value " + repr(other) + ":"
7021  * + "\n\t" + str(err))
7022  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7023  * if isinstance(other, numbers.Real):
7024  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7025  */
7026  goto __pyx_L3;
7027  }
7028 
7029  /* "PyClical.pyx":617
7030  * + ", " + repr(ixt) + ").")
7031  * else:
7032  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7033  * + ", " + str(type(ixt)) + ").")
7034  *
7035  */
7036  /*else*/ {
7037  __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)
7038  __Pyx_GOTREF(__pyx_t_7);
7039  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7040  __Pyx_GOTREF(__pyx_t_15);
7041  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
7042  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
7043  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
7044  __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)
7045  __Pyx_GOTREF(__pyx_t_8);
7046  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7047  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7048  __Pyx_GOTREF(__pyx_t_15);
7049  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7050  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7051 
7052  /* "PyClical.pyx":618
7053  * else:
7054  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7055  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7056  *
7057  * def __dealloc__(self):
7058  */
7059  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7060  __Pyx_GOTREF(__pyx_t_8);
7061  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7062  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7063  __Pyx_GOTREF(__pyx_t_15);
7064  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7065  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7066  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7067  __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)
7068  __Pyx_GOTREF(__pyx_t_7);
7069  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7070  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7071  __Pyx_GOTREF(__pyx_t_15);
7072  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7073  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7074  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7075  __Pyx_GOTREF(__pyx_t_7);
7076  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7077 
7078  /* "PyClical.pyx":617
7079  * + ", " + repr(ixt) + ").")
7080  * else:
7081  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7082  * + ", " + str(type(ixt)) + ").")
7083  *
7084  */
7085  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7086  __Pyx_GOTREF(__pyx_t_15);
7087  __Pyx_GIVEREF(__pyx_t_7);
7088  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
7089  __pyx_t_7 = 0;
7090  __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)
7091  __Pyx_GOTREF(__pyx_t_7);
7092  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7093  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7094  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7095  __PYX_ERR(0, 617, __pyx_L1_error)
7096  }
7097  __pyx_L3:;
7098 
7099  /* "PyClical.pyx":563
7100  * return clifford(self)
7101  *
7102  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7103  * """
7104  * Construct an object of type clifford.
7105  */
7106 
7107  /* function exit code */
7108  __pyx_r = 0;
7109  goto __pyx_L0;
7110  __pyx_L1_error:;
7111  __Pyx_XDECREF(__pyx_t_7);
7112  __Pyx_XDECREF(__pyx_t_8);
7113  __Pyx_XDECREF(__pyx_t_15);
7114  __Pyx_XDECREF(__pyx_t_16);
7115  __Pyx_XDECREF(__pyx_t_17);
7116  __Pyx_XDECREF(__pyx_t_18);
7117  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7118  __pyx_r = -1;
7119  __pyx_L0:;
7120  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7121  __Pyx_XDECREF(__pyx_v_err);
7122  __Pyx_RefNannyFinishContext();
7123  return __pyx_r;
7124  }
7125 
7126  /* "PyClical.pyx":620
7127  * + ", " + str(type(ixt)) + ").")
7128  *
7129  * def __dealloc__(self): # <<<<<<<<<<<<<<
7130  * """
7131  * Clean up by deallocating the instance of C++ class Clifford.
7132  */
7133 
7134  /* Python wrapper */
7135  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7136  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7137  __Pyx_RefNannyDeclarations
7138  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7139  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7140 
7141  /* function exit code */
7142  __Pyx_RefNannyFinishContext();
7143  }
7144 
7145  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7146  __Pyx_RefNannyDeclarations
7147  __Pyx_RefNannySetupContext("__dealloc__", 0);
7148 
7149  /* "PyClical.pyx":624
7150  * Clean up by deallocating the instance of C++ class Clifford.
7151  * """
7152  * del self.instance # <<<<<<<<<<<<<<
7153  *
7154  * def __contains__(self, x):
7155  */
7156  delete __pyx_v_self->instance;
7157 
7158  /* "PyClical.pyx":620
7159  * + ", " + str(type(ixt)) + ").")
7160  *
7161  * def __dealloc__(self): # <<<<<<<<<<<<<<
7162  * """
7163  * Clean up by deallocating the instance of C++ class Clifford.
7164  */
7165 
7166  /* function exit code */
7167  __Pyx_RefNannyFinishContext();
7168  }
7169 
7170  /* "PyClical.pyx":626
7171  * del self.instance
7172  *
7173  * def __contains__(self, x): # <<<<<<<<<<<<<<
7174  * """
7175  * Not applicable.
7176  */
7177 
7178  /* Python wrapper */
7179  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7180  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 ";
7181  #if CYTHON_COMPILING_IN_CPYTHON
7182  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7183  #endif
7184  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7185  int __pyx_r;
7186  __Pyx_RefNannyDeclarations
7187  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7188  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7189 
7190  /* function exit code */
7191  __Pyx_RefNannyFinishContext();
7192  return __pyx_r;
7193  }
7194 
7195  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7196  int __pyx_r;
7197  __Pyx_RefNannyDeclarations
7198  PyObject *__pyx_t_1 = NULL;
7199  __Pyx_RefNannySetupContext("__contains__", 0);
7200 
7201  /* "PyClical.pyx":635
7202  * TypeError: Not applicable.
7203  * """
7204  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7205  *
7206  * def __iter__(self):
7207  */
7208  __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)
7209  __Pyx_GOTREF(__pyx_t_1);
7210  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7211  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7212  __PYX_ERR(0, 635, __pyx_L1_error)
7213 
7214  /* "PyClical.pyx":626
7215  * del self.instance
7216  *
7217  * def __contains__(self, x): # <<<<<<<<<<<<<<
7218  * """
7219  * Not applicable.
7220  */
7221 
7222  /* function exit code */
7223  __pyx_L1_error:;
7224  __Pyx_XDECREF(__pyx_t_1);
7225  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7226  __pyx_r = -1;
7227  __Pyx_RefNannyFinishContext();
7228  return __pyx_r;
7229  }
7230 
7231  /* "PyClical.pyx":637
7232  * raise TypeError("Not applicable.")
7233  *
7234  * def __iter__(self): # <<<<<<<<<<<<<<
7235  * """
7236  * Not applicable.
7237  */
7238 
7239  /* Python wrapper */
7240  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7241  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 ";
7242  #if CYTHON_COMPILING_IN_CPYTHON
7243  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7244  #endif
7245  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7246  PyObject *__pyx_r = 0;
7247  __Pyx_RefNannyDeclarations
7248  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7249  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7250 
7251  /* function exit code */
7252  __Pyx_RefNannyFinishContext();
7253  return __pyx_r;
7254  }
7255 
7256  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7257  PyObject *__pyx_r = NULL;
7258  __Pyx_RefNannyDeclarations
7259  PyObject *__pyx_t_1 = NULL;
7260  __Pyx_RefNannySetupContext("__iter__", 0);
7261 
7262  /* "PyClical.pyx":646
7263  * TypeError: Not applicable.
7264  * """
7265  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7266  *
7267  * def reframe(self, ixt):
7268  */
7269  __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)
7270  __Pyx_GOTREF(__pyx_t_1);
7271  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7272  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7273  __PYX_ERR(0, 646, __pyx_L1_error)
7274 
7275  /* "PyClical.pyx":637
7276  * raise TypeError("Not applicable.")
7277  *
7278  * def __iter__(self): # <<<<<<<<<<<<<<
7279  * """
7280  * Not applicable.
7281  */
7282 
7283  /* function exit code */
7284  __pyx_L1_error:;
7285  __Pyx_XDECREF(__pyx_t_1);
7286  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7287  __pyx_r = NULL;
7288  __Pyx_XGIVEREF(__pyx_r);
7289  __Pyx_RefNannyFinishContext();
7290  return __pyx_r;
7291  }
7292 
7293  /* "PyClical.pyx":648
7294  * raise TypeError("Not applicable.")
7295  *
7296  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7297  * """
7298  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7299  */
7300 
7301  /* Python wrapper */
7302  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7303  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 ";
7304  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7305  PyObject *__pyx_r = 0;
7306  __Pyx_RefNannyDeclarations
7307  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7308  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7309 
7310  /* function exit code */
7311  __Pyx_RefNannyFinishContext();
7312  return __pyx_r;
7313  }
7314 
7315  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7316  PyObject *__pyx_v_error_msg_prefix = NULL;
7317  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7318  PyObject *__pyx_v_err = NULL;
7319  PyObject *__pyx_r = NULL;
7320  __Pyx_RefNannyDeclarations
7321  int __pyx_t_1;
7322  int __pyx_t_2;
7323  PyObject *__pyx_t_3 = NULL;
7324  PyObject *__pyx_t_4 = NULL;
7325  PyObject *__pyx_t_5 = NULL;
7326  PyObject *__pyx_t_6 = NULL;
7327  Clifford *__pyx_t_7;
7328  int __pyx_t_8;
7329  PyObject *__pyx_t_9 = NULL;
7330  PyObject *__pyx_t_10 = NULL;
7331  PyObject *__pyx_t_11 = NULL;
7332  PyObject *__pyx_t_12 = NULL;
7333  PyObject *__pyx_t_13 = NULL;
7334  __Pyx_RefNannySetupContext("reframe", 0);
7335 
7336  /* "PyClical.pyx":658
7337  * True
7338  * """
7339  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7340  * if isinstance(ixt, index_set):
7341  * try:
7342  */
7343  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7344  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7345 
7346  /* "PyClical.pyx":659
7347  * """
7348  * error_msg_prefix = "Cannot reframe"
7349  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7350  * try:
7351  * result = clifford()
7352  */
7353  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7354  __pyx_t_2 = (__pyx_t_1 != 0);
7355  if (__pyx_t_2) {
7356 
7357  /* "PyClical.pyx":660
7358  * error_msg_prefix = "Cannot reframe"
7359  * if isinstance(ixt, index_set):
7360  * try: # <<<<<<<<<<<<<<
7361  * result = clifford()
7362  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7363  */
7364  {
7365  __Pyx_PyThreadState_declare
7366  __Pyx_PyThreadState_assign
7367  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7368  __Pyx_XGOTREF(__pyx_t_3);
7369  __Pyx_XGOTREF(__pyx_t_4);
7370  __Pyx_XGOTREF(__pyx_t_5);
7371  /*try:*/ {
7372 
7373  /* "PyClical.pyx":661
7374  * if isinstance(ixt, index_set):
7375  * try:
7376  * result = clifford() # <<<<<<<<<<<<<<
7377  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7378  * except RuntimeError as err:
7379  */
7380  __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)
7381  __Pyx_GOTREF(__pyx_t_6);
7382  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7383  __pyx_t_6 = 0;
7384 
7385  /* "PyClical.pyx":662
7386  * try:
7387  * result = clifford()
7388  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7389  * except RuntimeError as err:
7390  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7391  */
7392  try {
7393  __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)));
7394  } catch(...) {
7395  __Pyx_CppExn2PyErr();
7396  __PYX_ERR(0, 662, __pyx_L4_error)
7397  }
7398  __pyx_v_result->instance = __pyx_t_7;
7399 
7400  /* "PyClical.pyx":660
7401  * error_msg_prefix = "Cannot reframe"
7402  * if isinstance(ixt, index_set):
7403  * try: # <<<<<<<<<<<<<<
7404  * result = clifford()
7405  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7406  */
7407  }
7408  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7409  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7410  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7411  goto __pyx_L9_try_end;
7412  __pyx_L4_error:;
7413  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7414 
7415  /* "PyClical.pyx":663
7416  * result = clifford()
7417  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7418  * except RuntimeError as err: # <<<<<<<<<<<<<<
7419  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7420  * + str(ixt) + ":"
7421  */
7422  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7423  if (__pyx_t_8) {
7424  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7425  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7426  __Pyx_GOTREF(__pyx_t_6);
7427  __Pyx_GOTREF(__pyx_t_9);
7428  __Pyx_GOTREF(__pyx_t_10);
7429  __Pyx_INCREF(__pyx_t_9);
7430  __pyx_v_err = __pyx_t_9;
7431 
7432  /* "PyClical.pyx":664
7433  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7434  * except RuntimeError as err:
7435  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7436  * + str(ixt) + ":"
7437  * + "\n\t" + str(err))
7438  */
7439  __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)
7440  __Pyx_GOTREF(__pyx_t_11);
7441  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7442  __Pyx_GOTREF(__pyx_t_12);
7443  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7444  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7445  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
7446  __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)
7447  __Pyx_GOTREF(__pyx_t_13);
7448  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7449  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7450  __Pyx_GOTREF(__pyx_t_12);
7451  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7452  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7453  __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)
7454  __Pyx_GOTREF(__pyx_t_13);
7455  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7456 
7457  /* "PyClical.pyx":665
7458  * except RuntimeError as err:
7459  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7460  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7461  * + "\n\t" + str(err))
7462  * else:
7463  */
7464  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7465  __Pyx_GOTREF(__pyx_t_12);
7466  __Pyx_INCREF(__pyx_v_ixt);
7467  __Pyx_GIVEREF(__pyx_v_ixt);
7468  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
7469  __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)
7470  __Pyx_GOTREF(__pyx_t_11);
7471  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7472  __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7473  __Pyx_GOTREF(__pyx_t_12);
7474  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7475  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7476  __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)
7477  __Pyx_GOTREF(__pyx_t_11);
7478  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7479 
7480  /* "PyClical.pyx":666
7481  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7482  * + str(ixt) + ":"
7483  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7484  * else:
7485  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7486  */
7487  __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)
7488  __Pyx_GOTREF(__pyx_t_12);
7489  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7490  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7491  __Pyx_GOTREF(__pyx_t_11);
7492  __Pyx_INCREF(__pyx_v_err);
7493  __Pyx_GIVEREF(__pyx_v_err);
7494  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
7495  __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)
7496  __Pyx_GOTREF(__pyx_t_13);
7497  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7498  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7499  __Pyx_GOTREF(__pyx_t_11);
7500  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7501  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7502 
7503  /* "PyClical.pyx":664
7504  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7505  * except RuntimeError as err:
7506  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7507  * + str(ixt) + ":"
7508  * + "\n\t" + str(err))
7509  */
7510  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7511  __Pyx_GOTREF(__pyx_t_13);
7512  __Pyx_GIVEREF(__pyx_t_11);
7513  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
7514  __pyx_t_11 = 0;
7515  __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)
7516  __Pyx_GOTREF(__pyx_t_11);
7517  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7518  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
7519  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7520  __PYX_ERR(0, 664, __pyx_L6_except_error)
7521  }
7522  goto __pyx_L6_except_error;
7523  __pyx_L6_except_error:;
7524 
7525  /* "PyClical.pyx":660
7526  * error_msg_prefix = "Cannot reframe"
7527  * if isinstance(ixt, index_set):
7528  * try: # <<<<<<<<<<<<<<
7529  * result = clifford()
7530  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7531  */
7532  __Pyx_XGIVEREF(__pyx_t_3);
7533  __Pyx_XGIVEREF(__pyx_t_4);
7534  __Pyx_XGIVEREF(__pyx_t_5);
7535  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7536  goto __pyx_L1_error;
7537  __pyx_L9_try_end:;
7538  }
7539 
7540  /* "PyClical.pyx":659
7541  * """
7542  * error_msg_prefix = "Cannot reframe"
7543  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7544  * try:
7545  * result = clifford()
7546  */
7547  goto __pyx_L3;
7548  }
7549 
7550  /* "PyClical.pyx":668
7551  * + "\n\t" + str(err))
7552  * else:
7553  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7554  * return result
7555  *
7556  */
7557  /*else*/ {
7558  __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)
7559  __Pyx_GOTREF(__pyx_t_10);
7560  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7561  __Pyx_GOTREF(__pyx_t_9);
7562  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7563  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7564  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7565  __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)
7566  __Pyx_GOTREF(__pyx_t_6);
7567  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7568  __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7569  __Pyx_GOTREF(__pyx_t_9);
7570  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7571  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7572  __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7573  __Pyx_GOTREF(__pyx_t_6);
7574  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7575  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7576  __Pyx_GOTREF(__pyx_t_9);
7577  __Pyx_GIVEREF(__pyx_t_6);
7578  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
7579  __pyx_t_6 = 0;
7580  __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)
7581  __Pyx_GOTREF(__pyx_t_6);
7582  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7583  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7584  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7585  __PYX_ERR(0, 668, __pyx_L1_error)
7586  }
7587  __pyx_L3:;
7588 
7589  /* "PyClical.pyx":669
7590  * else:
7591  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7592  * return result # <<<<<<<<<<<<<<
7593  *
7594  * def __richcmp__(lhs, rhs, int op):
7595  */
7596  __Pyx_XDECREF(__pyx_r);
7597  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7598  __pyx_r = ((PyObject *)__pyx_v_result);
7599  goto __pyx_L0;
7600 
7601  /* "PyClical.pyx":648
7602  * raise TypeError("Not applicable.")
7603  *
7604  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7605  * """
7606  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7607  */
7608 
7609  /* function exit code */
7610  __pyx_L1_error:;
7611  __Pyx_XDECREF(__pyx_t_6);
7612  __Pyx_XDECREF(__pyx_t_9);
7613  __Pyx_XDECREF(__pyx_t_10);
7614  __Pyx_XDECREF(__pyx_t_11);
7615  __Pyx_XDECREF(__pyx_t_12);
7616  __Pyx_XDECREF(__pyx_t_13);
7617  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7618  __pyx_r = NULL;
7619  __pyx_L0:;
7620  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7621  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7622  __Pyx_XDECREF(__pyx_v_err);
7623  __Pyx_XGIVEREF(__pyx_r);
7624  __Pyx_RefNannyFinishContext();
7625  return __pyx_r;
7626  }
7627 
7628  /* "PyClical.pyx":671
7629  * return result
7630  *
7631  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7632  * """
7633  * Compare objects of type clifford.
7634  */
7635 
7636  /* Python wrapper */
7637  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7638  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7639  PyObject *__pyx_r = 0;
7640  __Pyx_RefNannyDeclarations
7641  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7642  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7643 
7644  /* function exit code */
7645  __Pyx_RefNannyFinishContext();
7646  return __pyx_r;
7647  }
7648 
7649  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7650  PyObject *__pyx_r = NULL;
7651  __Pyx_RefNannyDeclarations
7652  int __pyx_t_1;
7653  int __pyx_t_2;
7654  int __pyx_t_3;
7655  PyObject *__pyx_t_4 = NULL;
7656  PyObject *__pyx_t_5 = NULL;
7657  PyObject *__pyx_t_6 = NULL;
7658  __Pyx_RefNannySetupContext("__richcmp__", 0);
7659 
7660  /* "PyClical.pyx":690
7661  * True
7662  * """
7663  * if op == 2: # == # <<<<<<<<<<<<<<
7664  * if (lhs is None) or (rhs is None):
7665  * return bool(lhs is rhs)
7666  */
7667  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7668  if (__pyx_t_1) {
7669 
7670  /* "PyClical.pyx":691
7671  * """
7672  * if op == 2: # ==
7673  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7674  * return bool(lhs is rhs)
7675  * else:
7676  */
7677  __pyx_t_2 = (__pyx_v_lhs == Py_None);
7678  __pyx_t_3 = (__pyx_t_2 != 0);
7679  if (!__pyx_t_3) {
7680  } else {
7681  __pyx_t_1 = __pyx_t_3;
7682  goto __pyx_L5_bool_binop_done;
7683  }
7684  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7685  __pyx_t_2 = (__pyx_t_3 != 0);
7686  __pyx_t_1 = __pyx_t_2;
7687  __pyx_L5_bool_binop_done:;
7688  if (__pyx_t_1) {
7689 
7690  /* "PyClical.pyx":692
7691  * if op == 2: # ==
7692  * if (lhs is None) or (rhs is None):
7693  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7694  * else:
7695  * return bool( toClifford(lhs) == toClifford(rhs) )
7696  */
7697  __Pyx_XDECREF(__pyx_r);
7698  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7699  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7700  __Pyx_GOTREF(__pyx_t_4);
7701  __pyx_r = __pyx_t_4;
7702  __pyx_t_4 = 0;
7703  goto __pyx_L0;
7704 
7705  /* "PyClical.pyx":691
7706  * """
7707  * if op == 2: # ==
7708  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7709  * return bool(lhs is rhs)
7710  * else:
7711  */
7712  }
7713 
7714  /* "PyClical.pyx":694
7715  * return bool(lhs is rhs)
7716  * else:
7717  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7718  * elif op == 3: # !=
7719  * if (lhs is None) or (rhs is None):
7720  */
7721  /*else*/ {
7722  __Pyx_XDECREF(__pyx_r);
7723  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7724  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7725  __Pyx_GOTREF(__pyx_t_4);
7726  __pyx_r = __pyx_t_4;
7727  __pyx_t_4 = 0;
7728  goto __pyx_L0;
7729  }
7730 
7731  /* "PyClical.pyx":690
7732  * True
7733  * """
7734  * if op == 2: # == # <<<<<<<<<<<<<<
7735  * if (lhs is None) or (rhs is None):
7736  * return bool(lhs is rhs)
7737  */
7738  }
7739 
7740  /* "PyClical.pyx":695
7741  * else:
7742  * return bool( toClifford(lhs) == toClifford(rhs) )
7743  * elif op == 3: # != # <<<<<<<<<<<<<<
7744  * if (lhs is None) or (rhs is None):
7745  * return not bool(lhs is rhs)
7746  */
7747  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7748  if (__pyx_t_1) {
7749 
7750  /* "PyClical.pyx":696
7751  * return bool( toClifford(lhs) == toClifford(rhs) )
7752  * elif op == 3: # !=
7753  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7754  * return not bool(lhs is rhs)
7755  * else:
7756  */
7757  __pyx_t_2 = (__pyx_v_lhs == Py_None);
7758  __pyx_t_3 = (__pyx_t_2 != 0);
7759  if (!__pyx_t_3) {
7760  } else {
7761  __pyx_t_1 = __pyx_t_3;
7762  goto __pyx_L8_bool_binop_done;
7763  }
7764  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7765  __pyx_t_2 = (__pyx_t_3 != 0);
7766  __pyx_t_1 = __pyx_t_2;
7767  __pyx_L8_bool_binop_done:;
7768  if (__pyx_t_1) {
7769 
7770  /* "PyClical.pyx":697
7771  * elif op == 3: # !=
7772  * if (lhs is None) or (rhs is None):
7773  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7774  * else:
7775  * return bool( toClifford(lhs) != toClifford(rhs) )
7776  */
7777  __Pyx_XDECREF(__pyx_r);
7778  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7779  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7780  __Pyx_GOTREF(__pyx_t_4);
7781  __pyx_r = __pyx_t_4;
7782  __pyx_t_4 = 0;
7783  goto __pyx_L0;
7784 
7785  /* "PyClical.pyx":696
7786  * return bool( toClifford(lhs) == toClifford(rhs) )
7787  * elif op == 3: # !=
7788  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7789  * return not bool(lhs is rhs)
7790  * else:
7791  */
7792  }
7793 
7794  /* "PyClical.pyx":699
7795  * return not bool(lhs is rhs)
7796  * else:
7797  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7798  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7799  * raise TypeError("This comparison operator is not implemented for "
7800  */
7801  /*else*/ {
7802  __Pyx_XDECREF(__pyx_r);
7803  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7804  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7805  __Pyx_GOTREF(__pyx_t_4);
7806  __pyx_r = __pyx_t_4;
7807  __pyx_t_4 = 0;
7808  goto __pyx_L0;
7809  }
7810 
7811  /* "PyClical.pyx":695
7812  * else:
7813  * return bool( toClifford(lhs) == toClifford(rhs) )
7814  * elif op == 3: # != # <<<<<<<<<<<<<<
7815  * if (lhs is None) or (rhs is None):
7816  * return not bool(lhs is rhs)
7817  */
7818  }
7819 
7820  /* "PyClical.pyx":700
7821  * else:
7822  * return bool( toClifford(lhs) != toClifford(rhs) )
7823  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7824  * raise TypeError("This comparison operator is not implemented for "
7825  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7826  */
7827  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, __pyx_ptype_8PyClical_clifford);
7828  __pyx_t_3 = (__pyx_t_2 != 0);
7829  if (!__pyx_t_3) {
7830  } else {
7831  __pyx_t_1 = __pyx_t_3;
7832  goto __pyx_L10_bool_binop_done;
7833  }
7834  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7835  __pyx_t_2 = (__pyx_t_3 != 0);
7836  __pyx_t_1 = __pyx_t_2;
7837  __pyx_L10_bool_binop_done:;
7838  if (__pyx_t_1) {
7839 
7840  /* "PyClical.pyx":702
7841  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7842  * raise TypeError("This comparison operator is not implemented for "
7843  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7844  * else:
7845  * return NotImplemented
7846  */
7847  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7848  __Pyx_GOTREF(__pyx_t_4);
7849  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7850  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7851  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
7852  __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)
7853  __Pyx_GOTREF(__pyx_t_5);
7854  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7855  __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)
7856  __Pyx_GOTREF(__pyx_t_4);
7857  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7858  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7859  __Pyx_GOTREF(__pyx_t_5);
7860  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7861  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7862  __Pyx_GOTREF(__pyx_t_4);
7863  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7864  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7865  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
7866  __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)
7867  __Pyx_GOTREF(__pyx_t_6);
7868  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7869  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7870  __Pyx_GOTREF(__pyx_t_4);
7871  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7872  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7873  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7874  __Pyx_GOTREF(__pyx_t_6);
7875  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7876 
7877  /* "PyClical.pyx":701
7878  * return bool( toClifford(lhs) != toClifford(rhs) )
7879  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7880  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7881  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7882  * else:
7883  */
7884  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
7885  __Pyx_GOTREF(__pyx_t_4);
7886  __Pyx_GIVEREF(__pyx_t_6);
7887  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
7888  __pyx_t_6 = 0;
7889  __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)
7890  __Pyx_GOTREF(__pyx_t_6);
7891  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7892  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7893  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7894  __PYX_ERR(0, 701, __pyx_L1_error)
7895 
7896  /* "PyClical.pyx":700
7897  * else:
7898  * return bool( toClifford(lhs) != toClifford(rhs) )
7899  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7900  * raise TypeError("This comparison operator is not implemented for "
7901  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7902  */
7903  }
7904 
7905  /* "PyClical.pyx":704
7906  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7907  * else:
7908  * return NotImplemented # <<<<<<<<<<<<<<
7909  *
7910  * def __getitem__(self, ixt):
7911  */
7912  /*else*/ {
7913  __Pyx_XDECREF(__pyx_r);
7914  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7915  __pyx_r = __pyx_builtin_NotImplemented;
7916  goto __pyx_L0;
7917  }
7918 
7919  /* "PyClical.pyx":671
7920  * return result
7921  *
7922  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7923  * """
7924  * Compare objects of type clifford.
7925  */
7926 
7927  /* function exit code */
7928  __pyx_L1_error:;
7929  __Pyx_XDECREF(__pyx_t_4);
7930  __Pyx_XDECREF(__pyx_t_5);
7931  __Pyx_XDECREF(__pyx_t_6);
7932  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7933  __pyx_r = NULL;
7934  __pyx_L0:;
7935  __Pyx_XGIVEREF(__pyx_r);
7936  __Pyx_RefNannyFinishContext();
7937  return __pyx_r;
7938  }
7939 
7940  /* "PyClical.pyx":706
7941  * return NotImplemented
7942  *
7943  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7944  * """
7945  * Subscripting: map from index set to scalar coordinate.
7946  */
7947 
7948  /* Python wrapper */
7949  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7950  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 ";
7951  #if CYTHON_COMPILING_IN_CPYTHON
7952  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7953  #endif
7954  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7955  PyObject *__pyx_r = 0;
7956  __Pyx_RefNannyDeclarations
7957  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7958  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7959 
7960  /* function exit code */
7961  __Pyx_RefNannyFinishContext();
7962  return __pyx_r;
7963  }
7964 
7965  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7966  PyObject *__pyx_r = NULL;
7967  __Pyx_RefNannyDeclarations
7968  PyObject *__pyx_t_1 = NULL;
7969  __Pyx_RefNannySetupContext("__getitem__", 0);
7970 
7971  /* "PyClical.pyx":719
7972  * 2.0
7973  * """
7974  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7975  *
7976  * def __neg__(self):
7977  */
7978  __Pyx_XDECREF(__pyx_r);
7979  __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)
7980  __Pyx_GOTREF(__pyx_t_1);
7981  __pyx_r = __pyx_t_1;
7982  __pyx_t_1 = 0;
7983  goto __pyx_L0;
7984 
7985  /* "PyClical.pyx":706
7986  * return NotImplemented
7987  *
7988  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7989  * """
7990  * Subscripting: map from index set to scalar coordinate.
7991  */
7992 
7993  /* function exit code */
7994  __pyx_L1_error:;
7995  __Pyx_XDECREF(__pyx_t_1);
7996  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7997  __pyx_r = NULL;
7998  __pyx_L0:;
7999  __Pyx_XGIVEREF(__pyx_r);
8000  __Pyx_RefNannyFinishContext();
8001  return __pyx_r;
8002  }
8003 
8004  /* "PyClical.pyx":721
8005  * return self.instance.getitem(toIndexSet(ixt))
8006  *
8007  * def __neg__(self): # <<<<<<<<<<<<<<
8008  * """
8009  * Unary -.
8010  */
8011 
8012  /* Python wrapper */
8013  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8014  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
8015  #if CYTHON_COMPILING_IN_CPYTHON
8016  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8017  #endif
8018  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8019  PyObject *__pyx_r = 0;
8020  __Pyx_RefNannyDeclarations
8021  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8022  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8023 
8024  /* function exit code */
8025  __Pyx_RefNannyFinishContext();
8026  return __pyx_r;
8027  }
8028 
8029  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8030  PyObject *__pyx_r = NULL;
8031  __Pyx_RefNannyDeclarations
8032  PyObject *__pyx_t_1 = NULL;
8033  PyObject *__pyx_t_2 = NULL;
8034  __Pyx_RefNannySetupContext("__neg__", 0);
8035 
8036  /* "PyClical.pyx":728
8037  * -{1}
8038  * """
8039  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8040  *
8041  * def __pos__(self):
8042  */
8043  __Pyx_XDECREF(__pyx_r);
8044  __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)
8045  __Pyx_GOTREF(__pyx_t_1);
8046  __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)
8047  __Pyx_GOTREF(__pyx_t_2);
8048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8049  __pyx_r = __pyx_t_2;
8050  __pyx_t_2 = 0;
8051  goto __pyx_L0;
8052 
8053  /* "PyClical.pyx":721
8054  * return self.instance.getitem(toIndexSet(ixt))
8055  *
8056  * def __neg__(self): # <<<<<<<<<<<<<<
8057  * """
8058  * Unary -.
8059  */
8060 
8061  /* function exit code */
8062  __pyx_L1_error:;
8063  __Pyx_XDECREF(__pyx_t_1);
8064  __Pyx_XDECREF(__pyx_t_2);
8065  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8066  __pyx_r = NULL;
8067  __pyx_L0:;
8068  __Pyx_XGIVEREF(__pyx_r);
8069  __Pyx_RefNannyFinishContext();
8070  return __pyx_r;
8071  }
8072 
8073  /* "PyClical.pyx":730
8074  * return clifford().wrap( self.instance.neg() )
8075  *
8076  * def __pos__(self): # <<<<<<<<<<<<<<
8077  * """
8078  * Unary +.
8079  */
8080 
8081  /* Python wrapper */
8082  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8083  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8084  #if CYTHON_COMPILING_IN_CPYTHON
8085  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8086  #endif
8087  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8088  PyObject *__pyx_r = 0;
8089  __Pyx_RefNannyDeclarations
8090  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8091  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8092 
8093  /* function exit code */
8094  __Pyx_RefNannyFinishContext();
8095  return __pyx_r;
8096  }
8097 
8098  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8099  PyObject *__pyx_r = NULL;
8100  __Pyx_RefNannyDeclarations
8101  PyObject *__pyx_t_1 = NULL;
8102  PyObject *__pyx_t_2 = NULL;
8103  __Pyx_RefNannySetupContext("__pos__", 0);
8104 
8105  /* "PyClical.pyx":737
8106  * {1}
8107  * """
8108  * return clifford(self) # <<<<<<<<<<<<<<
8109  *
8110  * def __add__(lhs, rhs):
8111  */
8112  __Pyx_XDECREF(__pyx_r);
8113  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
8114  __Pyx_GOTREF(__pyx_t_1);
8115  __Pyx_INCREF(((PyObject *)__pyx_v_self));
8116  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
8117  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
8118  __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)
8119  __Pyx_GOTREF(__pyx_t_2);
8120  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8121  __pyx_r = __pyx_t_2;
8122  __pyx_t_2 = 0;
8123  goto __pyx_L0;
8124 
8125  /* "PyClical.pyx":730
8126  * return clifford().wrap( self.instance.neg() )
8127  *
8128  * def __pos__(self): # <<<<<<<<<<<<<<
8129  * """
8130  * Unary +.
8131  */
8132 
8133  /* function exit code */
8134  __pyx_L1_error:;
8135  __Pyx_XDECREF(__pyx_t_1);
8136  __Pyx_XDECREF(__pyx_t_2);
8137  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8138  __pyx_r = NULL;
8139  __pyx_L0:;
8140  __Pyx_XGIVEREF(__pyx_r);
8141  __Pyx_RefNannyFinishContext();
8142  return __pyx_r;
8143  }
8144 
8145  /* "PyClical.pyx":739
8146  * return clifford(self)
8147  *
8148  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8149  * """
8150  * Geometric sum.
8151  */
8152 
8153  /* Python wrapper */
8154  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8155  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 ";
8156  #if CYTHON_COMPILING_IN_CPYTHON
8157  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8158  #endif
8159  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8160  PyObject *__pyx_r = 0;
8161  __Pyx_RefNannyDeclarations
8162  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8163  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8164 
8165  /* function exit code */
8166  __Pyx_RefNannyFinishContext();
8167  return __pyx_r;
8168  }
8169 
8170  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8171  PyObject *__pyx_r = NULL;
8172  __Pyx_RefNannyDeclarations
8173  PyObject *__pyx_t_1 = NULL;
8174  PyObject *__pyx_t_2 = NULL;
8175  __Pyx_RefNannySetupContext("__add__", 0);
8176 
8177  /* "PyClical.pyx":748
8178  * {1}+{2}
8179  * """
8180  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8181  *
8182  * def __iadd__(self, rhs):
8183  */
8184  __Pyx_XDECREF(__pyx_r);
8185  __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)
8186  __Pyx_GOTREF(__pyx_t_1);
8187  __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)
8188  __Pyx_GOTREF(__pyx_t_2);
8189  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8190  __pyx_r = __pyx_t_2;
8191  __pyx_t_2 = 0;
8192  goto __pyx_L0;
8193 
8194  /* "PyClical.pyx":739
8195  * return clifford(self)
8196  *
8197  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8198  * """
8199  * Geometric sum.
8200  */
8201 
8202  /* function exit code */
8203  __pyx_L1_error:;
8204  __Pyx_XDECREF(__pyx_t_1);
8205  __Pyx_XDECREF(__pyx_t_2);
8206  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8207  __pyx_r = NULL;
8208  __pyx_L0:;
8209  __Pyx_XGIVEREF(__pyx_r);
8210  __Pyx_RefNannyFinishContext();
8211  return __pyx_r;
8212  }
8213 
8214  /* "PyClical.pyx":750
8215  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8216  *
8217  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8218  * """
8219  * Geometric sum.
8220  */
8221 
8222  /* Python wrapper */
8223  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8224  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 ";
8225  #if CYTHON_COMPILING_IN_CPYTHON
8226  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8227  #endif
8228  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8229  PyObject *__pyx_r = 0;
8230  __Pyx_RefNannyDeclarations
8231  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8232  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8233 
8234  /* function exit code */
8235  __Pyx_RefNannyFinishContext();
8236  return __pyx_r;
8237  }
8238 
8239  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8240  PyObject *__pyx_r = NULL;
8241  __Pyx_RefNannyDeclarations
8242  PyObject *__pyx_t_1 = NULL;
8243  __Pyx_RefNannySetupContext("__iadd__", 0);
8244 
8245  /* "PyClical.pyx":757
8246  * 1+{2}
8247  * """
8248  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8249  *
8250  * def __sub__(lhs, rhs):
8251  */
8252  __Pyx_XDECREF(__pyx_r);
8253  __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)
8254  __Pyx_GOTREF(__pyx_t_1);
8255  __pyx_r = __pyx_t_1;
8256  __pyx_t_1 = 0;
8257  goto __pyx_L0;
8258 
8259  /* "PyClical.pyx":750
8260  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8261  *
8262  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8263  * """
8264  * Geometric sum.
8265  */
8266 
8267  /* function exit code */
8268  __pyx_L1_error:;
8269  __Pyx_XDECREF(__pyx_t_1);
8270  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8271  __pyx_r = NULL;
8272  __pyx_L0:;
8273  __Pyx_XGIVEREF(__pyx_r);
8274  __Pyx_RefNannyFinishContext();
8275  return __pyx_r;
8276  }
8277 
8278  /* "PyClical.pyx":759
8279  * return self.wrap( self.unwrap() + toClifford(rhs) )
8280  *
8281  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8282  * """
8283  * Geometric difference.
8284  */
8285 
8286  /* Python wrapper */
8287  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8288  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 ";
8289  #if CYTHON_COMPILING_IN_CPYTHON
8290  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8291  #endif
8292  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8293  PyObject *__pyx_r = 0;
8294  __Pyx_RefNannyDeclarations
8295  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8296  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8297 
8298  /* function exit code */
8299  __Pyx_RefNannyFinishContext();
8300  return __pyx_r;
8301  }
8302 
8303  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8304  PyObject *__pyx_r = NULL;
8305  __Pyx_RefNannyDeclarations
8306  PyObject *__pyx_t_1 = NULL;
8307  PyObject *__pyx_t_2 = NULL;
8308  __Pyx_RefNannySetupContext("__sub__", 0);
8309 
8310  /* "PyClical.pyx":768
8311  * {1}-{2}
8312  * """
8313  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8314  *
8315  * def __isub__(self, rhs):
8316  */
8317  __Pyx_XDECREF(__pyx_r);
8318  __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)
8319  __Pyx_GOTREF(__pyx_t_1);
8320  __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)
8321  __Pyx_GOTREF(__pyx_t_2);
8322  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8323  __pyx_r = __pyx_t_2;
8324  __pyx_t_2 = 0;
8325  goto __pyx_L0;
8326 
8327  /* "PyClical.pyx":759
8328  * return self.wrap( self.unwrap() + toClifford(rhs) )
8329  *
8330  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8331  * """
8332  * Geometric difference.
8333  */
8334 
8335  /* function exit code */
8336  __pyx_L1_error:;
8337  __Pyx_XDECREF(__pyx_t_1);
8338  __Pyx_XDECREF(__pyx_t_2);
8339  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8340  __pyx_r = NULL;
8341  __pyx_L0:;
8342  __Pyx_XGIVEREF(__pyx_r);
8343  __Pyx_RefNannyFinishContext();
8344  return __pyx_r;
8345  }
8346 
8347  /* "PyClical.pyx":770
8348  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8349  *
8350  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8351  * """
8352  * Geometric difference.
8353  */
8354 
8355  /* Python wrapper */
8356  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8357  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 ";
8358  #if CYTHON_COMPILING_IN_CPYTHON
8359  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8360  #endif
8361  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8362  PyObject *__pyx_r = 0;
8363  __Pyx_RefNannyDeclarations
8364  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8365  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8366 
8367  /* function exit code */
8368  __Pyx_RefNannyFinishContext();
8369  return __pyx_r;
8370  }
8371 
8372  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8373  PyObject *__pyx_r = NULL;
8374  __Pyx_RefNannyDeclarations
8375  PyObject *__pyx_t_1 = NULL;
8376  __Pyx_RefNannySetupContext("__isub__", 0);
8377 
8378  /* "PyClical.pyx":777
8379  * 1-{2}
8380  * """
8381  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8382  *
8383  * def __mul__(lhs, rhs):
8384  */
8385  __Pyx_XDECREF(__pyx_r);
8386  __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)
8387  __Pyx_GOTREF(__pyx_t_1);
8388  __pyx_r = __pyx_t_1;
8389  __pyx_t_1 = 0;
8390  goto __pyx_L0;
8391 
8392  /* "PyClical.pyx":770
8393  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8394  *
8395  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8396  * """
8397  * Geometric difference.
8398  */
8399 
8400  /* function exit code */
8401  __pyx_L1_error:;
8402  __Pyx_XDECREF(__pyx_t_1);
8403  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8404  __pyx_r = NULL;
8405  __pyx_L0:;
8406  __Pyx_XGIVEREF(__pyx_r);
8407  __Pyx_RefNannyFinishContext();
8408  return __pyx_r;
8409  }
8410 
8411  /* "PyClical.pyx":779
8412  * return self.wrap( self.unwrap() - toClifford(rhs) )
8413  *
8414  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8415  * """
8416  * Geometric product.
8417  */
8418 
8419  /* Python wrapper */
8420  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8421  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 ";
8422  #if CYTHON_COMPILING_IN_CPYTHON
8423  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8424  #endif
8425  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8426  PyObject *__pyx_r = 0;
8427  __Pyx_RefNannyDeclarations
8428  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8429  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8430 
8431  /* function exit code */
8432  __Pyx_RefNannyFinishContext();
8433  return __pyx_r;
8434  }
8435 
8436  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8437  PyObject *__pyx_r = NULL;
8438  __Pyx_RefNannyDeclarations
8439  PyObject *__pyx_t_1 = NULL;
8440  PyObject *__pyx_t_2 = NULL;
8441  __Pyx_RefNannySetupContext("__mul__", 0);
8442 
8443  /* "PyClical.pyx":790
8444  * {2}
8445  * """
8446  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8447  *
8448  * def __imul__(self, rhs):
8449  */
8450  __Pyx_XDECREF(__pyx_r);
8451  __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)
8452  __Pyx_GOTREF(__pyx_t_1);
8453  __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)
8454  __Pyx_GOTREF(__pyx_t_2);
8455  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8456  __pyx_r = __pyx_t_2;
8457  __pyx_t_2 = 0;
8458  goto __pyx_L0;
8459 
8460  /* "PyClical.pyx":779
8461  * return self.wrap( self.unwrap() - toClifford(rhs) )
8462  *
8463  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8464  * """
8465  * Geometric product.
8466  */
8467 
8468  /* function exit code */
8469  __pyx_L1_error:;
8470  __Pyx_XDECREF(__pyx_t_1);
8471  __Pyx_XDECREF(__pyx_t_2);
8472  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8473  __pyx_r = NULL;
8474  __pyx_L0:;
8475  __Pyx_XGIVEREF(__pyx_r);
8476  __Pyx_RefNannyFinishContext();
8477  return __pyx_r;
8478  }
8479 
8480  /* "PyClical.pyx":792
8481  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8482  *
8483  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8484  * """
8485  * Geometric product.
8486  */
8487 
8488  /* Python wrapper */
8489  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8490  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 ";
8491  #if CYTHON_COMPILING_IN_CPYTHON
8492  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8493  #endif
8494  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8495  PyObject *__pyx_r = 0;
8496  __Pyx_RefNannyDeclarations
8497  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8498  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8499 
8500  /* function exit code */
8501  __Pyx_RefNannyFinishContext();
8502  return __pyx_r;
8503  }
8504 
8505  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8506  PyObject *__pyx_r = NULL;
8507  __Pyx_RefNannyDeclarations
8508  PyObject *__pyx_t_1 = NULL;
8509  __Pyx_RefNannySetupContext("__imul__", 0);
8510 
8511  /* "PyClical.pyx":803
8512  * {2}
8513  * """
8514  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8515  *
8516  * def __mod__(lhs, rhs):
8517  */
8518  __Pyx_XDECREF(__pyx_r);
8519  __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)
8520  __Pyx_GOTREF(__pyx_t_1);
8521  __pyx_r = __pyx_t_1;
8522  __pyx_t_1 = 0;
8523  goto __pyx_L0;
8524 
8525  /* "PyClical.pyx":792
8526  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8527  *
8528  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8529  * """
8530  * Geometric product.
8531  */
8532 
8533  /* function exit code */
8534  __pyx_L1_error:;
8535  __Pyx_XDECREF(__pyx_t_1);
8536  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8537  __pyx_r = NULL;
8538  __pyx_L0:;
8539  __Pyx_XGIVEREF(__pyx_r);
8540  __Pyx_RefNannyFinishContext();
8541  return __pyx_r;
8542  }
8543 
8544  /* "PyClical.pyx":805
8545  * return self.wrap( self.unwrap() * toClifford(rhs) )
8546  *
8547  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8548  * """
8549  * Contraction.
8550  */
8551 
8552  /* Python wrapper */
8553  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8554  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 ";
8555  #if CYTHON_COMPILING_IN_CPYTHON
8556  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8557  #endif
8558  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8559  PyObject *__pyx_r = 0;
8560  __Pyx_RefNannyDeclarations
8561  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8562  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8563 
8564  /* function exit code */
8565  __Pyx_RefNannyFinishContext();
8566  return __pyx_r;
8567  }
8568 
8569  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8570  PyObject *__pyx_r = NULL;
8571  __Pyx_RefNannyDeclarations
8572  PyObject *__pyx_t_1 = NULL;
8573  PyObject *__pyx_t_2 = NULL;
8574  __Pyx_RefNannySetupContext("__mod__", 0);
8575 
8576  /* "PyClical.pyx":818
8577  * {2}
8578  * """
8579  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8580  *
8581  * def __imod__(self, rhs):
8582  */
8583  __Pyx_XDECREF(__pyx_r);
8584  __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)
8585  __Pyx_GOTREF(__pyx_t_1);
8586  __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)
8587  __Pyx_GOTREF(__pyx_t_2);
8588  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8589  __pyx_r = __pyx_t_2;
8590  __pyx_t_2 = 0;
8591  goto __pyx_L0;
8592 
8593  /* "PyClical.pyx":805
8594  * return self.wrap( self.unwrap() * toClifford(rhs) )
8595  *
8596  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8597  * """
8598  * Contraction.
8599  */
8600 
8601  /* function exit code */
8602  __pyx_L1_error:;
8603  __Pyx_XDECREF(__pyx_t_1);
8604  __Pyx_XDECREF(__pyx_t_2);
8605  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8606  __pyx_r = NULL;
8607  __pyx_L0:;
8608  __Pyx_XGIVEREF(__pyx_r);
8609  __Pyx_RefNannyFinishContext();
8610  return __pyx_r;
8611  }
8612 
8613  /* "PyClical.pyx":820
8614  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8615  *
8616  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8617  * """
8618  * Contraction.
8619  */
8620 
8621  /* Python wrapper */
8622  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8623  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 ";
8624  #if CYTHON_COMPILING_IN_CPYTHON
8625  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8626  #endif
8627  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8628  PyObject *__pyx_r = 0;
8629  __Pyx_RefNannyDeclarations
8630  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8631  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8632 
8633  /* function exit code */
8634  __Pyx_RefNannyFinishContext();
8635  return __pyx_r;
8636  }
8637 
8638  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8639  PyObject *__pyx_r = NULL;
8640  __Pyx_RefNannyDeclarations
8641  PyObject *__pyx_t_1 = NULL;
8642  __Pyx_RefNannySetupContext("__imod__", 0);
8643 
8644  /* "PyClical.pyx":833
8645  * {2}
8646  * """
8647  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8648  *
8649  * def __and__(lhs, rhs):
8650  */
8651  __Pyx_XDECREF(__pyx_r);
8652  __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)
8653  __Pyx_GOTREF(__pyx_t_1);
8654  __pyx_r = __pyx_t_1;
8655  __pyx_t_1 = 0;
8656  goto __pyx_L0;
8657 
8658  /* "PyClical.pyx":820
8659  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8660  *
8661  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8662  * """
8663  * Contraction.
8664  */
8665 
8666  /* function exit code */
8667  __pyx_L1_error:;
8668  __Pyx_XDECREF(__pyx_t_1);
8669  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8670  __pyx_r = NULL;
8671  __pyx_L0:;
8672  __Pyx_XGIVEREF(__pyx_r);
8673  __Pyx_RefNannyFinishContext();
8674  return __pyx_r;
8675  }
8676 
8677  /* "PyClical.pyx":835
8678  * return self.wrap( self.unwrap() % toClifford(rhs) )
8679  *
8680  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8681  * """
8682  * Inner product.
8683  */
8684 
8685  /* Python wrapper */
8686  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8687  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 ";
8688  #if CYTHON_COMPILING_IN_CPYTHON
8689  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8690  #endif
8691  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8692  PyObject *__pyx_r = 0;
8693  __Pyx_RefNannyDeclarations
8694  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8695  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8696 
8697  /* function exit code */
8698  __Pyx_RefNannyFinishContext();
8699  return __pyx_r;
8700  }
8701 
8702  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8703  PyObject *__pyx_r = NULL;
8704  __Pyx_RefNannyDeclarations
8705  PyObject *__pyx_t_1 = NULL;
8706  PyObject *__pyx_t_2 = NULL;
8707  __Pyx_RefNannySetupContext("__and__", 0);
8708 
8709  /* "PyClical.pyx":848
8710  * {2}
8711  * """
8712  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8713  *
8714  * def __iand__(self, rhs):
8715  */
8716  __Pyx_XDECREF(__pyx_r);
8717  __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)
8718  __Pyx_GOTREF(__pyx_t_1);
8719  __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)
8720  __Pyx_GOTREF(__pyx_t_2);
8721  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8722  __pyx_r = __pyx_t_2;
8723  __pyx_t_2 = 0;
8724  goto __pyx_L0;
8725 
8726  /* "PyClical.pyx":835
8727  * return self.wrap( self.unwrap() % toClifford(rhs) )
8728  *
8729  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8730  * """
8731  * Inner product.
8732  */
8733 
8734  /* function exit code */
8735  __pyx_L1_error:;
8736  __Pyx_XDECREF(__pyx_t_1);
8737  __Pyx_XDECREF(__pyx_t_2);
8738  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8739  __pyx_r = NULL;
8740  __pyx_L0:;
8741  __Pyx_XGIVEREF(__pyx_r);
8742  __Pyx_RefNannyFinishContext();
8743  return __pyx_r;
8744  }
8745 
8746  /* "PyClical.pyx":850
8747  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8748  *
8749  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8750  * """
8751  * Inner product.
8752  */
8753 
8754  /* Python wrapper */
8755  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8756  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 ";
8757  #if CYTHON_COMPILING_IN_CPYTHON
8758  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8759  #endif
8760  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8761  PyObject *__pyx_r = 0;
8762  __Pyx_RefNannyDeclarations
8763  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8764  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8765 
8766  /* function exit code */
8767  __Pyx_RefNannyFinishContext();
8768  return __pyx_r;
8769  }
8770 
8771  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8772  PyObject *__pyx_r = NULL;
8773  __Pyx_RefNannyDeclarations
8774  PyObject *__pyx_t_1 = NULL;
8775  __Pyx_RefNannySetupContext("__iand__", 0);
8776 
8777  /* "PyClical.pyx":863
8778  * {2}
8779  * """
8780  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8781  *
8782  * def __xor__(lhs, rhs):
8783  */
8784  __Pyx_XDECREF(__pyx_r);
8785  __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)
8786  __Pyx_GOTREF(__pyx_t_1);
8787  __pyx_r = __pyx_t_1;
8788  __pyx_t_1 = 0;
8789  goto __pyx_L0;
8790 
8791  /* "PyClical.pyx":850
8792  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8793  *
8794  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8795  * """
8796  * Inner product.
8797  */
8798 
8799  /* function exit code */
8800  __pyx_L1_error:;
8801  __Pyx_XDECREF(__pyx_t_1);
8802  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8803  __pyx_r = NULL;
8804  __pyx_L0:;
8805  __Pyx_XGIVEREF(__pyx_r);
8806  __Pyx_RefNannyFinishContext();
8807  return __pyx_r;
8808  }
8809 
8810  /* "PyClical.pyx":865
8811  * return self.wrap( self.unwrap() & toClifford(rhs) )
8812  *
8813  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8814  * """
8815  * Outer product.
8816  */
8817 
8818  /* Python wrapper */
8819  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8820  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 ";
8821  #if CYTHON_COMPILING_IN_CPYTHON
8822  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8823  #endif
8824  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8825  PyObject *__pyx_r = 0;
8826  __Pyx_RefNannyDeclarations
8827  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8828  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8829 
8830  /* function exit code */
8831  __Pyx_RefNannyFinishContext();
8832  return __pyx_r;
8833  }
8834 
8835  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8836  PyObject *__pyx_r = NULL;
8837  __Pyx_RefNannyDeclarations
8838  PyObject *__pyx_t_1 = NULL;
8839  PyObject *__pyx_t_2 = NULL;
8840  __Pyx_RefNannySetupContext("__xor__", 0);
8841 
8842  /* "PyClical.pyx":878
8843  * 0
8844  * """
8845  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8846  *
8847  * def __ixor__(self, rhs):
8848  */
8849  __Pyx_XDECREF(__pyx_r);
8850  __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)
8851  __Pyx_GOTREF(__pyx_t_1);
8852  __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)
8853  __Pyx_GOTREF(__pyx_t_2);
8854  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8855  __pyx_r = __pyx_t_2;
8856  __pyx_t_2 = 0;
8857  goto __pyx_L0;
8858 
8859  /* "PyClical.pyx":865
8860  * return self.wrap( self.unwrap() & toClifford(rhs) )
8861  *
8862  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8863  * """
8864  * Outer product.
8865  */
8866 
8867  /* function exit code */
8868  __pyx_L1_error:;
8869  __Pyx_XDECREF(__pyx_t_1);
8870  __Pyx_XDECREF(__pyx_t_2);
8871  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8872  __pyx_r = NULL;
8873  __pyx_L0:;
8874  __Pyx_XGIVEREF(__pyx_r);
8875  __Pyx_RefNannyFinishContext();
8876  return __pyx_r;
8877  }
8878 
8879  /* "PyClical.pyx":880
8880  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8881  *
8882  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8883  * """
8884  * Outer product.
8885  */
8886 
8887  /* Python wrapper */
8888  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8889  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 ";
8890  #if CYTHON_COMPILING_IN_CPYTHON
8891  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8892  #endif
8893  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8894  PyObject *__pyx_r = 0;
8895  __Pyx_RefNannyDeclarations
8896  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8897  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8898 
8899  /* function exit code */
8900  __Pyx_RefNannyFinishContext();
8901  return __pyx_r;
8902  }
8903 
8904  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8905  PyObject *__pyx_r = NULL;
8906  __Pyx_RefNannyDeclarations
8907  PyObject *__pyx_t_1 = NULL;
8908  __Pyx_RefNannySetupContext("__ixor__", 0);
8909 
8910  /* "PyClical.pyx":893
8911  * 0
8912  * """
8913  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8914  *
8915  * def __div__(lhs, rhs):
8916  */
8917  __Pyx_XDECREF(__pyx_r);
8918  __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)
8919  __Pyx_GOTREF(__pyx_t_1);
8920  __pyx_r = __pyx_t_1;
8921  __pyx_t_1 = 0;
8922  goto __pyx_L0;
8923 
8924  /* "PyClical.pyx":880
8925  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8926  *
8927  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8928  * """
8929  * Outer product.
8930  */
8931 
8932  /* function exit code */
8933  __pyx_L1_error:;
8934  __Pyx_XDECREF(__pyx_t_1);
8935  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8936  __pyx_r = NULL;
8937  __pyx_L0:;
8938  __Pyx_XGIVEREF(__pyx_r);
8939  __Pyx_RefNannyFinishContext();
8940  return __pyx_r;
8941  }
8942 
8943  /* "PyClical.pyx":895
8944  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8945  *
8946  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8947  * """
8948  * Geometric quotient.
8949  */
8950 
8951  /* Python wrapper */
8952  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8953  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8954  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 ";
8955  #if CYTHON_COMPILING_IN_CPYTHON
8956  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8957  #endif
8958  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8959  PyObject *__pyx_r = 0;
8960  __Pyx_RefNannyDeclarations
8961  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8962  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8963 
8964  /* function exit code */
8965  __Pyx_RefNannyFinishContext();
8966  return __pyx_r;
8967  }
8968  #endif
8970  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8971  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8972  PyObject *__pyx_r = NULL;
8973  __Pyx_RefNannyDeclarations
8974  PyObject *__pyx_t_1 = NULL;
8975  PyObject *__pyx_t_2 = NULL;
8976  __Pyx_RefNannySetupContext("__div__", 0);
8977 
8978  /* "PyClical.pyx":908
8979  * -{2}
8980  * """
8981  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8982  *
8983  * def __idiv__(self, rhs):
8984  */
8985  __Pyx_XDECREF(__pyx_r);
8986  __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)
8987  __Pyx_GOTREF(__pyx_t_1);
8988  __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)
8989  __Pyx_GOTREF(__pyx_t_2);
8990  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8991  __pyx_r = __pyx_t_2;
8992  __pyx_t_2 = 0;
8993  goto __pyx_L0;
8994 
8995  /* "PyClical.pyx":895
8996  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8997  *
8998  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8999  * """
9000  * Geometric quotient.
9001  */
9002 
9003  /* function exit code */
9004  __pyx_L1_error:;
9005  __Pyx_XDECREF(__pyx_t_1);
9006  __Pyx_XDECREF(__pyx_t_2);
9007  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9008  __pyx_r = NULL;
9009  __pyx_L0:;
9010  __Pyx_XGIVEREF(__pyx_r);
9011  __Pyx_RefNannyFinishContext();
9012  return __pyx_r;
9013  }
9014  #endif
9016  /* "PyClical.pyx":910
9017  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9018  *
9019  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9020  * """
9021  * Geometric quotient.
9022  */
9023 
9024  /* Python wrapper */
9025  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9026  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9027  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 ";
9028  #if CYTHON_COMPILING_IN_CPYTHON
9029  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9030  #endif
9031  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9032  PyObject *__pyx_r = 0;
9033  __Pyx_RefNannyDeclarations
9034  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9035  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9036 
9037  /* function exit code */
9038  __Pyx_RefNannyFinishContext();
9039  return __pyx_r;
9040  }
9041  #endif
9043  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9044  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9045  PyObject *__pyx_r = NULL;
9046  __Pyx_RefNannyDeclarations
9047  PyObject *__pyx_t_1 = NULL;
9048  __Pyx_RefNannySetupContext("__idiv__", 0);
9049 
9050  /* "PyClical.pyx":923
9051  * -{2}
9052  * """
9053  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9054  *
9055  * def inv(self):
9056  */
9057  __Pyx_XDECREF(__pyx_r);
9058  __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)
9059  __Pyx_GOTREF(__pyx_t_1);
9060  __pyx_r = __pyx_t_1;
9061  __pyx_t_1 = 0;
9062  goto __pyx_L0;
9063 
9064  /* "PyClical.pyx":910
9065  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9066  *
9067  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9068  * """
9069  * Geometric quotient.
9070  */
9071 
9072  /* function exit code */
9073  __pyx_L1_error:;
9074  __Pyx_XDECREF(__pyx_t_1);
9075  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9076  __pyx_r = NULL;
9077  __pyx_L0:;
9078  __Pyx_XGIVEREF(__pyx_r);
9079  __Pyx_RefNannyFinishContext();
9080  return __pyx_r;
9081  }
9082  #endif
9084  /* "PyClical.pyx":925
9085  * return self.wrap( self.unwrap() / toClifford(rhs) )
9086  *
9087  * def inv(self): # <<<<<<<<<<<<<<
9088  * """
9089  * Geometric multiplicative inverse.
9090  */
9091 
9092  /* Python wrapper */
9093  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9094  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 ";
9095  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9096  PyObject *__pyx_r = 0;
9097  __Pyx_RefNannyDeclarations
9098  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9099  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9100 
9101  /* function exit code */
9102  __Pyx_RefNannyFinishContext();
9103  return __pyx_r;
9104  }
9105 
9106  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9107  PyObject *__pyx_r = NULL;
9108  __Pyx_RefNannyDeclarations
9109  PyObject *__pyx_t_1 = NULL;
9110  PyObject *__pyx_t_2 = NULL;
9111  __Pyx_RefNannySetupContext("inv", 0);
9112 
9113  /* "PyClical.pyx":936
9114  * -{1,2}
9115  * """
9116  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9117  *
9118  * def __or__(lhs, rhs):
9119  */
9120  __Pyx_XDECREF(__pyx_r);
9121  __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)
9122  __Pyx_GOTREF(__pyx_t_1);
9123  __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)
9124  __Pyx_GOTREF(__pyx_t_2);
9125  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9126  __pyx_r = __pyx_t_2;
9127  __pyx_t_2 = 0;
9128  goto __pyx_L0;
9129 
9130  /* "PyClical.pyx":925
9131  * return self.wrap( self.unwrap() / toClifford(rhs) )
9132  *
9133  * def inv(self): # <<<<<<<<<<<<<<
9134  * """
9135  * Geometric multiplicative inverse.
9136  */
9137 
9138  /* function exit code */
9139  __pyx_L1_error:;
9140  __Pyx_XDECREF(__pyx_t_1);
9141  __Pyx_XDECREF(__pyx_t_2);
9142  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9143  __pyx_r = NULL;
9144  __pyx_L0:;
9145  __Pyx_XGIVEREF(__pyx_r);
9146  __Pyx_RefNannyFinishContext();
9147  return __pyx_r;
9148  }
9149 
9150  /* "PyClical.pyx":938
9151  * return clifford().wrap( self.instance.inv() )
9152  *
9153  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9154  * """
9155  * Transform left hand side, using right hand side as a transformation.
9156  */
9157 
9158  /* Python wrapper */
9159  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9160  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 ";
9161  #if CYTHON_COMPILING_IN_CPYTHON
9162  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9163  #endif
9164  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9165  PyObject *__pyx_r = 0;
9166  __Pyx_RefNannyDeclarations
9167  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9168  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9169 
9170  /* function exit code */
9171  __Pyx_RefNannyFinishContext();
9172  return __pyx_r;
9173  }
9174 
9175  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9176  PyObject *__pyx_r = NULL;
9177  __Pyx_RefNannyDeclarations
9178  PyObject *__pyx_t_1 = NULL;
9179  PyObject *__pyx_t_2 = NULL;
9180  __Pyx_RefNannySetupContext("__or__", 0);
9181 
9182  /* "PyClical.pyx":947
9183  * -{1}
9184  * """
9185  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9186  *
9187  * def __ior__(self, rhs):
9188  */
9189  __Pyx_XDECREF(__pyx_r);
9190  __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)
9191  __Pyx_GOTREF(__pyx_t_1);
9192  __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)
9193  __Pyx_GOTREF(__pyx_t_2);
9194  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9195  __pyx_r = __pyx_t_2;
9196  __pyx_t_2 = 0;
9197  goto __pyx_L0;
9198 
9199  /* "PyClical.pyx":938
9200  * return clifford().wrap( self.instance.inv() )
9201  *
9202  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9203  * """
9204  * Transform left hand side, using right hand side as a transformation.
9205  */
9206 
9207  /* function exit code */
9208  __pyx_L1_error:;
9209  __Pyx_XDECREF(__pyx_t_1);
9210  __Pyx_XDECREF(__pyx_t_2);
9211  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9212  __pyx_r = NULL;
9213  __pyx_L0:;
9214  __Pyx_XGIVEREF(__pyx_r);
9215  __Pyx_RefNannyFinishContext();
9216  return __pyx_r;
9217  }
9218 
9219  /* "PyClical.pyx":949
9220  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9221  *
9222  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9223  * """
9224  * Transform left hand side, using right hand side as a transformation.
9225  */
9226 
9227  /* Python wrapper */
9228  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9229  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 ";
9230  #if CYTHON_COMPILING_IN_CPYTHON
9231  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9232  #endif
9233  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9234  PyObject *__pyx_r = 0;
9235  __Pyx_RefNannyDeclarations
9236  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9237  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9238 
9239  /* function exit code */
9240  __Pyx_RefNannyFinishContext();
9241  return __pyx_r;
9242  }
9243 
9244  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9245  PyObject *__pyx_r = NULL;
9246  __Pyx_RefNannyDeclarations
9247  PyObject *__pyx_t_1 = NULL;
9248  __Pyx_RefNannySetupContext("__ior__", 0);
9249 
9250  /* "PyClical.pyx":958
9251  * -{1}
9252  * """
9253  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9254  *
9255  * def __pow__(self, m, dummy):
9256  */
9257  __Pyx_XDECREF(__pyx_r);
9258  __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)
9259  __Pyx_GOTREF(__pyx_t_1);
9260  __pyx_r = __pyx_t_1;
9261  __pyx_t_1 = 0;
9262  goto __pyx_L0;
9263 
9264  /* "PyClical.pyx":949
9265  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9266  *
9267  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9268  * """
9269  * Transform left hand side, using right hand side as a transformation.
9270  */
9271 
9272  /* function exit code */
9273  __pyx_L1_error:;
9274  __Pyx_XDECREF(__pyx_t_1);
9275  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9276  __pyx_r = NULL;
9277  __pyx_L0:;
9278  __Pyx_XGIVEREF(__pyx_r);
9279  __Pyx_RefNannyFinishContext();
9280  return __pyx_r;
9281  }
9282 
9283  /* "PyClical.pyx":960
9284  * return self.wrap( self.unwrap() | toClifford(rhs) )
9285  *
9286  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9287  * """
9288  * Power: self to the m.
9289  */
9290 
9291  /* Python wrapper */
9292  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9293  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 ";
9294  #if CYTHON_COMPILING_IN_CPYTHON
9295  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9296  #endif
9297  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9298  PyObject *__pyx_r = 0;
9299  __Pyx_RefNannyDeclarations
9300  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9301  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9302 
9303  /* function exit code */
9304  __Pyx_RefNannyFinishContext();
9305  return __pyx_r;
9306  }
9307 
9308  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9309  PyObject *__pyx_r = NULL;
9310  __Pyx_RefNannyDeclarations
9311  PyObject *__pyx_t_1 = NULL;
9312  __Pyx_RefNannySetupContext("__pow__", 0);
9313 
9314  /* "PyClical.pyx":977
9315  * 1
9316  * """
9317  * return pow(self, m) # <<<<<<<<<<<<<<
9318  *
9319  * def pow(self, m):
9320  */
9321  __Pyx_XDECREF(__pyx_r);
9322  __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)
9323  __Pyx_GOTREF(__pyx_t_1);
9324  __pyx_r = __pyx_t_1;
9325  __pyx_t_1 = 0;
9326  goto __pyx_L0;
9327 
9328  /* "PyClical.pyx":960
9329  * return self.wrap( self.unwrap() | toClifford(rhs) )
9330  *
9331  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9332  * """
9333  * Power: self to the m.
9334  */
9335 
9336  /* function exit code */
9337  __pyx_L1_error:;
9338  __Pyx_XDECREF(__pyx_t_1);
9339  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9340  __pyx_r = NULL;
9341  __pyx_L0:;
9342  __Pyx_XGIVEREF(__pyx_r);
9343  __Pyx_RefNannyFinishContext();
9344  return __pyx_r;
9345  }
9346 
9347  /* "PyClical.pyx":979
9348  * return pow(self, m)
9349  *
9350  * def pow(self, m): # <<<<<<<<<<<<<<
9351  * """
9352  * Power: self to the m.
9353  */
9354 
9355  /* Python wrapper */
9356  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9357  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 ";
9358  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9359  PyObject *__pyx_r = 0;
9360  __Pyx_RefNannyDeclarations
9361  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9362  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9363 
9364  /* function exit code */
9365  __Pyx_RefNannyFinishContext();
9366  return __pyx_r;
9367  }
9368 
9369  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9370  PyObject *__pyx_r = NULL;
9371  __Pyx_RefNannyDeclarations
9372  PyObject *__pyx_t_1 = NULL;
9373  PyObject *__pyx_t_2 = NULL;
9374  int __pyx_t_3;
9375  int __pyx_t_4;
9376  int __pyx_t_5;
9377  __Pyx_RefNannySetupContext("pow", 0);
9378 
9379  /* "PyClical.pyx":998
9380  * 1
9381  * """
9382  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9383  * return clifford().wrap( self.instance.pow(m) )
9384  * else:
9385  */
9386  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9387  __Pyx_GOTREF(__pyx_t_1);
9388  __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)
9389  __Pyx_GOTREF(__pyx_t_2);
9390  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9391  __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)
9392  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9393  __pyx_t_4 = (__pyx_t_3 != 0);
9394  if (__pyx_t_4) {
9395 
9396  /* "PyClical.pyx":999
9397  * """
9398  * if isinstance(m, numbers.Integral):
9399  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9400  * else:
9401  * return exp(m * log(self))
9402  */
9403  __Pyx_XDECREF(__pyx_r);
9404  __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)
9405  __Pyx_GOTREF(__pyx_t_2);
9406  __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)
9407  __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)
9408  __Pyx_GOTREF(__pyx_t_1);
9409  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9410  __pyx_r = __pyx_t_1;
9411  __pyx_t_1 = 0;
9412  goto __pyx_L0;
9413 
9414  /* "PyClical.pyx":998
9415  * 1
9416  * """
9417  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9418  * return clifford().wrap( self.instance.pow(m) )
9419  * else:
9420  */
9421  }
9422 
9423  /* "PyClical.pyx":1001
9424  * return clifford().wrap( self.instance.pow(m) )
9425  * else:
9426  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9427  *
9428  * def outer_pow(self, m):
9429  */
9430  /*else*/ {
9431  __Pyx_XDECREF(__pyx_r);
9432  __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)
9433  __Pyx_GOTREF(__pyx_t_1);
9434  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9435  __Pyx_GOTREF(__pyx_t_2);
9436  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9437  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9438  __Pyx_GOTREF(__pyx_t_1);
9439  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9440  __pyx_r = __pyx_t_1;
9441  __pyx_t_1 = 0;
9442  goto __pyx_L0;
9443  }
9444 
9445  /* "PyClical.pyx":979
9446  * return pow(self, m)
9447  *
9448  * def pow(self, m): # <<<<<<<<<<<<<<
9449  * """
9450  * Power: self to the m.
9451  */
9452 
9453  /* function exit code */
9454  __pyx_L1_error:;
9455  __Pyx_XDECREF(__pyx_t_1);
9456  __Pyx_XDECREF(__pyx_t_2);
9457  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9458  __pyx_r = NULL;
9459  __pyx_L0:;
9460  __Pyx_XGIVEREF(__pyx_r);
9461  __Pyx_RefNannyFinishContext();
9462  return __pyx_r;
9463  }
9464 
9465  /* "PyClical.pyx":1003
9466  * return exp(m * log(self))
9467  *
9468  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9469  * """
9470  * Outer product power.
9471  */
9472 
9473  /* Python wrapper */
9474  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9475  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 ";
9476  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9477  PyObject *__pyx_r = 0;
9478  __Pyx_RefNannyDeclarations
9479  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9480  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9481 
9482  /* function exit code */
9483  __Pyx_RefNannyFinishContext();
9484  return __pyx_r;
9485  }
9486 
9487  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9488  PyObject *__pyx_r = NULL;
9489  __Pyx_RefNannyDeclarations
9490  PyObject *__pyx_t_1 = NULL;
9491  int __pyx_t_2;
9492  PyObject *__pyx_t_3 = NULL;
9493  __Pyx_RefNannySetupContext("outer_pow", 0);
9494 
9495  /* "PyClical.pyx":1017
9496  *
9497  * """
9498  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9499  *
9500  * def __call__(self, grade):
9501  */
9502  __Pyx_XDECREF(__pyx_r);
9503  __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)
9504  __Pyx_GOTREF(__pyx_t_1);
9505  __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)
9506  __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)
9507  __Pyx_GOTREF(__pyx_t_3);
9508  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9509  __pyx_r = __pyx_t_3;
9510  __pyx_t_3 = 0;
9511  goto __pyx_L0;
9512 
9513  /* "PyClical.pyx":1003
9514  * return exp(m * log(self))
9515  *
9516  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9517  * """
9518  * Outer product power.
9519  */
9520 
9521  /* function exit code */
9522  __pyx_L1_error:;
9523  __Pyx_XDECREF(__pyx_t_1);
9524  __Pyx_XDECREF(__pyx_t_3);
9525  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9526  __pyx_r = NULL;
9527  __pyx_L0:;
9528  __Pyx_XGIVEREF(__pyx_r);
9529  __Pyx_RefNannyFinishContext();
9530  return __pyx_r;
9531  }
9532 
9533  /* "PyClical.pyx":1019
9534  * return clifford().wrap( self.instance.outer_pow(m) )
9535  *
9536  * def __call__(self, grade): # <<<<<<<<<<<<<<
9537  * """
9538  * Pure grade-vector part.
9539  */
9540 
9541  /* Python wrapper */
9542  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9543  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 ";
9544  #if CYTHON_COMPILING_IN_CPYTHON
9545  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9546  #endif
9547  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9548  PyObject *__pyx_v_grade = 0;
9549  PyObject *__pyx_r = 0;
9550  __Pyx_RefNannyDeclarations
9551  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9552  {
9553  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9554  PyObject* values[1] = {0};
9555  if (unlikely(__pyx_kwds)) {
9556  Py_ssize_t kw_args;
9557  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9558  switch (pos_args) {
9559  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9560  CYTHON_FALLTHROUGH;
9561  case 0: break;
9562  default: goto __pyx_L5_argtuple_error;
9563  }
9564  kw_args = PyDict_Size(__pyx_kwds);
9565  switch (pos_args) {
9566  case 0:
9567  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9568  else goto __pyx_L5_argtuple_error;
9569  }
9570  if (unlikely(kw_args > 0)) {
9571  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9572  }
9573  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9574  goto __pyx_L5_argtuple_error;
9575  } else {
9576  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9577  }
9578  __pyx_v_grade = values[0];
9579  }
9580  goto __pyx_L4_argument_unpacking_done;
9581  __pyx_L5_argtuple_error:;
9582  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9583  __pyx_L3_error:;
9584  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9585  __Pyx_RefNannyFinishContext();
9586  return NULL;
9587  __pyx_L4_argument_unpacking_done:;
9588  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9589 
9590  /* function exit code */
9591  __Pyx_RefNannyFinishContext();
9592  return __pyx_r;
9593  }
9594 
9595  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9596  PyObject *__pyx_r = NULL;
9597  __Pyx_RefNannyDeclarations
9598  PyObject *__pyx_t_1 = NULL;
9599  int __pyx_t_2;
9600  PyObject *__pyx_t_3 = NULL;
9601  __Pyx_RefNannySetupContext("__call__", 0);
9602 
9603  /* "PyClical.pyx":1036
9604  * 0
9605  * """
9606  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9607  *
9608  * def scalar(self):
9609  */
9610  __Pyx_XDECREF(__pyx_r);
9611  __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)
9612  __Pyx_GOTREF(__pyx_t_1);
9613  __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)
9614  __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)
9615  __Pyx_GOTREF(__pyx_t_3);
9616  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9617  __pyx_r = __pyx_t_3;
9618  __pyx_t_3 = 0;
9619  goto __pyx_L0;
9620 
9621  /* "PyClical.pyx":1019
9622  * return clifford().wrap( self.instance.outer_pow(m) )
9623  *
9624  * def __call__(self, grade): # <<<<<<<<<<<<<<
9625  * """
9626  * Pure grade-vector part.
9627  */
9628 
9629  /* function exit code */
9630  __pyx_L1_error:;
9631  __Pyx_XDECREF(__pyx_t_1);
9632  __Pyx_XDECREF(__pyx_t_3);
9633  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9634  __pyx_r = NULL;
9635  __pyx_L0:;
9636  __Pyx_XGIVEREF(__pyx_r);
9637  __Pyx_RefNannyFinishContext();
9638  return __pyx_r;
9639  }
9640 
9641  /* "PyClical.pyx":1038
9642  * return clifford().wrap( self.instance.call(grade) )
9643  *
9644  * def scalar(self): # <<<<<<<<<<<<<<
9645  * """
9646  * Scalar part.
9647  */
9648 
9649  /* Python wrapper */
9650  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9651  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 ";
9652  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9653  PyObject *__pyx_r = 0;
9654  __Pyx_RefNannyDeclarations
9655  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9656  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9657 
9658  /* function exit code */
9659  __Pyx_RefNannyFinishContext();
9660  return __pyx_r;
9661  }
9662 
9663  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9664  PyObject *__pyx_r = NULL;
9665  __Pyx_RefNannyDeclarations
9666  PyObject *__pyx_t_1 = NULL;
9667  __Pyx_RefNannySetupContext("scalar", 0);
9668 
9669  /* "PyClical.pyx":1047
9670  * 0.0
9671  * """
9672  * return self.instance.scalar() # <<<<<<<<<<<<<<
9673  *
9674  * def pure(self):
9675  */
9676  __Pyx_XDECREF(__pyx_r);
9677  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9678  __Pyx_GOTREF(__pyx_t_1);
9679  __pyx_r = __pyx_t_1;
9680  __pyx_t_1 = 0;
9681  goto __pyx_L0;
9682 
9683  /* "PyClical.pyx":1038
9684  * return clifford().wrap( self.instance.call(grade) )
9685  *
9686  * def scalar(self): # <<<<<<<<<<<<<<
9687  * """
9688  * Scalar part.
9689  */
9690 
9691  /* function exit code */
9692  __pyx_L1_error:;
9693  __Pyx_XDECREF(__pyx_t_1);
9694  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9695  __pyx_r = NULL;
9696  __pyx_L0:;
9697  __Pyx_XGIVEREF(__pyx_r);
9698  __Pyx_RefNannyFinishContext();
9699  return __pyx_r;
9700  }
9701 
9702  /* "PyClical.pyx":1049
9703  * return self.instance.scalar()
9704  *
9705  * def pure(self): # <<<<<<<<<<<<<<
9706  * """
9707  * Pure part.
9708  */
9709 
9710  /* Python wrapper */
9711  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9712  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 ";
9713  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9714  PyObject *__pyx_r = 0;
9715  __Pyx_RefNannyDeclarations
9716  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9717  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9718 
9719  /* function exit code */
9720  __Pyx_RefNannyFinishContext();
9721  return __pyx_r;
9722  }
9723 
9724  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9725  PyObject *__pyx_r = NULL;
9726  __Pyx_RefNannyDeclarations
9727  PyObject *__pyx_t_1 = NULL;
9728  PyObject *__pyx_t_2 = NULL;
9729  __Pyx_RefNannySetupContext("pure", 0);
9730 
9731  /* "PyClical.pyx":1058
9732  * {1,2}
9733  * """
9734  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9735  *
9736  * def even(self):
9737  */
9738  __Pyx_XDECREF(__pyx_r);
9739  __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)
9740  __Pyx_GOTREF(__pyx_t_1);
9741  __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)
9742  __Pyx_GOTREF(__pyx_t_2);
9743  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9744  __pyx_r = __pyx_t_2;
9745  __pyx_t_2 = 0;
9746  goto __pyx_L0;
9747 
9748  /* "PyClical.pyx":1049
9749  * return self.instance.scalar()
9750  *
9751  * def pure(self): # <<<<<<<<<<<<<<
9752  * """
9753  * Pure part.
9754  */
9755 
9756  /* function exit code */
9757  __pyx_L1_error:;
9758  __Pyx_XDECREF(__pyx_t_1);
9759  __Pyx_XDECREF(__pyx_t_2);
9760  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9761  __pyx_r = NULL;
9762  __pyx_L0:;
9763  __Pyx_XGIVEREF(__pyx_r);
9764  __Pyx_RefNannyFinishContext();
9765  return __pyx_r;
9766  }
9767 
9768  /* "PyClical.pyx":1060
9769  * return clifford().wrap( self.instance.pure() )
9770  *
9771  * def even(self): # <<<<<<<<<<<<<<
9772  * """
9773  * Even part of multivector, sum of even grade terms.
9774  */
9775 
9776  /* Python wrapper */
9777  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9778  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 ";
9779  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9780  PyObject *__pyx_r = 0;
9781  __Pyx_RefNannyDeclarations
9782  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9783  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9784 
9785  /* function exit code */
9786  __Pyx_RefNannyFinishContext();
9787  return __pyx_r;
9788  }
9789 
9790  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9791  PyObject *__pyx_r = NULL;
9792  __Pyx_RefNannyDeclarations
9793  PyObject *__pyx_t_1 = NULL;
9794  PyObject *__pyx_t_2 = NULL;
9795  __Pyx_RefNannySetupContext("even", 0);
9796 
9797  /* "PyClical.pyx":1067
9798  * 1+{1,2}
9799  * """
9800  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9801  *
9802  * def odd(self):
9803  */
9804  __Pyx_XDECREF(__pyx_r);
9805  __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)
9806  __Pyx_GOTREF(__pyx_t_1);
9807  __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)
9808  __Pyx_GOTREF(__pyx_t_2);
9809  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9810  __pyx_r = __pyx_t_2;
9811  __pyx_t_2 = 0;
9812  goto __pyx_L0;
9813 
9814  /* "PyClical.pyx":1060
9815  * return clifford().wrap( self.instance.pure() )
9816  *
9817  * def even(self): # <<<<<<<<<<<<<<
9818  * """
9819  * Even part of multivector, sum of even grade terms.
9820  */
9821 
9822  /* function exit code */
9823  __pyx_L1_error:;
9824  __Pyx_XDECREF(__pyx_t_1);
9825  __Pyx_XDECREF(__pyx_t_2);
9826  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9827  __pyx_r = NULL;
9828  __pyx_L0:;
9829  __Pyx_XGIVEREF(__pyx_r);
9830  __Pyx_RefNannyFinishContext();
9831  return __pyx_r;
9832  }
9833 
9834  /* "PyClical.pyx":1069
9835  * return clifford().wrap( self.instance.even() )
9836  *
9837  * def odd(self): # <<<<<<<<<<<<<<
9838  * """
9839  * Odd part of multivector, sum of odd grade terms.
9840  */
9841 
9842  /* Python wrapper */
9843  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9844  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 ";
9845  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9846  PyObject *__pyx_r = 0;
9847  __Pyx_RefNannyDeclarations
9848  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9849  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9850 
9851  /* function exit code */
9852  __Pyx_RefNannyFinishContext();
9853  return __pyx_r;
9854  }
9855 
9856  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9857  PyObject *__pyx_r = NULL;
9858  __Pyx_RefNannyDeclarations
9859  PyObject *__pyx_t_1 = NULL;
9860  PyObject *__pyx_t_2 = NULL;
9861  __Pyx_RefNannySetupContext("odd", 0);
9862 
9863  /* "PyClical.pyx":1076
9864  * {1}
9865  * """
9866  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9867  *
9868  * def vector_part(self, frm = None):
9869  */
9870  __Pyx_XDECREF(__pyx_r);
9871  __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)
9872  __Pyx_GOTREF(__pyx_t_1);
9873  __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)
9874  __Pyx_GOTREF(__pyx_t_2);
9875  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9876  __pyx_r = __pyx_t_2;
9877  __pyx_t_2 = 0;
9878  goto __pyx_L0;
9879 
9880  /* "PyClical.pyx":1069
9881  * return clifford().wrap( self.instance.even() )
9882  *
9883  * def odd(self): # <<<<<<<<<<<<<<
9884  * """
9885  * Odd part of multivector, sum of odd grade terms.
9886  */
9887 
9888  /* function exit code */
9889  __pyx_L1_error:;
9890  __Pyx_XDECREF(__pyx_t_1);
9891  __Pyx_XDECREF(__pyx_t_2);
9892  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9893  __pyx_r = NULL;
9894  __pyx_L0:;
9895  __Pyx_XGIVEREF(__pyx_r);
9896  __Pyx_RefNannyFinishContext();
9897  return __pyx_r;
9898  }
9899 
9900  /* "PyClical.pyx":1078
9901  * return clifford().wrap( self.instance.odd() )
9902  *
9903  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9904  * """
9905  * Vector part of multivector, as a Python list, with respect to frm.
9906  */
9907 
9908  /* Python wrapper */
9909  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9910  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 ";
9911  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9912  PyObject *__pyx_v_frm = 0;
9913  PyObject *__pyx_r = 0;
9914  __Pyx_RefNannyDeclarations
9915  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9916  {
9917  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9918  PyObject* values[1] = {0};
9919  values[0] = ((PyObject *)Py_None);
9920  if (unlikely(__pyx_kwds)) {
9921  Py_ssize_t kw_args;
9922  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9923  switch (pos_args) {
9924  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9925  CYTHON_FALLTHROUGH;
9926  case 0: break;
9927  default: goto __pyx_L5_argtuple_error;
9928  }
9929  kw_args = PyDict_Size(__pyx_kwds);
9930  switch (pos_args) {
9931  case 0:
9932  if (kw_args > 0) {
9933  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9934  if (value) { values[0] = value; kw_args--; }
9935  }
9936  }
9937  if (unlikely(kw_args > 0)) {
9938  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9939  }
9940  } else {
9941  switch (PyTuple_GET_SIZE(__pyx_args)) {
9942  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9943  CYTHON_FALLTHROUGH;
9944  case 0: break;
9945  default: goto __pyx_L5_argtuple_error;
9946  }
9947  }
9948  __pyx_v_frm = values[0];
9949  }
9950  goto __pyx_L4_argument_unpacking_done;
9951  __pyx_L5_argtuple_error:;
9952  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9953  __pyx_L3_error:;
9954  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9955  __Pyx_RefNannyFinishContext();
9956  return NULL;
9957  __pyx_L4_argument_unpacking_done:;
9958  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9959 
9960  /* function exit code */
9961  __Pyx_RefNannyFinishContext();
9962  return __pyx_r;
9963  }
9964 
9965  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9966  PyObject *__pyx_v_error_msg_prefix = NULL;
9967  std::vector<scalar_t> __pyx_v_vec;
9968  int __pyx_v_n;
9969  int __pyx_v_i;
9970  PyObject *__pyx_v_lst = NULL;
9971  PyObject *__pyx_v_err = NULL;
9972  PyObject *__pyx_r = NULL;
9973  __Pyx_RefNannyDeclarations
9974  PyObject *__pyx_t_1 = NULL;
9975  PyObject *__pyx_t_2 = NULL;
9976  PyObject *__pyx_t_3 = NULL;
9977  int __pyx_t_4;
9978  int __pyx_t_5;
9979  std::vector<scalar_t> __pyx_t_6;
9980  PyObject *__pyx_t_7 = NULL;
9981  int __pyx_t_8;
9982  int __pyx_t_9;
9983  PyObject *__pyx_t_10 = NULL;
9984  PyObject *__pyx_t_11 = NULL;
9985  PyObject *__pyx_t_12 = NULL;
9986  PyObject *__pyx_t_13 = NULL;
9987  PyObject *__pyx_t_14 = NULL;
9988  __Pyx_RefNannySetupContext("vector_part", 0);
9989 
9990  /* "PyClical.pyx":1087
9991  * [0.0, 2.0, 3.0]
9992  * """
9993  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9994  * cdef vector[scalar_t] vec
9995  * cdef int n
9996  */
9997  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9998  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9999 
10000  /* "PyClical.pyx":1091
10001  * cdef int n
10002  * cdef int i
10003  * try: # <<<<<<<<<<<<<<
10004  * if frm is None:
10005  * vec = self.instance.vector_part()
10006  */
10007  {
10008  __Pyx_PyThreadState_declare
10009  __Pyx_PyThreadState_assign
10010  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10011  __Pyx_XGOTREF(__pyx_t_1);
10012  __Pyx_XGOTREF(__pyx_t_2);
10013  __Pyx_XGOTREF(__pyx_t_3);
10014  /*try:*/ {
10015 
10016  /* "PyClical.pyx":1092
10017  * cdef int i
10018  * try:
10019  * if frm is None: # <<<<<<<<<<<<<<
10020  * vec = self.instance.vector_part()
10021  * else:
10022  */
10023  __pyx_t_4 = (__pyx_v_frm == Py_None);
10024  __pyx_t_5 = (__pyx_t_4 != 0);
10025  if (__pyx_t_5) {
10026 
10027  /* "PyClical.pyx":1093
10028  * try:
10029  * if frm is None:
10030  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10031  * else:
10032  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10033  */
10034  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10035  __pyx_v_vec = __pyx_t_6;
10036 
10037  /* "PyClical.pyx":1092
10038  * cdef int i
10039  * try:
10040  * if frm is None: # <<<<<<<<<<<<<<
10041  * vec = self.instance.vector_part()
10042  * else:
10043  */
10044  goto __pyx_L9;
10045  }
10046 
10047  /* "PyClical.pyx":1095
10048  * vec = self.instance.vector_part()
10049  * else:
10050  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10051  * n = vec.size()
10052  * lst = [0.0]*n
10053  */
10054  /*else*/ {
10055  try {
10056  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10057  } catch(...) {
10058  __Pyx_CppExn2PyErr();
10059  __PYX_ERR(0, 1095, __pyx_L3_error)
10060  }
10061  __pyx_v_vec = __pyx_t_6;
10062  }
10063  __pyx_L9:;
10064 
10065  /* "PyClical.pyx":1096
10066  * else:
10067  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10068  * n = vec.size() # <<<<<<<<<<<<<<
10069  * lst = [0.0]*n
10070  * for i in xrange(n):
10071  */
10072  __pyx_v_n = __pyx_v_vec.size();
10073 
10074  /* "PyClical.pyx":1097
10075  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10076  * n = vec.size()
10077  * lst = [0.0]*n # <<<<<<<<<<<<<<
10078  * for i in xrange(n):
10079  * lst[i] = vec[i]
10080  */
10081  __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)
10082  __Pyx_GOTREF(__pyx_t_7);
10083  { Py_ssize_t __pyx_temp;
10084  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10085  __Pyx_INCREF(__pyx_float_0_0);
10086  __Pyx_GIVEREF(__pyx_float_0_0);
10087  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10088  }
10089  }
10090  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10091  __pyx_t_7 = 0;
10092 
10093  /* "PyClical.pyx":1098
10094  * n = vec.size()
10095  * lst = [0.0]*n
10096  * for i in xrange(n): # <<<<<<<<<<<<<<
10097  * lst[i] = vec[i]
10098  * return lst
10099  */
10100  __pyx_t_8 = __pyx_v_n;
10101  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
10102  __pyx_v_i = __pyx_t_9;
10103 
10104  /* "PyClical.pyx":1099
10105  * lst = [0.0]*n
10106  * for i in xrange(n):
10107  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10108  * return lst
10109  * except RuntimeError as err:
10110  */
10111  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10112  __Pyx_GOTREF(__pyx_t_7);
10113  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)
10114  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10115  }
10116 
10117  /* "PyClical.pyx":1100
10118  * for i in xrange(n):
10119  * lst[i] = vec[i]
10120  * return lst # <<<<<<<<<<<<<<
10121  * except RuntimeError as err:
10122  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10123  */
10124  __Pyx_XDECREF(__pyx_r);
10125  __Pyx_INCREF(__pyx_v_lst);
10126  __pyx_r = __pyx_v_lst;
10127  goto __pyx_L7_try_return;
10128 
10129  /* "PyClical.pyx":1091
10130  * cdef int n
10131  * cdef int i
10132  * try: # <<<<<<<<<<<<<<
10133  * if frm is None:
10134  * vec = self.instance.vector_part()
10135  */
10136  }
10137  __pyx_L3_error:;
10138  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10139 
10140  /* "PyClical.pyx":1101
10141  * lst[i] = vec[i]
10142  * return lst
10143  * except RuntimeError as err: # <<<<<<<<<<<<<<
10144  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10145  * + repr(frm) + " as frame:\n\t"
10146  */
10147  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10148  if (__pyx_t_8) {
10149  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10150  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10151  __Pyx_GOTREF(__pyx_t_7);
10152  __Pyx_GOTREF(__pyx_t_10);
10153  __Pyx_GOTREF(__pyx_t_11);
10154  __Pyx_INCREF(__pyx_t_10);
10155  __pyx_v_err = __pyx_t_10;
10156 
10157  /* "PyClical.pyx":1102
10158  * return lst
10159  * except RuntimeError as err:
10160  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10161  * + repr(frm) + " as frame:\n\t"
10162  * + str(err))
10163  */
10164  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10165  __Pyx_GOTREF(__pyx_t_12);
10166  __Pyx_INCREF(((PyObject *)__pyx_v_self));
10167  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
10168  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
10169  __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)
10170  __Pyx_GOTREF(__pyx_t_13);
10171  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10172  __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)
10173  __Pyx_GOTREF(__pyx_t_12);
10174  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10175  __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)
10176  __Pyx_GOTREF(__pyx_t_13);
10177  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10178 
10179  /* "PyClical.pyx":1103
10180  * except RuntimeError as err:
10181  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10182  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10183  * + str(err))
10184  *
10185  */
10186  __pyx_t_12 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10187  __Pyx_GOTREF(__pyx_t_12);
10188  __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10189  __Pyx_GOTREF(__pyx_t_14);
10190  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10191  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10192  __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)
10193  __Pyx_GOTREF(__pyx_t_12);
10194  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10195 
10196  /* "PyClical.pyx":1104
10197  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10198  * + repr(frm) + " as frame:\n\t"
10199  * + str(err)) # <<<<<<<<<<<<<<
10200  *
10201  * def involute(self):
10202  */
10203  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10204  __Pyx_GOTREF(__pyx_t_14);
10205  __Pyx_INCREF(__pyx_v_err);
10206  __Pyx_GIVEREF(__pyx_v_err);
10207  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
10208  __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)
10209  __Pyx_GOTREF(__pyx_t_13);
10210  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10211  __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10212  __Pyx_GOTREF(__pyx_t_14);
10213  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10214  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10215 
10216  /* "PyClical.pyx":1102
10217  * return lst
10218  * except RuntimeError as err:
10219  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10220  * + repr(frm) + " as frame:\n\t"
10221  * + str(err))
10222  */
10223  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10224  __Pyx_GOTREF(__pyx_t_13);
10225  __Pyx_GIVEREF(__pyx_t_14);
10226  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
10227  __pyx_t_14 = 0;
10228  __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)
10229  __Pyx_GOTREF(__pyx_t_14);
10230  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10231  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
10232  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10233  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10234  }
10235  goto __pyx_L5_except_error;
10236  __pyx_L5_except_error:;
10237 
10238  /* "PyClical.pyx":1091
10239  * cdef int n
10240  * cdef int i
10241  * try: # <<<<<<<<<<<<<<
10242  * if frm is None:
10243  * vec = self.instance.vector_part()
10244  */
10245  __Pyx_XGIVEREF(__pyx_t_1);
10246  __Pyx_XGIVEREF(__pyx_t_2);
10247  __Pyx_XGIVEREF(__pyx_t_3);
10248  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10249  goto __pyx_L1_error;
10250  __pyx_L7_try_return:;
10251  __Pyx_XGIVEREF(__pyx_t_1);
10252  __Pyx_XGIVEREF(__pyx_t_2);
10253  __Pyx_XGIVEREF(__pyx_t_3);
10254  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10255  goto __pyx_L0;
10256  }
10257 
10258  /* "PyClical.pyx":1078
10259  * return clifford().wrap( self.instance.odd() )
10260  *
10261  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10262  * """
10263  * Vector part of multivector, as a Python list, with respect to frm.
10264  */
10265 
10266  /* function exit code */
10267  __pyx_L1_error:;
10268  __Pyx_XDECREF(__pyx_t_7);
10269  __Pyx_XDECREF(__pyx_t_10);
10270  __Pyx_XDECREF(__pyx_t_11);
10271  __Pyx_XDECREF(__pyx_t_12);
10272  __Pyx_XDECREF(__pyx_t_13);
10273  __Pyx_XDECREF(__pyx_t_14);
10274  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10275  __pyx_r = NULL;
10276  __pyx_L0:;
10277  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10278  __Pyx_XDECREF(__pyx_v_lst);
10279  __Pyx_XDECREF(__pyx_v_err);
10280  __Pyx_XGIVEREF(__pyx_r);
10281  __Pyx_RefNannyFinishContext();
10282  return __pyx_r;
10283  }
10284 
10285  /* "PyClical.pyx":1106
10286  * + str(err))
10287  *
10288  * def involute(self): # <<<<<<<<<<<<<<
10289  * """
10290  * Main involution, each {i} is replaced by -{i} in each term,
10291  */
10292 
10293  /* Python wrapper */
10294  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10295  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 ";
10296  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10297  PyObject *__pyx_r = 0;
10298  __Pyx_RefNannyDeclarations
10299  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10300  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10301 
10302  /* function exit code */
10303  __Pyx_RefNannyFinishContext();
10304  return __pyx_r;
10305  }
10306 
10307  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10308  PyObject *__pyx_r = NULL;
10309  __Pyx_RefNannyDeclarations
10310  PyObject *__pyx_t_1 = NULL;
10311  PyObject *__pyx_t_2 = NULL;
10312  __Pyx_RefNannySetupContext("involute", 0);
10313 
10314  /* "PyClical.pyx":1120
10315  * 1-{1}+{1,2}
10316  * """
10317  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10318  *
10319  * def reverse(self):
10320  */
10321  __Pyx_XDECREF(__pyx_r);
10322  __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)
10323  __Pyx_GOTREF(__pyx_t_1);
10324  __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)
10325  __Pyx_GOTREF(__pyx_t_2);
10326  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10327  __pyx_r = __pyx_t_2;
10328  __pyx_t_2 = 0;
10329  goto __pyx_L0;
10330 
10331  /* "PyClical.pyx":1106
10332  * + str(err))
10333  *
10334  * def involute(self): # <<<<<<<<<<<<<<
10335  * """
10336  * Main involution, each {i} is replaced by -{i} in each term,
10337  */
10338 
10339  /* function exit code */
10340  __pyx_L1_error:;
10341  __Pyx_XDECREF(__pyx_t_1);
10342  __Pyx_XDECREF(__pyx_t_2);
10343  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10344  __pyx_r = NULL;
10345  __pyx_L0:;
10346  __Pyx_XGIVEREF(__pyx_r);
10347  __Pyx_RefNannyFinishContext();
10348  return __pyx_r;
10349  }
10350 
10351  /* "PyClical.pyx":1122
10352  * return clifford().wrap( self.instance.involute() )
10353  *
10354  * def reverse(self): # <<<<<<<<<<<<<<
10355  * """
10356  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10357  */
10358 
10359  /* Python wrapper */
10360  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10361  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 ";
10362  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10363  PyObject *__pyx_r = 0;
10364  __Pyx_RefNannyDeclarations
10365  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10366  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10367 
10368  /* function exit code */
10369  __Pyx_RefNannyFinishContext();
10370  return __pyx_r;
10371  }
10372 
10373  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10374  PyObject *__pyx_r = NULL;
10375  __Pyx_RefNannyDeclarations
10376  PyObject *__pyx_t_1 = NULL;
10377  PyObject *__pyx_t_2 = NULL;
10378  __Pyx_RefNannySetupContext("reverse", 0);
10379 
10380  /* "PyClical.pyx":1135
10381  * 1+{1}-{1,2}
10382  * """
10383  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10384  *
10385  * def conj(self):
10386  */
10387  __Pyx_XDECREF(__pyx_r);
10388  __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)
10389  __Pyx_GOTREF(__pyx_t_1);
10390  __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)
10391  __Pyx_GOTREF(__pyx_t_2);
10392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10393  __pyx_r = __pyx_t_2;
10394  __pyx_t_2 = 0;
10395  goto __pyx_L0;
10396 
10397  /* "PyClical.pyx":1122
10398  * return clifford().wrap( self.instance.involute() )
10399  *
10400  * def reverse(self): # <<<<<<<<<<<<<<
10401  * """
10402  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10403  */
10404 
10405  /* function exit code */
10406  __pyx_L1_error:;
10407  __Pyx_XDECREF(__pyx_t_1);
10408  __Pyx_XDECREF(__pyx_t_2);
10409  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10410  __pyx_r = NULL;
10411  __pyx_L0:;
10412  __Pyx_XGIVEREF(__pyx_r);
10413  __Pyx_RefNannyFinishContext();
10414  return __pyx_r;
10415  }
10416 
10417  /* "PyClical.pyx":1137
10418  * return clifford().wrap( self.instance.reverse() )
10419  *
10420  * def conj(self): # <<<<<<<<<<<<<<
10421  * """
10422  * Conjugation, reverse o involute == involute o reverse.
10423  */
10424 
10425  /* Python wrapper */
10426  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10427  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 ";
10428  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10429  PyObject *__pyx_r = 0;
10430  __Pyx_RefNannyDeclarations
10431  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10432  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10433 
10434  /* function exit code */
10435  __Pyx_RefNannyFinishContext();
10436  return __pyx_r;
10437  }
10438 
10439  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10440  PyObject *__pyx_r = NULL;
10441  __Pyx_RefNannyDeclarations
10442  PyObject *__pyx_t_1 = NULL;
10443  PyObject *__pyx_t_2 = NULL;
10444  __Pyx_RefNannySetupContext("conj", 0);
10445 
10446  /* "PyClical.pyx":1150
10447  * 1-{1}-{1,2}
10448  * """
10449  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10450  *
10451  * def quad(self):
10452  */
10453  __Pyx_XDECREF(__pyx_r);
10454  __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)
10455  __Pyx_GOTREF(__pyx_t_1);
10456  __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)
10457  __Pyx_GOTREF(__pyx_t_2);
10458  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10459  __pyx_r = __pyx_t_2;
10460  __pyx_t_2 = 0;
10461  goto __pyx_L0;
10462 
10463  /* "PyClical.pyx":1137
10464  * return clifford().wrap( self.instance.reverse() )
10465  *
10466  * def conj(self): # <<<<<<<<<<<<<<
10467  * """
10468  * Conjugation, reverse o involute == involute o reverse.
10469  */
10470 
10471  /* function exit code */
10472  __pyx_L1_error:;
10473  __Pyx_XDECREF(__pyx_t_1);
10474  __Pyx_XDECREF(__pyx_t_2);
10475  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10476  __pyx_r = NULL;
10477  __pyx_L0:;
10478  __Pyx_XGIVEREF(__pyx_r);
10479  __Pyx_RefNannyFinishContext();
10480  return __pyx_r;
10481  }
10482 
10483  /* "PyClical.pyx":1152
10484  * return clifford().wrap( self.instance.conj() )
10485  *
10486  * def quad(self): # <<<<<<<<<<<<<<
10487  * """
10488  * Quadratic form == (rev(x)*x)(0).
10489  */
10490 
10491  /* Python wrapper */
10492  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10493  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 ";
10494  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10495  PyObject *__pyx_r = 0;
10496  __Pyx_RefNannyDeclarations
10497  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10498  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10499 
10500  /* function exit code */
10501  __Pyx_RefNannyFinishContext();
10502  return __pyx_r;
10503  }
10504 
10505  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10506  PyObject *__pyx_r = NULL;
10507  __Pyx_RefNannyDeclarations
10508  PyObject *__pyx_t_1 = NULL;
10509  __Pyx_RefNannySetupContext("quad", 0);
10510 
10511  /* "PyClical.pyx":1161
10512  * 2.0
10513  * """
10514  * return self.instance.quad() # <<<<<<<<<<<<<<
10515  *
10516  * def norm(self):
10517  */
10518  __Pyx_XDECREF(__pyx_r);
10519  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10520  __Pyx_GOTREF(__pyx_t_1);
10521  __pyx_r = __pyx_t_1;
10522  __pyx_t_1 = 0;
10523  goto __pyx_L0;
10524 
10525  /* "PyClical.pyx":1152
10526  * return clifford().wrap( self.instance.conj() )
10527  *
10528  * def quad(self): # <<<<<<<<<<<<<<
10529  * """
10530  * Quadratic form == (rev(x)*x)(0).
10531  */
10532 
10533  /* function exit code */
10534  __pyx_L1_error:;
10535  __Pyx_XDECREF(__pyx_t_1);
10536  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10537  __pyx_r = NULL;
10538  __pyx_L0:;
10539  __Pyx_XGIVEREF(__pyx_r);
10540  __Pyx_RefNannyFinishContext();
10541  return __pyx_r;
10542  }
10543 
10544  /* "PyClical.pyx":1163
10545  * return self.instance.quad()
10546  *
10547  * def norm(self): # <<<<<<<<<<<<<<
10548  * """
10549  * Norm == sum of squares of coordinates.
10550  */
10551 
10552  /* Python wrapper */
10553  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10554  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 ";
10555  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10556  PyObject *__pyx_r = 0;
10557  __Pyx_RefNannyDeclarations
10558  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10559  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10560 
10561  /* function exit code */
10562  __Pyx_RefNannyFinishContext();
10563  return __pyx_r;
10564  }
10565 
10566  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10567  PyObject *__pyx_r = NULL;
10568  __Pyx_RefNannyDeclarations
10569  PyObject *__pyx_t_1 = NULL;
10570  __Pyx_RefNannySetupContext("norm", 0);
10571 
10572  /* "PyClical.pyx":1172
10573  * 4.0
10574  * """
10575  * return self.instance.norm() # <<<<<<<<<<<<<<
10576  *
10577  * def abs(self):
10578  */
10579  __Pyx_XDECREF(__pyx_r);
10580  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10581  __Pyx_GOTREF(__pyx_t_1);
10582  __pyx_r = __pyx_t_1;
10583  __pyx_t_1 = 0;
10584  goto __pyx_L0;
10585 
10586  /* "PyClical.pyx":1163
10587  * return self.instance.quad()
10588  *
10589  * def norm(self): # <<<<<<<<<<<<<<
10590  * """
10591  * Norm == sum of squares of coordinates.
10592  */
10593 
10594  /* function exit code */
10595  __pyx_L1_error:;
10596  __Pyx_XDECREF(__pyx_t_1);
10597  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10598  __pyx_r = NULL;
10599  __pyx_L0:;
10600  __Pyx_XGIVEREF(__pyx_r);
10601  __Pyx_RefNannyFinishContext();
10602  return __pyx_r;
10603  }
10604 
10605  /* "PyClical.pyx":1174
10606  * return self.instance.norm()
10607  *
10608  * def abs(self): # <<<<<<<<<<<<<<
10609  * """
10610  * Absolute value: square root of norm.
10611  */
10612 
10613  /* Python wrapper */
10614  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10615  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 ";
10616  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10617  PyObject *__pyx_r = 0;
10618  __Pyx_RefNannyDeclarations
10619  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10620  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10621 
10622  /* function exit code */
10623  __Pyx_RefNannyFinishContext();
10624  return __pyx_r;
10625  }
10626 
10627  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10628  PyObject *__pyx_r = NULL;
10629  __Pyx_RefNannyDeclarations
10630  PyObject *__pyx_t_1 = NULL;
10631  __Pyx_RefNannySetupContext("abs", 0);
10632 
10633  /* "PyClical.pyx":1181
10634  * 2.0
10635  * """
10636  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10637  *
10638  * def max_abs(self):
10639  */
10640  __Pyx_XDECREF(__pyx_r);
10641  __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)
10642  __Pyx_GOTREF(__pyx_t_1);
10643  __pyx_r = __pyx_t_1;
10644  __pyx_t_1 = 0;
10645  goto __pyx_L0;
10646 
10647  /* "PyClical.pyx":1174
10648  * return self.instance.norm()
10649  *
10650  * def abs(self): # <<<<<<<<<<<<<<
10651  * """
10652  * Absolute value: square root of norm.
10653  */
10654 
10655  /* function exit code */
10656  __pyx_L1_error:;
10657  __Pyx_XDECREF(__pyx_t_1);
10658  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10659  __pyx_r = NULL;
10660  __pyx_L0:;
10661  __Pyx_XGIVEREF(__pyx_r);
10662  __Pyx_RefNannyFinishContext();
10663  return __pyx_r;
10664  }
10665 
10666  /* "PyClical.pyx":1183
10667  * return glucat.abs( self.unwrap() )
10668  *
10669  * def max_abs(self): # <<<<<<<<<<<<<<
10670  * """
10671  * Maximum of absolute values of components of multivector: multivector infinity norm.
10672  */
10673 
10674  /* Python wrapper */
10675  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10676  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 ";
10677  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10678  PyObject *__pyx_r = 0;
10679  __Pyx_RefNannyDeclarations
10680  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10681  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10682 
10683  /* function exit code */
10684  __Pyx_RefNannyFinishContext();
10685  return __pyx_r;
10686  }
10687 
10688  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10689  PyObject *__pyx_r = NULL;
10690  __Pyx_RefNannyDeclarations
10691  PyObject *__pyx_t_1 = NULL;
10692  __Pyx_RefNannySetupContext("max_abs", 0);
10693 
10694  /* "PyClical.pyx":1192
10695  * 3.0
10696  * """
10697  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10698  *
10699  * def truncated(self, limit):
10700  */
10701  __Pyx_XDECREF(__pyx_r);
10702  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10703  __Pyx_GOTREF(__pyx_t_1);
10704  __pyx_r = __pyx_t_1;
10705  __pyx_t_1 = 0;
10706  goto __pyx_L0;
10707 
10708  /* "PyClical.pyx":1183
10709  * return glucat.abs( self.unwrap() )
10710  *
10711  * def max_abs(self): # <<<<<<<<<<<<<<
10712  * """
10713  * Maximum of absolute values of components of multivector: multivector infinity norm.
10714  */
10715 
10716  /* function exit code */
10717  __pyx_L1_error:;
10718  __Pyx_XDECREF(__pyx_t_1);
10719  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10720  __pyx_r = NULL;
10721  __pyx_L0:;
10722  __Pyx_XGIVEREF(__pyx_r);
10723  __Pyx_RefNannyFinishContext();
10724  return __pyx_r;
10725  }
10726 
10727  /* "PyClical.pyx":1194
10728  * return self.instance.max_abs()
10729  *
10730  * def truncated(self, limit): # <<<<<<<<<<<<<<
10731  * """
10732  * Remove all terms of self with relative size smaller than limit.
10733  */
10734 
10735  /* Python wrapper */
10736  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10737  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 ";
10738  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10739  PyObject *__pyx_r = 0;
10740  __Pyx_RefNannyDeclarations
10741  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10742  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10743 
10744  /* function exit code */
10745  __Pyx_RefNannyFinishContext();
10746  return __pyx_r;
10747  }
10748 
10749  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10750  PyObject *__pyx_r = NULL;
10751  __Pyx_RefNannyDeclarations
10752  PyObject *__pyx_t_1 = NULL;
10753  scalar_t __pyx_t_2;
10754  PyObject *__pyx_t_3 = NULL;
10755  __Pyx_RefNannySetupContext("truncated", 0);
10756 
10757  /* "PyClical.pyx":1203
10758  * clifford("10000+{1}")
10759  * """
10760  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10761  *
10762  * def isnan(self):
10763  */
10764  __Pyx_XDECREF(__pyx_r);
10765  __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)
10766  __Pyx_GOTREF(__pyx_t_1);
10767  __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)
10768  __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)
10769  __Pyx_GOTREF(__pyx_t_3);
10770  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10771  __pyx_r = __pyx_t_3;
10772  __pyx_t_3 = 0;
10773  goto __pyx_L0;
10774 
10775  /* "PyClical.pyx":1194
10776  * return self.instance.max_abs()
10777  *
10778  * def truncated(self, limit): # <<<<<<<<<<<<<<
10779  * """
10780  * Remove all terms of self with relative size smaller than limit.
10781  */
10782 
10783  /* function exit code */
10784  __pyx_L1_error:;
10785  __Pyx_XDECREF(__pyx_t_1);
10786  __Pyx_XDECREF(__pyx_t_3);
10787  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10788  __pyx_r = NULL;
10789  __pyx_L0:;
10790  __Pyx_XGIVEREF(__pyx_r);
10791  __Pyx_RefNannyFinishContext();
10792  return __pyx_r;
10793  }
10794 
10795  /* "PyClical.pyx":1205
10796  * return clifford().wrap( self.instance.truncated(limit) )
10797  *
10798  * def isnan(self): # <<<<<<<<<<<<<<
10799  * """
10800  * Check if a multivector contains any IEEE NaN values.
10801  */
10802 
10803  /* Python wrapper */
10804  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10805  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10806  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10807  PyObject *__pyx_r = 0;
10808  __Pyx_RefNannyDeclarations
10809  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10810  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10811 
10812  /* function exit code */
10813  __Pyx_RefNannyFinishContext();
10814  return __pyx_r;
10815  }
10816 
10817  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10818  PyObject *__pyx_r = NULL;
10819  __Pyx_RefNannyDeclarations
10820  PyObject *__pyx_t_1 = NULL;
10821  __Pyx_RefNannySetupContext("isnan", 0);
10822 
10823  /* "PyClical.pyx":1212
10824  * False
10825  * """
10826  * return self.instance.isnan() # <<<<<<<<<<<<<<
10827  *
10828  * def frame(self):
10829  */
10830  __Pyx_XDECREF(__pyx_r);
10831  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10832  __Pyx_GOTREF(__pyx_t_1);
10833  __pyx_r = __pyx_t_1;
10834  __pyx_t_1 = 0;
10835  goto __pyx_L0;
10836 
10837  /* "PyClical.pyx":1205
10838  * return clifford().wrap( self.instance.truncated(limit) )
10839  *
10840  * def isnan(self): # <<<<<<<<<<<<<<
10841  * """
10842  * Check if a multivector contains any IEEE NaN values.
10843  */
10844 
10845  /* function exit code */
10846  __pyx_L1_error:;
10847  __Pyx_XDECREF(__pyx_t_1);
10848  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10849  __pyx_r = NULL;
10850  __pyx_L0:;
10851  __Pyx_XGIVEREF(__pyx_r);
10852  __Pyx_RefNannyFinishContext();
10853  return __pyx_r;
10854  }
10855 
10856  /* "PyClical.pyx":1214
10857  * return self.instance.isnan()
10858  *
10859  * def frame(self): # <<<<<<<<<<<<<<
10860  * """
10861  * Subalgebra generated by all generators of terms of given multivector.
10862  */
10863 
10864  /* Python wrapper */
10865  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10866  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 ";
10867  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10868  PyObject *__pyx_r = 0;
10869  __Pyx_RefNannyDeclarations
10870  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10871  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10872 
10873  /* function exit code */
10874  __Pyx_RefNannyFinishContext();
10875  return __pyx_r;
10876  }
10877 
10878  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10879  PyObject *__pyx_r = NULL;
10880  __Pyx_RefNannyDeclarations
10881  PyObject *__pyx_t_1 = NULL;
10882  PyObject *__pyx_t_2 = NULL;
10883  __Pyx_RefNannySetupContext("frame", 0);
10884 
10885  /* "PyClical.pyx":1223
10886  * <type 'PyClical.index_set'>
10887  * """
10888  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10889  *
10890  * def __repr__(self):
10891  */
10892  __Pyx_XDECREF(__pyx_r);
10893  __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)
10894  __Pyx_GOTREF(__pyx_t_1);
10895  __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)
10896  __Pyx_GOTREF(__pyx_t_2);
10897  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10898  __pyx_r = __pyx_t_2;
10899  __pyx_t_2 = 0;
10900  goto __pyx_L0;
10901 
10902  /* "PyClical.pyx":1214
10903  * return self.instance.isnan()
10904  *
10905  * def frame(self): # <<<<<<<<<<<<<<
10906  * """
10907  * Subalgebra generated by all generators of terms of given multivector.
10908  */
10909 
10910  /* function exit code */
10911  __pyx_L1_error:;
10912  __Pyx_XDECREF(__pyx_t_1);
10913  __Pyx_XDECREF(__pyx_t_2);
10914  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10915  __pyx_r = NULL;
10916  __pyx_L0:;
10917  __Pyx_XGIVEREF(__pyx_r);
10918  __Pyx_RefNannyFinishContext();
10919  return __pyx_r;
10920  }
10921 
10922  /* "PyClical.pyx":1225
10923  * return index_set().wrap( self.instance.frame() )
10924  *
10925  * def __repr__(self): # <<<<<<<<<<<<<<
10926  * """
10927  * The official string representation of self.
10928  */
10929 
10930  /* Python wrapper */
10931  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10932  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 ";
10933  #if CYTHON_COMPILING_IN_CPYTHON
10934  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10935  #endif
10936  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10937  PyObject *__pyx_r = 0;
10938  __Pyx_RefNannyDeclarations
10939  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10940  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10941 
10942  /* function exit code */
10943  __Pyx_RefNannyFinishContext();
10944  return __pyx_r;
10945  }
10946 
10947  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10948  PyObject *__pyx_r = NULL;
10949  __Pyx_RefNannyDeclarations
10950  PyObject *__pyx_t_1 = NULL;
10951  __Pyx_RefNannySetupContext("__repr__", 0);
10952 
10953  /* "PyClical.pyx":1232
10954  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10955  * """
10956  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10957  *
10958  * def __str__(self):
10959  */
10960  __Pyx_XDECREF(__pyx_r);
10961  __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)
10962  __Pyx_GOTREF(__pyx_t_1);
10963  __pyx_r = __pyx_t_1;
10964  __pyx_t_1 = 0;
10965  goto __pyx_L0;
10966 
10967  /* "PyClical.pyx":1225
10968  * return index_set().wrap( self.instance.frame() )
10969  *
10970  * def __repr__(self): # <<<<<<<<<<<<<<
10971  * """
10972  * The official string representation of self.
10973  */
10974 
10975  /* function exit code */
10976  __pyx_L1_error:;
10977  __Pyx_XDECREF(__pyx_t_1);
10978  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10979  __pyx_r = NULL;
10980  __pyx_L0:;
10981  __Pyx_XGIVEREF(__pyx_r);
10982  __Pyx_RefNannyFinishContext();
10983  return __pyx_r;
10984  }
10985 
10986  /* "PyClical.pyx":1234
10987  * return clifford_to_repr( self.unwrap() ).c_str()
10988  *
10989  * def __str__(self): # <<<<<<<<<<<<<<
10990  * """
10991  * The informal string representation of self.
10992  */
10993 
10994  /* Python wrapper */
10995  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10996  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 ";
10997  #if CYTHON_COMPILING_IN_CPYTHON
10998  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10999  #endif
11000  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
11001  PyObject *__pyx_r = 0;
11002  __Pyx_RefNannyDeclarations
11003  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11004  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11005 
11006  /* function exit code */
11007  __Pyx_RefNannyFinishContext();
11008  return __pyx_r;
11009  }
11010 
11011  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11012  PyObject *__pyx_r = NULL;
11013  __Pyx_RefNannyDeclarations
11014  PyObject *__pyx_t_1 = NULL;
11015  __Pyx_RefNannySetupContext("__str__", 0);
11016 
11017  /* "PyClical.pyx":1241
11018  * '1+3{-1}+2{1,2}+4{-2,7}'
11019  * """
11020  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
11021  *
11022  * def clifford_hidden_doctests():
11023  */
11024  __Pyx_XDECREF(__pyx_r);
11025  __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)
11026  __Pyx_GOTREF(__pyx_t_1);
11027  __pyx_r = __pyx_t_1;
11028  __pyx_t_1 = 0;
11029  goto __pyx_L0;
11030 
11031  /* "PyClical.pyx":1234
11032  * return clifford_to_repr( self.unwrap() ).c_str()
11033  *
11034  * def __str__(self): # <<<<<<<<<<<<<<
11035  * """
11036  * The informal string representation of self.
11037  */
11038 
11039  /* function exit code */
11040  __pyx_L1_error:;
11041  __Pyx_XDECREF(__pyx_t_1);
11042  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11043  __pyx_r = NULL;
11044  __pyx_L0:;
11045  __Pyx_XGIVEREF(__pyx_r);
11046  __Pyx_RefNannyFinishContext();
11047  return __pyx_r;
11048  }
11049 
11050  /* "(tree fragment)":1
11051  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11052  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11053  * def __setstate_cython__(self, __pyx_state):
11054  */
11055 
11056  /* Python wrapper */
11057  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11058  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11059  PyObject *__pyx_r = 0;
11060  __Pyx_RefNannyDeclarations
11061  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11062  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11063 
11064  /* function exit code */
11065  __Pyx_RefNannyFinishContext();
11066  return __pyx_r;
11067  }
11068 
11069  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11070  PyObject *__pyx_r = NULL;
11071  __Pyx_RefNannyDeclarations
11072  PyObject *__pyx_t_1 = NULL;
11073  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11074 
11075  /* "(tree fragment)":2
11076  * def __reduce_cython__(self):
11077  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11078  * def __setstate_cython__(self, __pyx_state):
11079  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11080  */
11081  __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)
11082  __Pyx_GOTREF(__pyx_t_1);
11083  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11084  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11085  __PYX_ERR(1, 2, __pyx_L1_error)
11086 
11087  /* "(tree fragment)":1
11088  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11089  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11090  * def __setstate_cython__(self, __pyx_state):
11091  */
11092 
11093  /* function exit code */
11094  __pyx_L1_error:;
11095  __Pyx_XDECREF(__pyx_t_1);
11096  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11097  __pyx_r = NULL;
11098  __Pyx_XGIVEREF(__pyx_r);
11099  __Pyx_RefNannyFinishContext();
11100  return __pyx_r;
11101  }
11102 
11103  /* "(tree fragment)":3
11104  * def __reduce_cython__(self):
11105  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11106  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11107  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11108  */
11109 
11110  /* Python wrapper */
11111  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11112  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11113  PyObject *__pyx_r = 0;
11114  __Pyx_RefNannyDeclarations
11115  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11116  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11117 
11118  /* function exit code */
11119  __Pyx_RefNannyFinishContext();
11120  return __pyx_r;
11121  }
11122 
11123  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) {
11124  PyObject *__pyx_r = NULL;
11125  __Pyx_RefNannyDeclarations
11126  PyObject *__pyx_t_1 = NULL;
11127  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11128 
11129  /* "(tree fragment)":4
11130  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11131  * def __setstate_cython__(self, __pyx_state):
11132  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11133  */
11134  __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)
11135  __Pyx_GOTREF(__pyx_t_1);
11136  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11137  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11138  __PYX_ERR(1, 4, __pyx_L1_error)
11139 
11140  /* "(tree fragment)":3
11141  * def __reduce_cython__(self):
11142  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11143  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11144  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11145  */
11146 
11147  /* function exit code */
11148  __pyx_L1_error:;
11149  __Pyx_XDECREF(__pyx_t_1);
11150  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11151  __pyx_r = NULL;
11152  __Pyx_XGIVEREF(__pyx_r);
11153  __Pyx_RefNannyFinishContext();
11154  return __pyx_r;
11155  }
11156 
11157  /* "PyClical.pyx":1243
11158  * return clifford_to_str( self.unwrap() ).c_str()
11159  *
11160  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11161  * """
11162  * Tests for functions that Doctest cannot see.
11163  */
11164 
11165  /* Python wrapper */
11166  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11167  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 ";
11168  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};
11169  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11170  PyObject *__pyx_r = 0;
11171  __Pyx_RefNannyDeclarations
11172  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11173  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11174 
11175  /* function exit code */
11176  __Pyx_RefNannyFinishContext();
11177  return __pyx_r;
11178  }
11179 
11180  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11181  PyObject *__pyx_r = NULL;
11182  __Pyx_RefNannyDeclarations
11183  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11184 
11185  /* "PyClical.pyx":1327
11186  * True
11187  * """
11188  * return # <<<<<<<<<<<<<<
11189  *
11190  * cpdef inline inv(obj):
11191  */
11192  __Pyx_XDECREF(__pyx_r);
11193  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11194  goto __pyx_L0;
11195 
11196  /* "PyClical.pyx":1243
11197  * return clifford_to_str( self.unwrap() ).c_str()
11198  *
11199  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11200  * """
11201  * Tests for functions that Doctest cannot see.
11202  */
11203 
11204  /* function exit code */
11205  __pyx_L0:;
11206  __Pyx_XGIVEREF(__pyx_r);
11207  __Pyx_RefNannyFinishContext();
11208  return __pyx_r;
11209  }
11210 
11211  /* "PyClical.pyx":1329
11212  * return
11213  *
11214  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11215  * """
11216  * Geometric multiplicative inverse.
11217  */
11218 
11219  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11220  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11221  PyObject *__pyx_r = NULL;
11222  __Pyx_RefNannyDeclarations
11223  PyObject *__pyx_t_1 = NULL;
11224  PyObject *__pyx_t_2 = NULL;
11225  PyObject *__pyx_t_3 = NULL;
11226  __Pyx_RefNannySetupContext("inv", 0);
11227 
11228  /* "PyClical.pyx":1342
11229  * nan
11230  * """
11231  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11232  *
11233  * cpdef inline scalar(obj):
11234  */
11235  __Pyx_XDECREF(__pyx_r);
11236  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
11237  __Pyx_GOTREF(__pyx_t_2);
11238  __Pyx_INCREF(__pyx_v_obj);
11239  __Pyx_GIVEREF(__pyx_v_obj);
11240  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11241  __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)
11242  __Pyx_GOTREF(__pyx_t_3);
11243  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11244  __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)
11245  __Pyx_GOTREF(__pyx_t_2);
11246  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11247  __pyx_t_3 = NULL;
11248  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11249  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11250  if (likely(__pyx_t_3)) {
11251  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11252  __Pyx_INCREF(__pyx_t_3);
11253  __Pyx_INCREF(function);
11254  __Pyx_DECREF_SET(__pyx_t_2, function);
11255  }
11256  }
11257  if (__pyx_t_3) {
11258  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11259  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11260  } else {
11261  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11262  }
11263  __Pyx_GOTREF(__pyx_t_1);
11264  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11265  __pyx_r = __pyx_t_1;
11266  __pyx_t_1 = 0;
11267  goto __pyx_L0;
11268 
11269  /* "PyClical.pyx":1329
11270  * return
11271  *
11272  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11273  * """
11274  * Geometric multiplicative inverse.
11275  */
11276 
11277  /* function exit code */
11278  __pyx_L1_error:;
11279  __Pyx_XDECREF(__pyx_t_1);
11280  __Pyx_XDECREF(__pyx_t_2);
11281  __Pyx_XDECREF(__pyx_t_3);
11282  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11283  __pyx_r = 0;
11284  __pyx_L0:;
11285  __Pyx_XGIVEREF(__pyx_r);
11286  __Pyx_RefNannyFinishContext();
11287  return __pyx_r;
11288  }
11289 
11290  /* Python wrapper */
11291  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11292  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 ";
11293  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11294  PyObject *__pyx_r = 0;
11295  __Pyx_RefNannyDeclarations
11296  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11297  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11298 
11299  /* function exit code */
11300  __Pyx_RefNannyFinishContext();
11301  return __pyx_r;
11302  }
11303 
11304  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11305  PyObject *__pyx_r = NULL;
11306  __Pyx_RefNannyDeclarations
11307  PyObject *__pyx_t_1 = NULL;
11308  __Pyx_RefNannySetupContext("inv", 0);
11309  __Pyx_XDECREF(__pyx_r);
11310  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11311  __Pyx_GOTREF(__pyx_t_1);
11312  __pyx_r = __pyx_t_1;
11313  __pyx_t_1 = 0;
11314  goto __pyx_L0;
11315 
11316  /* function exit code */
11317  __pyx_L1_error:;
11318  __Pyx_XDECREF(__pyx_t_1);
11319  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11320  __pyx_r = NULL;
11321  __pyx_L0:;
11322  __Pyx_XGIVEREF(__pyx_r);
11323  __Pyx_RefNannyFinishContext();
11324  return __pyx_r;
11325  }
11326 
11327  /* "PyClical.pyx":1344
11328  * return clifford(obj).inv()
11329  *
11330  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11331  * """
11332  * Scalar part.
11333  */
11334 
11335  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11336  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11337  PyObject *__pyx_r = NULL;
11338  __Pyx_RefNannyDeclarations
11339  PyObject *__pyx_t_1 = NULL;
11340  PyObject *__pyx_t_2 = NULL;
11341  PyObject *__pyx_t_3 = NULL;
11342  __Pyx_RefNannySetupContext("scalar", 0);
11343 
11344  /* "PyClical.pyx":1353
11345  * 0.0
11346  * """
11347  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11348  *
11349  * cpdef inline real(obj):
11350  */
11351  __Pyx_XDECREF(__pyx_r);
11352  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
11353  __Pyx_GOTREF(__pyx_t_2);
11354  __Pyx_INCREF(__pyx_v_obj);
11355  __Pyx_GIVEREF(__pyx_v_obj);
11356  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11357  __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)
11358  __Pyx_GOTREF(__pyx_t_3);
11359  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11360  __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)
11361  __Pyx_GOTREF(__pyx_t_2);
11362  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11363  __pyx_t_3 = NULL;
11364  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11365  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11366  if (likely(__pyx_t_3)) {
11367  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11368  __Pyx_INCREF(__pyx_t_3);
11369  __Pyx_INCREF(function);
11370  __Pyx_DECREF_SET(__pyx_t_2, function);
11371  }
11372  }
11373  if (__pyx_t_3) {
11374  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11375  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11376  } else {
11377  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11378  }
11379  __Pyx_GOTREF(__pyx_t_1);
11380  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11381  __pyx_r = __pyx_t_1;
11382  __pyx_t_1 = 0;
11383  goto __pyx_L0;
11384 
11385  /* "PyClical.pyx":1344
11386  * return clifford(obj).inv()
11387  *
11388  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11389  * """
11390  * Scalar part.
11391  */
11392 
11393  /* function exit code */
11394  __pyx_L1_error:;
11395  __Pyx_XDECREF(__pyx_t_1);
11396  __Pyx_XDECREF(__pyx_t_2);
11397  __Pyx_XDECREF(__pyx_t_3);
11398  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11399  __pyx_r = 0;
11400  __pyx_L0:;
11401  __Pyx_XGIVEREF(__pyx_r);
11402  __Pyx_RefNannyFinishContext();
11403  return __pyx_r;
11404  }
11405 
11406  /* Python wrapper */
11407  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11408  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 ";
11409  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11410  PyObject *__pyx_r = 0;
11411  __Pyx_RefNannyDeclarations
11412  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11413  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11414 
11415  /* function exit code */
11416  __Pyx_RefNannyFinishContext();
11417  return __pyx_r;
11418  }
11419 
11420  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11421  PyObject *__pyx_r = NULL;
11422  __Pyx_RefNannyDeclarations
11423  PyObject *__pyx_t_1 = NULL;
11424  __Pyx_RefNannySetupContext("scalar", 0);
11425  __Pyx_XDECREF(__pyx_r);
11426  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11427  __Pyx_GOTREF(__pyx_t_1);
11428  __pyx_r = __pyx_t_1;
11429  __pyx_t_1 = 0;
11430  goto __pyx_L0;
11431 
11432  /* function exit code */
11433  __pyx_L1_error:;
11434  __Pyx_XDECREF(__pyx_t_1);
11435  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11436  __pyx_r = NULL;
11437  __pyx_L0:;
11438  __Pyx_XGIVEREF(__pyx_r);
11439  __Pyx_RefNannyFinishContext();
11440  return __pyx_r;
11441  }
11442 
11443  /* "PyClical.pyx":1355
11444  * return clifford(obj).scalar()
11445  *
11446  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11447  * """
11448  * Real part: synonym for scalar part.
11449  */
11450 
11451  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11452  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11453  PyObject *__pyx_r = NULL;
11454  __Pyx_RefNannyDeclarations
11455  PyObject *__pyx_t_1 = NULL;
11456  PyObject *__pyx_t_2 = NULL;
11457  PyObject *__pyx_t_3 = NULL;
11458  __Pyx_RefNannySetupContext("real", 0);
11459 
11460  /* "PyClical.pyx":1364
11461  * 0.0
11462  * """
11463  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11464  *
11465  * cpdef inline imag(obj):
11466  */
11467  __Pyx_XDECREF(__pyx_r);
11468  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
11469  __Pyx_GOTREF(__pyx_t_2);
11470  __Pyx_INCREF(__pyx_v_obj);
11471  __Pyx_GIVEREF(__pyx_v_obj);
11472  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11473  __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)
11474  __Pyx_GOTREF(__pyx_t_3);
11475  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11476  __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)
11477  __Pyx_GOTREF(__pyx_t_2);
11478  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11479  __pyx_t_3 = NULL;
11480  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11481  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11482  if (likely(__pyx_t_3)) {
11483  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11484  __Pyx_INCREF(__pyx_t_3);
11485  __Pyx_INCREF(function);
11486  __Pyx_DECREF_SET(__pyx_t_2, function);
11487  }
11488  }
11489  if (__pyx_t_3) {
11490  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11491  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11492  } else {
11493  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11494  }
11495  __Pyx_GOTREF(__pyx_t_1);
11496  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11497  __pyx_r = __pyx_t_1;
11498  __pyx_t_1 = 0;
11499  goto __pyx_L0;
11500 
11501  /* "PyClical.pyx":1355
11502  * return clifford(obj).scalar()
11503  *
11504  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11505  * """
11506  * Real part: synonym for scalar part.
11507  */
11508 
11509  /* function exit code */
11510  __pyx_L1_error:;
11511  __Pyx_XDECREF(__pyx_t_1);
11512  __Pyx_XDECREF(__pyx_t_2);
11513  __Pyx_XDECREF(__pyx_t_3);
11514  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11515  __pyx_r = 0;
11516  __pyx_L0:;
11517  __Pyx_XGIVEREF(__pyx_r);
11518  __Pyx_RefNannyFinishContext();
11519  return __pyx_r;
11520  }
11521 
11522  /* Python wrapper */
11523  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11524  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 ";
11525  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11526  PyObject *__pyx_r = 0;
11527  __Pyx_RefNannyDeclarations
11528  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11529  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11530 
11531  /* function exit code */
11532  __Pyx_RefNannyFinishContext();
11533  return __pyx_r;
11534  }
11535 
11536  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11537  PyObject *__pyx_r = NULL;
11538  __Pyx_RefNannyDeclarations
11539  PyObject *__pyx_t_1 = NULL;
11540  __Pyx_RefNannySetupContext("real", 0);
11541  __Pyx_XDECREF(__pyx_r);
11542  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11543  __Pyx_GOTREF(__pyx_t_1);
11544  __pyx_r = __pyx_t_1;
11545  __pyx_t_1 = 0;
11546  goto __pyx_L0;
11547 
11548  /* function exit code */
11549  __pyx_L1_error:;
11550  __Pyx_XDECREF(__pyx_t_1);
11551  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11552  __pyx_r = NULL;
11553  __pyx_L0:;
11554  __Pyx_XGIVEREF(__pyx_r);
11555  __Pyx_RefNannyFinishContext();
11556  return __pyx_r;
11557  }
11558 
11559  /* "PyClical.pyx":1366
11560  * return clifford(obj).scalar()
11561  *
11562  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11563  * """
11564  * Imaginary part: deprecated (always 0).
11565  */
11566 
11567  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11568  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11569  PyObject *__pyx_r = NULL;
11570  __Pyx_RefNannyDeclarations
11571  __Pyx_RefNannySetupContext("imag", 0);
11572 
11573  /* "PyClical.pyx":1375
11574  * 0.0
11575  * """
11576  * return 0.0 # <<<<<<<<<<<<<<
11577  *
11578  * cpdef inline pure(obj):
11579  */
11580  __Pyx_XDECREF(__pyx_r);
11581  __Pyx_INCREF(__pyx_float_0_0);
11582  __pyx_r = __pyx_float_0_0;
11583  goto __pyx_L0;
11584 
11585  /* "PyClical.pyx":1366
11586  * return clifford(obj).scalar()
11587  *
11588  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11589  * """
11590  * Imaginary part: deprecated (always 0).
11591  */
11592 
11593  /* function exit code */
11594  __pyx_L0:;
11595  __Pyx_XGIVEREF(__pyx_r);
11596  __Pyx_RefNannyFinishContext();
11597  return __pyx_r;
11598  }
11599 
11600  /* Python wrapper */
11601  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11602  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 ";
11603  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11604  PyObject *__pyx_r = 0;
11605  __Pyx_RefNannyDeclarations
11606  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11607  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11608 
11609  /* function exit code */
11610  __Pyx_RefNannyFinishContext();
11611  return __pyx_r;
11612  }
11613 
11614  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11615  PyObject *__pyx_r = NULL;
11616  __Pyx_RefNannyDeclarations
11617  PyObject *__pyx_t_1 = NULL;
11618  __Pyx_RefNannySetupContext("imag", 0);
11619  __Pyx_XDECREF(__pyx_r);
11620  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11621  __Pyx_GOTREF(__pyx_t_1);
11622  __pyx_r = __pyx_t_1;
11623  __pyx_t_1 = 0;
11624  goto __pyx_L0;
11625 
11626  /* function exit code */
11627  __pyx_L1_error:;
11628  __Pyx_XDECREF(__pyx_t_1);
11629  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11630  __pyx_r = NULL;
11631  __pyx_L0:;
11632  __Pyx_XGIVEREF(__pyx_r);
11633  __Pyx_RefNannyFinishContext();
11634  return __pyx_r;
11635  }
11636 
11637  /* "PyClical.pyx":1377
11638  * return 0.0
11639  *
11640  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11641  * """
11642  * Pure part
11643  */
11644 
11645  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11646  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11647  PyObject *__pyx_r = NULL;
11648  __Pyx_RefNannyDeclarations
11649  PyObject *__pyx_t_1 = NULL;
11650  PyObject *__pyx_t_2 = NULL;
11651  PyObject *__pyx_t_3 = NULL;
11652  __Pyx_RefNannySetupContext("pure", 0);
11653 
11654  /* "PyClical.pyx":1386
11655  * {1,2}
11656  * """
11657  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11658  *
11659  * cpdef inline even(obj):
11660  */
11661  __Pyx_XDECREF(__pyx_r);
11662  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
11663  __Pyx_GOTREF(__pyx_t_2);
11664  __Pyx_INCREF(__pyx_v_obj);
11665  __Pyx_GIVEREF(__pyx_v_obj);
11666  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11667  __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)
11668  __Pyx_GOTREF(__pyx_t_3);
11669  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11670  __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)
11671  __Pyx_GOTREF(__pyx_t_2);
11672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11673  __pyx_t_3 = NULL;
11674  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11675  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11676  if (likely(__pyx_t_3)) {
11677  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11678  __Pyx_INCREF(__pyx_t_3);
11679  __Pyx_INCREF(function);
11680  __Pyx_DECREF_SET(__pyx_t_2, function);
11681  }
11682  }
11683  if (__pyx_t_3) {
11684  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11685  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11686  } else {
11687  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11688  }
11689  __Pyx_GOTREF(__pyx_t_1);
11690  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11691  __pyx_r = __pyx_t_1;
11692  __pyx_t_1 = 0;
11693  goto __pyx_L0;
11694 
11695  /* "PyClical.pyx":1377
11696  * return 0.0
11697  *
11698  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11699  * """
11700  * Pure part
11701  */
11702 
11703  /* function exit code */
11704  __pyx_L1_error:;
11705  __Pyx_XDECREF(__pyx_t_1);
11706  __Pyx_XDECREF(__pyx_t_2);
11707  __Pyx_XDECREF(__pyx_t_3);
11708  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11709  __pyx_r = 0;
11710  __pyx_L0:;
11711  __Pyx_XGIVEREF(__pyx_r);
11712  __Pyx_RefNannyFinishContext();
11713  return __pyx_r;
11714  }
11715 
11716  /* Python wrapper */
11717  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11718  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 ";
11719  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11720  PyObject *__pyx_r = 0;
11721  __Pyx_RefNannyDeclarations
11722  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11723  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11724 
11725  /* function exit code */
11726  __Pyx_RefNannyFinishContext();
11727  return __pyx_r;
11728  }
11729 
11730  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11731  PyObject *__pyx_r = NULL;
11732  __Pyx_RefNannyDeclarations
11733  PyObject *__pyx_t_1 = NULL;
11734  __Pyx_RefNannySetupContext("pure", 0);
11735  __Pyx_XDECREF(__pyx_r);
11736  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11737  __Pyx_GOTREF(__pyx_t_1);
11738  __pyx_r = __pyx_t_1;
11739  __pyx_t_1 = 0;
11740  goto __pyx_L0;
11741 
11742  /* function exit code */
11743  __pyx_L1_error:;
11744  __Pyx_XDECREF(__pyx_t_1);
11745  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11746  __pyx_r = NULL;
11747  __pyx_L0:;
11748  __Pyx_XGIVEREF(__pyx_r);
11749  __Pyx_RefNannyFinishContext();
11750  return __pyx_r;
11751  }
11752 
11753  /* "PyClical.pyx":1388
11754  * return clifford(obj).pure()
11755  *
11756  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11757  * """
11758  * Even part of multivector, sum of even grade terms.
11759  */
11760 
11761  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11762  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11763  PyObject *__pyx_r = NULL;
11764  __Pyx_RefNannyDeclarations
11765  PyObject *__pyx_t_1 = NULL;
11766  PyObject *__pyx_t_2 = NULL;
11767  PyObject *__pyx_t_3 = NULL;
11768  __Pyx_RefNannySetupContext("even", 0);
11769 
11770  /* "PyClical.pyx":1395
11771  * 1+{1,2}
11772  * """
11773  * return clifford(obj).even() # <<<<<<<<<<<<<<
11774  *
11775  * cpdef inline odd(obj):
11776  */
11777  __Pyx_XDECREF(__pyx_r);
11778  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
11779  __Pyx_GOTREF(__pyx_t_2);
11780  __Pyx_INCREF(__pyx_v_obj);
11781  __Pyx_GIVEREF(__pyx_v_obj);
11782  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11783  __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)
11784  __Pyx_GOTREF(__pyx_t_3);
11785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11786  __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)
11787  __Pyx_GOTREF(__pyx_t_2);
11788  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11789  __pyx_t_3 = NULL;
11790  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11791  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11792  if (likely(__pyx_t_3)) {
11793  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11794  __Pyx_INCREF(__pyx_t_3);
11795  __Pyx_INCREF(function);
11796  __Pyx_DECREF_SET(__pyx_t_2, function);
11797  }
11798  }
11799  if (__pyx_t_3) {
11800  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11801  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11802  } else {
11803  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11804  }
11805  __Pyx_GOTREF(__pyx_t_1);
11806  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11807  __pyx_r = __pyx_t_1;
11808  __pyx_t_1 = 0;
11809  goto __pyx_L0;
11810 
11811  /* "PyClical.pyx":1388
11812  * return clifford(obj).pure()
11813  *
11814  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11815  * """
11816  * Even part of multivector, sum of even grade terms.
11817  */
11818 
11819  /* function exit code */
11820  __pyx_L1_error:;
11821  __Pyx_XDECREF(__pyx_t_1);
11822  __Pyx_XDECREF(__pyx_t_2);
11823  __Pyx_XDECREF(__pyx_t_3);
11824  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11825  __pyx_r = 0;
11826  __pyx_L0:;
11827  __Pyx_XGIVEREF(__pyx_r);
11828  __Pyx_RefNannyFinishContext();
11829  return __pyx_r;
11830  }
11831 
11832  /* Python wrapper */
11833  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11834  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 ";
11835  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11836  PyObject *__pyx_r = 0;
11837  __Pyx_RefNannyDeclarations
11838  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11839  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11840 
11841  /* function exit code */
11842  __Pyx_RefNannyFinishContext();
11843  return __pyx_r;
11844  }
11845 
11846  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11847  PyObject *__pyx_r = NULL;
11848  __Pyx_RefNannyDeclarations
11849  PyObject *__pyx_t_1 = NULL;
11850  __Pyx_RefNannySetupContext("even", 0);
11851  __Pyx_XDECREF(__pyx_r);
11852  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11853  __Pyx_GOTREF(__pyx_t_1);
11854  __pyx_r = __pyx_t_1;
11855  __pyx_t_1 = 0;
11856  goto __pyx_L0;
11857 
11858  /* function exit code */
11859  __pyx_L1_error:;
11860  __Pyx_XDECREF(__pyx_t_1);
11861  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11862  __pyx_r = NULL;
11863  __pyx_L0:;
11864  __Pyx_XGIVEREF(__pyx_r);
11865  __Pyx_RefNannyFinishContext();
11866  return __pyx_r;
11867  }
11868 
11869  /* "PyClical.pyx":1397
11870  * return clifford(obj).even()
11871  *
11872  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11873  * """
11874  * Odd part of multivector, sum of odd grade terms.
11875  */
11876 
11877  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11878  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11879  PyObject *__pyx_r = NULL;
11880  __Pyx_RefNannyDeclarations
11881  PyObject *__pyx_t_1 = NULL;
11882  PyObject *__pyx_t_2 = NULL;
11883  PyObject *__pyx_t_3 = NULL;
11884  __Pyx_RefNannySetupContext("odd", 0);
11885 
11886  /* "PyClical.pyx":1404
11887  * {1}
11888  * """
11889  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11890  *
11891  * cpdef inline involute(obj):
11892  */
11893  __Pyx_XDECREF(__pyx_r);
11894  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
11895  __Pyx_GOTREF(__pyx_t_2);
11896  __Pyx_INCREF(__pyx_v_obj);
11897  __Pyx_GIVEREF(__pyx_v_obj);
11898  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11899  __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)
11900  __Pyx_GOTREF(__pyx_t_3);
11901  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11902  __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)
11903  __Pyx_GOTREF(__pyx_t_2);
11904  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11905  __pyx_t_3 = NULL;
11906  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11907  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11908  if (likely(__pyx_t_3)) {
11909  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11910  __Pyx_INCREF(__pyx_t_3);
11911  __Pyx_INCREF(function);
11912  __Pyx_DECREF_SET(__pyx_t_2, function);
11913  }
11914  }
11915  if (__pyx_t_3) {
11916  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11917  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11918  } else {
11919  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11920  }
11921  __Pyx_GOTREF(__pyx_t_1);
11922  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11923  __pyx_r = __pyx_t_1;
11924  __pyx_t_1 = 0;
11925  goto __pyx_L0;
11926 
11927  /* "PyClical.pyx":1397
11928  * return clifford(obj).even()
11929  *
11930  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11931  * """
11932  * Odd part of multivector, sum of odd grade terms.
11933  */
11934 
11935  /* function exit code */
11936  __pyx_L1_error:;
11937  __Pyx_XDECREF(__pyx_t_1);
11938  __Pyx_XDECREF(__pyx_t_2);
11939  __Pyx_XDECREF(__pyx_t_3);
11940  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11941  __pyx_r = 0;
11942  __pyx_L0:;
11943  __Pyx_XGIVEREF(__pyx_r);
11944  __Pyx_RefNannyFinishContext();
11945  return __pyx_r;
11946  }
11947 
11948  /* Python wrapper */
11949  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11950  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 ";
11951  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11952  PyObject *__pyx_r = 0;
11953  __Pyx_RefNannyDeclarations
11954  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11955  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11956 
11957  /* function exit code */
11958  __Pyx_RefNannyFinishContext();
11959  return __pyx_r;
11960  }
11961 
11962  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11963  PyObject *__pyx_r = NULL;
11964  __Pyx_RefNannyDeclarations
11965  PyObject *__pyx_t_1 = NULL;
11966  __Pyx_RefNannySetupContext("odd", 0);
11967  __Pyx_XDECREF(__pyx_r);
11968  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11969  __Pyx_GOTREF(__pyx_t_1);
11970  __pyx_r = __pyx_t_1;
11971  __pyx_t_1 = 0;
11972  goto __pyx_L0;
11973 
11974  /* function exit code */
11975  __pyx_L1_error:;
11976  __Pyx_XDECREF(__pyx_t_1);
11977  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11978  __pyx_r = NULL;
11979  __pyx_L0:;
11980  __Pyx_XGIVEREF(__pyx_r);
11981  __Pyx_RefNannyFinishContext();
11982  return __pyx_r;
11983  }
11984 
11985  /* "PyClical.pyx":1406
11986  * return clifford(obj).odd()
11987  *
11988  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11989  * """
11990  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11991  */
11992 
11993  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11994  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11995  PyObject *__pyx_r = NULL;
11996  __Pyx_RefNannyDeclarations
11997  PyObject *__pyx_t_1 = NULL;
11998  PyObject *__pyx_t_2 = NULL;
11999  PyObject *__pyx_t_3 = NULL;
12000  __Pyx_RefNannySetupContext("involute", 0);
12001 
12002  /* "PyClical.pyx":1419
12003  * 1-{1}+{1,2}
12004  * """
12005  * return clifford(obj).involute() # <<<<<<<<<<<<<<
12006  *
12007  * cpdef inline reverse(obj):
12008  */
12009  __Pyx_XDECREF(__pyx_r);
12010  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
12011  __Pyx_GOTREF(__pyx_t_2);
12012  __Pyx_INCREF(__pyx_v_obj);
12013  __Pyx_GIVEREF(__pyx_v_obj);
12014  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12015  __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)
12016  __Pyx_GOTREF(__pyx_t_3);
12017  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12018  __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)
12019  __Pyx_GOTREF(__pyx_t_2);
12020  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12021  __pyx_t_3 = NULL;
12022  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12023  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12024  if (likely(__pyx_t_3)) {
12025  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12026  __Pyx_INCREF(__pyx_t_3);
12027  __Pyx_INCREF(function);
12028  __Pyx_DECREF_SET(__pyx_t_2, function);
12029  }
12030  }
12031  if (__pyx_t_3) {
12032  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
12033  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12034  } else {
12035  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
12036  }
12037  __Pyx_GOTREF(__pyx_t_1);
12038  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12039  __pyx_r = __pyx_t_1;
12040  __pyx_t_1 = 0;
12041  goto __pyx_L0;
12042 
12043  /* "PyClical.pyx":1406
12044  * return clifford(obj).odd()
12045  *
12046  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12047  * """
12048  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12049  */
12050 
12051  /* function exit code */
12052  __pyx_L1_error:;
12053  __Pyx_XDECREF(__pyx_t_1);
12054  __Pyx_XDECREF(__pyx_t_2);
12055  __Pyx_XDECREF(__pyx_t_3);
12056  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12057  __pyx_r = 0;
12058  __pyx_L0:;
12059  __Pyx_XGIVEREF(__pyx_r);
12060  __Pyx_RefNannyFinishContext();
12061  return __pyx_r;
12062  }
12063 
12064  /* Python wrapper */
12065  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12066  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 ";
12067  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12068  PyObject *__pyx_r = 0;
12069  __Pyx_RefNannyDeclarations
12070  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
12071  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
12072 
12073  /* function exit code */
12074  __Pyx_RefNannyFinishContext();
12075  return __pyx_r;
12076  }
12077 
12078  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12079  PyObject *__pyx_r = NULL;
12080  __Pyx_RefNannyDeclarations
12081  PyObject *__pyx_t_1 = NULL;
12082  __Pyx_RefNannySetupContext("involute", 0);
12083  __Pyx_XDECREF(__pyx_r);
12084  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
12085  __Pyx_GOTREF(__pyx_t_1);
12086  __pyx_r = __pyx_t_1;
12087  __pyx_t_1 = 0;
12088  goto __pyx_L0;
12089 
12090  /* function exit code */
12091  __pyx_L1_error:;
12092  __Pyx_XDECREF(__pyx_t_1);
12093  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12094  __pyx_r = NULL;
12095  __pyx_L0:;
12096  __Pyx_XGIVEREF(__pyx_r);
12097  __Pyx_RefNannyFinishContext();
12098  return __pyx_r;
12099  }
12100 
12101  /* "PyClical.pyx":1421
12102  * return clifford(obj).involute()
12103  *
12104  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12105  * """
12106  * Reversion, eg. {1}*{2} -> {2}*{1}
12107  */
12108 
12109  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12110  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12111  PyObject *__pyx_r = NULL;
12112  __Pyx_RefNannyDeclarations
12113  PyObject *__pyx_t_1 = NULL;
12114  PyObject *__pyx_t_2 = NULL;
12115  PyObject *__pyx_t_3 = NULL;
12116  __Pyx_RefNannySetupContext("reverse", 0);
12117 
12118  /* "PyClical.pyx":1434
12119  * 1+{1}-{1,2}
12120  * """
12121  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
12122  *
12123  * cpdef inline conj(obj):
12124  */
12125  __Pyx_XDECREF(__pyx_r);
12126  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
12127  __Pyx_GOTREF(__pyx_t_2);
12128  __Pyx_INCREF(__pyx_v_obj);
12129  __Pyx_GIVEREF(__pyx_v_obj);
12130  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12131  __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)
12132  __Pyx_GOTREF(__pyx_t_3);
12133  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12134  __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)
12135  __Pyx_GOTREF(__pyx_t_2);
12136  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12137  __pyx_t_3 = NULL;
12138  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12139  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12140  if (likely(__pyx_t_3)) {
12141  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12142  __Pyx_INCREF(__pyx_t_3);
12143  __Pyx_INCREF(function);
12144  __Pyx_DECREF_SET(__pyx_t_2, function);
12145  }
12146  }
12147  if (__pyx_t_3) {
12148  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12149  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12150  } else {
12151  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12152  }
12153  __Pyx_GOTREF(__pyx_t_1);
12154  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12155  __pyx_r = __pyx_t_1;
12156  __pyx_t_1 = 0;
12157  goto __pyx_L0;
12158 
12159  /* "PyClical.pyx":1421
12160  * return clifford(obj).involute()
12161  *
12162  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12163  * """
12164  * Reversion, eg. {1}*{2} -> {2}*{1}
12165  */
12166 
12167  /* function exit code */
12168  __pyx_L1_error:;
12169  __Pyx_XDECREF(__pyx_t_1);
12170  __Pyx_XDECREF(__pyx_t_2);
12171  __Pyx_XDECREF(__pyx_t_3);
12172  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12173  __pyx_r = 0;
12174  __pyx_L0:;
12175  __Pyx_XGIVEREF(__pyx_r);
12176  __Pyx_RefNannyFinishContext();
12177  return __pyx_r;
12178  }
12179 
12180  /* Python wrapper */
12181  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12182  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 ";
12183  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12184  PyObject *__pyx_r = 0;
12185  __Pyx_RefNannyDeclarations
12186  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12187  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12188 
12189  /* function exit code */
12190  __Pyx_RefNannyFinishContext();
12191  return __pyx_r;
12192  }
12193 
12194  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12195  PyObject *__pyx_r = NULL;
12196  __Pyx_RefNannyDeclarations
12197  PyObject *__pyx_t_1 = NULL;
12198  __Pyx_RefNannySetupContext("reverse", 0);
12199  __Pyx_XDECREF(__pyx_r);
12200  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12201  __Pyx_GOTREF(__pyx_t_1);
12202  __pyx_r = __pyx_t_1;
12203  __pyx_t_1 = 0;
12204  goto __pyx_L0;
12205 
12206  /* function exit code */
12207  __pyx_L1_error:;
12208  __Pyx_XDECREF(__pyx_t_1);
12209  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12210  __pyx_r = NULL;
12211  __pyx_L0:;
12212  __Pyx_XGIVEREF(__pyx_r);
12213  __Pyx_RefNannyFinishContext();
12214  return __pyx_r;
12215  }
12216 
12217  /* "PyClical.pyx":1436
12218  * return clifford(obj).reverse()
12219  *
12220  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12221  * """
12222  * Conjugation, reverse o involute == involute o reverse.
12223  */
12224 
12225  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12226  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12227  PyObject *__pyx_r = NULL;
12228  __Pyx_RefNannyDeclarations
12229  PyObject *__pyx_t_1 = NULL;
12230  PyObject *__pyx_t_2 = NULL;
12231  PyObject *__pyx_t_3 = NULL;
12232  __Pyx_RefNannySetupContext("conj", 0);
12233 
12234  /* "PyClical.pyx":1449
12235  * 1-{1}-{1,2}
12236  * """
12237  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12238  *
12239  * cpdef inline quad(obj):
12240  */
12241  __Pyx_XDECREF(__pyx_r);
12242  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
12243  __Pyx_GOTREF(__pyx_t_2);
12244  __Pyx_INCREF(__pyx_v_obj);
12245  __Pyx_GIVEREF(__pyx_v_obj);
12246  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12247  __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)
12248  __Pyx_GOTREF(__pyx_t_3);
12249  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12250  __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)
12251  __Pyx_GOTREF(__pyx_t_2);
12252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12253  __pyx_t_3 = NULL;
12254  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12255  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12256  if (likely(__pyx_t_3)) {
12257  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12258  __Pyx_INCREF(__pyx_t_3);
12259  __Pyx_INCREF(function);
12260  __Pyx_DECREF_SET(__pyx_t_2, function);
12261  }
12262  }
12263  if (__pyx_t_3) {
12264  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12265  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12266  } else {
12267  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12268  }
12269  __Pyx_GOTREF(__pyx_t_1);
12270  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12271  __pyx_r = __pyx_t_1;
12272  __pyx_t_1 = 0;
12273  goto __pyx_L0;
12274 
12275  /* "PyClical.pyx":1436
12276  * return clifford(obj).reverse()
12277  *
12278  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12279  * """
12280  * Conjugation, reverse o involute == involute o reverse.
12281  */
12282 
12283  /* function exit code */
12284  __pyx_L1_error:;
12285  __Pyx_XDECREF(__pyx_t_1);
12286  __Pyx_XDECREF(__pyx_t_2);
12287  __Pyx_XDECREF(__pyx_t_3);
12288  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12289  __pyx_r = 0;
12290  __pyx_L0:;
12291  __Pyx_XGIVEREF(__pyx_r);
12292  __Pyx_RefNannyFinishContext();
12293  return __pyx_r;
12294  }
12295 
12296  /* Python wrapper */
12297  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12298  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 ";
12299  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12300  PyObject *__pyx_r = 0;
12301  __Pyx_RefNannyDeclarations
12302  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12303  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12304 
12305  /* function exit code */
12306  __Pyx_RefNannyFinishContext();
12307  return __pyx_r;
12308  }
12309 
12310  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12311  PyObject *__pyx_r = NULL;
12312  __Pyx_RefNannyDeclarations
12313  PyObject *__pyx_t_1 = NULL;
12314  __Pyx_RefNannySetupContext("conj", 0);
12315  __Pyx_XDECREF(__pyx_r);
12316  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12317  __Pyx_GOTREF(__pyx_t_1);
12318  __pyx_r = __pyx_t_1;
12319  __pyx_t_1 = 0;
12320  goto __pyx_L0;
12321 
12322  /* function exit code */
12323  __pyx_L1_error:;
12324  __Pyx_XDECREF(__pyx_t_1);
12325  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12326  __pyx_r = NULL;
12327  __pyx_L0:;
12328  __Pyx_XGIVEREF(__pyx_r);
12329  __Pyx_RefNannyFinishContext();
12330  return __pyx_r;
12331  }
12332 
12333  /* "PyClical.pyx":1451
12334  * return clifford(obj).conj()
12335  *
12336  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12337  * """
12338  * Quadratic form == (rev(x)*x)(0).
12339  */
12340 
12341  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12342  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12343  PyObject *__pyx_r = NULL;
12344  __Pyx_RefNannyDeclarations
12345  PyObject *__pyx_t_1 = NULL;
12346  PyObject *__pyx_t_2 = NULL;
12347  PyObject *__pyx_t_3 = NULL;
12348  __Pyx_RefNannySetupContext("quad", 0);
12349 
12350  /* "PyClical.pyx":1460
12351  * 2.0
12352  * """
12353  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12354  *
12355  * cpdef inline norm(obj):
12356  */
12357  __Pyx_XDECREF(__pyx_r);
12358  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
12359  __Pyx_GOTREF(__pyx_t_2);
12360  __Pyx_INCREF(__pyx_v_obj);
12361  __Pyx_GIVEREF(__pyx_v_obj);
12362  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12363  __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)
12364  __Pyx_GOTREF(__pyx_t_3);
12365  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12366  __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)
12367  __Pyx_GOTREF(__pyx_t_2);
12368  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12369  __pyx_t_3 = NULL;
12370  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12371  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12372  if (likely(__pyx_t_3)) {
12373  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12374  __Pyx_INCREF(__pyx_t_3);
12375  __Pyx_INCREF(function);
12376  __Pyx_DECREF_SET(__pyx_t_2, function);
12377  }
12378  }
12379  if (__pyx_t_3) {
12380  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12381  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12382  } else {
12383  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12384  }
12385  __Pyx_GOTREF(__pyx_t_1);
12386  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12387  __pyx_r = __pyx_t_1;
12388  __pyx_t_1 = 0;
12389  goto __pyx_L0;
12390 
12391  /* "PyClical.pyx":1451
12392  * return clifford(obj).conj()
12393  *
12394  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12395  * """
12396  * Quadratic form == (rev(x)*x)(0).
12397  */
12398 
12399  /* function exit code */
12400  __pyx_L1_error:;
12401  __Pyx_XDECREF(__pyx_t_1);
12402  __Pyx_XDECREF(__pyx_t_2);
12403  __Pyx_XDECREF(__pyx_t_3);
12404  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12405  __pyx_r = 0;
12406  __pyx_L0:;
12407  __Pyx_XGIVEREF(__pyx_r);
12408  __Pyx_RefNannyFinishContext();
12409  return __pyx_r;
12410  }
12411 
12412  /* Python wrapper */
12413  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12414  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 ";
12415  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12416  PyObject *__pyx_r = 0;
12417  __Pyx_RefNannyDeclarations
12418  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12419  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12420 
12421  /* function exit code */
12422  __Pyx_RefNannyFinishContext();
12423  return __pyx_r;
12424  }
12425 
12426  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12427  PyObject *__pyx_r = NULL;
12428  __Pyx_RefNannyDeclarations
12429  PyObject *__pyx_t_1 = NULL;
12430  __Pyx_RefNannySetupContext("quad", 0);
12431  __Pyx_XDECREF(__pyx_r);
12432  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12433  __Pyx_GOTREF(__pyx_t_1);
12434  __pyx_r = __pyx_t_1;
12435  __pyx_t_1 = 0;
12436  goto __pyx_L0;
12437 
12438  /* function exit code */
12439  __pyx_L1_error:;
12440  __Pyx_XDECREF(__pyx_t_1);
12441  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12442  __pyx_r = NULL;
12443  __pyx_L0:;
12444  __Pyx_XGIVEREF(__pyx_r);
12445  __Pyx_RefNannyFinishContext();
12446  return __pyx_r;
12447  }
12448 
12449  /* "PyClical.pyx":1462
12450  * return clifford(obj).quad()
12451  *
12452  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12453  * """
12454  * norm == sum of squares of coordinates.
12455  */
12456 
12457  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12458  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12459  PyObject *__pyx_r = NULL;
12460  __Pyx_RefNannyDeclarations
12461  PyObject *__pyx_t_1 = NULL;
12462  PyObject *__pyx_t_2 = NULL;
12463  PyObject *__pyx_t_3 = NULL;
12464  __Pyx_RefNannySetupContext("norm", 0);
12465 
12466  /* "PyClical.pyx":1471
12467  * 4.0
12468  * """
12469  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12470  *
12471  * cpdef inline abs(obj):
12472  */
12473  __Pyx_XDECREF(__pyx_r);
12474  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
12475  __Pyx_GOTREF(__pyx_t_2);
12476  __Pyx_INCREF(__pyx_v_obj);
12477  __Pyx_GIVEREF(__pyx_v_obj);
12478  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12479  __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)
12480  __Pyx_GOTREF(__pyx_t_3);
12481  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12482  __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)
12483  __Pyx_GOTREF(__pyx_t_2);
12484  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12485  __pyx_t_3 = NULL;
12486  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12487  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12488  if (likely(__pyx_t_3)) {
12489  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12490  __Pyx_INCREF(__pyx_t_3);
12491  __Pyx_INCREF(function);
12492  __Pyx_DECREF_SET(__pyx_t_2, function);
12493  }
12494  }
12495  if (__pyx_t_3) {
12496  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12497  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12498  } else {
12499  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12500  }
12501  __Pyx_GOTREF(__pyx_t_1);
12502  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12503  __pyx_r = __pyx_t_1;
12504  __pyx_t_1 = 0;
12505  goto __pyx_L0;
12506 
12507  /* "PyClical.pyx":1462
12508  * return clifford(obj).quad()
12509  *
12510  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12511  * """
12512  * norm == sum of squares of coordinates.
12513  */
12514 
12515  /* function exit code */
12516  __pyx_L1_error:;
12517  __Pyx_XDECREF(__pyx_t_1);
12518  __Pyx_XDECREF(__pyx_t_2);
12519  __Pyx_XDECREF(__pyx_t_3);
12520  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12521  __pyx_r = 0;
12522  __pyx_L0:;
12523  __Pyx_XGIVEREF(__pyx_r);
12524  __Pyx_RefNannyFinishContext();
12525  return __pyx_r;
12526  }
12527 
12528  /* Python wrapper */
12529  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12530  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 ";
12531  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12532  PyObject *__pyx_r = 0;
12533  __Pyx_RefNannyDeclarations
12534  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12535  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12536 
12537  /* function exit code */
12538  __Pyx_RefNannyFinishContext();
12539  return __pyx_r;
12540  }
12541 
12542  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12543  PyObject *__pyx_r = NULL;
12544  __Pyx_RefNannyDeclarations
12545  PyObject *__pyx_t_1 = NULL;
12546  __Pyx_RefNannySetupContext("norm", 0);
12547  __Pyx_XDECREF(__pyx_r);
12548  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12549  __Pyx_GOTREF(__pyx_t_1);
12550  __pyx_r = __pyx_t_1;
12551  __pyx_t_1 = 0;
12552  goto __pyx_L0;
12553 
12554  /* function exit code */
12555  __pyx_L1_error:;
12556  __Pyx_XDECREF(__pyx_t_1);
12557  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12558  __pyx_r = NULL;
12559  __pyx_L0:;
12560  __Pyx_XGIVEREF(__pyx_r);
12561  __Pyx_RefNannyFinishContext();
12562  return __pyx_r;
12563  }
12564 
12565  /* "PyClical.pyx":1473
12566  * return clifford(obj).norm()
12567  *
12568  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12569  * """
12570  * Absolute value of multivector: multivector 2-norm.
12571  */
12572 
12573  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12574  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12575  PyObject *__pyx_r = NULL;
12576  __Pyx_RefNannyDeclarations
12577  PyObject *__pyx_t_1 = NULL;
12578  __Pyx_RefNannySetupContext("abs", 0);
12579 
12580  /* "PyClical.pyx":1480
12581  * 2.0
12582  * """
12583  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12584  *
12585  * cpdef inline max_abs(obj):
12586  */
12587  __Pyx_XDECREF(__pyx_r);
12588  __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)
12589  __Pyx_GOTREF(__pyx_t_1);
12590  __pyx_r = __pyx_t_1;
12591  __pyx_t_1 = 0;
12592  goto __pyx_L0;
12593 
12594  /* "PyClical.pyx":1473
12595  * return clifford(obj).norm()
12596  *
12597  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12598  * """
12599  * Absolute value of multivector: multivector 2-norm.
12600  */
12601 
12602  /* function exit code */
12603  __pyx_L1_error:;
12604  __Pyx_XDECREF(__pyx_t_1);
12605  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12606  __pyx_r = 0;
12607  __pyx_L0:;
12608  __Pyx_XGIVEREF(__pyx_r);
12609  __Pyx_RefNannyFinishContext();
12610  return __pyx_r;
12611  }
12612 
12613  /* Python wrapper */
12614  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12615  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 ";
12616  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12617  PyObject *__pyx_r = 0;
12618  __Pyx_RefNannyDeclarations
12619  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12620  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12621 
12622  /* function exit code */
12623  __Pyx_RefNannyFinishContext();
12624  return __pyx_r;
12625  }
12626 
12627  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12628  PyObject *__pyx_r = NULL;
12629  __Pyx_RefNannyDeclarations
12630  PyObject *__pyx_t_1 = NULL;
12631  __Pyx_RefNannySetupContext("abs", 0);
12632  __Pyx_XDECREF(__pyx_r);
12633  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12634  __Pyx_GOTREF(__pyx_t_1);
12635  __pyx_r = __pyx_t_1;
12636  __pyx_t_1 = 0;
12637  goto __pyx_L0;
12638 
12639  /* function exit code */
12640  __pyx_L1_error:;
12641  __Pyx_XDECREF(__pyx_t_1);
12642  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12643  __pyx_r = NULL;
12644  __pyx_L0:;
12645  __Pyx_XGIVEREF(__pyx_r);
12646  __Pyx_RefNannyFinishContext();
12647  return __pyx_r;
12648  }
12649 
12650  /* "PyClical.pyx":1482
12651  * return glucat.abs(toClifford(obj))
12652  *
12653  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12654  * """
12655  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12656  */
12657 
12658  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12659  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12660  PyObject *__pyx_r = NULL;
12661  __Pyx_RefNannyDeclarations
12662  PyObject *__pyx_t_1 = NULL;
12663  __Pyx_RefNannySetupContext("max_abs", 0);
12664 
12665  /* "PyClical.pyx":1492
12666  *
12667  * """
12668  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12669  *
12670  * cpdef inline pow(obj, m):
12671  */
12672  __Pyx_XDECREF(__pyx_r);
12673  __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)
12674  __Pyx_GOTREF(__pyx_t_1);
12675  __pyx_r = __pyx_t_1;
12676  __pyx_t_1 = 0;
12677  goto __pyx_L0;
12678 
12679  /* "PyClical.pyx":1482
12680  * return glucat.abs(toClifford(obj))
12681  *
12682  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12683  * """
12684  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12685  */
12686 
12687  /* function exit code */
12688  __pyx_L1_error:;
12689  __Pyx_XDECREF(__pyx_t_1);
12690  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12691  __pyx_r = 0;
12692  __pyx_L0:;
12693  __Pyx_XGIVEREF(__pyx_r);
12694  __Pyx_RefNannyFinishContext();
12695  return __pyx_r;
12696  }
12697 
12698  /* Python wrapper */
12699  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12700  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 ";
12701  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12702  PyObject *__pyx_r = 0;
12703  __Pyx_RefNannyDeclarations
12704  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12705  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12706 
12707  /* function exit code */
12708  __Pyx_RefNannyFinishContext();
12709  return __pyx_r;
12710  }
12711 
12712  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12713  PyObject *__pyx_r = NULL;
12714  __Pyx_RefNannyDeclarations
12715  PyObject *__pyx_t_1 = NULL;
12716  __Pyx_RefNannySetupContext("max_abs", 0);
12717  __Pyx_XDECREF(__pyx_r);
12718  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12719  __Pyx_GOTREF(__pyx_t_1);
12720  __pyx_r = __pyx_t_1;
12721  __pyx_t_1 = 0;
12722  goto __pyx_L0;
12723 
12724  /* function exit code */
12725  __pyx_L1_error:;
12726  __Pyx_XDECREF(__pyx_t_1);
12727  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12728  __pyx_r = NULL;
12729  __pyx_L0:;
12730  __Pyx_XGIVEREF(__pyx_r);
12731  __Pyx_RefNannyFinishContext();
12732  return __pyx_r;
12733  }
12734 
12735  /* "PyClical.pyx":1494
12736  * return glucat.max_abs(toClifford(obj))
12737  *
12738  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12739  * """
12740  * Integer power of multivector: obj to the m.
12741  */
12742 
12743  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12744  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12745  PyObject *__pyx_r = NULL;
12746  __Pyx_RefNannyDeclarations
12747  PyObject *__pyx_t_1 = NULL;
12748  PyObject *__pyx_t_2 = NULL;
12749  PyObject *__pyx_t_3 = NULL;
12750  PyObject *__pyx_t_4 = NULL;
12751  PyObject *__pyx_t_5 = NULL;
12752  PyObject *__pyx_t_6 = NULL;
12753  int __pyx_t_7;
12754  PyObject *__pyx_t_8 = NULL;
12755  PyObject *__pyx_t_9 = NULL;
12756  PyObject *__pyx_t_10 = NULL;
12757  PyObject *__pyx_t_11 = NULL;
12758  __Pyx_RefNannySetupContext("pow", 0);
12759 
12760  /* "PyClical.pyx":1513
12761  * 1
12762  * """
12763  * try: # <<<<<<<<<<<<<<
12764  * math.pow(obj, m)
12765  * except:
12766  */
12767  {
12768  __Pyx_PyThreadState_declare
12769  __Pyx_PyThreadState_assign
12770  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12771  __Pyx_XGOTREF(__pyx_t_1);
12772  __Pyx_XGOTREF(__pyx_t_2);
12773  __Pyx_XGOTREF(__pyx_t_3);
12774  /*try:*/ {
12775 
12776  /* "PyClical.pyx":1514
12777  * """
12778  * try:
12779  * math.pow(obj, m) # <<<<<<<<<<<<<<
12780  * except:
12781  * return clifford(obj).pow(m)
12782  */
12783  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12784  __Pyx_GOTREF(__pyx_t_5);
12785  __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)
12786  __Pyx_GOTREF(__pyx_t_6);
12787  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12788  __pyx_t_5 = NULL;
12789  __pyx_t_7 = 0;
12790  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12791  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12792  if (likely(__pyx_t_5)) {
12793  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12794  __Pyx_INCREF(__pyx_t_5);
12795  __Pyx_INCREF(function);
12796  __Pyx_DECREF_SET(__pyx_t_6, function);
12797  __pyx_t_7 = 1;
12798  }
12799  }
12800  #if CYTHON_FAST_PYCALL
12801  if (PyFunction_Check(__pyx_t_6)) {
12802  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12803  __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)
12804  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12805  __Pyx_GOTREF(__pyx_t_4);
12806  } else
12807  #endif
12808  #if CYTHON_FAST_PYCCALL
12809  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12810  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12811  __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)
12812  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12813  __Pyx_GOTREF(__pyx_t_4);
12814  } else
12815  #endif
12816  {
12817  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12818  __Pyx_GOTREF(__pyx_t_8);
12819  if (__pyx_t_5) {
12820  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12821  }
12822  __Pyx_INCREF(__pyx_v_obj);
12823  __Pyx_GIVEREF(__pyx_v_obj);
12824  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12825  __Pyx_INCREF(__pyx_v_m);
12826  __Pyx_GIVEREF(__pyx_v_m);
12827  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12828  __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)
12829  __Pyx_GOTREF(__pyx_t_4);
12830  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12831  }
12832  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12833  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12834 
12835  /* "PyClical.pyx":1513
12836  * 1
12837  * """
12838  * try: # <<<<<<<<<<<<<<
12839  * math.pow(obj, m)
12840  * except:
12841  */
12842  }
12843  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12844  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12845  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12846  goto __pyx_L8_try_end;
12847  __pyx_L3_error:;
12848  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12849  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12850  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12851  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12852 
12853  /* "PyClical.pyx":1515
12854  * try:
12855  * math.pow(obj, m)
12856  * except: # <<<<<<<<<<<<<<
12857  * return clifford(obj).pow(m)
12858  *
12859  */
12860  /*except:*/ {
12861  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12862  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12863  __Pyx_GOTREF(__pyx_t_4);
12864  __Pyx_GOTREF(__pyx_t_6);
12865  __Pyx_GOTREF(__pyx_t_8);
12866 
12867  /* "PyClical.pyx":1516
12868  * math.pow(obj, m)
12869  * except:
12870  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12871  *
12872  * cpdef inline outer_pow(obj, m):
12873  */
12874  __Pyx_XDECREF(__pyx_r);
12875  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12876  __Pyx_GOTREF(__pyx_t_9);
12877  __Pyx_INCREF(__pyx_v_obj);
12878  __Pyx_GIVEREF(__pyx_v_obj);
12879  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12880  __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)
12881  __Pyx_GOTREF(__pyx_t_10);
12882  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12883  __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)
12884  __Pyx_GOTREF(__pyx_t_9);
12885  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12886  __pyx_t_10 = NULL;
12887  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
12888  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12889  if (likely(__pyx_t_10)) {
12890  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
12891  __Pyx_INCREF(__pyx_t_10);
12892  __Pyx_INCREF(function);
12893  __Pyx_DECREF_SET(__pyx_t_9, function);
12894  }
12895  }
12896  if (!__pyx_t_10) {
12897  __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)
12898  __Pyx_GOTREF(__pyx_t_5);
12899  } else {
12900  #if CYTHON_FAST_PYCALL
12901  if (PyFunction_Check(__pyx_t_9)) {
12902  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_m};
12903  __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)
12904  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12905  __Pyx_GOTREF(__pyx_t_5);
12906  } else
12907  #endif
12908  #if CYTHON_FAST_PYCCALL
12909  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
12910  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_m};
12911  __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)
12912  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12913  __Pyx_GOTREF(__pyx_t_5);
12914  } else
12915  #endif
12916  {
12917  __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12918  __Pyx_GOTREF(__pyx_t_11);
12919  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
12920  __Pyx_INCREF(__pyx_v_m);
12921  __Pyx_GIVEREF(__pyx_v_m);
12922  PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12923  __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)
12924  __Pyx_GOTREF(__pyx_t_5);
12925  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12926  }
12927  }
12928  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12929  __pyx_r = __pyx_t_5;
12930  __pyx_t_5 = 0;
12931  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12932  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12933  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12934  goto __pyx_L6_except_return;
12935  }
12936  __pyx_L5_except_error:;
12937 
12938  /* "PyClical.pyx":1513
12939  * 1
12940  * """
12941  * try: # <<<<<<<<<<<<<<
12942  * math.pow(obj, m)
12943  * except:
12944  */
12945  __Pyx_XGIVEREF(__pyx_t_1);
12946  __Pyx_XGIVEREF(__pyx_t_2);
12947  __Pyx_XGIVEREF(__pyx_t_3);
12948  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12949  goto __pyx_L1_error;
12950  __pyx_L6_except_return:;
12951  __Pyx_XGIVEREF(__pyx_t_1);
12952  __Pyx_XGIVEREF(__pyx_t_2);
12953  __Pyx_XGIVEREF(__pyx_t_3);
12954  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12955  goto __pyx_L0;
12956  __pyx_L8_try_end:;
12957  }
12958 
12959  /* "PyClical.pyx":1494
12960  * return glucat.max_abs(toClifford(obj))
12961  *
12962  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12963  * """
12964  * Integer power of multivector: obj to the m.
12965  */
12966 
12967  /* function exit code */
12968  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12969  goto __pyx_L0;
12970  __pyx_L1_error:;
12971  __Pyx_XDECREF(__pyx_t_4);
12972  __Pyx_XDECREF(__pyx_t_5);
12973  __Pyx_XDECREF(__pyx_t_6);
12974  __Pyx_XDECREF(__pyx_t_8);
12975  __Pyx_XDECREF(__pyx_t_9);
12976  __Pyx_XDECREF(__pyx_t_10);
12977  __Pyx_XDECREF(__pyx_t_11);
12978  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12979  __pyx_r = 0;
12980  __pyx_L0:;
12981  __Pyx_XGIVEREF(__pyx_r);
12982  __Pyx_RefNannyFinishContext();
12983  return __pyx_r;
12984  }
12985 
12986  /* Python wrapper */
12987  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12988  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 ";
12989  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12990  PyObject *__pyx_v_obj = 0;
12991  PyObject *__pyx_v_m = 0;
12992  PyObject *__pyx_r = 0;
12993  __Pyx_RefNannyDeclarations
12994  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12995  {
12996  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12997  PyObject* values[2] = {0,0};
12998  if (unlikely(__pyx_kwds)) {
12999  Py_ssize_t kw_args;
13000  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13001  switch (pos_args) {
13002  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13003  CYTHON_FALLTHROUGH;
13004  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13005  CYTHON_FALLTHROUGH;
13006  case 0: break;
13007  default: goto __pyx_L5_argtuple_error;
13008  }
13009  kw_args = PyDict_Size(__pyx_kwds);
13010  switch (pos_args) {
13011  case 0:
13012  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13013  else goto __pyx_L5_argtuple_error;
13014  CYTHON_FALLTHROUGH;
13015  case 1:
13016  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13017  else {
13018  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
13019  }
13020  }
13021  if (unlikely(kw_args > 0)) {
13022  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
13023  }
13024  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13025  goto __pyx_L5_argtuple_error;
13026  } else {
13027  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13028  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13029  }
13030  __pyx_v_obj = values[0];
13031  __pyx_v_m = values[1];
13032  }
13033  goto __pyx_L4_argument_unpacking_done;
13034  __pyx_L5_argtuple_error:;
13035  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
13036  __pyx_L3_error:;
13037  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13038  __Pyx_RefNannyFinishContext();
13039  return NULL;
13040  __pyx_L4_argument_unpacking_done:;
13041  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13042 
13043  /* function exit code */
13044  __Pyx_RefNannyFinishContext();
13045  return __pyx_r;
13046  }
13047 
13048  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13049  PyObject *__pyx_r = NULL;
13050  __Pyx_RefNannyDeclarations
13051  PyObject *__pyx_t_1 = NULL;
13052  __Pyx_RefNannySetupContext("pow", 0);
13053  __Pyx_XDECREF(__pyx_r);
13054  __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)
13055  __Pyx_GOTREF(__pyx_t_1);
13056  __pyx_r = __pyx_t_1;
13057  __pyx_t_1 = 0;
13058  goto __pyx_L0;
13059 
13060  /* function exit code */
13061  __pyx_L1_error:;
13062  __Pyx_XDECREF(__pyx_t_1);
13063  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13064  __pyx_r = NULL;
13065  __pyx_L0:;
13066  __Pyx_XGIVEREF(__pyx_r);
13067  __Pyx_RefNannyFinishContext();
13068  return __pyx_r;
13069  }
13070 
13071  /* "PyClical.pyx":1518
13072  * return clifford(obj).pow(m)
13073  *
13074  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13075  * """
13076  * Outer product power of multivector.
13077  */
13078 
13079  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13080  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13081  PyObject *__pyx_r = NULL;
13082  __Pyx_RefNannyDeclarations
13083  PyObject *__pyx_t_1 = NULL;
13084  PyObject *__pyx_t_2 = NULL;
13085  PyObject *__pyx_t_3 = NULL;
13086  PyObject *__pyx_t_4 = NULL;
13087  __Pyx_RefNannySetupContext("outer_pow", 0);
13088 
13089  /* "PyClical.pyx":1525
13090  * 1+3{1}+3{1,2}
13091  * """
13092  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
13093  *
13094  * cpdef inline complexifier(obj):
13095  */
13096  __Pyx_XDECREF(__pyx_r);
13097  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
13098  __Pyx_GOTREF(__pyx_t_2);
13099  __Pyx_INCREF(__pyx_v_obj);
13100  __Pyx_GIVEREF(__pyx_v_obj);
13101  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
13102  __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)
13103  __Pyx_GOTREF(__pyx_t_3);
13104  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13105  __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)
13106  __Pyx_GOTREF(__pyx_t_2);
13107  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13108  __pyx_t_3 = NULL;
13109  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13110  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
13111  if (likely(__pyx_t_3)) {
13112  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13113  __Pyx_INCREF(__pyx_t_3);
13114  __Pyx_INCREF(function);
13115  __Pyx_DECREF_SET(__pyx_t_2, function);
13116  }
13117  }
13118  if (!__pyx_t_3) {
13119  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
13120  __Pyx_GOTREF(__pyx_t_1);
13121  } else {
13122  #if CYTHON_FAST_PYCALL
13123  if (PyFunction_Check(__pyx_t_2)) {
13124  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_m};
13125  __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)
13126  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13127  __Pyx_GOTREF(__pyx_t_1);
13128  } else
13129  #endif
13130  #if CYTHON_FAST_PYCCALL
13131  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13132  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_m};
13133  __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)
13134  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13135  __Pyx_GOTREF(__pyx_t_1);
13136  } else
13137  #endif
13138  {
13139  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
13140  __Pyx_GOTREF(__pyx_t_4);
13141  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
13142  __Pyx_INCREF(__pyx_v_m);
13143  __Pyx_GIVEREF(__pyx_v_m);
13144  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
13145  __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)
13146  __Pyx_GOTREF(__pyx_t_1);
13147  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13148  }
13149  }
13150  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13151  __pyx_r = __pyx_t_1;
13152  __pyx_t_1 = 0;
13153  goto __pyx_L0;
13154 
13155  /* "PyClical.pyx":1518
13156  * return clifford(obj).pow(m)
13157  *
13158  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13159  * """
13160  * Outer product power of multivector.
13161  */
13162 
13163  /* function exit code */
13164  __pyx_L1_error:;
13165  __Pyx_XDECREF(__pyx_t_1);
13166  __Pyx_XDECREF(__pyx_t_2);
13167  __Pyx_XDECREF(__pyx_t_3);
13168  __Pyx_XDECREF(__pyx_t_4);
13169  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13170  __pyx_r = 0;
13171  __pyx_L0:;
13172  __Pyx_XGIVEREF(__pyx_r);
13173  __Pyx_RefNannyFinishContext();
13174  return __pyx_r;
13175  }
13176 
13177  /* Python wrapper */
13178  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13179  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 ";
13180  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13181  PyObject *__pyx_v_obj = 0;
13182  PyObject *__pyx_v_m = 0;
13183  PyObject *__pyx_r = 0;
13184  __Pyx_RefNannyDeclarations
13185  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
13186  {
13187  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13188  PyObject* values[2] = {0,0};
13189  if (unlikely(__pyx_kwds)) {
13190  Py_ssize_t kw_args;
13191  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13192  switch (pos_args) {
13193  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13194  CYTHON_FALLTHROUGH;
13195  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13196  CYTHON_FALLTHROUGH;
13197  case 0: break;
13198  default: goto __pyx_L5_argtuple_error;
13199  }
13200  kw_args = PyDict_Size(__pyx_kwds);
13201  switch (pos_args) {
13202  case 0:
13203  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13204  else goto __pyx_L5_argtuple_error;
13205  CYTHON_FALLTHROUGH;
13206  case 1:
13207  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13208  else {
13209  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
13210  }
13211  }
13212  if (unlikely(kw_args > 0)) {
13213  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
13214  }
13215  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13216  goto __pyx_L5_argtuple_error;
13217  } else {
13218  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13219  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13220  }
13221  __pyx_v_obj = values[0];
13222  __pyx_v_m = values[1];
13223  }
13224  goto __pyx_L4_argument_unpacking_done;
13225  __pyx_L5_argtuple_error:;
13226  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
13227  __pyx_L3_error:;
13228  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13229  __Pyx_RefNannyFinishContext();
13230  return NULL;
13231  __pyx_L4_argument_unpacking_done:;
13232  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13233 
13234  /* function exit code */
13235  __Pyx_RefNannyFinishContext();
13236  return __pyx_r;
13237  }
13238 
13239  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13240  PyObject *__pyx_r = NULL;
13241  __Pyx_RefNannyDeclarations
13242  PyObject *__pyx_t_1 = NULL;
13243  __Pyx_RefNannySetupContext("outer_pow", 0);
13244  __Pyx_XDECREF(__pyx_r);
13245  __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)
13246  __Pyx_GOTREF(__pyx_t_1);
13247  __pyx_r = __pyx_t_1;
13248  __pyx_t_1 = 0;
13249  goto __pyx_L0;
13250 
13251  /* function exit code */
13252  __pyx_L1_error:;
13253  __Pyx_XDECREF(__pyx_t_1);
13254  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13255  __pyx_r = NULL;
13256  __pyx_L0:;
13257  __Pyx_XGIVEREF(__pyx_r);
13258  __Pyx_RefNannyFinishContext();
13259  return __pyx_r;
13260  }
13261 
13262  /* "PyClical.pyx":1527
13263  * return clifford(obj).outer_pow(m)
13264  *
13265  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13266  * """
13267  * Square root of -1 which commutes with all members of the frame of the given multivector.
13268  */
13269 
13270  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13271  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13272  PyObject *__pyx_r = NULL;
13273  __Pyx_RefNannyDeclarations
13274  PyObject *__pyx_t_1 = NULL;
13275  PyObject *__pyx_t_2 = NULL;
13276  __Pyx_RefNannySetupContext("complexifier", 0);
13277 
13278  /* "PyClical.pyx":1540
13279  * {-1}
13280  * """
13281  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13282  *
13283  * cpdef inline sqrt(obj, i = None):
13284  */
13285  __Pyx_XDECREF(__pyx_r);
13286  __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)
13287  __Pyx_GOTREF(__pyx_t_1);
13288  __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)
13289  __Pyx_GOTREF(__pyx_t_2);
13290  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13291  __pyx_r = __pyx_t_2;
13292  __pyx_t_2 = 0;
13293  goto __pyx_L0;
13294 
13295  /* "PyClical.pyx":1527
13296  * return clifford(obj).outer_pow(m)
13297  *
13298  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13299  * """
13300  * Square root of -1 which commutes with all members of the frame of the given multivector.
13301  */
13302 
13303  /* function exit code */
13304  __pyx_L1_error:;
13305  __Pyx_XDECREF(__pyx_t_1);
13306  __Pyx_XDECREF(__pyx_t_2);
13307  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13308  __pyx_r = 0;
13309  __pyx_L0:;
13310  __Pyx_XGIVEREF(__pyx_r);
13311  __Pyx_RefNannyFinishContext();
13312  return __pyx_r;
13313  }
13314 
13315  /* Python wrapper */
13316  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13317  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 ";
13318  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13319  PyObject *__pyx_r = 0;
13320  __Pyx_RefNannyDeclarations
13321  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13322  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13323 
13324  /* function exit code */
13325  __Pyx_RefNannyFinishContext();
13326  return __pyx_r;
13327  }
13328 
13329  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13330  PyObject *__pyx_r = NULL;
13331  __Pyx_RefNannyDeclarations
13332  PyObject *__pyx_t_1 = NULL;
13333  __Pyx_RefNannySetupContext("complexifier", 0);
13334  __Pyx_XDECREF(__pyx_r);
13335  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13336  __Pyx_GOTREF(__pyx_t_1);
13337  __pyx_r = __pyx_t_1;
13338  __pyx_t_1 = 0;
13339  goto __pyx_L0;
13340 
13341  /* function exit code */
13342  __pyx_L1_error:;
13343  __Pyx_XDECREF(__pyx_t_1);
13344  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13345  __pyx_r = NULL;
13346  __pyx_L0:;
13347  __Pyx_XGIVEREF(__pyx_r);
13348  __Pyx_RefNannyFinishContext();
13349  return __pyx_r;
13350  }
13351 
13352  /* "PyClical.pyx":1542
13353  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13354  *
13355  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13356  * """
13357  * Square root of multivector with optional complexifier.
13358  */
13359 
13360  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13361  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) {
13362  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13363  PyObject *__pyx_r = NULL;
13364  __Pyx_RefNannyDeclarations
13365  int __pyx_t_1;
13366  int __pyx_t_2;
13367  PyObject *__pyx_t_3 = NULL;
13368  Clifford __pyx_t_4;
13369  PyObject *__pyx_t_5 = NULL;
13370  PyObject *__pyx_t_6 = NULL;
13371  PyObject *__pyx_t_7 = NULL;
13372  PyObject *__pyx_t_8 = NULL;
13373  PyObject *__pyx_t_9 = NULL;
13374  PyObject *__pyx_t_10 = NULL;
13375  PyObject *__pyx_t_11 = NULL;
13376  __Pyx_RefNannySetupContext("sqrt", 0);
13377  if (__pyx_optional_args) {
13378  if (__pyx_optional_args->__pyx_n > 0) {
13379  __pyx_v_i = __pyx_optional_args->i;
13380  }
13381  }
13382 
13383  /* "PyClical.pyx":1557
13384  * -1
13385  * """
13386  * if not (i is None): # <<<<<<<<<<<<<<
13387  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13388  * else:
13389  */
13390  __pyx_t_1 = (__pyx_v_i != Py_None);
13391  __pyx_t_2 = (__pyx_t_1 != 0);
13392  if (__pyx_t_2) {
13393 
13394  /* "PyClical.pyx":1558
13395  * """
13396  * if not (i is None):
13397  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13398  * else:
13399  * try:
13400  */
13401  __Pyx_XDECREF(__pyx_r);
13402  __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)
13403  __Pyx_GOTREF(__pyx_t_3);
13404  try {
13405  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13406  } catch(...) {
13407  __Pyx_CppExn2PyErr();
13408  __PYX_ERR(0, 1558, __pyx_L1_error)
13409  }
13410  __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)
13411  __Pyx_GOTREF(__pyx_t_5);
13412  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13413  __pyx_r = __pyx_t_5;
13414  __pyx_t_5 = 0;
13415  goto __pyx_L0;
13416 
13417  /* "PyClical.pyx":1557
13418  * -1
13419  * """
13420  * if not (i is None): # <<<<<<<<<<<<<<
13421  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13422  * else:
13423  */
13424  }
13425 
13426  /* "PyClical.pyx":1560
13427  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13428  * else:
13429  * try: # <<<<<<<<<<<<<<
13430  * return math.sqrt(obj)
13431  * except:
13432  */
13433  /*else*/ {
13434  {
13435  __Pyx_PyThreadState_declare
13436  __Pyx_PyThreadState_assign
13437  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13438  __Pyx_XGOTREF(__pyx_t_6);
13439  __Pyx_XGOTREF(__pyx_t_7);
13440  __Pyx_XGOTREF(__pyx_t_8);
13441  /*try:*/ {
13442 
13443  /* "PyClical.pyx":1561
13444  * else:
13445  * try:
13446  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13447  * except:
13448  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13449  */
13450  __Pyx_XDECREF(__pyx_r);
13451  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13452  __Pyx_GOTREF(__pyx_t_3);
13453  __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)
13454  __Pyx_GOTREF(__pyx_t_9);
13455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13456  __pyx_t_3 = NULL;
13457  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13458  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13459  if (likely(__pyx_t_3)) {
13460  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13461  __Pyx_INCREF(__pyx_t_3);
13462  __Pyx_INCREF(function);
13463  __Pyx_DECREF_SET(__pyx_t_9, function);
13464  }
13465  }
13466  if (!__pyx_t_3) {
13467  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13468  __Pyx_GOTREF(__pyx_t_5);
13469  } else {
13470  #if CYTHON_FAST_PYCALL
13471  if (PyFunction_Check(__pyx_t_9)) {
13472  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13473  __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)
13474  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13475  __Pyx_GOTREF(__pyx_t_5);
13476  } else
13477  #endif
13478  #if CYTHON_FAST_PYCCALL
13479  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13480  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13481  __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)
13482  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13483  __Pyx_GOTREF(__pyx_t_5);
13484  } else
13485  #endif
13486  {
13487  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L4_error)
13488  __Pyx_GOTREF(__pyx_t_10);
13489  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13490  __Pyx_INCREF(__pyx_v_obj);
13491  __Pyx_GIVEREF(__pyx_v_obj);
13492  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13493  __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)
13494  __Pyx_GOTREF(__pyx_t_5);
13495  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13496  }
13497  }
13498  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13499  __pyx_r = __pyx_t_5;
13500  __pyx_t_5 = 0;
13501  goto __pyx_L8_try_return;
13502 
13503  /* "PyClical.pyx":1560
13504  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13505  * else:
13506  * try: # <<<<<<<<<<<<<<
13507  * return math.sqrt(obj)
13508  * except:
13509  */
13510  }
13511  __pyx_L4_error:;
13512  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13513  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13514  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13515  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13516 
13517  /* "PyClical.pyx":1562
13518  * try:
13519  * return math.sqrt(obj)
13520  * except: # <<<<<<<<<<<<<<
13521  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13522  *
13523  */
13524  /*except:*/ {
13525  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13526  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13527  __Pyx_GOTREF(__pyx_t_5);
13528  __Pyx_GOTREF(__pyx_t_9);
13529  __Pyx_GOTREF(__pyx_t_10);
13530 
13531  /* "PyClical.pyx":1563
13532  * return math.sqrt(obj)
13533  * except:
13534  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13535  *
13536  * cpdef inline exp(obj):
13537  */
13538  __Pyx_XDECREF(__pyx_r);
13539  __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)
13540  __Pyx_GOTREF(__pyx_t_3);
13541  __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)
13542  __Pyx_GOTREF(__pyx_t_11);
13543  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13544  __pyx_r = __pyx_t_11;
13545  __pyx_t_11 = 0;
13546  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13547  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13548  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13549  goto __pyx_L7_except_return;
13550  }
13551  __pyx_L6_except_error:;
13552 
13553  /* "PyClical.pyx":1560
13554  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13555  * else:
13556  * try: # <<<<<<<<<<<<<<
13557  * return math.sqrt(obj)
13558  * except:
13559  */
13560  __Pyx_XGIVEREF(__pyx_t_6);
13561  __Pyx_XGIVEREF(__pyx_t_7);
13562  __Pyx_XGIVEREF(__pyx_t_8);
13563  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13564  goto __pyx_L1_error;
13565  __pyx_L8_try_return:;
13566  __Pyx_XGIVEREF(__pyx_t_6);
13567  __Pyx_XGIVEREF(__pyx_t_7);
13568  __Pyx_XGIVEREF(__pyx_t_8);
13569  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13570  goto __pyx_L0;
13571  __pyx_L7_except_return:;
13572  __Pyx_XGIVEREF(__pyx_t_6);
13573  __Pyx_XGIVEREF(__pyx_t_7);
13574  __Pyx_XGIVEREF(__pyx_t_8);
13575  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13576  goto __pyx_L0;
13577  }
13578  }
13579 
13580  /* "PyClical.pyx":1542
13581  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13582  *
13583  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13584  * """
13585  * Square root of multivector with optional complexifier.
13586  */
13587 
13588  /* function exit code */
13589  __pyx_L1_error:;
13590  __Pyx_XDECREF(__pyx_t_3);
13591  __Pyx_XDECREF(__pyx_t_5);
13592  __Pyx_XDECREF(__pyx_t_9);
13593  __Pyx_XDECREF(__pyx_t_10);
13594  __Pyx_XDECREF(__pyx_t_11);
13595  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13596  __pyx_r = 0;
13597  __pyx_L0:;
13598  __Pyx_XGIVEREF(__pyx_r);
13599  __Pyx_RefNannyFinishContext();
13600  return __pyx_r;
13601  }
13602 
13603  /* Python wrapper */
13604  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13605  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 ";
13606  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13607  PyObject *__pyx_v_obj = 0;
13608  PyObject *__pyx_v_i = 0;
13609  PyObject *__pyx_r = 0;
13610  __Pyx_RefNannyDeclarations
13611  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13612  {
13613  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13614  PyObject* values[2] = {0,0};
13615  values[1] = ((PyObject *)Py_None);
13616  if (unlikely(__pyx_kwds)) {
13617  Py_ssize_t kw_args;
13618  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13619  switch (pos_args) {
13620  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13621  CYTHON_FALLTHROUGH;
13622  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13623  CYTHON_FALLTHROUGH;
13624  case 0: break;
13625  default: goto __pyx_L5_argtuple_error;
13626  }
13627  kw_args = PyDict_Size(__pyx_kwds);
13628  switch (pos_args) {
13629  case 0:
13630  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13631  else goto __pyx_L5_argtuple_error;
13632  CYTHON_FALLTHROUGH;
13633  case 1:
13634  if (kw_args > 0) {
13635  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13636  if (value) { values[1] = value; kw_args--; }
13637  }
13638  }
13639  if (unlikely(kw_args > 0)) {
13640  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13641  }
13642  } else {
13643  switch (PyTuple_GET_SIZE(__pyx_args)) {
13644  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13645  CYTHON_FALLTHROUGH;
13646  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13647  break;
13648  default: goto __pyx_L5_argtuple_error;
13649  }
13650  }
13651  __pyx_v_obj = values[0];
13652  __pyx_v_i = values[1];
13653  }
13654  goto __pyx_L4_argument_unpacking_done;
13655  __pyx_L5_argtuple_error:;
13656  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13657  __pyx_L3_error:;
13658  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13659  __Pyx_RefNannyFinishContext();
13660  return NULL;
13661  __pyx_L4_argument_unpacking_done:;
13662  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13663 
13664  /* function exit code */
13665  __Pyx_RefNannyFinishContext();
13666  return __pyx_r;
13667  }
13668 
13669  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13670  PyObject *__pyx_r = NULL;
13671  __Pyx_RefNannyDeclarations
13672  PyObject *__pyx_t_1 = NULL;
13673  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13674  __Pyx_RefNannySetupContext("sqrt", 0);
13675  __Pyx_XDECREF(__pyx_r);
13676  __pyx_t_2.__pyx_n = 1;
13677  __pyx_t_2.i = __pyx_v_i;
13678  __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)
13679  __Pyx_GOTREF(__pyx_t_1);
13680  __pyx_r = __pyx_t_1;
13681  __pyx_t_1 = 0;
13682  goto __pyx_L0;
13683 
13684  /* function exit code */
13685  __pyx_L1_error:;
13686  __Pyx_XDECREF(__pyx_t_1);
13687  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13688  __pyx_r = NULL;
13689  __pyx_L0:;
13690  __Pyx_XGIVEREF(__pyx_r);
13691  __Pyx_RefNannyFinishContext();
13692  return __pyx_r;
13693  }
13694 
13695  /* "PyClical.pyx":1565
13696  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13697  *
13698  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13699  * """
13700  * Exponential of multivector.
13701  */
13702 
13703  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13704  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13705  PyObject *__pyx_r = NULL;
13706  __Pyx_RefNannyDeclarations
13707  PyObject *__pyx_t_1 = NULL;
13708  PyObject *__pyx_t_2 = NULL;
13709  PyObject *__pyx_t_3 = NULL;
13710  PyObject *__pyx_t_4 = NULL;
13711  PyObject *__pyx_t_5 = NULL;
13712  PyObject *__pyx_t_6 = NULL;
13713  PyObject *__pyx_t_7 = NULL;
13714  PyObject *__pyx_t_8 = NULL;
13715  __Pyx_RefNannySetupContext("exp", 0);
13716 
13717  /* "PyClical.pyx":1574
13718  * {1,2}
13719  * """
13720  * try: # <<<<<<<<<<<<<<
13721  * return math.exp(obj)
13722  * except:
13723  */
13724  {
13725  __Pyx_PyThreadState_declare
13726  __Pyx_PyThreadState_assign
13727  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13728  __Pyx_XGOTREF(__pyx_t_1);
13729  __Pyx_XGOTREF(__pyx_t_2);
13730  __Pyx_XGOTREF(__pyx_t_3);
13731  /*try:*/ {
13732 
13733  /* "PyClical.pyx":1575
13734  * """
13735  * try:
13736  * return math.exp(obj) # <<<<<<<<<<<<<<
13737  * except:
13738  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13739  */
13740  __Pyx_XDECREF(__pyx_r);
13741  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13742  __Pyx_GOTREF(__pyx_t_5);
13743  __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)
13744  __Pyx_GOTREF(__pyx_t_6);
13745  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13746  __pyx_t_5 = NULL;
13747  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13748  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13749  if (likely(__pyx_t_5)) {
13750  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13751  __Pyx_INCREF(__pyx_t_5);
13752  __Pyx_INCREF(function);
13753  __Pyx_DECREF_SET(__pyx_t_6, function);
13754  }
13755  }
13756  if (!__pyx_t_5) {
13757  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13758  __Pyx_GOTREF(__pyx_t_4);
13759  } else {
13760  #if CYTHON_FAST_PYCALL
13761  if (PyFunction_Check(__pyx_t_6)) {
13762  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13763  __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)
13764  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13765  __Pyx_GOTREF(__pyx_t_4);
13766  } else
13767  #endif
13768  #if CYTHON_FAST_PYCCALL
13769  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13770  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13771  __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)
13772  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13773  __Pyx_GOTREF(__pyx_t_4);
13774  } else
13775  #endif
13776  {
13777  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L3_error)
13778  __Pyx_GOTREF(__pyx_t_7);
13779  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13780  __Pyx_INCREF(__pyx_v_obj);
13781  __Pyx_GIVEREF(__pyx_v_obj);
13782  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13783  __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)
13784  __Pyx_GOTREF(__pyx_t_4);
13785  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13786  }
13787  }
13788  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13789  __pyx_r = __pyx_t_4;
13790  __pyx_t_4 = 0;
13791  goto __pyx_L7_try_return;
13792 
13793  /* "PyClical.pyx":1574
13794  * {1,2}
13795  * """
13796  * try: # <<<<<<<<<<<<<<
13797  * return math.exp(obj)
13798  * except:
13799  */
13800  }
13801  __pyx_L3_error:;
13802  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13803  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13804  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13805  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13806 
13807  /* "PyClical.pyx":1576
13808  * try:
13809  * return math.exp(obj)
13810  * except: # <<<<<<<<<<<<<<
13811  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13812  *
13813  */
13814  /*except:*/ {
13815  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13816  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13817  __Pyx_GOTREF(__pyx_t_4);
13818  __Pyx_GOTREF(__pyx_t_6);
13819  __Pyx_GOTREF(__pyx_t_7);
13820 
13821  /* "PyClical.pyx":1577
13822  * return math.exp(obj)
13823  * except:
13824  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13825  *
13826  * cpdef inline log(obj,i = None):
13827  */
13828  __Pyx_XDECREF(__pyx_r);
13829  __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)
13830  __Pyx_GOTREF(__pyx_t_5);
13831  __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)
13832  __Pyx_GOTREF(__pyx_t_8);
13833  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13834  __pyx_r = __pyx_t_8;
13835  __pyx_t_8 = 0;
13836  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13837  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13838  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13839  goto __pyx_L6_except_return;
13840  }
13841  __pyx_L5_except_error:;
13842 
13843  /* "PyClical.pyx":1574
13844  * {1,2}
13845  * """
13846  * try: # <<<<<<<<<<<<<<
13847  * return math.exp(obj)
13848  * except:
13849  */
13850  __Pyx_XGIVEREF(__pyx_t_1);
13851  __Pyx_XGIVEREF(__pyx_t_2);
13852  __Pyx_XGIVEREF(__pyx_t_3);
13853  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13854  goto __pyx_L1_error;
13855  __pyx_L7_try_return:;
13856  __Pyx_XGIVEREF(__pyx_t_1);
13857  __Pyx_XGIVEREF(__pyx_t_2);
13858  __Pyx_XGIVEREF(__pyx_t_3);
13859  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13860  goto __pyx_L0;
13861  __pyx_L6_except_return:;
13862  __Pyx_XGIVEREF(__pyx_t_1);
13863  __Pyx_XGIVEREF(__pyx_t_2);
13864  __Pyx_XGIVEREF(__pyx_t_3);
13865  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13866  goto __pyx_L0;
13867  }
13868 
13869  /* "PyClical.pyx":1565
13870  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13871  *
13872  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13873  * """
13874  * Exponential of multivector.
13875  */
13876 
13877  /* function exit code */
13878  __pyx_L1_error:;
13879  __Pyx_XDECREF(__pyx_t_4);
13880  __Pyx_XDECREF(__pyx_t_5);
13881  __Pyx_XDECREF(__pyx_t_6);
13882  __Pyx_XDECREF(__pyx_t_7);
13883  __Pyx_XDECREF(__pyx_t_8);
13884  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13885  __pyx_r = 0;
13886  __pyx_L0:;
13887  __Pyx_XGIVEREF(__pyx_r);
13888  __Pyx_RefNannyFinishContext();
13889  return __pyx_r;
13890  }
13891 
13892  /* Python wrapper */
13893  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13894  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 ";
13895  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13896  PyObject *__pyx_r = 0;
13897  __Pyx_RefNannyDeclarations
13898  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13899  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13900 
13901  /* function exit code */
13902  __Pyx_RefNannyFinishContext();
13903  return __pyx_r;
13904  }
13905 
13906  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13907  PyObject *__pyx_r = NULL;
13908  __Pyx_RefNannyDeclarations
13909  PyObject *__pyx_t_1 = NULL;
13910  __Pyx_RefNannySetupContext("exp", 0);
13911  __Pyx_XDECREF(__pyx_r);
13912  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13913  __Pyx_GOTREF(__pyx_t_1);
13914  __pyx_r = __pyx_t_1;
13915  __pyx_t_1 = 0;
13916  goto __pyx_L0;
13917 
13918  /* function exit code */
13919  __pyx_L1_error:;
13920  __Pyx_XDECREF(__pyx_t_1);
13921  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13922  __pyx_r = NULL;
13923  __pyx_L0:;
13924  __Pyx_XGIVEREF(__pyx_r);
13925  __Pyx_RefNannyFinishContext();
13926  return __pyx_r;
13927  }
13928 
13929  /* "PyClical.pyx":1579
13930  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13931  *
13932  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13933  * """
13934  * Natural logarithm of multivector with optional complexifier.
13935  */
13936 
13937  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13938  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) {
13939  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13940  PyObject *__pyx_r = NULL;
13941  __Pyx_RefNannyDeclarations
13942  int __pyx_t_1;
13943  int __pyx_t_2;
13944  PyObject *__pyx_t_3 = NULL;
13945  Clifford __pyx_t_4;
13946  PyObject *__pyx_t_5 = NULL;
13947  PyObject *__pyx_t_6 = NULL;
13948  PyObject *__pyx_t_7 = NULL;
13949  PyObject *__pyx_t_8 = NULL;
13950  PyObject *__pyx_t_9 = NULL;
13951  PyObject *__pyx_t_10 = NULL;
13952  PyObject *__pyx_t_11 = NULL;
13953  __Pyx_RefNannySetupContext("log", 0);
13954  if (__pyx_optional_args) {
13955  if (__pyx_optional_args->__pyx_n > 0) {
13956  __pyx_v_i = __pyx_optional_args->i;
13957  }
13958  }
13959 
13960  /* "PyClical.pyx":1594
13961  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13962  * """
13963  * if not (i is None): # <<<<<<<<<<<<<<
13964  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13965  * else:
13966  */
13967  __pyx_t_1 = (__pyx_v_i != Py_None);
13968  __pyx_t_2 = (__pyx_t_1 != 0);
13969  if (__pyx_t_2) {
13970 
13971  /* "PyClical.pyx":1595
13972  * """
13973  * if not (i is None):
13974  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13975  * else:
13976  * try:
13977  */
13978  __Pyx_XDECREF(__pyx_r);
13979  __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)
13980  __Pyx_GOTREF(__pyx_t_3);
13981  try {
13982  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13983  } catch(...) {
13984  __Pyx_CppExn2PyErr();
13985  __PYX_ERR(0, 1595, __pyx_L1_error)
13986  }
13987  __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)
13988  __Pyx_GOTREF(__pyx_t_5);
13989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13990  __pyx_r = __pyx_t_5;
13991  __pyx_t_5 = 0;
13992  goto __pyx_L0;
13993 
13994  /* "PyClical.pyx":1594
13995  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13996  * """
13997  * if not (i is None): # <<<<<<<<<<<<<<
13998  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13999  * else:
14000  */
14001  }
14002 
14003  /* "PyClical.pyx":1597
14004  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14005  * else:
14006  * try: # <<<<<<<<<<<<<<
14007  * return math.log(obj)
14008  * except:
14009  */
14010  /*else*/ {
14011  {
14012  __Pyx_PyThreadState_declare
14013  __Pyx_PyThreadState_assign
14014  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14015  __Pyx_XGOTREF(__pyx_t_6);
14016  __Pyx_XGOTREF(__pyx_t_7);
14017  __Pyx_XGOTREF(__pyx_t_8);
14018  /*try:*/ {
14019 
14020  /* "PyClical.pyx":1598
14021  * else:
14022  * try:
14023  * return math.log(obj) # <<<<<<<<<<<<<<
14024  * except:
14025  * return clifford().wrap( glucat.log(toClifford(obj)) )
14026  */
14027  __Pyx_XDECREF(__pyx_r);
14028  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
14029  __Pyx_GOTREF(__pyx_t_3);
14030  __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)
14031  __Pyx_GOTREF(__pyx_t_9);
14032  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14033  __pyx_t_3 = NULL;
14034  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14035  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14036  if (likely(__pyx_t_3)) {
14037  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14038  __Pyx_INCREF(__pyx_t_3);
14039  __Pyx_INCREF(function);
14040  __Pyx_DECREF_SET(__pyx_t_9, function);
14041  }
14042  }
14043  if (!__pyx_t_3) {
14044  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
14045  __Pyx_GOTREF(__pyx_t_5);
14046  } else {
14047  #if CYTHON_FAST_PYCALL
14048  if (PyFunction_Check(__pyx_t_9)) {
14049  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14050  __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)
14051  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14052  __Pyx_GOTREF(__pyx_t_5);
14053  } else
14054  #endif
14055  #if CYTHON_FAST_PYCCALL
14056  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14057  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14058  __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)
14059  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14060  __Pyx_GOTREF(__pyx_t_5);
14061  } else
14062  #endif
14063  {
14064  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1598, __pyx_L4_error)
14065  __Pyx_GOTREF(__pyx_t_10);
14066  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14067  __Pyx_INCREF(__pyx_v_obj);
14068  __Pyx_GIVEREF(__pyx_v_obj);
14069  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14070  __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)
14071  __Pyx_GOTREF(__pyx_t_5);
14072  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14073  }
14074  }
14075  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14076  __pyx_r = __pyx_t_5;
14077  __pyx_t_5 = 0;
14078  goto __pyx_L8_try_return;
14079 
14080  /* "PyClical.pyx":1597
14081  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14082  * else:
14083  * try: # <<<<<<<<<<<<<<
14084  * return math.log(obj)
14085  * except:
14086  */
14087  }
14088  __pyx_L4_error:;
14089  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14090  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14091  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14092  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14093 
14094  /* "PyClical.pyx":1599
14095  * try:
14096  * return math.log(obj)
14097  * except: # <<<<<<<<<<<<<<
14098  * return clifford().wrap( glucat.log(toClifford(obj)) )
14099  *
14100  */
14101  /*except:*/ {
14102  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14103  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
14104  __Pyx_GOTREF(__pyx_t_5);
14105  __Pyx_GOTREF(__pyx_t_9);
14106  __Pyx_GOTREF(__pyx_t_10);
14107 
14108  /* "PyClical.pyx":1600
14109  * return math.log(obj)
14110  * except:
14111  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
14112  *
14113  * cpdef inline cos(obj,i = None):
14114  */
14115  __Pyx_XDECREF(__pyx_r);
14116  __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)
14117  __Pyx_GOTREF(__pyx_t_3);
14118  __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)
14119  __Pyx_GOTREF(__pyx_t_11);
14120  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14121  __pyx_r = __pyx_t_11;
14122  __pyx_t_11 = 0;
14123  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14124  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14125  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14126  goto __pyx_L7_except_return;
14127  }
14128  __pyx_L6_except_error:;
14129 
14130  /* "PyClical.pyx":1597
14131  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14132  * else:
14133  * try: # <<<<<<<<<<<<<<
14134  * return math.log(obj)
14135  * except:
14136  */
14137  __Pyx_XGIVEREF(__pyx_t_6);
14138  __Pyx_XGIVEREF(__pyx_t_7);
14139  __Pyx_XGIVEREF(__pyx_t_8);
14140  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14141  goto __pyx_L1_error;
14142  __pyx_L8_try_return:;
14143  __Pyx_XGIVEREF(__pyx_t_6);
14144  __Pyx_XGIVEREF(__pyx_t_7);
14145  __Pyx_XGIVEREF(__pyx_t_8);
14146  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14147  goto __pyx_L0;
14148  __pyx_L7_except_return:;
14149  __Pyx_XGIVEREF(__pyx_t_6);
14150  __Pyx_XGIVEREF(__pyx_t_7);
14151  __Pyx_XGIVEREF(__pyx_t_8);
14152  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14153  goto __pyx_L0;
14154  }
14155  }
14156 
14157  /* "PyClical.pyx":1579
14158  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14159  *
14160  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14161  * """
14162  * Natural logarithm of multivector with optional complexifier.
14163  */
14164 
14165  /* function exit code */
14166  __pyx_L1_error:;
14167  __Pyx_XDECREF(__pyx_t_3);
14168  __Pyx_XDECREF(__pyx_t_5);
14169  __Pyx_XDECREF(__pyx_t_9);
14170  __Pyx_XDECREF(__pyx_t_10);
14171  __Pyx_XDECREF(__pyx_t_11);
14172  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14173  __pyx_r = 0;
14174  __pyx_L0:;
14175  __Pyx_XGIVEREF(__pyx_r);
14176  __Pyx_RefNannyFinishContext();
14177  return __pyx_r;
14178  }
14179 
14180  /* Python wrapper */
14181  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14182  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 ";
14183  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14184  PyObject *__pyx_v_obj = 0;
14185  PyObject *__pyx_v_i = 0;
14186  PyObject *__pyx_r = 0;
14187  __Pyx_RefNannyDeclarations
14188  __Pyx_RefNannySetupContext("log (wrapper)", 0);
14189  {
14190  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14191  PyObject* values[2] = {0,0};
14192  values[1] = ((PyObject *)Py_None);
14193  if (unlikely(__pyx_kwds)) {
14194  Py_ssize_t kw_args;
14195  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14196  switch (pos_args) {
14197  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14198  CYTHON_FALLTHROUGH;
14199  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14200  CYTHON_FALLTHROUGH;
14201  case 0: break;
14202  default: goto __pyx_L5_argtuple_error;
14203  }
14204  kw_args = PyDict_Size(__pyx_kwds);
14205  switch (pos_args) {
14206  case 0:
14207  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14208  else goto __pyx_L5_argtuple_error;
14209  CYTHON_FALLTHROUGH;
14210  case 1:
14211  if (kw_args > 0) {
14212  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14213  if (value) { values[1] = value; kw_args--; }
14214  }
14215  }
14216  if (unlikely(kw_args > 0)) {
14217  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
14218  }
14219  } else {
14220  switch (PyTuple_GET_SIZE(__pyx_args)) {
14221  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14222  CYTHON_FALLTHROUGH;
14223  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14224  break;
14225  default: goto __pyx_L5_argtuple_error;
14226  }
14227  }
14228  __pyx_v_obj = values[0];
14229  __pyx_v_i = values[1];
14230  }
14231  goto __pyx_L4_argument_unpacking_done;
14232  __pyx_L5_argtuple_error:;
14233  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
14234  __pyx_L3_error:;
14235  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14236  __Pyx_RefNannyFinishContext();
14237  return NULL;
14238  __pyx_L4_argument_unpacking_done:;
14239  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14240 
14241  /* function exit code */
14242  __Pyx_RefNannyFinishContext();
14243  return __pyx_r;
14244  }
14245 
14246  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14247  PyObject *__pyx_r = NULL;
14248  __Pyx_RefNannyDeclarations
14249  PyObject *__pyx_t_1 = NULL;
14250  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14251  __Pyx_RefNannySetupContext("log", 0);
14252  __Pyx_XDECREF(__pyx_r);
14253  __pyx_t_2.__pyx_n = 1;
14254  __pyx_t_2.i = __pyx_v_i;
14255  __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)
14256  __Pyx_GOTREF(__pyx_t_1);
14257  __pyx_r = __pyx_t_1;
14258  __pyx_t_1 = 0;
14259  goto __pyx_L0;
14260 
14261  /* function exit code */
14262  __pyx_L1_error:;
14263  __Pyx_XDECREF(__pyx_t_1);
14264  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14265  __pyx_r = NULL;
14266  __pyx_L0:;
14267  __Pyx_XGIVEREF(__pyx_r);
14268  __Pyx_RefNannyFinishContext();
14269  return __pyx_r;
14270  }
14271 
14272  /* "PyClical.pyx":1602
14273  * return clifford().wrap( glucat.log(toClifford(obj)) )
14274  *
14275  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14276  * """
14277  * Cosine of multivector with optional complexifier.
14278  */
14279 
14280  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14281  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) {
14282  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14283  PyObject *__pyx_r = NULL;
14284  __Pyx_RefNannyDeclarations
14285  int __pyx_t_1;
14286  int __pyx_t_2;
14287  PyObject *__pyx_t_3 = NULL;
14288  Clifford __pyx_t_4;
14289  PyObject *__pyx_t_5 = NULL;
14290  PyObject *__pyx_t_6 = NULL;
14291  PyObject *__pyx_t_7 = NULL;
14292  PyObject *__pyx_t_8 = NULL;
14293  PyObject *__pyx_t_9 = NULL;
14294  PyObject *__pyx_t_10 = NULL;
14295  PyObject *__pyx_t_11 = NULL;
14296  __Pyx_RefNannySetupContext("cos", 0);
14297  if (__pyx_optional_args) {
14298  if (__pyx_optional_args->__pyx_n > 0) {
14299  __pyx_v_i = __pyx_optional_args->i;
14300  }
14301  }
14302 
14303  /* "PyClical.pyx":1611
14304  * {1,2}
14305  * """
14306  * if not (i is None): # <<<<<<<<<<<<<<
14307  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14308  * else:
14309  */
14310  __pyx_t_1 = (__pyx_v_i != Py_None);
14311  __pyx_t_2 = (__pyx_t_1 != 0);
14312  if (__pyx_t_2) {
14313 
14314  /* "PyClical.pyx":1612
14315  * """
14316  * if not (i is None):
14317  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14318  * else:
14319  * try:
14320  */
14321  __Pyx_XDECREF(__pyx_r);
14322  __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)
14323  __Pyx_GOTREF(__pyx_t_3);
14324  try {
14325  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14326  } catch(...) {
14327  __Pyx_CppExn2PyErr();
14328  __PYX_ERR(0, 1612, __pyx_L1_error)
14329  }
14330  __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)
14331  __Pyx_GOTREF(__pyx_t_5);
14332  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14333  __pyx_r = __pyx_t_5;
14334  __pyx_t_5 = 0;
14335  goto __pyx_L0;
14336 
14337  /* "PyClical.pyx":1611
14338  * {1,2}
14339  * """
14340  * if not (i is None): # <<<<<<<<<<<<<<
14341  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14342  * else:
14343  */
14344  }
14345 
14346  /* "PyClical.pyx":1614
14347  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14348  * else:
14349  * try: # <<<<<<<<<<<<<<
14350  * return math.cos(obj)
14351  * except:
14352  */
14353  /*else*/ {
14354  {
14355  __Pyx_PyThreadState_declare
14356  __Pyx_PyThreadState_assign
14357  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14358  __Pyx_XGOTREF(__pyx_t_6);
14359  __Pyx_XGOTREF(__pyx_t_7);
14360  __Pyx_XGOTREF(__pyx_t_8);
14361  /*try:*/ {
14362 
14363  /* "PyClical.pyx":1615
14364  * else:
14365  * try:
14366  * return math.cos(obj) # <<<<<<<<<<<<<<
14367  * except:
14368  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14369  */
14370  __Pyx_XDECREF(__pyx_r);
14371  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14372  __Pyx_GOTREF(__pyx_t_3);
14373  __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)
14374  __Pyx_GOTREF(__pyx_t_9);
14375  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14376  __pyx_t_3 = NULL;
14377  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14378  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14379  if (likely(__pyx_t_3)) {
14380  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14381  __Pyx_INCREF(__pyx_t_3);
14382  __Pyx_INCREF(function);
14383  __Pyx_DECREF_SET(__pyx_t_9, function);
14384  }
14385  }
14386  if (!__pyx_t_3) {
14387  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14388  __Pyx_GOTREF(__pyx_t_5);
14389  } else {
14390  #if CYTHON_FAST_PYCALL
14391  if (PyFunction_Check(__pyx_t_9)) {
14392  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14393  __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)
14394  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14395  __Pyx_GOTREF(__pyx_t_5);
14396  } else
14397  #endif
14398  #if CYTHON_FAST_PYCCALL
14399  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14400  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14401  __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)
14402  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14403  __Pyx_GOTREF(__pyx_t_5);
14404  } else
14405  #endif
14406  {
14407  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1615, __pyx_L4_error)
14408  __Pyx_GOTREF(__pyx_t_10);
14409  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14410  __Pyx_INCREF(__pyx_v_obj);
14411  __Pyx_GIVEREF(__pyx_v_obj);
14412  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14413  __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)
14414  __Pyx_GOTREF(__pyx_t_5);
14415  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14416  }
14417  }
14418  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14419  __pyx_r = __pyx_t_5;
14420  __pyx_t_5 = 0;
14421  goto __pyx_L8_try_return;
14422 
14423  /* "PyClical.pyx":1614
14424  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14425  * else:
14426  * try: # <<<<<<<<<<<<<<
14427  * return math.cos(obj)
14428  * except:
14429  */
14430  }
14431  __pyx_L4_error:;
14432  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14433  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14434  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14435  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14436 
14437  /* "PyClical.pyx":1616
14438  * try:
14439  * return math.cos(obj)
14440  * except: # <<<<<<<<<<<<<<
14441  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14442  *
14443  */
14444  /*except:*/ {
14445  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14446  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14447  __Pyx_GOTREF(__pyx_t_5);
14448  __Pyx_GOTREF(__pyx_t_9);
14449  __Pyx_GOTREF(__pyx_t_10);
14450 
14451  /* "PyClical.pyx":1617
14452  * return math.cos(obj)
14453  * except:
14454  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14455  *
14456  * cpdef inline acos(obj,i = None):
14457  */
14458  __Pyx_XDECREF(__pyx_r);
14459  __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)
14460  __Pyx_GOTREF(__pyx_t_3);
14461  __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)
14462  __Pyx_GOTREF(__pyx_t_11);
14463  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14464  __pyx_r = __pyx_t_11;
14465  __pyx_t_11 = 0;
14466  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14467  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14468  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14469  goto __pyx_L7_except_return;
14470  }
14471  __pyx_L6_except_error:;
14472 
14473  /* "PyClical.pyx":1614
14474  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14475  * else:
14476  * try: # <<<<<<<<<<<<<<
14477  * return math.cos(obj)
14478  * except:
14479  */
14480  __Pyx_XGIVEREF(__pyx_t_6);
14481  __Pyx_XGIVEREF(__pyx_t_7);
14482  __Pyx_XGIVEREF(__pyx_t_8);
14483  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14484  goto __pyx_L1_error;
14485  __pyx_L8_try_return:;
14486  __Pyx_XGIVEREF(__pyx_t_6);
14487  __Pyx_XGIVEREF(__pyx_t_7);
14488  __Pyx_XGIVEREF(__pyx_t_8);
14489  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14490  goto __pyx_L0;
14491  __pyx_L7_except_return:;
14492  __Pyx_XGIVEREF(__pyx_t_6);
14493  __Pyx_XGIVEREF(__pyx_t_7);
14494  __Pyx_XGIVEREF(__pyx_t_8);
14495  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14496  goto __pyx_L0;
14497  }
14498  }
14499 
14500  /* "PyClical.pyx":1602
14501  * return clifford().wrap( glucat.log(toClifford(obj)) )
14502  *
14503  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14504  * """
14505  * Cosine of multivector with optional complexifier.
14506  */
14507 
14508  /* function exit code */
14509  __pyx_L1_error:;
14510  __Pyx_XDECREF(__pyx_t_3);
14511  __Pyx_XDECREF(__pyx_t_5);
14512  __Pyx_XDECREF(__pyx_t_9);
14513  __Pyx_XDECREF(__pyx_t_10);
14514  __Pyx_XDECREF(__pyx_t_11);
14515  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14516  __pyx_r = 0;
14517  __pyx_L0:;
14518  __Pyx_XGIVEREF(__pyx_r);
14519  __Pyx_RefNannyFinishContext();
14520  return __pyx_r;
14521  }
14522 
14523  /* Python wrapper */
14524  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14525  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 ";
14526  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14527  PyObject *__pyx_v_obj = 0;
14528  PyObject *__pyx_v_i = 0;
14529  PyObject *__pyx_r = 0;
14530  __Pyx_RefNannyDeclarations
14531  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14532  {
14533  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14534  PyObject* values[2] = {0,0};
14535  values[1] = ((PyObject *)Py_None);
14536  if (unlikely(__pyx_kwds)) {
14537  Py_ssize_t kw_args;
14538  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14539  switch (pos_args) {
14540  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14541  CYTHON_FALLTHROUGH;
14542  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14543  CYTHON_FALLTHROUGH;
14544  case 0: break;
14545  default: goto __pyx_L5_argtuple_error;
14546  }
14547  kw_args = PyDict_Size(__pyx_kwds);
14548  switch (pos_args) {
14549  case 0:
14550  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14551  else goto __pyx_L5_argtuple_error;
14552  CYTHON_FALLTHROUGH;
14553  case 1:
14554  if (kw_args > 0) {
14555  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14556  if (value) { values[1] = value; kw_args--; }
14557  }
14558  }
14559  if (unlikely(kw_args > 0)) {
14560  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14561  }
14562  } else {
14563  switch (PyTuple_GET_SIZE(__pyx_args)) {
14564  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14565  CYTHON_FALLTHROUGH;
14566  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14567  break;
14568  default: goto __pyx_L5_argtuple_error;
14569  }
14570  }
14571  __pyx_v_obj = values[0];
14572  __pyx_v_i = values[1];
14573  }
14574  goto __pyx_L4_argument_unpacking_done;
14575  __pyx_L5_argtuple_error:;
14576  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14577  __pyx_L3_error:;
14578  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14579  __Pyx_RefNannyFinishContext();
14580  return NULL;
14581  __pyx_L4_argument_unpacking_done:;
14582  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14583 
14584  /* function exit code */
14585  __Pyx_RefNannyFinishContext();
14586  return __pyx_r;
14587  }
14588 
14589  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14590  PyObject *__pyx_r = NULL;
14591  __Pyx_RefNannyDeclarations
14592  PyObject *__pyx_t_1 = NULL;
14593  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14594  __Pyx_RefNannySetupContext("cos", 0);
14595  __Pyx_XDECREF(__pyx_r);
14596  __pyx_t_2.__pyx_n = 1;
14597  __pyx_t_2.i = __pyx_v_i;
14598  __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)
14599  __Pyx_GOTREF(__pyx_t_1);
14600  __pyx_r = __pyx_t_1;
14601  __pyx_t_1 = 0;
14602  goto __pyx_L0;
14603 
14604  /* function exit code */
14605  __pyx_L1_error:;
14606  __Pyx_XDECREF(__pyx_t_1);
14607  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14608  __pyx_r = NULL;
14609  __pyx_L0:;
14610  __Pyx_XGIVEREF(__pyx_r);
14611  __Pyx_RefNannyFinishContext();
14612  return __pyx_r;
14613  }
14614 
14615  /* "PyClical.pyx":1619
14616  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14617  *
14618  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14619  * """
14620  * Inverse cosine of multivector with optional complexifier.
14621  */
14622 
14623  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14624  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) {
14625  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14626  PyObject *__pyx_r = NULL;
14627  __Pyx_RefNannyDeclarations
14628  int __pyx_t_1;
14629  int __pyx_t_2;
14630  PyObject *__pyx_t_3 = NULL;
14631  Clifford __pyx_t_4;
14632  PyObject *__pyx_t_5 = NULL;
14633  PyObject *__pyx_t_6 = NULL;
14634  PyObject *__pyx_t_7 = NULL;
14635  PyObject *__pyx_t_8 = NULL;
14636  PyObject *__pyx_t_9 = NULL;
14637  PyObject *__pyx_t_10 = NULL;
14638  PyObject *__pyx_t_11 = NULL;
14639  __Pyx_RefNannySetupContext("acos", 0);
14640  if (__pyx_optional_args) {
14641  if (__pyx_optional_args->__pyx_n > 0) {
14642  __pyx_v_i = __pyx_optional_args->i;
14643  }
14644  }
14645 
14646  /* "PyClical.pyx":1632
14647  * {1,2}
14648  * """
14649  * if not (i is None): # <<<<<<<<<<<<<<
14650  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14651  * else:
14652  */
14653  __pyx_t_1 = (__pyx_v_i != Py_None);
14654  __pyx_t_2 = (__pyx_t_1 != 0);
14655  if (__pyx_t_2) {
14656 
14657  /* "PyClical.pyx":1633
14658  * """
14659  * if not (i is None):
14660  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14661  * else:
14662  * try:
14663  */
14664  __Pyx_XDECREF(__pyx_r);
14665  __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)
14666  __Pyx_GOTREF(__pyx_t_3);
14667  try {
14668  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14669  } catch(...) {
14670  __Pyx_CppExn2PyErr();
14671  __PYX_ERR(0, 1633, __pyx_L1_error)
14672  }
14673  __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)
14674  __Pyx_GOTREF(__pyx_t_5);
14675  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14676  __pyx_r = __pyx_t_5;
14677  __pyx_t_5 = 0;
14678  goto __pyx_L0;
14679 
14680  /* "PyClical.pyx":1632
14681  * {1,2}
14682  * """
14683  * if not (i is None): # <<<<<<<<<<<<<<
14684  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14685  * else:
14686  */
14687  }
14688 
14689  /* "PyClical.pyx":1635
14690  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14691  * else:
14692  * try: # <<<<<<<<<<<<<<
14693  * return math.acos(obj)
14694  * except:
14695  */
14696  /*else*/ {
14697  {
14698  __Pyx_PyThreadState_declare
14699  __Pyx_PyThreadState_assign
14700  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14701  __Pyx_XGOTREF(__pyx_t_6);
14702  __Pyx_XGOTREF(__pyx_t_7);
14703  __Pyx_XGOTREF(__pyx_t_8);
14704  /*try:*/ {
14705 
14706  /* "PyClical.pyx":1636
14707  * else:
14708  * try:
14709  * return math.acos(obj) # <<<<<<<<<<<<<<
14710  * except:
14711  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14712  */
14713  __Pyx_XDECREF(__pyx_r);
14714  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14715  __Pyx_GOTREF(__pyx_t_3);
14716  __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)
14717  __Pyx_GOTREF(__pyx_t_9);
14718  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14719  __pyx_t_3 = NULL;
14720  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14721  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14722  if (likely(__pyx_t_3)) {
14723  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14724  __Pyx_INCREF(__pyx_t_3);
14725  __Pyx_INCREF(function);
14726  __Pyx_DECREF_SET(__pyx_t_9, function);
14727  }
14728  }
14729  if (!__pyx_t_3) {
14730  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14731  __Pyx_GOTREF(__pyx_t_5);
14732  } else {
14733  #if CYTHON_FAST_PYCALL
14734  if (PyFunction_Check(__pyx_t_9)) {
14735  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14736  __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)
14737  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14738  __Pyx_GOTREF(__pyx_t_5);
14739  } else
14740  #endif
14741  #if CYTHON_FAST_PYCCALL
14742  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14743  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14744  __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)
14745  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14746  __Pyx_GOTREF(__pyx_t_5);
14747  } else
14748  #endif
14749  {
14750  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1636, __pyx_L4_error)
14751  __Pyx_GOTREF(__pyx_t_10);
14752  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14753  __Pyx_INCREF(__pyx_v_obj);
14754  __Pyx_GIVEREF(__pyx_v_obj);
14755  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14756  __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)
14757  __Pyx_GOTREF(__pyx_t_5);
14758  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14759  }
14760  }
14761  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14762  __pyx_r = __pyx_t_5;
14763  __pyx_t_5 = 0;
14764  goto __pyx_L8_try_return;
14765 
14766  /* "PyClical.pyx":1635
14767  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14768  * else:
14769  * try: # <<<<<<<<<<<<<<
14770  * return math.acos(obj)
14771  * except:
14772  */
14773  }
14774  __pyx_L4_error:;
14775  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14776  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14777  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14778  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14779 
14780  /* "PyClical.pyx":1637
14781  * try:
14782  * return math.acos(obj)
14783  * except: # <<<<<<<<<<<<<<
14784  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14785  *
14786  */
14787  /*except:*/ {
14788  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14789  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14790  __Pyx_GOTREF(__pyx_t_5);
14791  __Pyx_GOTREF(__pyx_t_9);
14792  __Pyx_GOTREF(__pyx_t_10);
14793 
14794  /* "PyClical.pyx":1638
14795  * return math.acos(obj)
14796  * except:
14797  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14798  *
14799  * cpdef inline cosh(obj):
14800  */
14801  __Pyx_XDECREF(__pyx_r);
14802  __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)
14803  __Pyx_GOTREF(__pyx_t_3);
14804  __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)
14805  __Pyx_GOTREF(__pyx_t_11);
14806  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14807  __pyx_r = __pyx_t_11;
14808  __pyx_t_11 = 0;
14809  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14810  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14811  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14812  goto __pyx_L7_except_return;
14813  }
14814  __pyx_L6_except_error:;
14815 
14816  /* "PyClical.pyx":1635
14817  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14818  * else:
14819  * try: # <<<<<<<<<<<<<<
14820  * return math.acos(obj)
14821  * except:
14822  */
14823  __Pyx_XGIVEREF(__pyx_t_6);
14824  __Pyx_XGIVEREF(__pyx_t_7);
14825  __Pyx_XGIVEREF(__pyx_t_8);
14826  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14827  goto __pyx_L1_error;
14828  __pyx_L8_try_return:;
14829  __Pyx_XGIVEREF(__pyx_t_6);
14830  __Pyx_XGIVEREF(__pyx_t_7);
14831  __Pyx_XGIVEREF(__pyx_t_8);
14832  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14833  goto __pyx_L0;
14834  __pyx_L7_except_return:;
14835  __Pyx_XGIVEREF(__pyx_t_6);
14836  __Pyx_XGIVEREF(__pyx_t_7);
14837  __Pyx_XGIVEREF(__pyx_t_8);
14838  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14839  goto __pyx_L0;
14840  }
14841  }
14842 
14843  /* "PyClical.pyx":1619
14844  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14845  *
14846  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14847  * """
14848  * Inverse cosine of multivector with optional complexifier.
14849  */
14850 
14851  /* function exit code */
14852  __pyx_L1_error:;
14853  __Pyx_XDECREF(__pyx_t_3);
14854  __Pyx_XDECREF(__pyx_t_5);
14855  __Pyx_XDECREF(__pyx_t_9);
14856  __Pyx_XDECREF(__pyx_t_10);
14857  __Pyx_XDECREF(__pyx_t_11);
14858  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14859  __pyx_r = 0;
14860  __pyx_L0:;
14861  __Pyx_XGIVEREF(__pyx_r);
14862  __Pyx_RefNannyFinishContext();
14863  return __pyx_r;
14864  }
14865 
14866  /* Python wrapper */
14867  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14868  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 ";
14869  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14870  PyObject *__pyx_v_obj = 0;
14871  PyObject *__pyx_v_i = 0;
14872  PyObject *__pyx_r = 0;
14873  __Pyx_RefNannyDeclarations
14874  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14875  {
14876  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14877  PyObject* values[2] = {0,0};
14878  values[1] = ((PyObject *)Py_None);
14879  if (unlikely(__pyx_kwds)) {
14880  Py_ssize_t kw_args;
14881  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14882  switch (pos_args) {
14883  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14884  CYTHON_FALLTHROUGH;
14885  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14886  CYTHON_FALLTHROUGH;
14887  case 0: break;
14888  default: goto __pyx_L5_argtuple_error;
14889  }
14890  kw_args = PyDict_Size(__pyx_kwds);
14891  switch (pos_args) {
14892  case 0:
14893  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14894  else goto __pyx_L5_argtuple_error;
14895  CYTHON_FALLTHROUGH;
14896  case 1:
14897  if (kw_args > 0) {
14898  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14899  if (value) { values[1] = value; kw_args--; }
14900  }
14901  }
14902  if (unlikely(kw_args > 0)) {
14903  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14904  }
14905  } else {
14906  switch (PyTuple_GET_SIZE(__pyx_args)) {
14907  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14908  CYTHON_FALLTHROUGH;
14909  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14910  break;
14911  default: goto __pyx_L5_argtuple_error;
14912  }
14913  }
14914  __pyx_v_obj = values[0];
14915  __pyx_v_i = values[1];
14916  }
14917  goto __pyx_L4_argument_unpacking_done;
14918  __pyx_L5_argtuple_error:;
14919  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14920  __pyx_L3_error:;
14921  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14922  __Pyx_RefNannyFinishContext();
14923  return NULL;
14924  __pyx_L4_argument_unpacking_done:;
14925  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14926 
14927  /* function exit code */
14928  __Pyx_RefNannyFinishContext();
14929  return __pyx_r;
14930  }
14931 
14932  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14933  PyObject *__pyx_r = NULL;
14934  __Pyx_RefNannyDeclarations
14935  PyObject *__pyx_t_1 = NULL;
14936  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14937  __Pyx_RefNannySetupContext("acos", 0);
14938  __Pyx_XDECREF(__pyx_r);
14939  __pyx_t_2.__pyx_n = 1;
14940  __pyx_t_2.i = __pyx_v_i;
14941  __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)
14942  __Pyx_GOTREF(__pyx_t_1);
14943  __pyx_r = __pyx_t_1;
14944  __pyx_t_1 = 0;
14945  goto __pyx_L0;
14946 
14947  /* function exit code */
14948  __pyx_L1_error:;
14949  __Pyx_XDECREF(__pyx_t_1);
14950  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14951  __pyx_r = NULL;
14952  __pyx_L0:;
14953  __Pyx_XGIVEREF(__pyx_r);
14954  __Pyx_RefNannyFinishContext();
14955  return __pyx_r;
14956  }
14957 
14958  /* "PyClical.pyx":1640
14959  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14960  *
14961  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14962  * """
14963  * Hyperbolic cosine of multivector.
14964  */
14965 
14966  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14967  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14968  PyObject *__pyx_r = NULL;
14969  __Pyx_RefNannyDeclarations
14970  PyObject *__pyx_t_1 = NULL;
14971  PyObject *__pyx_t_2 = NULL;
14972  PyObject *__pyx_t_3 = NULL;
14973  PyObject *__pyx_t_4 = NULL;
14974  PyObject *__pyx_t_5 = NULL;
14975  PyObject *__pyx_t_6 = NULL;
14976  PyObject *__pyx_t_7 = NULL;
14977  PyObject *__pyx_t_8 = NULL;
14978  __Pyx_RefNannySetupContext("cosh", 0);
14979 
14980  /* "PyClical.pyx":1651
14981  * {1,2}
14982  * """
14983  * try: # <<<<<<<<<<<<<<
14984  * return math.cosh(obj)
14985  * except:
14986  */
14987  {
14988  __Pyx_PyThreadState_declare
14989  __Pyx_PyThreadState_assign
14990  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14991  __Pyx_XGOTREF(__pyx_t_1);
14992  __Pyx_XGOTREF(__pyx_t_2);
14993  __Pyx_XGOTREF(__pyx_t_3);
14994  /*try:*/ {
14995 
14996  /* "PyClical.pyx":1652
14997  * """
14998  * try:
14999  * return math.cosh(obj) # <<<<<<<<<<<<<<
15000  * except:
15001  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15002  */
15003  __Pyx_XDECREF(__pyx_r);
15004  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
15005  __Pyx_GOTREF(__pyx_t_5);
15006  __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)
15007  __Pyx_GOTREF(__pyx_t_6);
15008  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15009  __pyx_t_5 = NULL;
15010  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15011  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15012  if (likely(__pyx_t_5)) {
15013  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15014  __Pyx_INCREF(__pyx_t_5);
15015  __Pyx_INCREF(function);
15016  __Pyx_DECREF_SET(__pyx_t_6, function);
15017  }
15018  }
15019  if (!__pyx_t_5) {
15020  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
15021  __Pyx_GOTREF(__pyx_t_4);
15022  } else {
15023  #if CYTHON_FAST_PYCALL
15024  if (PyFunction_Check(__pyx_t_6)) {
15025  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
15026  __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)
15027  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15028  __Pyx_GOTREF(__pyx_t_4);
15029  } else
15030  #endif
15031  #if CYTHON_FAST_PYCCALL
15032  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
15033  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
15034  __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)
15035  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15036  __Pyx_GOTREF(__pyx_t_4);
15037  } else
15038  #endif
15039  {
15040  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L3_error)
15041  __Pyx_GOTREF(__pyx_t_7);
15042  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
15043  __Pyx_INCREF(__pyx_v_obj);
15044  __Pyx_GIVEREF(__pyx_v_obj);
15045  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15046  __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)
15047  __Pyx_GOTREF(__pyx_t_4);
15048  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15049  }
15050  }
15051  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15052  __pyx_r = __pyx_t_4;
15053  __pyx_t_4 = 0;
15054  goto __pyx_L7_try_return;
15055 
15056  /* "PyClical.pyx":1651
15057  * {1,2}
15058  * """
15059  * try: # <<<<<<<<<<<<<<
15060  * return math.cosh(obj)
15061  * except:
15062  */
15063  }
15064  __pyx_L3_error:;
15065  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15066  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15067  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15068  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15069 
15070  /* "PyClical.pyx":1653
15071  * try:
15072  * return math.cosh(obj)
15073  * except: # <<<<<<<<<<<<<<
15074  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15075  *
15076  */
15077  /*except:*/ {
15078  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15079  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
15080  __Pyx_GOTREF(__pyx_t_4);
15081  __Pyx_GOTREF(__pyx_t_6);
15082  __Pyx_GOTREF(__pyx_t_7);
15083 
15084  /* "PyClical.pyx":1654
15085  * return math.cosh(obj)
15086  * except:
15087  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15088  *
15089  * cpdef inline acosh(obj,i = None):
15090  */
15091  __Pyx_XDECREF(__pyx_r);
15092  __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)
15093  __Pyx_GOTREF(__pyx_t_5);
15094  __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)
15095  __Pyx_GOTREF(__pyx_t_8);
15096  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15097  __pyx_r = __pyx_t_8;
15098  __pyx_t_8 = 0;
15099  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15100  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15101  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15102  goto __pyx_L6_except_return;
15103  }
15104  __pyx_L5_except_error:;
15105 
15106  /* "PyClical.pyx":1651
15107  * {1,2}
15108  * """
15109  * try: # <<<<<<<<<<<<<<
15110  * return math.cosh(obj)
15111  * except:
15112  */
15113  __Pyx_XGIVEREF(__pyx_t_1);
15114  __Pyx_XGIVEREF(__pyx_t_2);
15115  __Pyx_XGIVEREF(__pyx_t_3);
15116  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15117  goto __pyx_L1_error;
15118  __pyx_L7_try_return:;
15119  __Pyx_XGIVEREF(__pyx_t_1);
15120  __Pyx_XGIVEREF(__pyx_t_2);
15121  __Pyx_XGIVEREF(__pyx_t_3);
15122  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15123  goto __pyx_L0;
15124  __pyx_L6_except_return:;
15125  __Pyx_XGIVEREF(__pyx_t_1);
15126  __Pyx_XGIVEREF(__pyx_t_2);
15127  __Pyx_XGIVEREF(__pyx_t_3);
15128  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15129  goto __pyx_L0;
15130  }
15131 
15132  /* "PyClical.pyx":1640
15133  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15134  *
15135  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15136  * """
15137  * Hyperbolic cosine of multivector.
15138  */
15139 
15140  /* function exit code */
15141  __pyx_L1_error:;
15142  __Pyx_XDECREF(__pyx_t_4);
15143  __Pyx_XDECREF(__pyx_t_5);
15144  __Pyx_XDECREF(__pyx_t_6);
15145  __Pyx_XDECREF(__pyx_t_7);
15146  __Pyx_XDECREF(__pyx_t_8);
15147  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15148  __pyx_r = 0;
15149  __pyx_L0:;
15150  __Pyx_XGIVEREF(__pyx_r);
15151  __Pyx_RefNannyFinishContext();
15152  return __pyx_r;
15153  }
15154 
15155  /* Python wrapper */
15156  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15157  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 ";
15158  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15159  PyObject *__pyx_r = 0;
15160  __Pyx_RefNannyDeclarations
15161  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
15162  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
15163 
15164  /* function exit code */
15165  __Pyx_RefNannyFinishContext();
15166  return __pyx_r;
15167  }
15168 
15169  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15170  PyObject *__pyx_r = NULL;
15171  __Pyx_RefNannyDeclarations
15172  PyObject *__pyx_t_1 = NULL;
15173  __Pyx_RefNannySetupContext("cosh", 0);
15174  __Pyx_XDECREF(__pyx_r);
15175  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
15176  __Pyx_GOTREF(__pyx_t_1);
15177  __pyx_r = __pyx_t_1;
15178  __pyx_t_1 = 0;
15179  goto __pyx_L0;
15180 
15181  /* function exit code */
15182  __pyx_L1_error:;
15183  __Pyx_XDECREF(__pyx_t_1);
15184  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15185  __pyx_r = NULL;
15186  __pyx_L0:;
15187  __Pyx_XGIVEREF(__pyx_r);
15188  __Pyx_RefNannyFinishContext();
15189  return __pyx_r;
15190  }
15191 
15192  /* "PyClical.pyx":1656
15193  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15194  *
15195  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15196  * """
15197  * Inverse hyperbolic cosine of multivector with optional complexifier.
15198  */
15199 
15200  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15201  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) {
15202  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15203  PyObject *__pyx_r = NULL;
15204  __Pyx_RefNannyDeclarations
15205  int __pyx_t_1;
15206  int __pyx_t_2;
15207  PyObject *__pyx_t_3 = NULL;
15208  Clifford __pyx_t_4;
15209  PyObject *__pyx_t_5 = NULL;
15210  PyObject *__pyx_t_6 = NULL;
15211  PyObject *__pyx_t_7 = NULL;
15212  PyObject *__pyx_t_8 = NULL;
15213  PyObject *__pyx_t_9 = NULL;
15214  PyObject *__pyx_t_10 = NULL;
15215  PyObject *__pyx_t_11 = NULL;
15216  __Pyx_RefNannySetupContext("acosh", 0);
15217  if (__pyx_optional_args) {
15218  if (__pyx_optional_args->__pyx_n > 0) {
15219  __pyx_v_i = __pyx_optional_args->i;
15220  }
15221  }
15222 
15223  /* "PyClical.pyx":1671
15224  * {1,2}
15225  * """
15226  * if not (i is None): # <<<<<<<<<<<<<<
15227  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15228  * else:
15229  */
15230  __pyx_t_1 = (__pyx_v_i != Py_None);
15231  __pyx_t_2 = (__pyx_t_1 != 0);
15232  if (__pyx_t_2) {
15233 
15234  /* "PyClical.pyx":1672
15235  * """
15236  * if not (i is None):
15237  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15238  * else:
15239  * try:
15240  */
15241  __Pyx_XDECREF(__pyx_r);
15242  __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)
15243  __Pyx_GOTREF(__pyx_t_3);
15244  try {
15245  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15246  } catch(...) {
15247  __Pyx_CppExn2PyErr();
15248  __PYX_ERR(0, 1672, __pyx_L1_error)
15249  }
15250  __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)
15251  __Pyx_GOTREF(__pyx_t_5);
15252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15253  __pyx_r = __pyx_t_5;
15254  __pyx_t_5 = 0;
15255  goto __pyx_L0;
15256 
15257  /* "PyClical.pyx":1671
15258  * {1,2}
15259  * """
15260  * if not (i is None): # <<<<<<<<<<<<<<
15261  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15262  * else:
15263  */
15264  }
15265 
15266  /* "PyClical.pyx":1674
15267  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15268  * else:
15269  * try: # <<<<<<<<<<<<<<
15270  * return math.acosh(obj)
15271  * except:
15272  */
15273  /*else*/ {
15274  {
15275  __Pyx_PyThreadState_declare
15276  __Pyx_PyThreadState_assign
15277  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15278  __Pyx_XGOTREF(__pyx_t_6);
15279  __Pyx_XGOTREF(__pyx_t_7);
15280  __Pyx_XGOTREF(__pyx_t_8);
15281  /*try:*/ {
15282 
15283  /* "PyClical.pyx":1675
15284  * else:
15285  * try:
15286  * return math.acosh(obj) # <<<<<<<<<<<<<<
15287  * except:
15288  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15289  */
15290  __Pyx_XDECREF(__pyx_r);
15291  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
15292  __Pyx_GOTREF(__pyx_t_3);
15293  __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)
15294  __Pyx_GOTREF(__pyx_t_9);
15295  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15296  __pyx_t_3 = NULL;
15297  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15298  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15299  if (likely(__pyx_t_3)) {
15300  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15301  __Pyx_INCREF(__pyx_t_3);
15302  __Pyx_INCREF(function);
15303  __Pyx_DECREF_SET(__pyx_t_9, function);
15304  }
15305  }
15306  if (!__pyx_t_3) {
15307  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15308  __Pyx_GOTREF(__pyx_t_5);
15309  } else {
15310  #if CYTHON_FAST_PYCALL
15311  if (PyFunction_Check(__pyx_t_9)) {
15312  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15313  __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)
15314  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15315  __Pyx_GOTREF(__pyx_t_5);
15316  } else
15317  #endif
15318  #if CYTHON_FAST_PYCCALL
15319  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15320  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15321  __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)
15322  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15323  __Pyx_GOTREF(__pyx_t_5);
15324  } else
15325  #endif
15326  {
15327  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1675, __pyx_L4_error)
15328  __Pyx_GOTREF(__pyx_t_10);
15329  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15330  __Pyx_INCREF(__pyx_v_obj);
15331  __Pyx_GIVEREF(__pyx_v_obj);
15332  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15333  __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)
15334  __Pyx_GOTREF(__pyx_t_5);
15335  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15336  }
15337  }
15338  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15339  __pyx_r = __pyx_t_5;
15340  __pyx_t_5 = 0;
15341  goto __pyx_L8_try_return;
15342 
15343  /* "PyClical.pyx":1674
15344  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15345  * else:
15346  * try: # <<<<<<<<<<<<<<
15347  * return math.acosh(obj)
15348  * except:
15349  */
15350  }
15351  __pyx_L4_error:;
15352  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15353  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15354  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15355  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15356 
15357  /* "PyClical.pyx":1676
15358  * try:
15359  * return math.acosh(obj)
15360  * except: # <<<<<<<<<<<<<<
15361  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15362  *
15363  */
15364  /*except:*/ {
15365  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15366  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15367  __Pyx_GOTREF(__pyx_t_5);
15368  __Pyx_GOTREF(__pyx_t_9);
15369  __Pyx_GOTREF(__pyx_t_10);
15370 
15371  /* "PyClical.pyx":1677
15372  * return math.acosh(obj)
15373  * except:
15374  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15375  *
15376  * cpdef inline sin(obj,i = None):
15377  */
15378  __Pyx_XDECREF(__pyx_r);
15379  __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)
15380  __Pyx_GOTREF(__pyx_t_3);
15381  __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)
15382  __Pyx_GOTREF(__pyx_t_11);
15383  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15384  __pyx_r = __pyx_t_11;
15385  __pyx_t_11 = 0;
15386  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15387  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15388  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15389  goto __pyx_L7_except_return;
15390  }
15391  __pyx_L6_except_error:;
15392 
15393  /* "PyClical.pyx":1674
15394  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15395  * else:
15396  * try: # <<<<<<<<<<<<<<
15397  * return math.acosh(obj)
15398  * except:
15399  */
15400  __Pyx_XGIVEREF(__pyx_t_6);
15401  __Pyx_XGIVEREF(__pyx_t_7);
15402  __Pyx_XGIVEREF(__pyx_t_8);
15403  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15404  goto __pyx_L1_error;
15405  __pyx_L8_try_return:;
15406  __Pyx_XGIVEREF(__pyx_t_6);
15407  __Pyx_XGIVEREF(__pyx_t_7);
15408  __Pyx_XGIVEREF(__pyx_t_8);
15409  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15410  goto __pyx_L0;
15411  __pyx_L7_except_return:;
15412  __Pyx_XGIVEREF(__pyx_t_6);
15413  __Pyx_XGIVEREF(__pyx_t_7);
15414  __Pyx_XGIVEREF(__pyx_t_8);
15415  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15416  goto __pyx_L0;
15417  }
15418  }
15419 
15420  /* "PyClical.pyx":1656
15421  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15422  *
15423  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15424  * """
15425  * Inverse hyperbolic cosine of multivector with optional complexifier.
15426  */
15427 
15428  /* function exit code */
15429  __pyx_L1_error:;
15430  __Pyx_XDECREF(__pyx_t_3);
15431  __Pyx_XDECREF(__pyx_t_5);
15432  __Pyx_XDECREF(__pyx_t_9);
15433  __Pyx_XDECREF(__pyx_t_10);
15434  __Pyx_XDECREF(__pyx_t_11);
15435  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15436  __pyx_r = 0;
15437  __pyx_L0:;
15438  __Pyx_XGIVEREF(__pyx_r);
15439  __Pyx_RefNannyFinishContext();
15440  return __pyx_r;
15441  }
15442 
15443  /* Python wrapper */
15444  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15445  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 ";
15446  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15447  PyObject *__pyx_v_obj = 0;
15448  PyObject *__pyx_v_i = 0;
15449  PyObject *__pyx_r = 0;
15450  __Pyx_RefNannyDeclarations
15451  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15452  {
15453  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15454  PyObject* values[2] = {0,0};
15455  values[1] = ((PyObject *)Py_None);
15456  if (unlikely(__pyx_kwds)) {
15457  Py_ssize_t kw_args;
15458  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15459  switch (pos_args) {
15460  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15461  CYTHON_FALLTHROUGH;
15462  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15463  CYTHON_FALLTHROUGH;
15464  case 0: break;
15465  default: goto __pyx_L5_argtuple_error;
15466  }
15467  kw_args = PyDict_Size(__pyx_kwds);
15468  switch (pos_args) {
15469  case 0:
15470  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15471  else goto __pyx_L5_argtuple_error;
15472  CYTHON_FALLTHROUGH;
15473  case 1:
15474  if (kw_args > 0) {
15475  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15476  if (value) { values[1] = value; kw_args--; }
15477  }
15478  }
15479  if (unlikely(kw_args > 0)) {
15480  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15481  }
15482  } else {
15483  switch (PyTuple_GET_SIZE(__pyx_args)) {
15484  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15485  CYTHON_FALLTHROUGH;
15486  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15487  break;
15488  default: goto __pyx_L5_argtuple_error;
15489  }
15490  }
15491  __pyx_v_obj = values[0];
15492  __pyx_v_i = values[1];
15493  }
15494  goto __pyx_L4_argument_unpacking_done;
15495  __pyx_L5_argtuple_error:;
15496  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15497  __pyx_L3_error:;
15498  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15499  __Pyx_RefNannyFinishContext();
15500  return NULL;
15501  __pyx_L4_argument_unpacking_done:;
15502  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15503 
15504  /* function exit code */
15505  __Pyx_RefNannyFinishContext();
15506  return __pyx_r;
15507  }
15508 
15509  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15510  PyObject *__pyx_r = NULL;
15511  __Pyx_RefNannyDeclarations
15512  PyObject *__pyx_t_1 = NULL;
15513  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15514  __Pyx_RefNannySetupContext("acosh", 0);
15515  __Pyx_XDECREF(__pyx_r);
15516  __pyx_t_2.__pyx_n = 1;
15517  __pyx_t_2.i = __pyx_v_i;
15518  __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)
15519  __Pyx_GOTREF(__pyx_t_1);
15520  __pyx_r = __pyx_t_1;
15521  __pyx_t_1 = 0;
15522  goto __pyx_L0;
15523 
15524  /* function exit code */
15525  __pyx_L1_error:;
15526  __Pyx_XDECREF(__pyx_t_1);
15527  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15528  __pyx_r = NULL;
15529  __pyx_L0:;
15530  __Pyx_XGIVEREF(__pyx_r);
15531  __Pyx_RefNannyFinishContext();
15532  return __pyx_r;
15533  }
15534 
15535  /* "PyClical.pyx":1679
15536  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15537  *
15538  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15539  * """
15540  * Sine of multivector with optional complexifier.
15541  */
15542 
15543  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15544  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) {
15545  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15546  PyObject *__pyx_r = NULL;
15547  __Pyx_RefNannyDeclarations
15548  int __pyx_t_1;
15549  int __pyx_t_2;
15550  PyObject *__pyx_t_3 = NULL;
15551  Clifford __pyx_t_4;
15552  PyObject *__pyx_t_5 = NULL;
15553  PyObject *__pyx_t_6 = NULL;
15554  PyObject *__pyx_t_7 = NULL;
15555  PyObject *__pyx_t_8 = NULL;
15556  PyObject *__pyx_t_9 = NULL;
15557  PyObject *__pyx_t_10 = NULL;
15558  PyObject *__pyx_t_11 = NULL;
15559  __Pyx_RefNannySetupContext("sin", 0);
15560  if (__pyx_optional_args) {
15561  if (__pyx_optional_args->__pyx_n > 0) {
15562  __pyx_v_i = __pyx_optional_args->i;
15563  }
15564  }
15565 
15566  /* "PyClical.pyx":1690
15567  * {1,2,3}
15568  * """
15569  * if not (i is None): # <<<<<<<<<<<<<<
15570  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15571  * else:
15572  */
15573  __pyx_t_1 = (__pyx_v_i != Py_None);
15574  __pyx_t_2 = (__pyx_t_1 != 0);
15575  if (__pyx_t_2) {
15576 
15577  /* "PyClical.pyx":1691
15578  * """
15579  * if not (i is None):
15580  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15581  * else:
15582  * try:
15583  */
15584  __Pyx_XDECREF(__pyx_r);
15585  __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)
15586  __Pyx_GOTREF(__pyx_t_3);
15587  try {
15588  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15589  } catch(...) {
15590  __Pyx_CppExn2PyErr();
15591  __PYX_ERR(0, 1691, __pyx_L1_error)
15592  }
15593  __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)
15594  __Pyx_GOTREF(__pyx_t_5);
15595  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15596  __pyx_r = __pyx_t_5;
15597  __pyx_t_5 = 0;
15598  goto __pyx_L0;
15599 
15600  /* "PyClical.pyx":1690
15601  * {1,2,3}
15602  * """
15603  * if not (i is None): # <<<<<<<<<<<<<<
15604  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15605  * else:
15606  */
15607  }
15608 
15609  /* "PyClical.pyx":1693
15610  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15611  * else:
15612  * try: # <<<<<<<<<<<<<<
15613  * return math.sin(obj)
15614  * except:
15615  */
15616  /*else*/ {
15617  {
15618  __Pyx_PyThreadState_declare
15619  __Pyx_PyThreadState_assign
15620  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15621  __Pyx_XGOTREF(__pyx_t_6);
15622  __Pyx_XGOTREF(__pyx_t_7);
15623  __Pyx_XGOTREF(__pyx_t_8);
15624  /*try:*/ {
15625 
15626  /* "PyClical.pyx":1694
15627  * else:
15628  * try:
15629  * return math.sin(obj) # <<<<<<<<<<<<<<
15630  * except:
15631  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15632  */
15633  __Pyx_XDECREF(__pyx_r);
15634  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15635  __Pyx_GOTREF(__pyx_t_3);
15636  __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)
15637  __Pyx_GOTREF(__pyx_t_9);
15638  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15639  __pyx_t_3 = NULL;
15640  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15641  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15642  if (likely(__pyx_t_3)) {
15643  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15644  __Pyx_INCREF(__pyx_t_3);
15645  __Pyx_INCREF(function);
15646  __Pyx_DECREF_SET(__pyx_t_9, function);
15647  }
15648  }
15649  if (!__pyx_t_3) {
15650  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15651  __Pyx_GOTREF(__pyx_t_5);
15652  } else {
15653  #if CYTHON_FAST_PYCALL
15654  if (PyFunction_Check(__pyx_t_9)) {
15655  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15656  __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)
15657  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15658  __Pyx_GOTREF(__pyx_t_5);
15659  } else
15660  #endif
15661  #if CYTHON_FAST_PYCCALL
15662  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15663  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15664  __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)
15665  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15666  __Pyx_GOTREF(__pyx_t_5);
15667  } else
15668  #endif
15669  {
15670  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1694, __pyx_L4_error)
15671  __Pyx_GOTREF(__pyx_t_10);
15672  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15673  __Pyx_INCREF(__pyx_v_obj);
15674  __Pyx_GIVEREF(__pyx_v_obj);
15675  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15676  __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)
15677  __Pyx_GOTREF(__pyx_t_5);
15678  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15679  }
15680  }
15681  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15682  __pyx_r = __pyx_t_5;
15683  __pyx_t_5 = 0;
15684  goto __pyx_L8_try_return;
15685 
15686  /* "PyClical.pyx":1693
15687  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15688  * else:
15689  * try: # <<<<<<<<<<<<<<
15690  * return math.sin(obj)
15691  * except:
15692  */
15693  }
15694  __pyx_L4_error:;
15695  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15696  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15697  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15698  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15699 
15700  /* "PyClical.pyx":1695
15701  * try:
15702  * return math.sin(obj)
15703  * except: # <<<<<<<<<<<<<<
15704  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15705  *
15706  */
15707  /*except:*/ {
15708  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15709  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15710  __Pyx_GOTREF(__pyx_t_5);
15711  __Pyx_GOTREF(__pyx_t_9);
15712  __Pyx_GOTREF(__pyx_t_10);
15713 
15714  /* "PyClical.pyx":1696
15715  * return math.sin(obj)
15716  * except:
15717  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15718  *
15719  * cpdef inline asin(obj,i = None):
15720  */
15721  __Pyx_XDECREF(__pyx_r);
15722  __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)
15723  __Pyx_GOTREF(__pyx_t_3);
15724  __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)
15725  __Pyx_GOTREF(__pyx_t_11);
15726  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15727  __pyx_r = __pyx_t_11;
15728  __pyx_t_11 = 0;
15729  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15730  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15731  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15732  goto __pyx_L7_except_return;
15733  }
15734  __pyx_L6_except_error:;
15735 
15736  /* "PyClical.pyx":1693
15737  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15738  * else:
15739  * try: # <<<<<<<<<<<<<<
15740  * return math.sin(obj)
15741  * except:
15742  */
15743  __Pyx_XGIVEREF(__pyx_t_6);
15744  __Pyx_XGIVEREF(__pyx_t_7);
15745  __Pyx_XGIVEREF(__pyx_t_8);
15746  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15747  goto __pyx_L1_error;
15748  __pyx_L8_try_return:;
15749  __Pyx_XGIVEREF(__pyx_t_6);
15750  __Pyx_XGIVEREF(__pyx_t_7);
15751  __Pyx_XGIVEREF(__pyx_t_8);
15752  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15753  goto __pyx_L0;
15754  __pyx_L7_except_return:;
15755  __Pyx_XGIVEREF(__pyx_t_6);
15756  __Pyx_XGIVEREF(__pyx_t_7);
15757  __Pyx_XGIVEREF(__pyx_t_8);
15758  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15759  goto __pyx_L0;
15760  }
15761  }
15762 
15763  /* "PyClical.pyx":1679
15764  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15765  *
15766  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15767  * """
15768  * Sine of multivector with optional complexifier.
15769  */
15770 
15771  /* function exit code */
15772  __pyx_L1_error:;
15773  __Pyx_XDECREF(__pyx_t_3);
15774  __Pyx_XDECREF(__pyx_t_5);
15775  __Pyx_XDECREF(__pyx_t_9);
15776  __Pyx_XDECREF(__pyx_t_10);
15777  __Pyx_XDECREF(__pyx_t_11);
15778  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15779  __pyx_r = 0;
15780  __pyx_L0:;
15781  __Pyx_XGIVEREF(__pyx_r);
15782  __Pyx_RefNannyFinishContext();
15783  return __pyx_r;
15784  }
15785 
15786  /* Python wrapper */
15787  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15788  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 ";
15789  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15790  PyObject *__pyx_v_obj = 0;
15791  PyObject *__pyx_v_i = 0;
15792  PyObject *__pyx_r = 0;
15793  __Pyx_RefNannyDeclarations
15794  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15795  {
15796  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15797  PyObject* values[2] = {0,0};
15798  values[1] = ((PyObject *)Py_None);
15799  if (unlikely(__pyx_kwds)) {
15800  Py_ssize_t kw_args;
15801  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15802  switch (pos_args) {
15803  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15804  CYTHON_FALLTHROUGH;
15805  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15806  CYTHON_FALLTHROUGH;
15807  case 0: break;
15808  default: goto __pyx_L5_argtuple_error;
15809  }
15810  kw_args = PyDict_Size(__pyx_kwds);
15811  switch (pos_args) {
15812  case 0:
15813  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15814  else goto __pyx_L5_argtuple_error;
15815  CYTHON_FALLTHROUGH;
15816  case 1:
15817  if (kw_args > 0) {
15818  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15819  if (value) { values[1] = value; kw_args--; }
15820  }
15821  }
15822  if (unlikely(kw_args > 0)) {
15823  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15824  }
15825  } else {
15826  switch (PyTuple_GET_SIZE(__pyx_args)) {
15827  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15828  CYTHON_FALLTHROUGH;
15829  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15830  break;
15831  default: goto __pyx_L5_argtuple_error;
15832  }
15833  }
15834  __pyx_v_obj = values[0];
15835  __pyx_v_i = values[1];
15836  }
15837  goto __pyx_L4_argument_unpacking_done;
15838  __pyx_L5_argtuple_error:;
15839  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15840  __pyx_L3_error:;
15841  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15842  __Pyx_RefNannyFinishContext();
15843  return NULL;
15844  __pyx_L4_argument_unpacking_done:;
15845  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15846 
15847  /* function exit code */
15848  __Pyx_RefNannyFinishContext();
15849  return __pyx_r;
15850  }
15851 
15852  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15853  PyObject *__pyx_r = NULL;
15854  __Pyx_RefNannyDeclarations
15855  PyObject *__pyx_t_1 = NULL;
15856  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15857  __Pyx_RefNannySetupContext("sin", 0);
15858  __Pyx_XDECREF(__pyx_r);
15859  __pyx_t_2.__pyx_n = 1;
15860  __pyx_t_2.i = __pyx_v_i;
15861  __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)
15862  __Pyx_GOTREF(__pyx_t_1);
15863  __pyx_r = __pyx_t_1;
15864  __pyx_t_1 = 0;
15865  goto __pyx_L0;
15866 
15867  /* function exit code */
15868  __pyx_L1_error:;
15869  __Pyx_XDECREF(__pyx_t_1);
15870  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15871  __pyx_r = NULL;
15872  __pyx_L0:;
15873  __Pyx_XGIVEREF(__pyx_r);
15874  __Pyx_RefNannyFinishContext();
15875  return __pyx_r;
15876  }
15877 
15878  /* "PyClical.pyx":1698
15879  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15880  *
15881  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15882  * """
15883  * Inverse sine of multivector with optional complexifier.
15884  */
15885 
15886  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15887  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) {
15888  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15889  PyObject *__pyx_r = NULL;
15890  __Pyx_RefNannyDeclarations
15891  int __pyx_t_1;
15892  int __pyx_t_2;
15893  PyObject *__pyx_t_3 = NULL;
15894  Clifford __pyx_t_4;
15895  PyObject *__pyx_t_5 = NULL;
15896  PyObject *__pyx_t_6 = NULL;
15897  PyObject *__pyx_t_7 = NULL;
15898  PyObject *__pyx_t_8 = NULL;
15899  PyObject *__pyx_t_9 = NULL;
15900  PyObject *__pyx_t_10 = NULL;
15901  PyObject *__pyx_t_11 = NULL;
15902  __Pyx_RefNannySetupContext("asin", 0);
15903  if (__pyx_optional_args) {
15904  if (__pyx_optional_args->__pyx_n > 0) {
15905  __pyx_v_i = __pyx_optional_args->i;
15906  }
15907  }
15908 
15909  /* "PyClical.pyx":1711
15910  * {1,2,3}
15911  * """
15912  * if not (i is None): # <<<<<<<<<<<<<<
15913  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15914  * else:
15915  */
15916  __pyx_t_1 = (__pyx_v_i != Py_None);
15917  __pyx_t_2 = (__pyx_t_1 != 0);
15918  if (__pyx_t_2) {
15919 
15920  /* "PyClical.pyx":1712
15921  * """
15922  * if not (i is None):
15923  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15924  * else:
15925  * try:
15926  */
15927  __Pyx_XDECREF(__pyx_r);
15928  __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)
15929  __Pyx_GOTREF(__pyx_t_3);
15930  try {
15931  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15932  } catch(...) {
15933  __Pyx_CppExn2PyErr();
15934  __PYX_ERR(0, 1712, __pyx_L1_error)
15935  }
15936  __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)
15937  __Pyx_GOTREF(__pyx_t_5);
15938  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15939  __pyx_r = __pyx_t_5;
15940  __pyx_t_5 = 0;
15941  goto __pyx_L0;
15942 
15943  /* "PyClical.pyx":1711
15944  * {1,2,3}
15945  * """
15946  * if not (i is None): # <<<<<<<<<<<<<<
15947  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15948  * else:
15949  */
15950  }
15951 
15952  /* "PyClical.pyx":1714
15953  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15954  * else:
15955  * try: # <<<<<<<<<<<<<<
15956  * return math.asin(obj)
15957  * except:
15958  */
15959  /*else*/ {
15960  {
15961  __Pyx_PyThreadState_declare
15962  __Pyx_PyThreadState_assign
15963  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15964  __Pyx_XGOTREF(__pyx_t_6);
15965  __Pyx_XGOTREF(__pyx_t_7);
15966  __Pyx_XGOTREF(__pyx_t_8);
15967  /*try:*/ {
15968 
15969  /* "PyClical.pyx":1715
15970  * else:
15971  * try:
15972  * return math.asin(obj) # <<<<<<<<<<<<<<
15973  * except:
15974  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15975  */
15976  __Pyx_XDECREF(__pyx_r);
15977  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15978  __Pyx_GOTREF(__pyx_t_3);
15979  __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)
15980  __Pyx_GOTREF(__pyx_t_9);
15981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15982  __pyx_t_3 = NULL;
15983  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15984  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15985  if (likely(__pyx_t_3)) {
15986  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15987  __Pyx_INCREF(__pyx_t_3);
15988  __Pyx_INCREF(function);
15989  __Pyx_DECREF_SET(__pyx_t_9, function);
15990  }
15991  }
15992  if (!__pyx_t_3) {
15993  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15994  __Pyx_GOTREF(__pyx_t_5);
15995  } else {
15996  #if CYTHON_FAST_PYCALL
15997  if (PyFunction_Check(__pyx_t_9)) {
15998  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15999  __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)
16000  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16001  __Pyx_GOTREF(__pyx_t_5);
16002  } else
16003  #endif
16004  #if CYTHON_FAST_PYCCALL
16005  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16006  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16007  __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)
16008  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16009  __Pyx_GOTREF(__pyx_t_5);
16010  } else
16011  #endif
16012  {
16013  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L4_error)
16014  __Pyx_GOTREF(__pyx_t_10);
16015  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16016  __Pyx_INCREF(__pyx_v_obj);
16017  __Pyx_GIVEREF(__pyx_v_obj);
16018  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16019  __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)
16020  __Pyx_GOTREF(__pyx_t_5);
16021  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16022  }
16023  }
16024  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16025  __pyx_r = __pyx_t_5;
16026  __pyx_t_5 = 0;
16027  goto __pyx_L8_try_return;
16028 
16029  /* "PyClical.pyx":1714
16030  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16031  * else:
16032  * try: # <<<<<<<<<<<<<<
16033  * return math.asin(obj)
16034  * except:
16035  */
16036  }
16037  __pyx_L4_error:;
16038  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16039  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16040  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16041  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16042 
16043  /* "PyClical.pyx":1716
16044  * try:
16045  * return math.asin(obj)
16046  * except: # <<<<<<<<<<<<<<
16047  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16048  *
16049  */
16050  /*except:*/ {
16051  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16052  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
16053  __Pyx_GOTREF(__pyx_t_5);
16054  __Pyx_GOTREF(__pyx_t_9);
16055  __Pyx_GOTREF(__pyx_t_10);
16056 
16057  /* "PyClical.pyx":1717
16058  * return math.asin(obj)
16059  * except:
16060  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16061  *
16062  * cpdef inline sinh(obj):
16063  */
16064  __Pyx_XDECREF(__pyx_r);
16065  __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)
16066  __Pyx_GOTREF(__pyx_t_3);
16067  __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)
16068  __Pyx_GOTREF(__pyx_t_11);
16069  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16070  __pyx_r = __pyx_t_11;
16071  __pyx_t_11 = 0;
16072  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16073  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16074  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16075  goto __pyx_L7_except_return;
16076  }
16077  __pyx_L6_except_error:;
16078 
16079  /* "PyClical.pyx":1714
16080  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16081  * else:
16082  * try: # <<<<<<<<<<<<<<
16083  * return math.asin(obj)
16084  * except:
16085  */
16086  __Pyx_XGIVEREF(__pyx_t_6);
16087  __Pyx_XGIVEREF(__pyx_t_7);
16088  __Pyx_XGIVEREF(__pyx_t_8);
16089  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16090  goto __pyx_L1_error;
16091  __pyx_L8_try_return:;
16092  __Pyx_XGIVEREF(__pyx_t_6);
16093  __Pyx_XGIVEREF(__pyx_t_7);
16094  __Pyx_XGIVEREF(__pyx_t_8);
16095  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16096  goto __pyx_L0;
16097  __pyx_L7_except_return:;
16098  __Pyx_XGIVEREF(__pyx_t_6);
16099  __Pyx_XGIVEREF(__pyx_t_7);
16100  __Pyx_XGIVEREF(__pyx_t_8);
16101  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16102  goto __pyx_L0;
16103  }
16104  }
16105 
16106  /* "PyClical.pyx":1698
16107  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16108  *
16109  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16110  * """
16111  * Inverse sine of multivector with optional complexifier.
16112  */
16113 
16114  /* function exit code */
16115  __pyx_L1_error:;
16116  __Pyx_XDECREF(__pyx_t_3);
16117  __Pyx_XDECREF(__pyx_t_5);
16118  __Pyx_XDECREF(__pyx_t_9);
16119  __Pyx_XDECREF(__pyx_t_10);
16120  __Pyx_XDECREF(__pyx_t_11);
16121  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16122  __pyx_r = 0;
16123  __pyx_L0:;
16124  __Pyx_XGIVEREF(__pyx_r);
16125  __Pyx_RefNannyFinishContext();
16126  return __pyx_r;
16127  }
16128 
16129  /* Python wrapper */
16130  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16131  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 ";
16132  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16133  PyObject *__pyx_v_obj = 0;
16134  PyObject *__pyx_v_i = 0;
16135  PyObject *__pyx_r = 0;
16136  __Pyx_RefNannyDeclarations
16137  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
16138  {
16139  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16140  PyObject* values[2] = {0,0};
16141  values[1] = ((PyObject *)Py_None);
16142  if (unlikely(__pyx_kwds)) {
16143  Py_ssize_t kw_args;
16144  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16145  switch (pos_args) {
16146  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16147  CYTHON_FALLTHROUGH;
16148  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16149  CYTHON_FALLTHROUGH;
16150  case 0: break;
16151  default: goto __pyx_L5_argtuple_error;
16152  }
16153  kw_args = PyDict_Size(__pyx_kwds);
16154  switch (pos_args) {
16155  case 0:
16156  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16157  else goto __pyx_L5_argtuple_error;
16158  CYTHON_FALLTHROUGH;
16159  case 1:
16160  if (kw_args > 0) {
16161  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16162  if (value) { values[1] = value; kw_args--; }
16163  }
16164  }
16165  if (unlikely(kw_args > 0)) {
16166  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
16167  }
16168  } else {
16169  switch (PyTuple_GET_SIZE(__pyx_args)) {
16170  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16171  CYTHON_FALLTHROUGH;
16172  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16173  break;
16174  default: goto __pyx_L5_argtuple_error;
16175  }
16176  }
16177  __pyx_v_obj = values[0];
16178  __pyx_v_i = values[1];
16179  }
16180  goto __pyx_L4_argument_unpacking_done;
16181  __pyx_L5_argtuple_error:;
16182  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
16183  __pyx_L3_error:;
16184  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16185  __Pyx_RefNannyFinishContext();
16186  return NULL;
16187  __pyx_L4_argument_unpacking_done:;
16188  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16189 
16190  /* function exit code */
16191  __Pyx_RefNannyFinishContext();
16192  return __pyx_r;
16193  }
16194 
16195  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16196  PyObject *__pyx_r = NULL;
16197  __Pyx_RefNannyDeclarations
16198  PyObject *__pyx_t_1 = NULL;
16199  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
16200  __Pyx_RefNannySetupContext("asin", 0);
16201  __Pyx_XDECREF(__pyx_r);
16202  __pyx_t_2.__pyx_n = 1;
16203  __pyx_t_2.i = __pyx_v_i;
16204  __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)
16205  __Pyx_GOTREF(__pyx_t_1);
16206  __pyx_r = __pyx_t_1;
16207  __pyx_t_1 = 0;
16208  goto __pyx_L0;
16209 
16210  /* function exit code */
16211  __pyx_L1_error:;
16212  __Pyx_XDECREF(__pyx_t_1);
16213  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16214  __pyx_r = NULL;
16215  __pyx_L0:;
16216  __Pyx_XGIVEREF(__pyx_r);
16217  __Pyx_RefNannyFinishContext();
16218  return __pyx_r;
16219  }
16220 
16221  /* "PyClical.pyx":1719
16222  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16223  *
16224  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16225  * """
16226  * Hyperbolic sine of multivector.
16227  */
16228 
16229  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16230  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16231  PyObject *__pyx_r = NULL;
16232  __Pyx_RefNannyDeclarations
16233  PyObject *__pyx_t_1 = NULL;
16234  PyObject *__pyx_t_2 = NULL;
16235  PyObject *__pyx_t_3 = NULL;
16236  PyObject *__pyx_t_4 = NULL;
16237  PyObject *__pyx_t_5 = NULL;
16238  PyObject *__pyx_t_6 = NULL;
16239  PyObject *__pyx_t_7 = NULL;
16240  PyObject *__pyx_t_8 = NULL;
16241  __Pyx_RefNannySetupContext("sinh", 0);
16242 
16243  /* "PyClical.pyx":1728
16244  * 0.5{1,2}
16245  * """
16246  * try: # <<<<<<<<<<<<<<
16247  * return math.sinh(obj)
16248  * except:
16249  */
16250  {
16251  __Pyx_PyThreadState_declare
16252  __Pyx_PyThreadState_assign
16253  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16254  __Pyx_XGOTREF(__pyx_t_1);
16255  __Pyx_XGOTREF(__pyx_t_2);
16256  __Pyx_XGOTREF(__pyx_t_3);
16257  /*try:*/ {
16258 
16259  /* "PyClical.pyx":1729
16260  * """
16261  * try:
16262  * return math.sinh(obj) # <<<<<<<<<<<<<<
16263  * except:
16264  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16265  */
16266  __Pyx_XDECREF(__pyx_r);
16267  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
16268  __Pyx_GOTREF(__pyx_t_5);
16269  __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)
16270  __Pyx_GOTREF(__pyx_t_6);
16271  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16272  __pyx_t_5 = NULL;
16273  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16274  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16275  if (likely(__pyx_t_5)) {
16276  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16277  __Pyx_INCREF(__pyx_t_5);
16278  __Pyx_INCREF(function);
16279  __Pyx_DECREF_SET(__pyx_t_6, function);
16280  }
16281  }
16282  if (!__pyx_t_5) {
16283  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16284  __Pyx_GOTREF(__pyx_t_4);
16285  } else {
16286  #if CYTHON_FAST_PYCALL
16287  if (PyFunction_Check(__pyx_t_6)) {
16288  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16289  __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)
16290  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16291  __Pyx_GOTREF(__pyx_t_4);
16292  } else
16293  #endif
16294  #if CYTHON_FAST_PYCCALL
16295  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16296  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16297  __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)
16298  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16299  __Pyx_GOTREF(__pyx_t_4);
16300  } else
16301  #endif
16302  {
16303  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1729, __pyx_L3_error)
16304  __Pyx_GOTREF(__pyx_t_7);
16305  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16306  __Pyx_INCREF(__pyx_v_obj);
16307  __Pyx_GIVEREF(__pyx_v_obj);
16308  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16309  __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)
16310  __Pyx_GOTREF(__pyx_t_4);
16311  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16312  }
16313  }
16314  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16315  __pyx_r = __pyx_t_4;
16316  __pyx_t_4 = 0;
16317  goto __pyx_L7_try_return;
16318 
16319  /* "PyClical.pyx":1728
16320  * 0.5{1,2}
16321  * """
16322  * try: # <<<<<<<<<<<<<<
16323  * return math.sinh(obj)
16324  * except:
16325  */
16326  }
16327  __pyx_L3_error:;
16328  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16329  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16330  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16331  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16332 
16333  /* "PyClical.pyx":1730
16334  * try:
16335  * return math.sinh(obj)
16336  * except: # <<<<<<<<<<<<<<
16337  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16338  *
16339  */
16340  /*except:*/ {
16341  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16342  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16343  __Pyx_GOTREF(__pyx_t_4);
16344  __Pyx_GOTREF(__pyx_t_6);
16345  __Pyx_GOTREF(__pyx_t_7);
16346 
16347  /* "PyClical.pyx":1731
16348  * return math.sinh(obj)
16349  * except:
16350  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16351  *
16352  * cpdef inline asinh(obj,i = None):
16353  */
16354  __Pyx_XDECREF(__pyx_r);
16355  __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)
16356  __Pyx_GOTREF(__pyx_t_5);
16357  __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)
16358  __Pyx_GOTREF(__pyx_t_8);
16359  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16360  __pyx_r = __pyx_t_8;
16361  __pyx_t_8 = 0;
16362  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16363  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16364  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16365  goto __pyx_L6_except_return;
16366  }
16367  __pyx_L5_except_error:;
16368 
16369  /* "PyClical.pyx":1728
16370  * 0.5{1,2}
16371  * """
16372  * try: # <<<<<<<<<<<<<<
16373  * return math.sinh(obj)
16374  * except:
16375  */
16376  __Pyx_XGIVEREF(__pyx_t_1);
16377  __Pyx_XGIVEREF(__pyx_t_2);
16378  __Pyx_XGIVEREF(__pyx_t_3);
16379  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16380  goto __pyx_L1_error;
16381  __pyx_L7_try_return:;
16382  __Pyx_XGIVEREF(__pyx_t_1);
16383  __Pyx_XGIVEREF(__pyx_t_2);
16384  __Pyx_XGIVEREF(__pyx_t_3);
16385  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16386  goto __pyx_L0;
16387  __pyx_L6_except_return:;
16388  __Pyx_XGIVEREF(__pyx_t_1);
16389  __Pyx_XGIVEREF(__pyx_t_2);
16390  __Pyx_XGIVEREF(__pyx_t_3);
16391  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16392  goto __pyx_L0;
16393  }
16394 
16395  /* "PyClical.pyx":1719
16396  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16397  *
16398  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16399  * """
16400  * Hyperbolic sine of multivector.
16401  */
16402 
16403  /* function exit code */
16404  __pyx_L1_error:;
16405  __Pyx_XDECREF(__pyx_t_4);
16406  __Pyx_XDECREF(__pyx_t_5);
16407  __Pyx_XDECREF(__pyx_t_6);
16408  __Pyx_XDECREF(__pyx_t_7);
16409  __Pyx_XDECREF(__pyx_t_8);
16410  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16411  __pyx_r = 0;
16412  __pyx_L0:;
16413  __Pyx_XGIVEREF(__pyx_r);
16414  __Pyx_RefNannyFinishContext();
16415  return __pyx_r;
16416  }
16417 
16418  /* Python wrapper */
16419  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16420  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 ";
16421  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16422  PyObject *__pyx_r = 0;
16423  __Pyx_RefNannyDeclarations
16424  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16425  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16426 
16427  /* function exit code */
16428  __Pyx_RefNannyFinishContext();
16429  return __pyx_r;
16430  }
16431 
16432  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16433  PyObject *__pyx_r = NULL;
16434  __Pyx_RefNannyDeclarations
16435  PyObject *__pyx_t_1 = NULL;
16436  __Pyx_RefNannySetupContext("sinh", 0);
16437  __Pyx_XDECREF(__pyx_r);
16438  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
16439  __Pyx_GOTREF(__pyx_t_1);
16440  __pyx_r = __pyx_t_1;
16441  __pyx_t_1 = 0;
16442  goto __pyx_L0;
16443 
16444  /* function exit code */
16445  __pyx_L1_error:;
16446  __Pyx_XDECREF(__pyx_t_1);
16447  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16448  __pyx_r = NULL;
16449  __pyx_L0:;
16450  __Pyx_XGIVEREF(__pyx_r);
16451  __Pyx_RefNannyFinishContext();
16452  return __pyx_r;
16453  }
16454 
16455  /* "PyClical.pyx":1733
16456  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16457  *
16458  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16459  * """
16460  * Inverse hyperbolic sine of multivector with optional complexifier.
16461  */
16462 
16463  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16464  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) {
16465  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16466  PyObject *__pyx_r = NULL;
16467  __Pyx_RefNannyDeclarations
16468  int __pyx_t_1;
16469  int __pyx_t_2;
16470  PyObject *__pyx_t_3 = NULL;
16471  Clifford __pyx_t_4;
16472  PyObject *__pyx_t_5 = NULL;
16473  PyObject *__pyx_t_6 = NULL;
16474  PyObject *__pyx_t_7 = NULL;
16475  PyObject *__pyx_t_8 = NULL;
16476  PyObject *__pyx_t_9 = NULL;
16477  PyObject *__pyx_t_10 = NULL;
16478  PyObject *__pyx_t_11 = NULL;
16479  __Pyx_RefNannySetupContext("asinh", 0);
16480  if (__pyx_optional_args) {
16481  if (__pyx_optional_args->__pyx_n > 0) {
16482  __pyx_v_i = __pyx_optional_args->i;
16483  }
16484  }
16485 
16486  /* "PyClical.pyx":1744
16487  * {1,2}
16488  * """
16489  * if not (i is None): # <<<<<<<<<<<<<<
16490  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16491  * else:
16492  */
16493  __pyx_t_1 = (__pyx_v_i != Py_None);
16494  __pyx_t_2 = (__pyx_t_1 != 0);
16495  if (__pyx_t_2) {
16496 
16497  /* "PyClical.pyx":1745
16498  * """
16499  * if not (i is None):
16500  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16501  * else:
16502  * try:
16503  */
16504  __Pyx_XDECREF(__pyx_r);
16505  __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)
16506  __Pyx_GOTREF(__pyx_t_3);
16507  try {
16508  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16509  } catch(...) {
16510  __Pyx_CppExn2PyErr();
16511  __PYX_ERR(0, 1745, __pyx_L1_error)
16512  }
16513  __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)
16514  __Pyx_GOTREF(__pyx_t_5);
16515  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16516  __pyx_r = __pyx_t_5;
16517  __pyx_t_5 = 0;
16518  goto __pyx_L0;
16519 
16520  /* "PyClical.pyx":1744
16521  * {1,2}
16522  * """
16523  * if not (i is None): # <<<<<<<<<<<<<<
16524  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16525  * else:
16526  */
16527  }
16528 
16529  /* "PyClical.pyx":1747
16530  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16531  * else:
16532  * try: # <<<<<<<<<<<<<<
16533  * return math.asinh(obj)
16534  * except:
16535  */
16536  /*else*/ {
16537  {
16538  __Pyx_PyThreadState_declare
16539  __Pyx_PyThreadState_assign
16540  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16541  __Pyx_XGOTREF(__pyx_t_6);
16542  __Pyx_XGOTREF(__pyx_t_7);
16543  __Pyx_XGOTREF(__pyx_t_8);
16544  /*try:*/ {
16545 
16546  /* "PyClical.pyx":1748
16547  * else:
16548  * try:
16549  * return math.asinh(obj) # <<<<<<<<<<<<<<
16550  * except:
16551  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16552  */
16553  __Pyx_XDECREF(__pyx_r);
16554  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16555  __Pyx_GOTREF(__pyx_t_3);
16556  __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)
16557  __Pyx_GOTREF(__pyx_t_9);
16558  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16559  __pyx_t_3 = NULL;
16560  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16561  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16562  if (likely(__pyx_t_3)) {
16563  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16564  __Pyx_INCREF(__pyx_t_3);
16565  __Pyx_INCREF(function);
16566  __Pyx_DECREF_SET(__pyx_t_9, function);
16567  }
16568  }
16569  if (!__pyx_t_3) {
16570  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16571  __Pyx_GOTREF(__pyx_t_5);
16572  } else {
16573  #if CYTHON_FAST_PYCALL
16574  if (PyFunction_Check(__pyx_t_9)) {
16575  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16576  __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)
16577  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16578  __Pyx_GOTREF(__pyx_t_5);
16579  } else
16580  #endif
16581  #if CYTHON_FAST_PYCCALL
16582  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16583  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16584  __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)
16585  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16586  __Pyx_GOTREF(__pyx_t_5);
16587  } else
16588  #endif
16589  {
16590  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1748, __pyx_L4_error)
16591  __Pyx_GOTREF(__pyx_t_10);
16592  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16593  __Pyx_INCREF(__pyx_v_obj);
16594  __Pyx_GIVEREF(__pyx_v_obj);
16595  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16596  __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)
16597  __Pyx_GOTREF(__pyx_t_5);
16598  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16599  }
16600  }
16601  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16602  __pyx_r = __pyx_t_5;
16603  __pyx_t_5 = 0;
16604  goto __pyx_L8_try_return;
16605 
16606  /* "PyClical.pyx":1747
16607  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16608  * else:
16609  * try: # <<<<<<<<<<<<<<
16610  * return math.asinh(obj)
16611  * except:
16612  */
16613  }
16614  __pyx_L4_error:;
16615  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16616  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16617  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16618  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16619 
16620  /* "PyClical.pyx":1749
16621  * try:
16622  * return math.asinh(obj)
16623  * except: # <<<<<<<<<<<<<<
16624  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16625  *
16626  */
16627  /*except:*/ {
16628  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16629  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16630  __Pyx_GOTREF(__pyx_t_5);
16631  __Pyx_GOTREF(__pyx_t_9);
16632  __Pyx_GOTREF(__pyx_t_10);
16633 
16634  /* "PyClical.pyx":1750
16635  * return math.asinh(obj)
16636  * except:
16637  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16638  *
16639  * cpdef inline tan(obj,i = None):
16640  */
16641  __Pyx_XDECREF(__pyx_r);
16642  __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)
16643  __Pyx_GOTREF(__pyx_t_3);
16644  __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)
16645  __Pyx_GOTREF(__pyx_t_11);
16646  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16647  __pyx_r = __pyx_t_11;
16648  __pyx_t_11 = 0;
16649  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16650  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16651  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16652  goto __pyx_L7_except_return;
16653  }
16654  __pyx_L6_except_error:;
16655 
16656  /* "PyClical.pyx":1747
16657  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16658  * else:
16659  * try: # <<<<<<<<<<<<<<
16660  * return math.asinh(obj)
16661  * except:
16662  */
16663  __Pyx_XGIVEREF(__pyx_t_6);
16664  __Pyx_XGIVEREF(__pyx_t_7);
16665  __Pyx_XGIVEREF(__pyx_t_8);
16666  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16667  goto __pyx_L1_error;
16668  __pyx_L8_try_return:;
16669  __Pyx_XGIVEREF(__pyx_t_6);
16670  __Pyx_XGIVEREF(__pyx_t_7);
16671  __Pyx_XGIVEREF(__pyx_t_8);
16672  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16673  goto __pyx_L0;
16674  __pyx_L7_except_return:;
16675  __Pyx_XGIVEREF(__pyx_t_6);
16676  __Pyx_XGIVEREF(__pyx_t_7);
16677  __Pyx_XGIVEREF(__pyx_t_8);
16678  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16679  goto __pyx_L0;
16680  }
16681  }
16682 
16683  /* "PyClical.pyx":1733
16684  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16685  *
16686  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16687  * """
16688  * Inverse hyperbolic sine of multivector with optional complexifier.
16689  */
16690 
16691  /* function exit code */
16692  __pyx_L1_error:;
16693  __Pyx_XDECREF(__pyx_t_3);
16694  __Pyx_XDECREF(__pyx_t_5);
16695  __Pyx_XDECREF(__pyx_t_9);
16696  __Pyx_XDECREF(__pyx_t_10);
16697  __Pyx_XDECREF(__pyx_t_11);
16698  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16699  __pyx_r = 0;
16700  __pyx_L0:;
16701  __Pyx_XGIVEREF(__pyx_r);
16702  __Pyx_RefNannyFinishContext();
16703  return __pyx_r;
16704  }
16705 
16706  /* Python wrapper */
16707  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16708  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 ";
16709  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16710  PyObject *__pyx_v_obj = 0;
16711  PyObject *__pyx_v_i = 0;
16712  PyObject *__pyx_r = 0;
16713  __Pyx_RefNannyDeclarations
16714  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16715  {
16716  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16717  PyObject* values[2] = {0,0};
16718  values[1] = ((PyObject *)Py_None);
16719  if (unlikely(__pyx_kwds)) {
16720  Py_ssize_t kw_args;
16721  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16722  switch (pos_args) {
16723  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16724  CYTHON_FALLTHROUGH;
16725  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16726  CYTHON_FALLTHROUGH;
16727  case 0: break;
16728  default: goto __pyx_L5_argtuple_error;
16729  }
16730  kw_args = PyDict_Size(__pyx_kwds);
16731  switch (pos_args) {
16732  case 0:
16733  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16734  else goto __pyx_L5_argtuple_error;
16735  CYTHON_FALLTHROUGH;
16736  case 1:
16737  if (kw_args > 0) {
16738  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16739  if (value) { values[1] = value; kw_args--; }
16740  }
16741  }
16742  if (unlikely(kw_args > 0)) {
16743  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16744  }
16745  } else {
16746  switch (PyTuple_GET_SIZE(__pyx_args)) {
16747  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16748  CYTHON_FALLTHROUGH;
16749  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16750  break;
16751  default: goto __pyx_L5_argtuple_error;
16752  }
16753  }
16754  __pyx_v_obj = values[0];
16755  __pyx_v_i = values[1];
16756  }
16757  goto __pyx_L4_argument_unpacking_done;
16758  __pyx_L5_argtuple_error:;
16759  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16760  __pyx_L3_error:;
16761  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16762  __Pyx_RefNannyFinishContext();
16763  return NULL;
16764  __pyx_L4_argument_unpacking_done:;
16765  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16766 
16767  /* function exit code */
16768  __Pyx_RefNannyFinishContext();
16769  return __pyx_r;
16770  }
16771 
16772  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16773  PyObject *__pyx_r = NULL;
16774  __Pyx_RefNannyDeclarations
16775  PyObject *__pyx_t_1 = NULL;
16776  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16777  __Pyx_RefNannySetupContext("asinh", 0);
16778  __Pyx_XDECREF(__pyx_r);
16779  __pyx_t_2.__pyx_n = 1;
16780  __pyx_t_2.i = __pyx_v_i;
16781  __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)
16782  __Pyx_GOTREF(__pyx_t_1);
16783  __pyx_r = __pyx_t_1;
16784  __pyx_t_1 = 0;
16785  goto __pyx_L0;
16786 
16787  /* function exit code */
16788  __pyx_L1_error:;
16789  __Pyx_XDECREF(__pyx_t_1);
16790  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16791  __pyx_r = NULL;
16792  __pyx_L0:;
16793  __Pyx_XGIVEREF(__pyx_r);
16794  __Pyx_RefNannyFinishContext();
16795  return __pyx_r;
16796  }
16797 
16798  /* "PyClical.pyx":1752
16799  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16800  *
16801  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16802  * """
16803  * Tangent of multivector with optional complexifier.
16804  */
16805 
16806  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16807  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) {
16808  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16809  PyObject *__pyx_r = NULL;
16810  __Pyx_RefNannyDeclarations
16811  int __pyx_t_1;
16812  int __pyx_t_2;
16813  PyObject *__pyx_t_3 = NULL;
16814  Clifford __pyx_t_4;
16815  PyObject *__pyx_t_5 = NULL;
16816  PyObject *__pyx_t_6 = NULL;
16817  PyObject *__pyx_t_7 = NULL;
16818  PyObject *__pyx_t_8 = NULL;
16819  PyObject *__pyx_t_9 = NULL;
16820  PyObject *__pyx_t_10 = NULL;
16821  PyObject *__pyx_t_11 = NULL;
16822  __Pyx_RefNannySetupContext("tan", 0);
16823  if (__pyx_optional_args) {
16824  if (__pyx_optional_args->__pyx_n > 0) {
16825  __pyx_v_i = __pyx_optional_args->i;
16826  }
16827  }
16828 
16829  /* "PyClical.pyx":1761
16830  * 0.7616{1,2}
16831  * """
16832  * if not (i is None): # <<<<<<<<<<<<<<
16833  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16834  * else:
16835  */
16836  __pyx_t_1 = (__pyx_v_i != Py_None);
16837  __pyx_t_2 = (__pyx_t_1 != 0);
16838  if (__pyx_t_2) {
16839 
16840  /* "PyClical.pyx":1762
16841  * """
16842  * if not (i is None):
16843  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16844  * else:
16845  * try:
16846  */
16847  __Pyx_XDECREF(__pyx_r);
16848  __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)
16849  __Pyx_GOTREF(__pyx_t_3);
16850  try {
16851  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16852  } catch(...) {
16853  __Pyx_CppExn2PyErr();
16854  __PYX_ERR(0, 1762, __pyx_L1_error)
16855  }
16856  __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)
16857  __Pyx_GOTREF(__pyx_t_5);
16858  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16859  __pyx_r = __pyx_t_5;
16860  __pyx_t_5 = 0;
16861  goto __pyx_L0;
16862 
16863  /* "PyClical.pyx":1761
16864  * 0.7616{1,2}
16865  * """
16866  * if not (i is None): # <<<<<<<<<<<<<<
16867  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16868  * else:
16869  */
16870  }
16871 
16872  /* "PyClical.pyx":1764
16873  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16874  * else:
16875  * try: # <<<<<<<<<<<<<<
16876  * return math.tan(obj)
16877  * except:
16878  */
16879  /*else*/ {
16880  {
16881  __Pyx_PyThreadState_declare
16882  __Pyx_PyThreadState_assign
16883  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16884  __Pyx_XGOTREF(__pyx_t_6);
16885  __Pyx_XGOTREF(__pyx_t_7);
16886  __Pyx_XGOTREF(__pyx_t_8);
16887  /*try:*/ {
16888 
16889  /* "PyClical.pyx":1765
16890  * else:
16891  * try:
16892  * return math.tan(obj) # <<<<<<<<<<<<<<
16893  * except:
16894  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16895  */
16896  __Pyx_XDECREF(__pyx_r);
16897  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16898  __Pyx_GOTREF(__pyx_t_3);
16899  __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)
16900  __Pyx_GOTREF(__pyx_t_9);
16901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16902  __pyx_t_3 = NULL;
16903  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16904  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16905  if (likely(__pyx_t_3)) {
16906  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16907  __Pyx_INCREF(__pyx_t_3);
16908  __Pyx_INCREF(function);
16909  __Pyx_DECREF_SET(__pyx_t_9, function);
16910  }
16911  }
16912  if (!__pyx_t_3) {
16913  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16914  __Pyx_GOTREF(__pyx_t_5);
16915  } else {
16916  #if CYTHON_FAST_PYCALL
16917  if (PyFunction_Check(__pyx_t_9)) {
16918  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16919  __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)
16920  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16921  __Pyx_GOTREF(__pyx_t_5);
16922  } else
16923  #endif
16924  #if CYTHON_FAST_PYCCALL
16925  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16926  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16927  __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)
16928  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16929  __Pyx_GOTREF(__pyx_t_5);
16930  } else
16931  #endif
16932  {
16933  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1765, __pyx_L4_error)
16934  __Pyx_GOTREF(__pyx_t_10);
16935  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16936  __Pyx_INCREF(__pyx_v_obj);
16937  __Pyx_GIVEREF(__pyx_v_obj);
16938  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16939  __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)
16940  __Pyx_GOTREF(__pyx_t_5);
16941  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16942  }
16943  }
16944  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16945  __pyx_r = __pyx_t_5;
16946  __pyx_t_5 = 0;
16947  goto __pyx_L8_try_return;
16948 
16949  /* "PyClical.pyx":1764
16950  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16951  * else:
16952  * try: # <<<<<<<<<<<<<<
16953  * return math.tan(obj)
16954  * except:
16955  */
16956  }
16957  __pyx_L4_error:;
16958  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16959  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16960  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16961  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16962 
16963  /* "PyClical.pyx":1766
16964  * try:
16965  * return math.tan(obj)
16966  * except: # <<<<<<<<<<<<<<
16967  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16968  *
16969  */
16970  /*except:*/ {
16971  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16972  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16973  __Pyx_GOTREF(__pyx_t_5);
16974  __Pyx_GOTREF(__pyx_t_9);
16975  __Pyx_GOTREF(__pyx_t_10);
16976 
16977  /* "PyClical.pyx":1767
16978  * return math.tan(obj)
16979  * except:
16980  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16981  *
16982  * cpdef inline atan(obj,i = None):
16983  */
16984  __Pyx_XDECREF(__pyx_r);
16985  __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)
16986  __Pyx_GOTREF(__pyx_t_3);
16987  __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)
16988  __Pyx_GOTREF(__pyx_t_11);
16989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16990  __pyx_r = __pyx_t_11;
16991  __pyx_t_11 = 0;
16992  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16993  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16994  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16995  goto __pyx_L7_except_return;
16996  }
16997  __pyx_L6_except_error:;
16998 
16999  /* "PyClical.pyx":1764
17000  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17001  * else:
17002  * try: # <<<<<<<<<<<<<<
17003  * return math.tan(obj)
17004  * except:
17005  */
17006  __Pyx_XGIVEREF(__pyx_t_6);
17007  __Pyx_XGIVEREF(__pyx_t_7);
17008  __Pyx_XGIVEREF(__pyx_t_8);
17009  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17010  goto __pyx_L1_error;
17011  __pyx_L8_try_return:;
17012  __Pyx_XGIVEREF(__pyx_t_6);
17013  __Pyx_XGIVEREF(__pyx_t_7);
17014  __Pyx_XGIVEREF(__pyx_t_8);
17015  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17016  goto __pyx_L0;
17017  __pyx_L7_except_return:;
17018  __Pyx_XGIVEREF(__pyx_t_6);
17019  __Pyx_XGIVEREF(__pyx_t_7);
17020  __Pyx_XGIVEREF(__pyx_t_8);
17021  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17022  goto __pyx_L0;
17023  }
17024  }
17025 
17026  /* "PyClical.pyx":1752
17027  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17028  *
17029  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17030  * """
17031  * Tangent of multivector with optional complexifier.
17032  */
17033 
17034  /* function exit code */
17035  __pyx_L1_error:;
17036  __Pyx_XDECREF(__pyx_t_3);
17037  __Pyx_XDECREF(__pyx_t_5);
17038  __Pyx_XDECREF(__pyx_t_9);
17039  __Pyx_XDECREF(__pyx_t_10);
17040  __Pyx_XDECREF(__pyx_t_11);
17041  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17042  __pyx_r = 0;
17043  __pyx_L0:;
17044  __Pyx_XGIVEREF(__pyx_r);
17045  __Pyx_RefNannyFinishContext();
17046  return __pyx_r;
17047  }
17048 
17049  /* Python wrapper */
17050  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17051  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 ";
17052  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17053  PyObject *__pyx_v_obj = 0;
17054  PyObject *__pyx_v_i = 0;
17055  PyObject *__pyx_r = 0;
17056  __Pyx_RefNannyDeclarations
17057  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
17058  {
17059  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17060  PyObject* values[2] = {0,0};
17061  values[1] = ((PyObject *)Py_None);
17062  if (unlikely(__pyx_kwds)) {
17063  Py_ssize_t kw_args;
17064  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17065  switch (pos_args) {
17066  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17067  CYTHON_FALLTHROUGH;
17068  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17069  CYTHON_FALLTHROUGH;
17070  case 0: break;
17071  default: goto __pyx_L5_argtuple_error;
17072  }
17073  kw_args = PyDict_Size(__pyx_kwds);
17074  switch (pos_args) {
17075  case 0:
17076  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17077  else goto __pyx_L5_argtuple_error;
17078  CYTHON_FALLTHROUGH;
17079  case 1:
17080  if (kw_args > 0) {
17081  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17082  if (value) { values[1] = value; kw_args--; }
17083  }
17084  }
17085  if (unlikely(kw_args > 0)) {
17086  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
17087  }
17088  } else {
17089  switch (PyTuple_GET_SIZE(__pyx_args)) {
17090  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17091  CYTHON_FALLTHROUGH;
17092  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17093  break;
17094  default: goto __pyx_L5_argtuple_error;
17095  }
17096  }
17097  __pyx_v_obj = values[0];
17098  __pyx_v_i = values[1];
17099  }
17100  goto __pyx_L4_argument_unpacking_done;
17101  __pyx_L5_argtuple_error:;
17102  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
17103  __pyx_L3_error:;
17104  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17105  __Pyx_RefNannyFinishContext();
17106  return NULL;
17107  __pyx_L4_argument_unpacking_done:;
17108  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17109 
17110  /* function exit code */
17111  __Pyx_RefNannyFinishContext();
17112  return __pyx_r;
17113  }
17114 
17115  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17116  PyObject *__pyx_r = NULL;
17117  __Pyx_RefNannyDeclarations
17118  PyObject *__pyx_t_1 = NULL;
17119  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
17120  __Pyx_RefNannySetupContext("tan", 0);
17121  __Pyx_XDECREF(__pyx_r);
17122  __pyx_t_2.__pyx_n = 1;
17123  __pyx_t_2.i = __pyx_v_i;
17124  __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)
17125  __Pyx_GOTREF(__pyx_t_1);
17126  __pyx_r = __pyx_t_1;
17127  __pyx_t_1 = 0;
17128  goto __pyx_L0;
17129 
17130  /* function exit code */
17131  __pyx_L1_error:;
17132  __Pyx_XDECREF(__pyx_t_1);
17133  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17134  __pyx_r = NULL;
17135  __pyx_L0:;
17136  __Pyx_XGIVEREF(__pyx_r);
17137  __Pyx_RefNannyFinishContext();
17138  return __pyx_r;
17139  }
17140 
17141  /* "PyClical.pyx":1769
17142  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17143  *
17144  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17145  * """
17146  * Inverse tangent of multivector with optional complexifier.
17147  */
17148 
17149  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17150  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) {
17151  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17152  PyObject *__pyx_r = NULL;
17153  __Pyx_RefNannyDeclarations
17154  int __pyx_t_1;
17155  int __pyx_t_2;
17156  PyObject *__pyx_t_3 = NULL;
17157  Clifford __pyx_t_4;
17158  PyObject *__pyx_t_5 = NULL;
17159  PyObject *__pyx_t_6 = NULL;
17160  PyObject *__pyx_t_7 = NULL;
17161  PyObject *__pyx_t_8 = NULL;
17162  PyObject *__pyx_t_9 = NULL;
17163  PyObject *__pyx_t_10 = NULL;
17164  PyObject *__pyx_t_11 = NULL;
17165  __Pyx_RefNannySetupContext("atan", 0);
17166  if (__pyx_optional_args) {
17167  if (__pyx_optional_args->__pyx_n > 0) {
17168  __pyx_v_i = __pyx_optional_args->i;
17169  }
17170  }
17171 
17172  /* "PyClical.pyx":1778
17173  * {1}
17174  * """
17175  * if not (i is None): # <<<<<<<<<<<<<<
17176  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17177  * else:
17178  */
17179  __pyx_t_1 = (__pyx_v_i != Py_None);
17180  __pyx_t_2 = (__pyx_t_1 != 0);
17181  if (__pyx_t_2) {
17182 
17183  /* "PyClical.pyx":1779
17184  * """
17185  * if not (i is None):
17186  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17187  * else:
17188  * try:
17189  */
17190  __Pyx_XDECREF(__pyx_r);
17191  __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)
17192  __Pyx_GOTREF(__pyx_t_3);
17193  try {
17194  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17195  } catch(...) {
17196  __Pyx_CppExn2PyErr();
17197  __PYX_ERR(0, 1779, __pyx_L1_error)
17198  }
17199  __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)
17200  __Pyx_GOTREF(__pyx_t_5);
17201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17202  __pyx_r = __pyx_t_5;
17203  __pyx_t_5 = 0;
17204  goto __pyx_L0;
17205 
17206  /* "PyClical.pyx":1778
17207  * {1}
17208  * """
17209  * if not (i is None): # <<<<<<<<<<<<<<
17210  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17211  * else:
17212  */
17213  }
17214 
17215  /* "PyClical.pyx":1781
17216  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17217  * else:
17218  * try: # <<<<<<<<<<<<<<
17219  * return math.atan(obj)
17220  * except:
17221  */
17222  /*else*/ {
17223  {
17224  __Pyx_PyThreadState_declare
17225  __Pyx_PyThreadState_assign
17226  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17227  __Pyx_XGOTREF(__pyx_t_6);
17228  __Pyx_XGOTREF(__pyx_t_7);
17229  __Pyx_XGOTREF(__pyx_t_8);
17230  /*try:*/ {
17231 
17232  /* "PyClical.pyx":1782
17233  * else:
17234  * try:
17235  * return math.atan(obj) # <<<<<<<<<<<<<<
17236  * except:
17237  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17238  */
17239  __Pyx_XDECREF(__pyx_r);
17240  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
17241  __Pyx_GOTREF(__pyx_t_3);
17242  __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)
17243  __Pyx_GOTREF(__pyx_t_9);
17244  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17245  __pyx_t_3 = NULL;
17246  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17247  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17248  if (likely(__pyx_t_3)) {
17249  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17250  __Pyx_INCREF(__pyx_t_3);
17251  __Pyx_INCREF(function);
17252  __Pyx_DECREF_SET(__pyx_t_9, function);
17253  }
17254  }
17255  if (!__pyx_t_3) {
17256  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17257  __Pyx_GOTREF(__pyx_t_5);
17258  } else {
17259  #if CYTHON_FAST_PYCALL
17260  if (PyFunction_Check(__pyx_t_9)) {
17261  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17262  __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)
17263  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17264  __Pyx_GOTREF(__pyx_t_5);
17265  } else
17266  #endif
17267  #if CYTHON_FAST_PYCCALL
17268  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17269  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17270  __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)
17271  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17272  __Pyx_GOTREF(__pyx_t_5);
17273  } else
17274  #endif
17275  {
17276  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L4_error)
17277  __Pyx_GOTREF(__pyx_t_10);
17278  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17279  __Pyx_INCREF(__pyx_v_obj);
17280  __Pyx_GIVEREF(__pyx_v_obj);
17281  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17282  __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)
17283  __Pyx_GOTREF(__pyx_t_5);
17284  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17285  }
17286  }
17287  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17288  __pyx_r = __pyx_t_5;
17289  __pyx_t_5 = 0;
17290  goto __pyx_L8_try_return;
17291 
17292  /* "PyClical.pyx":1781
17293  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17294  * else:
17295  * try: # <<<<<<<<<<<<<<
17296  * return math.atan(obj)
17297  * except:
17298  */
17299  }
17300  __pyx_L4_error:;
17301  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17302  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17303  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17304  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17305 
17306  /* "PyClical.pyx":1783
17307  * try:
17308  * return math.atan(obj)
17309  * except: # <<<<<<<<<<<<<<
17310  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17311  *
17312  */
17313  /*except:*/ {
17314  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17315  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17316  __Pyx_GOTREF(__pyx_t_5);
17317  __Pyx_GOTREF(__pyx_t_9);
17318  __Pyx_GOTREF(__pyx_t_10);
17319 
17320  /* "PyClical.pyx":1784
17321  * return math.atan(obj)
17322  * except:
17323  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17324  *
17325  * cpdef inline tanh(obj):
17326  */
17327  __Pyx_XDECREF(__pyx_r);
17328  __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)
17329  __Pyx_GOTREF(__pyx_t_3);
17330  __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)
17331  __Pyx_GOTREF(__pyx_t_11);
17332  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17333  __pyx_r = __pyx_t_11;
17334  __pyx_t_11 = 0;
17335  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17336  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17337  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17338  goto __pyx_L7_except_return;
17339  }
17340  __pyx_L6_except_error:;
17341 
17342  /* "PyClical.pyx":1781
17343  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17344  * else:
17345  * try: # <<<<<<<<<<<<<<
17346  * return math.atan(obj)
17347  * except:
17348  */
17349  __Pyx_XGIVEREF(__pyx_t_6);
17350  __Pyx_XGIVEREF(__pyx_t_7);
17351  __Pyx_XGIVEREF(__pyx_t_8);
17352  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17353  goto __pyx_L1_error;
17354  __pyx_L8_try_return:;
17355  __Pyx_XGIVEREF(__pyx_t_6);
17356  __Pyx_XGIVEREF(__pyx_t_7);
17357  __Pyx_XGIVEREF(__pyx_t_8);
17358  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17359  goto __pyx_L0;
17360  __pyx_L7_except_return:;
17361  __Pyx_XGIVEREF(__pyx_t_6);
17362  __Pyx_XGIVEREF(__pyx_t_7);
17363  __Pyx_XGIVEREF(__pyx_t_8);
17364  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17365  goto __pyx_L0;
17366  }
17367  }
17368 
17369  /* "PyClical.pyx":1769
17370  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17371  *
17372  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17373  * """
17374  * Inverse tangent of multivector with optional complexifier.
17375  */
17376 
17377  /* function exit code */
17378  __pyx_L1_error:;
17379  __Pyx_XDECREF(__pyx_t_3);
17380  __Pyx_XDECREF(__pyx_t_5);
17381  __Pyx_XDECREF(__pyx_t_9);
17382  __Pyx_XDECREF(__pyx_t_10);
17383  __Pyx_XDECREF(__pyx_t_11);
17384  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17385  __pyx_r = 0;
17386  __pyx_L0:;
17387  __Pyx_XGIVEREF(__pyx_r);
17388  __Pyx_RefNannyFinishContext();
17389  return __pyx_r;
17390  }
17391 
17392  /* Python wrapper */
17393  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17394  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 ";
17395  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17396  PyObject *__pyx_v_obj = 0;
17397  PyObject *__pyx_v_i = 0;
17398  PyObject *__pyx_r = 0;
17399  __Pyx_RefNannyDeclarations
17400  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17401  {
17402  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17403  PyObject* values[2] = {0,0};
17404  values[1] = ((PyObject *)Py_None);
17405  if (unlikely(__pyx_kwds)) {
17406  Py_ssize_t kw_args;
17407  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17408  switch (pos_args) {
17409  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17410  CYTHON_FALLTHROUGH;
17411  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17412  CYTHON_FALLTHROUGH;
17413  case 0: break;
17414  default: goto __pyx_L5_argtuple_error;
17415  }
17416  kw_args = PyDict_Size(__pyx_kwds);
17417  switch (pos_args) {
17418  case 0:
17419  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17420  else goto __pyx_L5_argtuple_error;
17421  CYTHON_FALLTHROUGH;
17422  case 1:
17423  if (kw_args > 0) {
17424  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17425  if (value) { values[1] = value; kw_args--; }
17426  }
17427  }
17428  if (unlikely(kw_args > 0)) {
17429  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
17430  }
17431  } else {
17432  switch (PyTuple_GET_SIZE(__pyx_args)) {
17433  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17434  CYTHON_FALLTHROUGH;
17435  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17436  break;
17437  default: goto __pyx_L5_argtuple_error;
17438  }
17439  }
17440  __pyx_v_obj = values[0];
17441  __pyx_v_i = values[1];
17442  }
17443  goto __pyx_L4_argument_unpacking_done;
17444  __pyx_L5_argtuple_error:;
17445  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
17446  __pyx_L3_error:;
17447  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17448  __Pyx_RefNannyFinishContext();
17449  return NULL;
17450  __pyx_L4_argument_unpacking_done:;
17451  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17452 
17453  /* function exit code */
17454  __Pyx_RefNannyFinishContext();
17455  return __pyx_r;
17456  }
17457 
17458  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17459  PyObject *__pyx_r = NULL;
17460  __Pyx_RefNannyDeclarations
17461  PyObject *__pyx_t_1 = NULL;
17462  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17463  __Pyx_RefNannySetupContext("atan", 0);
17464  __Pyx_XDECREF(__pyx_r);
17465  __pyx_t_2.__pyx_n = 1;
17466  __pyx_t_2.i = __pyx_v_i;
17467  __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)
17468  __Pyx_GOTREF(__pyx_t_1);
17469  __pyx_r = __pyx_t_1;
17470  __pyx_t_1 = 0;
17471  goto __pyx_L0;
17472 
17473  /* function exit code */
17474  __pyx_L1_error:;
17475  __Pyx_XDECREF(__pyx_t_1);
17476  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17477  __pyx_r = NULL;
17478  __pyx_L0:;
17479  __Pyx_XGIVEREF(__pyx_r);
17480  __Pyx_RefNannyFinishContext();
17481  return __pyx_r;
17482  }
17483 
17484  /* "PyClical.pyx":1786
17485  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17486  *
17487  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17488  * """
17489  * Hyperbolic tangent of multivector.
17490  */
17491 
17492  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17493  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17494  PyObject *__pyx_r = NULL;
17495  __Pyx_RefNannyDeclarations
17496  PyObject *__pyx_t_1 = NULL;
17497  PyObject *__pyx_t_2 = NULL;
17498  PyObject *__pyx_t_3 = NULL;
17499  PyObject *__pyx_t_4 = NULL;
17500  PyObject *__pyx_t_5 = NULL;
17501  PyObject *__pyx_t_6 = NULL;
17502  PyObject *__pyx_t_7 = NULL;
17503  PyObject *__pyx_t_8 = NULL;
17504  __Pyx_RefNannySetupContext("tanh", 0);
17505 
17506  /* "PyClical.pyx":1793
17507  * {1,2}
17508  * """
17509  * try: # <<<<<<<<<<<<<<
17510  * return math.tanh(obj)
17511  * except:
17512  */
17513  {
17514  __Pyx_PyThreadState_declare
17515  __Pyx_PyThreadState_assign
17516  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17517  __Pyx_XGOTREF(__pyx_t_1);
17518  __Pyx_XGOTREF(__pyx_t_2);
17519  __Pyx_XGOTREF(__pyx_t_3);
17520  /*try:*/ {
17521 
17522  /* "PyClical.pyx":1794
17523  * """
17524  * try:
17525  * return math.tanh(obj) # <<<<<<<<<<<<<<
17526  * except:
17527  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17528  */
17529  __Pyx_XDECREF(__pyx_r);
17530  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
17531  __Pyx_GOTREF(__pyx_t_5);
17532  __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)
17533  __Pyx_GOTREF(__pyx_t_6);
17534  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17535  __pyx_t_5 = NULL;
17536  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17537  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17538  if (likely(__pyx_t_5)) {
17539  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17540  __Pyx_INCREF(__pyx_t_5);
17541  __Pyx_INCREF(function);
17542  __Pyx_DECREF_SET(__pyx_t_6, function);
17543  }
17544  }
17545  if (!__pyx_t_5) {
17546  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17547  __Pyx_GOTREF(__pyx_t_4);
17548  } else {
17549  #if CYTHON_FAST_PYCALL
17550  if (PyFunction_Check(__pyx_t_6)) {
17551  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17552  __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)
17553  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17554  __Pyx_GOTREF(__pyx_t_4);
17555  } else
17556  #endif
17557  #if CYTHON_FAST_PYCCALL
17558  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17559  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17560  __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)
17561  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17562  __Pyx_GOTREF(__pyx_t_4);
17563  } else
17564  #endif
17565  {
17566  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1794, __pyx_L3_error)
17567  __Pyx_GOTREF(__pyx_t_7);
17568  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
17569  __Pyx_INCREF(__pyx_v_obj);
17570  __Pyx_GIVEREF(__pyx_v_obj);
17571  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
17572  __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)
17573  __Pyx_GOTREF(__pyx_t_4);
17574  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17575  }
17576  }
17577  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17578  __pyx_r = __pyx_t_4;
17579  __pyx_t_4 = 0;
17580  goto __pyx_L7_try_return;
17581 
17582  /* "PyClical.pyx":1793
17583  * {1,2}
17584  * """
17585  * try: # <<<<<<<<<<<<<<
17586  * return math.tanh(obj)
17587  * except:
17588  */
17589  }
17590  __pyx_L3_error:;
17591  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17592  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17593  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17594  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17595 
17596  /* "PyClical.pyx":1795
17597  * try:
17598  * return math.tanh(obj)
17599  * except: # <<<<<<<<<<<<<<
17600  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17601  *
17602  */
17603  /*except:*/ {
17604  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17605  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17606  __Pyx_GOTREF(__pyx_t_4);
17607  __Pyx_GOTREF(__pyx_t_6);
17608  __Pyx_GOTREF(__pyx_t_7);
17609 
17610  /* "PyClical.pyx":1796
17611  * return math.tanh(obj)
17612  * except:
17613  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17614  *
17615  * cpdef inline atanh(obj,i = None):
17616  */
17617  __Pyx_XDECREF(__pyx_r);
17618  __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)
17619  __Pyx_GOTREF(__pyx_t_5);
17620  __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)
17621  __Pyx_GOTREF(__pyx_t_8);
17622  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17623  __pyx_r = __pyx_t_8;
17624  __pyx_t_8 = 0;
17625  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17626  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17627  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17628  goto __pyx_L6_except_return;
17629  }
17630  __pyx_L5_except_error:;
17631 
17632  /* "PyClical.pyx":1793
17633  * {1,2}
17634  * """
17635  * try: # <<<<<<<<<<<<<<
17636  * return math.tanh(obj)
17637  * except:
17638  */
17639  __Pyx_XGIVEREF(__pyx_t_1);
17640  __Pyx_XGIVEREF(__pyx_t_2);
17641  __Pyx_XGIVEREF(__pyx_t_3);
17642  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17643  goto __pyx_L1_error;
17644  __pyx_L7_try_return:;
17645  __Pyx_XGIVEREF(__pyx_t_1);
17646  __Pyx_XGIVEREF(__pyx_t_2);
17647  __Pyx_XGIVEREF(__pyx_t_3);
17648  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17649  goto __pyx_L0;
17650  __pyx_L6_except_return:;
17651  __Pyx_XGIVEREF(__pyx_t_1);
17652  __Pyx_XGIVEREF(__pyx_t_2);
17653  __Pyx_XGIVEREF(__pyx_t_3);
17654  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17655  goto __pyx_L0;
17656  }
17657 
17658  /* "PyClical.pyx":1786
17659  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17660  *
17661  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17662  * """
17663  * Hyperbolic tangent of multivector.
17664  */
17665 
17666  /* function exit code */
17667  __pyx_L1_error:;
17668  __Pyx_XDECREF(__pyx_t_4);
17669  __Pyx_XDECREF(__pyx_t_5);
17670  __Pyx_XDECREF(__pyx_t_6);
17671  __Pyx_XDECREF(__pyx_t_7);
17672  __Pyx_XDECREF(__pyx_t_8);
17673  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17674  __pyx_r = 0;
17675  __pyx_L0:;
17676  __Pyx_XGIVEREF(__pyx_r);
17677  __Pyx_RefNannyFinishContext();
17678  return __pyx_r;
17679  }
17680 
17681  /* Python wrapper */
17682  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17683  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 ";
17684  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17685  PyObject *__pyx_r = 0;
17686  __Pyx_RefNannyDeclarations
17687  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17688  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17689 
17690  /* function exit code */
17691  __Pyx_RefNannyFinishContext();
17692  return __pyx_r;
17693  }
17694 
17695  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17696  PyObject *__pyx_r = NULL;
17697  __Pyx_RefNannyDeclarations
17698  PyObject *__pyx_t_1 = NULL;
17699  __Pyx_RefNannySetupContext("tanh", 0);
17700  __Pyx_XDECREF(__pyx_r);
17701  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17702  __Pyx_GOTREF(__pyx_t_1);
17703  __pyx_r = __pyx_t_1;
17704  __pyx_t_1 = 0;
17705  goto __pyx_L0;
17706 
17707  /* function exit code */
17708  __pyx_L1_error:;
17709  __Pyx_XDECREF(__pyx_t_1);
17710  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17711  __pyx_r = NULL;
17712  __pyx_L0:;
17713  __Pyx_XGIVEREF(__pyx_r);
17714  __Pyx_RefNannyFinishContext();
17715  return __pyx_r;
17716  }
17717 
17718  /* "PyClical.pyx":1798
17719  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17720  *
17721  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17722  * """
17723  * Inverse hyperbolic tangent of multivector with optional complexifier.
17724  */
17725 
17726  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17727  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) {
17728  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17729  PyObject *__pyx_r = NULL;
17730  __Pyx_RefNannyDeclarations
17731  int __pyx_t_1;
17732  int __pyx_t_2;
17733  PyObject *__pyx_t_3 = NULL;
17734  Clifford __pyx_t_4;
17735  PyObject *__pyx_t_5 = NULL;
17736  PyObject *__pyx_t_6 = NULL;
17737  PyObject *__pyx_t_7 = NULL;
17738  PyObject *__pyx_t_8 = NULL;
17739  PyObject *__pyx_t_9 = NULL;
17740  PyObject *__pyx_t_10 = NULL;
17741  PyObject *__pyx_t_11 = NULL;
17742  __Pyx_RefNannySetupContext("atanh", 0);
17743  if (__pyx_optional_args) {
17744  if (__pyx_optional_args->__pyx_n > 0) {
17745  __pyx_v_i = __pyx_optional_args->i;
17746  }
17747  }
17748 
17749  /* "PyClical.pyx":1807
17750  * {1,2}
17751  * """
17752  * if not (i is None): # <<<<<<<<<<<<<<
17753  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17754  * else:
17755  */
17756  __pyx_t_1 = (__pyx_v_i != Py_None);
17757  __pyx_t_2 = (__pyx_t_1 != 0);
17758  if (__pyx_t_2) {
17759 
17760  /* "PyClical.pyx":1808
17761  * """
17762  * if not (i is None):
17763  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17764  * else:
17765  * try:
17766  */
17767  __Pyx_XDECREF(__pyx_r);
17768  __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)
17769  __Pyx_GOTREF(__pyx_t_3);
17770  try {
17771  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17772  } catch(...) {
17773  __Pyx_CppExn2PyErr();
17774  __PYX_ERR(0, 1808, __pyx_L1_error)
17775  }
17776  __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)
17777  __Pyx_GOTREF(__pyx_t_5);
17778  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17779  __pyx_r = __pyx_t_5;
17780  __pyx_t_5 = 0;
17781  goto __pyx_L0;
17782 
17783  /* "PyClical.pyx":1807
17784  * {1,2}
17785  * """
17786  * if not (i is None): # <<<<<<<<<<<<<<
17787  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17788  * else:
17789  */
17790  }
17791 
17792  /* "PyClical.pyx":1810
17793  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17794  * else:
17795  * try: # <<<<<<<<<<<<<<
17796  * return math.atanh(obj)
17797  * except:
17798  */
17799  /*else*/ {
17800  {
17801  __Pyx_PyThreadState_declare
17802  __Pyx_PyThreadState_assign
17803  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17804  __Pyx_XGOTREF(__pyx_t_6);
17805  __Pyx_XGOTREF(__pyx_t_7);
17806  __Pyx_XGOTREF(__pyx_t_8);
17807  /*try:*/ {
17808 
17809  /* "PyClical.pyx":1811
17810  * else:
17811  * try:
17812  * return math.atanh(obj) # <<<<<<<<<<<<<<
17813  * except:
17814  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17815  */
17816  __Pyx_XDECREF(__pyx_r);
17817  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17818  __Pyx_GOTREF(__pyx_t_3);
17819  __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)
17820  __Pyx_GOTREF(__pyx_t_9);
17821  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17822  __pyx_t_3 = NULL;
17823  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17824  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17825  if (likely(__pyx_t_3)) {
17826  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17827  __Pyx_INCREF(__pyx_t_3);
17828  __Pyx_INCREF(function);
17829  __Pyx_DECREF_SET(__pyx_t_9, function);
17830  }
17831  }
17832  if (!__pyx_t_3) {
17833  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17834  __Pyx_GOTREF(__pyx_t_5);
17835  } else {
17836  #if CYTHON_FAST_PYCALL
17837  if (PyFunction_Check(__pyx_t_9)) {
17838  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17839  __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)
17840  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17841  __Pyx_GOTREF(__pyx_t_5);
17842  } else
17843  #endif
17844  #if CYTHON_FAST_PYCCALL
17845  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17846  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17847  __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)
17848  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17849  __Pyx_GOTREF(__pyx_t_5);
17850  } else
17851  #endif
17852  {
17853  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1811, __pyx_L4_error)
17854  __Pyx_GOTREF(__pyx_t_10);
17855  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17856  __Pyx_INCREF(__pyx_v_obj);
17857  __Pyx_GIVEREF(__pyx_v_obj);
17858  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17859  __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)
17860  __Pyx_GOTREF(__pyx_t_5);
17861  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17862  }
17863  }
17864  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17865  __pyx_r = __pyx_t_5;
17866  __pyx_t_5 = 0;
17867  goto __pyx_L8_try_return;
17868 
17869  /* "PyClical.pyx":1810
17870  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17871  * else:
17872  * try: # <<<<<<<<<<<<<<
17873  * return math.atanh(obj)
17874  * except:
17875  */
17876  }
17877  __pyx_L4_error:;
17878  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17879  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17880  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17881  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17882 
17883  /* "PyClical.pyx":1812
17884  * try:
17885  * return math.atanh(obj)
17886  * except: # <<<<<<<<<<<<<<
17887  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17888  *
17889  */
17890  /*except:*/ {
17891  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17892  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17893  __Pyx_GOTREF(__pyx_t_5);
17894  __Pyx_GOTREF(__pyx_t_9);
17895  __Pyx_GOTREF(__pyx_t_10);
17896 
17897  /* "PyClical.pyx":1813
17898  * return math.atanh(obj)
17899  * except:
17900  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17901  *
17902  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17903  */
17904  __Pyx_XDECREF(__pyx_r);
17905  __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)
17906  __Pyx_GOTREF(__pyx_t_3);
17907  __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)
17908  __Pyx_GOTREF(__pyx_t_11);
17909  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17910  __pyx_r = __pyx_t_11;
17911  __pyx_t_11 = 0;
17912  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17913  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17914  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17915  goto __pyx_L7_except_return;
17916  }
17917  __pyx_L6_except_error:;
17918 
17919  /* "PyClical.pyx":1810
17920  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17921  * else:
17922  * try: # <<<<<<<<<<<<<<
17923  * return math.atanh(obj)
17924  * except:
17925  */
17926  __Pyx_XGIVEREF(__pyx_t_6);
17927  __Pyx_XGIVEREF(__pyx_t_7);
17928  __Pyx_XGIVEREF(__pyx_t_8);
17929  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17930  goto __pyx_L1_error;
17931  __pyx_L8_try_return:;
17932  __Pyx_XGIVEREF(__pyx_t_6);
17933  __Pyx_XGIVEREF(__pyx_t_7);
17934  __Pyx_XGIVEREF(__pyx_t_8);
17935  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17936  goto __pyx_L0;
17937  __pyx_L7_except_return:;
17938  __Pyx_XGIVEREF(__pyx_t_6);
17939  __Pyx_XGIVEREF(__pyx_t_7);
17940  __Pyx_XGIVEREF(__pyx_t_8);
17941  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17942  goto __pyx_L0;
17943  }
17944  }
17945 
17946  /* "PyClical.pyx":1798
17947  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17948  *
17949  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17950  * """
17951  * Inverse hyperbolic tangent of multivector with optional complexifier.
17952  */
17953 
17954  /* function exit code */
17955  __pyx_L1_error:;
17956  __Pyx_XDECREF(__pyx_t_3);
17957  __Pyx_XDECREF(__pyx_t_5);
17958  __Pyx_XDECREF(__pyx_t_9);
17959  __Pyx_XDECREF(__pyx_t_10);
17960  __Pyx_XDECREF(__pyx_t_11);
17961  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17962  __pyx_r = 0;
17963  __pyx_L0:;
17964  __Pyx_XGIVEREF(__pyx_r);
17965  __Pyx_RefNannyFinishContext();
17966  return __pyx_r;
17967  }
17968 
17969  /* Python wrapper */
17970  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17971  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 ";
17972  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17973  PyObject *__pyx_v_obj = 0;
17974  PyObject *__pyx_v_i = 0;
17975  PyObject *__pyx_r = 0;
17976  __Pyx_RefNannyDeclarations
17977  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17978  {
17979  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17980  PyObject* values[2] = {0,0};
17981  values[1] = ((PyObject *)Py_None);
17982  if (unlikely(__pyx_kwds)) {
17983  Py_ssize_t kw_args;
17984  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17985  switch (pos_args) {
17986  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17987  CYTHON_FALLTHROUGH;
17988  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17989  CYTHON_FALLTHROUGH;
17990  case 0: break;
17991  default: goto __pyx_L5_argtuple_error;
17992  }
17993  kw_args = PyDict_Size(__pyx_kwds);
17994  switch (pos_args) {
17995  case 0:
17996  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17997  else goto __pyx_L5_argtuple_error;
17998  CYTHON_FALLTHROUGH;
17999  case 1:
18000  if (kw_args > 0) {
18001  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
18002  if (value) { values[1] = value; kw_args--; }
18003  }
18004  }
18005  if (unlikely(kw_args > 0)) {
18006  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
18007  }
18008  } else {
18009  switch (PyTuple_GET_SIZE(__pyx_args)) {
18010  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18011  CYTHON_FALLTHROUGH;
18012  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18013  break;
18014  default: goto __pyx_L5_argtuple_error;
18015  }
18016  }
18017  __pyx_v_obj = values[0];
18018  __pyx_v_i = values[1];
18019  }
18020  goto __pyx_L4_argument_unpacking_done;
18021  __pyx_L5_argtuple_error:;
18022  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
18023  __pyx_L3_error:;
18024  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18025  __Pyx_RefNannyFinishContext();
18026  return NULL;
18027  __pyx_L4_argument_unpacking_done:;
18028  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
18029 
18030  /* function exit code */
18031  __Pyx_RefNannyFinishContext();
18032  return __pyx_r;
18033  }
18034 
18035  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18036  PyObject *__pyx_r = NULL;
18037  __Pyx_RefNannyDeclarations
18038  PyObject *__pyx_t_1 = NULL;
18039  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
18040  __Pyx_RefNannySetupContext("atanh", 0);
18041  __Pyx_XDECREF(__pyx_r);
18042  __pyx_t_2.__pyx_n = 1;
18043  __pyx_t_2.i = __pyx_v_i;
18044  __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)
18045  __Pyx_GOTREF(__pyx_t_1);
18046  __pyx_r = __pyx_t_1;
18047  __pyx_t_1 = 0;
18048  goto __pyx_L0;
18049 
18050  /* function exit code */
18051  __pyx_L1_error:;
18052  __Pyx_XDECREF(__pyx_t_1);
18053  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18054  __pyx_r = NULL;
18055  __pyx_L0:;
18056  __Pyx_XGIVEREF(__pyx_r);
18057  __Pyx_RefNannyFinishContext();
18058  return __pyx_r;
18059  }
18060 
18061  /* "PyClical.pyx":1815
18062  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18063  *
18064  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18065  * """
18066  * Random multivector within a frame.
18067  */
18068 
18069  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18070  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) {
18071  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
18072  PyObject *__pyx_r = NULL;
18073  __Pyx_RefNannyDeclarations
18074  PyObject *__pyx_t_1 = NULL;
18075  PyObject *__pyx_t_2 = NULL;
18076  scalar_t __pyx_t_3;
18077  PyObject *__pyx_t_4 = NULL;
18078  __Pyx_RefNannySetupContext("random_clifford", 0);
18079  if (__pyx_optional_args) {
18080  if (__pyx_optional_args->__pyx_n > 0) {
18081  __pyx_v_fill = __pyx_optional_args->fill;
18082  }
18083  }
18084 
18085  /* "PyClical.pyx":1822
18086  * {-3,-1,2}
18087  * """
18088  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
18089  *
18090  * cpdef inline cga3(obj):
18091  */
18092  __Pyx_XDECREF(__pyx_r);
18093  __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)
18094  __Pyx_GOTREF(__pyx_t_1);
18095  __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)
18096  __Pyx_GOTREF(__pyx_t_2);
18097  __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)
18098  __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)
18099  __Pyx_GOTREF(__pyx_t_4);
18100  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18101  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18102  __pyx_r = __pyx_t_4;
18103  __pyx_t_4 = 0;
18104  goto __pyx_L0;
18105 
18106  /* "PyClical.pyx":1815
18107  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18108  *
18109  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18110  * """
18111  * Random multivector within a frame.
18112  */
18113 
18114  /* function exit code */
18115  __pyx_L1_error:;
18116  __Pyx_XDECREF(__pyx_t_1);
18117  __Pyx_XDECREF(__pyx_t_2);
18118  __Pyx_XDECREF(__pyx_t_4);
18119  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18120  __pyx_r = 0;
18121  __pyx_L0:;
18122  __Pyx_XGIVEREF(__pyx_r);
18123  __Pyx_RefNannyFinishContext();
18124  return __pyx_r;
18125  }
18126 
18127  /* Python wrapper */
18128  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18129  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 ";
18130  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18131  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
18132  PyObject *__pyx_v_fill = 0;
18133  PyObject *__pyx_r = 0;
18134  __Pyx_RefNannyDeclarations
18135  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
18136  {
18137  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
18138  PyObject* values[2] = {0,0};
18139  values[1] = ((PyObject *)__pyx_float_1_0);
18140  if (unlikely(__pyx_kwds)) {
18141  Py_ssize_t kw_args;
18142  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18143  switch (pos_args) {
18144  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18145  CYTHON_FALLTHROUGH;
18146  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18147  CYTHON_FALLTHROUGH;
18148  case 0: break;
18149  default: goto __pyx_L5_argtuple_error;
18150  }
18151  kw_args = PyDict_Size(__pyx_kwds);
18152  switch (pos_args) {
18153  case 0:
18154  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
18155  else goto __pyx_L5_argtuple_error;
18156  CYTHON_FALLTHROUGH;
18157  case 1:
18158  if (kw_args > 0) {
18159  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
18160  if (value) { values[1] = value; kw_args--; }
18161  }
18162  }
18163  if (unlikely(kw_args > 0)) {
18164  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
18165  }
18166  } else {
18167  switch (PyTuple_GET_SIZE(__pyx_args)) {
18168  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18169  CYTHON_FALLTHROUGH;
18170  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18171  break;
18172  default: goto __pyx_L5_argtuple_error;
18173  }
18174  }
18175  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
18176  __pyx_v_fill = values[1];
18177  }
18178  goto __pyx_L4_argument_unpacking_done;
18179  __pyx_L5_argtuple_error:;
18180  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
18181  __pyx_L3_error:;
18182  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18183  __Pyx_RefNannyFinishContext();
18184  return NULL;
18185  __pyx_L4_argument_unpacking_done:;
18186  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
18187  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
18188 
18189  /* function exit code */
18190  goto __pyx_L0;
18191  __pyx_L1_error:;
18192  __pyx_r = NULL;
18193  __pyx_L0:;
18194  __Pyx_RefNannyFinishContext();
18195  return __pyx_r;
18196  }
18197 
18198  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) {
18199  PyObject *__pyx_r = NULL;
18200  __Pyx_RefNannyDeclarations
18201  PyObject *__pyx_t_1 = NULL;
18202  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
18203  __Pyx_RefNannySetupContext("random_clifford", 0);
18204  __Pyx_XDECREF(__pyx_r);
18205  __pyx_t_2.__pyx_n = 1;
18206  __pyx_t_2.fill = __pyx_v_fill;
18207  __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)
18208  __Pyx_GOTREF(__pyx_t_1);
18209  __pyx_r = __pyx_t_1;
18210  __pyx_t_1 = 0;
18211  goto __pyx_L0;
18212 
18213  /* function exit code */
18214  __pyx_L1_error:;
18215  __Pyx_XDECREF(__pyx_t_1);
18216  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18217  __pyx_r = NULL;
18218  __pyx_L0:;
18219  __Pyx_XGIVEREF(__pyx_r);
18220  __Pyx_RefNannyFinishContext();
18221  return __pyx_r;
18222  }
18223 
18224  /* "PyClical.pyx":1824
18225  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18226  *
18227  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18228  * """
18229  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18230  */
18231 
18232  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18233  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18234  PyObject *__pyx_r = NULL;
18235  __Pyx_RefNannyDeclarations
18236  PyObject *__pyx_t_1 = NULL;
18237  PyObject *__pyx_t_2 = NULL;
18238  __Pyx_RefNannySetupContext("cga3", 0);
18239 
18240  /* "PyClical.pyx":1831
18241  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18242  * """
18243  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18244  *
18245  * cpdef inline cga3std(obj):
18246  */
18247  __Pyx_XDECREF(__pyx_r);
18248  __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)
18249  __Pyx_GOTREF(__pyx_t_1);
18250  __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)
18251  __Pyx_GOTREF(__pyx_t_2);
18252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18253  __pyx_r = __pyx_t_2;
18254  __pyx_t_2 = 0;
18255  goto __pyx_L0;
18256 
18257  /* "PyClical.pyx":1824
18258  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18259  *
18260  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18261  * """
18262  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18263  */
18264 
18265  /* function exit code */
18266  __pyx_L1_error:;
18267  __Pyx_XDECREF(__pyx_t_1);
18268  __Pyx_XDECREF(__pyx_t_2);
18269  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18270  __pyx_r = 0;
18271  __pyx_L0:;
18272  __Pyx_XGIVEREF(__pyx_r);
18273  __Pyx_RefNannyFinishContext();
18274  return __pyx_r;
18275  }
18276 
18277  /* Python wrapper */
18278  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18279  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 ";
18280  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18281  PyObject *__pyx_r = 0;
18282  __Pyx_RefNannyDeclarations
18283  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18284  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18285 
18286  /* function exit code */
18287  __Pyx_RefNannyFinishContext();
18288  return __pyx_r;
18289  }
18290 
18291  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18292  PyObject *__pyx_r = NULL;
18293  __Pyx_RefNannyDeclarations
18294  PyObject *__pyx_t_1 = NULL;
18295  __Pyx_RefNannySetupContext("cga3", 0);
18296  __Pyx_XDECREF(__pyx_r);
18297  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
18298  __Pyx_GOTREF(__pyx_t_1);
18299  __pyx_r = __pyx_t_1;
18300  __pyx_t_1 = 0;
18301  goto __pyx_L0;
18302 
18303  /* function exit code */
18304  __pyx_L1_error:;
18305  __Pyx_XDECREF(__pyx_t_1);
18306  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18307  __pyx_r = NULL;
18308  __pyx_L0:;
18309  __Pyx_XGIVEREF(__pyx_r);
18310  __Pyx_RefNannyFinishContext();
18311  return __pyx_r;
18312  }
18313 
18314  /* "PyClical.pyx":1833
18315  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18316  *
18317  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18318  * """
18319  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18320  */
18321 
18322  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18323  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18324  PyObject *__pyx_r = NULL;
18325  __Pyx_RefNannyDeclarations
18326  PyObject *__pyx_t_1 = NULL;
18327  PyObject *__pyx_t_2 = NULL;
18328  __Pyx_RefNannySetupContext("cga3std", 0);
18329 
18330  /* "PyClical.pyx":1842
18331  * 0
18332  * """
18333  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18334  *
18335  * cpdef inline agc3(obj):
18336  */
18337  __Pyx_XDECREF(__pyx_r);
18338  __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)
18339  __Pyx_GOTREF(__pyx_t_1);
18340  __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)
18341  __Pyx_GOTREF(__pyx_t_2);
18342  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18343  __pyx_r = __pyx_t_2;
18344  __pyx_t_2 = 0;
18345  goto __pyx_L0;
18346 
18347  /* "PyClical.pyx":1833
18348  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18349  *
18350  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18351  * """
18352  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18353  */
18354 
18355  /* function exit code */
18356  __pyx_L1_error:;
18357  __Pyx_XDECREF(__pyx_t_1);
18358  __Pyx_XDECREF(__pyx_t_2);
18359  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18360  __pyx_r = 0;
18361  __pyx_L0:;
18362  __Pyx_XGIVEREF(__pyx_r);
18363  __Pyx_RefNannyFinishContext();
18364  return __pyx_r;
18365  }
18366 
18367  /* Python wrapper */
18368  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18369  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 ";
18370  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18371  PyObject *__pyx_r = 0;
18372  __Pyx_RefNannyDeclarations
18373  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18374  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18375 
18376  /* function exit code */
18377  __Pyx_RefNannyFinishContext();
18378  return __pyx_r;
18379  }
18380 
18381  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18382  PyObject *__pyx_r = NULL;
18383  __Pyx_RefNannyDeclarations
18384  PyObject *__pyx_t_1 = NULL;
18385  __Pyx_RefNannySetupContext("cga3std", 0);
18386  __Pyx_XDECREF(__pyx_r);
18387  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
18388  __Pyx_GOTREF(__pyx_t_1);
18389  __pyx_r = __pyx_t_1;
18390  __pyx_t_1 = 0;
18391  goto __pyx_L0;
18392 
18393  /* function exit code */
18394  __pyx_L1_error:;
18395  __Pyx_XDECREF(__pyx_t_1);
18396  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18397  __pyx_r = NULL;
18398  __pyx_L0:;
18399  __Pyx_XGIVEREF(__pyx_r);
18400  __Pyx_RefNannyFinishContext();
18401  return __pyx_r;
18402  }
18403 
18404  /* "PyClical.pyx":1844
18405  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18406  *
18407  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18408  * """
18409  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18410  */
18411 
18412  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18413  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18414  PyObject *__pyx_r = NULL;
18415  __Pyx_RefNannyDeclarations
18416  PyObject *__pyx_t_1 = NULL;
18417  PyObject *__pyx_t_2 = NULL;
18418  __Pyx_RefNannySetupContext("agc3", 0);
18419 
18420  /* "PyClical.pyx":1853
18421  * 0
18422  * """
18423  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18424  *
18425  * # Some abbreviations.
18426  */
18427  __Pyx_XDECREF(__pyx_r);
18428  __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)
18429  __Pyx_GOTREF(__pyx_t_1);
18430  __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)
18431  __Pyx_GOTREF(__pyx_t_2);
18432  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18433  __pyx_r = __pyx_t_2;
18434  __pyx_t_2 = 0;
18435  goto __pyx_L0;
18436 
18437  /* "PyClical.pyx":1844
18438  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18439  *
18440  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18441  * """
18442  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18443  */
18444 
18445  /* function exit code */
18446  __pyx_L1_error:;
18447  __Pyx_XDECREF(__pyx_t_1);
18448  __Pyx_XDECREF(__pyx_t_2);
18449  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18450  __pyx_r = 0;
18451  __pyx_L0:;
18452  __Pyx_XGIVEREF(__pyx_r);
18453  __Pyx_RefNannyFinishContext();
18454  return __pyx_r;
18455  }
18456 
18457  /* Python wrapper */
18458  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18459  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 ";
18460  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18461  PyObject *__pyx_r = 0;
18462  __Pyx_RefNannyDeclarations
18463  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18464  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18465 
18466  /* function exit code */
18467  __Pyx_RefNannyFinishContext();
18468  return __pyx_r;
18469  }
18470 
18471  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18472  PyObject *__pyx_r = NULL;
18473  __Pyx_RefNannyDeclarations
18474  PyObject *__pyx_t_1 = NULL;
18475  __Pyx_RefNannySetupContext("agc3", 0);
18476  __Pyx_XDECREF(__pyx_r);
18477  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
18478  __Pyx_GOTREF(__pyx_t_1);
18479  __pyx_r = __pyx_t_1;
18480  __pyx_t_1 = 0;
18481  goto __pyx_L0;
18482 
18483  /* function exit code */
18484  __pyx_L1_error:;
18485  __Pyx_XDECREF(__pyx_t_1);
18486  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18487  __pyx_r = NULL;
18488  __pyx_L0:;
18489  __Pyx_XGIVEREF(__pyx_r);
18490  __Pyx_RefNannyFinishContext();
18491  return __pyx_r;
18492  }
18493 
18494  /* "PyClical.pyx":1887
18495  * """
18496  *
18497  * def e(obj): # <<<<<<<<<<<<<<
18498  * """
18499  * Abbreviation for clifford(index_set(obj)).
18500  */
18501 
18502  /* Python wrapper */
18503  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18504  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 ";
18505  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18506  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18507  PyObject *__pyx_r = 0;
18508  __Pyx_RefNannyDeclarations
18509  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18510  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18511 
18512  /* function exit code */
18513  __Pyx_RefNannyFinishContext();
18514  return __pyx_r;
18515  }
18516 
18517  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18518  PyObject *__pyx_r = NULL;
18519  __Pyx_RefNannyDeclarations
18520  PyObject *__pyx_t_1 = NULL;
18521  PyObject *__pyx_t_2 = NULL;
18522  __Pyx_RefNannySetupContext("e", 0);
18523 
18524  /* "PyClical.pyx":1898
18525  * 1
18526  * """
18527  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18528  *
18529  * def istpq(p, q):
18530  */
18531  __Pyx_XDECREF(__pyx_r);
18532  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18533  __Pyx_GOTREF(__pyx_t_1);
18534  __Pyx_INCREF(__pyx_v_obj);
18535  __Pyx_GIVEREF(__pyx_v_obj);
18536  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
18537  __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)
18538  __Pyx_GOTREF(__pyx_t_2);
18539  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18540  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18541  __Pyx_GOTREF(__pyx_t_1);
18542  __Pyx_GIVEREF(__pyx_t_2);
18543  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
18544  __pyx_t_2 = 0;
18545  __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)
18546  __Pyx_GOTREF(__pyx_t_2);
18547  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18548  __pyx_r = __pyx_t_2;
18549  __pyx_t_2 = 0;
18550  goto __pyx_L0;
18551 
18552  /* "PyClical.pyx":1887
18553  * """
18554  *
18555  * def e(obj): # <<<<<<<<<<<<<<
18556  * """
18557  * Abbreviation for clifford(index_set(obj)).
18558  */
18559 
18560  /* function exit code */
18561  __pyx_L1_error:;
18562  __Pyx_XDECREF(__pyx_t_1);
18563  __Pyx_XDECREF(__pyx_t_2);
18564  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18565  __pyx_r = NULL;
18566  __pyx_L0:;
18567  __Pyx_XGIVEREF(__pyx_r);
18568  __Pyx_RefNannyFinishContext();
18569  return __pyx_r;
18570  }
18571 
18572  /* "PyClical.pyx":1900
18573  * return clifford(index_set(obj))
18574  *
18575  * def istpq(p, q): # <<<<<<<<<<<<<<
18576  * """
18577  * Abbreviation for index_set({-q,...p}).
18578  */
18579 
18580  /* Python wrapper */
18581  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18582  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 ";
18583  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18584  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18585  PyObject *__pyx_v_p = 0;
18586  PyObject *__pyx_v_q = 0;
18587  PyObject *__pyx_r = 0;
18588  __Pyx_RefNannyDeclarations
18589  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18590  {
18591  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18592  PyObject* values[2] = {0,0};
18593  if (unlikely(__pyx_kwds)) {
18594  Py_ssize_t kw_args;
18595  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18596  switch (pos_args) {
18597  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18598  CYTHON_FALLTHROUGH;
18599  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18600  CYTHON_FALLTHROUGH;
18601  case 0: break;
18602  default: goto __pyx_L5_argtuple_error;
18603  }
18604  kw_args = PyDict_Size(__pyx_kwds);
18605  switch (pos_args) {
18606  case 0:
18607  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18608  else goto __pyx_L5_argtuple_error;
18609  CYTHON_FALLTHROUGH;
18610  case 1:
18611  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18612  else {
18613  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
18614  }
18615  }
18616  if (unlikely(kw_args > 0)) {
18617  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
18618  }
18619  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18620  goto __pyx_L5_argtuple_error;
18621  } else {
18622  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18623  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18624  }
18625  __pyx_v_p = values[0];
18626  __pyx_v_q = values[1];
18627  }
18628  goto __pyx_L4_argument_unpacking_done;
18629  __pyx_L5_argtuple_error:;
18630  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
18631  __pyx_L3_error:;
18632  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18633  __Pyx_RefNannyFinishContext();
18634  return NULL;
18635  __pyx_L4_argument_unpacking_done:;
18636  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18637 
18638  /* function exit code */
18639  __Pyx_RefNannyFinishContext();
18640  return __pyx_r;
18641  }
18642 
18643  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18644  PyObject *__pyx_r = NULL;
18645  __Pyx_RefNannyDeclarations
18646  PyObject *__pyx_t_1 = NULL;
18647  PyObject *__pyx_t_2 = NULL;
18648  PyObject *__pyx_t_3 = NULL;
18649  __Pyx_RefNannySetupContext("istpq", 0);
18650 
18651  /* "PyClical.pyx":1907
18652  * {-3,-2,-1,1,2}
18653  * """
18654  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18655  *
18656  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18657  */
18658  __Pyx_XDECREF(__pyx_r);
18659  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
18660  __Pyx_GOTREF(__pyx_t_1);
18661  __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)
18662  __Pyx_GOTREF(__pyx_t_2);
18663  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18664  __Pyx_GOTREF(__pyx_t_3);
18665  __Pyx_GIVEREF(__pyx_t_1);
18666  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18667  __Pyx_GIVEREF(__pyx_t_2);
18668  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18669  __pyx_t_1 = 0;
18670  __pyx_t_2 = 0;
18671  __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)
18672  __Pyx_GOTREF(__pyx_t_2);
18673  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18674  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18675  __Pyx_GOTREF(__pyx_t_3);
18676  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18677  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18678  __Pyx_GOTREF(__pyx_t_2);
18679  __Pyx_GIVEREF(__pyx_t_3);
18680  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
18681  __pyx_t_3 = 0;
18682  __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)
18683  __Pyx_GOTREF(__pyx_t_3);
18684  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18685  __pyx_r = __pyx_t_3;
18686  __pyx_t_3 = 0;
18687  goto __pyx_L0;
18688 
18689  /* "PyClical.pyx":1900
18690  * return clifford(index_set(obj))
18691  *
18692  * def istpq(p, q): # <<<<<<<<<<<<<<
18693  * """
18694  * Abbreviation for index_set({-q,...p}).
18695  */
18696 
18697  /* function exit code */
18698  __pyx_L1_error:;
18699  __Pyx_XDECREF(__pyx_t_1);
18700  __Pyx_XDECREF(__pyx_t_2);
18701  __Pyx_XDECREF(__pyx_t_3);
18702  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18703  __pyx_r = NULL;
18704  __pyx_L0:;
18705  __Pyx_XGIVEREF(__pyx_r);
18706  __Pyx_RefNannyFinishContext();
18707  return __pyx_r;
18708  }
18709 
18710  /* "PyClical.pyx":1913
18711  *
18712  * # Doctest interface.
18713  * def _test(): # <<<<<<<<<<<<<<
18714  * import PyClical, doctest
18715  * return doctest.testmod(PyClical)
18716  */
18717 
18718  /* Python wrapper */
18719  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18720  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18721  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18722  PyObject *__pyx_r = 0;
18723  __Pyx_RefNannyDeclarations
18724  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18725  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18726 
18727  /* function exit code */
18728  __Pyx_RefNannyFinishContext();
18729  return __pyx_r;
18730  }
18731 
18732  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18733  PyObject *__pyx_v_PyClical = NULL;
18734  PyObject *__pyx_v_doctest = NULL;
18735  PyObject *__pyx_r = NULL;
18736  __Pyx_RefNannyDeclarations
18737  PyObject *__pyx_t_1 = NULL;
18738  PyObject *__pyx_t_2 = NULL;
18739  PyObject *__pyx_t_3 = NULL;
18740  PyObject *__pyx_t_4 = NULL;
18741  __Pyx_RefNannySetupContext("_test", 0);
18742 
18743  /* "PyClical.pyx":1914
18744  * # Doctest interface.
18745  * def _test():
18746  * import PyClical, doctest # <<<<<<<<<<<<<<
18747  * return doctest.testmod(PyClical)
18748  *
18749  */
18750  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18751  __Pyx_GOTREF(__pyx_t_1);
18752  __pyx_v_PyClical = __pyx_t_1;
18753  __pyx_t_1 = 0;
18754  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18755  __Pyx_GOTREF(__pyx_t_1);
18756  __pyx_v_doctest = __pyx_t_1;
18757  __pyx_t_1 = 0;
18758 
18759  /* "PyClical.pyx":1915
18760  * def _test():
18761  * import PyClical, doctest
18762  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18763  *
18764  * if __name__ == "__main__":
18765  */
18766  __Pyx_XDECREF(__pyx_r);
18767  __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)
18768  __Pyx_GOTREF(__pyx_t_2);
18769  __pyx_t_3 = NULL;
18770  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18771  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18772  if (likely(__pyx_t_3)) {
18773  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18774  __Pyx_INCREF(__pyx_t_3);
18775  __Pyx_INCREF(function);
18776  __Pyx_DECREF_SET(__pyx_t_2, function);
18777  }
18778  }
18779  if (!__pyx_t_3) {
18780  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18781  __Pyx_GOTREF(__pyx_t_1);
18782  } else {
18783  #if CYTHON_FAST_PYCALL
18784  if (PyFunction_Check(__pyx_t_2)) {
18785  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18786  __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)
18787  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18788  __Pyx_GOTREF(__pyx_t_1);
18789  } else
18790  #endif
18791  #if CYTHON_FAST_PYCCALL
18792  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18793  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18794  __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)
18795  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18796  __Pyx_GOTREF(__pyx_t_1);
18797  } else
18798  #endif
18799  {
18800  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
18801  __Pyx_GOTREF(__pyx_t_4);
18802  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18803  __Pyx_INCREF(__pyx_v_PyClical);
18804  __Pyx_GIVEREF(__pyx_v_PyClical);
18805  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18806  __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)
18807  __Pyx_GOTREF(__pyx_t_1);
18808  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18809  }
18810  }
18811  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18812  __pyx_r = __pyx_t_1;
18813  __pyx_t_1 = 0;
18814  goto __pyx_L0;
18815 
18816  /* "PyClical.pyx":1913
18817  *
18818  * # Doctest interface.
18819  * def _test(): # <<<<<<<<<<<<<<
18820  * import PyClical, doctest
18821  * return doctest.testmod(PyClical)
18822  */
18823 
18824  /* function exit code */
18825  __pyx_L1_error:;
18826  __Pyx_XDECREF(__pyx_t_1);
18827  __Pyx_XDECREF(__pyx_t_2);
18828  __Pyx_XDECREF(__pyx_t_3);
18829  __Pyx_XDECREF(__pyx_t_4);
18830  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18831  __pyx_r = NULL;
18832  __pyx_L0:;
18833  __Pyx_XDECREF(__pyx_v_PyClical);
18834  __Pyx_XDECREF(__pyx_v_doctest);
18835  __Pyx_XGIVEREF(__pyx_r);
18836  __Pyx_RefNannyFinishContext();
18837  return __pyx_r;
18838  }
18839  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18840 
18841  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18842  struct __pyx_obj_8PyClical_index_set *p;
18843  PyObject *o;
18844  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18845  o = (*t->tp_alloc)(t, 0);
18846  } else {
18847  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18848  }
18849  if (unlikely(!o)) return 0;
18850  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18851  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18852  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18853  return o;
18854  bad:
18855  Py_DECREF(o); o = 0;
18856  return NULL;
18857  }
18858 
18859  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18860  #if CYTHON_USE_TP_FINALIZE
18861  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))) {
18862  if (PyObject_CallFinalizerFromDealloc(o)) return;
18863  }
18864  #endif
18865  {
18866  PyObject *etype, *eval, *etb;
18867  PyErr_Fetch(&etype, &eval, &etb);
18868  ++Py_REFCNT(o);
18869  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18870  --Py_REFCNT(o);
18871  PyErr_Restore(etype, eval, etb);
18872  }
18873  (*Py_TYPE(o)->tp_free)(o);
18874  }
18875  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18876  PyObject *r;
18877  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18878  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18879  Py_DECREF(x);
18880  return r;
18881  }
18882 
18883  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18884  if (v) {
18885  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18886  }
18887  else {
18888  PyErr_Format(PyExc_NotImplementedError,
18889  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18890  return -1;
18891  }
18892  }
18893 
18894  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18895  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18896  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18897  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18898  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18899  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18900  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18901  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18902  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18903  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18904  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18905  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18906  {0, 0, 0, 0}
18907  };
18908 
18909  static PyNumberMethods __pyx_tp_as_number_index_set = {
18910  0, /*nb_add*/
18911  0, /*nb_subtract*/
18912  0, /*nb_multiply*/
18913  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18914  0, /*nb_divide*/
18915  #endif
18916  0, /*nb_remainder*/
18917  0, /*nb_divmod*/
18918  0, /*nb_power*/
18919  0, /*nb_negative*/
18920  0, /*nb_positive*/
18921  0, /*nb_absolute*/
18922  0, /*nb_nonzero*/
18923  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18924  0, /*nb_lshift*/
18925  0, /*nb_rshift*/
18926  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18927  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18928  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18929  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18930  0, /*nb_coerce*/
18931  #endif
18932  0, /*nb_int*/
18933  #if PY_MAJOR_VERSION < 3
18934  0, /*nb_long*/
18935  #else
18936  0, /*reserved*/
18937  #endif
18938  0, /*nb_float*/
18939  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18940  0, /*nb_oct*/
18941  #endif
18942  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18943  0, /*nb_hex*/
18944  #endif
18945  0, /*nb_inplace_add*/
18946  0, /*nb_inplace_subtract*/
18947  0, /*nb_inplace_multiply*/
18948  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18949  0, /*nb_inplace_divide*/
18950  #endif
18951  0, /*nb_inplace_remainder*/
18952  0, /*nb_inplace_power*/
18953  0, /*nb_inplace_lshift*/
18954  0, /*nb_inplace_rshift*/
18955  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18956  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18957  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18958  0, /*nb_floor_divide*/
18959  0, /*nb_true_divide*/
18960  0, /*nb_inplace_floor_divide*/
18961  0, /*nb_inplace_true_divide*/
18962  0, /*nb_index*/
18963  #if PY_VERSION_HEX >= 0x03050000
18964  0, /*nb_matrix_multiply*/
18965  #endif
18966  #if PY_VERSION_HEX >= 0x03050000
18967  0, /*nb_inplace_matrix_multiply*/
18968  #endif
18969  };
18970 
18971  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18972  0, /*sq_length*/
18973  0, /*sq_concat*/
18974  0, /*sq_repeat*/
18975  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18976  0, /*sq_slice*/
18977  0, /*sq_ass_item*/
18978  0, /*sq_ass_slice*/
18979  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18980  0, /*sq_inplace_concat*/
18981  0, /*sq_inplace_repeat*/
18982  };
18983 
18984  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18985  0, /*mp_length*/
18986  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18987  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18988  };
18989 
18990  static PyTypeObject __pyx_type_8PyClical_index_set = {
18991  PyVarObject_HEAD_INIT(0, 0)
18992  "PyClical.index_set", /*tp_name*/
18993  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18994  0, /*tp_itemsize*/
18995  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18996  0, /*tp_print*/
18997  0, /*tp_getattr*/
18998  0, /*tp_setattr*/
18999  #if PY_MAJOR_VERSION < 3
19000  0, /*tp_compare*/
19001  #endif
19002  #if PY_MAJOR_VERSION >= 3
19003  0, /*tp_as_async*/
19004  #endif
19005  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
19006  &__pyx_tp_as_number_index_set, /*tp_as_number*/
19007  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
19008  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
19009  0, /*tp_hash*/
19010  0, /*tp_call*/
19011  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
19012  0, /*tp_getattro*/
19013  0, /*tp_setattro*/
19014  0, /*tp_as_buffer*/
19015  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19016  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
19017  0, /*tp_traverse*/
19018  0, /*tp_clear*/
19019  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
19020  0, /*tp_weaklistoffset*/
19021  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
19022  0, /*tp_iternext*/
19023  __pyx_methods_8PyClical_index_set, /*tp_methods*/
19024  0, /*tp_members*/
19025  0, /*tp_getset*/
19026  0, /*tp_base*/
19027  0, /*tp_dict*/
19028  0, /*tp_descr_get*/
19029  0, /*tp_descr_set*/
19030  0, /*tp_dictoffset*/
19031  0, /*tp_init*/
19032  0, /*tp_alloc*/
19033  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
19034  0, /*tp_free*/
19035  0, /*tp_is_gc*/
19036  0, /*tp_bases*/
19037  0, /*tp_mro*/
19038  0, /*tp_cache*/
19039  0, /*tp_subclasses*/
19040  0, /*tp_weaklist*/
19041  0, /*tp_del*/
19042  0, /*tp_version_tag*/
19043  #if PY_VERSION_HEX >= 0x030400a1
19044  0, /*tp_finalize*/
19045  #endif
19046  };
19047  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
19048 
19049  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
19050  struct __pyx_obj_8PyClical_clifford *p;
19051  PyObject *o;
19052  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19053  o = (*t->tp_alloc)(t, 0);
19054  } else {
19055  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19056  }
19057  if (unlikely(!o)) return 0;
19058  p = ((struct __pyx_obj_8PyClical_clifford *)o);
19059  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
19060  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
19061  return o;
19062  bad:
19063  Py_DECREF(o); o = 0;
19064  return NULL;
19065  }
19066 
19067  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
19068  #if CYTHON_USE_TP_FINALIZE
19069  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))) {
19070  if (PyObject_CallFinalizerFromDealloc(o)) return;
19071  }
19072  #endif
19073  {
19074  PyObject *etype, *eval, *etb;
19075  PyErr_Fetch(&etype, &eval, &etb);
19076  ++Py_REFCNT(o);
19077  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
19078  --Py_REFCNT(o);
19079  PyErr_Restore(etype, eval, etb);
19080  }
19081  (*Py_TYPE(o)->tp_free)(o);
19082  }
19083  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
19084  PyObject *r;
19085  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19086  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19087  Py_DECREF(x);
19088  return r;
19089  }
19090 
19091  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
19092  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
19093  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
19094  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
19095  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
19096  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
19097  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
19098  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
19099  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
19100  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
19101  {"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
19102  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
19103  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
19104  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
19105  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
19106  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
19107  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
19108  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
19109  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
19110  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
19111  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
19112  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
19113  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
19114  {0, 0, 0, 0}
19115  };
19116 
19117  static PyNumberMethods __pyx_tp_as_number_clifford = {
19118  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
19119  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
19120  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
19121  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19122  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
19123  #endif
19124  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
19125  0, /*nb_divmod*/
19126  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
19127  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
19128  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
19129  0, /*nb_absolute*/
19130  0, /*nb_nonzero*/
19131  0, /*nb_invert*/
19132  0, /*nb_lshift*/
19133  0, /*nb_rshift*/
19134  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
19135  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
19136  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
19137  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19138  0, /*nb_coerce*/
19139  #endif
19140  0, /*nb_int*/
19141  #if PY_MAJOR_VERSION < 3
19142  0, /*nb_long*/
19143  #else
19144  0, /*reserved*/
19145  #endif
19146  0, /*nb_float*/
19147  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19148  0, /*nb_oct*/
19149  #endif
19150  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19151  0, /*nb_hex*/
19152  #endif
19153  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
19154  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
19155  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
19156  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19157  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
19158  #endif
19159  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
19160  0, /*nb_inplace_power*/
19161  0, /*nb_inplace_lshift*/
19162  0, /*nb_inplace_rshift*/
19163  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
19164  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
19165  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
19166  0, /*nb_floor_divide*/
19167  0, /*nb_true_divide*/
19168  0, /*nb_inplace_floor_divide*/
19169  0, /*nb_inplace_true_divide*/
19170  0, /*nb_index*/
19171  #if PY_VERSION_HEX >= 0x03050000
19172  0, /*nb_matrix_multiply*/
19173  #endif
19174  #if PY_VERSION_HEX >= 0x03050000
19175  0, /*nb_inplace_matrix_multiply*/
19176  #endif
19177  };
19178 
19179  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
19180  0, /*sq_length*/
19181  0, /*sq_concat*/
19182  0, /*sq_repeat*/
19183  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
19184  0, /*sq_slice*/
19185  0, /*sq_ass_item*/
19186  0, /*sq_ass_slice*/
19187  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
19188  0, /*sq_inplace_concat*/
19189  0, /*sq_inplace_repeat*/
19190  };
19191 
19192  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
19193  0, /*mp_length*/
19194  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
19195  0, /*mp_ass_subscript*/
19196  };
19197 
19198  static PyTypeObject __pyx_type_8PyClical_clifford = {
19199  PyVarObject_HEAD_INIT(0, 0)
19200  "PyClical.clifford", /*tp_name*/
19201  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
19202  0, /*tp_itemsize*/
19203  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
19204  0, /*tp_print*/
19205  0, /*tp_getattr*/
19206  0, /*tp_setattr*/
19207  #if PY_MAJOR_VERSION < 3
19208  0, /*tp_compare*/
19209  #endif
19210  #if PY_MAJOR_VERSION >= 3
19211  0, /*tp_as_async*/
19212  #endif
19213  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
19214  &__pyx_tp_as_number_clifford, /*tp_as_number*/
19215  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
19216  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
19217  0, /*tp_hash*/
19218  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
19219  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
19220  0, /*tp_getattro*/
19221  0, /*tp_setattro*/
19222  0, /*tp_as_buffer*/
19223  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19224  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
19225  0, /*tp_traverse*/
19226  0, /*tp_clear*/
19227  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
19228  0, /*tp_weaklistoffset*/
19229  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
19230  0, /*tp_iternext*/
19231  __pyx_methods_8PyClical_clifford, /*tp_methods*/
19232  0, /*tp_members*/
19233  0, /*tp_getset*/
19234  0, /*tp_base*/
19235  0, /*tp_dict*/
19236  0, /*tp_descr_get*/
19237  0, /*tp_descr_set*/
19238  0, /*tp_dictoffset*/
19239  0, /*tp_init*/
19240  0, /*tp_alloc*/
19241  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19242  0, /*tp_free*/
19243  0, /*tp_is_gc*/
19244  0, /*tp_bases*/
19245  0, /*tp_mro*/
19246  0, /*tp_cache*/
19247  0, /*tp_subclasses*/
19248  0, /*tp_weaklist*/
19249  0, /*tp_del*/
19250  0, /*tp_version_tag*/
19251  #if PY_VERSION_HEX >= 0x030400a1
19252  0, /*tp_finalize*/
19253  #endif
19254  };
19255 
19256  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19257  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19258 
19259  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19260  PyObject *o;
19261  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__)))) {
19262  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19263  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19264  (void) PyObject_INIT(o, t);
19265  PyObject_GC_Track(o);
19266  } else {
19267  o = (*t->tp_alloc)(t, 0);
19268  if (unlikely(!o)) return 0;
19269  }
19270  return o;
19271  }
19272 
19273  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19274  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19275  PyObject_GC_UnTrack(o);
19276  Py_CLEAR(p->__pyx_v_idx);
19277  Py_CLEAR(p->__pyx_v_self);
19278  Py_CLEAR(p->__pyx_t_0);
19279  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__)))) {
19280  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19281  } else {
19282  (*Py_TYPE(o)->tp_free)(o);
19283  }
19284  }
19285 
19286  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19287  int e;
19288  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19289  if (p->__pyx_v_idx) {
19290  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19291  }
19292  if (p->__pyx_v_self) {
19293  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19294  }
19295  if (p->__pyx_t_0) {
19296  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19297  }
19298  return 0;
19299  }
19300 
19301  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19302  PyVarObject_HEAD_INIT(0, 0)
19303  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19304  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19305  0, /*tp_itemsize*/
19306  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19307  0, /*tp_print*/
19308  0, /*tp_getattr*/
19309  0, /*tp_setattr*/
19310  #if PY_MAJOR_VERSION < 3
19311  0, /*tp_compare*/
19312  #endif
19313  #if PY_MAJOR_VERSION >= 3
19314  0, /*tp_as_async*/
19315  #endif
19316  0, /*tp_repr*/
19317  0, /*tp_as_number*/
19318  0, /*tp_as_sequence*/
19319  0, /*tp_as_mapping*/
19320  0, /*tp_hash*/
19321  0, /*tp_call*/
19322  0, /*tp_str*/
19323  0, /*tp_getattro*/
19324  0, /*tp_setattro*/
19325  0, /*tp_as_buffer*/
19326  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19327  0, /*tp_doc*/
19328  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19329  0, /*tp_clear*/
19330  0, /*tp_richcompare*/
19331  0, /*tp_weaklistoffset*/
19332  0, /*tp_iter*/
19333  0, /*tp_iternext*/
19334  0, /*tp_methods*/
19335  0, /*tp_members*/
19336  0, /*tp_getset*/
19337  0, /*tp_base*/
19338  0, /*tp_dict*/
19339  0, /*tp_descr_get*/
19340  0, /*tp_descr_set*/
19341  0, /*tp_dictoffset*/
19342  0, /*tp_init*/
19343  0, /*tp_alloc*/
19344  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19345  0, /*tp_free*/
19346  0, /*tp_is_gc*/
19347  0, /*tp_bases*/
19348  0, /*tp_mro*/
19349  0, /*tp_cache*/
19350  0, /*tp_subclasses*/
19351  0, /*tp_weaklist*/
19352  0, /*tp_del*/
19353  0, /*tp_version_tag*/
19354  #if PY_VERSION_HEX >= 0x030400a1
19355  0, /*tp_finalize*/
19356  #endif
19357  };
19358 
19359  static PyMethodDef __pyx_methods[] = {
19360  {"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19361  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19362  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19363  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19364  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19365  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19366  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19367  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19368  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19369  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19370  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19371  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19372  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19373  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19374  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19375  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19376  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19377  {"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19378  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19379  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19380  {"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19381  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19382  {"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19383  {"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19384  {"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19385  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19386  {"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19387  {"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19388  {"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19389  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19390  {"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19391  {"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19392  {"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19393  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19394  {"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19395  {"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19396  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19397  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19398  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19399  {0, 0, 0, 0}
19400  };
19401 
19402  #if PY_MAJOR_VERSION >= 3
19403  #if CYTHON_PEP489_MULTI_PHASE_INIT
19404  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19405  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19406  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19407  {Py_mod_create, (void*)__pyx_pymod_create},
19408  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19409  {0, NULL}
19410  };
19411  #endif
19412 
19413  static struct PyModuleDef __pyx_moduledef = {
19414  PyModuleDef_HEAD_INIT,
19415  "PyClical",
19416  0, /* m_doc */
19417  #if CYTHON_PEP489_MULTI_PHASE_INIT
19418  0, /* m_size */
19419  #else
19420  -1, /* m_size */
19421  #endif
19422  __pyx_methods /* m_methods */,
19423  #if CYTHON_PEP489_MULTI_PHASE_INIT
19424  __pyx_moduledef_slots, /* m_slots */
19425  #else
19426  NULL, /* m_reload */
19427  #endif
19428  NULL, /* m_traverse */
19429  NULL, /* m_clear */
19430  NULL /* m_free */
19431  };
19432  #endif
19433 
19434 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19435  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
19436  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
19437  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19438  {&__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},
19439  {&__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},
19440  {&__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},
19441  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
19442  {&__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},
19443  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
19444  {&__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},
19445  {&__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},
19446  {&__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},
19447  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19448  {&__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},
19449  {&__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},
19450  {&__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},
19451  {&__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},
19452  {&__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},
19453  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19454  {&__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},
19455  {&__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},
19456  {&__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},
19457  {&__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},
19458  {&__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},
19459  {&__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},
19460  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19461  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19462  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19463  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19464  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19465  {&__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},
19466  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19467  {&__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},
19468  {&__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},
19469  {&__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},
19470  {&__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},
19471  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19472  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19473  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19474  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19475  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19476  {&__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},
19477  {&__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},
19478  {&__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},
19479  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19480  {&__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},
19481  {&__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},
19482  {&__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},
19483  {&__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},
19484  {&__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},
19485  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19486  {&__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},
19487  {&__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},
19488  {&__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},
19489  {&__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},
19490  {&__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},
19491  {&__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},
19492  {&__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},
19493  {&__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},
19494  {&__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},
19495  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19496  {&__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},
19497  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19498  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
19499  {&__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},
19500  {&__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},
19501  {&__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},
19502  {&__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},
19503  {&__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},
19504  {&__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},
19505  {&__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},
19506  {&__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},
19507  {&__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},
19508  {&__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},
19509  {&__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},
19510  {&__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},
19511  {&__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},
19512  {&__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},
19513  {&__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},
19514  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19515  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19516  {&__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},
19517  {&__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},
19518  {&__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},
19519  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19520  {&__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},
19521  {&__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},
19522  {&__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},
19523  {&__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},
19524  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19525  {&__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},
19526  {&__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},
19527  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19528  {&__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},
19529  {&__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},
19530  {&__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},
19531  {&__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},
19532  {&__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},
19533  {&__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},
19534  {&__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},
19535  {&__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},
19536  {&__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},
19537  {&__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},
19538  {&__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},
19539  {&__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},
19540  {&__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},
19541  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19542  {&__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},
19543  {&__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},
19544  {&__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},
19545  {&__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},
19546  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19547  {&__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},
19548  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19549  {&__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},
19550  {&__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},
19551  {&__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},
19552  {&__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},
19553  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19554  {&__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},
19555  {&__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},
19556  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19557  {&__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},
19558  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
19559  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
19560  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
19561  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
19562  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
19563  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
19564  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
19565  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19566  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
19567  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19568  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
19569  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
19570  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19571  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
19572  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19573  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
19574  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19575  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
19576  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19577  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
19578  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19579  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
19580  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
19581  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
19582  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19583  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
19584  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
19585  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
19586  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
19587  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
19588  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
19589  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
19590  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
19591  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
19592  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
19593  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
19594  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
19595  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
19596  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
19597  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
19598  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
19599  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
19600  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
19601  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
19602  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
19603  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
19604  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
19605  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
19606  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
19607  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
19608  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
19609  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
19610  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
19611  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
19612  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
19613  {&__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},
19614  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
19615  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
19616  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
19617  {&__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},
19618  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
19619  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
19620  {&__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},
19621  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
19622  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
19623  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
19624  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
19625  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
19626  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
19627  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
19628  {&__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},
19629  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19630  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
19631  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
19632  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
19633  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
19634  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
19635  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
19636  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
19637  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
19638  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19639  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19640  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19641  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19642  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
19643  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19644  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
19645  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19646  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
19647  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19648  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
19649  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
19650  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
19651  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19652  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
19653  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
19654  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19655  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19656  {&__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},
19657  {&__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},
19658  {&__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},
19659  {&__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},
19660  {&__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},
19661  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19662  {&__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},
19663  {&__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},
19664  {&__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},
19665  {&__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},
19666  {&__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},
19667  {&__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},
19668  {&__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},
19669  {&__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},
19670  {&__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},
19671  {&__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},
19672  {&__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},
19673  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19674  {&__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},
19675  {&__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},
19676  {&__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},
19677  {&__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},
19678  {&__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},
19679  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19680  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19681  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19682  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19683  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19684  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19685  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19686  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19687  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19688  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19689  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19690  {&__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},
19691  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19692  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19693  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19694  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19695  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19696  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19697  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19698  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19699  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19700  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19701  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19702  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19703  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19704  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19705  {&__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},
19706  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19707  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19708  {&__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},
19709  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19710  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19711  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19712  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19713  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19714  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19715  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19716  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19717  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19718  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19719  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19720  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19721  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19722  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19723  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19724  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19725  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19726  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19727  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19728  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19729  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19730  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19731  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19732  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19733  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19734  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19735  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19736  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19737  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19738  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19739  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19740  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19741  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19742  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19743  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19744  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19745  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19746  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19747  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19748  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19749  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19750  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19751  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19752  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19753  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19754  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19755  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19756  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19757  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19758  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19759  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19760  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19761  {0, 0, 0, 0, 0, 0, 0}
19762 };
19763 static int __Pyx_InitCachedBuiltins(void) {
19764  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19765  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19766  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19767  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19768  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19769  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19770  #if PY_MAJOR_VERSION >= 3
19771  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19772  #else
19773  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19774  #endif
19775  return 0;
19776  __pyx_L1_error:;
19777  return -1;
19778 }
19779 
19780 static int __Pyx_InitCachedConstants(void) {
19781  __Pyx_RefNannyDeclarations
19782  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19783 
19784  /* "(tree fragment)":2
19785  * def __reduce_cython__(self):
19786  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19787  * def __setstate_cython__(self, __pyx_state):
19788  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19789  */
19790  __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)
19791  __Pyx_GOTREF(__pyx_tuple__3);
19792  __Pyx_GIVEREF(__pyx_tuple__3);
19793 
19794  /* "(tree fragment)":4
19795  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19796  * def __setstate_cython__(self, __pyx_state):
19797  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19798  */
19799  __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)
19800  __Pyx_GOTREF(__pyx_tuple__4);
19801  __Pyx_GIVEREF(__pyx_tuple__4);
19802 
19803  /* "PyClical.pyx":635
19804  * TypeError: Not applicable.
19805  * """
19806  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19807  *
19808  * def __iter__(self):
19809  */
19810  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19811  __Pyx_GOTREF(__pyx_tuple__10);
19812  __Pyx_GIVEREF(__pyx_tuple__10);
19813 
19814  /* "PyClical.pyx":646
19815  * TypeError: Not applicable.
19816  * """
19817  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19818  *
19819  * def reframe(self, ixt):
19820  */
19821  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 646, __pyx_L1_error)
19822  __Pyx_GOTREF(__pyx_tuple__11);
19823  __Pyx_GIVEREF(__pyx_tuple__11);
19824 
19825  /* "(tree fragment)":2
19826  * def __reduce_cython__(self):
19827  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19828  * def __setstate_cython__(self, __pyx_state):
19829  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19830  */
19831  __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)
19832  __Pyx_GOTREF(__pyx_tuple__12);
19833  __Pyx_GIVEREF(__pyx_tuple__12);
19834 
19835  /* "(tree fragment)":4
19836  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19837  * def __setstate_cython__(self, __pyx_state):
19838  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19839  */
19840  __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)
19841  __Pyx_GOTREF(__pyx_tuple__13);
19842  __Pyx_GIVEREF(__pyx_tuple__13);
19843 
19844  /* "PyClical.pyx":404
19845  * return index_set_to_str( self.unwrap() ).c_str()
19846  *
19847  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19848  * """
19849  * Tests for functions that Doctest cannot see.
19850  */
19851  __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)
19852 
19853  /* "PyClical.pyx":1243
19854  * return clifford_to_str( self.unwrap() ).c_str()
19855  *
19856  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19857  * """
19858  * Tests for functions that Doctest cannot see.
19859  */
19860  __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)
19861 
19862  /* "PyClical.pyx":1856
19863  *
19864  * # Some abbreviations.
19865  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19866  * pi = tau / 2.0
19867  *
19868  */
19869  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1856, __pyx_L1_error)
19870  __Pyx_GOTREF(__pyx_tuple__16);
19871  __Pyx_GIVEREF(__pyx_tuple__16);
19872 
19873  /* "PyClical.pyx":1887
19874  * """
19875  *
19876  * def e(obj): # <<<<<<<<<<<<<<
19877  * """
19878  * Abbreviation for clifford(index_set(obj)).
19879  */
19880  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19881  __Pyx_GOTREF(__pyx_tuple__17);
19882  __Pyx_GIVEREF(__pyx_tuple__17);
19883  __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)
19884 
19885  /* "PyClical.pyx":1900
19886  * return clifford(index_set(obj))
19887  *
19888  * def istpq(p, q): # <<<<<<<<<<<<<<
19889  * """
19890  * Abbreviation for index_set({-q,...p}).
19891  */
19892  __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)
19893  __Pyx_GOTREF(__pyx_tuple__19);
19894  __Pyx_GIVEREF(__pyx_tuple__19);
19895  __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)
19896 
19897  /* "PyClical.pyx":1909
19898  * return index_set(set(range(-q,p+1)))
19899  *
19900  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19901  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19902  *
19903  */
19904  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19905  __Pyx_GOTREF(__pyx_tuple__21);
19906  __Pyx_GIVEREF(__pyx_tuple__21);
19907  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1909, __pyx_L1_error)
19908  __Pyx_GOTREF(__pyx_tuple__22);
19909  __Pyx_GIVEREF(__pyx_tuple__22);
19910 
19911  /* "PyClical.pyx":1910
19912  *
19913  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19914  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19915  *
19916  * # Doctest interface.
19917  */
19918  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1910, __pyx_L1_error)
19919  __Pyx_GOTREF(__pyx_tuple__23);
19920  __Pyx_GIVEREF(__pyx_tuple__23);
19921  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1910, __pyx_L1_error)
19922  __Pyx_GOTREF(__pyx_tuple__24);
19923  __Pyx_GIVEREF(__pyx_tuple__24);
19924 
19925  /* "PyClical.pyx":1913
19926  *
19927  * # Doctest interface.
19928  * def _test(): # <<<<<<<<<<<<<<
19929  * import PyClical, doctest
19930  * return doctest.testmod(PyClical)
19931  */
19932  __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)
19933  __Pyx_GOTREF(__pyx_tuple__25);
19934  __Pyx_GIVEREF(__pyx_tuple__25);
19935  __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)
19936  __Pyx_RefNannyFinishContext();
19937  return 0;
19938  __pyx_L1_error:;
19939  __Pyx_RefNannyFinishContext();
19940  return -1;
19941 }
19942 
19943 static int __Pyx_InitGlobals(void) {
19944  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19945  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19946  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19947  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19948  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19949  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19950  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19951  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19952  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19953  return 0;
19954  __pyx_L1_error:;
19955  return -1;
19956 }
19957 
19958 #if PY_MAJOR_VERSION < 3
19959 PyMODINIT_FUNC initPyClical(void); /*proto*/
19960 PyMODINIT_FUNC initPyClical(void)
19961 #else
19962 PyMODINIT_FUNC PyInit_PyClical(void); /*proto*/
19963 PyMODINIT_FUNC PyInit_PyClical(void)
19964 #if CYTHON_PEP489_MULTI_PHASE_INIT
19965 {
19966  return PyModuleDef_Init(&__pyx_moduledef);
19967 }
19968 static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
19969  PyObject *value = PyObject_GetAttrString(spec, from_name);
19970  int result = 0;
19971  if (likely(value)) {
19972  result = PyDict_SetItemString(moddict, to_name, value);
19973  Py_DECREF(value);
19974  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19975  PyErr_Clear();
19976  } else {
19977  result = -1;
19978  }
19979  return result;
19980 }
19981 static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19982  PyObject *module = NULL, *moddict, *modname;
19983  if (__pyx_m)
19984  return __Pyx_NewRef(__pyx_m);
19985  modname = PyObject_GetAttrString(spec, "name");
19986  if (unlikely(!modname)) goto bad;
19987  module = PyModule_NewObject(modname);
19988  Py_DECREF(modname);
19989  if (unlikely(!module)) goto bad;
19990  moddict = PyModule_GetDict(module);
19991  if (unlikely(!moddict)) goto bad;
19992  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
19993  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
19994  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
19995  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
19996  return module;
19997 bad:
19998  Py_XDECREF(module);
19999  return NULL;
20000 }
20001 
20002 
20003 static int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20004 #endif
20005 #endif
20006 {
20007  PyObject *__pyx_t_1 = NULL;
20008  PyObject *__pyx_t_2 = NULL;
20009  PyObject *__pyx_t_3 = NULL;
20010  int __pyx_t_4;
20011  __Pyx_RefNannyDeclarations
20012  #if CYTHON_PEP489_MULTI_PHASE_INIT
20013  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
20014  #endif
20015  #if CYTHON_REFNANNY
20016  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20017  if (!__Pyx_RefNanny) {
20018  PyErr_Clear();
20019  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20020  if (!__Pyx_RefNanny)
20021  Py_FatalError("failed to import 'refnanny' module");
20022  }
20023  #endif
20024  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20025  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20026  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20027  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20028  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20029  #ifdef __Pyx_CyFunction_USED
20030  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20031  #endif
20032  #ifdef __Pyx_FusedFunction_USED
20033  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20034  #endif
20035  #ifdef __Pyx_Coroutine_USED
20036  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20037  #endif
20038  #ifdef __Pyx_Generator_USED
20039  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20040  #endif
20041  #ifdef __Pyx_AsyncGen_USED
20042  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20043  #endif
20044  #ifdef __Pyx_StopAsyncIteration_USED
20045  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20046  #endif
20047  /*--- Library function declarations ---*/
20048  /*--- Threads initialization code ---*/
20049  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20050  #ifdef WITH_THREAD /* Python build with threading support? */
20051  PyEval_InitThreads();
20052  #endif
20053  #endif
20054  /*--- Module creation code ---*/
20055  #if CYTHON_PEP489_MULTI_PHASE_INIT
20056  __pyx_m = __pyx_pyinit_module;
20057  Py_INCREF(__pyx_m);
20058  #else
20059  #if PY_MAJOR_VERSION < 3
20060  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20061  #else
20062  __pyx_m = PyModule_Create(&__pyx_moduledef);
20063  #endif
20064  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20065  #endif
20066  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20067  Py_INCREF(__pyx_d);
20068  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20069  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20070  #if CYTHON_COMPILING_IN_PYPY
20071  Py_INCREF(__pyx_b);
20072  #endif
20073  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20074  /*--- Initialize various global constants etc. ---*/
20075  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20076  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20077  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20078  #endif
20079  if (__pyx_module_is_main_PyClical) {
20080  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20081  }
20082  #if PY_MAJOR_VERSION >= 3
20083  {
20084  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20085  if (!PyDict_GetItemString(modules, "PyClical")) {
20086  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
20087  }
20088  }
20089  #endif
20090  /*--- Builtin init code ---*/
20091  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20092  /*--- Constants init code ---*/
20093  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20094  /*--- Global init code ---*/
20095  /*--- Variable export code ---*/
20096  /*--- Function export code ---*/
20097  /*--- Type init code ---*/
20098  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
20099  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
20100  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
20101  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
20102  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20103  __pyx_type_8PyClical_index_set.tp_print = 0;
20104  #if CYTHON_COMPILING_IN_CPYTHON
20105  {
20106  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20107  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20108  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20109  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
20110  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
20111  }
20112  }
20113  #endif
20114  #if CYTHON_COMPILING_IN_CPYTHON
20115  {
20116  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20117  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20118  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20119  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
20120  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
20121  }
20122  }
20123  #endif
20124  #if CYTHON_COMPILING_IN_CPYTHON
20125  {
20126  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20127  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20128  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20129  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
20130  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
20131  }
20132  }
20133  #endif
20134  #if CYTHON_COMPILING_IN_CPYTHON
20135  {
20136  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20137  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20138  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20139  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
20140  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
20141  }
20142  }
20143  #endif
20144  #if CYTHON_COMPILING_IN_CPYTHON
20145  {
20146  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20147  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20148  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20149  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
20150  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
20151  }
20152  }
20153  #endif
20154  #if CYTHON_COMPILING_IN_CPYTHON
20155  {
20156  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20157  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20158  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20159  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
20160  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
20161  }
20162  }
20163  #endif
20164  #if CYTHON_COMPILING_IN_CPYTHON
20165  {
20166  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20167  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20168  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20169  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
20170  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
20171  }
20172  }
20173  #endif
20174  #if CYTHON_COMPILING_IN_CPYTHON
20175  {
20176  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20177  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20178  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20179  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
20180  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
20181  }
20182  }
20183  #endif
20184  #if CYTHON_COMPILING_IN_CPYTHON
20185  {
20186  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20187  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20188  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20189  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
20190  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
20191  }
20192  }
20193  #endif
20194  #if CYTHON_COMPILING_IN_CPYTHON
20195  {
20196  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20197  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20198  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20199  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
20200  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
20201  }
20202  }
20203  #endif
20204  #if CYTHON_COMPILING_IN_CPYTHON
20205  {
20206  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20207  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20208  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20209  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
20210  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
20211  }
20212  }
20213  #endif
20214  #if CYTHON_COMPILING_IN_CPYTHON
20215  {
20216  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20217  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20218  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20219  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
20220  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
20221  }
20222  }
20223  #endif
20224  #if CYTHON_COMPILING_IN_CPYTHON
20225  {
20226  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20227  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20228  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20229  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
20230  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
20231  }
20232  }
20233  #endif
20234  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20235  if (PyObject_SetAttrString(__pyx_m, "index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20236  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20237  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
20238  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
20239  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
20240  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
20241  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
20242  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20243  __pyx_type_8PyClical_clifford.tp_print = 0;
20244  #if CYTHON_COMPILING_IN_CPYTHON
20245  {
20246  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20247  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20248  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20249  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
20250  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
20251  }
20252  }
20253  #endif
20254  #if CYTHON_COMPILING_IN_CPYTHON
20255  {
20256  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20257  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20258  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20259  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
20260  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
20261  }
20262  }
20263  #endif
20264  #if CYTHON_COMPILING_IN_CPYTHON
20265  {
20266  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20267  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20268  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20269  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
20270  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
20271  }
20272  }
20273  #endif
20274  #if CYTHON_COMPILING_IN_CPYTHON
20275  {
20276  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20277  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20278  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20279  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
20280  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
20281  }
20282  }
20283  #endif
20284  #if CYTHON_COMPILING_IN_CPYTHON
20285  {
20286  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20287  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20288  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20289  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
20290  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
20291  }
20292  }
20293  #endif
20294  #if CYTHON_COMPILING_IN_CPYTHON
20295  {
20296  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20297  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20298  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20299  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
20300  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
20301  }
20302  }
20303  #endif
20304  #if CYTHON_COMPILING_IN_CPYTHON
20305  {
20306  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20307  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20308  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20309  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
20310  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
20311  }
20312  }
20313  #endif
20314  #if CYTHON_COMPILING_IN_CPYTHON
20315  {
20316  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20317  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20318  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20319  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
20320  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
20321  }
20322  }
20323  #endif
20324  #if CYTHON_COMPILING_IN_CPYTHON
20325  {
20326  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20327  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20328  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20329  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
20330  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
20331  }
20332  }
20333  #endif
20334  #if CYTHON_COMPILING_IN_CPYTHON
20335  {
20336  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20337  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20338  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20339  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20340  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20341  }
20342  }
20343  #endif
20344  #if CYTHON_COMPILING_IN_CPYTHON
20345  {
20346  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20347  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20348  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20349  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20350  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20351  }
20352  }
20353  #endif
20354  #if CYTHON_COMPILING_IN_CPYTHON
20355  {
20356  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20357  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20358  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20359  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20360  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20361  }
20362  }
20363  #endif
20364  #if CYTHON_COMPILING_IN_CPYTHON
20365  {
20366  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20367  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20368  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20369  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20370  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20371  }
20372  }
20373  #endif
20374  #if CYTHON_COMPILING_IN_CPYTHON
20375  {
20376  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20377  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20378  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20379  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20380  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20381  }
20382  }
20383  #endif
20384  #if CYTHON_COMPILING_IN_CPYTHON
20385  {
20386  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20387  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20388  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20389  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20390  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20391  }
20392  }
20393  #endif
20394  #if CYTHON_COMPILING_IN_CPYTHON
20395  {
20396  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20397  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20398  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20399  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20400  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20401  }
20402  }
20403  #endif
20404  #if CYTHON_COMPILING_IN_CPYTHON
20405  {
20406  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20407  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20408  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20409  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20410  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20411  }
20412  }
20413  #endif
20414  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20415  #if CYTHON_COMPILING_IN_CPYTHON
20416  {
20417  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20418  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20419  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20420  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
20421  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
20422  }
20423  }
20424  #endif
20425  #endif
20426  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20427  #if CYTHON_COMPILING_IN_CPYTHON
20428  {
20429  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20430  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20431  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20432  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20433  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20434  }
20435  }
20436  #endif
20437  #endif
20438  #if CYTHON_COMPILING_IN_CPYTHON
20439  {
20440  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20441  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20442  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20443  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20444  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20445  }
20446  }
20447  #endif
20448  #if CYTHON_COMPILING_IN_CPYTHON
20449  {
20450  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20451  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20452  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20453  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20454  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20455  }
20456  }
20457  #endif
20458  #if CYTHON_COMPILING_IN_CPYTHON
20459  {
20460  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20461  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20462  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20463  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20464  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20465  }
20466  }
20467  #endif
20468  #if CYTHON_COMPILING_IN_CPYTHON
20469  {
20470  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20471  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20472  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20473  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20474  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20475  }
20476  }
20477  #endif
20478  #if CYTHON_COMPILING_IN_CPYTHON
20479  {
20480  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20481  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20482  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20483  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20484  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20485  }
20486  }
20487  #endif
20488  #if CYTHON_COMPILING_IN_CPYTHON
20489  {
20490  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20491  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20492  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20493  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20494  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20495  }
20496  }
20497  #endif
20498  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20499  if (PyObject_SetAttrString(__pyx_m, "clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20500  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20501  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20502  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
20503  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20504  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20505  /*--- Type import code ---*/
20506  /*--- Variable import code ---*/
20507  /*--- Function import code ---*/
20508  /*--- Execution code ---*/
20509  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20510  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20511  #endif
20512 
20513  /* "PyClical.pyx":28
20514  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
20515  *
20516  * import math # <<<<<<<<<<<<<<
20517  * import numbers
20518  * import collections
20519  */
20520  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
20521  __Pyx_GOTREF(__pyx_t_1);
20522  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
20523  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20524 
20525  /* "PyClical.pyx":29
20526  *
20527  * import math
20528  * import numbers # <<<<<<<<<<<<<<
20529  * import collections
20530  *
20531  */
20532  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
20533  __Pyx_GOTREF(__pyx_t_1);
20534  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
20535  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20536 
20537  /* "PyClical.pyx":30
20538  * import math
20539  * import numbers
20540  * import collections # <<<<<<<<<<<<<<
20541  *
20542  * __version__ = "0.8.2"
20543  */
20544  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
20545  __Pyx_GOTREF(__pyx_t_1);
20546  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
20547  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20548 
20549  /* "PyClical.pyx":32
20550  * import collections
20551  *
20552  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
20553  *
20554  * from PyClical cimport *
20555  */
20556  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
20557 
20558  /* "PyClical.pyx":404
20559  * return index_set_to_str( self.unwrap() ).c_str()
20560  *
20561  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20562  * """
20563  * Tests for functions that Doctest cannot see.
20564  */
20565  __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)
20566  __Pyx_GOTREF(__pyx_t_1);
20567  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
20568  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20569 
20570  /* "PyClical.pyx":1243
20571  * return clifford_to_str( self.unwrap() ).c_str()
20572  *
20573  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20574  * """
20575  * Tests for functions that Doctest cannot see.
20576  */
20577  __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)
20578  __Pyx_GOTREF(__pyx_t_1);
20579  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20580  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20581 
20582  /* "PyClical.pyx":1856
20583  *
20584  * # Some abbreviations.
20585  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20586  * pi = tau / 2.0
20587  *
20588  */
20589  __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)
20590  __Pyx_GOTREF(__pyx_t_1);
20591  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20592  __Pyx_GOTREF(__pyx_t_2);
20593  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20594  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20595  __Pyx_GOTREF(__pyx_t_1);
20596  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20597  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20598  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20599 
20600  /* "PyClical.pyx":1857
20601  * # Some abbreviations.
20602  * tau = atan(clifford(1.0)) * 8.0
20603  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20604  *
20605  * cl = clifford
20606  */
20607  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20608  __Pyx_GOTREF(__pyx_t_1);
20609  __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)
20610  __Pyx_GOTREF(__pyx_t_2);
20611  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20612  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20613  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20614 
20615  /* "PyClical.pyx":1859
20616  * pi = tau / 2.0
20617  *
20618  * cl = clifford # <<<<<<<<<<<<<<
20619  * """
20620  * Abbreviation for clifford.
20621  */
20622  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20623 
20624  /* "PyClical.pyx":1879
20625  * """
20626  *
20627  * ist = index_set # <<<<<<<<<<<<<<
20628  * """
20629  * Abbreviation for index_set.
20630  */
20631  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20632 
20633  /* "PyClical.pyx":1887
20634  * """
20635  *
20636  * def e(obj): # <<<<<<<<<<<<<<
20637  * """
20638  * Abbreviation for clifford(index_set(obj)).
20639  */
20640  __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)
20641  __Pyx_GOTREF(__pyx_t_2);
20642  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20643  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20644 
20645  /* "PyClical.pyx":1900
20646  * return clifford(index_set(obj))
20647  *
20648  * def istpq(p, q): # <<<<<<<<<<<<<<
20649  * """
20650  * Abbreviation for index_set({-q,...p}).
20651  */
20652  __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)
20653  __Pyx_GOTREF(__pyx_t_2);
20654  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20655  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20656 
20657  /* "PyClical.pyx":1909
20658  * return index_set(set(range(-q,p+1)))
20659  *
20660  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20661  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20662  *
20663  */
20664  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20665  __Pyx_GOTREF(__pyx_t_2);
20666  __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)
20667  __Pyx_GOTREF(__pyx_t_1);
20668  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20669  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20670  __Pyx_GOTREF(__pyx_t_2);
20671  __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)
20672  __Pyx_GOTREF(__pyx_t_3);
20673  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20674  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20675  __Pyx_GOTREF(__pyx_t_2);
20676  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20677  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20678  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20679  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20680 
20681  /* "PyClical.pyx":1910
20682  *
20683  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20684  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20685  *
20686  * # Doctest interface.
20687  */
20688  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20689  __Pyx_GOTREF(__pyx_t_2);
20690  __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)
20691  __Pyx_GOTREF(__pyx_t_3);
20692  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20693  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20694  __Pyx_GOTREF(__pyx_t_2);
20695  __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)
20696  __Pyx_GOTREF(__pyx_t_1);
20697  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20698  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20699  __Pyx_GOTREF(__pyx_t_2);
20700  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20702  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20703  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20704 
20705  /* "PyClical.pyx":1913
20706  *
20707  * # Doctest interface.
20708  * def _test(): # <<<<<<<<<<<<<<
20709  * import PyClical, doctest
20710  * return doctest.testmod(PyClical)
20711  */
20712  __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)
20713  __Pyx_GOTREF(__pyx_t_2);
20714  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20715  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20716 
20717  /* "PyClical.pyx":1917
20718  * return doctest.testmod(PyClical)
20719  *
20720  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20721  * _test()
20722  */
20723  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20724  __Pyx_GOTREF(__pyx_t_2);
20725  __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)
20726  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20727  if (__pyx_t_4) {
20728 
20729  /* "PyClical.pyx":1918
20730  *
20731  * if __name__ == "__main__":
20732  * _test() # <<<<<<<<<<<<<<
20733  */
20734  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20735  __Pyx_GOTREF(__pyx_t_1);
20736  __pyx_t_3 = NULL;
20737  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
20738  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
20739  if (likely(__pyx_t_3)) {
20740  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20741  __Pyx_INCREF(__pyx_t_3);
20742  __Pyx_INCREF(function);
20743  __Pyx_DECREF_SET(__pyx_t_1, function);
20744  }
20745  }
20746  if (__pyx_t_3) {
20747  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20748  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20749  } else {
20750  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20751  }
20752  __Pyx_GOTREF(__pyx_t_2);
20753  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20754  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20755 
20756  /* "PyClical.pyx":1917
20757  * return doctest.testmod(PyClical)
20758  *
20759  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20760  * _test()
20761  */
20762  }
20763 
20764  /* "PyClical.pyx":1
20765  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20766  * # distutils: language = c++
20767  * #
20768  */
20769  __pyx_t_2 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
20770  __Pyx_GOTREF(__pyx_t_2);
20771  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)
20772  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)
20773  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)
20774  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)
20775  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)
20776  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)
20777  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)
20778  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)
20779  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)
20780  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)
20781  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)
20782  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)
20783  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)
20784  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)
20785  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)
20786  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)
20787  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)
20788  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)
20789  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)
20790  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)
20791  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)
20792  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)
20793  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)
20794  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)
20795  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)
20796  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)
20797  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)
20798  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)
20799  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)
20800  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)
20801  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)
20802  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)
20803  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)
20804  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)
20805  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)
20806  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)
20807  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)
20808  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)
20809  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)
20810  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)
20811  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)
20812  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)
20813  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)
20814  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)
20815  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)
20816  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)
20817  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)
20818  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)
20819  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)
20820  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)
20821  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)
20822  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)
20823  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)
20824  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)
20825  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)
20826  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)
20827  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)
20828  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)
20829  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)
20830  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)
20831  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)
20832  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)
20833  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)
20834  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)
20835  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)
20836  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)
20837  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)
20838  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)
20839  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)
20840  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)
20841  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)
20842  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)
20843  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)
20844  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)
20845  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)
20846  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)
20847  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)
20848  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)
20849  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)
20850  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)
20851  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)
20852  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)
20853  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)
20854  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)
20855  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)
20856  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)
20857  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)
20858  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)
20859  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)
20860  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)
20861  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)
20862  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)
20863  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)
20864  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)
20865  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)
20866  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)
20867  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)
20868  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)
20869  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)
20870  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)
20871  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)
20872  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)
20873  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)
20874  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)
20875  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)
20876  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)
20877  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)
20878  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20879  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20880 
20881  /*--- Wrapped vars code ---*/
20882 
20883  goto __pyx_L0;
20884  __pyx_L1_error:;
20885  __Pyx_XDECREF(__pyx_t_1);
20886  __Pyx_XDECREF(__pyx_t_2);
20887  __Pyx_XDECREF(__pyx_t_3);
20888  if (__pyx_m) {
20889  if (__pyx_d) {
20890  __Pyx_AddTraceback("init PyClical", 0, __pyx_lineno, __pyx_filename);
20891  }
20892  Py_DECREF(__pyx_m); __pyx_m = 0;
20893  } else if (!PyErr_Occurred()) {
20894  PyErr_SetString(PyExc_ImportError, "init PyClical");
20895  }
20896  __pyx_L0:;
20897  __Pyx_RefNannyFinishContext();
20898  #if CYTHON_PEP489_MULTI_PHASE_INIT
20899  return (__pyx_m != NULL) ? 0 : -1;
20900  #elif PY_MAJOR_VERSION >= 3
20901  return __pyx_m;
20902  #else
20903  return;
20904  #endif
20905 }
20906 
20907 /* --- Runtime support code --- */
20908 /* Refnanny */
20909 #if CYTHON_REFNANNY
20910 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20911  PyObject *m = NULL, *p = NULL;
20912  void *r = NULL;
20913  m = PyImport_ImportModule((char *)modname);
20914  if (!m) goto end;
20915  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
20916  if (!p) goto end;
20917  r = PyLong_AsVoidPtr(p);
20918 end:
20919  Py_XDECREF(p);
20920  Py_XDECREF(m);
20921  return (__Pyx_RefNannyAPIStruct *)r;
20922 }
20923 #endif
20924 
20925 /* GetBuiltinName */
20926 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20927  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20928  if (unlikely(!result)) {
20929  PyErr_Format(PyExc_NameError,
20930 #if PY_MAJOR_VERSION >= 3
20931  "name '%U' is not defined", name);
20932 #else
20933  "name '%.200s' is not defined", PyString_AS_STRING(name));
20934 #endif
20935  }
20936  return result;
20937 }
20938 
20939 /* PyObjectCall */
20940 #if CYTHON_COMPILING_IN_CPYTHON
20941 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20942  PyObject *result;
20943  ternaryfunc call = func->ob_type->tp_call;
20944  if (unlikely(!call))
20945  return PyObject_Call(func, arg, kw);
20946  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20947  return NULL;
20948  result = (*call)(func, arg, kw);
20949  Py_LeaveRecursiveCall();
20950  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20951  PyErr_SetString(
20952  PyExc_SystemError,
20953  "NULL result without error in PyObject_Call");
20954  }
20955  return result;
20956 }
20957 #endif
20958 
20959 /* PyErrFetchRestore */
20960 #if CYTHON_FAST_THREAD_STATE
20961 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20962  PyObject *tmp_type, *tmp_value, *tmp_tb;
20963  tmp_type = tstate->curexc_type;
20964  tmp_value = tstate->curexc_value;
20965  tmp_tb = tstate->curexc_traceback;
20966  tstate->curexc_type = type;
20967  tstate->curexc_value = value;
20968  tstate->curexc_traceback = tb;
20969  Py_XDECREF(tmp_type);
20970  Py_XDECREF(tmp_value);
20971  Py_XDECREF(tmp_tb);
20972 }
20973 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20974  *type = tstate->curexc_type;
20975  *value = tstate->curexc_value;
20976  *tb = tstate->curexc_traceback;
20977  tstate->curexc_type = 0;
20978  tstate->curexc_value = 0;
20979  tstate->curexc_traceback = 0;
20980 }
20981 #endif
20982 
20983 /* WriteUnraisableException */
20984 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20985  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20986  int full_traceback, CYTHON_UNUSED int nogil) {
20987  PyObject *old_exc, *old_val, *old_tb;
20988  PyObject *ctx;
20989  __Pyx_PyThreadState_declare
20990 #ifdef WITH_THREAD
20991  PyGILState_STATE state;
20992  if (nogil)
20993  state = PyGILState_Ensure();
20994 #ifdef _MSC_VER
20995  else state = (PyGILState_STATE)-1;
20996 #endif
20997 #endif
20998  __Pyx_PyThreadState_assign
20999  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
21000  if (full_traceback) {
21001  Py_XINCREF(old_exc);
21002  Py_XINCREF(old_val);
21003  Py_XINCREF(old_tb);
21004  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21005  PyErr_PrintEx(1);
21006  }
21007  #if PY_MAJOR_VERSION < 3
21008  ctx = PyString_FromString(name);
21009  #else
21010  ctx = PyUnicode_FromString(name);
21011  #endif
21012  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21013  if (!ctx) {
21014  PyErr_WriteUnraisable(Py_None);
21015  } else {
21016  PyErr_WriteUnraisable(ctx);
21017  Py_DECREF(ctx);
21018  }
21019 #ifdef WITH_THREAD
21020  if (nogil)
21021  PyGILState_Release(state);
21022 #endif
21023 }
21024 
21025 /* PyCFunctionFastCall */
21026 #if CYTHON_FAST_PYCCALL
21027 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
21028  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
21029  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
21030  PyObject *self = PyCFunction_GET_SELF(func);
21031  int flags = PyCFunction_GET_FLAGS(func);
21032  assert(PyCFunction_Check(func));
21033  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
21034  assert(nargs >= 0);
21035  assert(nargs == 0 || args != NULL);
21036  /* _PyCFunction_FastCallDict() must not be called with an exception set,
21037  because it may clear it (directly or indirectly) and so the
21038  caller loses its exception */
21039  assert(!PyErr_Occurred());
21040  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
21041  return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
21042  } else {
21043  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
21044  }
21045 }
21046 #endif
21047 
21048 /* PyFunctionFastCall */
21049 #if CYTHON_FAST_PYCALL
21050 #include "frameobject.h"
21051 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
21052  PyObject *globals) {
21053  PyFrameObject *f;
21054  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21055  PyObject **fastlocals;
21056  Py_ssize_t i;
21057  PyObject *result;
21058  assert(globals != NULL);
21059  /* XXX Perhaps we should create a specialized
21060  PyFrame_New() that doesn't take locals, but does
21061  take builtins without sanity checking them.
21062  */
21063  assert(tstate != NULL);
21064  f = PyFrame_New(tstate, co, globals, NULL);
21065  if (f == NULL) {
21066  return NULL;
21067  }
21068  fastlocals = f->f_localsplus;
21069  for (i = 0; i < na; i++) {
21070  Py_INCREF(*args);
21071  fastlocals[i] = *args++;
21072  }
21073  result = PyEval_EvalFrameEx(f,0);
21074  ++tstate->recursion_depth;
21075  Py_DECREF(f);
21076  --tstate->recursion_depth;
21077  return result;
21078 }
21079 #if 1 || PY_VERSION_HEX < 0x030600B1
21080 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
21081  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
21082  PyObject *globals = PyFunction_GET_GLOBALS(func);
21083  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
21084  PyObject *closure;
21085 #if PY_MAJOR_VERSION >= 3
21086  PyObject *kwdefs;
21087 #endif
21088  PyObject *kwtuple, **k;
21089  PyObject **d;
21090  Py_ssize_t nd;
21091  Py_ssize_t nk;
21092  PyObject *result;
21093  assert(kwargs == NULL || PyDict_Check(kwargs));
21094  nk = kwargs ? PyDict_Size(kwargs) : 0;
21095  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
21096  return NULL;
21097  }
21098  if (
21099 #if PY_MAJOR_VERSION >= 3
21100  co->co_kwonlyargcount == 0 &&
21101 #endif
21102  likely(kwargs == NULL || nk == 0) &&
21103  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
21104  if (argdefs == NULL && co->co_argcount == nargs) {
21105  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
21106  goto done;
21107  }
21108  else if (nargs == 0 && argdefs != NULL
21109  && co->co_argcount == Py_SIZE(argdefs)) {
21110  /* function called with no arguments, but all parameters have
21111  a default value: use default values as arguments .*/
21112  args = &PyTuple_GET_ITEM(argdefs, 0);
21113  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
21114  goto done;
21115  }
21116  }
21117  if (kwargs != NULL) {
21118  Py_ssize_t pos, i;
21119  kwtuple = PyTuple_New(2 * nk);
21120  if (kwtuple == NULL) {
21121  result = NULL;
21122  goto done;
21123  }
21124  k = &PyTuple_GET_ITEM(kwtuple, 0);
21125  pos = i = 0;
21126  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
21127  Py_INCREF(k[i]);
21128  Py_INCREF(k[i+1]);
21129  i += 2;
21130  }
21131  nk = i / 2;
21132  }
21133  else {
21134  kwtuple = NULL;
21135  k = NULL;
21136  }
21137  closure = PyFunction_GET_CLOSURE(func);
21138 #if PY_MAJOR_VERSION >= 3
21139  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
21140 #endif
21141  if (argdefs != NULL) {
21142  d = &PyTuple_GET_ITEM(argdefs, 0);
21143  nd = Py_SIZE(argdefs);
21144  }
21145  else {
21146  d = NULL;
21147  nd = 0;
21148  }
21149 #if PY_MAJOR_VERSION >= 3
21150  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
21151  args, nargs,
21152  k, (int)nk,
21153  d, (int)nd, kwdefs, closure);
21154 #else
21155  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
21156  args, nargs,
21157  k, (int)nk,
21158  d, (int)nd, closure);
21159 #endif
21160  Py_XDECREF(kwtuple);
21161 done:
21162  Py_LeaveRecursiveCall();
21163  return result;
21164 }
21165 #endif
21166 #endif
21167 
21168 /* PyObjectCallMethO */
21169 #if CYTHON_COMPILING_IN_CPYTHON
21170 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21171  PyObject *self, *result;
21172  PyCFunction cfunc;
21173  cfunc = PyCFunction_GET_FUNCTION(func);
21174  self = PyCFunction_GET_SELF(func);
21175  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21176  return NULL;
21177  result = cfunc(self, arg);
21178  Py_LeaveRecursiveCall();
21179  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21180  PyErr_SetString(
21181  PyExc_SystemError,
21182  "NULL result without error in PyObject_Call");
21183  }
21184  return result;
21185 }
21186 #endif
21187 
21188 /* PyObjectCallOneArg */
21189 #if CYTHON_COMPILING_IN_CPYTHON
21190 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21191  PyObject *result;
21192  PyObject *args = PyTuple_New(1);
21193  if (unlikely(!args)) return NULL;
21194  Py_INCREF(arg);
21195  PyTuple_SET_ITEM(args, 0, arg);
21196  result = __Pyx_PyObject_Call(func, args, NULL);
21197  Py_DECREF(args);
21198  return result;
21199 }
21200 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21201 #if CYTHON_FAST_PYCALL
21202  if (PyFunction_Check(func)) {
21203  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21204  }
21205 #endif
21206  if (likely(PyCFunction_Check(func))) {
21207  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21208  return __Pyx_PyObject_CallMethO(func, arg);
21209 #if CYTHON_FAST_PYCCALL
21210  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21211  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21212 #endif
21213  }
21214  }
21215  return __Pyx__PyObject_CallOneArg(func, arg);
21216 }
21217 #else
21218 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21219  PyObject *result;
21220  PyObject *args = PyTuple_Pack(1, arg);
21221  if (unlikely(!args)) return NULL;
21222  result = __Pyx_PyObject_Call(func, args, NULL);
21223  Py_DECREF(args);
21224  return result;
21225 }
21226 #endif
21227 
21228 /* PyObjectCallNoArg */
21229 #if CYTHON_COMPILING_IN_CPYTHON
21230 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21231 #if CYTHON_FAST_PYCALL
21232  if (PyFunction_Check(func)) {
21233  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21234  }
21235 #endif
21236 #ifdef __Pyx_CyFunction_USED
21237  if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
21238 #else
21239  if (likely(PyCFunction_Check(func))) {
21240 #endif
21241  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21242  return __Pyx_PyObject_CallMethO(func, NULL);
21243  }
21244  }
21245  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21246 }
21247 #endif
21248 
21249 /* RaiseDoubleKeywords */
21250  static void __Pyx_RaiseDoubleKeywordsError(
21251  const char* func_name,
21252  PyObject* kw_name)
21253 {
21254  PyErr_Format(PyExc_TypeError,
21255  #if PY_MAJOR_VERSION >= 3
21256  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21257  #else
21258  "%s() got multiple values for keyword argument '%s'", func_name,
21259  PyString_AsString(kw_name));
21260  #endif
21261 }
21262 
21263 /* ParseKeywords */
21264  static int __Pyx_ParseOptionalKeywords(
21265  PyObject *kwds,
21266  PyObject **argnames[],
21267  PyObject *kwds2,
21268  PyObject *values[],
21269  Py_ssize_t num_pos_args,
21270  const char* function_name)
21271 {
21272  PyObject *key = 0, *value = 0;
21273  Py_ssize_t pos = 0;
21274  PyObject*** name;
21275  PyObject*** first_kw_arg = argnames + num_pos_args;
21276  while (PyDict_Next(kwds, &pos, &key, &value)) {
21277  name = first_kw_arg;
21278  while (*name && (**name != key)) name++;
21279  if (*name) {
21280  values[name-argnames] = value;
21281  continue;
21282  }
21283  name = first_kw_arg;
21284  #if PY_MAJOR_VERSION < 3
21285  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
21286  while (*name) {
21287  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21288  && _PyString_Eq(**name, key)) {
21289  values[name-argnames] = value;
21290  break;
21291  }
21292  name++;
21293  }
21294  if (*name) continue;
21295  else {
21296  PyObject*** argname = argnames;
21297  while (argname != first_kw_arg) {
21298  if ((**argname == key) || (
21299  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21300  && _PyString_Eq(**argname, key))) {
21301  goto arg_passed_twice;
21302  }
21303  argname++;
21304  }
21305  }
21306  } else
21307  #endif
21308  if (likely(PyUnicode_Check(key))) {
21309  while (*name) {
21310  int cmp = (**name == key) ? 0 :
21311  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21312  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
21313  #endif
21314  PyUnicode_Compare(**name, key);
21315  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21316  if (cmp == 0) {
21317  values[name-argnames] = value;
21318  break;
21319  }
21320  name++;
21321  }
21322  if (*name) continue;
21323  else {
21324  PyObject*** argname = argnames;
21325  while (argname != first_kw_arg) {
21326  int cmp = (**argname == key) ? 0 :
21327  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21328  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
21329  #endif
21330  PyUnicode_Compare(**argname, key);
21331  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21332  if (cmp == 0) goto arg_passed_twice;
21333  argname++;
21334  }
21335  }
21336  } else
21337  goto invalid_keyword_type;
21338  if (kwds2) {
21339  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21340  } else {
21341  goto invalid_keyword;
21342  }
21343  }
21344  return 0;
21345 arg_passed_twice:
21346  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21347  goto bad;
21348 invalid_keyword_type:
21349  PyErr_Format(PyExc_TypeError,
21350  "%.200s() keywords must be strings", function_name);
21351  goto bad;
21352 invalid_keyword:
21353  PyErr_Format(PyExc_TypeError,
21354  #if PY_MAJOR_VERSION < 3
21355  "%.200s() got an unexpected keyword argument '%.200s'",
21356  function_name, PyString_AsString(key));
21357  #else
21358  "%s() got an unexpected keyword argument '%U'",
21359  function_name, key);
21360  #endif
21361 bad:
21362  return -1;
21363 }
21364 
21365 /* RaiseArgTupleInvalid */
21366  static void __Pyx_RaiseArgtupleInvalid(
21367  const char* func_name,
21368  int exact,
21369  Py_ssize_t num_min,
21370  Py_ssize_t num_max,
21371  Py_ssize_t num_found)
21372 {
21373  Py_ssize_t num_expected;
21374  const char *more_or_less;
21375  if (num_found < num_min) {
21376  num_expected = num_min;
21377  more_or_less = "at least";
21378  } else {
21379  num_expected = num_max;
21380  more_or_less = "at most";
21381  }
21382  if (exact) {
21383  more_or_less = "exactly";
21384  }
21385  PyErr_Format(PyExc_TypeError,
21386  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21387  func_name, more_or_less, num_expected,
21388  (num_expected == 1) ? "" : "s", num_found);
21389 }
21390 
21391 /* GetModuleGlobalName */
21392  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
21393  PyObject *result;
21394 #if !CYTHON_AVOID_BORROWED_REFS
21395  result = PyDict_GetItem(__pyx_d, name);
21396  if (likely(result)) {
21397  Py_INCREF(result);
21398  } else {
21399 #else
21400  result = PyObject_GetItem(__pyx_d, name);
21401  if (!result) {
21402  PyErr_Clear();
21403 #endif
21404  result = __Pyx_GetBuiltinName(name);
21405  }
21406  return result;
21407 }
21408 
21409 /* SaveResetException */
21410  #if CYTHON_FAST_THREAD_STATE
21411 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21412  #if PY_VERSION_HEX >= 0x030700A2
21413  *type = tstate->exc_state.exc_type;
21414  *value = tstate->exc_state.exc_value;
21415  *tb = tstate->exc_state.exc_traceback;
21416  #else
21417  *type = tstate->exc_type;
21418  *value = tstate->exc_value;
21419  *tb = tstate->exc_traceback;
21420  #endif
21421  Py_XINCREF(*type);
21422  Py_XINCREF(*value);
21423  Py_XINCREF(*tb);
21424 }
21425 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21426  PyObject *tmp_type, *tmp_value, *tmp_tb;
21427  #if PY_VERSION_HEX >= 0x030700A2
21428  tmp_type = tstate->exc_state.exc_type;
21429  tmp_value = tstate->exc_state.exc_value;
21430  tmp_tb = tstate->exc_state.exc_traceback;
21431  tstate->exc_state.exc_type = type;
21432  tstate->exc_state.exc_value = value;
21433  tstate->exc_state.exc_traceback = tb;
21434  #else
21435  tmp_type = tstate->exc_type;
21436  tmp_value = tstate->exc_value;
21437  tmp_tb = tstate->exc_traceback;
21438  tstate->exc_type = type;
21439  tstate->exc_value = value;
21440  tstate->exc_traceback = tb;
21441  #endif
21442  Py_XDECREF(tmp_type);
21443  Py_XDECREF(tmp_value);
21444  Py_XDECREF(tmp_tb);
21445 }
21446 #endif
21447 
21448 /* PyErrExceptionMatches */
21449  #if CYTHON_FAST_THREAD_STATE
21450 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21451  Py_ssize_t i, n;
21452  n = PyTuple_GET_SIZE(tuple);
21453 #if PY_MAJOR_VERSION >= 3
21454  for (i=0; i<n; i++) {
21455  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21456  }
21457 #endif
21458  for (i=0; i<n; i++) {
21459  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21460  }
21461  return 0;
21462 }
21463 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21464  PyObject *exc_type = tstate->curexc_type;
21465  if (exc_type == err) return 1;
21466  if (unlikely(!exc_type)) return 0;
21467  if (unlikely(PyTuple_Check(err)))
21468  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21469  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21470 }
21471 #endif
21472 
21473 /* GetException */
21474  #if CYTHON_FAST_THREAD_STATE
21475 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21476 #else
21477 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
21478 #endif
21479  PyObject *local_type, *local_value, *local_tb;
21480 #if CYTHON_FAST_THREAD_STATE
21481  PyObject *tmp_type, *tmp_value, *tmp_tb;
21482  local_type = tstate->curexc_type;
21483  local_value = tstate->curexc_value;
21484  local_tb = tstate->curexc_traceback;
21485  tstate->curexc_type = 0;
21486  tstate->curexc_value = 0;
21487  tstate->curexc_traceback = 0;
21488 #else
21489  PyErr_Fetch(&local_type, &local_value, &local_tb);
21490 #endif
21491  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21492 #if CYTHON_FAST_THREAD_STATE
21493  if (unlikely(tstate->curexc_type))
21494 #else
21495  if (unlikely(PyErr_Occurred()))
21496 #endif
21497  goto bad;
21498  #if PY_MAJOR_VERSION >= 3
21499  if (local_tb) {
21500  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21501  goto bad;
21502  }
21503  #endif
21504  Py_XINCREF(local_tb);
21505  Py_XINCREF(local_type);
21506  Py_XINCREF(local_value);
21507  *type = local_type;
21508  *value = local_value;
21509  *tb = local_tb;
21510 #if CYTHON_FAST_THREAD_STATE
21511  #if PY_VERSION_HEX >= 0x030700A2
21512  tmp_type = tstate->exc_state.exc_type;
21513  tmp_value = tstate->exc_state.exc_value;
21514  tmp_tb = tstate->exc_state.exc_traceback;
21515  tstate->exc_state.exc_type = local_type;
21516  tstate->exc_state.exc_value = local_value;
21517  tstate->exc_state.exc_traceback = local_tb;
21518  #else
21519  tmp_type = tstate->exc_type;
21520  tmp_value = tstate->exc_value;
21521  tmp_tb = tstate->exc_traceback;
21522  tstate->exc_type = local_type;
21523  tstate->exc_value = local_value;
21524  tstate->exc_traceback = local_tb;
21525  #endif
21526  Py_XDECREF(tmp_type);
21527  Py_XDECREF(tmp_value);
21528  Py_XDECREF(tmp_tb);
21529 #else
21530  PyErr_SetExcInfo(local_type, local_value, local_tb);
21531 #endif
21532  return 0;
21533 bad:
21534  *type = 0;
21535  *value = 0;
21536  *tb = 0;
21537  Py_XDECREF(local_type);
21538  Py_XDECREF(local_value);
21539  Py_XDECREF(local_tb);
21540  return -1;
21541 }
21542 
21543 /* RaiseException */
21544  #if PY_MAJOR_VERSION < 3
21545 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21546  CYTHON_UNUSED PyObject *cause) {
21547  __Pyx_PyThreadState_declare
21548  Py_XINCREF(type);
21549  if (!value || value == Py_None)
21550  value = NULL;
21551  else
21552  Py_INCREF(value);
21553  if (!tb || tb == Py_None)
21554  tb = NULL;
21555  else {
21556  Py_INCREF(tb);
21557  if (!PyTraceBack_Check(tb)) {
21558  PyErr_SetString(PyExc_TypeError,
21559  "raise: arg 3 must be a traceback or None");
21560  goto raise_error;
21561  }
21562  }
21563  if (PyType_Check(type)) {
21564 #if CYTHON_COMPILING_IN_PYPY
21565  if (!value) {
21566  Py_INCREF(Py_None);
21567  value = Py_None;
21568  }
21569 #endif
21570  PyErr_NormalizeException(&type, &value, &tb);
21571  } else {
21572  if (value) {
21573  PyErr_SetString(PyExc_TypeError,
21574  "instance exception may not have a separate value");
21575  goto raise_error;
21576  }
21577  value = type;
21578  type = (PyObject*) Py_TYPE(type);
21579  Py_INCREF(type);
21580  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21581  PyErr_SetString(PyExc_TypeError,
21582  "raise: exception class must be a subclass of BaseException");
21583  goto raise_error;
21584  }
21585  }
21586  __Pyx_PyThreadState_assign
21587  __Pyx_ErrRestore(type, value, tb);
21588  return;
21589 raise_error:
21590  Py_XDECREF(value);
21591  Py_XDECREF(type);
21592  Py_XDECREF(tb);
21593  return;
21594 }
21595 #else
21596 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21597  PyObject* owned_instance = NULL;
21598  if (tb == Py_None) {
21599  tb = 0;
21600  } else if (tb && !PyTraceBack_Check(tb)) {
21601  PyErr_SetString(PyExc_TypeError,
21602  "raise: arg 3 must be a traceback or None");
21603  goto bad;
21604  }
21605  if (value == Py_None)
21606  value = 0;
21607  if (PyExceptionInstance_Check(type)) {
21608  if (value) {
21609  PyErr_SetString(PyExc_TypeError,
21610  "instance exception may not have a separate value");
21611  goto bad;
21612  }
21613  value = type;
21614  type = (PyObject*) Py_TYPE(value);
21615  } else if (PyExceptionClass_Check(type)) {
21616  PyObject *instance_class = NULL;
21617  if (value && PyExceptionInstance_Check(value)) {
21618  instance_class = (PyObject*) Py_TYPE(value);
21619  if (instance_class != type) {
21620  int is_subclass = PyObject_IsSubclass(instance_class, type);
21621  if (!is_subclass) {
21622  instance_class = NULL;
21623  } else if (unlikely(is_subclass == -1)) {
21624  goto bad;
21625  } else {
21626  type = instance_class;
21627  }
21628  }
21629  }
21630  if (!instance_class) {
21631  PyObject *args;
21632  if (!value)
21633  args = PyTuple_New(0);
21634  else if (PyTuple_Check(value)) {
21635  Py_INCREF(value);
21636  args = value;
21637  } else
21638  args = PyTuple_Pack(1, value);
21639  if (!args)
21640  goto bad;
21641  owned_instance = PyObject_Call(type, args, NULL);
21642  Py_DECREF(args);
21643  if (!owned_instance)
21644  goto bad;
21645  value = owned_instance;
21646  if (!PyExceptionInstance_Check(value)) {
21647  PyErr_Format(PyExc_TypeError,
21648  "calling %R should have returned an instance of "
21649  "BaseException, not %R",
21650  type, Py_TYPE(value));
21651  goto bad;
21652  }
21653  }
21654  } else {
21655  PyErr_SetString(PyExc_TypeError,
21656  "raise: exception class must be a subclass of BaseException");
21657  goto bad;
21658  }
21659  if (cause) {
21660  PyObject *fixed_cause;
21661  if (cause == Py_None) {
21662  fixed_cause = NULL;
21663  } else if (PyExceptionClass_Check(cause)) {
21664  fixed_cause = PyObject_CallObject(cause, NULL);
21665  if (fixed_cause == NULL)
21666  goto bad;
21667  } else if (PyExceptionInstance_Check(cause)) {
21668  fixed_cause = cause;
21669  Py_INCREF(fixed_cause);
21670  } else {
21671  PyErr_SetString(PyExc_TypeError,
21672  "exception causes must derive from "
21673  "BaseException");
21674  goto bad;
21675  }
21676  PyException_SetCause(value, fixed_cause);
21677  }
21678  PyErr_SetObject(type, value);
21679  if (tb) {
21680 #if CYTHON_COMPILING_IN_PYPY
21681  PyObject *tmp_type, *tmp_value, *tmp_tb;
21682  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21683  Py_INCREF(tb);
21684  PyErr_Restore(tmp_type, tmp_value, tb);
21685  Py_XDECREF(tmp_tb);
21686 #else
21687  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21688  PyObject* tmp_tb = tstate->curexc_traceback;
21689  if (tb != tmp_tb) {
21690  Py_INCREF(tb);
21691  tstate->curexc_traceback = tb;
21692  Py_XDECREF(tmp_tb);
21693  }
21694 #endif
21695  }
21696 bad:
21697  Py_XDECREF(owned_instance);
21698  return;
21699 }
21700 #endif
21701 
21702 /* PyIntBinop */
21703  #if !CYTHON_COMPILING_IN_PYPY
21704 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
21705  #if PY_MAJOR_VERSION < 3
21706  if (likely(PyInt_CheckExact(op1))) {
21707  const long b = intval;
21708  long x;
21709  long a = PyInt_AS_LONG(op1);
21710  x = (long)((unsigned long)a + b);
21711  if (likely((x^a) >= 0 || (x^b) >= 0))
21712  return PyInt_FromLong(x);
21713  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21714  }
21715  #endif
21716  #if CYTHON_USE_PYLONG_INTERNALS
21717  if (likely(PyLong_CheckExact(op1))) {
21718  const long b = intval;
21719  long a, x;
21720 #ifdef HAVE_LONG_LONG
21721  const PY_LONG_LONG llb = intval;
21722  PY_LONG_LONG lla, llx;
21723 #endif
21724  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21725  const Py_ssize_t size = Py_SIZE(op1);
21726  if (likely(__Pyx_sst_abs(size) <= 1)) {
21727  a = likely(size) ? digits[0] : 0;
21728  if (size == -1) a = -a;
21729  } else {
21730  switch (size) {
21731  case -2:
21732  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21733  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21734  break;
21735 #ifdef HAVE_LONG_LONG
21736  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21737  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21738  goto long_long;
21739 #endif
21740  }
21741  case 2:
21742  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21743  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21744  break;
21745 #ifdef HAVE_LONG_LONG
21746  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21747  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21748  goto long_long;
21749 #endif
21750  }
21751  case -3:
21752  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21753  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21754  break;
21755 #ifdef HAVE_LONG_LONG
21756  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21757  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]));
21758  goto long_long;
21759 #endif
21760  }
21761  case 3:
21762  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21763  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21764  break;
21765 #ifdef HAVE_LONG_LONG
21766  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21767  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]));
21768  goto long_long;
21769 #endif
21770  }
21771  case -4:
21772  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21773  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21774  break;
21775 #ifdef HAVE_LONG_LONG
21776  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21777  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]));
21778  goto long_long;
21779 #endif
21780  }
21781  case 4:
21782  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21783  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21784  break;
21785 #ifdef HAVE_LONG_LONG
21786  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21787  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]));
21788  goto long_long;
21789 #endif
21790  }
21791  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21792  }
21793  }
21794  x = a + b;
21795  return PyLong_FromLong(x);
21796 #ifdef HAVE_LONG_LONG
21797  long_long:
21798  llx = lla + llb;
21799  return PyLong_FromLongLong(llx);
21800 #endif
21801 
21802 
21803  }
21804  #endif
21805  if (PyFloat_CheckExact(op1)) {
21806  const long b = intval;
21807  double a = PyFloat_AS_DOUBLE(op1);
21808  double result;
21809  PyFPE_START_PROTECT("add", return NULL)
21810  result = ((double)a) + (double)b;
21811  PyFPE_END_PROTECT(result)
21812  return PyFloat_FromDouble(result);
21813  }
21814  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21815 }
21816 #endif
21817 
21818 /* SetItemInt */
21819  static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21820  int r;
21821  if (!j) return -1;
21822  r = PyObject_SetItem(o, j, v);
21823  Py_DECREF(j);
21824  return r;
21825 }
21826 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21827  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21828 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21829  if (is_list || PyList_CheckExact(o)) {
21830  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21831  if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
21832  PyObject* old = PyList_GET_ITEM(o, n);
21833  Py_INCREF(v);
21834  PyList_SET_ITEM(o, n, v);
21835  Py_DECREF(old);
21836  return 1;
21837  }
21838  } else {
21839  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21840  if (likely(m && m->sq_ass_item)) {
21841  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21842  Py_ssize_t l = m->sq_length(o);
21843  if (likely(l >= 0)) {
21844  i += l;
21845  } else {
21846  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21847  return -1;
21848  PyErr_Clear();
21849  }
21850  }
21851  return m->sq_ass_item(o, i, v);
21852  }
21853  }
21854 #else
21855 #if CYTHON_COMPILING_IN_PYPY
21856  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
21857 #else
21858  if (is_list || PySequence_Check(o)) {
21859 #endif
21860  return PySequence_SetItem(o, i, v);
21861  }
21862 #endif
21863  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21864 }
21865 
21866 /* ArgTypeTest */
21867  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21868 {
21869  if (unlikely(!type)) {
21870  PyErr_SetString(PyExc_SystemError, "Missing type object");
21871  return 0;
21872  }
21873  else if (exact) {
21874  #if PY_MAJOR_VERSION == 2
21875  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21876  #endif
21877  }
21878  else {
21879  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21880  }
21881  PyErr_Format(PyExc_TypeError,
21882  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21883  name, type->tp_name, Py_TYPE(obj)->tp_name);
21884  return 0;
21885 }
21886 
21887 /* Import */
21888  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21889  PyObject *empty_list = 0;
21890  PyObject *module = 0;
21891  PyObject *global_dict = 0;
21892  PyObject *empty_dict = 0;
21893  PyObject *list;
21894  #if PY_MAJOR_VERSION < 3
21895  PyObject *py_import;
21896  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21897  if (!py_import)
21898  goto bad;
21899  #endif
21900  if (from_list)
21901  list = from_list;
21902  else {
21903  empty_list = PyList_New(0);
21904  if (!empty_list)
21905  goto bad;
21906  list = empty_list;
21907  }
21908  global_dict = PyModule_GetDict(__pyx_m);
21909  if (!global_dict)
21910  goto bad;
21911  empty_dict = PyDict_New();
21912  if (!empty_dict)
21913  goto bad;
21914  {
21915  #if PY_MAJOR_VERSION >= 3
21916  if (level == -1) {
21917  if (strchr(__Pyx_MODULE_NAME, '.')) {
21918  module = PyImport_ImportModuleLevelObject(
21919  name, global_dict, empty_dict, list, 1);
21920  if (!module) {
21921  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21922  goto bad;
21923  PyErr_Clear();
21924  }
21925  }
21926  level = 0;
21927  }
21928  #endif
21929  if (!module) {
21930  #if PY_MAJOR_VERSION < 3
21931  PyObject *py_level = PyInt_FromLong(level);
21932  if (!py_level)
21933  goto bad;
21934  module = PyObject_CallFunctionObjArgs(py_import,
21935  name, global_dict, empty_dict, list, py_level, NULL);
21936  Py_DECREF(py_level);
21937  #else
21938  module = PyImport_ImportModuleLevelObject(
21939  name, global_dict, empty_dict, list, level);
21940  #endif
21941  }
21942  }
21943 bad:
21944  #if PY_MAJOR_VERSION < 3
21945  Py_XDECREF(py_import);
21946  #endif
21947  Py_XDECREF(empty_list);
21948  Py_XDECREF(empty_dict);
21949  return module;
21950 }
21951 
21952 /* SetVTable */
21953  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21954 #if PY_VERSION_HEX >= 0x02070000
21955  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21956 #else
21957  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21958 #endif
21959  if (!ob)
21960  goto bad;
21961  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21962  goto bad;
21963  Py_DECREF(ob);
21964  return 0;
21965 bad:
21966  Py_XDECREF(ob);
21967  return -1;
21968 }
21969 
21970 /* SetupReduce */
21971  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21972  int ret;
21973  PyObject *name_attr;
21974  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21975  if (likely(name_attr)) {
21976  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21977  } else {
21978  ret = -1;
21979  }
21980  if (unlikely(ret < 0)) {
21981  PyErr_Clear();
21982  ret = 0;
21983  }
21984  Py_XDECREF(name_attr);
21985  return ret;
21986 }
21987 static int __Pyx_setup_reduce(PyObject* type_obj) {
21988  int ret = 0;
21989  PyObject *object_reduce = NULL;
21990  PyObject *object_reduce_ex = NULL;
21991  PyObject *reduce = NULL;
21992  PyObject *reduce_ex = NULL;
21993  PyObject *reduce_cython = NULL;
21994  PyObject *setstate = NULL;
21995  PyObject *setstate_cython = NULL;
21996 #if CYTHON_USE_PYTYPE_LOOKUP
21997  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21998 #else
21999  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
22000 #endif
22001 #if CYTHON_USE_PYTYPE_LOOKUP
22002  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22003 #else
22004  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22005 #endif
22006  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
22007  if (reduce_ex == object_reduce_ex) {
22008 #if CYTHON_USE_PYTYPE_LOOKUP
22009  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22010 #else
22011  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22012 #endif
22013  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
22014  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22015  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
22016  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
22017  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
22018  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22019  if (!setstate) PyErr_Clear();
22020  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22021  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
22022  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
22023  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
22024  }
22025  PyType_Modified((PyTypeObject*)type_obj);
22026  }
22027  }
22028  goto GOOD;
22029 BAD:
22030  if (!PyErr_Occurred())
22031  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22032  ret = -1;
22033 GOOD:
22034 #if !CYTHON_USE_PYTYPE_LOOKUP
22035  Py_XDECREF(object_reduce);
22036  Py_XDECREF(object_reduce_ex);
22037 #endif
22038  Py_XDECREF(reduce);
22039  Py_XDECREF(reduce_ex);
22040  Py_XDECREF(reduce_cython);
22041  Py_XDECREF(setstate);
22042  Py_XDECREF(setstate_cython);
22043  return ret;
22044 }
22045 
22046 /* PyFloatBinop */
22047  #if !CYTHON_COMPILING_IN_PYPY
22048 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
22049  const double b = floatval;
22050  double a, result;
22051  if (likely(PyFloat_CheckExact(op1))) {
22052  a = PyFloat_AS_DOUBLE(op1);
22053  } else
22054  #if PY_MAJOR_VERSION < 3
22055  if (likely(PyInt_CheckExact(op1))) {
22056  a = (double) PyInt_AS_LONG(op1);
22057  } else
22058  #endif
22059  if (likely(PyLong_CheckExact(op1))) {
22060  #if CYTHON_USE_PYLONG_INTERNALS
22061  const digit* digits = ((PyLongObject*)op1)->ob_digit;
22062  const Py_ssize_t size = Py_SIZE(op1);
22063  switch (size) {
22064  case 0: a = 0.0; break;
22065  case -1: a = -(double) digits[0]; break;
22066  case 1: a = (double) digits[0]; break;
22067  case -2:
22068  case 2:
22069  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
22070  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22071  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22072  if (size == -2)
22073  a = -a;
22074  break;
22075  }
22076  }
22077  case -3:
22078  case 3:
22079  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
22080  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22081  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22082  if (size == -3)
22083  a = -a;
22084  break;
22085  }
22086  }
22087  case -4:
22088  case 4:
22089  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
22090  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22091  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22092  if (size == -4)
22093  a = -a;
22094  break;
22095  }
22096  }
22097  default:
22098  #else
22099  {
22100  #endif
22101  a = PyLong_AsDouble(op1);
22102  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
22103  }
22104  } else {
22105  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
22106  }
22107  PyFPE_START_PROTECT("divide", return NULL)
22108  result = a / b;
22109  PyFPE_END_PROTECT(result)
22110  return PyFloat_FromDouble(result);
22111 }
22112 #endif
22113 
22114 /* BytesEquals */
22115  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22116 #if CYTHON_COMPILING_IN_PYPY
22117  return PyObject_RichCompareBool(s1, s2, equals);
22118 #else
22119  if (s1 == s2) {
22120  return (equals == Py_EQ);
22121  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22122  const char *ps1, *ps2;
22123  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22124  if (length != PyBytes_GET_SIZE(s2))
22125  return (equals == Py_NE);
22126  ps1 = PyBytes_AS_STRING(s1);
22127  ps2 = PyBytes_AS_STRING(s2);
22128  if (ps1[0] != ps2[0]) {
22129  return (equals == Py_NE);
22130  } else if (length == 1) {
22131  return (equals == Py_EQ);
22132  } else {
22133  int result;
22134 #if CYTHON_USE_UNICODE_INTERNALS
22135  Py_hash_t hash1, hash2;
22136  hash1 = ((PyBytesObject*)s1)->ob_shash;
22137  hash2 = ((PyBytesObject*)s2)->ob_shash;
22138  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22139  return (equals == Py_NE);
22140  }
22141 #endif
22142  result = memcmp(ps1, ps2, (size_t)length);
22143  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22144  }
22145  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22146  return (equals == Py_NE);
22147  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22148  return (equals == Py_NE);
22149  } else {
22150  int result;
22151  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22152  if (!py_result)
22153  return -1;
22154  result = __Pyx_PyObject_IsTrue(py_result);
22155  Py_DECREF(py_result);
22156  return result;
22157  }
22158 #endif
22159 }
22160 
22161 /* UnicodeEquals */
22162  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22163 #if CYTHON_COMPILING_IN_PYPY
22164  return PyObject_RichCompareBool(s1, s2, equals);
22165 #else
22166 #if PY_MAJOR_VERSION < 3
22167  PyObject* owned_ref = NULL;
22168 #endif
22169  int s1_is_unicode, s2_is_unicode;
22170  if (s1 == s2) {
22171  goto return_eq;
22172  }
22173  s1_is_unicode = PyUnicode_CheckExact(s1);
22174  s2_is_unicode = PyUnicode_CheckExact(s2);
22175 #if PY_MAJOR_VERSION < 3
22176  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22177  owned_ref = PyUnicode_FromObject(s2);
22178  if (unlikely(!owned_ref))
22179  return -1;
22180  s2 = owned_ref;
22181  s2_is_unicode = 1;
22182  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22183  owned_ref = PyUnicode_FromObject(s1);
22184  if (unlikely(!owned_ref))
22185  return -1;
22186  s1 = owned_ref;
22187  s1_is_unicode = 1;
22188  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22189  return __Pyx_PyBytes_Equals(s1, s2, equals);
22190  }
22191 #endif
22192  if (s1_is_unicode & s2_is_unicode) {
22193  Py_ssize_t length;
22194  int kind;
22195  void *data1, *data2;
22196  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22197  return -1;
22198  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22199  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22200  goto return_ne;
22201  }
22202 #if CYTHON_USE_UNICODE_INTERNALS
22203  {
22204  Py_hash_t hash1, hash2;
22205  #if CYTHON_PEP393_ENABLED
22206  hash1 = ((PyASCIIObject*)s1)->hash;
22207  hash2 = ((PyASCIIObject*)s2)->hash;
22208  #else
22209  hash1 = ((PyUnicodeObject*)s1)->hash;
22210  hash2 = ((PyUnicodeObject*)s2)->hash;
22211  #endif
22212  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22213  goto return_ne;
22214  }
22215  }
22216 #endif
22217  kind = __Pyx_PyUnicode_KIND(s1);
22218  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22219  goto return_ne;
22220  }
22221  data1 = __Pyx_PyUnicode_DATA(s1);
22222  data2 = __Pyx_PyUnicode_DATA(s2);
22223  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22224  goto return_ne;
22225  } else if (length == 1) {
22226  goto return_eq;
22227  } else {
22228  int result = memcmp(data1, data2, (size_t)(length * kind));
22229  #if PY_MAJOR_VERSION < 3
22230  Py_XDECREF(owned_ref);
22231  #endif
22232  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22233  }
22234  } else if ((s1 == Py_None) & s2_is_unicode) {
22235  goto return_ne;
22236  } else if ((s2 == Py_None) & s1_is_unicode) {
22237  goto return_ne;
22238  } else {
22239  int result;
22240  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22241  if (!py_result)
22242  return -1;
22243  result = __Pyx_PyObject_IsTrue(py_result);
22244  Py_DECREF(py_result);
22245  return result;
22246  }
22247 return_eq:
22248  #if PY_MAJOR_VERSION < 3
22249  Py_XDECREF(owned_ref);
22250  #endif
22251  return (equals == Py_EQ);
22252 return_ne:
22253  #if PY_MAJOR_VERSION < 3
22254  Py_XDECREF(owned_ref);
22255  #endif
22256  return (equals == Py_NE);
22257 #endif
22258 }
22259 
22260 /* CLineInTraceback */
22261  #ifndef CYTHON_CLINE_IN_TRACEBACK
22262 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
22263  PyObject *use_cline;
22264  PyObject *ptype, *pvalue, *ptraceback;
22265 #if CYTHON_COMPILING_IN_CPYTHON
22266  PyObject **cython_runtime_dict;
22267 #endif
22268  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22269 #if CYTHON_COMPILING_IN_CPYTHON
22270  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22271  if (likely(cython_runtime_dict)) {
22272  use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
22273  } else
22274 #endif
22275  {
22276  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22277  if (use_cline_obj) {
22278  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22279  Py_DECREF(use_cline_obj);
22280  } else {
22281  PyErr_Clear();
22282  use_cline = NULL;
22283  }
22284  }
22285  if (!use_cline) {
22286  c_line = 0;
22287  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22288  }
22289  else if (PyObject_Not(use_cline) != 0) {
22290  c_line = 0;
22291  }
22292  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22293  return c_line;
22294 }
22295 #endif
22296 
22297 /* CodeObjectCache */
22298  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22299  int start = 0, mid = 0, end = count - 1;
22300  if (end >= 0 && code_line > entries[end].code_line) {
22301  return count;
22302  }
22303  while (start < end) {
22304  mid = start + (end - start) / 2;
22305  if (code_line < entries[mid].code_line) {
22306  end = mid;
22307  } else if (code_line > entries[mid].code_line) {
22308  start = mid + 1;
22309  } else {
22310  return mid;
22311  }
22312  }
22313  if (code_line <= entries[mid].code_line) {
22314  return mid;
22315  } else {
22316  return mid + 1;
22317  }
22318 }
22319 static PyCodeObject *__pyx_find_code_object(int code_line) {
22320  PyCodeObject* code_object;
22321  int pos;
22322  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
22323  return NULL;
22324  }
22325  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22326  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
22327  return NULL;
22328  }
22329  code_object = __pyx_code_cache.entries[pos].code_object;
22330  Py_INCREF(code_object);
22331  return code_object;
22332 }
22333 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22334  int pos, i;
22335  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22336  if (unlikely(!code_line)) {
22337  return;
22338  }
22339  if (unlikely(!entries)) {
22340  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22341  if (likely(entries)) {
22342  __pyx_code_cache.entries = entries;
22343  __pyx_code_cache.max_count = 64;
22344  __pyx_code_cache.count = 1;
22345  entries[0].code_line = code_line;
22346  entries[0].code_object = code_object;
22347  Py_INCREF(code_object);
22348  }
22349  return;
22350  }
22351  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22352  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
22353  PyCodeObject* tmp = entries[pos].code_object;
22354  entries[pos].code_object = code_object;
22355  Py_DECREF(tmp);
22356  return;
22357  }
22358  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22359  int new_max = __pyx_code_cache.max_count + 64;
22360  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22361  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22362  if (unlikely(!entries)) {
22363  return;
22364  }
22365  __pyx_code_cache.entries = entries;
22366  __pyx_code_cache.max_count = new_max;
22367  }
22368  for (i=__pyx_code_cache.count; i>pos; i--) {
22369  entries[i] = entries[i-1];
22370  }
22371  entries[pos].code_line = code_line;
22372  entries[pos].code_object = code_object;
22373  __pyx_code_cache.count++;
22374  Py_INCREF(code_object);
22375 }
22376 
22377 /* AddTraceback */
22378  #include "compile.h"
22379 #include "frameobject.h"
22380 #include "traceback.h"
22381 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22382  const char *funcname, int c_line,
22383  int py_line, const char *filename) {
22384  PyCodeObject *py_code = 0;
22385  PyObject *py_srcfile = 0;
22386  PyObject *py_funcname = 0;
22387  #if PY_MAJOR_VERSION < 3
22388  py_srcfile = PyString_FromString(filename);
22389  #else
22390  py_srcfile = PyUnicode_FromString(filename);
22391  #endif
22392  if (!py_srcfile) goto bad;
22393  if (c_line) {
22394  #if PY_MAJOR_VERSION < 3
22395  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22396  #else
22397  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22398  #endif
22399  }
22400  else {
22401  #if PY_MAJOR_VERSION < 3
22402  py_funcname = PyString_FromString(funcname);
22403  #else
22404  py_funcname = PyUnicode_FromString(funcname);
22405  #endif
22406  }
22407  if (!py_funcname) goto bad;
22408  py_code = __Pyx_PyCode_New(
22409  0,
22410  0,
22411  0,
22412  0,
22413  0,
22414  __pyx_empty_bytes, /*PyObject *code,*/
22415  __pyx_empty_tuple, /*PyObject *consts,*/
22416  __pyx_empty_tuple, /*PyObject *names,*/
22417  __pyx_empty_tuple, /*PyObject *varnames,*/
22418  __pyx_empty_tuple, /*PyObject *freevars,*/
22419  __pyx_empty_tuple, /*PyObject *cellvars,*/
22420  py_srcfile, /*PyObject *filename,*/
22421  py_funcname, /*PyObject *name,*/
22422  py_line,
22423  __pyx_empty_bytes /*PyObject *lnotab*/
22424  );
22425  Py_DECREF(py_srcfile);
22426  Py_DECREF(py_funcname);
22427  return py_code;
22428 bad:
22429  Py_XDECREF(py_srcfile);
22430  Py_XDECREF(py_funcname);
22431  return NULL;
22432 }
22433 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22434  int py_line, const char *filename) {
22435  PyCodeObject *py_code = 0;
22436  PyFrameObject *py_frame = 0;
22437  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22438  if (c_line) {
22439  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22440  }
22441  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22442  if (!py_code) {
22443  py_code = __Pyx_CreateCodeObjectForTraceback(
22444  funcname, c_line, py_line, filename);
22445  if (!py_code) goto bad;
22446  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22447  }
22448  py_frame = PyFrame_New(
22449  tstate, /*PyThreadState *tstate,*/
22450  py_code, /*PyCodeObject *code,*/
22451  __pyx_d, /*PyObject *globals,*/
22452  0 /*PyObject *locals*/
22453  );
22454  if (!py_frame) goto bad;
22455  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22456  PyTraceBack_Here(py_frame);
22457 bad:
22458  Py_XDECREF(py_code);
22459  Py_XDECREF(py_frame);
22460 }
22461 
22462 /* CIntFromPyVerify */
22463  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22464  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22465 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22466  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22467 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22468  {\
22469  func_type value = func_value;\
22470  if (sizeof(target_type) < sizeof(func_type)) {\
22471  if (unlikely(value != (func_type) (target_type) value)) {\
22472  func_type zero = 0;\
22473  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22474  return (target_type) -1;\
22475  if (is_unsigned && unlikely(value < zero))\
22476  goto raise_neg_overflow;\
22477  else\
22478  goto raise_overflow;\
22479  }\
22480  }\
22481  return (target_type) value;\
22482  }
22483 
22484 /* CIntToPy */
22485  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22486  const int neg_one = (int) -1, const_zero = (int) 0;
22487  const int is_unsigned = neg_one > const_zero;
22488  if (is_unsigned) {
22489  if (sizeof(int) < sizeof(long)) {
22490  return PyInt_FromLong((long) value);
22491  } else if (sizeof(int) <= sizeof(unsigned long)) {
22492  return PyLong_FromUnsignedLong((unsigned long) value);
22493 #ifdef HAVE_LONG_LONG
22494  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22495  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22496 #endif
22497  }
22498  } else {
22499  if (sizeof(int) <= sizeof(long)) {
22500  return PyInt_FromLong((long) value);
22501 #ifdef HAVE_LONG_LONG
22502  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22503  return PyLong_FromLongLong((PY_LONG_LONG) value);
22504 #endif
22505  }
22506  }
22507  {
22508  int one = 1; int little = (int)*(unsigned char *)&one;
22509  unsigned char *bytes = (unsigned char *)&value;
22510  return _PyLong_FromByteArray(bytes, sizeof(int),
22511  little, !is_unsigned);
22512  }
22513 }
22514 
22515 /* CIntFromPy */
22516  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22517  const int neg_one = (int) -1, const_zero = (int) 0;
22518  const int is_unsigned = neg_one > const_zero;
22519 #if PY_MAJOR_VERSION < 3
22520  if (likely(PyInt_Check(x))) {
22521  if (sizeof(int) < sizeof(long)) {
22522  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22523  } else {
22524  long val = PyInt_AS_LONG(x);
22525  if (is_unsigned && unlikely(val < 0)) {
22526  goto raise_neg_overflow;
22527  }
22528  return (int) val;
22529  }
22530  } else
22531 #endif
22532  if (likely(PyLong_Check(x))) {
22533  if (is_unsigned) {
22534 #if CYTHON_USE_PYLONG_INTERNALS
22535  const digit* digits = ((PyLongObject*)x)->ob_digit;
22536  switch (Py_SIZE(x)) {
22537  case 0: return (int) 0;
22538  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22539  case 2:
22540  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22541  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22542  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22543  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22544  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22545  }
22546  }
22547  break;
22548  case 3:
22549  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22550  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22551  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22552  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22553  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22554  }
22555  }
22556  break;
22557  case 4:
22558  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22559  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22560  __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])))
22561  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22562  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22563  }
22564  }
22565  break;
22566  }
22567 #endif
22568 #if CYTHON_COMPILING_IN_CPYTHON
22569  if (unlikely(Py_SIZE(x) < 0)) {
22570  goto raise_neg_overflow;
22571  }
22572 #else
22573  {
22574  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22575  if (unlikely(result < 0))
22576  return (int) -1;
22577  if (unlikely(result == 1))
22578  goto raise_neg_overflow;
22579  }
22580 #endif
22581  if (sizeof(int) <= sizeof(unsigned long)) {
22582  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22583 #ifdef HAVE_LONG_LONG
22584  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22585  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22586 #endif
22587  }
22588  } else {
22589 #if CYTHON_USE_PYLONG_INTERNALS
22590  const digit* digits = ((PyLongObject*)x)->ob_digit;
22591  switch (Py_SIZE(x)) {
22592  case 0: return (int) 0;
22593  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22594  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22595  case -2:
22596  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22597  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22598  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22599  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22600  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22601  }
22602  }
22603  break;
22604  case 2:
22605  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22606  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22607  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22608  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22609  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22610  }
22611  }
22612  break;
22613  case -3:
22614  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22615  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22616  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22617  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22618  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22619  }
22620  }
22621  break;
22622  case 3:
22623  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22624  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22625  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22626  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22627  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22628  }
22629  }
22630  break;
22631  case -4:
22632  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22633  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22634  __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])))
22635  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22636  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22637  }
22638  }
22639  break;
22640  case 4:
22641  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22642  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22643  __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])))
22644  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22645  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22646  }
22647  }
22648  break;
22649  }
22650 #endif
22651  if (sizeof(int) <= sizeof(long)) {
22652  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22653 #ifdef HAVE_LONG_LONG
22654  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22655  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22656 #endif
22657  }
22658  }
22659  {
22660 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22661  PyErr_SetString(PyExc_RuntimeError,
22662  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22663 #else
22664  int val;
22665  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22666  #if PY_MAJOR_VERSION < 3
22667  if (likely(v) && !PyLong_Check(v)) {
22668  PyObject *tmp = v;
22669  v = PyNumber_Long(tmp);
22670  Py_DECREF(tmp);
22671  }
22672  #endif
22673  if (likely(v)) {
22674  int one = 1; int is_little = (int)*(unsigned char *)&one;
22675  unsigned char *bytes = (unsigned char *)&val;
22676  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22677  bytes, sizeof(val),
22678  is_little, !is_unsigned);
22679  Py_DECREF(v);
22680  if (likely(!ret))
22681  return val;
22682  }
22683 #endif
22684  return (int) -1;
22685  }
22686  } else {
22687  int val;
22688  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22689  if (!tmp) return (int) -1;
22690  val = __Pyx_PyInt_As_int(tmp);
22691  Py_DECREF(tmp);
22692  return val;
22693  }
22694 raise_overflow:
22695  PyErr_SetString(PyExc_OverflowError,
22696  "value too large to convert to int");
22697  return (int) -1;
22698 raise_neg_overflow:
22699  PyErr_SetString(PyExc_OverflowError,
22700  "can't convert negative value to int");
22701  return (int) -1;
22702 }
22703 
22704 /* CIntToPy */
22705  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22706  const long neg_one = (long) -1, const_zero = (long) 0;
22707  const int is_unsigned = neg_one > const_zero;
22708  if (is_unsigned) {
22709  if (sizeof(long) < sizeof(long)) {
22710  return PyInt_FromLong((long) value);
22711  } else if (sizeof(long) <= sizeof(unsigned long)) {
22712  return PyLong_FromUnsignedLong((unsigned long) value);
22713 #ifdef HAVE_LONG_LONG
22714  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22715  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22716 #endif
22717  }
22718  } else {
22719  if (sizeof(long) <= sizeof(long)) {
22720  return PyInt_FromLong((long) value);
22721 #ifdef HAVE_LONG_LONG
22722  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22723  return PyLong_FromLongLong((PY_LONG_LONG) value);
22724 #endif
22725  }
22726  }
22727  {
22728  int one = 1; int little = (int)*(unsigned char *)&one;
22729  unsigned char *bytes = (unsigned char *)&value;
22730  return _PyLong_FromByteArray(bytes, sizeof(long),
22731  little, !is_unsigned);
22732  }
22733 }
22734 
22735 /* CIntFromPy */
22736  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22737  const long neg_one = (long) -1, const_zero = (long) 0;
22738  const int is_unsigned = neg_one > const_zero;
22739 #if PY_MAJOR_VERSION < 3
22740  if (likely(PyInt_Check(x))) {
22741  if (sizeof(long) < sizeof(long)) {
22742  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22743  } else {
22744  long val = PyInt_AS_LONG(x);
22745  if (is_unsigned && unlikely(val < 0)) {
22746  goto raise_neg_overflow;
22747  }
22748  return (long) val;
22749  }
22750  } else
22751 #endif
22752  if (likely(PyLong_Check(x))) {
22753  if (is_unsigned) {
22754 #if CYTHON_USE_PYLONG_INTERNALS
22755  const digit* digits = ((PyLongObject*)x)->ob_digit;
22756  switch (Py_SIZE(x)) {
22757  case 0: return (long) 0;
22758  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22759  case 2:
22760  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22761  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22762  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22763  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22764  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22765  }
22766  }
22767  break;
22768  case 3:
22769  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22770  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22771  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22772  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22773  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22774  }
22775  }
22776  break;
22777  case 4:
22778  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22779  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22780  __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])))
22781  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22782  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22783  }
22784  }
22785  break;
22786  }
22787 #endif
22788 #if CYTHON_COMPILING_IN_CPYTHON
22789  if (unlikely(Py_SIZE(x) < 0)) {
22790  goto raise_neg_overflow;
22791  }
22792 #else
22793  {
22794  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22795  if (unlikely(result < 0))
22796  return (long) -1;
22797  if (unlikely(result == 1))
22798  goto raise_neg_overflow;
22799  }
22800 #endif
22801  if (sizeof(long) <= sizeof(unsigned long)) {
22802  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22803 #ifdef HAVE_LONG_LONG
22804  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22805  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22806 #endif
22807  }
22808  } else {
22809 #if CYTHON_USE_PYLONG_INTERNALS
22810  const digit* digits = ((PyLongObject*)x)->ob_digit;
22811  switch (Py_SIZE(x)) {
22812  case 0: return (long) 0;
22813  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22814  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22815  case -2:
22816  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22817  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22818  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22819  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22820  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22821  }
22822  }
22823  break;
22824  case 2:
22825  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22826  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22827  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22828  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22829  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22830  }
22831  }
22832  break;
22833  case -3:
22834  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22835  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22836  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22837  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22838  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22839  }
22840  }
22841  break;
22842  case 3:
22843  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22844  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22845  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22846  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22847  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22848  }
22849  }
22850  break;
22851  case -4:
22852  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22853  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22854  __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])))
22855  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22856  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22857  }
22858  }
22859  break;
22860  case 4:
22861  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22862  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22863  __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])))
22864  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22865  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22866  }
22867  }
22868  break;
22869  }
22870 #endif
22871  if (sizeof(long) <= sizeof(long)) {
22872  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22873 #ifdef HAVE_LONG_LONG
22874  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22875  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22876 #endif
22877  }
22878  }
22879  {
22880 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22881  PyErr_SetString(PyExc_RuntimeError,
22882  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22883 #else
22884  long val;
22885  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22886  #if PY_MAJOR_VERSION < 3
22887  if (likely(v) && !PyLong_Check(v)) {
22888  PyObject *tmp = v;
22889  v = PyNumber_Long(tmp);
22890  Py_DECREF(tmp);
22891  }
22892  #endif
22893  if (likely(v)) {
22894  int one = 1; int is_little = (int)*(unsigned char *)&one;
22895  unsigned char *bytes = (unsigned char *)&val;
22896  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22897  bytes, sizeof(val),
22898  is_little, !is_unsigned);
22899  Py_DECREF(v);
22900  if (likely(!ret))
22901  return val;
22902  }
22903 #endif
22904  return (long) -1;
22905  }
22906  } else {
22907  long val;
22908  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22909  if (!tmp) return (long) -1;
22910  val = __Pyx_PyInt_As_long(tmp);
22911  Py_DECREF(tmp);
22912  return val;
22913  }
22914 raise_overflow:
22915  PyErr_SetString(PyExc_OverflowError,
22916  "value too large to convert to long");
22917  return (long) -1;
22918 raise_neg_overflow:
22919  PyErr_SetString(PyExc_OverflowError,
22920  "can't convert negative value to long");
22921  return (long) -1;
22922 }
22923 
22924 /* FastTypeChecks */
22925  #if CYTHON_COMPILING_IN_CPYTHON
22926 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22927  while (a) {
22928  a = a->tp_base;
22929  if (a == b)
22930  return 1;
22931  }
22932  return b == &PyBaseObject_Type;
22933 }
22934 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22935  PyObject *mro;
22936  if (a == b) return 1;
22937  mro = a->tp_mro;
22938  if (likely(mro)) {
22939  Py_ssize_t i, n;
22940  n = PyTuple_GET_SIZE(mro);
22941  for (i = 0; i < n; i++) {
22942  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22943  return 1;
22944  }
22945  return 0;
22946  }
22947  return __Pyx_InBases(a, b);
22948 }
22949 #if PY_MAJOR_VERSION == 2
22950 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22951  PyObject *exception, *value, *tb;
22952  int res;
22953  __Pyx_PyThreadState_declare
22954  __Pyx_PyThreadState_assign
22955  __Pyx_ErrFetch(&exception, &value, &tb);
22956  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22957  if (unlikely(res == -1)) {
22958  PyErr_WriteUnraisable(err);
22959  res = 0;
22960  }
22961  if (!res) {
22962  res = PyObject_IsSubclass(err, exc_type2);
22963  if (unlikely(res == -1)) {
22964  PyErr_WriteUnraisable(err);
22965  res = 0;
22966  }
22967  }
22968  __Pyx_ErrRestore(exception, value, tb);
22969  return res;
22970 }
22971 #else
22972 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22973  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22974  if (!res) {
22975  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22976  }
22977  return res;
22978 }
22979 #endif
22980 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22981  if (likely(err == exc_type)) return 1;
22982  if (likely(PyExceptionClass_Check(err))) {
22983  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22984  }
22985  return PyErr_GivenExceptionMatches(err, exc_type);
22986 }
22987 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22988  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22989  if (likely(PyExceptionClass_Check(err))) {
22990  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22991  }
22992  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22993 }
22994 #endif
22995 
22996 /* FetchCommonType */
22997  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22998  PyObject* fake_module;
22999  PyTypeObject* cached_type = NULL;
23000  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
23001  if (!fake_module) return NULL;
23002  Py_INCREF(fake_module);
23003  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
23004  if (cached_type) {
23005  if (!PyType_Check((PyObject*)cached_type)) {
23006  PyErr_Format(PyExc_TypeError,
23007  "Shared Cython type %.200s is not a type object",
23008  type->tp_name);
23009  goto bad;
23010  }
23011  if (cached_type->tp_basicsize != type->tp_basicsize) {
23012  PyErr_Format(PyExc_TypeError,
23013  "Shared Cython type %.200s has the wrong size, try recompiling",
23014  type->tp_name);
23015  goto bad;
23016  }
23017  } else {
23018  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
23019  PyErr_Clear();
23020  if (PyType_Ready(type) < 0) goto bad;
23021  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
23022  goto bad;
23023  Py_INCREF(type);
23024  cached_type = type;
23025  }
23026 done:
23027  Py_DECREF(fake_module);
23028  return cached_type;
23029 bad:
23030  Py_XDECREF(cached_type);
23031  cached_type = NULL;
23032  goto done;
23033 }
23034 
23035 /* SwapException */
23036  #if CYTHON_FAST_THREAD_STATE
23037 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23038  PyObject *tmp_type, *tmp_value, *tmp_tb;
23039  #if PY_VERSION_HEX >= 0x030700A2
23040  tmp_type = tstate->exc_state.exc_type;
23041  tmp_value = tstate->exc_state.exc_value;
23042  tmp_tb = tstate->exc_state.exc_traceback;
23043  tstate->exc_state.exc_type = *type;
23044  tstate->exc_state.exc_value = *value;
23045  tstate->exc_state.exc_traceback = *tb;
23046  #else
23047  tmp_type = tstate->exc_type;
23048  tmp_value = tstate->exc_value;
23049  tmp_tb = tstate->exc_traceback;
23050  tstate->exc_type = *type;
23051  tstate->exc_value = *value;
23052  tstate->exc_traceback = *tb;
23053  #endif
23054  *type = tmp_type;
23055  *value = tmp_value;
23056  *tb = tmp_tb;
23057 }
23058 #else
23059 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
23060  PyObject *tmp_type, *tmp_value, *tmp_tb;
23061  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
23062  PyErr_SetExcInfo(*type, *value, *tb);
23063  *type = tmp_type;
23064  *value = tmp_value;
23065  *tb = tmp_tb;
23066 }
23067 #endif
23068 
23069 /* PyObjectCallMethod1 */
23070  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23071  PyObject *result = NULL;
23072 #if CYTHON_UNPACK_METHODS
23073  if (likely(PyMethod_Check(method))) {
23074  PyObject *self = PyMethod_GET_SELF(method);
23075  if (likely(self)) {
23076  PyObject *args;
23077  PyObject *function = PyMethod_GET_FUNCTION(method);
23078  #if CYTHON_FAST_PYCALL
23079  if (PyFunction_Check(function)) {
23080  PyObject *args[2] = {self, arg};
23081  result = __Pyx_PyFunction_FastCall(function, args, 2);
23082  goto done;
23083  }
23084  #endif
23085  #if CYTHON_FAST_PYCCALL
23086  if (__Pyx_PyFastCFunction_Check(function)) {
23087  PyObject *args[2] = {self, arg};
23088  result = __Pyx_PyCFunction_FastCall(function, args, 2);
23089  goto done;
23090  }
23091  #endif
23092  args = PyTuple_New(2);
23093  if (unlikely(!args)) goto done;
23094  Py_INCREF(self);
23095  PyTuple_SET_ITEM(args, 0, self);
23096  Py_INCREF(arg);
23097  PyTuple_SET_ITEM(args, 1, arg);
23098  Py_INCREF(function);
23099  result = __Pyx_PyObject_Call(function, args, NULL);
23100  Py_DECREF(args);
23101  Py_DECREF(function);
23102  return result;
23103  }
23104  }
23105 #endif
23106  result = __Pyx_PyObject_CallOneArg(method, arg);
23107  goto done;
23108 done:
23109  return result;
23110 }
23111 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23112  PyObject *method, *result = NULL;
23113  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
23114  if (unlikely(!method)) goto done;
23115  result = __Pyx__PyObject_CallMethod1(method, arg);
23116 done:
23117  Py_XDECREF(method);
23118  return result;
23119 }
23120 
23121 /* CoroutineBase */
23122  #include <structmember.h>
23123 #include <frameobject.h>
23124 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23125 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23126  PyObject *et, *ev, *tb;
23127  PyObject *value = NULL;
23128  __Pyx_ErrFetch(&et, &ev, &tb);
23129  if (!et) {
23130  Py_XDECREF(tb);
23131  Py_XDECREF(ev);
23132  Py_INCREF(Py_None);
23133  *pvalue = Py_None;
23134  return 0;
23135  }
23136  if (likely(et == PyExc_StopIteration)) {
23137  if (!ev) {
23138  Py_INCREF(Py_None);
23139  value = Py_None;
23140  }
23141 #if PY_VERSION_HEX >= 0x030300A0
23142  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23143  value = ((PyStopIterationObject *)ev)->value;
23144  Py_INCREF(value);
23145  Py_DECREF(ev);
23146  }
23147 #endif
23148  else if (unlikely(PyTuple_Check(ev))) {
23149  if (PyTuple_GET_SIZE(ev) >= 1) {
23150 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23151  value = PyTuple_GET_ITEM(ev, 0);
23152  Py_INCREF(value);
23153 #else
23154  value = PySequence_ITEM(ev, 0);
23155 #endif
23156  } else {
23157  Py_INCREF(Py_None);
23158  value = Py_None;
23159  }
23160  Py_DECREF(ev);
23161  }
23162  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23163  value = ev;
23164  }
23165  if (likely(value)) {
23166  Py_XDECREF(tb);
23167  Py_DECREF(et);
23168  *pvalue = value;
23169  return 0;
23170  }
23171  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23172  __Pyx_ErrRestore(et, ev, tb);
23173  return -1;
23174  }
23175  PyErr_NormalizeException(&et, &ev, &tb);
23176  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23177  __Pyx_ErrRestore(et, ev, tb);
23178  return -1;
23179  }
23180  Py_XDECREF(tb);
23181  Py_DECREF(et);
23182 #if PY_VERSION_HEX >= 0x030300A0
23183  value = ((PyStopIterationObject *)ev)->value;
23184  Py_INCREF(value);
23185  Py_DECREF(ev);
23186 #else
23187  {
23188  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23189  Py_DECREF(ev);
23190  if (likely(args)) {
23191  value = PySequence_GetItem(args, 0);
23192  Py_DECREF(args);
23193  }
23194  if (unlikely(!value)) {
23195  __Pyx_ErrRestore(NULL, NULL, NULL);
23196  Py_INCREF(Py_None);
23197  value = Py_None;
23198  }
23199  }
23200 #endif
23201  *pvalue = value;
23202  return 0;
23203 }
23204 static CYTHON_INLINE
23205 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
23206  PyObject *exc_type = self->exc_type;
23207  PyObject *exc_value = self->exc_value;
23208  PyObject *exc_traceback = self->exc_traceback;
23209  self->exc_type = NULL;
23210  self->exc_value = NULL;
23211  self->exc_traceback = NULL;
23212  Py_XDECREF(exc_type);
23213  Py_XDECREF(exc_value);
23214  Py_XDECREF(exc_traceback);
23215 }
23216 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23217 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23218  const char *msg;
23219  if (0) {
23220  #ifdef __Pyx_Coroutine_USED
23221  } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
23222  msg = "coroutine already executing";
23223  #endif
23224  #ifdef __Pyx_AsyncGen_USED
23225  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
23226  msg = "async generator already executing";
23227  #endif
23228  } else {
23229  msg = "generator already executing";
23230  }
23231  PyErr_SetString(PyExc_ValueError, msg);
23232 }
23233 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
23234 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
23235  const char *msg;
23236  if (0) {
23237  #ifdef __Pyx_Coroutine_USED
23238  } else if (__Pyx_Coroutine_CheckExact(gen)) {
23239  msg = "can't send non-None value to a just-started coroutine";
23240  #endif
23241  #ifdef __Pyx_AsyncGen_USED
23242  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
23243  msg = "can't send non-None value to a just-started async generator";
23244  #endif
23245  } else {
23246  msg = "can't send non-None value to a just-started generator";
23247  }
23248  PyErr_SetString(PyExc_TypeError, msg);
23249 }
23250 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
23251 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
23252  #ifdef __Pyx_Coroutine_USED
23253  if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
23254  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
23255  } else
23256  #endif
23257  if (value) {
23258  #ifdef __Pyx_AsyncGen_USED
23259  if (__Pyx_AsyncGen_CheckExact(gen))
23260  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
23261  else
23262  #endif
23263  PyErr_SetNone(PyExc_StopIteration);
23264  }
23265 }
23266 static
23267 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
23268  __Pyx_PyThreadState_declare
23269  PyThreadState *tstate;
23270  PyObject *retval;
23271  assert(!self->is_running);
23272  if (unlikely(self->resume_label == 0)) {
23273  if (unlikely(value && value != Py_None)) {
23274  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
23275  }
23276  }
23277  if (unlikely(self->resume_label == -1)) {
23278  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
23279  }
23280 #if CYTHON_FAST_THREAD_STATE
23281  __Pyx_PyThreadState_assign
23282  tstate = __pyx_tstate;
23283 #else
23284  tstate = __Pyx_PyThreadState_Current;
23285 #endif
23286  if (self->exc_type) {
23287 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23288 #else
23289  if (self->exc_traceback) {
23290  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23291  PyFrameObject *f = tb->tb_frame;
23292  Py_XINCREF(tstate->frame);
23293  assert(f->f_back == NULL);
23294  f->f_back = tstate->frame;
23295  }
23296 #endif
23297  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
23298  &self->exc_traceback);
23299  } else {
23300  __Pyx_Coroutine_ExceptionClear(self);
23301  __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
23302  }
23303  self->is_running = 1;
23304  retval = self->body((PyObject *) self, tstate, value);
23305  self->is_running = 0;
23306  return retval;
23307 }
23308 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
23309  if (likely(self->exc_traceback)) {
23310 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23311 #else
23312  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23313  PyFrameObject *f = tb->tb_frame;
23314  Py_CLEAR(f->f_back);
23315 #endif
23316  }
23317 }
23318 static CYTHON_INLINE
23319 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23320  if (unlikely(!retval)) {
23321  __Pyx_PyThreadState_declare
23322  __Pyx_PyThreadState_assign
23323  if (!__Pyx_PyErr_Occurred()) {
23324  PyObject *exc = PyExc_StopIteration;
23325  #ifdef __Pyx_AsyncGen_USED
23326  if (__Pyx_AsyncGen_CheckExact(gen))
23327  exc = __Pyx_PyExc_StopAsyncIteration;
23328  #endif
23329  __Pyx_PyErr_SetNone(exc);
23330  }
23331  }
23332  return retval;
23333 }
23334 static CYTHON_INLINE
23335 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23336  PyObject *ret;
23337  PyObject *val = NULL;
23338  __Pyx_Coroutine_Undelegate(gen);
23339  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23340  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23341  Py_XDECREF(val);
23342  return ret;
23343 }
23344 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23345  PyObject *retval;
23346  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23347  PyObject *yf = gen->yieldfrom;
23348  if (unlikely(gen->is_running))
23349  return __Pyx_Coroutine_AlreadyRunningError(gen);
23350  if (yf) {
23351  PyObject *ret;
23352  gen->is_running = 1;
23353  #ifdef __Pyx_Generator_USED
23354  if (__Pyx_Generator_CheckExact(yf)) {
23355  ret = __Pyx_Coroutine_Send(yf, value);
23356  } else
23357  #endif
23358  #ifdef __Pyx_Coroutine_USED
23359  if (__Pyx_Coroutine_CheckExact(yf)) {
23360  ret = __Pyx_Coroutine_Send(yf, value);
23361  } else
23362  #endif
23363  #ifdef __Pyx_AsyncGen_USED
23364  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23365  ret = __Pyx_async_gen_asend_send(yf, value);
23366  } else
23367  #endif
23368  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23369  if (PyGen_CheckExact(yf)) {
23370  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23371  } else
23372  #endif
23373  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23374  if (PyCoro_CheckExact(yf)) {
23375  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23376  } else
23377  #endif
23378  {
23379  if (value == Py_None)
23380  ret = Py_TYPE(yf)->tp_iternext(yf);
23381  else
23382  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23383  }
23384  gen->is_running = 0;
23385  if (likely(ret)) {
23386  return ret;
23387  }
23388  retval = __Pyx_Coroutine_FinishDelegation(gen);
23389  } else {
23390  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23391  }
23392  return __Pyx_Coroutine_MethodReturn(self, retval);
23393 }
23394 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23395  PyObject *retval = NULL;
23396  int err = 0;
23397  #ifdef __Pyx_Generator_USED
23398  if (__Pyx_Generator_CheckExact(yf)) {
23399  retval = __Pyx_Coroutine_Close(yf);
23400  if (!retval)
23401  return -1;
23402  } else
23403  #endif
23404  #ifdef __Pyx_Coroutine_USED
23405  if (__Pyx_Coroutine_CheckExact(yf)) {
23406  retval = __Pyx_Coroutine_Close(yf);
23407  if (!retval)
23408  return -1;
23409  } else
23410  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23411  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
23412  if (!retval)
23413  return -1;
23414  } else
23415  #endif
23416  #ifdef __Pyx_AsyncGen_USED
23417  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23418  retval = __Pyx_async_gen_asend_close(yf, NULL);
23419  } else
23420  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23421  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23422  } else
23423  #endif
23424  {
23425  PyObject *meth;
23426  gen->is_running = 1;
23427  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23428  if (unlikely(!meth)) {
23429  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23430  PyErr_WriteUnraisable(yf);
23431  }
23432  PyErr_Clear();
23433  } else {
23434  retval = PyObject_CallFunction(meth, NULL);
23435  Py_DECREF(meth);
23436  if (!retval)
23437  err = -1;
23438  }
23439  gen->is_running = 0;
23440  }
23441  Py_XDECREF(retval);
23442  return err;
23443 }
23444 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23445  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23446  PyObject *yf = gen->yieldfrom;
23447  if (unlikely(gen->is_running))
23448  return __Pyx_Coroutine_AlreadyRunningError(gen);
23449  if (yf) {
23450  PyObject *ret;
23451  gen->is_running = 1;
23452  #ifdef __Pyx_Generator_USED
23453  if (__Pyx_Generator_CheckExact(yf)) {
23454  ret = __Pyx_Generator_Next(yf);
23455  } else
23456  #endif
23457  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23458  if (PyGen_CheckExact(yf)) {
23459  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23460  } else
23461  #endif
23462  ret = Py_TYPE(yf)->tp_iternext(yf);
23463  gen->is_running = 0;
23464  if (likely(ret)) {
23465  return ret;
23466  }
23467  return __Pyx_Coroutine_FinishDelegation(gen);
23468  }
23469  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23470 }
23471 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23472  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23473  PyObject *retval, *raised_exception;
23474  PyObject *yf = gen->yieldfrom;
23475  int err = 0;
23476  if (unlikely(gen->is_running))
23477  return __Pyx_Coroutine_AlreadyRunningError(gen);
23478  if (yf) {
23479  Py_INCREF(yf);
23480  err = __Pyx_Coroutine_CloseIter(gen, yf);
23481  __Pyx_Coroutine_Undelegate(gen);
23482  Py_DECREF(yf);
23483  }
23484  if (err == 0)
23485  PyErr_SetNone(PyExc_GeneratorExit);
23486  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23487  if (unlikely(retval)) {
23488  const char *msg;
23489  Py_DECREF(retval);
23490  if ((0)) {
23491  #ifdef __Pyx_Coroutine_USED
23492  } else if (__Pyx_Coroutine_CheckExact(self)) {
23493  msg = "coroutine ignored GeneratorExit";
23494  #endif
23495  #ifdef __Pyx_AsyncGen_USED
23496  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23497 #if PY_VERSION_HEX < 0x03060000
23498  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23499 #else
23500  msg = "async generator ignored GeneratorExit";
23501 #endif
23502  #endif
23503  } else {
23504  msg = "generator ignored GeneratorExit";
23505  }
23506  PyErr_SetString(PyExc_RuntimeError, msg);
23507  return NULL;
23508  }
23509  raised_exception = PyErr_Occurred();
23510  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23511  if (raised_exception) PyErr_Clear();
23512  Py_INCREF(Py_None);
23513  return Py_None;
23514  }
23515  return NULL;
23516 }
23517 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23518  PyObject *args, int close_on_genexit) {
23519  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23520  PyObject *yf = gen->yieldfrom;
23521  if (unlikely(gen->is_running))
23522  return __Pyx_Coroutine_AlreadyRunningError(gen);
23523  if (yf) {
23524  PyObject *ret;
23525  Py_INCREF(yf);
23526  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23527  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23528  Py_DECREF(yf);
23529  __Pyx_Coroutine_Undelegate(gen);
23530  if (err < 0)
23531  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23532  goto throw_here;
23533  }
23534  gen->is_running = 1;
23535  if (0
23536  #ifdef __Pyx_Generator_USED
23537  || __Pyx_Generator_CheckExact(yf)
23538  #endif
23539  #ifdef __Pyx_Coroutine_USED
23540  || __Pyx_Coroutine_CheckExact(yf)
23541  #endif
23542  ) {
23543  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23544  #ifdef __Pyx_Coroutine_USED
23545  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23546  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23547  #endif
23548  } else {
23549  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23550  if (unlikely(!meth)) {
23551  Py_DECREF(yf);
23552  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23553  gen->is_running = 0;
23554  return NULL;
23555  }
23556  PyErr_Clear();
23557  __Pyx_Coroutine_Undelegate(gen);
23558  gen->is_running = 0;
23559  goto throw_here;
23560  }
23561  if (likely(args)) {
23562  ret = PyObject_CallObject(meth, args);
23563  } else {
23564  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23565  }
23566  Py_DECREF(meth);
23567  }
23568  gen->is_running = 0;
23569  Py_DECREF(yf);
23570  if (!ret) {
23571  ret = __Pyx_Coroutine_FinishDelegation(gen);
23572  }
23573  return __Pyx_Coroutine_MethodReturn(self, ret);
23574  }
23575 throw_here:
23576  __Pyx_Raise(typ, val, tb, NULL);
23577  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23578 }
23579 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23580  PyObject *typ;
23581  PyObject *val = NULL;
23582  PyObject *tb = NULL;
23583  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23584  return NULL;
23585  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23586 }
23587 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23588  Py_VISIT(gen->closure);
23589  Py_VISIT(gen->classobj);
23590  Py_VISIT(gen->yieldfrom);
23591  Py_VISIT(gen->exc_type);
23592  Py_VISIT(gen->exc_value);
23593  Py_VISIT(gen->exc_traceback);
23594  return 0;
23595 }
23596 static int __Pyx_Coroutine_clear(PyObject *self) {
23597  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23598  Py_CLEAR(gen->closure);
23599  Py_CLEAR(gen->classobj);
23600  Py_CLEAR(gen->yieldfrom);
23601  Py_CLEAR(gen->exc_type);
23602  Py_CLEAR(gen->exc_value);
23603  Py_CLEAR(gen->exc_traceback);
23604 #ifdef __Pyx_AsyncGen_USED
23605  if (__Pyx_AsyncGen_CheckExact(self)) {
23606  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23607  }
23608 #endif
23609  Py_CLEAR(gen->gi_name);
23610  Py_CLEAR(gen->gi_qualname);
23611  Py_CLEAR(gen->gi_modulename);
23612  return 0;
23613 }
23614 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23615  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23616  PyObject_GC_UnTrack(gen);
23617  if (gen->gi_weakreflist != NULL)
23618  PyObject_ClearWeakRefs(self);
23619  if (gen->resume_label >= 0) {
23620  PyObject_GC_Track(self);
23621 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23622  if (PyObject_CallFinalizerFromDealloc(self))
23623 #else
23624  Py_TYPE(gen)->tp_del(self);
23625  if (self->ob_refcnt > 0)
23626 #endif
23627  {
23628  return;
23629  }
23630  PyObject_GC_UnTrack(self);
23631  }
23632 #ifdef __Pyx_AsyncGen_USED
23633  if (__Pyx_AsyncGen_CheckExact(self)) {
23634  /* We have to handle this case for asynchronous generators
23635  right here, because this code has to be between UNTRACK
23636  and GC_Del. */
23637  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23638  }
23639 #endif
23640  __Pyx_Coroutine_clear(self);
23641  PyObject_GC_Del(gen);
23642 }
23643 static void __Pyx_Coroutine_del(PyObject *self) {
23644  PyObject *error_type, *error_value, *error_traceback;
23645  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23646  __Pyx_PyThreadState_declare
23647  if (gen->resume_label < 0) {
23648  return;
23649  }
23650 #if !CYTHON_USE_TP_FINALIZE
23651  assert(self->ob_refcnt == 0);
23652  self->ob_refcnt = 1;
23653 #endif
23654  __Pyx_PyThreadState_assign
23655  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23656 #ifdef __Pyx_AsyncGen_USED
23657  if (__Pyx_AsyncGen_CheckExact(self)) {
23658  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23659  PyObject *finalizer = agen->ag_finalizer;
23660  if (finalizer && !agen->ag_closed) {
23661  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23662  if (unlikely(!res)) {
23663  PyErr_WriteUnraisable(self);
23664  } else {
23665  Py_DECREF(res);
23666  }
23667  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23668  return;
23669  }
23670  }
23671 #endif
23672  if (unlikely(gen->resume_label == 0 && !error_value)) {
23673 #ifdef __Pyx_Coroutine_USED
23674 #ifdef __Pyx_Generator_USED
23675  if (!__Pyx_Generator_CheckExact(self))
23676 #endif
23677  {
23678  PyObject_GC_UnTrack(self);
23679 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23680  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23681  PyErr_WriteUnraisable(self);
23682 #else
23683  {PyObject *msg;
23684  char *cmsg;
23685  #if CYTHON_COMPILING_IN_PYPY
23686  msg = NULL;
23687  cmsg = (char*) "coroutine was never awaited";
23688  #else
23689  char *cname;
23690  PyObject *qualname;
23691  qualname = gen->gi_qualname;
23692  cname = PyString_AS_STRING(qualname);
23693  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23694  if (unlikely(!msg)) {
23695  PyErr_Clear();
23696  cmsg = (char*) "coroutine was never awaited";
23697  } else {
23698  cmsg = PyString_AS_STRING(msg);
23699  }
23700  #endif
23701  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23702  PyErr_WriteUnraisable(self);
23703  Py_XDECREF(msg);}
23704 #endif
23705  PyObject_GC_Track(self);
23706  }
23707 #endif
23708  } else {
23709  PyObject *res = __Pyx_Coroutine_Close(self);
23710  if (unlikely(!res)) {
23711  if (PyErr_Occurred())
23712  PyErr_WriteUnraisable(self);
23713  } else {
23714  Py_DECREF(res);
23715  }
23716  }
23717  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23718 #if !CYTHON_USE_TP_FINALIZE
23719  assert(self->ob_refcnt > 0);
23720  if (--self->ob_refcnt == 0) {
23721  return;
23722  }
23723  {
23724  Py_ssize_t refcnt = self->ob_refcnt;
23725  _Py_NewReference(self);
23726  self->ob_refcnt = refcnt;
23727  }
23728 #if CYTHON_COMPILING_IN_CPYTHON
23729  assert(PyType_IS_GC(self->ob_type) &&
23730  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23731  _Py_DEC_REFTOTAL;
23732 #endif
23733 #ifdef COUNT_ALLOCS
23734  --Py_TYPE(self)->tp_frees;
23735  --Py_TYPE(self)->tp_allocs;
23736 #endif
23737 #endif
23738 }
23739 static PyObject *
23740 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
23741 {
23742  PyObject *name = self->gi_name;
23743  if (unlikely(!name)) name = Py_None;
23744  Py_INCREF(name);
23745  return name;
23746 }
23747 static int
23748 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
23749 {
23750  PyObject *tmp;
23751 #if PY_MAJOR_VERSION >= 3
23752  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23753 #else
23754  if (unlikely(value == NULL || !PyString_Check(value))) {
23755 #endif
23756  PyErr_SetString(PyExc_TypeError,
23757  "__name__ must be set to a string object");
23758  return -1;
23759  }
23760  tmp = self->gi_name;
23761  Py_INCREF(value);
23762  self->gi_name = value;
23763  Py_XDECREF(tmp);
23764  return 0;
23765 }
23766 static PyObject *
23767 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
23768 {
23769  PyObject *name = self->gi_qualname;
23770  if (unlikely(!name)) name = Py_None;
23771  Py_INCREF(name);
23772  return name;
23773 }
23774 static int
23775 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
23776 {
23777  PyObject *tmp;
23778 #if PY_MAJOR_VERSION >= 3
23779  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23780 #else
23781  if (unlikely(value == NULL || !PyString_Check(value))) {
23782 #endif
23783  PyErr_SetString(PyExc_TypeError,
23784  "__qualname__ must be set to a string object");
23785  return -1;
23786  }
23787  tmp = self->gi_qualname;
23788  Py_INCREF(value);
23789  self->gi_qualname = value;
23790  Py_XDECREF(tmp);
23791  return 0;
23792 }
23793 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23794  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
23795  PyObject *name, PyObject *qualname, PyObject *module_name) {
23796  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23797  if (unlikely(!gen))
23798  return NULL;
23799  return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
23800 }
23801 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23802  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
23803  PyObject *name, PyObject *qualname, PyObject *module_name) {
23804  gen->body = body;
23805  gen->closure = closure;
23806  Py_XINCREF(closure);
23807  gen->is_running = 0;
23808  gen->resume_label = 0;
23809  gen->classobj = NULL;
23810  gen->yieldfrom = NULL;
23811  gen->exc_type = NULL;
23812  gen->exc_value = NULL;
23813  gen->exc_traceback = NULL;
23814  gen->gi_weakreflist = NULL;
23815  Py_XINCREF(qualname);
23816  gen->gi_qualname = qualname;
23817  Py_XINCREF(name);
23818  gen->gi_name = name;
23819  Py_XINCREF(module_name);
23820  gen->gi_modulename = module_name;
23821  PyObject_GC_Track(gen);
23822  return gen;
23823 }
23824 
23825 /* PatchModuleWithCoroutine */
23826  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23827 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23828  int result;
23829  PyObject *globals, *result_obj;
23830  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23831  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23832  #ifdef __Pyx_Coroutine_USED
23833  (PyObject*)__pyx_CoroutineType);
23834  #else
23835  Py_None);
23836  #endif
23837  if (unlikely(result < 0)) goto ignore;
23838  result = PyDict_SetItemString(globals, "_cython_generator_type",
23839  #ifdef __Pyx_Generator_USED
23840  (PyObject*)__pyx_GeneratorType);
23841  #else
23842  Py_None);
23843  #endif
23844  if (unlikely(result < 0)) goto ignore;
23845  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23846  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23847  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23848  if (unlikely(!result_obj)) goto ignore;
23849  Py_DECREF(result_obj);
23850  Py_DECREF(globals);
23851  return module;
23852 ignore:
23853  Py_XDECREF(globals);
23854  PyErr_WriteUnraisable(module);
23855  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23856  Py_DECREF(module);
23857  module = NULL;
23858  }
23859 #else
23860  py_code++;
23861 #endif
23862  return module;
23863 }
23864 
23865 /* PatchGeneratorABC */
23866  #ifndef CYTHON_REGISTER_ABCS
23867 #define CYTHON_REGISTER_ABCS 1
23868 #endif
23869 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23870 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23871 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23872  module = __Pyx_Coroutine_patch_module(
23873  module, ""
23874 "if _cython_generator_type is not None:\n"
23875 " try: Generator = _module.Generator\n"
23876 " except AttributeError: pass\n"
23877 " else: Generator.register(_cython_generator_type)\n"
23878 "if _cython_coroutine_type is not None:\n"
23879 " try: Coroutine = _module.Coroutine\n"
23880 " except AttributeError: pass\n"
23881 " else: Coroutine.register(_cython_coroutine_type)\n"
23882  );
23883  return module;
23884 }
23885 #endif
23886 static int __Pyx_patch_abc(void) {
23887 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23888  static int abc_patched = 0;
23889  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23890  PyObject *module;
23891  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23892  if (!module) {
23893  PyErr_WriteUnraisable(NULL);
23894  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23895  ((PY_MAJOR_VERSION >= 3) ?
23896  "Cython module failed to register with collections.abc module" :
23897  "Cython module failed to register with collections module"), 1) < 0)) {
23898  return -1;
23899  }
23900  } else {
23901  module = __Pyx_patch_abc_module(module);
23902  abc_patched = 1;
23903  if (unlikely(!module))
23904  return -1;
23905  Py_DECREF(module);
23906  }
23907  module = PyImport_ImportModule("backports_abc");
23908  if (module) {
23909  module = __Pyx_patch_abc_module(module);
23910  Py_XDECREF(module);
23911  }
23912  if (!module) {
23913  PyErr_Clear();
23914  }
23915  }
23916 #else
23917  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23918 #endif
23919  return 0;
23920 }
23921 
23922 /* Generator */
23923  static PyMethodDef __pyx_Generator_methods[] = {
23924  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23925  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23926  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23927  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23928  {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
23929  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23930  {0, 0, 0, 0}
23931 };
23932 static PyMemberDef __pyx_Generator_memberlist[] = {
23933  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23934  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23935  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23936  {0, 0, 0, 0, 0}
23937 };
23938 static PyGetSetDef __pyx_Generator_getsets[] = {
23939  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23940  (char*) PyDoc_STR("name of the generator"), 0},
23941  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23942  (char*) PyDoc_STR("qualified name of the generator"), 0},
23943  {0, 0, 0, 0, 0}
23944 };
23945 static PyTypeObject __pyx_GeneratorType_type = {
23946  PyVarObject_HEAD_INIT(0, 0)
23947  "generator",
23948  sizeof(__pyx_CoroutineObject),
23949  0,
23950  (destructor) __Pyx_Coroutine_dealloc,
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  0,
23964  0,
23965  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23966  0,
23967  (traverseproc) __Pyx_Coroutine_traverse,
23968  0,
23969  0,
23970  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23971  0,
23972  (iternextfunc) __Pyx_Generator_Next,
23973  __pyx_Generator_methods,
23974  __pyx_Generator_memberlist,
23975  __pyx_Generator_getsets,
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  0,
23990  0,
23991 #if CYTHON_USE_TP_FINALIZE
23992  0,
23993 #else
23994  __Pyx_Coroutine_del,
23995 #endif
23996  0,
23997 #if CYTHON_USE_TP_FINALIZE
23998  __Pyx_Coroutine_del,
23999 #elif PY_VERSION_HEX >= 0x030400a1
24000  0,
24001 #endif
24002 };
24003 static int __pyx_Generator_init(void) {
24004  __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
24005  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
24006  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
24007  if (unlikely(!__pyx_GeneratorType)) {
24008  return -1;
24009  }
24010  return 0;
24011 }
24012 
24013 /* CheckBinaryVersion */
24014  static int __Pyx_check_binary_version(void) {
24015  char ctversion[4], rtversion[4];
24016  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24017  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
24018  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
24019  char message[200];
24020  PyOS_snprintf(message, sizeof(message),
24021  "compiletime version %s of module '%.100s' "
24022  "does not match runtime version %s",
24023  ctversion, __Pyx_MODULE_NAME, rtversion);
24024  return PyErr_WarnEx(NULL, message, 1);
24025  }
24026  return 0;
24027 }
24028 
24029 /* InitStrings */
24030  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24031  while (t->p) {
24032  #if PY_MAJOR_VERSION < 3
24033  if (t->is_unicode) {
24034  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24035  } else if (t->intern) {
24036  *t->p = PyString_InternFromString(t->s);
24037  } else {
24038  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24039  }
24040  #else
24041  if (t->is_unicode | t->is_str) {
24042  if (t->intern) {
24043  *t->p = PyUnicode_InternFromString(t->s);
24044  } else if (t->encoding) {
24045  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24046  } else {
24047  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24048  }
24049  } else {
24050  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24051  }
24052  #endif
24053  if (!*t->p)
24054  return -1;
24055  if (PyObject_Hash(*t->p) == -1)
24056  PyErr_Clear();
24057  ++t;
24058  }
24059  return 0;
24060 }
24061 
24062 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24063  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24064 }
24065 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24066  Py_ssize_t ignore;
24067  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24068 }
24069 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24070 #if !CYTHON_PEP393_ENABLED
24071 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24072  char* defenc_c;
24073  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24074  if (!defenc) return NULL;
24075  defenc_c = PyBytes_AS_STRING(defenc);
24076 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24077  {
24078  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24079  char* c;
24080  for (c = defenc_c; c < end; c++) {
24081  if ((unsigned char) (*c) >= 128) {
24082  PyUnicode_AsASCIIString(o);
24083  return NULL;
24084  }
24085  }
24086  }
24087 #endif
24088  *length = PyBytes_GET_SIZE(defenc);
24089  return defenc_c;
24090 }
24091 #else
24092 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24093  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24094 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24095  if (likely(PyUnicode_IS_ASCII(o))) {
24096  *length = PyUnicode_GET_LENGTH(o);
24097  return PyUnicode_AsUTF8(o);
24098  } else {
24099  PyUnicode_AsASCIIString(o);
24100  return NULL;
24101  }
24102 #else
24103  return PyUnicode_AsUTF8AndSize(o, length);
24104 #endif
24105 }
24106 #endif
24107 #endif
24108 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24109 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24110  if (
24111 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24112  __Pyx_sys_getdefaultencoding_not_ascii &&
24113 #endif
24114  PyUnicode_Check(o)) {
24115  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24116  } else
24117 #endif
24118 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24119  if (PyByteArray_Check(o)) {
24120  *length = PyByteArray_GET_SIZE(o);
24121  return PyByteArray_AS_STRING(o);
24122  } else
24123 #endif
24124  {
24125  char* result;
24126  int r = PyBytes_AsStringAndSize(o, &result, length);
24127  if (unlikely(r < 0)) {
24128  return NULL;
24129  } else {
24130  return result;
24131  }
24132  }
24133 }
24134 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24135  int is_true = x == Py_True;
24136  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24137  else return PyObject_IsTrue(x);
24138 }
24139 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24140 #if PY_MAJOR_VERSION >= 3
24141  if (PyLong_Check(result)) {
24142  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24143  "__int__ returned non-int (type %.200s). "
24144  "The ability to return an instance of a strict subclass of int "
24145  "is deprecated, and may be removed in a future version of Python.",
24146  Py_TYPE(result)->tp_name)) {
24147  Py_DECREF(result);
24148  return NULL;
24149  }
24150  return result;
24151  }
24152 #endif
24153  PyErr_Format(PyExc_TypeError,
24154  "__%.4s__ returned non-%.4s (type %.200s)",
24155  type_name, type_name, Py_TYPE(result)->tp_name);
24156  Py_DECREF(result);
24157  return NULL;
24158 }
24159 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24160 #if CYTHON_USE_TYPE_SLOTS
24161  PyNumberMethods *m;
24162 #endif
24163  const char *name = NULL;
24164  PyObject *res = NULL;
24165 #if PY_MAJOR_VERSION < 3
24166  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24167 #else
24168  if (likely(PyLong_Check(x)))
24169 #endif
24170  return __Pyx_NewRef(x);
24171 #if CYTHON_USE_TYPE_SLOTS
24172  m = Py_TYPE(x)->tp_as_number;
24173  #if PY_MAJOR_VERSION < 3
24174  if (m && m->nb_int) {
24175  name = "int";
24176  res = m->nb_int(x);
24177  }
24178  else if (m && m->nb_long) {
24179  name = "long";
24180  res = m->nb_long(x);
24181  }
24182  #else
24183  if (likely(m && m->nb_int)) {
24184  name = "int";
24185  res = m->nb_int(x);
24186  }
24187  #endif
24188 #else
24189  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24190  res = PyNumber_Int(x);
24191  }
24192 #endif
24193  if (likely(res)) {
24194 #if PY_MAJOR_VERSION < 3
24195  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24196 #else
24197  if (unlikely(!PyLong_CheckExact(res))) {
24198 #endif
24199  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24200  }
24201  }
24202  else if (!PyErr_Occurred()) {
24203  PyErr_SetString(PyExc_TypeError,
24204  "an integer is required");
24205  }
24206  return res;
24207 }
24208 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24209  Py_ssize_t ival;
24210  PyObject *x;
24211 #if PY_MAJOR_VERSION < 3
24212  if (likely(PyInt_CheckExact(b))) {
24213  if (sizeof(Py_ssize_t) >= sizeof(long))
24214  return PyInt_AS_LONG(b);
24215  else
24216  return PyInt_AsSsize_t(x);
24217  }
24218 #endif
24219  if (likely(PyLong_CheckExact(b))) {
24220  #if CYTHON_USE_PYLONG_INTERNALS
24221  const digit* digits = ((PyLongObject*)b)->ob_digit;
24222  const Py_ssize_t size = Py_SIZE(b);
24223  if (likely(__Pyx_sst_abs(size) <= 1)) {
24224  ival = likely(size) ? digits[0] : 0;
24225  if (size == -1) ival = -ival;
24226  return ival;
24227  } else {
24228  switch (size) {
24229  case 2:
24230  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24231  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24232  }
24233  break;
24234  case -2:
24235  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24236  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24237  }
24238  break;
24239  case 3:
24240  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24241  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24242  }
24243  break;
24244  case -3:
24245  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24246  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24247  }
24248  break;
24249  case 4:
24250  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24251  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]));
24252  }
24253  break;
24254  case -4:
24255  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24256  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]));
24257  }
24258  break;
24259  }
24260  }
24261  #endif
24262  return PyLong_AsSsize_t(b);
24263  }
24264  x = PyNumber_Index(b);
24265  if (!x) return -1;
24266  ival = PyInt_AsSsize_t(x);
24267  Py_DECREF(x);
24268  return ival;
24269 }
24270 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24271  return PyInt_FromSize_t(ival);
24272 }
24273 
24274 
24275 #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