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  "-march=native",
28  "-finline-limit=4000",
29  "--param",
30  "inline-unit-growth=200",
31  "-funroll-loops",
32  "-fvariable-expansion-in-unroller",
33  "-DNDEBUG",
34  "-DHAVE_BITS_WORDSIZE_H",
35  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
36  "-D_GLUCAT_USE_DENSE_MATRICES",
37  "-D_GLUCAT_CHECK_ISNAN",
38  "-Wno-unused-local-typedefs",
39  "-Wno-misleading-indentation",
40  "-fno-check-new",
41  "-fexceptions"
42  ],
43  "include_dirs": [
44  ".",
45  ".."
46  ],
47  "language": "c++",
48  "name": "PyClical",
49  "sources": [
50  "PyClical.pyx"
51  ]
52  },
53  "module_name": "PyClical"
54 }
55 END: Cython Metadata */
56 
57 #define PY_SSIZE_T_CLEAN
58 #include "Python.h"
59 #ifndef Py_PYTHON_H
60  #error Python headers needed to compile C extensions, please install development version of Python.
61 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
62  #error Cython requires Python 2.6+ or Python 3.3+.
63 #else
64 #define CYTHON_ABI "0_27_3"
65 #define CYTHON_FUTURE_DIVISION 0
66 #include <stddef.h>
67 #ifndef offsetof
68  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
69 #endif
70 #if !defined(WIN32) && !defined(MS_WINDOWS)
71  #ifndef __stdcall
72  #define __stdcall
73  #endif
74  #ifndef __cdecl
75  #define __cdecl
76  #endif
77  #ifndef __fastcall
78  #define __fastcall
79  #endif
80 #endif
81 #ifndef DL_IMPORT
82  #define DL_IMPORT(t) t
83 #endif
84 #ifndef DL_EXPORT
85  #define DL_EXPORT(t) t
86 #endif
87 #define __PYX_COMMA ,
88 #ifndef HAVE_LONG_LONG
89  #if PY_VERSION_HEX >= 0x02070000
90  #define HAVE_LONG_LONG
91  #endif
92 #endif
93 #ifndef PY_LONG_LONG
94  #define PY_LONG_LONG LONG_LONG
95 #endif
96 #ifndef Py_HUGE_VAL
97  #define Py_HUGE_VAL HUGE_VAL
98 #endif
99 #ifdef PYPY_VERSION
100  #define CYTHON_COMPILING_IN_PYPY 1
101  #define CYTHON_COMPILING_IN_PYSTON 0
102  #define CYTHON_COMPILING_IN_CPYTHON 0
103  #undef CYTHON_USE_TYPE_SLOTS
104  #define CYTHON_USE_TYPE_SLOTS 0
105  #undef CYTHON_USE_PYTYPE_LOOKUP
106  #define CYTHON_USE_PYTYPE_LOOKUP 0
107  #if PY_VERSION_HEX < 0x03050000
108  #undef CYTHON_USE_ASYNC_SLOTS
109  #define CYTHON_USE_ASYNC_SLOTS 0
110  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
111  #define CYTHON_USE_ASYNC_SLOTS 1
112  #endif
113  #undef CYTHON_USE_PYLIST_INTERNALS
114  #define CYTHON_USE_PYLIST_INTERNALS 0
115  #undef CYTHON_USE_UNICODE_INTERNALS
116  #define CYTHON_USE_UNICODE_INTERNALS 0
117  #undef CYTHON_USE_UNICODE_WRITER
118  #define CYTHON_USE_UNICODE_WRITER 0
119  #undef CYTHON_USE_PYLONG_INTERNALS
120  #define CYTHON_USE_PYLONG_INTERNALS 0
121  #undef CYTHON_AVOID_BORROWED_REFS
122  #define CYTHON_AVOID_BORROWED_REFS 1
123  #undef CYTHON_ASSUME_SAFE_MACROS
124  #define CYTHON_ASSUME_SAFE_MACROS 0
125  #undef CYTHON_UNPACK_METHODS
126  #define CYTHON_UNPACK_METHODS 0
127  #undef CYTHON_FAST_THREAD_STATE
128  #define CYTHON_FAST_THREAD_STATE 0
129  #undef CYTHON_FAST_PYCALL
130  #define CYTHON_FAST_PYCALL 0
131  #undef CYTHON_PEP489_MULTI_PHASE_INIT
132  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
133  #undef CYTHON_USE_TP_FINALIZE
134  #define CYTHON_USE_TP_FINALIZE 0
135 #elif defined(PYSTON_VERSION)
136  #define CYTHON_COMPILING_IN_PYPY 0
137  #define CYTHON_COMPILING_IN_PYSTON 1
138  #define CYTHON_COMPILING_IN_CPYTHON 0
139  #ifndef CYTHON_USE_TYPE_SLOTS
140  #define CYTHON_USE_TYPE_SLOTS 1
141  #endif
142  #undef CYTHON_USE_PYTYPE_LOOKUP
143  #define CYTHON_USE_PYTYPE_LOOKUP 0
144  #undef CYTHON_USE_ASYNC_SLOTS
145  #define CYTHON_USE_ASYNC_SLOTS 0
146  #undef CYTHON_USE_PYLIST_INTERNALS
147  #define CYTHON_USE_PYLIST_INTERNALS 0
148  #ifndef CYTHON_USE_UNICODE_INTERNALS
149  #define CYTHON_USE_UNICODE_INTERNALS 1
150  #endif
151  #undef CYTHON_USE_UNICODE_WRITER
152  #define CYTHON_USE_UNICODE_WRITER 0
153  #undef CYTHON_USE_PYLONG_INTERNALS
154  #define CYTHON_USE_PYLONG_INTERNALS 0
155  #ifndef CYTHON_AVOID_BORROWED_REFS
156  #define CYTHON_AVOID_BORROWED_REFS 0
157  #endif
158  #ifndef CYTHON_ASSUME_SAFE_MACROS
159  #define CYTHON_ASSUME_SAFE_MACROS 1
160  #endif
161  #ifndef CYTHON_UNPACK_METHODS
162  #define CYTHON_UNPACK_METHODS 1
163  #endif
164  #undef CYTHON_FAST_THREAD_STATE
165  #define CYTHON_FAST_THREAD_STATE 0
166  #undef CYTHON_FAST_PYCALL
167  #define CYTHON_FAST_PYCALL 0
168  #undef CYTHON_PEP489_MULTI_PHASE_INIT
169  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
170  #undef CYTHON_USE_TP_FINALIZE
171  #define CYTHON_USE_TP_FINALIZE 0
172 #else
173  #define CYTHON_COMPILING_IN_PYPY 0
174  #define CYTHON_COMPILING_IN_PYSTON 0
175  #define CYTHON_COMPILING_IN_CPYTHON 1
176  #ifndef CYTHON_USE_TYPE_SLOTS
177  #define CYTHON_USE_TYPE_SLOTS 1
178  #endif
179  #if PY_VERSION_HEX < 0x02070000
180  #undef CYTHON_USE_PYTYPE_LOOKUP
181  #define CYTHON_USE_PYTYPE_LOOKUP 0
182  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
183  #define CYTHON_USE_PYTYPE_LOOKUP 1
184  #endif
185  #if PY_MAJOR_VERSION < 3
186  #undef CYTHON_USE_ASYNC_SLOTS
187  #define CYTHON_USE_ASYNC_SLOTS 0
188  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
189  #define CYTHON_USE_ASYNC_SLOTS 1
190  #endif
191  #if PY_VERSION_HEX < 0x02070000
192  #undef CYTHON_USE_PYLONG_INTERNALS
193  #define CYTHON_USE_PYLONG_INTERNALS 0
194  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
195  #define CYTHON_USE_PYLONG_INTERNALS 1
196  #endif
197  #ifndef CYTHON_USE_PYLIST_INTERNALS
198  #define CYTHON_USE_PYLIST_INTERNALS 1
199  #endif
200  #ifndef CYTHON_USE_UNICODE_INTERNALS
201  #define CYTHON_USE_UNICODE_INTERNALS 1
202  #endif
203  #if PY_VERSION_HEX < 0x030300F0
204  #undef CYTHON_USE_UNICODE_WRITER
205  #define CYTHON_USE_UNICODE_WRITER 0
206  #elif !defined(CYTHON_USE_UNICODE_WRITER)
207  #define CYTHON_USE_UNICODE_WRITER 1
208  #endif
209  #ifndef CYTHON_AVOID_BORROWED_REFS
210  #define CYTHON_AVOID_BORROWED_REFS 0
211  #endif
212  #ifndef CYTHON_ASSUME_SAFE_MACROS
213  #define CYTHON_ASSUME_SAFE_MACROS 1
214  #endif
215  #ifndef CYTHON_UNPACK_METHODS
216  #define CYTHON_UNPACK_METHODS 1
217  #endif
218  #ifndef CYTHON_FAST_THREAD_STATE
219  #define CYTHON_FAST_THREAD_STATE 1
220  #endif
221  #ifndef CYTHON_FAST_PYCALL
222  #define CYTHON_FAST_PYCALL 1
223  #endif
224  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
225  #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
226  #endif
227  #ifndef CYTHON_USE_TP_FINALIZE
228  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
229  #endif
230 #endif
231 #if !defined(CYTHON_FAST_PYCCALL)
232 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
233 #endif
234 #if CYTHON_USE_PYLONG_INTERNALS
235  #include "longintrepr.h"
236  #undef SHIFT
237  #undef BASE
238  #undef MASK
239 #endif
240 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
241  #define Py_OptimizeFlag 0
242 #endif
243 #define __PYX_BUILD_PY_SSIZE_T "n"
244 #define CYTHON_FORMAT_SSIZE_T "z"
245 #if PY_MAJOR_VERSION < 3
246  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
247  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
248  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
249  #define __Pyx_DefaultClassType PyClass_Type
250 #else
251  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
252  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
253  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
254  #define __Pyx_DefaultClassType PyType_Type
255 #endif
256 #ifndef Py_TPFLAGS_CHECKTYPES
257  #define Py_TPFLAGS_CHECKTYPES 0
258 #endif
259 #ifndef Py_TPFLAGS_HAVE_INDEX
260  #define Py_TPFLAGS_HAVE_INDEX 0
261 #endif
262 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
263  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
264 #endif
265 #ifndef Py_TPFLAGS_HAVE_FINALIZE
266  #define Py_TPFLAGS_HAVE_FINALIZE 0
267 #endif
268 #if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
269  #ifndef METH_FASTCALL
270  #define METH_FASTCALL 0x80
271  #endif
272  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
273  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
274  Py_ssize_t nargs, PyObject *kwnames);
275 #else
276  #define __Pyx_PyCFunctionFast _PyCFunctionFast
277  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
278 #endif
279 #if CYTHON_FAST_PYCCALL
280 #define __Pyx_PyFastCFunction_Check(func)\
281  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
282 #else
283 #define __Pyx_PyFastCFunction_Check(func) 0
284 #endif
285 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
286  #define __Pyx_PyThreadState_Current PyThreadState_GET()
287 #elif PY_VERSION_HEX >= 0x03060000
288  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
289 #elif PY_VERSION_HEX >= 0x03000000
290  #define __Pyx_PyThreadState_Current PyThreadState_GET()
291 #else
292  #define __Pyx_PyThreadState_Current _PyThreadState_Current
293 #endif
294 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
295 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
296 #else
297 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
298 #endif
299 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
300  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
301  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
302 #else
303  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
304  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
305 #endif
306 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
307  #define CYTHON_PEP393_ENABLED 1
308  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
309  0 : _PyUnicode_Ready((PyObject *)(op)))
310  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
311  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
312  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
313  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
314  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
315  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
316  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
317  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
318 #else
319  #define CYTHON_PEP393_ENABLED 0
320  #define PyUnicode_1BYTE_KIND 1
321  #define PyUnicode_2BYTE_KIND 2
322  #define PyUnicode_4BYTE_KIND 4
323  #define __Pyx_PyUnicode_READY(op) (0)
324  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
325  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
326  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
327  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
328  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
329  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
330  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
331  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
332 #endif
333 #if CYTHON_COMPILING_IN_PYPY
334  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
335  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
336 #else
337  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
338  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
339  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
340 #endif
341 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
342  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
343 #endif
344 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
345  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
346 #endif
347 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
348  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
349 #endif
350 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
351  #define PyObject_Malloc(s) PyMem_Malloc(s)
352  #define PyObject_Free(p) PyMem_Free(p)
353  #define PyObject_Realloc(p) PyMem_Realloc(p)
354 #endif
355 #if CYTHON_COMPILING_IN_PYSTON
356  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
357  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
358 #else
359  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
360  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
361 #endif
362 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
363 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
364 #if PY_MAJOR_VERSION >= 3
365  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
366 #else
367  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
368 #endif
369 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
370  #define PyObject_ASCII(o) PyObject_Repr(o)
371 #endif
372 #if PY_MAJOR_VERSION >= 3
373  #define PyBaseString_Type PyUnicode_Type
374  #define PyStringObject PyUnicodeObject
375  #define PyString_Type PyUnicode_Type
376  #define PyString_Check PyUnicode_Check
377  #define PyString_CheckExact PyUnicode_CheckExact
378 #endif
379 #if PY_MAJOR_VERSION >= 3
380  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
381  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
382 #else
383  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
384  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
385 #endif
386 #ifndef PySet_CheckExact
387  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
388 #endif
389 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
390 #if PY_MAJOR_VERSION >= 3
391  #define PyIntObject PyLongObject
392  #define PyInt_Type PyLong_Type
393  #define PyInt_Check(op) PyLong_Check(op)
394  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
395  #define PyInt_FromString PyLong_FromString
396  #define PyInt_FromUnicode PyLong_FromUnicode
397  #define PyInt_FromLong PyLong_FromLong
398  #define PyInt_FromSize_t PyLong_FromSize_t
399  #define PyInt_FromSsize_t PyLong_FromSsize_t
400  #define PyInt_AsLong PyLong_AsLong
401  #define PyInt_AS_LONG PyLong_AS_LONG
402  #define PyInt_AsSsize_t PyLong_AsSsize_t
403  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
404  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
405  #define PyNumber_Int PyNumber_Long
406 #endif
407 #if PY_MAJOR_VERSION >= 3
408  #define PyBoolObject PyLongObject
409 #endif
410 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
411  #ifndef PyUnicode_InternFromString
412  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
413  #endif
414 #endif
415 #if PY_VERSION_HEX < 0x030200A4
416  typedef long Py_hash_t;
417  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
418  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
419 #else
420  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
421  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
422 #endif
423 #if PY_MAJOR_VERSION >= 3
424  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
425 #else
426  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
427 #endif
428 #ifndef __has_attribute
429  #define __has_attribute(x) 0
430 #endif
431 #ifndef __has_cpp_attribute
432  #define __has_cpp_attribute(x) 0
433 #endif
434 #if CYTHON_USE_ASYNC_SLOTS
435  #if PY_VERSION_HEX >= 0x030500B1
436  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
437  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
438  #else
439  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
440  #endif
441 #else
442  #define __Pyx_PyType_AsAsync(obj) NULL
443 #endif
444 #ifndef __Pyx_PyAsyncMethodsStruct
445  typedef struct {
446  unaryfunc am_await;
447  unaryfunc am_aiter;
448  unaryfunc am_anext;
449  } __Pyx_PyAsyncMethodsStruct;
450 #endif
451 #ifndef CYTHON_RESTRICT
452  #if defined(__GNUC__)
453  #define CYTHON_RESTRICT __restrict__
454  #elif defined(_MSC_VER) && _MSC_VER >= 1400
455  #define CYTHON_RESTRICT __restrict
456  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
457  #define CYTHON_RESTRICT restrict
458  #else
459  #define CYTHON_RESTRICT
460  #endif
461 #endif
462 #ifndef CYTHON_UNUSED
463 # if defined(__GNUC__)
464 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
465 # define CYTHON_UNUSED __attribute__ ((__unused__))
466 # else
467 # define CYTHON_UNUSED
468 # endif
469 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
470 # define CYTHON_UNUSED __attribute__ ((__unused__))
471 # else
472 # define CYTHON_UNUSED
473 # endif
474 #endif
475 #ifndef CYTHON_MAYBE_UNUSED_VAR
476 # if defined(__cplusplus)
477  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
478 # else
479 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
480 # endif
481 #endif
482 #ifndef CYTHON_NCP_UNUSED
483 # if CYTHON_COMPILING_IN_CPYTHON
484 # define CYTHON_NCP_UNUSED
485 # else
486 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
487 # endif
488 #endif
489 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
490 #ifdef _MSC_VER
491  #ifndef _MSC_STDINT_H_
492  #if _MSC_VER < 1300
493  typedef unsigned char uint8_t;
494  typedef unsigned int uint32_t;
495  #else
496  typedef unsigned __int8 uint8_t;
497  typedef unsigned __int32 uint32_t;
498  #endif
499  #endif
500 #else
501  #include <stdint.h>
502 #endif
503 #ifndef CYTHON_FALLTHROUGH
504  #if defined(__cplusplus) && __cplusplus >= 201103L
505  #if __has_cpp_attribute(fallthrough)
506  #define CYTHON_FALLTHROUGH [[fallthrough]]
507  #elif __has_cpp_attribute(clang::fallthrough)
508  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
509  #elif __has_cpp_attribute(gnu::fallthrough)
510  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
511  #endif
512  #endif
513  #ifndef CYTHON_FALLTHROUGH
514  #if __has_attribute(fallthrough)
515  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
516  #else
517  #define CYTHON_FALLTHROUGH
518  #endif
519  #endif
520  #if defined(__clang__ ) && defined(__apple_build_version__)
521  #if __apple_build_version__ < 7000000
522  #undef CYTHON_FALLTHROUGH
523  #define CYTHON_FALLTHROUGH
524  #endif
525  #endif
526 #endif
527 
528 #ifndef __cplusplus
529  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
530 #endif
531 #ifndef CYTHON_INLINE
532  #if defined(__clang__)
533  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
534  #else
535  #define CYTHON_INLINE inline
536  #endif
537 #endif
538 template<typename T>
539 void __Pyx_call_destructor(T& x) {
540  x.~T();
541 }
542 template<typename T>
543 class __Pyx_FakeReference {
544  public:
545  __Pyx_FakeReference() : ptr(NULL) { }
546  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
547  T *operator->() { return ptr; }
548  T *operator&() { return ptr; }
549  operator T&() { return *ptr; }
550  template<typename U> bool operator ==(U other) { return *ptr == other; }
551  template<typename U> bool operator !=(U other) { return *ptr != other; }
552  private:
553  T *ptr;
554 };
555 
556 #if defined(WIN32) || defined(MS_WINDOWS)
557  #define _USE_MATH_DEFINES
558 #endif
559 #include <math.h>
560 #ifdef NAN
561 #define __PYX_NAN() ((float) NAN)
562 #else
563 static CYTHON_INLINE float __PYX_NAN() {
564  float value;
565  memset(&value, 0xFF, sizeof(value));
566  return value;
567 }
568 #endif
569 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
570 #define __Pyx_truncl trunc
571 #else
572 #define __Pyx_truncl truncl
573 #endif
574 
575 
576 #define __PYX_ERR(f_index, lineno, Ln_error) \
577 { \
578  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
579 }
580 
581 #ifndef __PYX_EXTERN_C
582  #ifdef __cplusplus
583  #define __PYX_EXTERN_C extern "C"
584  #else
585  #define __PYX_EXTERN_C extern
586  #endif
587 #endif
588 
589 #define __PYX_HAVE__PyClical
590 #define __PYX_HAVE_API__PyClical
591 #include <vector>
592 #include "ios"
593 #include "new"
594 #include "stdexcept"
595 #include "typeinfo"
596 #include "PyClical.h"
597 #ifdef _OPENMP
598 #include <omp.h>
599 #endif /* _OPENMP */
600 
601 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
602 #define CYTHON_WITHOUT_ASSERTIONS
603 #endif
604 
605 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
606  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
607 
608 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
609 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
610 #define __PYX_DEFAULT_STRING_ENCODING ""
611 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
612 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
613 #define __Pyx_uchar_cast(c) ((unsigned char)c)
614 #define __Pyx_long_cast(x) ((long)x)
615 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
616  (sizeof(type) < sizeof(Py_ssize_t)) ||\
617  (sizeof(type) > sizeof(Py_ssize_t) &&\
618  likely(v < (type)PY_SSIZE_T_MAX ||\
619  v == (type)PY_SSIZE_T_MAX) &&\
620  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
621  v == (type)PY_SSIZE_T_MIN))) ||\
622  (sizeof(type) == sizeof(Py_ssize_t) &&\
623  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
624  v == (type)PY_SSIZE_T_MAX))) )
625 #if defined (__cplusplus) && __cplusplus >= 201103L
626  #include <cstdlib>
627  #define __Pyx_sst_abs(value) std::abs(value)
628 #elif SIZEOF_INT >= SIZEOF_SIZE_T
629  #define __Pyx_sst_abs(value) abs(value)
630 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
631  #define __Pyx_sst_abs(value) labs(value)
632 #elif defined (_MSC_VER)
633  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
634 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
635  #define __Pyx_sst_abs(value) llabs(value)
636 #elif defined (__GNUC__)
637  #define __Pyx_sst_abs(value) __builtin_llabs(value)
638 #else
639  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
640 #endif
641 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
642 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
643 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
644 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
645 #define __Pyx_PyBytes_FromString PyBytes_FromString
646 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
647 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
648 #if PY_MAJOR_VERSION < 3
649  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
650  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
651 #else
652  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
653  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
654 #endif
655 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
656 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
657 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
658 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
659 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
660 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
661 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
662 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
663 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
664 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
665 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
666 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
667 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
668 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
669 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
670 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
671 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
672  const Py_UNICODE *u_end = u;
673  while (*u_end++) ;
674  return (size_t)(u_end - u - 1);
675 }
676 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
677 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
678 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
679 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
680 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
681 #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
682 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
683 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
684 #define __Pyx_PySequence_Tuple(obj)\
685  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
686 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
687 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
688 #if CYTHON_ASSUME_SAFE_MACROS
689 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
690 #else
691 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
692 #endif
693 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
694 #if PY_MAJOR_VERSION >= 3
695 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
696 #else
697 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
698 #endif
699 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
700 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
701 static int __Pyx_sys_getdefaultencoding_not_ascii;
702 static int __Pyx_init_sys_getdefaultencoding_params(void) {
703  PyObject* sys;
704  PyObject* default_encoding = NULL;
705  PyObject* ascii_chars_u = NULL;
706  PyObject* ascii_chars_b = NULL;
707  const char* default_encoding_c;
708  sys = PyImport_ImportModule("sys");
709  if (!sys) goto bad;
710  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
711  Py_DECREF(sys);
712  if (!default_encoding) goto bad;
713  default_encoding_c = PyBytes_AsString(default_encoding);
714  if (!default_encoding_c) goto bad;
715  if (strcmp(default_encoding_c, "ascii") == 0) {
716  __Pyx_sys_getdefaultencoding_not_ascii = 0;
717  } else {
718  char ascii_chars[128];
719  int c;
720  for (c = 0; c < 128; c++) {
721  ascii_chars[c] = c;
722  }
723  __Pyx_sys_getdefaultencoding_not_ascii = 1;
724  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
725  if (!ascii_chars_u) goto bad;
726  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
727  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
728  PyErr_Format(
729  PyExc_ValueError,
730  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
731  default_encoding_c);
732  goto bad;
733  }
734  Py_DECREF(ascii_chars_u);
735  Py_DECREF(ascii_chars_b);
736  }
737  Py_DECREF(default_encoding);
738  return 0;
739 bad:
740  Py_XDECREF(default_encoding);
741  Py_XDECREF(ascii_chars_u);
742  Py_XDECREF(ascii_chars_b);
743  return -1;
744 }
745 #endif
746 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
747 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
748 #else
749 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
750 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
751 static char* __PYX_DEFAULT_STRING_ENCODING;
752 static int __Pyx_init_sys_getdefaultencoding_params(void) {
753  PyObject* sys;
754  PyObject* default_encoding = NULL;
755  char* default_encoding_c;
756  sys = PyImport_ImportModule("sys");
757  if (!sys) goto bad;
758  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
759  Py_DECREF(sys);
760  if (!default_encoding) goto bad;
761  default_encoding_c = PyBytes_AsString(default_encoding);
762  if (!default_encoding_c) goto bad;
763  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
764  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
765  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
766  Py_DECREF(default_encoding);
767  return 0;
768 bad:
769  Py_XDECREF(default_encoding);
770  return -1;
771 }
772 #endif
773 #endif
774 
775 
776 /* Test for GCC > 2.95 */
777 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
778  #define likely(x) __builtin_expect(!!(x), 1)
779  #define unlikely(x) __builtin_expect(!!(x), 0)
780 #else /* !__GNUC__ or GCC < 2.95 */
781  #define likely(x) (x)
782  #define unlikely(x) (x)
783 #endif /* __GNUC__ */
784 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
785 
786 static PyObject *__pyx_m = NULL;
787 static PyObject *__pyx_d;
788 static PyObject *__pyx_b;
789 static PyObject *__pyx_cython_runtime;
790 static PyObject *__pyx_empty_tuple;
791 static PyObject *__pyx_empty_bytes;
792 static PyObject *__pyx_empty_unicode;
793 static int __pyx_lineno;
794 static int __pyx_clineno = 0;
795 static const char * __pyx_cfilenm= __FILE__;
796 static const char *__pyx_filename;
797 
798 
799 static const char *__pyx_f[] = {
800  "PyClical.pyx",
801  "stringsource",
802 };
803 
804 /*--- Type declarations ---*/
805 struct __pyx_obj_8PyClical_index_set;
806 struct __pyx_obj_8PyClical_clifford;
807 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
808 struct __pyx_opt_args_8PyClical_sqrt;
809 struct __pyx_opt_args_8PyClical_log;
810 struct __pyx_opt_args_8PyClical_cos;
811 struct __pyx_opt_args_8PyClical_acos;
812 struct __pyx_opt_args_8PyClical_acosh;
813 struct __pyx_opt_args_8PyClical_sin;
814 struct __pyx_opt_args_8PyClical_asin;
815 struct __pyx_opt_args_8PyClical_asinh;
816 struct __pyx_opt_args_8PyClical_tan;
817 struct __pyx_opt_args_8PyClical_atan;
818 struct __pyx_opt_args_8PyClical_atanh;
819 struct __pyx_opt_args_8PyClical_random_clifford;
820 
821 /* "PyClical.pyx":1542
822  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
823  *
824  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
825  * """
826  * Square root of multivector with optional complexifier.
827  */
828 struct __pyx_opt_args_8PyClical_sqrt {
829  int __pyx_n;
830  PyObject *i;
831 };
832 
833 /* "PyClical.pyx":1579
834  * return clifford().wrap( glucat.exp(toClifford(obj)) )
835  *
836  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
837  * """
838  * Natural logarithm of multivector with optional complexifier.
839  */
840 struct __pyx_opt_args_8PyClical_log {
841  int __pyx_n;
842  PyObject *i;
843 };
844 
845 /* "PyClical.pyx":1602
846  * return clifford().wrap( glucat.log(toClifford(obj)) )
847  *
848  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
849  * """
850  * Cosine of multivector with optional complexifier.
851  */
852 struct __pyx_opt_args_8PyClical_cos {
853  int __pyx_n;
854  PyObject *i;
855 };
856 
857 /* "PyClical.pyx":1619
858  * return clifford().wrap( glucat.cos(toClifford(obj)) )
859  *
860  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
861  * """
862  * Inverse cosine of multivector with optional complexifier.
863  */
864 struct __pyx_opt_args_8PyClical_acos {
865  int __pyx_n;
866  PyObject *i;
867 };
868 
869 /* "PyClical.pyx":1656
870  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
871  *
872  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
873  * """
874  * Inverse hyperbolic cosine of multivector with optional complexifier.
875  */
876 struct __pyx_opt_args_8PyClical_acosh {
877  int __pyx_n;
878  PyObject *i;
879 };
880 
881 /* "PyClical.pyx":1679
882  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
883  *
884  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
885  * """
886  * Sine of multivector with optional complexifier.
887  */
888 struct __pyx_opt_args_8PyClical_sin {
889  int __pyx_n;
890  PyObject *i;
891 };
892 
893 /* "PyClical.pyx":1698
894  * return clifford().wrap( glucat.sin(toClifford(obj)) )
895  *
896  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
897  * """
898  * Inverse sine of multivector with optional complexifier.
899  */
900 struct __pyx_opt_args_8PyClical_asin {
901  int __pyx_n;
902  PyObject *i;
903 };
904 
905 /* "PyClical.pyx":1733
906  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
907  *
908  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
909  * """
910  * Inverse hyperbolic sine of multivector with optional complexifier.
911  */
912 struct __pyx_opt_args_8PyClical_asinh {
913  int __pyx_n;
914  PyObject *i;
915 };
916 
917 /* "PyClical.pyx":1752
918  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
919  *
920  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
921  * """
922  * Tangent of multivector with optional complexifier.
923  */
924 struct __pyx_opt_args_8PyClical_tan {
925  int __pyx_n;
926  PyObject *i;
927 };
928 
929 /* "PyClical.pyx":1769
930  * return clifford().wrap( glucat.tan(toClifford(obj)) )
931  *
932  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
933  * """
934  * Inverse tangent of multivector with optional complexifier.
935  */
936 struct __pyx_opt_args_8PyClical_atan {
937  int __pyx_n;
938  PyObject *i;
939 };
940 
941 /* "PyClical.pyx":1798
942  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
943  *
944  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
945  * """
946  * Inverse hyperbolic tangent of multivector with optional complexifier.
947  */
948 struct __pyx_opt_args_8PyClical_atanh {
949  int __pyx_n;
950  PyObject *i;
951 };
952 
953 /* "PyClical.pyx":1815
954  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
955  *
956  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
957  * """
958  * Random multivector within a frame.
959  */
960 struct __pyx_opt_args_8PyClical_random_clifford {
961  int __pyx_n;
962  PyObject *fill;
963 };
964 
965 /* "PyClical.pyx":37
966  *
967  * # Forward reference
968  * cdef class index_set # <<<<<<<<<<<<<<
969  *
970  * cdef inline IndexSet toIndexSet(obj):
971  */
972 struct __pyx_obj_8PyClical_index_set {
973  PyObject_HEAD
974  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
975  IndexSet *instance;
976 };
977 
978 
979 /* "PyClical.pyx":530
980  *
981  * # Forward reference.
982  * cdef class clifford # <<<<<<<<<<<<<<
983  *
984  * cdef inline Clifford toClifford(obj):
985  */
986 struct __pyx_obj_8PyClical_clifford {
987  PyObject_HEAD
988  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
989  Clifford *instance;
990 };
991 
992 
993 /* "PyClical.pyx":227
994  * return self.instance.getitem(idx)
995  *
996  * def __iter__(self): # <<<<<<<<<<<<<<
997  * """
998  * Iterate over the indices of an index_set.
999  */
1000 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1001  PyObject_HEAD
1002  PyObject *__pyx_v_idx;
1003  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1004  PyObject *__pyx_t_0;
1005  Py_ssize_t __pyx_t_1;
1006  PyObject *(*__pyx_t_2)(PyObject *);
1007 };
1008 
1009 
1010 
1011 /* "PyClical.pyx":45
1012  * return index_set(obj).instance[0]
1013  *
1014  * cdef class index_set: # <<<<<<<<<<<<<<
1015  * """
1016  * Python class index_set wraps C++ class IndexSet.
1017  */
1018 
1019 struct __pyx_vtabstruct_8PyClical_index_set {
1020  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1021  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1022  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1023 };
1024 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1025 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1026 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1027 
1028 
1029 /* "PyClical.pyx":535
1030  * return clifford(obj).instance[0]
1031  *
1032  * cdef class clifford: # <<<<<<<<<<<<<<
1033  * """
1034  * Python class clifford wraps C++ class Clifford.
1035  */
1036 
1037 struct __pyx_vtabstruct_8PyClical_clifford {
1038  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1039  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1040  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1041 };
1042 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1043 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1044 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1045 
1046 /* --- Runtime support code (head) --- */
1047 /* Refnanny.proto */
1048 #ifndef CYTHON_REFNANNY
1049  #define CYTHON_REFNANNY 0
1050 #endif
1051 #if CYTHON_REFNANNY
1052  typedef struct {
1053  void (*INCREF)(void*, PyObject*, int);
1054  void (*DECREF)(void*, PyObject*, int);
1055  void (*GOTREF)(void*, PyObject*, int);
1056  void (*GIVEREF)(void*, PyObject*, int);
1057  void* (*SetupContext)(const char*, int, const char*);
1058  void (*FinishContext)(void**);
1059  } __Pyx_RefNannyAPIStruct;
1060  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1061  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1062  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1063 #ifdef WITH_THREAD
1064  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1065  if (acquire_gil) {\
1066  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1067  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1068  PyGILState_Release(__pyx_gilstate_save);\
1069  } else {\
1070  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1071  }
1072 #else
1073  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1074  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1075 #endif
1076  #define __Pyx_RefNannyFinishContext()\
1077  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1078  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1079  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1080  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1081  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1082  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1083  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1084  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1085  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1086 #else
1087  #define __Pyx_RefNannyDeclarations
1088  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1089  #define __Pyx_RefNannyFinishContext()
1090  #define __Pyx_INCREF(r) Py_INCREF(r)
1091  #define __Pyx_DECREF(r) Py_DECREF(r)
1092  #define __Pyx_GOTREF(r)
1093  #define __Pyx_GIVEREF(r)
1094  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1095  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1096  #define __Pyx_XGOTREF(r)
1097  #define __Pyx_XGIVEREF(r)
1098 #endif
1099 #define __Pyx_XDECREF_SET(r, v) do {\
1100  PyObject *tmp = (PyObject *) r;\
1101  r = v; __Pyx_XDECREF(tmp);\
1102  } while (0)
1103 #define __Pyx_DECREF_SET(r, v) do {\
1104  PyObject *tmp = (PyObject *) r;\
1105  r = v; __Pyx_DECREF(tmp);\
1106  } while (0)
1107 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1108 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1109 
1110 /* PyObjectGetAttrStr.proto */
1111 #if CYTHON_USE_TYPE_SLOTS
1112 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
1113  PyTypeObject* tp = Py_TYPE(obj);
1114  if (likely(tp->tp_getattro))
1115  return tp->tp_getattro(obj, attr_name);
1116 #if PY_MAJOR_VERSION < 3
1117  if (likely(tp->tp_getattr))
1118  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
1119 #endif
1120  return PyObject_GetAttr(obj, attr_name);
1121 }
1122 #else
1123 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1124 #endif
1125 
1126 /* GetBuiltinName.proto */
1127 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1128 
1129 /* PyObjectCall.proto */
1130 #if CYTHON_COMPILING_IN_CPYTHON
1131 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1132 #else
1133 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1134 #endif
1135 
1136 /* PyThreadStateGet.proto */
1137 #if CYTHON_FAST_THREAD_STATE
1138 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1139 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1140 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1141 #else
1142 #define __Pyx_PyThreadState_declare
1143 #define __Pyx_PyThreadState_assign
1144 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1145 #endif
1146 
1147 /* PyErrFetchRestore.proto */
1148 #if CYTHON_FAST_THREAD_STATE
1149 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1150 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1151 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1152 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1153 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1154 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1155 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1156 #if CYTHON_COMPILING_IN_CPYTHON
1157 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1158 #else
1159 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1160 #endif
1161 #else
1162 #define __Pyx_PyErr_Clear() PyErr_Clear()
1163 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1164 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1165 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1166 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1167 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1168 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1169 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1170 #endif
1171 
1172 /* WriteUnraisableException.proto */
1173 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1174  int lineno, const char *filename,
1175  int full_traceback, int nogil);
1176 
1177 /* PyCFunctionFastCall.proto */
1178 #if CYTHON_FAST_PYCCALL
1179 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1180 #else
1181 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1182 #endif
1183 
1184 /* PyFunctionFastCall.proto */
1185 #if CYTHON_FAST_PYCALL
1186 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1187  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1188 #if 1 || PY_VERSION_HEX < 0x030600B1
1189 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1190 #else
1191 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1192 #endif
1193 #endif
1194 
1195 /* PyObjectCallMethO.proto */
1196 #if CYTHON_COMPILING_IN_CPYTHON
1197 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1198 #endif
1199 
1200 /* PyObjectCallOneArg.proto */
1201 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1202 
1203 /* PyObjectCallNoArg.proto */
1204 #if CYTHON_COMPILING_IN_CPYTHON
1205 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1206 #else
1207 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1208 #endif
1209 
1210 /* RaiseDoubleKeywords.proto */
1211 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1212 
1213 /* ParseKeywords.proto */
1214 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1215  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1216  const char* function_name);
1217 
1218 /* RaiseArgTupleInvalid.proto */
1219 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1220  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1221 
1222 /* GetModuleGlobalName.proto */
1223 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1224 
1225 /* SaveResetException.proto */
1226 #if CYTHON_FAST_THREAD_STATE
1227 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1228 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1229 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1230 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1231 #else
1232 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1233 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1234 #endif
1235 
1236 /* PyErrExceptionMatches.proto */
1237 #if CYTHON_FAST_THREAD_STATE
1238 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1239 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1240 #else
1241 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1242 #endif
1243 
1244 /* GetException.proto */
1245 #if CYTHON_FAST_THREAD_STATE
1246 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1247 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1248 #else
1249 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1250 #endif
1251 
1252 /* RaiseException.proto */
1253 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1254 
1255 /* PyIntBinop.proto */
1256 #if !CYTHON_COMPILING_IN_PYPY
1257 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1258 #else
1259 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1260  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1261 #endif
1262 
1263 /* PySequenceContains.proto */
1264 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1265  int result = PySequence_Contains(seq, item);
1266  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1267 }
1268 
1269 /* SetItemInt.proto */
1270 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1271  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1272  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1273  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1274  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1275 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1276 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1277  int is_list, int wraparound, int boundscheck);
1278 
1279 /* ArgTypeTest.proto */
1280 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1281  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1282  __Pyx__ArgTypeTest(obj, type, name, exact))
1283 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1284 
1285 /* Import.proto */
1286 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1287 
1288 /* IncludeStringH.proto */
1289 #include <string.h>
1290 
1291 /* SetVTable.proto */
1292 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1293 
1294 /* SetupReduce.proto */
1295 static int __Pyx_setup_reduce(PyObject* type_obj);
1296 
1297 /* PyFloatBinop.proto */
1298 #if !CYTHON_COMPILING_IN_PYPY
1299 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
1300 #else
1301 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
1302  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1303  #endif
1304 
1305 /* BytesEquals.proto */
1306 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1307 
1308 /* UnicodeEquals.proto */
1309 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1310 
1311 /* StrEquals.proto */
1312 #if PY_MAJOR_VERSION >= 3
1313 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1314 #else
1315 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1316 #endif
1317 
1318 /* CLineInTraceback.proto */
1319 #ifdef CYTHON_CLINE_IN_TRACEBACK
1320 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1321 #else
1322 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1323 #endif
1324 
1325 /* CodeObjectCache.proto */
1326 typedef struct {
1327  PyCodeObject* code_object;
1328  int code_line;
1329 } __Pyx_CodeObjectCacheEntry;
1330 struct __Pyx_CodeObjectCache {
1331  int count;
1332  int max_count;
1333  __Pyx_CodeObjectCacheEntry* entries;
1334 };
1335 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1336 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1337 static PyCodeObject *__pyx_find_code_object(int code_line);
1338 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1339 
1340 /* AddTraceback.proto */
1341 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1342  int py_line, const char *filename);
1343 
1344 /* CppExceptionConversion.proto */
1345 #ifndef __Pyx_CppExn2PyErr
1346 #include <new>
1347 #include <typeinfo>
1348 #include <stdexcept>
1349 #include <ios>
1350 static void __Pyx_CppExn2PyErr() {
1351  try {
1352  if (PyErr_Occurred())
1353  ; // let the latest Python exn pass through and ignore the current one
1354  else
1355  throw;
1356  } catch (const std::bad_alloc& exn) {
1357  PyErr_SetString(PyExc_MemoryError, exn.what());
1358  } catch (const std::bad_cast& exn) {
1359  PyErr_SetString(PyExc_TypeError, exn.what());
1360  } catch (const std::bad_typeid& exn) {
1361  PyErr_SetString(PyExc_TypeError, exn.what());
1362  } catch (const std::domain_error& exn) {
1363  PyErr_SetString(PyExc_ValueError, exn.what());
1364  } catch (const std::invalid_argument& exn) {
1365  PyErr_SetString(PyExc_ValueError, exn.what());
1366  } catch (const std::ios_base::failure& exn) {
1367  PyErr_SetString(PyExc_IOError, exn.what());
1368  } catch (const std::out_of_range& exn) {
1369  PyErr_SetString(PyExc_IndexError, exn.what());
1370  } catch (const std::overflow_error& exn) {
1371  PyErr_SetString(PyExc_OverflowError, exn.what());
1372  } catch (const std::range_error& exn) {
1373  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1374  } catch (const std::underflow_error& exn) {
1375  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1376  } catch (const std::exception& exn) {
1377  PyErr_SetString(PyExc_RuntimeError, exn.what());
1378  }
1379  catch (...)
1380  {
1381  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1382  }
1383 }
1384 #endif
1385 
1386 /* CIntToPy.proto */
1387 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1388 
1389 /* CIntFromPy.proto */
1390 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1391 
1392 /* CIntToPy.proto */
1393 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1394 
1395 /* CIntFromPy.proto */
1396 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1397 
1398 /* FastTypeChecks.proto */
1399 #if CYTHON_COMPILING_IN_CPYTHON
1400 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1401 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1402 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1403 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1404 #else
1405 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1406 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1407 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1408 #endif
1409 
1410 /* FetchCommonType.proto */
1411 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1412 
1413 /* SwapException.proto */
1414 #if CYTHON_FAST_THREAD_STATE
1415 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1416 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1417 #else
1418 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1419 #endif
1420 
1421 /* PyObjectCallMethod1.proto */
1422 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1423 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
1424 
1425 /* CoroutineBase.proto */
1426 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1427 typedef struct {
1428  PyObject_HEAD
1429  __pyx_coroutine_body_t body;
1430  PyObject *closure;
1431  PyObject *exc_type;
1432  PyObject *exc_value;
1433  PyObject *exc_traceback;
1434  PyObject *gi_weakreflist;
1435  PyObject *classobj;
1436  PyObject *yieldfrom;
1437  PyObject *gi_name;
1438  PyObject *gi_qualname;
1439  PyObject *gi_modulename;
1440  int resume_label;
1441  char is_running;
1442 } __pyx_CoroutineObject;
1443 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1444  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
1445  PyObject *name, PyObject *qualname, PyObject *module_name);
1446 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1447  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
1448  PyObject *name, PyObject *qualname, PyObject *module_name);
1449 static int __Pyx_Coroutine_clear(PyObject *self);
1450 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1451 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1452 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1453 #define __Pyx_Coroutine_SwapException(self) {\
1454  __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
1455  __Pyx_Coroutine_ResetFrameBackpointer(self);\
1456  }
1457 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1458  __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
1459  (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
1460  }
1461 #if CYTHON_FAST_THREAD_STATE
1462 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1463  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1464 #else
1465 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1466  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1467 #endif
1468 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1469 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
1470 
1471 /* PatchModuleWithCoroutine.proto */
1472 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1473 
1474 /* PatchGeneratorABC.proto */
1475 static int __Pyx_patch_abc(void);
1476 
1477 /* Generator.proto */
1478 #define __Pyx_Generator_USED
1479 static PyTypeObject *__pyx_GeneratorType = 0;
1480 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1481 #define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
1482  __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
1483 static PyObject *__Pyx_Generator_Next(PyObject *self);
1484 static int __pyx_Generator_init(void);
1485 
1486 /* CheckBinaryVersion.proto */
1487 static int __Pyx_check_binary_version(void);
1488 
1489 /* InitStrings.proto */
1490 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1491 
1492 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1493 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1494 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1495 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1496 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1497 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1498 
1499 /* Module declarations from 'libcpp.vector' */
1500 
1501 /* Module declarations from 'glucat' */
1502 
1503 /* Module declarations from 'PyClical' */
1504 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1505 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1506 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1507 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1508 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1509 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1510 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1511 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1512 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1513 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1514 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1515 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1516 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1517 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1518 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1519 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1520 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1521 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1522 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1523 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1524 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1525 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1526 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1527 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1528 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1529 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1530 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1531 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1532 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1533 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1534 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1535 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1536 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1537 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1538 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1539 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1540 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1541 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1542 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1543 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1544 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1545 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*/
1546 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1547 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1548 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1549 #define __Pyx_MODULE_NAME "PyClical"
1550 extern int __pyx_module_is_main_PyClical;
1551 int __pyx_module_is_main_PyClical = 0;
1552 
1553 /* Implementation of 'PyClical' */
1554 static PyObject *__pyx_builtin_IndexError;
1555 static PyObject *__pyx_builtin_RuntimeError;
1556 static PyObject *__pyx_builtin_TypeError;
1557 static PyObject *__pyx_builtin_ValueError;
1558 static PyObject *__pyx_builtin_NotImplemented;
1559 static PyObject *__pyx_builtin_range;
1560 static PyObject *__pyx_builtin_xrange;
1561 static const char __pyx_k_[] = ".";
1562 static const char __pyx_k_e[] = "e";
1563 static const char __pyx_k_i[] = "i";
1564 static const char __pyx_k_m[] = "m";
1565 static const char __pyx_k_p[] = "p";
1566 static const char __pyx_k_q[] = "q";
1567 static const char __pyx_k__2[] = " ";
1568 static const char __pyx_k__5[] = ":";
1569 static const char __pyx_k__6[] = "\n\t";
1570 static const char __pyx_k__7[] = " (";
1571 static const char __pyx_k__8[] = ", ";
1572 static const char __pyx_k__9[] = ").";
1573 static const char __pyx_k_cl[] = "cl";
1574 static const char __pyx_k_pi[] = "pi";
1575 static const char __pyx_k_cos[] = "cos";
1576 static const char __pyx_k_exp[] = "exp";
1577 static const char __pyx_k_frm[] = "frm";
1578 static const char __pyx_k_inv[] = "inv";
1579 static const char __pyx_k_ist[] = "ist";
1580 static const char __pyx_k_ixt[] = "ixt";
1581 static const char __pyx_k_lhs[] = "lhs";
1582 static const char __pyx_k_log[] = "log";
1583 static const char __pyx_k_max[] = "max";
1584 static const char __pyx_k_min[] = "min";
1585 static const char __pyx_k_obj[] = "obj";
1586 static const char __pyx_k_odd[] = "odd";
1587 static const char __pyx_k_pow[] = "pow";
1588 static const char __pyx_k_rhs[] = "rhs";
1589 static const char __pyx_k_sin[] = "sin";
1590 static const char __pyx_k_tan[] = "tan";
1591 static const char __pyx_k_tau[] = "tau";
1592 static const char __pyx_k_Real[] = "Real";
1593 static const char __pyx_k_acos[] = "acos";
1594 static const char __pyx_k_args[] = "args";
1595 static const char __pyx_k_asin[] = "asin";
1596 static const char __pyx_k_atan[] = "atan";
1597 static const char __pyx_k_conj[] = "conj";
1598 static const char __pyx_k_copy[] = "copy";
1599 static const char __pyx_k_cosh[] = "cosh";
1600 static const char __pyx_k_even[] = "even";
1601 static const char __pyx_k_fill[] = "fill";
1602 static const char __pyx_k_from[] = " from ";
1603 static const char __pyx_k_iter[] = "__iter__";
1604 static const char __pyx_k_main[] = "__main__";
1605 static const char __pyx_k_math[] = "math";
1606 static const char __pyx_k_name[] = "__name__";
1607 static const char __pyx_k_norm[] = "norm";
1608 static const char __pyx_k_pure[] = "pure";
1609 static const char __pyx_k_quad[] = "quad";
1610 static const char __pyx_k_send[] = "send";
1611 static const char __pyx_k_sinh[] = "sinh";
1612 static const char __pyx_k_sqrt[] = "sqrt";
1613 static const char __pyx_k_tanh[] = "tanh";
1614 static const char __pyx_k_test[] = "_test";
1615 static const char __pyx_k_0_8_2[] = "0.8.2";
1616 static const char __pyx_k_acosh[] = "acosh";
1617 static const char __pyx_k_asinh[] = "asinh";
1618 static const char __pyx_k_atanh[] = "atanh";
1619 static const char __pyx_k_close[] = "close";
1620 static const char __pyx_k_grade[] = "grade";
1621 static const char __pyx_k_istpq[] = "istpq";
1622 static const char __pyx_k_nbar3[] = "nbar3";
1623 static const char __pyx_k_ninf3[] = "ninf3";
1624 static const char __pyx_k_other[] = "other";
1625 static const char __pyx_k_range[] = "range";
1626 static const char __pyx_k_throw[] = "throw";
1627 static const char __pyx_k_using[] = " using (";
1628 static const char __pyx_k_value[] = " value ";
1629 static const char __pyx_k_import[] = "__import__";
1630 static const char __pyx_k_reduce[] = "__reduce__";
1631 static const char __pyx_k_scalar[] = "scalar";
1632 static const char __pyx_k_test_2[] = "__test__";
1633 static const char __pyx_k_xrange[] = "xrange";
1634 static const char __pyx_k_doctest[] = "doctest";
1635 static const char __pyx_k_invalid[] = " invalid ";
1636 static const char __pyx_k_numbers[] = "numbers";
1637 static const char __pyx_k_reverse[] = "reverse";
1638 static const char __pyx_k_testmod[] = "testmod";
1639 static const char __pyx_k_version[] = "__version__";
1640 static const char __pyx_k_Integral[] = "Integral";
1641 static const char __pyx_k_PyClical[] = "PyClical";
1642 static const char __pyx_k_Sequence[] = "Sequence";
1643 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1644 static const char __pyx_k_getstate[] = "__getstate__";
1645 static const char __pyx_k_involute[] = "involute";
1646 static const char __pyx_k_setstate[] = "__setstate__";
1647 static const char __pyx_k_to_frame[] = " to frame ";
1648 static const char __pyx_k_TypeError[] = "TypeError";
1649 static const char __pyx_k_outer_pow[] = "outer_pow";
1650 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1651 static const char __pyx_k_IndexError[] = "IndexError";
1652 static const char __pyx_k_ValueError[] = "ValueError";
1653 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1654 static const char __pyx_k_collections[] = "collections";
1655 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1656 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1657 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1658 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1659 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1660 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1661 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1662 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1663 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1664 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1665 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1666 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1667 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1668 static const char __pyx_k_using_invalid[] = " using invalid ";
1669 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1670 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1671 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1672 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1673 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1674 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1675 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1676 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1677 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1678 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1679 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1680 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1681 static const char __pyx_k_invalid_string[] = " invalid string ";
1682 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1683 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1684 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1685 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1686 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1687 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1688 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1689 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1690 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1691 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1692 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1693 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1694 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1695 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1696 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1697 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1698 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1699 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1700 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1701 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1702 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1703 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1704 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1705 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1706 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1707 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1708 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1709 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1710 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1711 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1712 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1713 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1714 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1715 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1716 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1717 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1718 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1719 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1720 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1721 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1722 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1723 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1724 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1725 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1726 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1727 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1728 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1729 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1730 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1731 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1732 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1733 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1734 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1735 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1736 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1737 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1738 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1739 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1740 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1741 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1742 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1743 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1744 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1745 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1746 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1747 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1748 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1749 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1750 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1751 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1752 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1753 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1754 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1755 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1756 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1757 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1758 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1759 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1760 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1761 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1762 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1763 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1764 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1765 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1766 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1767 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1768 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1769 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1770 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1771 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 ";
1772 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 ";
1773 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 ";
1774 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 ";
1775 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 ";
1776 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 ";
1777 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 ";
1778 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 ";
1779 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 ";
1780 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 ";
1781 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 ";
1782 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 ";
1783 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 ";
1784 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 ";
1785 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 ";
1786 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 ";
1787 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 ";
1788 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 ";
1789 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 ";
1790 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 ";
1791 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 ";
1792 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1793 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1794 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1795 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 ";
1796 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 ";
1797 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 ";
1798 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 ";
1799 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 ";
1800 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 ";
1801 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 ";
1802 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 ";
1803 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 ";
1804 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 ";
1805 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 ";
1806 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 ";
1807 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 ";
1808 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 ";
1809 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 ";
1810 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 ";
1811 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 ";
1812 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 ";
1813 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 ";
1814 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 ";
1815 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 ";
1816 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 ";
1817 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 ";
1818 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 ";
1819 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 ";
1820 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 ";
1821 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 ";
1822 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 ";
1823 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 ";
1824 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 ";
1825 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 ";
1826 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 ";
1827 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 ";
1828 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 ";
1829 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 ";
1830 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 ";
1831 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 ";
1832 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 ";
1833 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 ";
1834 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 ";
1835 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 ";
1836 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 ";
1837 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 ";
1838 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 ";
1839 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 ";
1840 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 ";
1841 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 ";
1842 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 ";
1843 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 ";
1844 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 ";
1845 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 ";
1846 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 ";
1847 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 ";
1848 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 ";
1849 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 ";
1850 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 ";
1851 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 ";
1852 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 ";
1853 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 ";
1854 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 ";
1855 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 ";
1856 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 ";
1857 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 ";
1858 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 ";
1859 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 ";
1860 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 ";
1861 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 ";
1862 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 ";
1863  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 ";
1864  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 ";
1865  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
1866  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 ";
1867  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
1868  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 ";
1869  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
1870  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
1871  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 ";
1872  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 ";
1873  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 ";
1874  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 ";
1875  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 ";
1876  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
1877  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
1878  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
1879  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
1880  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 ";
1881  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 ";
1882  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 ";
1883  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 ";
1884  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 ";
1885  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 ";
1886  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 ";
1887  static PyObject *__pyx_kp_s_;
1888  static PyObject *__pyx_kp_s_0_8_2;
1889  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1890  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1891  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1892  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1893  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1894  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1895  static PyObject *__pyx_kp_s_Cannot_reframe;
1896  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1897  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1898  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1899  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1900  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1901  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1902  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1903  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1904  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1905  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1906  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1907  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1908  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1909  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1910  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1911  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1912  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1913  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1914  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1915  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1916  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1917  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1918  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1919  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1920  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1921  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1922  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1923  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1924  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1925  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1926  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1927  static PyObject *__pyx_n_s_IndexError;
1928  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1929  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1930  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1931  static PyObject *__pyx_n_s_Integral;
1932  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1933  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1934  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1935  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1936  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1937  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1938  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1939  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1940  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1941  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1942  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1943  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1944  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1945  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1946  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1947  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1948  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1949  static PyObject *__pyx_n_s_NotImplemented;
1950  static PyObject *__pyx_kp_s_Not_applicable;
1951  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1952  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
1953  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
1954  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
1955  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
1956  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
1957  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
1958  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
1959  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
1960  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
1961  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
1962  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
1963  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
1964  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
1965  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
1966  static PyObject *__pyx_n_s_PyClical;
1967  static PyObject *__pyx_kp_s_PyClical_pyx;
1968  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
1969  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
1970  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
1971  static PyObject *__pyx_n_s_Real;
1972  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
1973  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
1974  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
1975  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
1976  static PyObject *__pyx_n_s_RuntimeError;
1977  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
1978  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
1979  static PyObject *__pyx_n_s_Sequence;
1980  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
1981  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
1982  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
1983  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
1984  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
1985  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
1986  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
1987  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
1988  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
1989  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
1990  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
1991  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
1992  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
1993  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
1994  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
1995  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
1996  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
1997  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
1998  static PyObject *__pyx_kp_u_The_informal_string_representat;
1999  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2000  static PyObject *__pyx_kp_u_The_official_string_representat;
2001  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2002  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2003  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2004  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2005  static PyObject *__pyx_n_s_TypeError;
2006  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2007  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2008  static PyObject *__pyx_n_s_ValueError;
2009  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2010  static PyObject *__pyx_kp_s__2;
2011  static PyObject *__pyx_kp_s__5;
2012  static PyObject *__pyx_kp_s__6;
2013  static PyObject *__pyx_kp_s__7;
2014  static PyObject *__pyx_kp_s__8;
2015  static PyObject *__pyx_kp_s__9;
2016  static PyObject *__pyx_kp_u_abs_line_1473;
2017  static PyObject *__pyx_n_s_acos;
2018  static PyObject *__pyx_kp_u_acos_line_1619;
2019  static PyObject *__pyx_n_s_acosh;
2020  static PyObject *__pyx_kp_u_acosh_line_1656;
2021  static PyObject *__pyx_kp_u_agc3_line_1844;
2022  static PyObject *__pyx_n_s_args;
2023  static PyObject *__pyx_kp_s_as_frame;
2024  static PyObject *__pyx_n_s_asin;
2025  static PyObject *__pyx_kp_u_asin_line_1698;
2026  static PyObject *__pyx_n_s_asinh;
2027  static PyObject *__pyx_kp_u_asinh_line_1733;
2028  static PyObject *__pyx_n_s_atan;
2029  static PyObject *__pyx_kp_u_atan_line_1769;
2030  static PyObject *__pyx_n_s_atanh;
2031  static PyObject *__pyx_kp_u_atanh_line_1798;
2032  static PyObject *__pyx_kp_u_cga3_line_1824;
2033  static PyObject *__pyx_kp_u_cga3std_line_1833;
2034  static PyObject *__pyx_n_s_cl;
2035  static PyObject *__pyx_kp_u_clifford___add___line_739;
2036  static PyObject *__pyx_kp_u_clifford___and___line_835;
2037  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2038  static PyObject *__pyx_kp_u_clifford___div___line_895;
2039  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2040  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2041  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2042  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2043  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2044  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2045  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2046  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2047  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2048  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2049  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2050  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2051  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2052  static PyObject *__pyx_kp_u_clifford___or___line_938;
2053  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2054  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2055  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2056  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2057  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2058  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2059  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2060  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2061  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2062  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2063  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2064  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2065  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2066  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2067  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2068  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2069  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2070  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2071  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2072  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2073  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2074  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2075  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2076  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2077  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2078  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2079  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2080  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2081  static PyObject *__pyx_n_s_cline_in_traceback;
2082  static PyObject *__pyx_n_s_close;
2083  static PyObject *__pyx_n_s_collections;
2084  static PyObject *__pyx_kp_u_compare_line_490;
2085  static PyObject *__pyx_kp_u_complexifier_line_1527;
2086  static PyObject *__pyx_n_s_conj;
2087  static PyObject *__pyx_kp_u_conj_line_1436;
2088  static PyObject *__pyx_n_s_copy;
2089  static PyObject *__pyx_n_s_cos;
2090  static PyObject *__pyx_kp_u_cos_line_1602;
2091  static PyObject *__pyx_n_s_cosh;
2092  static PyObject *__pyx_kp_u_cosh_line_1640;
2093  static PyObject *__pyx_n_s_doctest;
2094  static PyObject *__pyx_n_s_e;
2095  static PyObject *__pyx_kp_u_e_line_1887;
2096  static PyObject *__pyx_n_s_even;
2097  static PyObject *__pyx_kp_u_even_line_1388;
2098  static PyObject *__pyx_n_s_exp;
2099  static PyObject *__pyx_kp_u_exp_line_1565;
2100  static PyObject *__pyx_n_s_fill;
2101  static PyObject *__pyx_n_s_frm;
2102  static PyObject *__pyx_kp_s_from;
2103  static PyObject *__pyx_n_s_getstate;
2104  static PyObject *__pyx_n_s_grade;
2105  static PyObject *__pyx_n_s_i;
2106  static PyObject *__pyx_kp_u_imag_line_1366;
2107  static PyObject *__pyx_n_s_import;
2108  static PyObject *__pyx_kp_u_index_set___and___line_269;
2109  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2110  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2111  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2112  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2113  static PyObject *__pyx_n_s_index_set___iter;
2114  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2115  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2116  static PyObject *__pyx_kp_u_index_set___or___line_291;
2117  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2118  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2119  static PyObject *__pyx_kp_u_index_set___str___line_393;
2120  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2121  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2122  static PyObject *__pyx_kp_u_index_set_count_line_313;
2123  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2124  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2125  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2126  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2127  static PyObject *__pyx_kp_u_index_set_max_line_349;
2128  static PyObject *__pyx_kp_u_index_set_min_line_340;
2129  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2130  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2131  static PyObject *__pyx_n_s_inv;
2132  static PyObject *__pyx_kp_u_inv_line_1329;
2133  static PyObject *__pyx_kp_s_invalid;
2134  static PyObject *__pyx_kp_s_invalid_string;
2135  static PyObject *__pyx_n_s_involute;
2136  static PyObject *__pyx_kp_u_involute_line_1406;
2137  static PyObject *__pyx_n_s_ist;
2138  static PyObject *__pyx_n_s_istpq;
2139  static PyObject *__pyx_kp_u_istpq_line_1900;
2140  static PyObject *__pyx_n_s_iter;
2141  static PyObject *__pyx_n_s_ixt;
2142  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2143  static PyObject *__pyx_n_s_lhs;
2144  static PyObject *__pyx_n_s_log;
2145  static PyObject *__pyx_kp_u_log_line_1579;
2146  static PyObject *__pyx_n_s_m;
2147  static PyObject *__pyx_n_s_main;
2148  static PyObject *__pyx_n_s_math;
2149  static PyObject *__pyx_n_s_max;
2150  static PyObject *__pyx_kp_u_max_abs_line_1482;
2151  static PyObject *__pyx_kp_u_max_pos_line_511;
2152  static PyObject *__pyx_n_s_min;
2153  static PyObject *__pyx_kp_u_min_neg_line_502;
2154  static PyObject *__pyx_n_s_name;
2155  static PyObject *__pyx_n_s_nbar3;
2156  static PyObject *__pyx_n_s_ninf3;
2157  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2158  static PyObject *__pyx_n_s_norm;
2159  static PyObject *__pyx_kp_u_norm_line_1462;
2160  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2161  static PyObject *__pyx_n_s_numbers;
2162  static PyObject *__pyx_n_s_obj;
2163  static PyObject *__pyx_n_s_odd;
2164  static PyObject *__pyx_kp_u_odd_line_1397;
2165  static PyObject *__pyx_n_s_other;
2166  static PyObject *__pyx_n_s_outer_pow;
2167  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2168  static PyObject *__pyx_n_s_p;
2169  static PyObject *__pyx_n_s_pi;
2170  static PyObject *__pyx_n_s_pow;
2171  static PyObject *__pyx_kp_u_pow_line_1494;
2172  static PyObject *__pyx_n_s_pure;
2173  static PyObject *__pyx_kp_u_pure_line_1377;
2174  static PyObject *__pyx_n_s_pyx_vtable;
2175  static PyObject *__pyx_n_s_q;
2176  static PyObject *__pyx_n_s_quad;
2177  static PyObject *__pyx_kp_u_quad_line_1451;
2178  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2179  static PyObject *__pyx_n_s_range;
2180  static PyObject *__pyx_kp_u_real_line_1355;
2181  static PyObject *__pyx_n_s_reduce;
2182  static PyObject *__pyx_n_s_reduce_cython;
2183  static PyObject *__pyx_n_s_reduce_ex;
2184  static PyObject *__pyx_n_s_reverse;
2185  static PyObject *__pyx_kp_u_reverse_line_1421;
2186  static PyObject *__pyx_n_s_rhs;
2187  static PyObject *__pyx_n_s_scalar;
2188  static PyObject *__pyx_kp_u_scalar_line_1344;
2189  static PyObject *__pyx_n_s_send;
2190  static PyObject *__pyx_n_s_setstate;
2191  static PyObject *__pyx_n_s_setstate_cython;
2192  static PyObject *__pyx_n_s_sin;
2193  static PyObject *__pyx_kp_u_sin_line_1679;
2194  static PyObject *__pyx_n_s_sinh;
2195  static PyObject *__pyx_kp_u_sinh_line_1719;
2196  static PyObject *__pyx_n_s_sqrt;
2197  static PyObject *__pyx_kp_u_sqrt_line_1542;
2198  static PyObject *__pyx_n_s_tan;
2199  static PyObject *__pyx_kp_u_tan_line_1752;
2200  static PyObject *__pyx_n_s_tanh;
2201  static PyObject *__pyx_kp_u_tanh_line_1786;
2202  static PyObject *__pyx_n_s_tau;
2203  static PyObject *__pyx_n_s_test;
2204  static PyObject *__pyx_n_s_test_2;
2205  static PyObject *__pyx_n_s_testmod;
2206  static PyObject *__pyx_n_s_throw;
2207  static PyObject *__pyx_kp_s_to_frame;
2208  static PyObject *__pyx_kp_s_using;
2209  static PyObject *__pyx_kp_s_using_invalid;
2210  static PyObject *__pyx_kp_s_value;
2211  static PyObject *__pyx_n_s_version;
2212  static PyObject *__pyx_n_s_xrange;
2213 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2214 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2215 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2216 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2217 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 */
2218 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2219 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2220 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2221 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2222 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2223 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2224 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2225 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2226 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2227 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2228 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2229 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2230 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2231 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2232 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2233 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2234 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2235 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2236 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2237 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2238 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2239 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 */
2240 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2241 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2242 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2243 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2244 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2245 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 */
2246 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2247 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 */
2248 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2249 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2250 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2251 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2252 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2253 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2254 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2255 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2256 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2257 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2258 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2259 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2260 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2261 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2262 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2263 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2264 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2265 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2266 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2267 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2268 #endif
2269 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2270 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2271 #endif
2272 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2273 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2274 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2275 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2276 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2277 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2278 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2279 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2280 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2281 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2282 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2283 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2284 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2285 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2286 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2287 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2288 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2289 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2290 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2291 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2292 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2293 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2294 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2295 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2296 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2297 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 */
2298 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2299 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2300 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2301 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2302 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2303 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2304 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2305 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2306 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2307 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2308 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2309 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2310 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2311 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2312 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2313 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2314 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2315 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2316 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2317 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2318 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2319 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2320 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2321 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2322 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2323 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2324 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2325 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2326 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2327 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2328 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2329 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2330 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2331 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 */
2332 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2333 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2334 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2335 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2336 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2337 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2338 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2339 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2340 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2341 static PyObject *__pyx_float_0_0;
2342 static PyObject *__pyx_float_1_0;
2343 static PyObject *__pyx_float_2_0;
2344 static PyObject *__pyx_float_8_0;
2345 static PyObject *__pyx_int_0;
2346 static PyObject *__pyx_int_1;
2347 static PyObject *__pyx_int_4;
2348 static PyObject *__pyx_int_neg_1;
2349 static PyObject *__pyx_tuple__3;
2350 static PyObject *__pyx_tuple__4;
2351 static PyObject *__pyx_tuple__10;
2352 static PyObject *__pyx_tuple__11;
2353 static PyObject *__pyx_tuple__12;
2354 static PyObject *__pyx_tuple__13;
2355 static PyObject *__pyx_tuple__16;
2356 static PyObject *__pyx_tuple__17;
2357 static PyObject *__pyx_tuple__19;
2358 static PyObject *__pyx_tuple__21;
2359 static PyObject *__pyx_tuple__22;
2360 static PyObject *__pyx_tuple__23;
2361 static PyObject *__pyx_tuple__24;
2362 static PyObject *__pyx_tuple__25;
2363 static PyObject *__pyx_codeobj__14;
2364 static PyObject *__pyx_codeobj__15;
2365 static PyObject *__pyx_codeobj__18;
2366 static PyObject *__pyx_codeobj__20;
2367 static PyObject *__pyx_codeobj__26;
2368 
2369 /* "PyClical.pyx":39
2370  * cdef class index_set
2371  *
2372  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2373  * """
2374  * Return the C++ IndexSet instance wrapped by index_set(obj).
2375  */
2376 
2377 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2378  IndexSet __pyx_r;
2379  __Pyx_RefNannyDeclarations
2380  PyObject *__pyx_t_1 = NULL;
2381  PyObject *__pyx_t_2 = NULL;
2382  __Pyx_RefNannySetupContext("toIndexSet", 0);
2383 
2384  /* "PyClical.pyx":43
2385  * Return the C++ IndexSet instance wrapped by index_set(obj).
2386  * """
2387  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2388  *
2389  * cdef class index_set:
2390  */
2391  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
2392  __Pyx_GOTREF(__pyx_t_1);
2393  __Pyx_INCREF(__pyx_v_obj);
2394  __Pyx_GIVEREF(__pyx_v_obj);
2395  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
2396  __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)
2397  __Pyx_GOTREF(__pyx_t_2);
2398  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2399  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_2)->instance[0]);
2400  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2401  goto __pyx_L0;
2402 
2403  /* "PyClical.pyx":39
2404  * cdef class index_set
2405  *
2406  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2407  * """
2408  * Return the C++ IndexSet instance wrapped by index_set(obj).
2409  */
2410 
2411  /* function exit code */
2412  __pyx_L1_error:;
2413  __Pyx_XDECREF(__pyx_t_1);
2414  __Pyx_XDECREF(__pyx_t_2);
2415  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2416  __Pyx_pretend_to_initialize(&__pyx_r);
2417  __pyx_L0:;
2418  __Pyx_RefNannyFinishContext();
2419  return __pyx_r;
2420 }
2421 
2422 /* "PyClical.pyx":51
2423  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2424  *
2425  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2426  * """
2427  * Wrap an instance of the C++ class IndexSet.
2428  */
2429 
2430 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2431  PyObject *__pyx_r = NULL;
2432  __Pyx_RefNannyDeclarations
2433  __Pyx_RefNannySetupContext("wrap", 0);
2434 
2435  /* "PyClical.pyx":55
2436  * Wrap an instance of the C++ class IndexSet.
2437  * """
2438  * self.instance[0] = other # <<<<<<<<<<<<<<
2439  * return self
2440  *
2441  */
2442  (__pyx_v_self->instance[0]) = __pyx_v_other;
2443 
2444  /* "PyClical.pyx":56
2445  * """
2446  * self.instance[0] = other
2447  * return self # <<<<<<<<<<<<<<
2448  *
2449  * cdef inline IndexSet unwrap(index_set self):
2450  */
2451  __Pyx_XDECREF(__pyx_r);
2452  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2453  __pyx_r = ((PyObject *)__pyx_v_self);
2454  goto __pyx_L0;
2455 
2456  /* "PyClical.pyx":51
2457  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2458  *
2459  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2460  * """
2461  * Wrap an instance of the C++ class IndexSet.
2462  */
2463 
2464  /* function exit code */
2465  __pyx_L0:;
2466  __Pyx_XGIVEREF(__pyx_r);
2467  __Pyx_RefNannyFinishContext();
2468  return __pyx_r;
2469 }
2470 
2471 /* "PyClical.pyx":58
2472  * return self
2473  *
2474  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2475  * """
2476  * Return the wrapped C++ IndexSet instance.
2477  */
2478 
2479 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2480  IndexSet __pyx_r;
2481  __Pyx_RefNannyDeclarations
2482  __Pyx_RefNannySetupContext("unwrap", 0);
2483 
2484  /* "PyClical.pyx":62
2485  * Return the wrapped C++ IndexSet instance.
2486  * """
2487  * return self.instance[0] # <<<<<<<<<<<<<<
2488  *
2489  * cpdef copy(index_set self):
2490  */
2491  __pyx_r = (__pyx_v_self->instance[0]);
2492  goto __pyx_L0;
2493 
2494  /* "PyClical.pyx":58
2495  * return self
2496  *
2497  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2498  * """
2499  * Return the wrapped C++ IndexSet instance.
2500  */
2501 
2502  /* function exit code */
2503  __pyx_L0:;
2504  __Pyx_RefNannyFinishContext();
2505  return __pyx_r;
2506 }
2507 
2508 /* "PyClical.pyx":64
2509  * return self.instance[0]
2510  *
2511  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2512  * """
2513  * Copy this index_set object.
2514  */
2515 
2516 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2517 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2518  PyObject *__pyx_r = NULL;
2519  __Pyx_RefNannyDeclarations
2520  PyObject *__pyx_t_1 = NULL;
2521  PyObject *__pyx_t_2 = NULL;
2522  PyObject *__pyx_t_3 = NULL;
2523  PyObject *__pyx_t_4 = NULL;
2524  __Pyx_RefNannySetupContext("copy", 0);
2525  /* Check if called by wrapper */
2526  if (unlikely(__pyx_skip_dispatch)) ;
2527  /* Check if overridden in Python */
2528  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2529  __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)
2530  __Pyx_GOTREF(__pyx_t_1);
2531  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2532  __Pyx_XDECREF(__pyx_r);
2533  __Pyx_INCREF(__pyx_t_1);
2534  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2535  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2536  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2537  if (likely(__pyx_t_4)) {
2538  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2539  __Pyx_INCREF(__pyx_t_4);
2540  __Pyx_INCREF(function);
2541  __Pyx_DECREF_SET(__pyx_t_3, function);
2542  }
2543  }
2544  if (__pyx_t_4) {
2545  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2546  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2547  } else {
2548  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2549  }
2550  __Pyx_GOTREF(__pyx_t_2);
2551  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2552  __pyx_r = __pyx_t_2;
2553  __pyx_t_2 = 0;
2554  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2555  goto __pyx_L0;
2556  }
2557  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2558  }
2559 
2560  /* "PyClical.pyx":71
2561  * {1}
2562  * """
2563  * return index_set(self) # <<<<<<<<<<<<<<
2564  *
2565  * def __cinit__(self, other = 0):
2566  */
2567  __Pyx_XDECREF(__pyx_r);
2568  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2569  __Pyx_GOTREF(__pyx_t_1);
2570  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2571  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
2572  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
2573  __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)
2574  __Pyx_GOTREF(__pyx_t_2);
2575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2576  __pyx_r = __pyx_t_2;
2577  __pyx_t_2 = 0;
2578  goto __pyx_L0;
2579 
2580  /* "PyClical.pyx":64
2581  * return self.instance[0]
2582  *
2583  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2584  * """
2585  * Copy this index_set object.
2586  */
2587 
2588  /* function exit code */
2589  __pyx_L1_error:;
2590  __Pyx_XDECREF(__pyx_t_1);
2591  __Pyx_XDECREF(__pyx_t_2);
2592  __Pyx_XDECREF(__pyx_t_3);
2593  __Pyx_XDECREF(__pyx_t_4);
2594  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2595  __pyx_r = 0;
2596  __pyx_L0:;
2597  __Pyx_XGIVEREF(__pyx_r);
2598  __Pyx_RefNannyFinishContext();
2599  return __pyx_r;
2600 }
2601 
2602 /* Python wrapper */
2603 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2604 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 ";
2605 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2606  PyObject *__pyx_r = 0;
2607  __Pyx_RefNannyDeclarations
2608  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2609  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2610 
2611  /* function exit code */
2612  __Pyx_RefNannyFinishContext();
2613  return __pyx_r;
2614 }
2615 
2616 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2617  PyObject *__pyx_r = NULL;
2618  __Pyx_RefNannyDeclarations
2619  PyObject *__pyx_t_1 = NULL;
2620  __Pyx_RefNannySetupContext("copy", 0);
2621  __Pyx_XDECREF(__pyx_r);
2622  __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)
2623  __Pyx_GOTREF(__pyx_t_1);
2624  __pyx_r = __pyx_t_1;
2625  __pyx_t_1 = 0;
2626  goto __pyx_L0;
2627 
2628  /* function exit code */
2629  __pyx_L1_error:;
2630  __Pyx_XDECREF(__pyx_t_1);
2631  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2632  __pyx_r = NULL;
2633  __pyx_L0:;
2634  __Pyx_XGIVEREF(__pyx_r);
2635  __Pyx_RefNannyFinishContext();
2636  return __pyx_r;
2637 }
2638 
2639 /* "PyClical.pyx":73
2640  * return index_set(self)
2641  *
2642  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2643  * """
2644  * Construct an object of type index_set.
2645  */
2646 
2647 /* Python wrapper */
2648 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2649 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2650  PyObject *__pyx_v_other = 0;
2651  int __pyx_r;
2652  __Pyx_RefNannyDeclarations
2653  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2654  {
2655  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2656  PyObject* values[1] = {0};
2657  values[0] = ((PyObject *)__pyx_int_0);
2658  if (unlikely(__pyx_kwds)) {
2659  Py_ssize_t kw_args;
2660  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2661  switch (pos_args) {
2662  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2663  CYTHON_FALLTHROUGH;
2664  case 0: break;
2665  default: goto __pyx_L5_argtuple_error;
2666  }
2667  kw_args = PyDict_Size(__pyx_kwds);
2668  switch (pos_args) {
2669  case 0:
2670  if (kw_args > 0) {
2671  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
2672  if (value) { values[0] = value; kw_args--; }
2673  }
2674  }
2675  if (unlikely(kw_args > 0)) {
2676  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2677  }
2678  } else {
2679  switch (PyTuple_GET_SIZE(__pyx_args)) {
2680  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2681  CYTHON_FALLTHROUGH;
2682  case 0: break;
2683  default: goto __pyx_L5_argtuple_error;
2684  }
2685  }
2686  __pyx_v_other = values[0];
2687  }
2688  goto __pyx_L4_argument_unpacking_done;
2689  __pyx_L5_argtuple_error:;
2690  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2691  __pyx_L3_error:;
2692  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2693  __Pyx_RefNannyFinishContext();
2694  return -1;
2695  __pyx_L4_argument_unpacking_done:;
2696  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2697 
2698  /* function exit code */
2699  __Pyx_RefNannyFinishContext();
2700  return __pyx_r;
2701 }
2702 
2703 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2704  PyObject *__pyx_v_error_msg_prefix = NULL;
2705  PyObject *__pyx_v_idx = NULL;
2706  int __pyx_r;
2707  __Pyx_RefNannyDeclarations
2708  int __pyx_t_1;
2709  int __pyx_t_2;
2710  IndexSet *__pyx_t_3;
2711  PyObject *__pyx_t_4 = NULL;
2712  PyObject *__pyx_t_5 = NULL;
2713  int __pyx_t_6;
2714  int __pyx_t_7;
2715  PyObject *__pyx_t_8 = NULL;
2716  PyObject *__pyx_t_9 = NULL;
2717  PyObject *__pyx_t_10 = NULL;
2718  Py_ssize_t __pyx_t_11;
2719  PyObject *(*__pyx_t_12)(PyObject *);
2720  PyObject *__pyx_t_13 = NULL;
2721  PyObject *__pyx_t_14 = NULL;
2722  PyObject *__pyx_t_15 = NULL;
2723  PyObject *__pyx_t_16 = NULL;
2724  char *__pyx_t_17;
2725  __Pyx_RefNannySetupContext("__cinit__", 0);
2726 
2727  /* "PyClical.pyx":92
2728  * {}
2729  * """
2730  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2731  * if isinstance(other, index_set):
2732  * self.instance = new IndexSet((<index_set>other).unwrap())
2733  */
2734  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2735  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2736 
2737  /* "PyClical.pyx":93
2738  * """
2739  * error_msg_prefix = "Cannot initialize index_set object from"
2740  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2741  * self.instance = new IndexSet((<index_set>other).unwrap())
2742  * elif isinstance(other, numbers.Integral):
2743  */
2744  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2745  __pyx_t_2 = (__pyx_t_1 != 0);
2746  if (__pyx_t_2) {
2747 
2748  /* "PyClical.pyx":94
2749  * error_msg_prefix = "Cannot initialize index_set object from"
2750  * if isinstance(other, index_set):
2751  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2752  * elif isinstance(other, numbers.Integral):
2753  * self.instance = new IndexSet(<int>other)
2754  */
2755  try {
2756  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2757  } catch(...) {
2758  __Pyx_CppExn2PyErr();
2759  __PYX_ERR(0, 94, __pyx_L1_error)
2760  }
2761  __pyx_v_self->instance = __pyx_t_3;
2762 
2763  /* "PyClical.pyx":93
2764  * """
2765  * error_msg_prefix = "Cannot initialize index_set object from"
2766  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2767  * self.instance = new IndexSet((<index_set>other).unwrap())
2768  * elif isinstance(other, numbers.Integral):
2769  */
2770  goto __pyx_L3;
2771  }
2772 
2773  /* "PyClical.pyx":95
2774  * if isinstance(other, index_set):
2775  * self.instance = new IndexSet((<index_set>other).unwrap())
2776  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2777  * self.instance = new IndexSet(<int>other)
2778  * elif isinstance(other, (set, frozenset)):
2779  */
2780  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2781  __Pyx_GOTREF(__pyx_t_4);
2782  __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)
2783  __Pyx_GOTREF(__pyx_t_5);
2784  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2785  __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)
2786  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2787  __pyx_t_1 = (__pyx_t_2 != 0);
2788  if (__pyx_t_1) {
2789 
2790  /* "PyClical.pyx":96
2791  * self.instance = new IndexSet((<index_set>other).unwrap())
2792  * elif isinstance(other, numbers.Integral):
2793  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2794  * elif isinstance(other, (set, frozenset)):
2795  * try:
2796  */
2797  __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)
2798  try {
2799  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2800  } catch(...) {
2801  __Pyx_CppExn2PyErr();
2802  __PYX_ERR(0, 96, __pyx_L1_error)
2803  }
2804  __pyx_v_self->instance = __pyx_t_3;
2805 
2806  /* "PyClical.pyx":95
2807  * if isinstance(other, index_set):
2808  * self.instance = new IndexSet((<index_set>other).unwrap())
2809  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2810  * self.instance = new IndexSet(<int>other)
2811  * elif isinstance(other, (set, frozenset)):
2812  */
2813  goto __pyx_L3;
2814  }
2815 
2816  /* "PyClical.pyx":97
2817  * elif isinstance(other, numbers.Integral):
2818  * self.instance = new IndexSet(<int>other)
2819  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2820  * try:
2821  * self.instance = new IndexSet()
2822  */
2823  __pyx_t_2 = PySet_Check(__pyx_v_other);
2824  __pyx_t_7 = (__pyx_t_2 != 0);
2825  if (!__pyx_t_7) {
2826  } else {
2827  __pyx_t_1 = __pyx_t_7;
2828  goto __pyx_L4_bool_binop_done;
2829  }
2830  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2831  __pyx_t_2 = (__pyx_t_7 != 0);
2832  __pyx_t_1 = __pyx_t_2;
2833  __pyx_L4_bool_binop_done:;
2834  __pyx_t_2 = (__pyx_t_1 != 0);
2835  if (__pyx_t_2) {
2836 
2837  /* "PyClical.pyx":98
2838  * self.instance = new IndexSet(<int>other)
2839  * elif isinstance(other, (set, frozenset)):
2840  * try: # <<<<<<<<<<<<<<
2841  * self.instance = new IndexSet()
2842  * for idx in other:
2843  */
2844  {
2845  __Pyx_PyThreadState_declare
2846  __Pyx_PyThreadState_assign
2847  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2848  __Pyx_XGOTREF(__pyx_t_8);
2849  __Pyx_XGOTREF(__pyx_t_9);
2850  __Pyx_XGOTREF(__pyx_t_10);
2851  /*try:*/ {
2852 
2853  /* "PyClical.pyx":99
2854  * elif isinstance(other, (set, frozenset)):
2855  * try:
2856  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2857  * for idx in other:
2858  * self[idx] = True
2859  */
2860  __pyx_t_3 = new IndexSet();
2861  __pyx_v_self->instance = __pyx_t_3;
2862 
2863  /* "PyClical.pyx":100
2864  * try:
2865  * self.instance = new IndexSet()
2866  * for idx in other: # <<<<<<<<<<<<<<
2867  * self[idx] = True
2868  * except IndexError:
2869  */
2870  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2871  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2872  __pyx_t_12 = NULL;
2873  } else {
2874  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
2875  __Pyx_GOTREF(__pyx_t_5);
2876  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
2877  }
2878  for (;;) {
2879  if (likely(!__pyx_t_12)) {
2880  if (likely(PyList_CheckExact(__pyx_t_5))) {
2881  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
2882  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2883  __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)
2884  #else
2885  __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)
2886  __Pyx_GOTREF(__pyx_t_4);
2887  #endif
2888  } else {
2889  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2890  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2891  __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)
2892  #else
2893  __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)
2894  __Pyx_GOTREF(__pyx_t_4);
2895  #endif
2896  }
2897  } else {
2898  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2899  if (unlikely(!__pyx_t_4)) {
2900  PyObject* exc_type = PyErr_Occurred();
2901  if (exc_type) {
2902  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2903  else __PYX_ERR(0, 100, __pyx_L6_error)
2904  }
2905  break;
2906  }
2907  __Pyx_GOTREF(__pyx_t_4);
2908  }
2909  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2910  __pyx_t_4 = 0;
2911 
2912  /* "PyClical.pyx":101
2913  * self.instance = new IndexSet()
2914  * for idx in other:
2915  * self[idx] = True # <<<<<<<<<<<<<<
2916  * except IndexError:
2917  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2918  */
2919  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
2920 
2921  /* "PyClical.pyx":100
2922  * try:
2923  * self.instance = new IndexSet()
2924  * for idx in other: # <<<<<<<<<<<<<<
2925  * self[idx] = True
2926  * except IndexError:
2927  */
2928  }
2929  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2930 
2931  /* "PyClical.pyx":98
2932  * self.instance = new IndexSet(<int>other)
2933  * elif isinstance(other, (set, frozenset)):
2934  * try: # <<<<<<<<<<<<<<
2935  * self.instance = new IndexSet()
2936  * for idx in other:
2937  */
2938  }
2939  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2940  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2941  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2942  goto __pyx_L11_try_end;
2943  __pyx_L6_error:;
2944  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2945  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2946 
2947  /* "PyClical.pyx":102
2948  * for idx in other:
2949  * self[idx] = True
2950  * except IndexError: # <<<<<<<<<<<<<<
2951  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2952  * except (RuntimeError, TypeError):
2953  */
2954  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2955  if (__pyx_t_6) {
2956  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2957  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
2958  __Pyx_GOTREF(__pyx_t_5);
2959  __Pyx_GOTREF(__pyx_t_4);
2960  __Pyx_GOTREF(__pyx_t_13);
2961 
2962  /* "PyClical.pyx":103
2963  * self[idx] = True
2964  * except IndexError:
2965  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
2966  * except (RuntimeError, TypeError):
2967  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2968  */
2969  __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)
2970  __Pyx_GOTREF(__pyx_t_14);
2971  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2972  __Pyx_GOTREF(__pyx_t_15);
2973  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2974  __Pyx_GOTREF(__pyx_t_16);
2975  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
2976  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2977  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2978  __Pyx_GOTREF(__pyx_t_15);
2979  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2980  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
2981  __Pyx_GOTREF(__pyx_t_16);
2982  __Pyx_GIVEREF(__pyx_t_15);
2983  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15);
2984  __pyx_t_15 = 0;
2985  __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)
2986  __Pyx_GOTREF(__pyx_t_15);
2987  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
2988  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
2989  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
2990  __PYX_ERR(0, 103, __pyx_L8_except_error)
2991  }
2992 
2993  /* "PyClical.pyx":104
2994  * except IndexError:
2995  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2996  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
2997  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
2998  * elif isinstance(other, str):
2999  */
3000  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3001  if (__pyx_t_6) {
3002  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3003  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3004  __Pyx_GOTREF(__pyx_t_13);
3005  __Pyx_GOTREF(__pyx_t_4);
3006  __Pyx_GOTREF(__pyx_t_5);
3007 
3008  /* "PyClical.pyx":105
3009  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3010  * except (RuntimeError, TypeError):
3011  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3012  * elif isinstance(other, str):
3013  * try:
3014  */
3015  __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)
3016  __Pyx_GOTREF(__pyx_t_15);
3017  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3018  __Pyx_GOTREF(__pyx_t_16);
3019  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3020  __Pyx_GOTREF(__pyx_t_14);
3021  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3022  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3023  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3024  __Pyx_GOTREF(__pyx_t_16);
3025  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3026  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3027  __Pyx_GOTREF(__pyx_t_14);
3028  __Pyx_GIVEREF(__pyx_t_16);
3029  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_16);
3030  __pyx_t_16 = 0;
3031  __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)
3032  __Pyx_GOTREF(__pyx_t_16);
3033  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3034  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3035  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3036  __PYX_ERR(0, 105, __pyx_L8_except_error)
3037  }
3038  goto __pyx_L8_except_error;
3039  __pyx_L8_except_error:;
3040 
3041  /* "PyClical.pyx":98
3042  * self.instance = new IndexSet(<int>other)
3043  * elif isinstance(other, (set, frozenset)):
3044  * try: # <<<<<<<<<<<<<<
3045  * self.instance = new IndexSet()
3046  * for idx in other:
3047  */
3048  __Pyx_XGIVEREF(__pyx_t_8);
3049  __Pyx_XGIVEREF(__pyx_t_9);
3050  __Pyx_XGIVEREF(__pyx_t_10);
3051  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3052  goto __pyx_L1_error;
3053  __pyx_L11_try_end:;
3054  }
3055 
3056  /* "PyClical.pyx":97
3057  * elif isinstance(other, numbers.Integral):
3058  * self.instance = new IndexSet(<int>other)
3059  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3060  * try:
3061  * self.instance = new IndexSet()
3062  */
3063  goto __pyx_L3;
3064  }
3065 
3066  /* "PyClical.pyx":106
3067  * except (RuntimeError, TypeError):
3068  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3069  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3070  * try:
3071  * self.instance = new IndexSet(<char *>other)
3072  */
3073  __pyx_t_2 = PyString_Check(__pyx_v_other);
3074  __pyx_t_1 = (__pyx_t_2 != 0);
3075  if (__pyx_t_1) {
3076 
3077  /* "PyClical.pyx":107
3078  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3079  * elif isinstance(other, str):
3080  * try: # <<<<<<<<<<<<<<
3081  * self.instance = new IndexSet(<char *>other)
3082  * except RuntimeError:
3083  */
3084  {
3085  __Pyx_PyThreadState_declare
3086  __Pyx_PyThreadState_assign
3087  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3088  __Pyx_XGOTREF(__pyx_t_10);
3089  __Pyx_XGOTREF(__pyx_t_9);
3090  __Pyx_XGOTREF(__pyx_t_8);
3091  /*try:*/ {
3092 
3093  /* "PyClical.pyx":108
3094  * elif isinstance(other, str):
3095  * try:
3096  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3097  * except RuntimeError:
3098  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3099  */
3100  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3101  try {
3102  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3103  } catch(...) {
3104  __Pyx_CppExn2PyErr();
3105  __PYX_ERR(0, 108, __pyx_L18_error)
3106  }
3107  __pyx_v_self->instance = __pyx_t_3;
3108 
3109  /* "PyClical.pyx":107
3110  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3111  * elif isinstance(other, str):
3112  * try: # <<<<<<<<<<<<<<
3113  * self.instance = new IndexSet(<char *>other)
3114  * except RuntimeError:
3115  */
3116  }
3117  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3118  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3119  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3120  goto __pyx_L23_try_end;
3121  __pyx_L18_error:;
3122  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3123  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3124  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3125  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3126  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3127  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3128 
3129  /* "PyClical.pyx":109
3130  * try:
3131  * self.instance = new IndexSet(<char *>other)
3132  * except RuntimeError: # <<<<<<<<<<<<<<
3133  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3134  * else:
3135  */
3136  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3137  if (__pyx_t_6) {
3138  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3139  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3140  __Pyx_GOTREF(__pyx_t_5);
3141  __Pyx_GOTREF(__pyx_t_4);
3142  __Pyx_GOTREF(__pyx_t_13);
3143 
3144  /* "PyClical.pyx":110
3145  * self.instance = new IndexSet(<char *>other)
3146  * except RuntimeError:
3147  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3148  * else:
3149  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3150  */
3151  __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)
3152  __Pyx_GOTREF(__pyx_t_16);
3153  __pyx_t_14 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3154  __Pyx_GOTREF(__pyx_t_14);
3155  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3156  __Pyx_GOTREF(__pyx_t_15);
3157  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3158  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3159  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3160  __Pyx_GOTREF(__pyx_t_14);
3161  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3162  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3163  __Pyx_GOTREF(__pyx_t_15);
3164  __Pyx_GIVEREF(__pyx_t_14);
3165  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
3166  __pyx_t_14 = 0;
3167  __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)
3168  __Pyx_GOTREF(__pyx_t_14);
3169  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3170  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3171  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3172  __PYX_ERR(0, 110, __pyx_L20_except_error)
3173  }
3174  goto __pyx_L20_except_error;
3175  __pyx_L20_except_error:;
3176 
3177  /* "PyClical.pyx":107
3178  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3179  * elif isinstance(other, str):
3180  * try: # <<<<<<<<<<<<<<
3181  * self.instance = new IndexSet(<char *>other)
3182  * except RuntimeError:
3183  */
3184  __Pyx_XGIVEREF(__pyx_t_10);
3185  __Pyx_XGIVEREF(__pyx_t_9);
3186  __Pyx_XGIVEREF(__pyx_t_8);
3187  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3188  goto __pyx_L1_error;
3189  __pyx_L23_try_end:;
3190  }
3191 
3192  /* "PyClical.pyx":106
3193  * except (RuntimeError, TypeError):
3194  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3195  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3196  * try:
3197  * self.instance = new IndexSet(<char *>other)
3198  */
3199  goto __pyx_L3;
3200  }
3201 
3202  /* "PyClical.pyx":112
3203  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3204  * else:
3205  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3206  *
3207  * def __dealloc__(self):
3208  */
3209  /*else*/ {
3210  __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)
3211  __Pyx_GOTREF(__pyx_t_13);
3212  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3213  __Pyx_GOTREF(__pyx_t_4);
3214  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
3215  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
3216  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
3217  __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)
3218  __Pyx_GOTREF(__pyx_t_5);
3219  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3220  __pyx_t_4 = PyNumber_Add(__pyx_t_13, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3221  __Pyx_GOTREF(__pyx_t_4);
3222  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3223  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3224  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3225  __Pyx_GOTREF(__pyx_t_5);
3226  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3227  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3228  __Pyx_GOTREF(__pyx_t_4);
3229  __Pyx_GIVEREF(__pyx_t_5);
3230  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
3231  __pyx_t_5 = 0;
3232  __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)
3233  __Pyx_GOTREF(__pyx_t_5);
3234  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3235  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3236  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3237  __PYX_ERR(0, 112, __pyx_L1_error)
3238  }
3239  __pyx_L3:;
3240 
3241  /* "PyClical.pyx":73
3242  * return index_set(self)
3243  *
3244  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3245  * """
3246  * Construct an object of type index_set.
3247  */
3248 
3249  /* function exit code */
3250  __pyx_r = 0;
3251  goto __pyx_L0;
3252  __pyx_L1_error:;
3253  __Pyx_XDECREF(__pyx_t_4);
3254  __Pyx_XDECREF(__pyx_t_5);
3255  __Pyx_XDECREF(__pyx_t_13);
3256  __Pyx_XDECREF(__pyx_t_14);
3257  __Pyx_XDECREF(__pyx_t_15);
3258  __Pyx_XDECREF(__pyx_t_16);
3259  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3260  __pyx_r = -1;
3261  __pyx_L0:;
3262  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3263  __Pyx_XDECREF(__pyx_v_idx);
3264  __Pyx_RefNannyFinishContext();
3265  return __pyx_r;
3266 }
3267 
3268 /* "PyClical.pyx":114
3269  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3270  *
3271  * def __dealloc__(self): # <<<<<<<<<<<<<<
3272  * """
3273  * Clean up by deallocating the instance of C++ class IndexSet.
3274  */
3275 
3276 /* Python wrapper */
3277 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3278 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3279  __Pyx_RefNannyDeclarations
3280  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3281  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3282 
3283  /* function exit code */
3284  __Pyx_RefNannyFinishContext();
3285 }
3286 
3287 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3288  __Pyx_RefNannyDeclarations
3289  __Pyx_RefNannySetupContext("__dealloc__", 0);
3290 
3291  /* "PyClical.pyx":118
3292  * Clean up by deallocating the instance of C++ class IndexSet.
3293  * """
3294  * del self.instance # <<<<<<<<<<<<<<
3295  *
3296  * def __richcmp__(lhs, rhs, int op):
3297  */
3298  delete __pyx_v_self->instance;
3299 
3300  /* "PyClical.pyx":114
3301  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3302  *
3303  * def __dealloc__(self): # <<<<<<<<<<<<<<
3304  * """
3305  * Clean up by deallocating the instance of C++ class IndexSet.
3306  */
3307 
3308  /* function exit code */
3309  __Pyx_RefNannyFinishContext();
3310 }
3311 
3312 /* "PyClical.pyx":120
3313  * del self.instance
3314  *
3315  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3316  * """
3317  * Compare two objects of class index_set.
3318  */
3319 
3320 /* Python wrapper */
3321 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3322 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3323  PyObject *__pyx_r = 0;
3324  __Pyx_RefNannyDeclarations
3325  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3326  __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
3327 
3328  /* function exit code */
3329  __Pyx_RefNannyFinishContext();
3330  return __pyx_r;
3331 }
3332 
3333 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3334  PyObject *__pyx_v_eq = NULL;
3335  PyObject *__pyx_v_lt = NULL;
3336  PyObject *__pyx_r = NULL;
3337  __Pyx_RefNannyDeclarations
3338  int __pyx_t_1;
3339  int __pyx_t_2;
3340  int __pyx_t_3;
3341  PyObject *__pyx_t_4 = NULL;
3342  __Pyx_RefNannySetupContext("__richcmp__", 0);
3343 
3344  /* "PyClical.pyx":141
3345  * False
3346  * """
3347  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3348  * eq = bool(lhs is rhs)
3349  * if op == 2: # ==
3350  */
3351  __pyx_t_2 = (__pyx_v_lhs == Py_None);
3352  __pyx_t_3 = (__pyx_t_2 != 0);
3353  if (!__pyx_t_3) {
3354  } else {
3355  __pyx_t_1 = __pyx_t_3;
3356  goto __pyx_L4_bool_binop_done;
3357  }
3358  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3359  __pyx_t_2 = (__pyx_t_3 != 0);
3360  __pyx_t_1 = __pyx_t_2;
3361  __pyx_L4_bool_binop_done:;
3362  if (__pyx_t_1) {
3363 
3364  /* "PyClical.pyx":142
3365  * """
3366  * if (lhs is None) or (rhs is None):
3367  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3368  * if op == 2: # ==
3369  * return eq
3370  */
3371  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
3372  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3373  __Pyx_GOTREF(__pyx_t_4);
3374  __pyx_v_eq = __pyx_t_4;
3375  __pyx_t_4 = 0;
3376 
3377  /* "PyClical.pyx":143
3378  * if (lhs is None) or (rhs is None):
3379  * eq = bool(lhs is rhs)
3380  * if op == 2: # == # <<<<<<<<<<<<<<
3381  * return eq
3382  * elif op == 3: # !=
3383  */
3384  switch (__pyx_v_op) {
3385  case 2:
3386 
3387  /* "PyClical.pyx":144
3388  * eq = bool(lhs is rhs)
3389  * if op == 2: # ==
3390  * return eq # <<<<<<<<<<<<<<
3391  * elif op == 3: # !=
3392  * return not eq
3393  */
3394  __Pyx_XDECREF(__pyx_r);
3395  __Pyx_INCREF(__pyx_v_eq);
3396  __pyx_r = __pyx_v_eq;
3397  goto __pyx_L0;
3398 
3399  /* "PyClical.pyx":143
3400  * if (lhs is None) or (rhs is None):
3401  * eq = bool(lhs is rhs)
3402  * if op == 2: # == # <<<<<<<<<<<<<<
3403  * return eq
3404  * elif op == 3: # !=
3405  */
3406  break;
3407 
3408  /* "PyClical.pyx":145
3409  * if op == 2: # ==
3410  * return eq
3411  * elif op == 3: # != # <<<<<<<<<<<<<<
3412  * return not eq
3413  * else:
3414  */
3415  case 3:
3416 
3417  /* "PyClical.pyx":146
3418  * return eq
3419  * elif op == 3: # !=
3420  * return not eq # <<<<<<<<<<<<<<
3421  * else:
3422  * if op == 0: # <
3423  */
3424  __Pyx_XDECREF(__pyx_r);
3425  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3426  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3427  __Pyx_GOTREF(__pyx_t_4);
3428  __pyx_r = __pyx_t_4;
3429  __pyx_t_4 = 0;
3430  goto __pyx_L0;
3431 
3432  /* "PyClical.pyx":145
3433  * if op == 2: # ==
3434  * return eq
3435  * elif op == 3: # != # <<<<<<<<<<<<<<
3436  * return not eq
3437  * else:
3438  */
3439  break;
3440  default:
3441 
3442  /* "PyClical.pyx":148
3443  * return not eq
3444  * else:
3445  * if op == 0: # < # <<<<<<<<<<<<<<
3446  * return False
3447  * elif op == 1: # <=
3448  */
3449  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3450  if (__pyx_t_1) {
3451 
3452  /* "PyClical.pyx":149
3453  * else:
3454  * if op == 0: # <
3455  * return False # <<<<<<<<<<<<<<
3456  * elif op == 1: # <=
3457  * return eq
3458  */
3459  __Pyx_XDECREF(__pyx_r);
3460  __Pyx_INCREF(Py_False);
3461  __pyx_r = Py_False;
3462  goto __pyx_L0;
3463 
3464  /* "PyClical.pyx":148
3465  * return not eq
3466  * else:
3467  * if op == 0: # < # <<<<<<<<<<<<<<
3468  * return False
3469  * elif op == 1: # <=
3470  */
3471  }
3472 
3473  /* "PyClical.pyx":150
3474  * if op == 0: # <
3475  * return False
3476  * elif op == 1: # <= # <<<<<<<<<<<<<<
3477  * return eq
3478  * elif op == 4: # >
3479  */
3480  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3481  if (__pyx_t_1) {
3482 
3483  /* "PyClical.pyx":151
3484  * return False
3485  * elif op == 1: # <=
3486  * return eq # <<<<<<<<<<<<<<
3487  * elif op == 4: # >
3488  * return False
3489  */
3490  __Pyx_XDECREF(__pyx_r);
3491  __Pyx_INCREF(__pyx_v_eq);
3492  __pyx_r = __pyx_v_eq;
3493  goto __pyx_L0;
3494 
3495  /* "PyClical.pyx":150
3496  * if op == 0: # <
3497  * return False
3498  * elif op == 1: # <= # <<<<<<<<<<<<<<
3499  * return eq
3500  * elif op == 4: # >
3501  */
3502  }
3503 
3504  /* "PyClical.pyx":152
3505  * elif op == 1: # <=
3506  * return eq
3507  * elif op == 4: # > # <<<<<<<<<<<<<<
3508  * return False
3509  * elif op == 5: # >=
3510  */
3511  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3512  if (__pyx_t_1) {
3513 
3514  /* "PyClical.pyx":153
3515  * return eq
3516  * elif op == 4: # >
3517  * return False # <<<<<<<<<<<<<<
3518  * elif op == 5: # >=
3519  * return eq
3520  */
3521  __Pyx_XDECREF(__pyx_r);
3522  __Pyx_INCREF(Py_False);
3523  __pyx_r = Py_False;
3524  goto __pyx_L0;
3525 
3526  /* "PyClical.pyx":152
3527  * elif op == 1: # <=
3528  * return eq
3529  * elif op == 4: # > # <<<<<<<<<<<<<<
3530  * return False
3531  * elif op == 5: # >=
3532  */
3533  }
3534 
3535  /* "PyClical.pyx":154
3536  * elif op == 4: # >
3537  * return False
3538  * elif op == 5: # >= # <<<<<<<<<<<<<<
3539  * return eq
3540  * else:
3541  */
3542  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3543  if (__pyx_t_1) {
3544 
3545  /* "PyClical.pyx":155
3546  * return False
3547  * elif op == 5: # >=
3548  * return eq # <<<<<<<<<<<<<<
3549  * else:
3550  * return NotImplemented
3551  */
3552  __Pyx_XDECREF(__pyx_r);
3553  __Pyx_INCREF(__pyx_v_eq);
3554  __pyx_r = __pyx_v_eq;
3555  goto __pyx_L0;
3556 
3557  /* "PyClical.pyx":154
3558  * elif op == 4: # >
3559  * return False
3560  * elif op == 5: # >= # <<<<<<<<<<<<<<
3561  * return eq
3562  * else:
3563  */
3564  }
3565 
3566  /* "PyClical.pyx":157
3567  * return eq
3568  * else:
3569  * return NotImplemented # <<<<<<<<<<<<<<
3570  * else:
3571  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3572  */
3573  /*else*/ {
3574  __Pyx_XDECREF(__pyx_r);
3575  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3576  __pyx_r = __pyx_builtin_NotImplemented;
3577  goto __pyx_L0;
3578  }
3579  break;
3580  }
3581 
3582  /* "PyClical.pyx":141
3583  * False
3584  * """
3585  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3586  * eq = bool(lhs is rhs)
3587  * if op == 2: # ==
3588  */
3589  }
3590 
3591  /* "PyClical.pyx":159
3592  * return NotImplemented
3593  * else:
3594  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3595  * if op == 2: # ==
3596  * return eq
3597  */
3598  /*else*/ {
3599  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3600  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3601  __Pyx_GOTREF(__pyx_t_4);
3602  __pyx_v_eq = __pyx_t_4;
3603  __pyx_t_4 = 0;
3604 
3605  /* "PyClical.pyx":160
3606  * else:
3607  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3608  * if op == 2: # == # <<<<<<<<<<<<<<
3609  * return eq
3610  * elif op == 3: # !=
3611  */
3612  switch (__pyx_v_op) {
3613  case 2:
3614 
3615  /* "PyClical.pyx":161
3616  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3617  * if op == 2: # ==
3618  * return eq # <<<<<<<<<<<<<<
3619  * elif op == 3: # !=
3620  * return not eq
3621  */
3622  __Pyx_XDECREF(__pyx_r);
3623  __Pyx_INCREF(__pyx_v_eq);
3624  __pyx_r = __pyx_v_eq;
3625  goto __pyx_L0;
3626 
3627  /* "PyClical.pyx":160
3628  * else:
3629  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3630  * if op == 2: # == # <<<<<<<<<<<<<<
3631  * return eq
3632  * elif op == 3: # !=
3633  */
3634  break;
3635 
3636  /* "PyClical.pyx":162
3637  * if op == 2: # ==
3638  * return eq
3639  * elif op == 3: # != # <<<<<<<<<<<<<<
3640  * return not eq
3641  * else:
3642  */
3643  case 3:
3644 
3645  /* "PyClical.pyx":163
3646  * return eq
3647  * elif op == 3: # !=
3648  * return not eq # <<<<<<<<<<<<<<
3649  * else:
3650  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3651  */
3652  __Pyx_XDECREF(__pyx_r);
3653  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3654  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3655  __Pyx_GOTREF(__pyx_t_4);
3656  __pyx_r = __pyx_t_4;
3657  __pyx_t_4 = 0;
3658  goto __pyx_L0;
3659 
3660  /* "PyClical.pyx":162
3661  * if op == 2: # ==
3662  * return eq
3663  * elif op == 3: # != # <<<<<<<<<<<<<<
3664  * return not eq
3665  * else:
3666  */
3667  break;
3668  default:
3669 
3670  /* "PyClical.pyx":165
3671  * return not eq
3672  * else:
3673  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3674  * if op == 0: # <
3675  * return lt
3676  */
3677  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(__pyx_v_lhs) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3678  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3679  __Pyx_GOTREF(__pyx_t_4);
3680  __pyx_v_lt = __pyx_t_4;
3681  __pyx_t_4 = 0;
3682 
3683  /* "PyClical.pyx":166
3684  * else:
3685  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3686  * if op == 0: # < # <<<<<<<<<<<<<<
3687  * return lt
3688  * elif op == 1: # <=
3689  */
3690  __pyx_t_1 = ((__pyx_v_op == 0) != 0);
3691  if (__pyx_t_1) {
3692 
3693  /* "PyClical.pyx":167
3694  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3695  * if op == 0: # <
3696  * return lt # <<<<<<<<<<<<<<
3697  * elif op == 1: # <=
3698  * return lt or eq
3699  */
3700  __Pyx_XDECREF(__pyx_r);
3701  __Pyx_INCREF(__pyx_v_lt);
3702  __pyx_r = __pyx_v_lt;
3703  goto __pyx_L0;
3704 
3705  /* "PyClical.pyx":166
3706  * else:
3707  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3708  * if op == 0: # < # <<<<<<<<<<<<<<
3709  * return lt
3710  * elif op == 1: # <=
3711  */
3712  }
3713 
3714  /* "PyClical.pyx":168
3715  * if op == 0: # <
3716  * return lt
3717  * elif op == 1: # <= # <<<<<<<<<<<<<<
3718  * return lt or eq
3719  * elif op == 4: # >
3720  */
3721  __pyx_t_1 = ((__pyx_v_op == 1) != 0);
3722  if (__pyx_t_1) {
3723 
3724  /* "PyClical.pyx":169
3725  * return lt
3726  * elif op == 1: # <=
3727  * return lt or eq # <<<<<<<<<<<<<<
3728  * elif op == 4: # >
3729  * return not (lt or eq)
3730  */
3731  __Pyx_XDECREF(__pyx_r);
3732  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3733  if (!__pyx_t_1) {
3734  } else {
3735  __Pyx_INCREF(__pyx_v_lt);
3736  __pyx_t_4 = __pyx_v_lt;
3737  goto __pyx_L8_bool_binop_done;
3738  }
3739  __Pyx_INCREF(__pyx_v_eq);
3740  __pyx_t_4 = __pyx_v_eq;
3741  __pyx_L8_bool_binop_done:;
3742  __pyx_r = __pyx_t_4;
3743  __pyx_t_4 = 0;
3744  goto __pyx_L0;
3745 
3746  /* "PyClical.pyx":168
3747  * if op == 0: # <
3748  * return lt
3749  * elif op == 1: # <= # <<<<<<<<<<<<<<
3750  * return lt or eq
3751  * elif op == 4: # >
3752  */
3753  }
3754 
3755  /* "PyClical.pyx":170
3756  * elif op == 1: # <=
3757  * return lt or eq
3758  * elif op == 4: # > # <<<<<<<<<<<<<<
3759  * return not (lt or eq)
3760  * elif op == 5: # >=
3761  */
3762  __pyx_t_1 = ((__pyx_v_op == 4) != 0);
3763  if (__pyx_t_1) {
3764 
3765  /* "PyClical.pyx":171
3766  * return lt or eq
3767  * elif op == 4: # >
3768  * return not (lt or eq) # <<<<<<<<<<<<<<
3769  * elif op == 5: # >=
3770  * return not lt
3771  */
3772  __Pyx_XDECREF(__pyx_r);
3773  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3774  if (!__pyx_t_2) {
3775  } else {
3776  __pyx_t_1 = __pyx_t_2;
3777  goto __pyx_L10_bool_binop_done;
3778  }
3779  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3780  __pyx_t_1 = __pyx_t_2;
3781  __pyx_L10_bool_binop_done:;
3782  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3783  __Pyx_GOTREF(__pyx_t_4);
3784  __pyx_r = __pyx_t_4;
3785  __pyx_t_4 = 0;
3786  goto __pyx_L0;
3787 
3788  /* "PyClical.pyx":170
3789  * elif op == 1: # <=
3790  * return lt or eq
3791  * elif op == 4: # > # <<<<<<<<<<<<<<
3792  * return not (lt or eq)
3793  * elif op == 5: # >=
3794  */
3795  }
3796 
3797  /* "PyClical.pyx":172
3798  * elif op == 4: # >
3799  * return not (lt or eq)
3800  * elif op == 5: # >= # <<<<<<<<<<<<<<
3801  * return not lt
3802  * else:
3803  */
3804  __pyx_t_1 = ((__pyx_v_op == 5) != 0);
3805  if (__pyx_t_1) {
3806 
3807  /* "PyClical.pyx":173
3808  * return not (lt or eq)
3809  * elif op == 5: # >=
3810  * return not lt # <<<<<<<<<<<<<<
3811  * else:
3812  * return NotImplemented
3813  */
3814  __Pyx_XDECREF(__pyx_r);
3815  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3816  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3817  __Pyx_GOTREF(__pyx_t_4);
3818  __pyx_r = __pyx_t_4;
3819  __pyx_t_4 = 0;
3820  goto __pyx_L0;
3821 
3822  /* "PyClical.pyx":172
3823  * elif op == 4: # >
3824  * return not (lt or eq)
3825  * elif op == 5: # >= # <<<<<<<<<<<<<<
3826  * return not lt
3827  * else:
3828  */
3829  }
3830 
3831  /* "PyClical.pyx":175
3832  * return not lt
3833  * else:
3834  * return NotImplemented # <<<<<<<<<<<<<<
3835  *
3836  * def __setitem__(self, idx, val):
3837  */
3838  /*else*/ {
3839  __Pyx_XDECREF(__pyx_r);
3840  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3841  __pyx_r = __pyx_builtin_NotImplemented;
3842  goto __pyx_L0;
3843  }
3844  break;
3845  }
3846  }
3847 
3848  /* "PyClical.pyx":120
3849  * del self.instance
3850  *
3851  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3852  * """
3853  * Compare two objects of class index_set.
3854  */
3855 
3856  /* function exit code */
3857  __pyx_L1_error:;
3858  __Pyx_XDECREF(__pyx_t_4);
3859  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3860  __pyx_r = NULL;
3861  __pyx_L0:;
3862  __Pyx_XDECREF(__pyx_v_eq);
3863  __Pyx_XDECREF(__pyx_v_lt);
3864  __Pyx_XGIVEREF(__pyx_r);
3865  __Pyx_RefNannyFinishContext();
3866  return __pyx_r;
3867 }
3868 
3869 /* "PyClical.pyx":177
3870  * return NotImplemented
3871  *
3872  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3873  * """
3874  * Set the value of an index_set object at index idx to value val.
3875  */
3876 
3877 /* Python wrapper */
3878 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3879 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 ";
3880 #if CYTHON_COMPILING_IN_CPYTHON
3881 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3882 #endif
3883 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3884  int __pyx_r;
3885  __Pyx_RefNannyDeclarations
3886  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3887  __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));
3888 
3889  /* function exit code */
3890  __Pyx_RefNannyFinishContext();
3891  return __pyx_r;
3892 }
3893 
3894 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) {
3895  int __pyx_r;
3896  __Pyx_RefNannyDeclarations
3897  int __pyx_t_1;
3898  int __pyx_t_2;
3899  __Pyx_RefNannySetupContext("__setitem__", 0);
3900 
3901  /* "PyClical.pyx":186
3902  * {2}
3903  * """
3904  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3905  * return
3906  *
3907  */
3908  __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)
3909  __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)
3910  try {
3911  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3912  } catch(...) {
3913  __Pyx_CppExn2PyErr();
3914  __PYX_ERR(0, 186, __pyx_L1_error)
3915  }
3916 
3917  /* "PyClical.pyx":187
3918  * """
3919  * self.instance.set(idx, val)
3920  * return # <<<<<<<<<<<<<<
3921  *
3922  * def __getitem__(self, idx):
3923  */
3924  __pyx_r = 0;
3925  goto __pyx_L0;
3926 
3927  /* "PyClical.pyx":177
3928  * return NotImplemented
3929  *
3930  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3931  * """
3932  * Set the value of an index_set object at index idx to value val.
3933  */
3934 
3935  /* function exit code */
3936  __pyx_L1_error:;
3937  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3938  __pyx_r = -1;
3939  __pyx_L0:;
3940  __Pyx_RefNannyFinishContext();
3941  return __pyx_r;
3942 }
3943 
3944 /* "PyClical.pyx":189
3945  * return
3946  *
3947  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3948  * """
3949  * Get the value of an index_set object at an index.
3950  */
3951 
3952 /* Python wrapper */
3953 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3954 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 ";
3955 #if CYTHON_COMPILING_IN_CPYTHON
3956 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3957 #endif
3958 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3959  PyObject *__pyx_r = 0;
3960  __Pyx_RefNannyDeclarations
3961  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
3962  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3963 
3964  /* function exit code */
3965  __Pyx_RefNannyFinishContext();
3966  return __pyx_r;
3967 }
3968 
3969 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3970  PyObject *__pyx_r = NULL;
3971  __Pyx_RefNannyDeclarations
3972  int __pyx_t_1;
3973  PyObject *__pyx_t_2 = NULL;
3974  __Pyx_RefNannySetupContext("__getitem__", 0);
3975 
3976  /* "PyClical.pyx":206
3977  * False
3978  * """
3979  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3980  *
3981  * def __contains__(self, idx):
3982  */
3983  __Pyx_XDECREF(__pyx_r);
3984  __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)
3985  __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)
3986  __Pyx_GOTREF(__pyx_t_2);
3987  __pyx_r = __pyx_t_2;
3988  __pyx_t_2 = 0;
3989  goto __pyx_L0;
3990 
3991  /* "PyClical.pyx":189
3992  * return
3993  *
3994  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3995  * """
3996  * Get the value of an index_set object at an index.
3997  */
3998 
3999  /* function exit code */
4000  __pyx_L1_error:;
4001  __Pyx_XDECREF(__pyx_t_2);
4002  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4003  __pyx_r = NULL;
4004  __pyx_L0:;
4005  __Pyx_XGIVEREF(__pyx_r);
4006  __Pyx_RefNannyFinishContext();
4007  return __pyx_r;
4008 }
4009 
4010 /* "PyClical.pyx":208
4011  * return self.instance.getitem(idx)
4012  *
4013  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4014  * """
4015  * Check that an index_set object contains the index idx: idx in self.
4016  */
4017 
4018 /* Python wrapper */
4019 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4020 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 ";
4021 #if CYTHON_COMPILING_IN_CPYTHON
4022 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4023 #endif
4024 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4025  int __pyx_r;
4026  __Pyx_RefNannyDeclarations
4027  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4028  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4029 
4030  /* function exit code */
4031  __Pyx_RefNannyFinishContext();
4032  return __pyx_r;
4033 }
4034 
4035 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4036  int __pyx_r;
4037  __Pyx_RefNannyDeclarations
4038  int __pyx_t_1;
4039  __Pyx_RefNannySetupContext("__contains__", 0);
4040 
4041  /* "PyClical.pyx":225
4042  * False
4043  * """
4044  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4045  *
4046  * def __iter__(self):
4047  */
4048  __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)
4049  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4050  goto __pyx_L0;
4051 
4052  /* "PyClical.pyx":208
4053  * return self.instance.getitem(idx)
4054  *
4055  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4056  * """
4057  * Check that an index_set object contains the index idx: idx in self.
4058  */
4059 
4060  /* function exit code */
4061  __pyx_L1_error:;
4062  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4063  __pyx_r = -1;
4064  __pyx_L0:;
4065  __Pyx_RefNannyFinishContext();
4066  return __pyx_r;
4067 }
4068 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4069 
4070 /* "PyClical.pyx":227
4071  * return self.instance.getitem(idx)
4072  *
4073  * def __iter__(self): # <<<<<<<<<<<<<<
4074  * """
4075  * Iterate over the indices of an index_set.
4076  */
4077 
4078 /* Python wrapper */
4079 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4080 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 ";
4081 #if CYTHON_COMPILING_IN_CPYTHON
4082 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4083 #endif
4084 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4085  PyObject *__pyx_r = 0;
4086  __Pyx_RefNannyDeclarations
4087  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4088  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4089 
4090  /* function exit code */
4091  __Pyx_RefNannyFinishContext();
4092  return __pyx_r;
4093 }
4094 
4095 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4096  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4097  PyObject *__pyx_r = NULL;
4098  __Pyx_RefNannyDeclarations
4099  __Pyx_RefNannySetupContext("__iter__", 0);
4100  __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);
4101  if (unlikely(!__pyx_cur_scope)) {
4102  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4103  __Pyx_INCREF(Py_None);
4104  __PYX_ERR(0, 227, __pyx_L1_error)
4105  } else {
4106  __Pyx_GOTREF(__pyx_cur_scope);
4107  }
4108  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4109  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4110  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4111  {
4112  __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)
4113  __Pyx_DECREF(__pyx_cur_scope);
4114  __Pyx_RefNannyFinishContext();
4115  return (PyObject *) gen;
4116  }
4117 
4118  /* function exit code */
4119  __pyx_L1_error:;
4120  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4121  __pyx_r = NULL;
4122  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4123  __Pyx_XGIVEREF(__pyx_r);
4124  __Pyx_RefNannyFinishContext();
4125  return __pyx_r;
4126 }
4127 
4128 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4129 {
4130  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4131  PyObject *__pyx_r = NULL;
4132  PyObject *__pyx_t_1 = NULL;
4133  PyObject *__pyx_t_2 = NULL;
4134  PyObject *__pyx_t_3 = NULL;
4135  PyObject *__pyx_t_4 = NULL;
4136  Py_ssize_t __pyx_t_5;
4137  PyObject *(*__pyx_t_6)(PyObject *);
4138  int __pyx_t_7;
4139  int __pyx_t_8;
4140  __Pyx_RefNannyDeclarations
4141  __Pyx_RefNannySetupContext("__iter__", 0);
4142  switch (__pyx_generator->resume_label) {
4143  case 0: goto __pyx_L3_first_run;
4144  case 1: goto __pyx_L7_resume_from_yield;
4145  default: /* CPython raises the right error here */
4146  __Pyx_RefNannyFinishContext();
4147  return NULL;
4148  }
4149  __pyx_L3_first_run:;
4150  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4151 
4152  /* "PyClical.pyx":234
4153  * -3 4 7
4154  * """
4155  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4156  * if idx in self:
4157  * yield idx
4158  */
4159  __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)
4160  __Pyx_GOTREF(__pyx_t_2);
4161  __pyx_t_3 = NULL;
4162  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4163  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4164  if (likely(__pyx_t_3)) {
4165  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4166  __Pyx_INCREF(__pyx_t_3);
4167  __Pyx_INCREF(function);
4168  __Pyx_DECREF_SET(__pyx_t_2, function);
4169  }
4170  }
4171  if (__pyx_t_3) {
4172  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4173  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4174  } else {
4175  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4176  }
4177  __Pyx_GOTREF(__pyx_t_1);
4178  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4179  __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)
4180  __Pyx_GOTREF(__pyx_t_3);
4181  __pyx_t_4 = NULL;
4182  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4183  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4184  if (likely(__pyx_t_4)) {
4185  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4186  __Pyx_INCREF(__pyx_t_4);
4187  __Pyx_INCREF(function);
4188  __Pyx_DECREF_SET(__pyx_t_3, function);
4189  }
4190  }
4191  if (__pyx_t_4) {
4192  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4193  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4194  } else {
4195  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4196  }
4197  __Pyx_GOTREF(__pyx_t_2);
4198  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4199  __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)
4200  __Pyx_GOTREF(__pyx_t_3);
4201  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4202  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4203  __Pyx_GOTREF(__pyx_t_2);
4204  __Pyx_GIVEREF(__pyx_t_1);
4205  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4206  __Pyx_GIVEREF(__pyx_t_3);
4207  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4208  __pyx_t_1 = 0;
4209  __pyx_t_3 = 0;
4210  __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)
4211  __Pyx_GOTREF(__pyx_t_3);
4212  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4213  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4214  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4215  __pyx_t_6 = NULL;
4216  } else {
4217  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4218  __Pyx_GOTREF(__pyx_t_2);
4219  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4220  }
4221  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4222  for (;;) {
4223  if (likely(!__pyx_t_6)) {
4224  if (likely(PyList_CheckExact(__pyx_t_2))) {
4225  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4226  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4227  __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)
4228  #else
4229  __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)
4230  __Pyx_GOTREF(__pyx_t_3);
4231  #endif
4232  } else {
4233  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4234  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4235  __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)
4236  #else
4237  __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)
4238  __Pyx_GOTREF(__pyx_t_3);
4239  #endif
4240  }
4241  } else {
4242  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4243  if (unlikely(!__pyx_t_3)) {
4244  PyObject* exc_type = PyErr_Occurred();
4245  if (exc_type) {
4246  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4247  else __PYX_ERR(0, 234, __pyx_L1_error)
4248  }
4249  break;
4250  }
4251  __Pyx_GOTREF(__pyx_t_3);
4252  }
4253  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4254  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4255  __Pyx_GIVEREF(__pyx_t_3);
4256  __pyx_t_3 = 0;
4257 
4258  /* "PyClical.pyx":235
4259  * """
4260  * for idx in range(self.min(), self.max()+1):
4261  * if idx in self: # <<<<<<<<<<<<<<
4262  * yield idx
4263  *
4264  */
4265  __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)
4266  __pyx_t_8 = (__pyx_t_7 != 0);
4267  if (__pyx_t_8) {
4268 
4269  /* "PyClical.pyx":236
4270  * for idx in range(self.min(), self.max()+1):
4271  * if idx in self:
4272  * yield idx # <<<<<<<<<<<<<<
4273  *
4274  * def __invert__(self):
4275  */
4276  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4277  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4278  __Pyx_XGIVEREF(__pyx_t_2);
4279  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4280  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4281  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4282  __Pyx_XGIVEREF(__pyx_r);
4283  __Pyx_RefNannyFinishContext();
4284  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4285  /* return from generator, yielding value */
4286  __pyx_generator->resume_label = 1;
4287  return __pyx_r;
4288  __pyx_L7_resume_from_yield:;
4289  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4290  __pyx_cur_scope->__pyx_t_0 = 0;
4291  __Pyx_XGOTREF(__pyx_t_2);
4292  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4293  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4294  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4295 
4296  /* "PyClical.pyx":235
4297  * """
4298  * for idx in range(self.min(), self.max()+1):
4299  * if idx in self: # <<<<<<<<<<<<<<
4300  * yield idx
4301  *
4302  */
4303  }
4304 
4305  /* "PyClical.pyx":234
4306  * -3 4 7
4307  * """
4308  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4309  * if idx in self:
4310  * yield idx
4311  */
4312  }
4313  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4314  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4315 
4316  /* "PyClical.pyx":227
4317  * return self.instance.getitem(idx)
4318  *
4319  * def __iter__(self): # <<<<<<<<<<<<<<
4320  * """
4321  * Iterate over the indices of an index_set.
4322  */
4323 
4324  /* function exit code */
4325  PyErr_SetNone(PyExc_StopIteration);
4326  goto __pyx_L0;
4327  __pyx_L1_error:;
4328  __Pyx_XDECREF(__pyx_t_1);
4329  __Pyx_XDECREF(__pyx_t_2);
4330  __Pyx_XDECREF(__pyx_t_3);
4331  __Pyx_XDECREF(__pyx_t_4);
4332  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4333  __pyx_L0:;
4334  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4335  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4336  __pyx_generator->resume_label = -1;
4337  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4338  __Pyx_RefNannyFinishContext();
4339  return __pyx_r;
4340 }
4341 
4342 /* "PyClical.pyx":238
4343  * yield idx
4344  *
4345  * def __invert__(self): # <<<<<<<<<<<<<<
4346  * """
4347  * Set complement: not.
4348  */
4349 
4350 /* Python wrapper */
4351 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4352 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 ";
4353 #if CYTHON_COMPILING_IN_CPYTHON
4354 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4355 #endif
4356 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4357  PyObject *__pyx_r = 0;
4358  __Pyx_RefNannyDeclarations
4359  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4360  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4361 
4362  /* function exit code */
4363  __Pyx_RefNannyFinishContext();
4364  return __pyx_r;
4365 }
4366 
4367 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4368  PyObject *__pyx_r = NULL;
4369  __Pyx_RefNannyDeclarations
4370  PyObject *__pyx_t_1 = NULL;
4371  PyObject *__pyx_t_2 = NULL;
4372  __Pyx_RefNannySetupContext("__invert__", 0);
4373 
4374  /* "PyClical.pyx":245
4375  * {-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}
4376  * """
4377  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4378  *
4379  * def __xor__(lhs, rhs):
4380  */
4381  __Pyx_XDECREF(__pyx_r);
4382  __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)
4383  __Pyx_GOTREF(__pyx_t_1);
4384  __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)
4385  __Pyx_GOTREF(__pyx_t_2);
4386  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4387  __pyx_r = __pyx_t_2;
4388  __pyx_t_2 = 0;
4389  goto __pyx_L0;
4390 
4391  /* "PyClical.pyx":238
4392  * yield idx
4393  *
4394  * def __invert__(self): # <<<<<<<<<<<<<<
4395  * """
4396  * Set complement: not.
4397  */
4398 
4399  /* function exit code */
4400  __pyx_L1_error:;
4401  __Pyx_XDECREF(__pyx_t_1);
4402  __Pyx_XDECREF(__pyx_t_2);
4403  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4404  __pyx_r = NULL;
4405  __pyx_L0:;
4406  __Pyx_XGIVEREF(__pyx_r);
4407  __Pyx_RefNannyFinishContext();
4408  return __pyx_r;
4409 }
4410 
4411 /* "PyClical.pyx":247
4412  * return index_set().wrap( self.instance.invert() )
4413  *
4414  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4415  * """
4416  * Symmetric set difference: exclusive or.
4417  */
4418 
4419 /* Python wrapper */
4420 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4421 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 ";
4422 #if CYTHON_COMPILING_IN_CPYTHON
4423 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4424 #endif
4425 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4426  PyObject *__pyx_r = 0;
4427  __Pyx_RefNannyDeclarations
4428  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4429  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4430 
4431  /* function exit code */
4432  __Pyx_RefNannyFinishContext();
4433  return __pyx_r;
4434 }
4435 
4436 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4437  PyObject *__pyx_r = NULL;
4438  __Pyx_RefNannyDeclarations
4439  PyObject *__pyx_t_1 = NULL;
4440  PyObject *__pyx_t_2 = NULL;
4441  __Pyx_RefNannySetupContext("__xor__", 0);
4442 
4443  /* "PyClical.pyx":256
4444  * {1}
4445  * """
4446  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4447  *
4448  * def __ixor__(self, rhs):
4449  */
4450  __Pyx_XDECREF(__pyx_r);
4451  __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)
4452  __Pyx_GOTREF(__pyx_t_1);
4453  __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)
4454  __Pyx_GOTREF(__pyx_t_2);
4455  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4456  __pyx_r = __pyx_t_2;
4457  __pyx_t_2 = 0;
4458  goto __pyx_L0;
4459 
4460  /* "PyClical.pyx":247
4461  * return index_set().wrap( self.instance.invert() )
4462  *
4463  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4464  * """
4465  * Symmetric set difference: exclusive or.
4466  */
4467 
4468  /* function exit code */
4469  __pyx_L1_error:;
4470  __Pyx_XDECREF(__pyx_t_1);
4471  __Pyx_XDECREF(__pyx_t_2);
4472  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4473  __pyx_r = NULL;
4474  __pyx_L0:;
4475  __Pyx_XGIVEREF(__pyx_r);
4476  __Pyx_RefNannyFinishContext();
4477  return __pyx_r;
4478 }
4479 
4480 /* "PyClical.pyx":258
4481  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4482  *
4483  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4484  * """
4485  * Symmetric set difference: exclusive or.
4486  */
4487 
4488 /* Python wrapper */
4489 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4490 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 ";
4491 #if CYTHON_COMPILING_IN_CPYTHON
4492 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4493 #endif
4494 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4495  PyObject *__pyx_r = 0;
4496  __Pyx_RefNannyDeclarations
4497  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4498  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4499 
4500  /* function exit code */
4501  __Pyx_RefNannyFinishContext();
4502  return __pyx_r;
4503 }
4504 
4505 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4506  PyObject *__pyx_r = NULL;
4507  __Pyx_RefNannyDeclarations
4508  PyObject *__pyx_t_1 = NULL;
4509  __Pyx_RefNannySetupContext("__ixor__", 0);
4510 
4511  /* "PyClical.pyx":267
4512  * {1}
4513  * """
4514  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4515  *
4516  * def __and__(lhs, rhs):
4517  */
4518  __Pyx_XDECREF(__pyx_r);
4519  __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)
4520  __Pyx_GOTREF(__pyx_t_1);
4521  __pyx_r = __pyx_t_1;
4522  __pyx_t_1 = 0;
4523  goto __pyx_L0;
4524 
4525  /* "PyClical.pyx":258
4526  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4527  *
4528  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4529  * """
4530  * Symmetric set difference: exclusive or.
4531  */
4532 
4533  /* function exit code */
4534  __pyx_L1_error:;
4535  __Pyx_XDECREF(__pyx_t_1);
4536  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4537  __pyx_r = NULL;
4538  __pyx_L0:;
4539  __Pyx_XGIVEREF(__pyx_r);
4540  __Pyx_RefNannyFinishContext();
4541  return __pyx_r;
4542 }
4543 
4544 /* "PyClical.pyx":269
4545  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4546  *
4547  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4548  * """
4549  * Set intersection: and.
4550  */
4551 
4552 /* Python wrapper */
4553 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4554 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 ";
4555 #if CYTHON_COMPILING_IN_CPYTHON
4556 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4557 #endif
4558 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4559  PyObject *__pyx_r = 0;
4560  __Pyx_RefNannyDeclarations
4561  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4562  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4563 
4564  /* function exit code */
4565  __Pyx_RefNannyFinishContext();
4566  return __pyx_r;
4567 }
4568 
4569 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4570  PyObject *__pyx_r = NULL;
4571  __Pyx_RefNannyDeclarations
4572  PyObject *__pyx_t_1 = NULL;
4573  PyObject *__pyx_t_2 = NULL;
4574  __Pyx_RefNannySetupContext("__and__", 0);
4575 
4576  /* "PyClical.pyx":278
4577  * {2}
4578  * """
4579  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4580  *
4581  * def __iand__(self, rhs):
4582  */
4583  __Pyx_XDECREF(__pyx_r);
4584  __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)
4585  __Pyx_GOTREF(__pyx_t_1);
4586  __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)
4587  __Pyx_GOTREF(__pyx_t_2);
4588  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4589  __pyx_r = __pyx_t_2;
4590  __pyx_t_2 = 0;
4591  goto __pyx_L0;
4592 
4593  /* "PyClical.pyx":269
4594  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4595  *
4596  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4597  * """
4598  * Set intersection: and.
4599  */
4600 
4601  /* function exit code */
4602  __pyx_L1_error:;
4603  __Pyx_XDECREF(__pyx_t_1);
4604  __Pyx_XDECREF(__pyx_t_2);
4605  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4606  __pyx_r = NULL;
4607  __pyx_L0:;
4608  __Pyx_XGIVEREF(__pyx_r);
4609  __Pyx_RefNannyFinishContext();
4610  return __pyx_r;
4611 }
4612 
4613 /* "PyClical.pyx":280
4614  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4615  *
4616  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4617  * """
4618  * Set intersection: and.
4619  */
4620 
4621 /* Python wrapper */
4622 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4623 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 ";
4624 #if CYTHON_COMPILING_IN_CPYTHON
4625 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4626 #endif
4627 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4628  PyObject *__pyx_r = 0;
4629  __Pyx_RefNannyDeclarations
4630  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4631  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4632 
4633  /* function exit code */
4634  __Pyx_RefNannyFinishContext();
4635  return __pyx_r;
4636 }
4637 
4638 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4639  PyObject *__pyx_r = NULL;
4640  __Pyx_RefNannyDeclarations
4641  PyObject *__pyx_t_1 = NULL;
4642  __Pyx_RefNannySetupContext("__iand__", 0);
4643 
4644  /* "PyClical.pyx":289
4645  * {2}
4646  * """
4647  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4648  *
4649  * def __or__(lhs, rhs):
4650  */
4651  __Pyx_XDECREF(__pyx_r);
4652  __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)
4653  __Pyx_GOTREF(__pyx_t_1);
4654  __pyx_r = __pyx_t_1;
4655  __pyx_t_1 = 0;
4656  goto __pyx_L0;
4657 
4658  /* "PyClical.pyx":280
4659  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4660  *
4661  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4662  * """
4663  * Set intersection: and.
4664  */
4665 
4666  /* function exit code */
4667  __pyx_L1_error:;
4668  __Pyx_XDECREF(__pyx_t_1);
4669  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4670  __pyx_r = NULL;
4671  __pyx_L0:;
4672  __Pyx_XGIVEREF(__pyx_r);
4673  __Pyx_RefNannyFinishContext();
4674  return __pyx_r;
4675 }
4676 
4677 /* "PyClical.pyx":291
4678  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4679  *
4680  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4681  * """
4682  * Set union: or.
4683  */
4684 
4685 /* Python wrapper */
4686 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4687 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 ";
4688 #if CYTHON_COMPILING_IN_CPYTHON
4689 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4690 #endif
4691 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4692  PyObject *__pyx_r = 0;
4693  __Pyx_RefNannyDeclarations
4694  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4695  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4696 
4697  /* function exit code */
4698  __Pyx_RefNannyFinishContext();
4699  return __pyx_r;
4700 }
4701 
4702 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4703  PyObject *__pyx_r = NULL;
4704  __Pyx_RefNannyDeclarations
4705  PyObject *__pyx_t_1 = NULL;
4706  PyObject *__pyx_t_2 = NULL;
4707  __Pyx_RefNannySetupContext("__or__", 0);
4708 
4709  /* "PyClical.pyx":300
4710  * {1,2}
4711  * """
4712  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4713  *
4714  * def __ior__(self, rhs):
4715  */
4716  __Pyx_XDECREF(__pyx_r);
4717  __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)
4718  __Pyx_GOTREF(__pyx_t_1);
4719  __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)
4720  __Pyx_GOTREF(__pyx_t_2);
4721  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4722  __pyx_r = __pyx_t_2;
4723  __pyx_t_2 = 0;
4724  goto __pyx_L0;
4725 
4726  /* "PyClical.pyx":291
4727  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4728  *
4729  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4730  * """
4731  * Set union: or.
4732  */
4733 
4734  /* function exit code */
4735  __pyx_L1_error:;
4736  __Pyx_XDECREF(__pyx_t_1);
4737  __Pyx_XDECREF(__pyx_t_2);
4738  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4739  __pyx_r = NULL;
4740  __pyx_L0:;
4741  __Pyx_XGIVEREF(__pyx_r);
4742  __Pyx_RefNannyFinishContext();
4743  return __pyx_r;
4744 }
4745 
4746 /* "PyClical.pyx":302
4747  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4748  *
4749  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4750  * """
4751  * Set union: or.
4752  */
4753 
4754 /* Python wrapper */
4755 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4756 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 ";
4757 #if CYTHON_COMPILING_IN_CPYTHON
4758 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4759 #endif
4760 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4761  PyObject *__pyx_r = 0;
4762  __Pyx_RefNannyDeclarations
4763  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4764  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4765 
4766  /* function exit code */
4767  __Pyx_RefNannyFinishContext();
4768  return __pyx_r;
4769 }
4770 
4771 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4772  PyObject *__pyx_r = NULL;
4773  __Pyx_RefNannyDeclarations
4774  PyObject *__pyx_t_1 = NULL;
4775  __Pyx_RefNannySetupContext("__ior__", 0);
4776 
4777  /* "PyClical.pyx":311
4778  * {1,2}
4779  * """
4780  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4781  *
4782  * def count(self):
4783  */
4784  __Pyx_XDECREF(__pyx_r);
4785  __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)
4786  __Pyx_GOTREF(__pyx_t_1);
4787  __pyx_r = __pyx_t_1;
4788  __pyx_t_1 = 0;
4789  goto __pyx_L0;
4790 
4791  /* "PyClical.pyx":302
4792  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4793  *
4794  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4795  * """
4796  * Set union: or.
4797  */
4798 
4799  /* function exit code */
4800  __pyx_L1_error:;
4801  __Pyx_XDECREF(__pyx_t_1);
4802  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4803  __pyx_r = NULL;
4804  __pyx_L0:;
4805  __Pyx_XGIVEREF(__pyx_r);
4806  __Pyx_RefNannyFinishContext();
4807  return __pyx_r;
4808 }
4809 
4810 /* "PyClical.pyx":313
4811  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4812  *
4813  * def count(self): # <<<<<<<<<<<<<<
4814  * """
4815  * Cardinality: Number of indices included in set.
4816  */
4817 
4818 /* Python wrapper */
4819 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4820 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 ";
4821 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4822  PyObject *__pyx_r = 0;
4823  __Pyx_RefNannyDeclarations
4824  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4825  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4826 
4827  /* function exit code */
4828  __Pyx_RefNannyFinishContext();
4829  return __pyx_r;
4830 }
4831 
4832 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4833  PyObject *__pyx_r = NULL;
4834  __Pyx_RefNannyDeclarations
4835  PyObject *__pyx_t_1 = NULL;
4836  __Pyx_RefNannySetupContext("count", 0);
4837 
4838  /* "PyClical.pyx":320
4839  * 3
4840  * """
4841  * return self.instance.count() # <<<<<<<<<<<<<<
4842  *
4843  * def count_neg(self):
4844  */
4845  __Pyx_XDECREF(__pyx_r);
4846  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4847  __Pyx_GOTREF(__pyx_t_1);
4848  __pyx_r = __pyx_t_1;
4849  __pyx_t_1 = 0;
4850  goto __pyx_L0;
4851 
4852  /* "PyClical.pyx":313
4853  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4854  *
4855  * def count(self): # <<<<<<<<<<<<<<
4856  * """
4857  * Cardinality: Number of indices included in set.
4858  */
4859 
4860  /* function exit code */
4861  __pyx_L1_error:;
4862  __Pyx_XDECREF(__pyx_t_1);
4863  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4864  __pyx_r = NULL;
4865  __pyx_L0:;
4866  __Pyx_XGIVEREF(__pyx_r);
4867  __Pyx_RefNannyFinishContext();
4868  return __pyx_r;
4869 }
4870 
4871 /* "PyClical.pyx":322
4872  * return self.instance.count()
4873  *
4874  * def count_neg(self): # <<<<<<<<<<<<<<
4875  * """
4876  * Number of negative indices included in set.
4877  */
4878 
4879 /* Python wrapper */
4880 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4881 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 ";
4882 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4883  PyObject *__pyx_r = 0;
4884  __Pyx_RefNannyDeclarations
4885  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4886  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4887 
4888  /* function exit code */
4889  __Pyx_RefNannyFinishContext();
4890  return __pyx_r;
4891 }
4892 
4893 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4894  PyObject *__pyx_r = NULL;
4895  __Pyx_RefNannyDeclarations
4896  PyObject *__pyx_t_1 = NULL;
4897  __Pyx_RefNannySetupContext("count_neg", 0);
4898 
4899  /* "PyClical.pyx":329
4900  * 1
4901  * """
4902  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4903  *
4904  * def count_pos(self):
4905  */
4906  __Pyx_XDECREF(__pyx_r);
4907  __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)
4908  __Pyx_GOTREF(__pyx_t_1);
4909  __pyx_r = __pyx_t_1;
4910  __pyx_t_1 = 0;
4911  goto __pyx_L0;
4912 
4913  /* "PyClical.pyx":322
4914  * return self.instance.count()
4915  *
4916  * def count_neg(self): # <<<<<<<<<<<<<<
4917  * """
4918  * Number of negative indices included in set.
4919  */
4920 
4921  /* function exit code */
4922  __pyx_L1_error:;
4923  __Pyx_XDECREF(__pyx_t_1);
4924  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4925  __pyx_r = NULL;
4926  __pyx_L0:;
4927  __Pyx_XGIVEREF(__pyx_r);
4928  __Pyx_RefNannyFinishContext();
4929  return __pyx_r;
4930 }
4931 
4932 /* "PyClical.pyx":331
4933  * return self.instance.count_neg()
4934  *
4935  * def count_pos(self): # <<<<<<<<<<<<<<
4936  * """
4937  * Number of positive indices included in set.
4938  */
4939 
4940 /* Python wrapper */
4941 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4942 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 ";
4943 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4944  PyObject *__pyx_r = 0;
4945  __Pyx_RefNannyDeclarations
4946  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
4947  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4948 
4949  /* function exit code */
4950  __Pyx_RefNannyFinishContext();
4951  return __pyx_r;
4952 }
4953 
4954 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4955  PyObject *__pyx_r = NULL;
4956  __Pyx_RefNannyDeclarations
4957  PyObject *__pyx_t_1 = NULL;
4958  __Pyx_RefNannySetupContext("count_pos", 0);
4959 
4960  /* "PyClical.pyx":338
4961  * 2
4962  * """
4963  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4964  *
4965  * def min(self):
4966  */
4967  __Pyx_XDECREF(__pyx_r);
4968  __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)
4969  __Pyx_GOTREF(__pyx_t_1);
4970  __pyx_r = __pyx_t_1;
4971  __pyx_t_1 = 0;
4972  goto __pyx_L0;
4973 
4974  /* "PyClical.pyx":331
4975  * return self.instance.count_neg()
4976  *
4977  * def count_pos(self): # <<<<<<<<<<<<<<
4978  * """
4979  * Number of positive indices included in set.
4980  */
4981 
4982  /* function exit code */
4983  __pyx_L1_error:;
4984  __Pyx_XDECREF(__pyx_t_1);
4985  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4986  __pyx_r = NULL;
4987  __pyx_L0:;
4988  __Pyx_XGIVEREF(__pyx_r);
4989  __Pyx_RefNannyFinishContext();
4990  return __pyx_r;
4991 }
4992 
4993 /* "PyClical.pyx":340
4994  * return self.instance.count_pos()
4995  *
4996  * def min(self): # <<<<<<<<<<<<<<
4997  * """
4998  * Minimum member.
4999  */
5000 
5001 /* Python wrapper */
5002 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5003 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5004 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5005  PyObject *__pyx_r = 0;
5006  __Pyx_RefNannyDeclarations
5007  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5008  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5009 
5010  /* function exit code */
5011  __Pyx_RefNannyFinishContext();
5012  return __pyx_r;
5013 }
5014 
5015 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5016  PyObject *__pyx_r = NULL;
5017  __Pyx_RefNannyDeclarations
5018  PyObject *__pyx_t_1 = NULL;
5019  __Pyx_RefNannySetupContext("min", 0);
5020 
5021  /* "PyClical.pyx":347
5022  * -1
5023  * """
5024  * return self.instance.min() # <<<<<<<<<<<<<<
5025  *
5026  * def max(self):
5027  */
5028  __Pyx_XDECREF(__pyx_r);
5029  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5030  __Pyx_GOTREF(__pyx_t_1);
5031  __pyx_r = __pyx_t_1;
5032  __pyx_t_1 = 0;
5033  goto __pyx_L0;
5034 
5035  /* "PyClical.pyx":340
5036  * return self.instance.count_pos()
5037  *
5038  * def min(self): # <<<<<<<<<<<<<<
5039  * """
5040  * Minimum member.
5041  */
5042 
5043  /* function exit code */
5044  __pyx_L1_error:;
5045  __Pyx_XDECREF(__pyx_t_1);
5046  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5047  __pyx_r = NULL;
5048  __pyx_L0:;
5049  __Pyx_XGIVEREF(__pyx_r);
5050  __Pyx_RefNannyFinishContext();
5051  return __pyx_r;
5052 }
5053 
5054 /* "PyClical.pyx":349
5055  * return self.instance.min()
5056  *
5057  * def max(self): # <<<<<<<<<<<<<<
5058  * """
5059  * Maximum member.
5060  */
5061 
5062 /* Python wrapper */
5063 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5064 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5065 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5066  PyObject *__pyx_r = 0;
5067  __Pyx_RefNannyDeclarations
5068  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5069  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5070 
5071  /* function exit code */
5072  __Pyx_RefNannyFinishContext();
5073  return __pyx_r;
5074 }
5075 
5076 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5077  PyObject *__pyx_r = NULL;
5078  __Pyx_RefNannyDeclarations
5079  PyObject *__pyx_t_1 = NULL;
5080  __Pyx_RefNannySetupContext("max", 0);
5081 
5082  /* "PyClical.pyx":356
5083  * 2
5084  * """
5085  * return self.instance.max() # <<<<<<<<<<<<<<
5086  *
5087  * def hash_fn(self):
5088  */
5089  __Pyx_XDECREF(__pyx_r);
5090  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5091  __Pyx_GOTREF(__pyx_t_1);
5092  __pyx_r = __pyx_t_1;
5093  __pyx_t_1 = 0;
5094  goto __pyx_L0;
5095 
5096  /* "PyClical.pyx":349
5097  * return self.instance.min()
5098  *
5099  * def max(self): # <<<<<<<<<<<<<<
5100  * """
5101  * Maximum member.
5102  */
5103 
5104  /* function exit code */
5105  __pyx_L1_error:;
5106  __Pyx_XDECREF(__pyx_t_1);
5107  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5108  __pyx_r = NULL;
5109  __pyx_L0:;
5110  __Pyx_XGIVEREF(__pyx_r);
5111  __Pyx_RefNannyFinishContext();
5112  return __pyx_r;
5113 }
5114 
5115 /* "PyClical.pyx":358
5116  * return self.instance.max()
5117  *
5118  * def hash_fn(self): # <<<<<<<<<<<<<<
5119  * """
5120  * Hash function.
5121  */
5122 
5123 /* Python wrapper */
5124 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5125 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5126 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5127  PyObject *__pyx_r = 0;
5128  __Pyx_RefNannyDeclarations
5129  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5130  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5131 
5132  /* function exit code */
5133  __Pyx_RefNannyFinishContext();
5134  return __pyx_r;
5135 }
5136 
5137 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5138  PyObject *__pyx_r = NULL;
5139  __Pyx_RefNannyDeclarations
5140  PyObject *__pyx_t_1 = NULL;
5141  __Pyx_RefNannySetupContext("hash_fn", 0);
5142 
5143  /* "PyClical.pyx":362
5144  * Hash function.
5145  * """
5146  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5147  *
5148  * def sign_of_mult(self, rhs):
5149  */
5150  __Pyx_XDECREF(__pyx_r);
5151  __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)
5152  __Pyx_GOTREF(__pyx_t_1);
5153  __pyx_r = __pyx_t_1;
5154  __pyx_t_1 = 0;
5155  goto __pyx_L0;
5156 
5157  /* "PyClical.pyx":358
5158  * return self.instance.max()
5159  *
5160  * def hash_fn(self): # <<<<<<<<<<<<<<
5161  * """
5162  * Hash function.
5163  */
5164 
5165  /* function exit code */
5166  __pyx_L1_error:;
5167  __Pyx_XDECREF(__pyx_t_1);
5168  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5169  __pyx_r = NULL;
5170  __pyx_L0:;
5171  __Pyx_XGIVEREF(__pyx_r);
5172  __Pyx_RefNannyFinishContext();
5173  return __pyx_r;
5174 }
5175 
5176 /* "PyClical.pyx":364
5177  * return self.instance.hash_fn()
5178  *
5179  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5180  * """
5181  * Sign of geometric product of two Clifford basis elements.
5182  */
5183 
5184 /* Python wrapper */
5185 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5186 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 ";
5187 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5188  PyObject *__pyx_r = 0;
5189  __Pyx_RefNannyDeclarations
5190  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5191  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5192 
5193  /* function exit code */
5194  __Pyx_RefNannyFinishContext();
5195  return __pyx_r;
5196 }
5197 
5198 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5199  PyObject *__pyx_r = NULL;
5200  __Pyx_RefNannyDeclarations
5201  PyObject *__pyx_t_1 = NULL;
5202  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5203 
5204  /* "PyClical.pyx":371
5205  * 1
5206  * """
5207  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5208  *
5209  * def sign_of_square(self):
5210  */
5211  __Pyx_XDECREF(__pyx_r);
5212  __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)
5213  __Pyx_GOTREF(__pyx_t_1);
5214  __pyx_r = __pyx_t_1;
5215  __pyx_t_1 = 0;
5216  goto __pyx_L0;
5217 
5218  /* "PyClical.pyx":364
5219  * return self.instance.hash_fn()
5220  *
5221  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5222  * """
5223  * Sign of geometric product of two Clifford basis elements.
5224  */
5225 
5226  /* function exit code */
5227  __pyx_L1_error:;
5228  __Pyx_XDECREF(__pyx_t_1);
5229  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5230  __pyx_r = NULL;
5231  __pyx_L0:;
5232  __Pyx_XGIVEREF(__pyx_r);
5233  __Pyx_RefNannyFinishContext();
5234  return __pyx_r;
5235 }
5236 
5237 /* "PyClical.pyx":373
5238  * return self.instance.sign_of_mult(toIndexSet(rhs))
5239  *
5240  * def sign_of_square(self): # <<<<<<<<<<<<<<
5241  * """
5242  * Sign of geometric square of a Clifford basis element.
5243  */
5244 
5245 /* Python wrapper */
5246 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5247 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 ";
5248 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5249  PyObject *__pyx_r = 0;
5250  __Pyx_RefNannyDeclarations
5251  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5252  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5253 
5254  /* function exit code */
5255  __Pyx_RefNannyFinishContext();
5256  return __pyx_r;
5257 }
5258 
5259 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5260  PyObject *__pyx_r = NULL;
5261  __Pyx_RefNannyDeclarations
5262  PyObject *__pyx_t_1 = NULL;
5263  __Pyx_RefNannySetupContext("sign_of_square", 0);
5264 
5265  /* "PyClical.pyx":380
5266  * -1
5267  * """
5268  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5269  *
5270  * def __repr__(self):
5271  */
5272  __Pyx_XDECREF(__pyx_r);
5273  __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)
5274  __Pyx_GOTREF(__pyx_t_1);
5275  __pyx_r = __pyx_t_1;
5276  __pyx_t_1 = 0;
5277  goto __pyx_L0;
5278 
5279  /* "PyClical.pyx":373
5280  * return self.instance.sign_of_mult(toIndexSet(rhs))
5281  *
5282  * def sign_of_square(self): # <<<<<<<<<<<<<<
5283  * """
5284  * Sign of geometric square of a Clifford basis element.
5285  */
5286 
5287  /* function exit code */
5288  __pyx_L1_error:;
5289  __Pyx_XDECREF(__pyx_t_1);
5290  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5291  __pyx_r = NULL;
5292  __pyx_L0:;
5293  __Pyx_XGIVEREF(__pyx_r);
5294  __Pyx_RefNannyFinishContext();
5295  return __pyx_r;
5296 }
5297 
5298 /* "PyClical.pyx":382
5299  * return self.instance.sign_of_square()
5300  *
5301  * def __repr__(self): # <<<<<<<<<<<<<<
5302  * """
5303  * The official string representation of self.
5304  */
5305 
5306 /* Python wrapper */
5307 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5308 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 ";
5309 #if CYTHON_COMPILING_IN_CPYTHON
5310 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5311 #endif
5312 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5313  PyObject *__pyx_r = 0;
5314  __Pyx_RefNannyDeclarations
5315  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5316  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5317 
5318  /* function exit code */
5319  __Pyx_RefNannyFinishContext();
5320  return __pyx_r;
5321 }
5322 
5323 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5324  PyObject *__pyx_r = NULL;
5325  __Pyx_RefNannyDeclarations
5326  PyObject *__pyx_t_1 = NULL;
5327  __Pyx_RefNannySetupContext("__repr__", 0);
5328 
5329  /* "PyClical.pyx":391
5330  * 'index_set({1,2})'
5331  * """
5332  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5333  *
5334  * def __str__(self):
5335  */
5336  __Pyx_XDECREF(__pyx_r);
5337  __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)
5338  __Pyx_GOTREF(__pyx_t_1);
5339  __pyx_r = __pyx_t_1;
5340  __pyx_t_1 = 0;
5341  goto __pyx_L0;
5342 
5343  /* "PyClical.pyx":382
5344  * return self.instance.sign_of_square()
5345  *
5346  * def __repr__(self): # <<<<<<<<<<<<<<
5347  * """
5348  * The official string representation of self.
5349  */
5350 
5351  /* function exit code */
5352  __pyx_L1_error:;
5353  __Pyx_XDECREF(__pyx_t_1);
5354  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5355  __pyx_r = NULL;
5356  __pyx_L0:;
5357  __Pyx_XGIVEREF(__pyx_r);
5358  __Pyx_RefNannyFinishContext();
5359  return __pyx_r;
5360 }
5361 
5362 /* "PyClical.pyx":393
5363  * return index_set_to_repr( self.unwrap() ).c_str()
5364  *
5365  * def __str__(self): # <<<<<<<<<<<<<<
5366  * """
5367  * The informal string representation of self.
5368  */
5369 
5370 /* Python wrapper */
5371 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5372 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 ";
5373 #if CYTHON_COMPILING_IN_CPYTHON
5374 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5375 #endif
5376 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5377  PyObject *__pyx_r = 0;
5378  __Pyx_RefNannyDeclarations
5379  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5380  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5381 
5382  /* function exit code */
5383  __Pyx_RefNannyFinishContext();
5384  return __pyx_r;
5385 }
5386 
5387 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5388  PyObject *__pyx_r = NULL;
5389  __Pyx_RefNannyDeclarations
5390  PyObject *__pyx_t_1 = NULL;
5391  __Pyx_RefNannySetupContext("__str__", 0);
5392 
5393  /* "PyClical.pyx":402
5394  * '{1,2}'
5395  * """
5396  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5397  *
5398  * def index_set_hidden_doctests():
5399  */
5400  __Pyx_XDECREF(__pyx_r);
5401  __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)
5402  __Pyx_GOTREF(__pyx_t_1);
5403  __pyx_r = __pyx_t_1;
5404  __pyx_t_1 = 0;
5405  goto __pyx_L0;
5406 
5407  /* "PyClical.pyx":393
5408  * return index_set_to_repr( self.unwrap() ).c_str()
5409  *
5410  * def __str__(self): # <<<<<<<<<<<<<<
5411  * """
5412  * The informal string representation of self.
5413  */
5414 
5415  /* function exit code */
5416  __pyx_L1_error:;
5417  __Pyx_XDECREF(__pyx_t_1);
5418  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5419  __pyx_r = NULL;
5420  __pyx_L0:;
5421  __Pyx_XGIVEREF(__pyx_r);
5422  __Pyx_RefNannyFinishContext();
5423  return __pyx_r;
5424 }
5425 
5426 /* "(tree fragment)":1
5427  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5428  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5429  * def __setstate_cython__(self, __pyx_state):
5430  */
5431 
5432 /* Python wrapper */
5433 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5434 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5435  PyObject *__pyx_r = 0;
5436  __Pyx_RefNannyDeclarations
5437  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5438  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5439 
5440  /* function exit code */
5441  __Pyx_RefNannyFinishContext();
5442  return __pyx_r;
5443 }
5444 
5445 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5446  PyObject *__pyx_r = NULL;
5447  __Pyx_RefNannyDeclarations
5448  PyObject *__pyx_t_1 = NULL;
5449  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5450 
5451  /* "(tree fragment)":2
5452  * def __reduce_cython__(self):
5453  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5454  * def __setstate_cython__(self, __pyx_state):
5455  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5456  */
5457  __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)
5458  __Pyx_GOTREF(__pyx_t_1);
5459  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5460  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5461  __PYX_ERR(1, 2, __pyx_L1_error)
5462 
5463  /* "(tree fragment)":1
5464  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5465  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5466  * def __setstate_cython__(self, __pyx_state):
5467  */
5468 
5469  /* function exit code */
5470  __pyx_L1_error:;
5471  __Pyx_XDECREF(__pyx_t_1);
5472  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5473  __pyx_r = NULL;
5474  __Pyx_XGIVEREF(__pyx_r);
5475  __Pyx_RefNannyFinishContext();
5476  return __pyx_r;
5477 }
5478 
5479 /* "(tree fragment)":3
5480  * def __reduce_cython__(self):
5481  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5482  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5483  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5484  */
5485 
5486 /* Python wrapper */
5487 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5488 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5489  PyObject *__pyx_r = 0;
5490  __Pyx_RefNannyDeclarations
5491  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5492  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5493 
5494  /* function exit code */
5495  __Pyx_RefNannyFinishContext();
5496  return __pyx_r;
5497 }
5498 
5499 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) {
5500  PyObject *__pyx_r = NULL;
5501  __Pyx_RefNannyDeclarations
5502  PyObject *__pyx_t_1 = NULL;
5503  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5504 
5505  /* "(tree fragment)":4
5506  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5507  * def __setstate_cython__(self, __pyx_state):
5508  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5509  */
5510  __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)
5511  __Pyx_GOTREF(__pyx_t_1);
5512  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5513  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5514  __PYX_ERR(1, 4, __pyx_L1_error)
5515 
5516  /* "(tree fragment)":3
5517  * def __reduce_cython__(self):
5518  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5519  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5520  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5521  */
5522 
5523  /* function exit code */
5524  __pyx_L1_error:;
5525  __Pyx_XDECREF(__pyx_t_1);
5526  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5527  __pyx_r = NULL;
5528  __Pyx_XGIVEREF(__pyx_r);
5529  __Pyx_RefNannyFinishContext();
5530  return __pyx_r;
5531 }
5532 
5533 /* "PyClical.pyx":404
5534  * return index_set_to_str( self.unwrap() ).c_str()
5535  *
5536  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5537  * """
5538  * Tests for functions that Doctest cannot see.
5539  */
5540 
5541 /* Python wrapper */
5542 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5543 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 ";
5544  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};
5545  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5546  PyObject *__pyx_r = 0;
5547  __Pyx_RefNannyDeclarations
5548  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5549  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5550 
5551  /* function exit code */
5552  __Pyx_RefNannyFinishContext();
5553  return __pyx_r;
5554  }
5555 
5556  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5557  PyObject *__pyx_r = NULL;
5558  __Pyx_RefNannyDeclarations
5559  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5560 
5561  /* "PyClical.pyx":488
5562  * False
5563  * """
5564  * return # <<<<<<<<<<<<<<
5565  *
5566  * cpdef inline compare(lhs,rhs):
5567  */
5568  __Pyx_XDECREF(__pyx_r);
5569  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5570  goto __pyx_L0;
5571 
5572  /* "PyClical.pyx":404
5573  * return index_set_to_str( self.unwrap() ).c_str()
5574  *
5575  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5576  * """
5577  * Tests for functions that Doctest cannot see.
5578  */
5579 
5580  /* function exit code */
5581  __pyx_L0:;
5582  __Pyx_XGIVEREF(__pyx_r);
5583  __Pyx_RefNannyFinishContext();
5584  return __pyx_r;
5585  }
5586 
5587  /* "PyClical.pyx":490
5588  * return
5589  *
5590  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5591  * """
5592  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5593  */
5594 
5595  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5596  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5597  PyObject *__pyx_r = NULL;
5598  __Pyx_RefNannyDeclarations
5599  PyObject *__pyx_t_1 = NULL;
5600  __Pyx_RefNannySetupContext("compare", 0);
5601 
5602  /* "PyClical.pyx":500
5603  * 1
5604  * """
5605  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5606  *
5607  * cpdef inline min_neg(obj):
5608  */
5609  __Pyx_XDECREF(__pyx_r);
5610  __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)
5611  __Pyx_GOTREF(__pyx_t_1);
5612  __pyx_r = __pyx_t_1;
5613  __pyx_t_1 = 0;
5614  goto __pyx_L0;
5615 
5616  /* "PyClical.pyx":490
5617  * return
5618  *
5619  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5620  * """
5621  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5622  */
5623 
5624  /* function exit code */
5625  __pyx_L1_error:;
5626  __Pyx_XDECREF(__pyx_t_1);
5627  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5628  __pyx_r = 0;
5629  __pyx_L0:;
5630  __Pyx_XGIVEREF(__pyx_r);
5631  __Pyx_RefNannyFinishContext();
5632  return __pyx_r;
5633  }
5634 
5635  /* Python wrapper */
5636  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5637  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 ";
5638  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5639  PyObject *__pyx_v_lhs = 0;
5640  PyObject *__pyx_v_rhs = 0;
5641  PyObject *__pyx_r = 0;
5642  __Pyx_RefNannyDeclarations
5643  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5644  {
5645  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5646  PyObject* values[2] = {0,0};
5647  if (unlikely(__pyx_kwds)) {
5648  Py_ssize_t kw_args;
5649  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5650  switch (pos_args) {
5651  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5652  CYTHON_FALLTHROUGH;
5653  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5654  CYTHON_FALLTHROUGH;
5655  case 0: break;
5656  default: goto __pyx_L5_argtuple_error;
5657  }
5658  kw_args = PyDict_Size(__pyx_kwds);
5659  switch (pos_args) {
5660  case 0:
5661  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5662  else goto __pyx_L5_argtuple_error;
5663  CYTHON_FALLTHROUGH;
5664  case 1:
5665  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5666  else {
5667  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5668  }
5669  }
5670  if (unlikely(kw_args > 0)) {
5671  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5672  }
5673  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5674  goto __pyx_L5_argtuple_error;
5675  } else {
5676  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5677  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5678  }
5679  __pyx_v_lhs = values[0];
5680  __pyx_v_rhs = values[1];
5681  }
5682  goto __pyx_L4_argument_unpacking_done;
5683  __pyx_L5_argtuple_error:;
5684  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5685  __pyx_L3_error:;
5686  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5687  __Pyx_RefNannyFinishContext();
5688  return NULL;
5689  __pyx_L4_argument_unpacking_done:;
5690  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5691 
5692  /* function exit code */
5693  __Pyx_RefNannyFinishContext();
5694  return __pyx_r;
5695  }
5696 
5697  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5698  PyObject *__pyx_r = NULL;
5699  __Pyx_RefNannyDeclarations
5700  PyObject *__pyx_t_1 = NULL;
5701  __Pyx_RefNannySetupContext("compare", 0);
5702  __Pyx_XDECREF(__pyx_r);
5703  __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)
5704  __Pyx_GOTREF(__pyx_t_1);
5705  __pyx_r = __pyx_t_1;
5706  __pyx_t_1 = 0;
5707  goto __pyx_L0;
5708 
5709  /* function exit code */
5710  __pyx_L1_error:;
5711  __Pyx_XDECREF(__pyx_t_1);
5712  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5713  __pyx_r = NULL;
5714  __pyx_L0:;
5715  __Pyx_XGIVEREF(__pyx_r);
5716  __Pyx_RefNannyFinishContext();
5717  return __pyx_r;
5718  }
5719 
5720  /* "PyClical.pyx":502
5721  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5722  *
5723  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5724  * """
5725  * Minimum negative index, or 0 if none.
5726  */
5727 
5728  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5729  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5730  PyObject *__pyx_r = NULL;
5731  __Pyx_RefNannyDeclarations
5732  PyObject *__pyx_t_1 = NULL;
5733  __Pyx_RefNannySetupContext("min_neg", 0);
5734 
5735  /* "PyClical.pyx":509
5736  * 0
5737  * """
5738  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5739  *
5740  * cpdef inline max_pos(obj):
5741  */
5742  __Pyx_XDECREF(__pyx_r);
5743  __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)
5744  __Pyx_GOTREF(__pyx_t_1);
5745  __pyx_r = __pyx_t_1;
5746  __pyx_t_1 = 0;
5747  goto __pyx_L0;
5748 
5749  /* "PyClical.pyx":502
5750  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5751  *
5752  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5753  * """
5754  * Minimum negative index, or 0 if none.
5755  */
5756 
5757  /* function exit code */
5758  __pyx_L1_error:;
5759  __Pyx_XDECREF(__pyx_t_1);
5760  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5761  __pyx_r = 0;
5762  __pyx_L0:;
5763  __Pyx_XGIVEREF(__pyx_r);
5764  __Pyx_RefNannyFinishContext();
5765  return __pyx_r;
5766  }
5767 
5768  /* Python wrapper */
5769  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5770  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 ";
5771  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5772  PyObject *__pyx_r = 0;
5773  __Pyx_RefNannyDeclarations
5774  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5775  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5776 
5777  /* function exit code */
5778  __Pyx_RefNannyFinishContext();
5779  return __pyx_r;
5780  }
5781 
5782  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5783  PyObject *__pyx_r = NULL;
5784  __Pyx_RefNannyDeclarations
5785  PyObject *__pyx_t_1 = NULL;
5786  __Pyx_RefNannySetupContext("min_neg", 0);
5787  __Pyx_XDECREF(__pyx_r);
5788  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5789  __Pyx_GOTREF(__pyx_t_1);
5790  __pyx_r = __pyx_t_1;
5791  __pyx_t_1 = 0;
5792  goto __pyx_L0;
5793 
5794  /* function exit code */
5795  __pyx_L1_error:;
5796  __Pyx_XDECREF(__pyx_t_1);
5797  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5798  __pyx_r = NULL;
5799  __pyx_L0:;
5800  __Pyx_XGIVEREF(__pyx_r);
5801  __Pyx_RefNannyFinishContext();
5802  return __pyx_r;
5803  }
5804 
5805  /* "PyClical.pyx":511
5806  * return glucat.min_neg( toIndexSet(obj) )
5807  *
5808  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5809  * """
5810  * Maximum positive index, or 0 if none.
5811  */
5812 
5813  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5814  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5815  PyObject *__pyx_r = NULL;
5816  __Pyx_RefNannyDeclarations
5817  PyObject *__pyx_t_1 = NULL;
5818  __Pyx_RefNannySetupContext("max_pos", 0);
5819 
5820  /* "PyClical.pyx":518
5821  * 2
5822  * """
5823  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5824  *
5825  * cdef inline vector[scalar_t] list_to_vector(lst):
5826  */
5827  __Pyx_XDECREF(__pyx_r);
5828  __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)
5829  __Pyx_GOTREF(__pyx_t_1);
5830  __pyx_r = __pyx_t_1;
5831  __pyx_t_1 = 0;
5832  goto __pyx_L0;
5833 
5834  /* "PyClical.pyx":511
5835  * return glucat.min_neg( toIndexSet(obj) )
5836  *
5837  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5838  * """
5839  * Maximum positive index, or 0 if none.
5840  */
5841 
5842  /* function exit code */
5843  __pyx_L1_error:;
5844  __Pyx_XDECREF(__pyx_t_1);
5845  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5846  __pyx_r = 0;
5847  __pyx_L0:;
5848  __Pyx_XGIVEREF(__pyx_r);
5849  __Pyx_RefNannyFinishContext();
5850  return __pyx_r;
5851  }
5852 
5853  /* Python wrapper */
5854  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5855  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 ";
5856  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5857  PyObject *__pyx_r = 0;
5858  __Pyx_RefNannyDeclarations
5859  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5860  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5861 
5862  /* function exit code */
5863  __Pyx_RefNannyFinishContext();
5864  return __pyx_r;
5865  }
5866 
5867  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5868  PyObject *__pyx_r = NULL;
5869  __Pyx_RefNannyDeclarations
5870  PyObject *__pyx_t_1 = NULL;
5871  __Pyx_RefNannySetupContext("max_pos", 0);
5872  __Pyx_XDECREF(__pyx_r);
5873  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5874  __Pyx_GOTREF(__pyx_t_1);
5875  __pyx_r = __pyx_t_1;
5876  __pyx_t_1 = 0;
5877  goto __pyx_L0;
5878 
5879  /* function exit code */
5880  __pyx_L1_error:;
5881  __Pyx_XDECREF(__pyx_t_1);
5882  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5883  __pyx_r = NULL;
5884  __pyx_L0:;
5885  __Pyx_XGIVEREF(__pyx_r);
5886  __Pyx_RefNannyFinishContext();
5887  return __pyx_r;
5888  }
5889 
5890  /* "PyClical.pyx":520
5891  * return glucat.max_pos( toIndexSet(obj) )
5892  *
5893  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5894  * """
5895  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5896  */
5897 
5898  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5899  std::vector<scalar_t> __pyx_v_v;
5900  PyObject *__pyx_v_s = NULL;
5901  std::vector<scalar_t> __pyx_r;
5902  __Pyx_RefNannyDeclarations
5903  PyObject *__pyx_t_1 = NULL;
5904  Py_ssize_t __pyx_t_2;
5905  PyObject *(*__pyx_t_3)(PyObject *);
5906  PyObject *__pyx_t_4 = NULL;
5907  scalar_t __pyx_t_5;
5908  __Pyx_RefNannySetupContext("list_to_vector", 0);
5909 
5910  /* "PyClical.pyx":525
5911  * """
5912  * cdef vector[scalar_t] v
5913  * for s in lst: # <<<<<<<<<<<<<<
5914  * v.push_back(<scalar_t>s)
5915  * return v
5916  */
5917  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5918  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5919  __pyx_t_3 = NULL;
5920  } else {
5921  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5922  __Pyx_GOTREF(__pyx_t_1);
5923  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5924  }
5925  for (;;) {
5926  if (likely(!__pyx_t_3)) {
5927  if (likely(PyList_CheckExact(__pyx_t_1))) {
5928  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5929  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5930  __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)
5931  #else
5932  __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)
5933  __Pyx_GOTREF(__pyx_t_4);
5934  #endif
5935  } else {
5936  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5937  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5938  __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)
5939  #else
5940  __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)
5941  __Pyx_GOTREF(__pyx_t_4);
5942  #endif
5943  }
5944  } else {
5945  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5946  if (unlikely(!__pyx_t_4)) {
5947  PyObject* exc_type = PyErr_Occurred();
5948  if (exc_type) {
5949  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5950  else __PYX_ERR(0, 525, __pyx_L1_error)
5951  }
5952  break;
5953  }
5954  __Pyx_GOTREF(__pyx_t_4);
5955  }
5956  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5957  __pyx_t_4 = 0;
5958 
5959  /* "PyClical.pyx":526
5960  * cdef vector[scalar_t] v
5961  * for s in lst:
5962  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
5963  * return v
5964  *
5965  */
5966  __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)
5967  try {
5968  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
5969  } catch(...) {
5970  __Pyx_CppExn2PyErr();
5971  __PYX_ERR(0, 526, __pyx_L1_error)
5972  }
5973 
5974  /* "PyClical.pyx":525
5975  * """
5976  * cdef vector[scalar_t] v
5977  * for s in lst: # <<<<<<<<<<<<<<
5978  * v.push_back(<scalar_t>s)
5979  * return v
5980  */
5981  }
5982  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5983 
5984  /* "PyClical.pyx":527
5985  * for s in lst:
5986  * v.push_back(<scalar_t>s)
5987  * return v # <<<<<<<<<<<<<<
5988  *
5989  * # Forward reference.
5990  */
5991  __pyx_r = __pyx_v_v;
5992  goto __pyx_L0;
5993 
5994  /* "PyClical.pyx":520
5995  * return glucat.max_pos( toIndexSet(obj) )
5996  *
5997  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5998  * """
5999  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6000  */
6001 
6002  /* function exit code */
6003  __pyx_L1_error:;
6004  __Pyx_XDECREF(__pyx_t_1);
6005  __Pyx_XDECREF(__pyx_t_4);
6006  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6007  __Pyx_pretend_to_initialize(&__pyx_r);
6008  __pyx_L0:;
6009  __Pyx_XDECREF(__pyx_v_s);
6010  __Pyx_RefNannyFinishContext();
6011  return __pyx_r;
6012  }
6013 
6014  /* "PyClical.pyx":532
6015  * cdef class clifford
6016  *
6017  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6018  * return clifford(obj).instance[0]
6019  *
6020  */
6021 
6022  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6023  Clifford __pyx_r;
6024  __Pyx_RefNannyDeclarations
6025  PyObject *__pyx_t_1 = NULL;
6026  PyObject *__pyx_t_2 = NULL;
6027  __Pyx_RefNannySetupContext("toClifford", 0);
6028 
6029  /* "PyClical.pyx":533
6030  *
6031  * cdef inline Clifford toClifford(obj):
6032  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6033  *
6034  * cdef class clifford:
6035  */
6036  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
6037  __Pyx_GOTREF(__pyx_t_1);
6038  __Pyx_INCREF(__pyx_v_obj);
6039  __Pyx_GIVEREF(__pyx_v_obj);
6040  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
6041  __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)
6042  __Pyx_GOTREF(__pyx_t_2);
6043  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6044  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_2)->instance[0]);
6045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6046  goto __pyx_L0;
6047 
6048  /* "PyClical.pyx":532
6049  * cdef class clifford
6050  *
6051  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6052  * return clifford(obj).instance[0]
6053  *
6054  */
6055 
6056  /* function exit code */
6057  __pyx_L1_error:;
6058  __Pyx_XDECREF(__pyx_t_1);
6059  __Pyx_XDECREF(__pyx_t_2);
6060  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6061  __Pyx_pretend_to_initialize(&__pyx_r);
6062  __pyx_L0:;
6063  __Pyx_RefNannyFinishContext();
6064  return __pyx_r;
6065  }
6066 
6067  /* "PyClical.pyx":541
6068  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6069  *
6070  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6071  * """
6072  * Wrap an instance of the C++ class Clifford.
6073  */
6074 
6075  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6076  PyObject *__pyx_r = NULL;
6077  __Pyx_RefNannyDeclarations
6078  __Pyx_RefNannySetupContext("wrap", 0);
6079 
6080  /* "PyClical.pyx":545
6081  * Wrap an instance of the C++ class Clifford.
6082  * """
6083  * self.instance[0] = other # <<<<<<<<<<<<<<
6084  * return self
6085  *
6086  */
6087  (__pyx_v_self->instance[0]) = __pyx_v_other;
6088 
6089  /* "PyClical.pyx":546
6090  * """
6091  * self.instance[0] = other
6092  * return self # <<<<<<<<<<<<<<
6093  *
6094  * cdef inline Clifford unwrap(clifford self):
6095  */
6096  __Pyx_XDECREF(__pyx_r);
6097  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6098  __pyx_r = ((PyObject *)__pyx_v_self);
6099  goto __pyx_L0;
6100 
6101  /* "PyClical.pyx":541
6102  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6103  *
6104  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6105  * """
6106  * Wrap an instance of the C++ class Clifford.
6107  */
6108 
6109  /* function exit code */
6110  __pyx_L0:;
6111  __Pyx_XGIVEREF(__pyx_r);
6112  __Pyx_RefNannyFinishContext();
6113  return __pyx_r;
6114  }
6115 
6116  /* "PyClical.pyx":548
6117  * return self
6118  *
6119  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6120  * """
6121  * Return the wrapped C++ Clifford instance.
6122  */
6123 
6124  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6125  Clifford __pyx_r;
6126  __Pyx_RefNannyDeclarations
6127  __Pyx_RefNannySetupContext("unwrap", 0);
6128 
6129  /* "PyClical.pyx":552
6130  * Return the wrapped C++ Clifford instance.
6131  * """
6132  * return self.instance[0] # <<<<<<<<<<<<<<
6133  *
6134  * cpdef copy(clifford self):
6135  */
6136  __pyx_r = (__pyx_v_self->instance[0]);
6137  goto __pyx_L0;
6138 
6139  /* "PyClical.pyx":548
6140  * return self
6141  *
6142  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6143  * """
6144  * Return the wrapped C++ Clifford instance.
6145  */
6146 
6147  /* function exit code */
6148  __pyx_L0:;
6149  __Pyx_RefNannyFinishContext();
6150  return __pyx_r;
6151  }
6152 
6153  /* "PyClical.pyx":554
6154  * return self.instance[0]
6155  *
6156  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6157  * """
6158  * Copy this clifford object.
6159  */
6160 
6161  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6162  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6163  PyObject *__pyx_r = NULL;
6164  __Pyx_RefNannyDeclarations
6165  PyObject *__pyx_t_1 = NULL;
6166  PyObject *__pyx_t_2 = NULL;
6167  PyObject *__pyx_t_3 = NULL;
6168  PyObject *__pyx_t_4 = NULL;
6169  __Pyx_RefNannySetupContext("copy", 0);
6170  /* Check if called by wrapper */
6171  if (unlikely(__pyx_skip_dispatch)) ;
6172  /* Check if overridden in Python */
6173  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
6174  __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)
6175  __Pyx_GOTREF(__pyx_t_1);
6176  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
6177  __Pyx_XDECREF(__pyx_r);
6178  __Pyx_INCREF(__pyx_t_1);
6179  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6180  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6181  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6182  if (likely(__pyx_t_4)) {
6183  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6184  __Pyx_INCREF(__pyx_t_4);
6185  __Pyx_INCREF(function);
6186  __Pyx_DECREF_SET(__pyx_t_3, function);
6187  }
6188  }
6189  if (__pyx_t_4) {
6190  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6191  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6192  } else {
6193  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6194  }
6195  __Pyx_GOTREF(__pyx_t_2);
6196  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6197  __pyx_r = __pyx_t_2;
6198  __pyx_t_2 = 0;
6199  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6200  goto __pyx_L0;
6201  }
6202  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6203  }
6204 
6205  /* "PyClical.pyx":561
6206  * {2}
6207  * """
6208  * return clifford(self) # <<<<<<<<<<<<<<
6209  *
6210  * def __cinit__(self, other = 0, ixt = None):
6211  */
6212  __Pyx_XDECREF(__pyx_r);
6213  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
6214  __Pyx_GOTREF(__pyx_t_1);
6215  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6216  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
6217  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
6218  __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)
6219  __Pyx_GOTREF(__pyx_t_2);
6220  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6221  __pyx_r = __pyx_t_2;
6222  __pyx_t_2 = 0;
6223  goto __pyx_L0;
6224 
6225  /* "PyClical.pyx":554
6226  * return self.instance[0]
6227  *
6228  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6229  * """
6230  * Copy this clifford object.
6231  */
6232 
6233  /* function exit code */
6234  __pyx_L1_error:;
6235  __Pyx_XDECREF(__pyx_t_1);
6236  __Pyx_XDECREF(__pyx_t_2);
6237  __Pyx_XDECREF(__pyx_t_3);
6238  __Pyx_XDECREF(__pyx_t_4);
6239  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6240  __pyx_r = 0;
6241  __pyx_L0:;
6242  __Pyx_XGIVEREF(__pyx_r);
6243  __Pyx_RefNannyFinishContext();
6244  return __pyx_r;
6245  }
6246 
6247  /* Python wrapper */
6248  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6249  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 ";
6250  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6251  PyObject *__pyx_r = 0;
6252  __Pyx_RefNannyDeclarations
6253  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6254  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6255 
6256  /* function exit code */
6257  __Pyx_RefNannyFinishContext();
6258  return __pyx_r;
6259  }
6260 
6261  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6262  PyObject *__pyx_r = NULL;
6263  __Pyx_RefNannyDeclarations
6264  PyObject *__pyx_t_1 = NULL;
6265  __Pyx_RefNannySetupContext("copy", 0);
6266  __Pyx_XDECREF(__pyx_r);
6267  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6268  __Pyx_GOTREF(__pyx_t_1);
6269  __pyx_r = __pyx_t_1;
6270  __pyx_t_1 = 0;
6271  goto __pyx_L0;
6272 
6273  /* function exit code */
6274  __pyx_L1_error:;
6275  __Pyx_XDECREF(__pyx_t_1);
6276  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6277  __pyx_r = NULL;
6278  __pyx_L0:;
6279  __Pyx_XGIVEREF(__pyx_r);
6280  __Pyx_RefNannyFinishContext();
6281  return __pyx_r;
6282  }
6283 
6284  /* "PyClical.pyx":563
6285  * return clifford(self)
6286  *
6287  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6288  * """
6289  * Construct an object of type clifford.
6290  */
6291 
6292  /* Python wrapper */
6293  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6294  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6295  PyObject *__pyx_v_other = 0;
6296  PyObject *__pyx_v_ixt = 0;
6297  int __pyx_r;
6298  __Pyx_RefNannyDeclarations
6299  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6300  {
6301  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6302  PyObject* values[2] = {0,0};
6303  values[0] = ((PyObject *)__pyx_int_0);
6304  values[1] = ((PyObject *)Py_None);
6305  if (unlikely(__pyx_kwds)) {
6306  Py_ssize_t kw_args;
6307  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6308  switch (pos_args) {
6309  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6310  CYTHON_FALLTHROUGH;
6311  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6312  CYTHON_FALLTHROUGH;
6313  case 0: break;
6314  default: goto __pyx_L5_argtuple_error;
6315  }
6316  kw_args = PyDict_Size(__pyx_kwds);
6317  switch (pos_args) {
6318  case 0:
6319  if (kw_args > 0) {
6320  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other);
6321  if (value) { values[0] = value; kw_args--; }
6322  }
6323  CYTHON_FALLTHROUGH;
6324  case 1:
6325  if (kw_args > 0) {
6326  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt);
6327  if (value) { values[1] = value; kw_args--; }
6328  }
6329  }
6330  if (unlikely(kw_args > 0)) {
6331  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6332  }
6333  } else {
6334  switch (PyTuple_GET_SIZE(__pyx_args)) {
6335  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6336  CYTHON_FALLTHROUGH;
6337  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6338  CYTHON_FALLTHROUGH;
6339  case 0: break;
6340  default: goto __pyx_L5_argtuple_error;
6341  }
6342  }
6343  __pyx_v_other = values[0];
6344  __pyx_v_ixt = values[1];
6345  }
6346  goto __pyx_L4_argument_unpacking_done;
6347  __pyx_L5_argtuple_error:;
6348  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6349  __pyx_L3_error:;
6350  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6351  __Pyx_RefNannyFinishContext();
6352  return -1;
6353  __pyx_L4_argument_unpacking_done:;
6354  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6355 
6356  /* function exit code */
6357  __Pyx_RefNannyFinishContext();
6358  return __pyx_r;
6359  }
6360 
6361  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6362  PyObject *__pyx_v_error_msg_prefix = NULL;
6363  PyObject *__pyx_v_err = NULL;
6364  int __pyx_r;
6365  __Pyx_RefNannyDeclarations
6366  int __pyx_t_1;
6367  int __pyx_t_2;
6368  PyObject *__pyx_t_3 = NULL;
6369  PyObject *__pyx_t_4 = NULL;
6370  PyObject *__pyx_t_5 = NULL;
6371  Clifford *__pyx_t_6;
6372  PyObject *__pyx_t_7 = NULL;
6373  PyObject *__pyx_t_8 = NULL;
6374  scalar_t __pyx_t_9;
6375  PyObject *__pyx_t_10 = NULL;
6376  PyObject *__pyx_t_11 = NULL;
6377  PyObject *__pyx_t_12 = NULL;
6378  char *__pyx_t_13;
6379  int __pyx_t_14;
6380  PyObject *__pyx_t_15 = NULL;
6381  PyObject *__pyx_t_16 = NULL;
6382  PyObject *__pyx_t_17 = NULL;
6383  PyObject *__pyx_t_18 = NULL;
6384  __Pyx_RefNannySetupContext("__cinit__", 0);
6385 
6386  /* "PyClical.pyx":588
6387  * 2{1}+3{2}
6388  * """
6389  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6390  * if ixt is None:
6391  * try:
6392  */
6393  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6394  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6395 
6396  /* "PyClical.pyx":589
6397  * """
6398  * error_msg_prefix = "Cannot initialize clifford object from"
6399  * if ixt is None: # <<<<<<<<<<<<<<
6400  * try:
6401  * if isinstance(other, clifford):
6402  */
6403  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6404  __pyx_t_2 = (__pyx_t_1 != 0);
6405  if (__pyx_t_2) {
6406 
6407  /* "PyClical.pyx":590
6408  * error_msg_prefix = "Cannot initialize clifford object from"
6409  * if ixt is None:
6410  * try: # <<<<<<<<<<<<<<
6411  * if isinstance(other, clifford):
6412  * self.instance = new Clifford((<clifford>other).unwrap())
6413  */
6414  {
6415  __Pyx_PyThreadState_declare
6416  __Pyx_PyThreadState_assign
6417  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6418  __Pyx_XGOTREF(__pyx_t_3);
6419  __Pyx_XGOTREF(__pyx_t_4);
6420  __Pyx_XGOTREF(__pyx_t_5);
6421  /*try:*/ {
6422 
6423  /* "PyClical.pyx":591
6424  * if ixt is None:
6425  * try:
6426  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6427  * self.instance = new Clifford((<clifford>other).unwrap())
6428  * elif isinstance(other, index_set):
6429  */
6430  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6431  __pyx_t_1 = (__pyx_t_2 != 0);
6432  if (__pyx_t_1) {
6433 
6434  /* "PyClical.pyx":592
6435  * try:
6436  * if isinstance(other, clifford):
6437  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6438  * elif isinstance(other, index_set):
6439  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6440  */
6441  try {
6442  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6443  } catch(...) {
6444  __Pyx_CppExn2PyErr();
6445  __PYX_ERR(0, 592, __pyx_L4_error)
6446  }
6447  __pyx_v_self->instance = __pyx_t_6;
6448 
6449  /* "PyClical.pyx":591
6450  * if ixt is None:
6451  * try:
6452  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6453  * self.instance = new Clifford((<clifford>other).unwrap())
6454  * elif isinstance(other, index_set):
6455  */
6456  goto __pyx_L10;
6457  }
6458 
6459  /* "PyClical.pyx":593
6460  * if isinstance(other, clifford):
6461  * self.instance = new Clifford((<clifford>other).unwrap())
6462  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6463  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6464  * elif isinstance(other, numbers.Real):
6465  */
6466  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6467  __pyx_t_2 = (__pyx_t_1 != 0);
6468  if (__pyx_t_2) {
6469 
6470  /* "PyClical.pyx":594
6471  * self.instance = new Clifford((<clifford>other).unwrap())
6472  * elif isinstance(other, index_set):
6473  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6474  * elif isinstance(other, numbers.Real):
6475  * self.instance = new Clifford(<scalar_t>other)
6476  */
6477  try {
6478  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6479  } catch(...) {
6480  __Pyx_CppExn2PyErr();
6481  __PYX_ERR(0, 594, __pyx_L4_error)
6482  }
6483  __pyx_v_self->instance = __pyx_t_6;
6484 
6485  /* "PyClical.pyx":593
6486  * if isinstance(other, clifford):
6487  * self.instance = new Clifford((<clifford>other).unwrap())
6488  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6489  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6490  * elif isinstance(other, numbers.Real):
6491  */
6492  goto __pyx_L10;
6493  }
6494 
6495  /* "PyClical.pyx":595
6496  * elif isinstance(other, index_set):
6497  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6498  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6499  * self.instance = new Clifford(<scalar_t>other)
6500  * elif isinstance(other, str):
6501  */
6502  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6503  __Pyx_GOTREF(__pyx_t_7);
6504  __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)
6505  __Pyx_GOTREF(__pyx_t_8);
6506  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6507  __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)
6508  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6509  __pyx_t_1 = (__pyx_t_2 != 0);
6510  if (__pyx_t_1) {
6511 
6512  /* "PyClical.pyx":596
6513  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6514  * elif isinstance(other, numbers.Real):
6515  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6516  * elif isinstance(other, str):
6517  * try:
6518  */
6519  __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)
6520  try {
6521  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6522  } catch(...) {
6523  __Pyx_CppExn2PyErr();
6524  __PYX_ERR(0, 596, __pyx_L4_error)
6525  }
6526  __pyx_v_self->instance = __pyx_t_6;
6527 
6528  /* "PyClical.pyx":595
6529  * elif isinstance(other, index_set):
6530  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6531  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6532  * self.instance = new Clifford(<scalar_t>other)
6533  * elif isinstance(other, str):
6534  */
6535  goto __pyx_L10;
6536  }
6537 
6538  /* "PyClical.pyx":597
6539  * elif isinstance(other, numbers.Real):
6540  * self.instance = new Clifford(<scalar_t>other)
6541  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6542  * try:
6543  * self.instance = new Clifford(<char *>other)
6544  */
6545  __pyx_t_1 = PyString_Check(__pyx_v_other);
6546  __pyx_t_2 = (__pyx_t_1 != 0);
6547  if (__pyx_t_2) {
6548 
6549  /* "PyClical.pyx":598
6550  * self.instance = new Clifford(<scalar_t>other)
6551  * elif isinstance(other, str):
6552  * try: # <<<<<<<<<<<<<<
6553  * self.instance = new Clifford(<char *>other)
6554  * except RuntimeError:
6555  */
6556  {
6557  __Pyx_PyThreadState_declare
6558  __Pyx_PyThreadState_assign
6559  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6560  __Pyx_XGOTREF(__pyx_t_10);
6561  __Pyx_XGOTREF(__pyx_t_11);
6562  __Pyx_XGOTREF(__pyx_t_12);
6563  /*try:*/ {
6564 
6565  /* "PyClical.pyx":599
6566  * elif isinstance(other, str):
6567  * try:
6568  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6569  * except RuntimeError:
6570  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6571  */
6572  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6573  try {
6574  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6575  } catch(...) {
6576  __Pyx_CppExn2PyErr();
6577  __PYX_ERR(0, 599, __pyx_L11_error)
6578  }
6579  __pyx_v_self->instance = __pyx_t_6;
6580 
6581  /* "PyClical.pyx":598
6582  * self.instance = new Clifford(<scalar_t>other)
6583  * elif isinstance(other, str):
6584  * try: # <<<<<<<<<<<<<<
6585  * self.instance = new Clifford(<char *>other)
6586  * except RuntimeError:
6587  */
6588  }
6589  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6590  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6591  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6592  goto __pyx_L16_try_end;
6593  __pyx_L11_error:;
6594  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6595  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6596 
6597  /* "PyClical.pyx":600
6598  * try:
6599  * self.instance = new Clifford(<char *>other)
6600  * except RuntimeError: # <<<<<<<<<<<<<<
6601  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6602  * else:
6603  */
6604  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6605  if (__pyx_t_14) {
6606  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6607  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6608  __Pyx_GOTREF(__pyx_t_8);
6609  __Pyx_GOTREF(__pyx_t_7);
6610  __Pyx_GOTREF(__pyx_t_15);
6611 
6612  /* "PyClical.pyx":601
6613  * self.instance = new Clifford(<char *>other)
6614  * except RuntimeError:
6615  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6616  * else:
6617  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6618  */
6619  __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)
6620  __Pyx_GOTREF(__pyx_t_16);
6621  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6622  __Pyx_GOTREF(__pyx_t_17);
6623  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6624  __Pyx_GOTREF(__pyx_t_18);
6625  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6626  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6627  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6628  __Pyx_GOTREF(__pyx_t_17);
6629  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6630  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6631  __Pyx_GOTREF(__pyx_t_18);
6632  __Pyx_GIVEREF(__pyx_t_17);
6633  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17);
6634  __pyx_t_17 = 0;
6635  __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)
6636  __Pyx_GOTREF(__pyx_t_17);
6637  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6638  __Pyx_Raise(__pyx_t_17, 0, 0, 0);
6639  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6640  __PYX_ERR(0, 601, __pyx_L13_except_error)
6641  }
6642  goto __pyx_L13_except_error;
6643  __pyx_L13_except_error:;
6644 
6645  /* "PyClical.pyx":598
6646  * self.instance = new Clifford(<scalar_t>other)
6647  * elif isinstance(other, str):
6648  * try: # <<<<<<<<<<<<<<
6649  * self.instance = new Clifford(<char *>other)
6650  * except RuntimeError:
6651  */
6652  __Pyx_XGIVEREF(__pyx_t_10);
6653  __Pyx_XGIVEREF(__pyx_t_11);
6654  __Pyx_XGIVEREF(__pyx_t_12);
6655  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6656  goto __pyx_L4_error;
6657  __pyx_L16_try_end:;
6658  }
6659 
6660  /* "PyClical.pyx":597
6661  * elif isinstance(other, numbers.Real):
6662  * self.instance = new Clifford(<scalar_t>other)
6663  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6664  * try:
6665  * self.instance = new Clifford(<char *>other)
6666  */
6667  goto __pyx_L10;
6668  }
6669 
6670  /* "PyClical.pyx":603
6671  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6672  * else:
6673  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6674  * except RuntimeError as err:
6675  * raise ValueError(error_msg_prefix + " " + str(type(other))
6676  */
6677  /*else*/ {
6678  __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)
6679  __Pyx_GOTREF(__pyx_t_15);
6680  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6681  __Pyx_GOTREF(__pyx_t_7);
6682  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6683  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6684  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6685  __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)
6686  __Pyx_GOTREF(__pyx_t_8);
6687  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6688  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6689  __Pyx_GOTREF(__pyx_t_7);
6690  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6691  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6692  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6693  __Pyx_GOTREF(__pyx_t_8);
6694  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6695  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6696  __Pyx_GOTREF(__pyx_t_7);
6697  __Pyx_GIVEREF(__pyx_t_8);
6698  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
6699  __pyx_t_8 = 0;
6700  __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)
6701  __Pyx_GOTREF(__pyx_t_8);
6702  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6703  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6704  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6705  __PYX_ERR(0, 603, __pyx_L4_error)
6706  }
6707  __pyx_L10:;
6708 
6709  /* "PyClical.pyx":590
6710  * error_msg_prefix = "Cannot initialize clifford object from"
6711  * if ixt is None:
6712  * try: # <<<<<<<<<<<<<<
6713  * if isinstance(other, clifford):
6714  * self.instance = new Clifford((<clifford>other).unwrap())
6715  */
6716  }
6717  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6718  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6719  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6720  goto __pyx_L9_try_end;
6721  __pyx_L4_error:;
6722  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6723  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6724  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6725  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6726  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6727  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6728 
6729  /* "PyClical.pyx":604
6730  * else:
6731  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6732  * except RuntimeError as err: # <<<<<<<<<<<<<<
6733  * raise ValueError(error_msg_prefix + " " + str(type(other))
6734  * + " value " + repr(other) + ":"
6735  */
6736  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6737  if (__pyx_t_14) {
6738  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6739  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6740  __Pyx_GOTREF(__pyx_t_8);
6741  __Pyx_GOTREF(__pyx_t_7);
6742  __Pyx_GOTREF(__pyx_t_15);
6743  __Pyx_INCREF(__pyx_t_7);
6744  __pyx_v_err = __pyx_t_7;
6745 
6746  /* "PyClical.pyx":605
6747  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6748  * except RuntimeError as err:
6749  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6750  * + " value " + repr(other) + ":"
6751  * + "\n\t" + str(err))
6752  */
6753  __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)
6754  __Pyx_GOTREF(__pyx_t_17);
6755  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6756  __Pyx_GOTREF(__pyx_t_18);
6757  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6758  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6759  PyTuple_SET_ITEM(__pyx_t_18, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6760  __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)
6761  __Pyx_GOTREF(__pyx_t_16);
6762  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6763  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6764  __Pyx_GOTREF(__pyx_t_18);
6765  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6766  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6767 
6768  /* "PyClical.pyx":606
6769  * except RuntimeError as err:
6770  * raise ValueError(error_msg_prefix + " " + str(type(other))
6771  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6772  * + "\n\t" + str(err))
6773  * elif isinstance(ixt, index_set):
6774  */
6775  __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)
6776  __Pyx_GOTREF(__pyx_t_16);
6777  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6778  __pyx_t_18 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6779  __Pyx_GOTREF(__pyx_t_18);
6780  __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6781  __Pyx_GOTREF(__pyx_t_17);
6782  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6783  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6784  __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)
6785  __Pyx_GOTREF(__pyx_t_18);
6786  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6787 
6788  /* "PyClical.pyx":607
6789  * raise ValueError(error_msg_prefix + " " + str(type(other))
6790  * + " value " + repr(other) + ":"
6791  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6792  * elif isinstance(ixt, index_set):
6793  * if isinstance(other, numbers.Real):
6794  */
6795  __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)
6796  __Pyx_GOTREF(__pyx_t_17);
6797  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6798  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6799  __Pyx_GOTREF(__pyx_t_18);
6800  __Pyx_INCREF(__pyx_v_err);
6801  __Pyx_GIVEREF(__pyx_v_err);
6802  PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_err);
6803  __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)
6804  __Pyx_GOTREF(__pyx_t_16);
6805  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6806  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6807  __Pyx_GOTREF(__pyx_t_18);
6808  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6809  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6810 
6811  /* "PyClical.pyx":605
6812  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6813  * except RuntimeError as err:
6814  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6815  * + " value " + repr(other) + ":"
6816  * + "\n\t" + str(err))
6817  */
6818  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6819  __Pyx_GOTREF(__pyx_t_16);
6820  __Pyx_GIVEREF(__pyx_t_18);
6821  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18);
6822  __pyx_t_18 = 0;
6823  __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)
6824  __Pyx_GOTREF(__pyx_t_18);
6825  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6826  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6827  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6828  __PYX_ERR(0, 605, __pyx_L6_except_error)
6829  }
6830  goto __pyx_L6_except_error;
6831  __pyx_L6_except_error:;
6832 
6833  /* "PyClical.pyx":590
6834  * error_msg_prefix = "Cannot initialize clifford object from"
6835  * if ixt is None:
6836  * try: # <<<<<<<<<<<<<<
6837  * if isinstance(other, clifford):
6838  * self.instance = new Clifford((<clifford>other).unwrap())
6839  */
6840  __Pyx_XGIVEREF(__pyx_t_3);
6841  __Pyx_XGIVEREF(__pyx_t_4);
6842  __Pyx_XGIVEREF(__pyx_t_5);
6843  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6844  goto __pyx_L1_error;
6845  __pyx_L9_try_end:;
6846  }
6847 
6848  /* "PyClical.pyx":589
6849  * """
6850  * error_msg_prefix = "Cannot initialize clifford object from"
6851  * if ixt is None: # <<<<<<<<<<<<<<
6852  * try:
6853  * if isinstance(other, clifford):
6854  */
6855  goto __pyx_L3;
6856  }
6857 
6858  /* "PyClical.pyx":608
6859  * + " value " + repr(other) + ":"
6860  * + "\n\t" + str(err))
6861  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6862  * if isinstance(other, numbers.Real):
6863  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6864  */
6865  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6866  __pyx_t_1 = (__pyx_t_2 != 0);
6867  if (__pyx_t_1) {
6868 
6869  /* "PyClical.pyx":609
6870  * + "\n\t" + str(err))
6871  * elif isinstance(ixt, index_set):
6872  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6873  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6874  * elif isinstance(other, collections.Sequence):
6875  */
6876  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6877  __Pyx_GOTREF(__pyx_t_15);
6878  __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)
6879  __Pyx_GOTREF(__pyx_t_7);
6880  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6881  __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)
6882  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6883  __pyx_t_2 = (__pyx_t_1 != 0);
6884  if (__pyx_t_2) {
6885 
6886  /* "PyClical.pyx":610
6887  * elif isinstance(ixt, index_set):
6888  * if isinstance(other, numbers.Real):
6889  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6890  * elif isinstance(other, collections.Sequence):
6891  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6892  */
6893  __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)
6894  try {
6895  __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));
6896  } catch(...) {
6897  __Pyx_CppExn2PyErr();
6898  __PYX_ERR(0, 610, __pyx_L1_error)
6899  }
6900  __pyx_v_self->instance = __pyx_t_6;
6901 
6902  /* "PyClical.pyx":609
6903  * + "\n\t" + str(err))
6904  * elif isinstance(ixt, index_set):
6905  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6906  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6907  * elif isinstance(other, collections.Sequence):
6908  */
6909  goto __pyx_L21;
6910  }
6911 
6912  /* "PyClical.pyx":611
6913  * if isinstance(other, numbers.Real):
6914  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6915  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6916  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6917  * else:
6918  */
6919  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6920  __Pyx_GOTREF(__pyx_t_7);
6921  __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)
6922  __Pyx_GOTREF(__pyx_t_15);
6923  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6924  __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)
6925  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6926  __pyx_t_1 = (__pyx_t_2 != 0);
6927  if (__pyx_t_1) {
6928 
6929  /* "PyClical.pyx":612
6930  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6931  * elif isinstance(other, collections.Sequence):
6932  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6933  * else:
6934  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6935  */
6936  try {
6937  __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)));
6938  } catch(...) {
6939  __Pyx_CppExn2PyErr();
6940  __PYX_ERR(0, 612, __pyx_L1_error)
6941  }
6942  __pyx_v_self->instance = __pyx_t_6;
6943 
6944  /* "PyClical.pyx":611
6945  * if isinstance(other, numbers.Real):
6946  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6947  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6948  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6949  * else:
6950  */
6951  goto __pyx_L21;
6952  }
6953 
6954  /* "PyClical.pyx":614
6955  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6956  * else:
6957  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6958  * + ", " + repr(ixt) + ").")
6959  * else:
6960  */
6961  /*else*/ {
6962  __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)
6963  __Pyx_GOTREF(__pyx_t_15);
6964  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6965  __Pyx_GOTREF(__pyx_t_7);
6966  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6967  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
6968  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
6969  __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)
6970  __Pyx_GOTREF(__pyx_t_8);
6971  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6972  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6973  __Pyx_GOTREF(__pyx_t_7);
6974  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6975  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6976 
6977  /* "PyClical.pyx":615
6978  * else:
6979  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6980  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6981  * else:
6982  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6983  */
6984  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6985  __Pyx_GOTREF(__pyx_t_8);
6986  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6987  __pyx_t_7 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6988  __Pyx_GOTREF(__pyx_t_7);
6989  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
6990  __Pyx_GOTREF(__pyx_t_15);
6991  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6992  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6993  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6994  __Pyx_GOTREF(__pyx_t_7);
6995  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6996 
6997  /* "PyClical.pyx":614
6998  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6999  * else:
7000  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7001  * + ", " + repr(ixt) + ").")
7002  * else:
7003  */
7004  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7005  __Pyx_GOTREF(__pyx_t_15);
7006  __Pyx_GIVEREF(__pyx_t_7);
7007  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
7008  __pyx_t_7 = 0;
7009  __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)
7010  __Pyx_GOTREF(__pyx_t_7);
7011  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7012  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7013  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7014  __PYX_ERR(0, 614, __pyx_L1_error)
7015  }
7016  __pyx_L21:;
7017 
7018  /* "PyClical.pyx":608
7019  * + " value " + repr(other) + ":"
7020  * + "\n\t" + str(err))
7021  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7022  * if isinstance(other, numbers.Real):
7023  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7024  */
7025  goto __pyx_L3;
7026  }
7027 
7028  /* "PyClical.pyx":617
7029  * + ", " + repr(ixt) + ").")
7030  * else:
7031  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7032  * + ", " + str(type(ixt)) + ").")
7033  *
7034  */
7035  /*else*/ {
7036  __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)
7037  __Pyx_GOTREF(__pyx_t_7);
7038  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7039  __Pyx_GOTREF(__pyx_t_15);
7040  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_other)));
7041  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_other)));
7042  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_other)));
7043  __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)
7044  __Pyx_GOTREF(__pyx_t_8);
7045  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7046  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7047  __Pyx_GOTREF(__pyx_t_15);
7048  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7049  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7050 
7051  /* "PyClical.pyx":618
7052  * else:
7053  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7054  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7055  *
7056  * def __dealloc__(self):
7057  */
7058  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7059  __Pyx_GOTREF(__pyx_t_8);
7060  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7061  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7062  __Pyx_GOTREF(__pyx_t_15);
7063  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7064  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7065  PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7066  __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)
7067  __Pyx_GOTREF(__pyx_t_7);
7068  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7069  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7070  __Pyx_GOTREF(__pyx_t_15);
7071  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7072  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7073  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7074  __Pyx_GOTREF(__pyx_t_7);
7075  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7076 
7077  /* "PyClical.pyx":617
7078  * + ", " + repr(ixt) + ").")
7079  * else:
7080  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7081  * + ", " + str(type(ixt)) + ").")
7082  *
7083  */
7084  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7085  __Pyx_GOTREF(__pyx_t_15);
7086  __Pyx_GIVEREF(__pyx_t_7);
7087  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7);
7088  __pyx_t_7 = 0;
7089  __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)
7090  __Pyx_GOTREF(__pyx_t_7);
7091  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7092  __Pyx_Raise(__pyx_t_7, 0, 0, 0);
7093  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7094  __PYX_ERR(0, 617, __pyx_L1_error)
7095  }
7096  __pyx_L3:;
7097 
7098  /* "PyClical.pyx":563
7099  * return clifford(self)
7100  *
7101  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7102  * """
7103  * Construct an object of type clifford.
7104  */
7105 
7106  /* function exit code */
7107  __pyx_r = 0;
7108  goto __pyx_L0;
7109  __pyx_L1_error:;
7110  __Pyx_XDECREF(__pyx_t_7);
7111  __Pyx_XDECREF(__pyx_t_8);
7112  __Pyx_XDECREF(__pyx_t_15);
7113  __Pyx_XDECREF(__pyx_t_16);
7114  __Pyx_XDECREF(__pyx_t_17);
7115  __Pyx_XDECREF(__pyx_t_18);
7116  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7117  __pyx_r = -1;
7118  __pyx_L0:;
7119  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7120  __Pyx_XDECREF(__pyx_v_err);
7121  __Pyx_RefNannyFinishContext();
7122  return __pyx_r;
7123  }
7124 
7125  /* "PyClical.pyx":620
7126  * + ", " + str(type(ixt)) + ").")
7127  *
7128  * def __dealloc__(self): # <<<<<<<<<<<<<<
7129  * """
7130  * Clean up by deallocating the instance of C++ class Clifford.
7131  */
7132 
7133  /* Python wrapper */
7134  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7135  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7136  __Pyx_RefNannyDeclarations
7137  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7138  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7139 
7140  /* function exit code */
7141  __Pyx_RefNannyFinishContext();
7142  }
7143 
7144  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7145  __Pyx_RefNannyDeclarations
7146  __Pyx_RefNannySetupContext("__dealloc__", 0);
7147 
7148  /* "PyClical.pyx":624
7149  * Clean up by deallocating the instance of C++ class Clifford.
7150  * """
7151  * del self.instance # <<<<<<<<<<<<<<
7152  *
7153  * def __contains__(self, x):
7154  */
7155  delete __pyx_v_self->instance;
7156 
7157  /* "PyClical.pyx":620
7158  * + ", " + str(type(ixt)) + ").")
7159  *
7160  * def __dealloc__(self): # <<<<<<<<<<<<<<
7161  * """
7162  * Clean up by deallocating the instance of C++ class Clifford.
7163  */
7164 
7165  /* function exit code */
7166  __Pyx_RefNannyFinishContext();
7167  }
7168 
7169  /* "PyClical.pyx":626
7170  * del self.instance
7171  *
7172  * def __contains__(self, x): # <<<<<<<<<<<<<<
7173  * """
7174  * Not applicable.
7175  */
7176 
7177  /* Python wrapper */
7178  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7179  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 ";
7180  #if CYTHON_COMPILING_IN_CPYTHON
7181  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7182  #endif
7183  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7184  int __pyx_r;
7185  __Pyx_RefNannyDeclarations
7186  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7187  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7188 
7189  /* function exit code */
7190  __Pyx_RefNannyFinishContext();
7191  return __pyx_r;
7192  }
7193 
7194  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7195  int __pyx_r;
7196  __Pyx_RefNannyDeclarations
7197  PyObject *__pyx_t_1 = NULL;
7198  __Pyx_RefNannySetupContext("__contains__", 0);
7199 
7200  /* "PyClical.pyx":635
7201  * TypeError: Not applicable.
7202  * """
7203  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7204  *
7205  * def __iter__(self):
7206  */
7207  __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)
7208  __Pyx_GOTREF(__pyx_t_1);
7209  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7210  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7211  __PYX_ERR(0, 635, __pyx_L1_error)
7212 
7213  /* "PyClical.pyx":626
7214  * del self.instance
7215  *
7216  * def __contains__(self, x): # <<<<<<<<<<<<<<
7217  * """
7218  * Not applicable.
7219  */
7220 
7221  /* function exit code */
7222  __pyx_L1_error:;
7223  __Pyx_XDECREF(__pyx_t_1);
7224  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7225  __pyx_r = -1;
7226  __Pyx_RefNannyFinishContext();
7227  return __pyx_r;
7228  }
7229 
7230  /* "PyClical.pyx":637
7231  * raise TypeError("Not applicable.")
7232  *
7233  * def __iter__(self): # <<<<<<<<<<<<<<
7234  * """
7235  * Not applicable.
7236  */
7237 
7238  /* Python wrapper */
7239  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7240  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 ";
7241  #if CYTHON_COMPILING_IN_CPYTHON
7242  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7243  #endif
7244  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7245  PyObject *__pyx_r = 0;
7246  __Pyx_RefNannyDeclarations
7247  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7248  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7249 
7250  /* function exit code */
7251  __Pyx_RefNannyFinishContext();
7252  return __pyx_r;
7253  }
7254 
7255  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7256  PyObject *__pyx_r = NULL;
7257  __Pyx_RefNannyDeclarations
7258  PyObject *__pyx_t_1 = NULL;
7259  __Pyx_RefNannySetupContext("__iter__", 0);
7260 
7261  /* "PyClical.pyx":646
7262  * TypeError: Not applicable.
7263  * """
7264  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7265  *
7266  * def reframe(self, ixt):
7267  */
7268  __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)
7269  __Pyx_GOTREF(__pyx_t_1);
7270  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7271  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7272  __PYX_ERR(0, 646, __pyx_L1_error)
7273 
7274  /* "PyClical.pyx":637
7275  * raise TypeError("Not applicable.")
7276  *
7277  * def __iter__(self): # <<<<<<<<<<<<<<
7278  * """
7279  * Not applicable.
7280  */
7281 
7282  /* function exit code */
7283  __pyx_L1_error:;
7284  __Pyx_XDECREF(__pyx_t_1);
7285  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7286  __pyx_r = NULL;
7287  __Pyx_XGIVEREF(__pyx_r);
7288  __Pyx_RefNannyFinishContext();
7289  return __pyx_r;
7290  }
7291 
7292  /* "PyClical.pyx":648
7293  * raise TypeError("Not applicable.")
7294  *
7295  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7296  * """
7297  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7298  */
7299 
7300  /* Python wrapper */
7301  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7302  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 ";
7303  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7304  PyObject *__pyx_r = 0;
7305  __Pyx_RefNannyDeclarations
7306  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7307  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7308 
7309  /* function exit code */
7310  __Pyx_RefNannyFinishContext();
7311  return __pyx_r;
7312  }
7313 
7314  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7315  PyObject *__pyx_v_error_msg_prefix = NULL;
7316  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7317  PyObject *__pyx_v_err = NULL;
7318  PyObject *__pyx_r = NULL;
7319  __Pyx_RefNannyDeclarations
7320  int __pyx_t_1;
7321  int __pyx_t_2;
7322  PyObject *__pyx_t_3 = NULL;
7323  PyObject *__pyx_t_4 = NULL;
7324  PyObject *__pyx_t_5 = NULL;
7325  PyObject *__pyx_t_6 = NULL;
7326  Clifford *__pyx_t_7;
7327  int __pyx_t_8;
7328  PyObject *__pyx_t_9 = NULL;
7329  PyObject *__pyx_t_10 = NULL;
7330  PyObject *__pyx_t_11 = NULL;
7331  PyObject *__pyx_t_12 = NULL;
7332  PyObject *__pyx_t_13 = NULL;
7333  __Pyx_RefNannySetupContext("reframe", 0);
7334 
7335  /* "PyClical.pyx":658
7336  * True
7337  * """
7338  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7339  * if isinstance(ixt, index_set):
7340  * try:
7341  */
7342  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7343  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7344 
7345  /* "PyClical.pyx":659
7346  * """
7347  * error_msg_prefix = "Cannot reframe"
7348  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7349  * try:
7350  * result = clifford()
7351  */
7352  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7353  __pyx_t_2 = (__pyx_t_1 != 0);
7354  if (__pyx_t_2) {
7355 
7356  /* "PyClical.pyx":660
7357  * error_msg_prefix = "Cannot reframe"
7358  * if isinstance(ixt, index_set):
7359  * try: # <<<<<<<<<<<<<<
7360  * result = clifford()
7361  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7362  */
7363  {
7364  __Pyx_PyThreadState_declare
7365  __Pyx_PyThreadState_assign
7366  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7367  __Pyx_XGOTREF(__pyx_t_3);
7368  __Pyx_XGOTREF(__pyx_t_4);
7369  __Pyx_XGOTREF(__pyx_t_5);
7370  /*try:*/ {
7371 
7372  /* "PyClical.pyx":661
7373  * if isinstance(ixt, index_set):
7374  * try:
7375  * result = clifford() # <<<<<<<<<<<<<<
7376  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7377  * except RuntimeError as err:
7378  */
7379  __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)
7380  __Pyx_GOTREF(__pyx_t_6);
7381  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7382  __pyx_t_6 = 0;
7383 
7384  /* "PyClical.pyx":662
7385  * try:
7386  * result = clifford()
7387  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7388  * except RuntimeError as err:
7389  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7390  */
7391  try {
7392  __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)));
7393  } catch(...) {
7394  __Pyx_CppExn2PyErr();
7395  __PYX_ERR(0, 662, __pyx_L4_error)
7396  }
7397  __pyx_v_result->instance = __pyx_t_7;
7398 
7399  /* "PyClical.pyx":660
7400  * error_msg_prefix = "Cannot reframe"
7401  * if isinstance(ixt, index_set):
7402  * try: # <<<<<<<<<<<<<<
7403  * result = clifford()
7404  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7405  */
7406  }
7407  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7408  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7409  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7410  goto __pyx_L9_try_end;
7411  __pyx_L4_error:;
7412  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7413 
7414  /* "PyClical.pyx":663
7415  * result = clifford()
7416  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7417  * except RuntimeError as err: # <<<<<<<<<<<<<<
7418  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7419  * + str(ixt) + ":"
7420  */
7421  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7422  if (__pyx_t_8) {
7423  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7424  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7425  __Pyx_GOTREF(__pyx_t_6);
7426  __Pyx_GOTREF(__pyx_t_9);
7427  __Pyx_GOTREF(__pyx_t_10);
7428  __Pyx_INCREF(__pyx_t_9);
7429  __pyx_v_err = __pyx_t_9;
7430 
7431  /* "PyClical.pyx":664
7432  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7433  * except RuntimeError as err:
7434  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7435  * + str(ixt) + ":"
7436  * + "\n\t" + str(err))
7437  */
7438  __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)
7439  __Pyx_GOTREF(__pyx_t_11);
7440  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7441  __Pyx_GOTREF(__pyx_t_12);
7442  __Pyx_INCREF(((PyObject *)__pyx_v_self));
7443  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7444  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
7445  __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)
7446  __Pyx_GOTREF(__pyx_t_13);
7447  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7448  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7449  __Pyx_GOTREF(__pyx_t_12);
7450  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7451  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7452  __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)
7453  __Pyx_GOTREF(__pyx_t_13);
7454  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7455 
7456  /* "PyClical.pyx":665
7457  * except RuntimeError as err:
7458  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7459  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7460  * + "\n\t" + str(err))
7461  * else:
7462  */
7463  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7464  __Pyx_GOTREF(__pyx_t_12);
7465  __Pyx_INCREF(__pyx_v_ixt);
7466  __Pyx_GIVEREF(__pyx_v_ixt);
7467  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_ixt);
7468  __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)
7469  __Pyx_GOTREF(__pyx_t_11);
7470  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7471  __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7472  __Pyx_GOTREF(__pyx_t_12);
7473  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7474  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7475  __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)
7476  __Pyx_GOTREF(__pyx_t_11);
7477  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7478 
7479  /* "PyClical.pyx":666
7480  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7481  * + str(ixt) + ":"
7482  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7483  * else:
7484  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7485  */
7486  __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)
7487  __Pyx_GOTREF(__pyx_t_12);
7488  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7489  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7490  __Pyx_GOTREF(__pyx_t_11);
7491  __Pyx_INCREF(__pyx_v_err);
7492  __Pyx_GIVEREF(__pyx_v_err);
7493  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_err);
7494  __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)
7495  __Pyx_GOTREF(__pyx_t_13);
7496  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7497  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7498  __Pyx_GOTREF(__pyx_t_11);
7499  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7500  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7501 
7502  /* "PyClical.pyx":664
7503  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7504  * except RuntimeError as err:
7505  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7506  * + str(ixt) + ":"
7507  * + "\n\t" + str(err))
7508  */
7509  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7510  __Pyx_GOTREF(__pyx_t_13);
7511  __Pyx_GIVEREF(__pyx_t_11);
7512  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11);
7513  __pyx_t_11 = 0;
7514  __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)
7515  __Pyx_GOTREF(__pyx_t_11);
7516  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7517  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
7518  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7519  __PYX_ERR(0, 664, __pyx_L6_except_error)
7520  }
7521  goto __pyx_L6_except_error;
7522  __pyx_L6_except_error:;
7523 
7524  /* "PyClical.pyx":660
7525  * error_msg_prefix = "Cannot reframe"
7526  * if isinstance(ixt, index_set):
7527  * try: # <<<<<<<<<<<<<<
7528  * result = clifford()
7529  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7530  */
7531  __Pyx_XGIVEREF(__pyx_t_3);
7532  __Pyx_XGIVEREF(__pyx_t_4);
7533  __Pyx_XGIVEREF(__pyx_t_5);
7534  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7535  goto __pyx_L1_error;
7536  __pyx_L9_try_end:;
7537  }
7538 
7539  /* "PyClical.pyx":659
7540  * """
7541  * error_msg_prefix = "Cannot reframe"
7542  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7543  * try:
7544  * result = clifford()
7545  */
7546  goto __pyx_L3;
7547  }
7548 
7549  /* "PyClical.pyx":668
7550  * + "\n\t" + str(err))
7551  * else:
7552  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7553  * return result
7554  *
7555  */
7556  /*else*/ {
7557  __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)
7558  __Pyx_GOTREF(__pyx_t_10);
7559  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7560  __Pyx_GOTREF(__pyx_t_9);
7561  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7562  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_ixt)));
7563  PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)Py_TYPE(__pyx_v_ixt)));
7564  __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)
7565  __Pyx_GOTREF(__pyx_t_6);
7566  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7567  __pyx_t_9 = PyNumber_Add(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7568  __Pyx_GOTREF(__pyx_t_9);
7569  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7570  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7571  __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7572  __Pyx_GOTREF(__pyx_t_6);
7573  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7574  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7575  __Pyx_GOTREF(__pyx_t_9);
7576  __Pyx_GIVEREF(__pyx_t_6);
7577  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
7578  __pyx_t_6 = 0;
7579  __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)
7580  __Pyx_GOTREF(__pyx_t_6);
7581  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7582  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7583  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7584  __PYX_ERR(0, 668, __pyx_L1_error)
7585  }
7586  __pyx_L3:;
7587 
7588  /* "PyClical.pyx":669
7589  * else:
7590  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7591  * return result # <<<<<<<<<<<<<<
7592  *
7593  * def __richcmp__(lhs, rhs, int op):
7594  */
7595  __Pyx_XDECREF(__pyx_r);
7596  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7597  __pyx_r = ((PyObject *)__pyx_v_result);
7598  goto __pyx_L0;
7599 
7600  /* "PyClical.pyx":648
7601  * raise TypeError("Not applicable.")
7602  *
7603  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7604  * """
7605  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7606  */
7607 
7608  /* function exit code */
7609  __pyx_L1_error:;
7610  __Pyx_XDECREF(__pyx_t_6);
7611  __Pyx_XDECREF(__pyx_t_9);
7612  __Pyx_XDECREF(__pyx_t_10);
7613  __Pyx_XDECREF(__pyx_t_11);
7614  __Pyx_XDECREF(__pyx_t_12);
7615  __Pyx_XDECREF(__pyx_t_13);
7616  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7617  __pyx_r = NULL;
7618  __pyx_L0:;
7619  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7620  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7621  __Pyx_XDECREF(__pyx_v_err);
7622  __Pyx_XGIVEREF(__pyx_r);
7623  __Pyx_RefNannyFinishContext();
7624  return __pyx_r;
7625  }
7626 
7627  /* "PyClical.pyx":671
7628  * return result
7629  *
7630  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7631  * """
7632  * Compare objects of type clifford.
7633  */
7634 
7635  /* Python wrapper */
7636  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7637  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7638  PyObject *__pyx_r = 0;
7639  __Pyx_RefNannyDeclarations
7640  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7641  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7642 
7643  /* function exit code */
7644  __Pyx_RefNannyFinishContext();
7645  return __pyx_r;
7646  }
7647 
7648  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7649  PyObject *__pyx_r = NULL;
7650  __Pyx_RefNannyDeclarations
7651  int __pyx_t_1;
7652  int __pyx_t_2;
7653  int __pyx_t_3;
7654  PyObject *__pyx_t_4 = NULL;
7655  PyObject *__pyx_t_5 = NULL;
7656  PyObject *__pyx_t_6 = NULL;
7657  __Pyx_RefNannySetupContext("__richcmp__", 0);
7658 
7659  /* "PyClical.pyx":690
7660  * True
7661  * """
7662  * if op == 2: # == # <<<<<<<<<<<<<<
7663  * if (lhs is None) or (rhs is None):
7664  * return bool(lhs is rhs)
7665  */
7666  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7667  if (__pyx_t_1) {
7668 
7669  /* "PyClical.pyx":691
7670  * """
7671  * if op == 2: # ==
7672  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7673  * return bool(lhs is rhs)
7674  * else:
7675  */
7676  __pyx_t_2 = (__pyx_v_lhs == Py_None);
7677  __pyx_t_3 = (__pyx_t_2 != 0);
7678  if (!__pyx_t_3) {
7679  } else {
7680  __pyx_t_1 = __pyx_t_3;
7681  goto __pyx_L5_bool_binop_done;
7682  }
7683  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7684  __pyx_t_2 = (__pyx_t_3 != 0);
7685  __pyx_t_1 = __pyx_t_2;
7686  __pyx_L5_bool_binop_done:;
7687  if (__pyx_t_1) {
7688 
7689  /* "PyClical.pyx":692
7690  * if op == 2: # ==
7691  * if (lhs is None) or (rhs is None):
7692  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7693  * else:
7694  * return bool( toClifford(lhs) == toClifford(rhs) )
7695  */
7696  __Pyx_XDECREF(__pyx_r);
7697  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7698  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7699  __Pyx_GOTREF(__pyx_t_4);
7700  __pyx_r = __pyx_t_4;
7701  __pyx_t_4 = 0;
7702  goto __pyx_L0;
7703 
7704  /* "PyClical.pyx":691
7705  * """
7706  * if op == 2: # ==
7707  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7708  * return bool(lhs is rhs)
7709  * else:
7710  */
7711  }
7712 
7713  /* "PyClical.pyx":694
7714  * return bool(lhs is rhs)
7715  * else:
7716  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7717  * elif op == 3: # !=
7718  * if (lhs is None) or (rhs is None):
7719  */
7720  /*else*/ {
7721  __Pyx_XDECREF(__pyx_r);
7722  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7723  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7724  __Pyx_GOTREF(__pyx_t_4);
7725  __pyx_r = __pyx_t_4;
7726  __pyx_t_4 = 0;
7727  goto __pyx_L0;
7728  }
7729 
7730  /* "PyClical.pyx":690
7731  * True
7732  * """
7733  * if op == 2: # == # <<<<<<<<<<<<<<
7734  * if (lhs is None) or (rhs is None):
7735  * return bool(lhs is rhs)
7736  */
7737  }
7738 
7739  /* "PyClical.pyx":695
7740  * else:
7741  * return bool( toClifford(lhs) == toClifford(rhs) )
7742  * elif op == 3: # != # <<<<<<<<<<<<<<
7743  * if (lhs is None) or (rhs is None):
7744  * return not bool(lhs is rhs)
7745  */
7746  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7747  if (__pyx_t_1) {
7748 
7749  /* "PyClical.pyx":696
7750  * return bool( toClifford(lhs) == toClifford(rhs) )
7751  * elif op == 3: # !=
7752  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7753  * return not bool(lhs is rhs)
7754  * else:
7755  */
7756  __pyx_t_2 = (__pyx_v_lhs == Py_None);
7757  __pyx_t_3 = (__pyx_t_2 != 0);
7758  if (!__pyx_t_3) {
7759  } else {
7760  __pyx_t_1 = __pyx_t_3;
7761  goto __pyx_L8_bool_binop_done;
7762  }
7763  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7764  __pyx_t_2 = (__pyx_t_3 != 0);
7765  __pyx_t_1 = __pyx_t_2;
7766  __pyx_L8_bool_binop_done:;
7767  if (__pyx_t_1) {
7768 
7769  /* "PyClical.pyx":697
7770  * elif op == 3: # !=
7771  * if (lhs is None) or (rhs is None):
7772  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7773  * else:
7774  * return bool( toClifford(lhs) != toClifford(rhs) )
7775  */
7776  __Pyx_XDECREF(__pyx_r);
7777  __pyx_t_1 = (__pyx_v_lhs == __pyx_v_rhs);
7778  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7779  __Pyx_GOTREF(__pyx_t_4);
7780  __pyx_r = __pyx_t_4;
7781  __pyx_t_4 = 0;
7782  goto __pyx_L0;
7783 
7784  /* "PyClical.pyx":696
7785  * return bool( toClifford(lhs) == toClifford(rhs) )
7786  * elif op == 3: # !=
7787  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7788  * return not bool(lhs is rhs)
7789  * else:
7790  */
7791  }
7792 
7793  /* "PyClical.pyx":699
7794  * return not bool(lhs is rhs)
7795  * else:
7796  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7797  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7798  * raise TypeError("This comparison operator is not implemented for "
7799  */
7800  /*else*/ {
7801  __Pyx_XDECREF(__pyx_r);
7802  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(__pyx_v_lhs) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7803  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7804  __Pyx_GOTREF(__pyx_t_4);
7805  __pyx_r = __pyx_t_4;
7806  __pyx_t_4 = 0;
7807  goto __pyx_L0;
7808  }
7809 
7810  /* "PyClical.pyx":695
7811  * else:
7812  * return bool( toClifford(lhs) == toClifford(rhs) )
7813  * elif op == 3: # != # <<<<<<<<<<<<<<
7814  * if (lhs is None) or (rhs is None):
7815  * return not bool(lhs is rhs)
7816  */
7817  }
7818 
7819  /* "PyClical.pyx":700
7820  * else:
7821  * return bool( toClifford(lhs) != toClifford(rhs) )
7822  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7823  * raise TypeError("This comparison operator is not implemented for "
7824  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7825  */
7826  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_lhs, __pyx_ptype_8PyClical_clifford);
7827  __pyx_t_3 = (__pyx_t_2 != 0);
7828  if (!__pyx_t_3) {
7829  } else {
7830  __pyx_t_1 = __pyx_t_3;
7831  goto __pyx_L10_bool_binop_done;
7832  }
7833  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7834  __pyx_t_2 = (__pyx_t_3 != 0);
7835  __pyx_t_1 = __pyx_t_2;
7836  __pyx_L10_bool_binop_done:;
7837  if (__pyx_t_1) {
7838 
7839  /* "PyClical.pyx":702
7840  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7841  * raise TypeError("This comparison operator is not implemented for "
7842  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7843  * else:
7844  * return NotImplemented
7845  */
7846  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7847  __Pyx_GOTREF(__pyx_t_4);
7848  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7849  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_lhs)));
7850  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_lhs)));
7851  __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)
7852  __Pyx_GOTREF(__pyx_t_5);
7853  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7854  __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)
7855  __Pyx_GOTREF(__pyx_t_4);
7856  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7857  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7858  __Pyx_GOTREF(__pyx_t_5);
7859  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7860  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7861  __Pyx_GOTREF(__pyx_t_4);
7862  __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7863  __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_rhs)));
7864  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_rhs)));
7865  __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)
7866  __Pyx_GOTREF(__pyx_t_6);
7867  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7868  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7869  __Pyx_GOTREF(__pyx_t_4);
7870  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7871  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7872  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7873  __Pyx_GOTREF(__pyx_t_6);
7874  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7875 
7876  /* "PyClical.pyx":701
7877  * return bool( toClifford(lhs) != toClifford(rhs) )
7878  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7879  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7880  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7881  * else:
7882  */
7883  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error)
7884  __Pyx_GOTREF(__pyx_t_4);
7885  __Pyx_GIVEREF(__pyx_t_6);
7886  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
7887  __pyx_t_6 = 0;
7888  __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)
7889  __Pyx_GOTREF(__pyx_t_6);
7890  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7891  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7892  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7893  __PYX_ERR(0, 701, __pyx_L1_error)
7894 
7895  /* "PyClical.pyx":700
7896  * else:
7897  * return bool( toClifford(lhs) != toClifford(rhs) )
7898  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7899  * raise TypeError("This comparison operator is not implemented for "
7900  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7901  */
7902  }
7903 
7904  /* "PyClical.pyx":704
7905  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7906  * else:
7907  * return NotImplemented # <<<<<<<<<<<<<<
7908  *
7909  * def __getitem__(self, ixt):
7910  */
7911  /*else*/ {
7912  __Pyx_XDECREF(__pyx_r);
7913  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7914  __pyx_r = __pyx_builtin_NotImplemented;
7915  goto __pyx_L0;
7916  }
7917 
7918  /* "PyClical.pyx":671
7919  * return result
7920  *
7921  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7922  * """
7923  * Compare objects of type clifford.
7924  */
7925 
7926  /* function exit code */
7927  __pyx_L1_error:;
7928  __Pyx_XDECREF(__pyx_t_4);
7929  __Pyx_XDECREF(__pyx_t_5);
7930  __Pyx_XDECREF(__pyx_t_6);
7931  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7932  __pyx_r = NULL;
7933  __pyx_L0:;
7934  __Pyx_XGIVEREF(__pyx_r);
7935  __Pyx_RefNannyFinishContext();
7936  return __pyx_r;
7937  }
7938 
7939  /* "PyClical.pyx":706
7940  * return NotImplemented
7941  *
7942  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7943  * """
7944  * Subscripting: map from index set to scalar coordinate.
7945  */
7946 
7947  /* Python wrapper */
7948  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7949  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 ";
7950  #if CYTHON_COMPILING_IN_CPYTHON
7951  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7952  #endif
7953  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7954  PyObject *__pyx_r = 0;
7955  __Pyx_RefNannyDeclarations
7956  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7957  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7958 
7959  /* function exit code */
7960  __Pyx_RefNannyFinishContext();
7961  return __pyx_r;
7962  }
7963 
7964  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7965  PyObject *__pyx_r = NULL;
7966  __Pyx_RefNannyDeclarations
7967  PyObject *__pyx_t_1 = NULL;
7968  __Pyx_RefNannySetupContext("__getitem__", 0);
7969 
7970  /* "PyClical.pyx":719
7971  * 2.0
7972  * """
7973  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7974  *
7975  * def __neg__(self):
7976  */
7977  __Pyx_XDECREF(__pyx_r);
7978  __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)
7979  __Pyx_GOTREF(__pyx_t_1);
7980  __pyx_r = __pyx_t_1;
7981  __pyx_t_1 = 0;
7982  goto __pyx_L0;
7983 
7984  /* "PyClical.pyx":706
7985  * return NotImplemented
7986  *
7987  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7988  * """
7989  * Subscripting: map from index set to scalar coordinate.
7990  */
7991 
7992  /* function exit code */
7993  __pyx_L1_error:;
7994  __Pyx_XDECREF(__pyx_t_1);
7995  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7996  __pyx_r = NULL;
7997  __pyx_L0:;
7998  __Pyx_XGIVEREF(__pyx_r);
7999  __Pyx_RefNannyFinishContext();
8000  return __pyx_r;
8001  }
8002 
8003  /* "PyClical.pyx":721
8004  * return self.instance.getitem(toIndexSet(ixt))
8005  *
8006  * def __neg__(self): # <<<<<<<<<<<<<<
8007  * """
8008  * Unary -.
8009  */
8010 
8011  /* Python wrapper */
8012  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
8013  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
8014  #if CYTHON_COMPILING_IN_CPYTHON
8015  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
8016  #endif
8017  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
8018  PyObject *__pyx_r = 0;
8019  __Pyx_RefNannyDeclarations
8020  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
8021  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8022 
8023  /* function exit code */
8024  __Pyx_RefNannyFinishContext();
8025  return __pyx_r;
8026  }
8027 
8028  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8029  PyObject *__pyx_r = NULL;
8030  __Pyx_RefNannyDeclarations
8031  PyObject *__pyx_t_1 = NULL;
8032  PyObject *__pyx_t_2 = NULL;
8033  __Pyx_RefNannySetupContext("__neg__", 0);
8034 
8035  /* "PyClical.pyx":728
8036  * -{1}
8037  * """
8038  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
8039  *
8040  * def __pos__(self):
8041  */
8042  __Pyx_XDECREF(__pyx_r);
8043  __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)
8044  __Pyx_GOTREF(__pyx_t_1);
8045  __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)
8046  __Pyx_GOTREF(__pyx_t_2);
8047  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8048  __pyx_r = __pyx_t_2;
8049  __pyx_t_2 = 0;
8050  goto __pyx_L0;
8051 
8052  /* "PyClical.pyx":721
8053  * return self.instance.getitem(toIndexSet(ixt))
8054  *
8055  * def __neg__(self): # <<<<<<<<<<<<<<
8056  * """
8057  * Unary -.
8058  */
8059 
8060  /* function exit code */
8061  __pyx_L1_error:;
8062  __Pyx_XDECREF(__pyx_t_1);
8063  __Pyx_XDECREF(__pyx_t_2);
8064  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8065  __pyx_r = NULL;
8066  __pyx_L0:;
8067  __Pyx_XGIVEREF(__pyx_r);
8068  __Pyx_RefNannyFinishContext();
8069  return __pyx_r;
8070  }
8071 
8072  /* "PyClical.pyx":730
8073  * return clifford().wrap( self.instance.neg() )
8074  *
8075  * def __pos__(self): # <<<<<<<<<<<<<<
8076  * """
8077  * Unary +.
8078  */
8079 
8080  /* Python wrapper */
8081  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8082  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8083  #if CYTHON_COMPILING_IN_CPYTHON
8084  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8085  #endif
8086  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8087  PyObject *__pyx_r = 0;
8088  __Pyx_RefNannyDeclarations
8089  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8090  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8091 
8092  /* function exit code */
8093  __Pyx_RefNannyFinishContext();
8094  return __pyx_r;
8095  }
8096 
8097  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8098  PyObject *__pyx_r = NULL;
8099  __Pyx_RefNannyDeclarations
8100  PyObject *__pyx_t_1 = NULL;
8101  PyObject *__pyx_t_2 = NULL;
8102  __Pyx_RefNannySetupContext("__pos__", 0);
8103 
8104  /* "PyClical.pyx":737
8105  * {1}
8106  * """
8107  * return clifford(self) # <<<<<<<<<<<<<<
8108  *
8109  * def __add__(lhs, rhs):
8110  */
8111  __Pyx_XDECREF(__pyx_r);
8112  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
8113  __Pyx_GOTREF(__pyx_t_1);
8114  __Pyx_INCREF(((PyObject *)__pyx_v_self));
8115  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
8116  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
8117  __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)
8118  __Pyx_GOTREF(__pyx_t_2);
8119  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8120  __pyx_r = __pyx_t_2;
8121  __pyx_t_2 = 0;
8122  goto __pyx_L0;
8123 
8124  /* "PyClical.pyx":730
8125  * return clifford().wrap( self.instance.neg() )
8126  *
8127  * def __pos__(self): # <<<<<<<<<<<<<<
8128  * """
8129  * Unary +.
8130  */
8131 
8132  /* function exit code */
8133  __pyx_L1_error:;
8134  __Pyx_XDECREF(__pyx_t_1);
8135  __Pyx_XDECREF(__pyx_t_2);
8136  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8137  __pyx_r = NULL;
8138  __pyx_L0:;
8139  __Pyx_XGIVEREF(__pyx_r);
8140  __Pyx_RefNannyFinishContext();
8141  return __pyx_r;
8142  }
8143 
8144  /* "PyClical.pyx":739
8145  * return clifford(self)
8146  *
8147  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8148  * """
8149  * Geometric sum.
8150  */
8151 
8152  /* Python wrapper */
8153  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8154  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 ";
8155  #if CYTHON_COMPILING_IN_CPYTHON
8156  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8157  #endif
8158  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8159  PyObject *__pyx_r = 0;
8160  __Pyx_RefNannyDeclarations
8161  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8162  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8163 
8164  /* function exit code */
8165  __Pyx_RefNannyFinishContext();
8166  return __pyx_r;
8167  }
8168 
8169  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8170  PyObject *__pyx_r = NULL;
8171  __Pyx_RefNannyDeclarations
8172  PyObject *__pyx_t_1 = NULL;
8173  PyObject *__pyx_t_2 = NULL;
8174  __Pyx_RefNannySetupContext("__add__", 0);
8175 
8176  /* "PyClical.pyx":748
8177  * {1}+{2}
8178  * """
8179  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8180  *
8181  * def __iadd__(self, rhs):
8182  */
8183  __Pyx_XDECREF(__pyx_r);
8184  __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)
8185  __Pyx_GOTREF(__pyx_t_1);
8186  __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)
8187  __Pyx_GOTREF(__pyx_t_2);
8188  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8189  __pyx_r = __pyx_t_2;
8190  __pyx_t_2 = 0;
8191  goto __pyx_L0;
8192 
8193  /* "PyClical.pyx":739
8194  * return clifford(self)
8195  *
8196  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8197  * """
8198  * Geometric sum.
8199  */
8200 
8201  /* function exit code */
8202  __pyx_L1_error:;
8203  __Pyx_XDECREF(__pyx_t_1);
8204  __Pyx_XDECREF(__pyx_t_2);
8205  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8206  __pyx_r = NULL;
8207  __pyx_L0:;
8208  __Pyx_XGIVEREF(__pyx_r);
8209  __Pyx_RefNannyFinishContext();
8210  return __pyx_r;
8211  }
8212 
8213  /* "PyClical.pyx":750
8214  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8215  *
8216  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8217  * """
8218  * Geometric sum.
8219  */
8220 
8221  /* Python wrapper */
8222  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8223  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 ";
8224  #if CYTHON_COMPILING_IN_CPYTHON
8225  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8226  #endif
8227  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8228  PyObject *__pyx_r = 0;
8229  __Pyx_RefNannyDeclarations
8230  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8231  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8232 
8233  /* function exit code */
8234  __Pyx_RefNannyFinishContext();
8235  return __pyx_r;
8236  }
8237 
8238  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8239  PyObject *__pyx_r = NULL;
8240  __Pyx_RefNannyDeclarations
8241  PyObject *__pyx_t_1 = NULL;
8242  __Pyx_RefNannySetupContext("__iadd__", 0);
8243 
8244  /* "PyClical.pyx":757
8245  * 1+{2}
8246  * """
8247  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8248  *
8249  * def __sub__(lhs, rhs):
8250  */
8251  __Pyx_XDECREF(__pyx_r);
8252  __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)
8253  __Pyx_GOTREF(__pyx_t_1);
8254  __pyx_r = __pyx_t_1;
8255  __pyx_t_1 = 0;
8256  goto __pyx_L0;
8257 
8258  /* "PyClical.pyx":750
8259  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8260  *
8261  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8262  * """
8263  * Geometric sum.
8264  */
8265 
8266  /* function exit code */
8267  __pyx_L1_error:;
8268  __Pyx_XDECREF(__pyx_t_1);
8269  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8270  __pyx_r = NULL;
8271  __pyx_L0:;
8272  __Pyx_XGIVEREF(__pyx_r);
8273  __Pyx_RefNannyFinishContext();
8274  return __pyx_r;
8275  }
8276 
8277  /* "PyClical.pyx":759
8278  * return self.wrap( self.unwrap() + toClifford(rhs) )
8279  *
8280  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8281  * """
8282  * Geometric difference.
8283  */
8284 
8285  /* Python wrapper */
8286  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8287  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 ";
8288  #if CYTHON_COMPILING_IN_CPYTHON
8289  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8290  #endif
8291  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8292  PyObject *__pyx_r = 0;
8293  __Pyx_RefNannyDeclarations
8294  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8295  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8296 
8297  /* function exit code */
8298  __Pyx_RefNannyFinishContext();
8299  return __pyx_r;
8300  }
8301 
8302  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8303  PyObject *__pyx_r = NULL;
8304  __Pyx_RefNannyDeclarations
8305  PyObject *__pyx_t_1 = NULL;
8306  PyObject *__pyx_t_2 = NULL;
8307  __Pyx_RefNannySetupContext("__sub__", 0);
8308 
8309  /* "PyClical.pyx":768
8310  * {1}-{2}
8311  * """
8312  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8313  *
8314  * def __isub__(self, rhs):
8315  */
8316  __Pyx_XDECREF(__pyx_r);
8317  __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)
8318  __Pyx_GOTREF(__pyx_t_1);
8319  __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)
8320  __Pyx_GOTREF(__pyx_t_2);
8321  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8322  __pyx_r = __pyx_t_2;
8323  __pyx_t_2 = 0;
8324  goto __pyx_L0;
8325 
8326  /* "PyClical.pyx":759
8327  * return self.wrap( self.unwrap() + toClifford(rhs) )
8328  *
8329  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8330  * """
8331  * Geometric difference.
8332  */
8333 
8334  /* function exit code */
8335  __pyx_L1_error:;
8336  __Pyx_XDECREF(__pyx_t_1);
8337  __Pyx_XDECREF(__pyx_t_2);
8338  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8339  __pyx_r = NULL;
8340  __pyx_L0:;
8341  __Pyx_XGIVEREF(__pyx_r);
8342  __Pyx_RefNannyFinishContext();
8343  return __pyx_r;
8344  }
8345 
8346  /* "PyClical.pyx":770
8347  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8348  *
8349  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8350  * """
8351  * Geometric difference.
8352  */
8353 
8354  /* Python wrapper */
8355  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8356  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 ";
8357  #if CYTHON_COMPILING_IN_CPYTHON
8358  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8359  #endif
8360  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8361  PyObject *__pyx_r = 0;
8362  __Pyx_RefNannyDeclarations
8363  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8364  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8365 
8366  /* function exit code */
8367  __Pyx_RefNannyFinishContext();
8368  return __pyx_r;
8369  }
8370 
8371  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8372  PyObject *__pyx_r = NULL;
8373  __Pyx_RefNannyDeclarations
8374  PyObject *__pyx_t_1 = NULL;
8375  __Pyx_RefNannySetupContext("__isub__", 0);
8376 
8377  /* "PyClical.pyx":777
8378  * 1-{2}
8379  * """
8380  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8381  *
8382  * def __mul__(lhs, rhs):
8383  */
8384  __Pyx_XDECREF(__pyx_r);
8385  __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)
8386  __Pyx_GOTREF(__pyx_t_1);
8387  __pyx_r = __pyx_t_1;
8388  __pyx_t_1 = 0;
8389  goto __pyx_L0;
8390 
8391  /* "PyClical.pyx":770
8392  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8393  *
8394  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8395  * """
8396  * Geometric difference.
8397  */
8398 
8399  /* function exit code */
8400  __pyx_L1_error:;
8401  __Pyx_XDECREF(__pyx_t_1);
8402  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8403  __pyx_r = NULL;
8404  __pyx_L0:;
8405  __Pyx_XGIVEREF(__pyx_r);
8406  __Pyx_RefNannyFinishContext();
8407  return __pyx_r;
8408  }
8409 
8410  /* "PyClical.pyx":779
8411  * return self.wrap( self.unwrap() - toClifford(rhs) )
8412  *
8413  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8414  * """
8415  * Geometric product.
8416  */
8417 
8418  /* Python wrapper */
8419  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8420  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 ";
8421  #if CYTHON_COMPILING_IN_CPYTHON
8422  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8423  #endif
8424  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8425  PyObject *__pyx_r = 0;
8426  __Pyx_RefNannyDeclarations
8427  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8428  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8429 
8430  /* function exit code */
8431  __Pyx_RefNannyFinishContext();
8432  return __pyx_r;
8433  }
8434 
8435  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8436  PyObject *__pyx_r = NULL;
8437  __Pyx_RefNannyDeclarations
8438  PyObject *__pyx_t_1 = NULL;
8439  PyObject *__pyx_t_2 = NULL;
8440  __Pyx_RefNannySetupContext("__mul__", 0);
8441 
8442  /* "PyClical.pyx":790
8443  * {2}
8444  * """
8445  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8446  *
8447  * def __imul__(self, rhs):
8448  */
8449  __Pyx_XDECREF(__pyx_r);
8450  __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)
8451  __Pyx_GOTREF(__pyx_t_1);
8452  __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)
8453  __Pyx_GOTREF(__pyx_t_2);
8454  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8455  __pyx_r = __pyx_t_2;
8456  __pyx_t_2 = 0;
8457  goto __pyx_L0;
8458 
8459  /* "PyClical.pyx":779
8460  * return self.wrap( self.unwrap() - toClifford(rhs) )
8461  *
8462  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8463  * """
8464  * Geometric product.
8465  */
8466 
8467  /* function exit code */
8468  __pyx_L1_error:;
8469  __Pyx_XDECREF(__pyx_t_1);
8470  __Pyx_XDECREF(__pyx_t_2);
8471  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8472  __pyx_r = NULL;
8473  __pyx_L0:;
8474  __Pyx_XGIVEREF(__pyx_r);
8475  __Pyx_RefNannyFinishContext();
8476  return __pyx_r;
8477  }
8478 
8479  /* "PyClical.pyx":792
8480  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8481  *
8482  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8483  * """
8484  * Geometric product.
8485  */
8486 
8487  /* Python wrapper */
8488  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8489  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 ";
8490  #if CYTHON_COMPILING_IN_CPYTHON
8491  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8492  #endif
8493  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8494  PyObject *__pyx_r = 0;
8495  __Pyx_RefNannyDeclarations
8496  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8497  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8498 
8499  /* function exit code */
8500  __Pyx_RefNannyFinishContext();
8501  return __pyx_r;
8502  }
8503 
8504  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8505  PyObject *__pyx_r = NULL;
8506  __Pyx_RefNannyDeclarations
8507  PyObject *__pyx_t_1 = NULL;
8508  __Pyx_RefNannySetupContext("__imul__", 0);
8509 
8510  /* "PyClical.pyx":803
8511  * {2}
8512  * """
8513  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8514  *
8515  * def __mod__(lhs, rhs):
8516  */
8517  __Pyx_XDECREF(__pyx_r);
8518  __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)
8519  __Pyx_GOTREF(__pyx_t_1);
8520  __pyx_r = __pyx_t_1;
8521  __pyx_t_1 = 0;
8522  goto __pyx_L0;
8523 
8524  /* "PyClical.pyx":792
8525  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8526  *
8527  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8528  * """
8529  * Geometric product.
8530  */
8531 
8532  /* function exit code */
8533  __pyx_L1_error:;
8534  __Pyx_XDECREF(__pyx_t_1);
8535  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8536  __pyx_r = NULL;
8537  __pyx_L0:;
8538  __Pyx_XGIVEREF(__pyx_r);
8539  __Pyx_RefNannyFinishContext();
8540  return __pyx_r;
8541  }
8542 
8543  /* "PyClical.pyx":805
8544  * return self.wrap( self.unwrap() * toClifford(rhs) )
8545  *
8546  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8547  * """
8548  * Contraction.
8549  */
8550 
8551  /* Python wrapper */
8552  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8553  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 ";
8554  #if CYTHON_COMPILING_IN_CPYTHON
8555  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8556  #endif
8557  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8558  PyObject *__pyx_r = 0;
8559  __Pyx_RefNannyDeclarations
8560  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8561  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8562 
8563  /* function exit code */
8564  __Pyx_RefNannyFinishContext();
8565  return __pyx_r;
8566  }
8567 
8568  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8569  PyObject *__pyx_r = NULL;
8570  __Pyx_RefNannyDeclarations
8571  PyObject *__pyx_t_1 = NULL;
8572  PyObject *__pyx_t_2 = NULL;
8573  __Pyx_RefNannySetupContext("__mod__", 0);
8574 
8575  /* "PyClical.pyx":818
8576  * {2}
8577  * """
8578  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8579  *
8580  * def __imod__(self, rhs):
8581  */
8582  __Pyx_XDECREF(__pyx_r);
8583  __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)
8584  __Pyx_GOTREF(__pyx_t_1);
8585  __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)
8586  __Pyx_GOTREF(__pyx_t_2);
8587  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8588  __pyx_r = __pyx_t_2;
8589  __pyx_t_2 = 0;
8590  goto __pyx_L0;
8591 
8592  /* "PyClical.pyx":805
8593  * return self.wrap( self.unwrap() * toClifford(rhs) )
8594  *
8595  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8596  * """
8597  * Contraction.
8598  */
8599 
8600  /* function exit code */
8601  __pyx_L1_error:;
8602  __Pyx_XDECREF(__pyx_t_1);
8603  __Pyx_XDECREF(__pyx_t_2);
8604  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8605  __pyx_r = NULL;
8606  __pyx_L0:;
8607  __Pyx_XGIVEREF(__pyx_r);
8608  __Pyx_RefNannyFinishContext();
8609  return __pyx_r;
8610  }
8611 
8612  /* "PyClical.pyx":820
8613  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8614  *
8615  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8616  * """
8617  * Contraction.
8618  */
8619 
8620  /* Python wrapper */
8621  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8622  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 ";
8623  #if CYTHON_COMPILING_IN_CPYTHON
8624  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8625  #endif
8626  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8627  PyObject *__pyx_r = 0;
8628  __Pyx_RefNannyDeclarations
8629  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8630  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8631 
8632  /* function exit code */
8633  __Pyx_RefNannyFinishContext();
8634  return __pyx_r;
8635  }
8636 
8637  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8638  PyObject *__pyx_r = NULL;
8639  __Pyx_RefNannyDeclarations
8640  PyObject *__pyx_t_1 = NULL;
8641  __Pyx_RefNannySetupContext("__imod__", 0);
8642 
8643  /* "PyClical.pyx":833
8644  * {2}
8645  * """
8646  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8647  *
8648  * def __and__(lhs, rhs):
8649  */
8650  __Pyx_XDECREF(__pyx_r);
8651  __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)
8652  __Pyx_GOTREF(__pyx_t_1);
8653  __pyx_r = __pyx_t_1;
8654  __pyx_t_1 = 0;
8655  goto __pyx_L0;
8656 
8657  /* "PyClical.pyx":820
8658  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8659  *
8660  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8661  * """
8662  * Contraction.
8663  */
8664 
8665  /* function exit code */
8666  __pyx_L1_error:;
8667  __Pyx_XDECREF(__pyx_t_1);
8668  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8669  __pyx_r = NULL;
8670  __pyx_L0:;
8671  __Pyx_XGIVEREF(__pyx_r);
8672  __Pyx_RefNannyFinishContext();
8673  return __pyx_r;
8674  }
8675 
8676  /* "PyClical.pyx":835
8677  * return self.wrap( self.unwrap() % toClifford(rhs) )
8678  *
8679  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8680  * """
8681  * Inner product.
8682  */
8683 
8684  /* Python wrapper */
8685  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8686  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 ";
8687  #if CYTHON_COMPILING_IN_CPYTHON
8688  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8689  #endif
8690  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8691  PyObject *__pyx_r = 0;
8692  __Pyx_RefNannyDeclarations
8693  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8694  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8695 
8696  /* function exit code */
8697  __Pyx_RefNannyFinishContext();
8698  return __pyx_r;
8699  }
8700 
8701  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8702  PyObject *__pyx_r = NULL;
8703  __Pyx_RefNannyDeclarations
8704  PyObject *__pyx_t_1 = NULL;
8705  PyObject *__pyx_t_2 = NULL;
8706  __Pyx_RefNannySetupContext("__and__", 0);
8707 
8708  /* "PyClical.pyx":848
8709  * {2}
8710  * """
8711  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8712  *
8713  * def __iand__(self, rhs):
8714  */
8715  __Pyx_XDECREF(__pyx_r);
8716  __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)
8717  __Pyx_GOTREF(__pyx_t_1);
8718  __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)
8719  __Pyx_GOTREF(__pyx_t_2);
8720  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8721  __pyx_r = __pyx_t_2;
8722  __pyx_t_2 = 0;
8723  goto __pyx_L0;
8724 
8725  /* "PyClical.pyx":835
8726  * return self.wrap( self.unwrap() % toClifford(rhs) )
8727  *
8728  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8729  * """
8730  * Inner product.
8731  */
8732 
8733  /* function exit code */
8734  __pyx_L1_error:;
8735  __Pyx_XDECREF(__pyx_t_1);
8736  __Pyx_XDECREF(__pyx_t_2);
8737  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8738  __pyx_r = NULL;
8739  __pyx_L0:;
8740  __Pyx_XGIVEREF(__pyx_r);
8741  __Pyx_RefNannyFinishContext();
8742  return __pyx_r;
8743  }
8744 
8745  /* "PyClical.pyx":850
8746  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8747  *
8748  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8749  * """
8750  * Inner product.
8751  */
8752 
8753  /* Python wrapper */
8754  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8755  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 ";
8756  #if CYTHON_COMPILING_IN_CPYTHON
8757  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8758  #endif
8759  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8760  PyObject *__pyx_r = 0;
8761  __Pyx_RefNannyDeclarations
8762  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8763  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8764 
8765  /* function exit code */
8766  __Pyx_RefNannyFinishContext();
8767  return __pyx_r;
8768  }
8769 
8770  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8771  PyObject *__pyx_r = NULL;
8772  __Pyx_RefNannyDeclarations
8773  PyObject *__pyx_t_1 = NULL;
8774  __Pyx_RefNannySetupContext("__iand__", 0);
8775 
8776  /* "PyClical.pyx":863
8777  * {2}
8778  * """
8779  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8780  *
8781  * def __xor__(lhs, rhs):
8782  */
8783  __Pyx_XDECREF(__pyx_r);
8784  __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)
8785  __Pyx_GOTREF(__pyx_t_1);
8786  __pyx_r = __pyx_t_1;
8787  __pyx_t_1 = 0;
8788  goto __pyx_L0;
8789 
8790  /* "PyClical.pyx":850
8791  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8792  *
8793  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8794  * """
8795  * Inner product.
8796  */
8797 
8798  /* function exit code */
8799  __pyx_L1_error:;
8800  __Pyx_XDECREF(__pyx_t_1);
8801  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8802  __pyx_r = NULL;
8803  __pyx_L0:;
8804  __Pyx_XGIVEREF(__pyx_r);
8805  __Pyx_RefNannyFinishContext();
8806  return __pyx_r;
8807  }
8808 
8809  /* "PyClical.pyx":865
8810  * return self.wrap( self.unwrap() & toClifford(rhs) )
8811  *
8812  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8813  * """
8814  * Outer product.
8815  */
8816 
8817  /* Python wrapper */
8818  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8819  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 ";
8820  #if CYTHON_COMPILING_IN_CPYTHON
8821  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8822  #endif
8823  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8824  PyObject *__pyx_r = 0;
8825  __Pyx_RefNannyDeclarations
8826  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8827  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8828 
8829  /* function exit code */
8830  __Pyx_RefNannyFinishContext();
8831  return __pyx_r;
8832  }
8833 
8834  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8835  PyObject *__pyx_r = NULL;
8836  __Pyx_RefNannyDeclarations
8837  PyObject *__pyx_t_1 = NULL;
8838  PyObject *__pyx_t_2 = NULL;
8839  __Pyx_RefNannySetupContext("__xor__", 0);
8840 
8841  /* "PyClical.pyx":878
8842  * 0
8843  * """
8844  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8845  *
8846  * def __ixor__(self, rhs):
8847  */
8848  __Pyx_XDECREF(__pyx_r);
8849  __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)
8850  __Pyx_GOTREF(__pyx_t_1);
8851  __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)
8852  __Pyx_GOTREF(__pyx_t_2);
8853  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8854  __pyx_r = __pyx_t_2;
8855  __pyx_t_2 = 0;
8856  goto __pyx_L0;
8857 
8858  /* "PyClical.pyx":865
8859  * return self.wrap( self.unwrap() & toClifford(rhs) )
8860  *
8861  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8862  * """
8863  * Outer product.
8864  */
8865 
8866  /* function exit code */
8867  __pyx_L1_error:;
8868  __Pyx_XDECREF(__pyx_t_1);
8869  __Pyx_XDECREF(__pyx_t_2);
8870  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8871  __pyx_r = NULL;
8872  __pyx_L0:;
8873  __Pyx_XGIVEREF(__pyx_r);
8874  __Pyx_RefNannyFinishContext();
8875  return __pyx_r;
8876  }
8877 
8878  /* "PyClical.pyx":880
8879  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8880  *
8881  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8882  * """
8883  * Outer product.
8884  */
8885 
8886  /* Python wrapper */
8887  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8888  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 ";
8889  #if CYTHON_COMPILING_IN_CPYTHON
8890  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8891  #endif
8892  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8893  PyObject *__pyx_r = 0;
8894  __Pyx_RefNannyDeclarations
8895  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8896  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8897 
8898  /* function exit code */
8899  __Pyx_RefNannyFinishContext();
8900  return __pyx_r;
8901  }
8902 
8903  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8904  PyObject *__pyx_r = NULL;
8905  __Pyx_RefNannyDeclarations
8906  PyObject *__pyx_t_1 = NULL;
8907  __Pyx_RefNannySetupContext("__ixor__", 0);
8908 
8909  /* "PyClical.pyx":893
8910  * 0
8911  * """
8912  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8913  *
8914  * def __div__(lhs, rhs):
8915  */
8916  __Pyx_XDECREF(__pyx_r);
8917  __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)
8918  __Pyx_GOTREF(__pyx_t_1);
8919  __pyx_r = __pyx_t_1;
8920  __pyx_t_1 = 0;
8921  goto __pyx_L0;
8922 
8923  /* "PyClical.pyx":880
8924  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8925  *
8926  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8927  * """
8928  * Outer product.
8929  */
8930 
8931  /* function exit code */
8932  __pyx_L1_error:;
8933  __Pyx_XDECREF(__pyx_t_1);
8934  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8935  __pyx_r = NULL;
8936  __pyx_L0:;
8937  __Pyx_XGIVEREF(__pyx_r);
8938  __Pyx_RefNannyFinishContext();
8939  return __pyx_r;
8940  }
8941 
8942  /* "PyClical.pyx":895
8943  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8944  *
8945  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8946  * """
8947  * Geometric quotient.
8948  */
8949 
8950  /* Python wrapper */
8951  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8952  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8953  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 ";
8954  #if CYTHON_COMPILING_IN_CPYTHON
8955  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8956  #endif
8957  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8958  PyObject *__pyx_r = 0;
8959  __Pyx_RefNannyDeclarations
8960  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8961  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8962 
8963  /* function exit code */
8964  __Pyx_RefNannyFinishContext();
8965  return __pyx_r;
8966  }
8967  #endif
8969  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8970  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8971  PyObject *__pyx_r = NULL;
8972  __Pyx_RefNannyDeclarations
8973  PyObject *__pyx_t_1 = NULL;
8974  PyObject *__pyx_t_2 = NULL;
8975  __Pyx_RefNannySetupContext("__div__", 0);
8976 
8977  /* "PyClical.pyx":908
8978  * -{2}
8979  * """
8980  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8981  *
8982  * def __idiv__(self, rhs):
8983  */
8984  __Pyx_XDECREF(__pyx_r);
8985  __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)
8986  __Pyx_GOTREF(__pyx_t_1);
8987  __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)
8988  __Pyx_GOTREF(__pyx_t_2);
8989  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8990  __pyx_r = __pyx_t_2;
8991  __pyx_t_2 = 0;
8992  goto __pyx_L0;
8993 
8994  /* "PyClical.pyx":895
8995  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8996  *
8997  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8998  * """
8999  * Geometric quotient.
9000  */
9001 
9002  /* function exit code */
9003  __pyx_L1_error:;
9004  __Pyx_XDECREF(__pyx_t_1);
9005  __Pyx_XDECREF(__pyx_t_2);
9006  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9007  __pyx_r = NULL;
9008  __pyx_L0:;
9009  __Pyx_XGIVEREF(__pyx_r);
9010  __Pyx_RefNannyFinishContext();
9011  return __pyx_r;
9012  }
9013  #endif
9015  /* "PyClical.pyx":910
9016  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9017  *
9018  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9019  * """
9020  * Geometric quotient.
9021  */
9022 
9023  /* Python wrapper */
9024  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9025  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9026  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 ";
9027  #if CYTHON_COMPILING_IN_CPYTHON
9028  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
9029  #endif
9030  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9031  PyObject *__pyx_r = 0;
9032  __Pyx_RefNannyDeclarations
9033  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
9034  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9035 
9036  /* function exit code */
9037  __Pyx_RefNannyFinishContext();
9038  return __pyx_r;
9039  }
9040  #endif
9042  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
9043  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9044  PyObject *__pyx_r = NULL;
9045  __Pyx_RefNannyDeclarations
9046  PyObject *__pyx_t_1 = NULL;
9047  __Pyx_RefNannySetupContext("__idiv__", 0);
9048 
9049  /* "PyClical.pyx":923
9050  * -{2}
9051  * """
9052  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
9053  *
9054  * def inv(self):
9055  */
9056  __Pyx_XDECREF(__pyx_r);
9057  __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)
9058  __Pyx_GOTREF(__pyx_t_1);
9059  __pyx_r = __pyx_t_1;
9060  __pyx_t_1 = 0;
9061  goto __pyx_L0;
9062 
9063  /* "PyClical.pyx":910
9064  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9065  *
9066  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9067  * """
9068  * Geometric quotient.
9069  */
9070 
9071  /* function exit code */
9072  __pyx_L1_error:;
9073  __Pyx_XDECREF(__pyx_t_1);
9074  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9075  __pyx_r = NULL;
9076  __pyx_L0:;
9077  __Pyx_XGIVEREF(__pyx_r);
9078  __Pyx_RefNannyFinishContext();
9079  return __pyx_r;
9080  }
9081  #endif
9083  /* "PyClical.pyx":925
9084  * return self.wrap( self.unwrap() / toClifford(rhs) )
9085  *
9086  * def inv(self): # <<<<<<<<<<<<<<
9087  * """
9088  * Geometric multiplicative inverse.
9089  */
9090 
9091  /* Python wrapper */
9092  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9093  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 ";
9094  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9095  PyObject *__pyx_r = 0;
9096  __Pyx_RefNannyDeclarations
9097  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9098  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9099 
9100  /* function exit code */
9101  __Pyx_RefNannyFinishContext();
9102  return __pyx_r;
9103  }
9104 
9105  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9106  PyObject *__pyx_r = NULL;
9107  __Pyx_RefNannyDeclarations
9108  PyObject *__pyx_t_1 = NULL;
9109  PyObject *__pyx_t_2 = NULL;
9110  __Pyx_RefNannySetupContext("inv", 0);
9111 
9112  /* "PyClical.pyx":936
9113  * -{1,2}
9114  * """
9115  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9116  *
9117  * def __or__(lhs, rhs):
9118  */
9119  __Pyx_XDECREF(__pyx_r);
9120  __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)
9121  __Pyx_GOTREF(__pyx_t_1);
9122  __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)
9123  __Pyx_GOTREF(__pyx_t_2);
9124  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9125  __pyx_r = __pyx_t_2;
9126  __pyx_t_2 = 0;
9127  goto __pyx_L0;
9128 
9129  /* "PyClical.pyx":925
9130  * return self.wrap( self.unwrap() / toClifford(rhs) )
9131  *
9132  * def inv(self): # <<<<<<<<<<<<<<
9133  * """
9134  * Geometric multiplicative inverse.
9135  */
9136 
9137  /* function exit code */
9138  __pyx_L1_error:;
9139  __Pyx_XDECREF(__pyx_t_1);
9140  __Pyx_XDECREF(__pyx_t_2);
9141  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9142  __pyx_r = NULL;
9143  __pyx_L0:;
9144  __Pyx_XGIVEREF(__pyx_r);
9145  __Pyx_RefNannyFinishContext();
9146  return __pyx_r;
9147  }
9148 
9149  /* "PyClical.pyx":938
9150  * return clifford().wrap( self.instance.inv() )
9151  *
9152  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9153  * """
9154  * Transform left hand side, using right hand side as a transformation.
9155  */
9156 
9157  /* Python wrapper */
9158  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9159  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 ";
9160  #if CYTHON_COMPILING_IN_CPYTHON
9161  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9162  #endif
9163  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9164  PyObject *__pyx_r = 0;
9165  __Pyx_RefNannyDeclarations
9166  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9167  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9168 
9169  /* function exit code */
9170  __Pyx_RefNannyFinishContext();
9171  return __pyx_r;
9172  }
9173 
9174  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9175  PyObject *__pyx_r = NULL;
9176  __Pyx_RefNannyDeclarations
9177  PyObject *__pyx_t_1 = NULL;
9178  PyObject *__pyx_t_2 = NULL;
9179  __Pyx_RefNannySetupContext("__or__", 0);
9180 
9181  /* "PyClical.pyx":947
9182  * -{1}
9183  * """
9184  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9185  *
9186  * def __ior__(self, rhs):
9187  */
9188  __Pyx_XDECREF(__pyx_r);
9189  __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)
9190  __Pyx_GOTREF(__pyx_t_1);
9191  __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)
9192  __Pyx_GOTREF(__pyx_t_2);
9193  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9194  __pyx_r = __pyx_t_2;
9195  __pyx_t_2 = 0;
9196  goto __pyx_L0;
9197 
9198  /* "PyClical.pyx":938
9199  * return clifford().wrap( self.instance.inv() )
9200  *
9201  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9202  * """
9203  * Transform left hand side, using right hand side as a transformation.
9204  */
9205 
9206  /* function exit code */
9207  __pyx_L1_error:;
9208  __Pyx_XDECREF(__pyx_t_1);
9209  __Pyx_XDECREF(__pyx_t_2);
9210  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9211  __pyx_r = NULL;
9212  __pyx_L0:;
9213  __Pyx_XGIVEREF(__pyx_r);
9214  __Pyx_RefNannyFinishContext();
9215  return __pyx_r;
9216  }
9217 
9218  /* "PyClical.pyx":949
9219  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9220  *
9221  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9222  * """
9223  * Transform left hand side, using right hand side as a transformation.
9224  */
9225 
9226  /* Python wrapper */
9227  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9228  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 ";
9229  #if CYTHON_COMPILING_IN_CPYTHON
9230  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9231  #endif
9232  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9233  PyObject *__pyx_r = 0;
9234  __Pyx_RefNannyDeclarations
9235  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9236  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9237 
9238  /* function exit code */
9239  __Pyx_RefNannyFinishContext();
9240  return __pyx_r;
9241  }
9242 
9243  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9244  PyObject *__pyx_r = NULL;
9245  __Pyx_RefNannyDeclarations
9246  PyObject *__pyx_t_1 = NULL;
9247  __Pyx_RefNannySetupContext("__ior__", 0);
9248 
9249  /* "PyClical.pyx":958
9250  * -{1}
9251  * """
9252  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9253  *
9254  * def __pow__(self, m, dummy):
9255  */
9256  __Pyx_XDECREF(__pyx_r);
9257  __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)
9258  __Pyx_GOTREF(__pyx_t_1);
9259  __pyx_r = __pyx_t_1;
9260  __pyx_t_1 = 0;
9261  goto __pyx_L0;
9262 
9263  /* "PyClical.pyx":949
9264  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9265  *
9266  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9267  * """
9268  * Transform left hand side, using right hand side as a transformation.
9269  */
9270 
9271  /* function exit code */
9272  __pyx_L1_error:;
9273  __Pyx_XDECREF(__pyx_t_1);
9274  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9275  __pyx_r = NULL;
9276  __pyx_L0:;
9277  __Pyx_XGIVEREF(__pyx_r);
9278  __Pyx_RefNannyFinishContext();
9279  return __pyx_r;
9280  }
9281 
9282  /* "PyClical.pyx":960
9283  * return self.wrap( self.unwrap() | toClifford(rhs) )
9284  *
9285  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9286  * """
9287  * Power: self to the m.
9288  */
9289 
9290  /* Python wrapper */
9291  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9292  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 ";
9293  #if CYTHON_COMPILING_IN_CPYTHON
9294  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9295  #endif
9296  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9297  PyObject *__pyx_r = 0;
9298  __Pyx_RefNannyDeclarations
9299  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9300  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9301 
9302  /* function exit code */
9303  __Pyx_RefNannyFinishContext();
9304  return __pyx_r;
9305  }
9306 
9307  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9308  PyObject *__pyx_r = NULL;
9309  __Pyx_RefNannyDeclarations
9310  PyObject *__pyx_t_1 = NULL;
9311  __Pyx_RefNannySetupContext("__pow__", 0);
9312 
9313  /* "PyClical.pyx":977
9314  * 1
9315  * """
9316  * return pow(self, m) # <<<<<<<<<<<<<<
9317  *
9318  * def pow(self, m):
9319  */
9320  __Pyx_XDECREF(__pyx_r);
9321  __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)
9322  __Pyx_GOTREF(__pyx_t_1);
9323  __pyx_r = __pyx_t_1;
9324  __pyx_t_1 = 0;
9325  goto __pyx_L0;
9326 
9327  /* "PyClical.pyx":960
9328  * return self.wrap( self.unwrap() | toClifford(rhs) )
9329  *
9330  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9331  * """
9332  * Power: self to the m.
9333  */
9334 
9335  /* function exit code */
9336  __pyx_L1_error:;
9337  __Pyx_XDECREF(__pyx_t_1);
9338  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9339  __pyx_r = NULL;
9340  __pyx_L0:;
9341  __Pyx_XGIVEREF(__pyx_r);
9342  __Pyx_RefNannyFinishContext();
9343  return __pyx_r;
9344  }
9345 
9346  /* "PyClical.pyx":979
9347  * return pow(self, m)
9348  *
9349  * def pow(self, m): # <<<<<<<<<<<<<<
9350  * """
9351  * Power: self to the m.
9352  */
9353 
9354  /* Python wrapper */
9355  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9356  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 ";
9357  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9358  PyObject *__pyx_r = 0;
9359  __Pyx_RefNannyDeclarations
9360  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9361  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9362 
9363  /* function exit code */
9364  __Pyx_RefNannyFinishContext();
9365  return __pyx_r;
9366  }
9367 
9368  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9369  PyObject *__pyx_r = NULL;
9370  __Pyx_RefNannyDeclarations
9371  PyObject *__pyx_t_1 = NULL;
9372  PyObject *__pyx_t_2 = NULL;
9373  int __pyx_t_3;
9374  int __pyx_t_4;
9375  int __pyx_t_5;
9376  __Pyx_RefNannySetupContext("pow", 0);
9377 
9378  /* "PyClical.pyx":998
9379  * 1
9380  * """
9381  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9382  * return clifford().wrap( self.instance.pow(m) )
9383  * else:
9384  */
9385  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9386  __Pyx_GOTREF(__pyx_t_1);
9387  __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)
9388  __Pyx_GOTREF(__pyx_t_2);
9389  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9390  __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)
9391  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9392  __pyx_t_4 = (__pyx_t_3 != 0);
9393  if (__pyx_t_4) {
9394 
9395  /* "PyClical.pyx":999
9396  * """
9397  * if isinstance(m, numbers.Integral):
9398  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9399  * else:
9400  * return exp(m * log(self))
9401  */
9402  __Pyx_XDECREF(__pyx_r);
9403  __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)
9404  __Pyx_GOTREF(__pyx_t_2);
9405  __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)
9406  __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)
9407  __Pyx_GOTREF(__pyx_t_1);
9408  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9409  __pyx_r = __pyx_t_1;
9410  __pyx_t_1 = 0;
9411  goto __pyx_L0;
9412 
9413  /* "PyClical.pyx":998
9414  * 1
9415  * """
9416  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9417  * return clifford().wrap( self.instance.pow(m) )
9418  * else:
9419  */
9420  }
9421 
9422  /* "PyClical.pyx":1001
9423  * return clifford().wrap( self.instance.pow(m) )
9424  * else:
9425  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9426  *
9427  * def outer_pow(self, m):
9428  */
9429  /*else*/ {
9430  __Pyx_XDECREF(__pyx_r);
9431  __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)
9432  __Pyx_GOTREF(__pyx_t_1);
9433  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9434  __Pyx_GOTREF(__pyx_t_2);
9435  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9436  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9437  __Pyx_GOTREF(__pyx_t_1);
9438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9439  __pyx_r = __pyx_t_1;
9440  __pyx_t_1 = 0;
9441  goto __pyx_L0;
9442  }
9443 
9444  /* "PyClical.pyx":979
9445  * return pow(self, m)
9446  *
9447  * def pow(self, m): # <<<<<<<<<<<<<<
9448  * """
9449  * Power: self to the m.
9450  */
9451 
9452  /* function exit code */
9453  __pyx_L1_error:;
9454  __Pyx_XDECREF(__pyx_t_1);
9455  __Pyx_XDECREF(__pyx_t_2);
9456  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9457  __pyx_r = NULL;
9458  __pyx_L0:;
9459  __Pyx_XGIVEREF(__pyx_r);
9460  __Pyx_RefNannyFinishContext();
9461  return __pyx_r;
9462  }
9463 
9464  /* "PyClical.pyx":1003
9465  * return exp(m * log(self))
9466  *
9467  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9468  * """
9469  * Outer product power.
9470  */
9471 
9472  /* Python wrapper */
9473  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9474  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 ";
9475  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9476  PyObject *__pyx_r = 0;
9477  __Pyx_RefNannyDeclarations
9478  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9479  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9480 
9481  /* function exit code */
9482  __Pyx_RefNannyFinishContext();
9483  return __pyx_r;
9484  }
9485 
9486  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9487  PyObject *__pyx_r = NULL;
9488  __Pyx_RefNannyDeclarations
9489  PyObject *__pyx_t_1 = NULL;
9490  int __pyx_t_2;
9491  PyObject *__pyx_t_3 = NULL;
9492  __Pyx_RefNannySetupContext("outer_pow", 0);
9493 
9494  /* "PyClical.pyx":1017
9495  *
9496  * """
9497  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9498  *
9499  * def __call__(self, grade):
9500  */
9501  __Pyx_XDECREF(__pyx_r);
9502  __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)
9503  __Pyx_GOTREF(__pyx_t_1);
9504  __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)
9505  __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)
9506  __Pyx_GOTREF(__pyx_t_3);
9507  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9508  __pyx_r = __pyx_t_3;
9509  __pyx_t_3 = 0;
9510  goto __pyx_L0;
9511 
9512  /* "PyClical.pyx":1003
9513  * return exp(m * log(self))
9514  *
9515  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9516  * """
9517  * Outer product power.
9518  */
9519 
9520  /* function exit code */
9521  __pyx_L1_error:;
9522  __Pyx_XDECREF(__pyx_t_1);
9523  __Pyx_XDECREF(__pyx_t_3);
9524  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9525  __pyx_r = NULL;
9526  __pyx_L0:;
9527  __Pyx_XGIVEREF(__pyx_r);
9528  __Pyx_RefNannyFinishContext();
9529  return __pyx_r;
9530  }
9531 
9532  /* "PyClical.pyx":1019
9533  * return clifford().wrap( self.instance.outer_pow(m) )
9534  *
9535  * def __call__(self, grade): # <<<<<<<<<<<<<<
9536  * """
9537  * Pure grade-vector part.
9538  */
9539 
9540  /* Python wrapper */
9541  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9542  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 ";
9543  #if CYTHON_COMPILING_IN_CPYTHON
9544  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9545  #endif
9546  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9547  PyObject *__pyx_v_grade = 0;
9548  PyObject *__pyx_r = 0;
9549  __Pyx_RefNannyDeclarations
9550  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9551  {
9552  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9553  PyObject* values[1] = {0};
9554  if (unlikely(__pyx_kwds)) {
9555  Py_ssize_t kw_args;
9556  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9557  switch (pos_args) {
9558  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9559  CYTHON_FALLTHROUGH;
9560  case 0: break;
9561  default: goto __pyx_L5_argtuple_error;
9562  }
9563  kw_args = PyDict_Size(__pyx_kwds);
9564  switch (pos_args) {
9565  case 0:
9566  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9567  else goto __pyx_L5_argtuple_error;
9568  }
9569  if (unlikely(kw_args > 0)) {
9570  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9571  }
9572  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9573  goto __pyx_L5_argtuple_error;
9574  } else {
9575  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9576  }
9577  __pyx_v_grade = values[0];
9578  }
9579  goto __pyx_L4_argument_unpacking_done;
9580  __pyx_L5_argtuple_error:;
9581  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9582  __pyx_L3_error:;
9583  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9584  __Pyx_RefNannyFinishContext();
9585  return NULL;
9586  __pyx_L4_argument_unpacking_done:;
9587  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9588 
9589  /* function exit code */
9590  __Pyx_RefNannyFinishContext();
9591  return __pyx_r;
9592  }
9593 
9594  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9595  PyObject *__pyx_r = NULL;
9596  __Pyx_RefNannyDeclarations
9597  PyObject *__pyx_t_1 = NULL;
9598  int __pyx_t_2;
9599  PyObject *__pyx_t_3 = NULL;
9600  __Pyx_RefNannySetupContext("__call__", 0);
9601 
9602  /* "PyClical.pyx":1036
9603  * 0
9604  * """
9605  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9606  *
9607  * def scalar(self):
9608  */
9609  __Pyx_XDECREF(__pyx_r);
9610  __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)
9611  __Pyx_GOTREF(__pyx_t_1);
9612  __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)
9613  __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)
9614  __Pyx_GOTREF(__pyx_t_3);
9615  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9616  __pyx_r = __pyx_t_3;
9617  __pyx_t_3 = 0;
9618  goto __pyx_L0;
9619 
9620  /* "PyClical.pyx":1019
9621  * return clifford().wrap( self.instance.outer_pow(m) )
9622  *
9623  * def __call__(self, grade): # <<<<<<<<<<<<<<
9624  * """
9625  * Pure grade-vector part.
9626  */
9627 
9628  /* function exit code */
9629  __pyx_L1_error:;
9630  __Pyx_XDECREF(__pyx_t_1);
9631  __Pyx_XDECREF(__pyx_t_3);
9632  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9633  __pyx_r = NULL;
9634  __pyx_L0:;
9635  __Pyx_XGIVEREF(__pyx_r);
9636  __Pyx_RefNannyFinishContext();
9637  return __pyx_r;
9638  }
9639 
9640  /* "PyClical.pyx":1038
9641  * return clifford().wrap( self.instance.call(grade) )
9642  *
9643  * def scalar(self): # <<<<<<<<<<<<<<
9644  * """
9645  * Scalar part.
9646  */
9647 
9648  /* Python wrapper */
9649  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9650  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 ";
9651  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9652  PyObject *__pyx_r = 0;
9653  __Pyx_RefNannyDeclarations
9654  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9655  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9656 
9657  /* function exit code */
9658  __Pyx_RefNannyFinishContext();
9659  return __pyx_r;
9660  }
9661 
9662  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9663  PyObject *__pyx_r = NULL;
9664  __Pyx_RefNannyDeclarations
9665  PyObject *__pyx_t_1 = NULL;
9666  __Pyx_RefNannySetupContext("scalar", 0);
9667 
9668  /* "PyClical.pyx":1047
9669  * 0.0
9670  * """
9671  * return self.instance.scalar() # <<<<<<<<<<<<<<
9672  *
9673  * def pure(self):
9674  */
9675  __Pyx_XDECREF(__pyx_r);
9676  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9677  __Pyx_GOTREF(__pyx_t_1);
9678  __pyx_r = __pyx_t_1;
9679  __pyx_t_1 = 0;
9680  goto __pyx_L0;
9681 
9682  /* "PyClical.pyx":1038
9683  * return clifford().wrap( self.instance.call(grade) )
9684  *
9685  * def scalar(self): # <<<<<<<<<<<<<<
9686  * """
9687  * Scalar part.
9688  */
9689 
9690  /* function exit code */
9691  __pyx_L1_error:;
9692  __Pyx_XDECREF(__pyx_t_1);
9693  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9694  __pyx_r = NULL;
9695  __pyx_L0:;
9696  __Pyx_XGIVEREF(__pyx_r);
9697  __Pyx_RefNannyFinishContext();
9698  return __pyx_r;
9699  }
9700 
9701  /* "PyClical.pyx":1049
9702  * return self.instance.scalar()
9703  *
9704  * def pure(self): # <<<<<<<<<<<<<<
9705  * """
9706  * Pure part.
9707  */
9708 
9709  /* Python wrapper */
9710  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9711  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 ";
9712  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9713  PyObject *__pyx_r = 0;
9714  __Pyx_RefNannyDeclarations
9715  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9716  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9717 
9718  /* function exit code */
9719  __Pyx_RefNannyFinishContext();
9720  return __pyx_r;
9721  }
9722 
9723  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9724  PyObject *__pyx_r = NULL;
9725  __Pyx_RefNannyDeclarations
9726  PyObject *__pyx_t_1 = NULL;
9727  PyObject *__pyx_t_2 = NULL;
9728  __Pyx_RefNannySetupContext("pure", 0);
9729 
9730  /* "PyClical.pyx":1058
9731  * {1,2}
9732  * """
9733  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9734  *
9735  * def even(self):
9736  */
9737  __Pyx_XDECREF(__pyx_r);
9738  __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)
9739  __Pyx_GOTREF(__pyx_t_1);
9740  __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)
9741  __Pyx_GOTREF(__pyx_t_2);
9742  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9743  __pyx_r = __pyx_t_2;
9744  __pyx_t_2 = 0;
9745  goto __pyx_L0;
9746 
9747  /* "PyClical.pyx":1049
9748  * return self.instance.scalar()
9749  *
9750  * def pure(self): # <<<<<<<<<<<<<<
9751  * """
9752  * Pure part.
9753  */
9754 
9755  /* function exit code */
9756  __pyx_L1_error:;
9757  __Pyx_XDECREF(__pyx_t_1);
9758  __Pyx_XDECREF(__pyx_t_2);
9759  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9760  __pyx_r = NULL;
9761  __pyx_L0:;
9762  __Pyx_XGIVEREF(__pyx_r);
9763  __Pyx_RefNannyFinishContext();
9764  return __pyx_r;
9765  }
9766 
9767  /* "PyClical.pyx":1060
9768  * return clifford().wrap( self.instance.pure() )
9769  *
9770  * def even(self): # <<<<<<<<<<<<<<
9771  * """
9772  * Even part of multivector, sum of even grade terms.
9773  */
9774 
9775  /* Python wrapper */
9776  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9777  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 ";
9778  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9779  PyObject *__pyx_r = 0;
9780  __Pyx_RefNannyDeclarations
9781  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9782  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9783 
9784  /* function exit code */
9785  __Pyx_RefNannyFinishContext();
9786  return __pyx_r;
9787  }
9788 
9789  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9790  PyObject *__pyx_r = NULL;
9791  __Pyx_RefNannyDeclarations
9792  PyObject *__pyx_t_1 = NULL;
9793  PyObject *__pyx_t_2 = NULL;
9794  __Pyx_RefNannySetupContext("even", 0);
9795 
9796  /* "PyClical.pyx":1067
9797  * 1+{1,2}
9798  * """
9799  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9800  *
9801  * def odd(self):
9802  */
9803  __Pyx_XDECREF(__pyx_r);
9804  __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)
9805  __Pyx_GOTREF(__pyx_t_1);
9806  __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)
9807  __Pyx_GOTREF(__pyx_t_2);
9808  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9809  __pyx_r = __pyx_t_2;
9810  __pyx_t_2 = 0;
9811  goto __pyx_L0;
9812 
9813  /* "PyClical.pyx":1060
9814  * return clifford().wrap( self.instance.pure() )
9815  *
9816  * def even(self): # <<<<<<<<<<<<<<
9817  * """
9818  * Even part of multivector, sum of even grade terms.
9819  */
9820 
9821  /* function exit code */
9822  __pyx_L1_error:;
9823  __Pyx_XDECREF(__pyx_t_1);
9824  __Pyx_XDECREF(__pyx_t_2);
9825  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9826  __pyx_r = NULL;
9827  __pyx_L0:;
9828  __Pyx_XGIVEREF(__pyx_r);
9829  __Pyx_RefNannyFinishContext();
9830  return __pyx_r;
9831  }
9832 
9833  /* "PyClical.pyx":1069
9834  * return clifford().wrap( self.instance.even() )
9835  *
9836  * def odd(self): # <<<<<<<<<<<<<<
9837  * """
9838  * Odd part of multivector, sum of odd grade terms.
9839  */
9840 
9841  /* Python wrapper */
9842  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9843  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 ";
9844  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9845  PyObject *__pyx_r = 0;
9846  __Pyx_RefNannyDeclarations
9847  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9848  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9849 
9850  /* function exit code */
9851  __Pyx_RefNannyFinishContext();
9852  return __pyx_r;
9853  }
9854 
9855  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9856  PyObject *__pyx_r = NULL;
9857  __Pyx_RefNannyDeclarations
9858  PyObject *__pyx_t_1 = NULL;
9859  PyObject *__pyx_t_2 = NULL;
9860  __Pyx_RefNannySetupContext("odd", 0);
9861 
9862  /* "PyClical.pyx":1076
9863  * {1}
9864  * """
9865  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9866  *
9867  * def vector_part(self, frm = None):
9868  */
9869  __Pyx_XDECREF(__pyx_r);
9870  __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)
9871  __Pyx_GOTREF(__pyx_t_1);
9872  __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)
9873  __Pyx_GOTREF(__pyx_t_2);
9874  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9875  __pyx_r = __pyx_t_2;
9876  __pyx_t_2 = 0;
9877  goto __pyx_L0;
9878 
9879  /* "PyClical.pyx":1069
9880  * return clifford().wrap( self.instance.even() )
9881  *
9882  * def odd(self): # <<<<<<<<<<<<<<
9883  * """
9884  * Odd part of multivector, sum of odd grade terms.
9885  */
9886 
9887  /* function exit code */
9888  __pyx_L1_error:;
9889  __Pyx_XDECREF(__pyx_t_1);
9890  __Pyx_XDECREF(__pyx_t_2);
9891  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9892  __pyx_r = NULL;
9893  __pyx_L0:;
9894  __Pyx_XGIVEREF(__pyx_r);
9895  __Pyx_RefNannyFinishContext();
9896  return __pyx_r;
9897  }
9898 
9899  /* "PyClical.pyx":1078
9900  * return clifford().wrap( self.instance.odd() )
9901  *
9902  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9903  * """
9904  * Vector part of multivector, as a Python list, with respect to frm.
9905  */
9906 
9907  /* Python wrapper */
9908  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9909  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 ";
9910  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9911  PyObject *__pyx_v_frm = 0;
9912  PyObject *__pyx_r = 0;
9913  __Pyx_RefNannyDeclarations
9914  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9915  {
9916  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9917  PyObject* values[1] = {0};
9918  values[0] = ((PyObject *)Py_None);
9919  if (unlikely(__pyx_kwds)) {
9920  Py_ssize_t kw_args;
9921  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9922  switch (pos_args) {
9923  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9924  CYTHON_FALLTHROUGH;
9925  case 0: break;
9926  default: goto __pyx_L5_argtuple_error;
9927  }
9928  kw_args = PyDict_Size(__pyx_kwds);
9929  switch (pos_args) {
9930  case 0:
9931  if (kw_args > 0) {
9932  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frm);
9933  if (value) { values[0] = value; kw_args--; }
9934  }
9935  }
9936  if (unlikely(kw_args > 0)) {
9937  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9938  }
9939  } else {
9940  switch (PyTuple_GET_SIZE(__pyx_args)) {
9941  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9942  CYTHON_FALLTHROUGH;
9943  case 0: break;
9944  default: goto __pyx_L5_argtuple_error;
9945  }
9946  }
9947  __pyx_v_frm = values[0];
9948  }
9949  goto __pyx_L4_argument_unpacking_done;
9950  __pyx_L5_argtuple_error:;
9951  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9952  __pyx_L3_error:;
9953  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9954  __Pyx_RefNannyFinishContext();
9955  return NULL;
9956  __pyx_L4_argument_unpacking_done:;
9957  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9958 
9959  /* function exit code */
9960  __Pyx_RefNannyFinishContext();
9961  return __pyx_r;
9962  }
9963 
9964  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9965  PyObject *__pyx_v_error_msg_prefix = NULL;
9966  std::vector<scalar_t> __pyx_v_vec;
9967  int __pyx_v_n;
9968  int __pyx_v_i;
9969  PyObject *__pyx_v_lst = NULL;
9970  PyObject *__pyx_v_err = NULL;
9971  PyObject *__pyx_r = NULL;
9972  __Pyx_RefNannyDeclarations
9973  PyObject *__pyx_t_1 = NULL;
9974  PyObject *__pyx_t_2 = NULL;
9975  PyObject *__pyx_t_3 = NULL;
9976  int __pyx_t_4;
9977  int __pyx_t_5;
9978  std::vector<scalar_t> __pyx_t_6;
9979  PyObject *__pyx_t_7 = NULL;
9980  int __pyx_t_8;
9981  int __pyx_t_9;
9982  PyObject *__pyx_t_10 = NULL;
9983  PyObject *__pyx_t_11 = NULL;
9984  PyObject *__pyx_t_12 = NULL;
9985  PyObject *__pyx_t_13 = NULL;
9986  PyObject *__pyx_t_14 = NULL;
9987  __Pyx_RefNannySetupContext("vector_part", 0);
9988 
9989  /* "PyClical.pyx":1087
9990  * [0.0, 2.0, 3.0]
9991  * """
9992  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9993  * cdef vector[scalar_t] vec
9994  * cdef int n
9995  */
9996  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9997  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9998 
9999  /* "PyClical.pyx":1091
10000  * cdef int n
10001  * cdef int i
10002  * try: # <<<<<<<<<<<<<<
10003  * if frm is None:
10004  * vec = self.instance.vector_part()
10005  */
10006  {
10007  __Pyx_PyThreadState_declare
10008  __Pyx_PyThreadState_assign
10009  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
10010  __Pyx_XGOTREF(__pyx_t_1);
10011  __Pyx_XGOTREF(__pyx_t_2);
10012  __Pyx_XGOTREF(__pyx_t_3);
10013  /*try:*/ {
10014 
10015  /* "PyClical.pyx":1092
10016  * cdef int i
10017  * try:
10018  * if frm is None: # <<<<<<<<<<<<<<
10019  * vec = self.instance.vector_part()
10020  * else:
10021  */
10022  __pyx_t_4 = (__pyx_v_frm == Py_None);
10023  __pyx_t_5 = (__pyx_t_4 != 0);
10024  if (__pyx_t_5) {
10025 
10026  /* "PyClical.pyx":1093
10027  * try:
10028  * if frm is None:
10029  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
10030  * else:
10031  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10032  */
10033  __pyx_t_6 = __pyx_v_self->instance->vector_part();
10034  __pyx_v_vec = __pyx_t_6;
10035 
10036  /* "PyClical.pyx":1092
10037  * cdef int i
10038  * try:
10039  * if frm is None: # <<<<<<<<<<<<<<
10040  * vec = self.instance.vector_part()
10041  * else:
10042  */
10043  goto __pyx_L9;
10044  }
10045 
10046  /* "PyClical.pyx":1095
10047  * vec = self.instance.vector_part()
10048  * else:
10049  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
10050  * n = vec.size()
10051  * lst = [0.0]*n
10052  */
10053  /*else*/ {
10054  try {
10055  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10056  } catch(...) {
10057  __Pyx_CppExn2PyErr();
10058  __PYX_ERR(0, 1095, __pyx_L3_error)
10059  }
10060  __pyx_v_vec = __pyx_t_6;
10061  }
10062  __pyx_L9:;
10063 
10064  /* "PyClical.pyx":1096
10065  * else:
10066  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10067  * n = vec.size() # <<<<<<<<<<<<<<
10068  * lst = [0.0]*n
10069  * for i in xrange(n):
10070  */
10071  __pyx_v_n = __pyx_v_vec.size();
10072 
10073  /* "PyClical.pyx":1097
10074  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10075  * n = vec.size()
10076  * lst = [0.0]*n # <<<<<<<<<<<<<<
10077  * for i in xrange(n):
10078  * lst[i] = vec[i]
10079  */
10080  __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)
10081  __Pyx_GOTREF(__pyx_t_7);
10082  { Py_ssize_t __pyx_temp;
10083  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10084  __Pyx_INCREF(__pyx_float_0_0);
10085  __Pyx_GIVEREF(__pyx_float_0_0);
10086  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10087  }
10088  }
10089  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10090  __pyx_t_7 = 0;
10091 
10092  /* "PyClical.pyx":1098
10093  * n = vec.size()
10094  * lst = [0.0]*n
10095  * for i in xrange(n): # <<<<<<<<<<<<<<
10096  * lst[i] = vec[i]
10097  * return lst
10098  */
10099  __pyx_t_8 = __pyx_v_n;
10100  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
10101  __pyx_v_i = __pyx_t_9;
10102 
10103  /* "PyClical.pyx":1099
10104  * lst = [0.0]*n
10105  * for i in xrange(n):
10106  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10107  * return lst
10108  * except RuntimeError as err:
10109  */
10110  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10111  __Pyx_GOTREF(__pyx_t_7);
10112  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)
10113  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10114  }
10115 
10116  /* "PyClical.pyx":1100
10117  * for i in xrange(n):
10118  * lst[i] = vec[i]
10119  * return lst # <<<<<<<<<<<<<<
10120  * except RuntimeError as err:
10121  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10122  */
10123  __Pyx_XDECREF(__pyx_r);
10124  __Pyx_INCREF(__pyx_v_lst);
10125  __pyx_r = __pyx_v_lst;
10126  goto __pyx_L7_try_return;
10127 
10128  /* "PyClical.pyx":1091
10129  * cdef int n
10130  * cdef int i
10131  * try: # <<<<<<<<<<<<<<
10132  * if frm is None:
10133  * vec = self.instance.vector_part()
10134  */
10135  }
10136  __pyx_L3_error:;
10137  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10138 
10139  /* "PyClical.pyx":1101
10140  * lst[i] = vec[i]
10141  * return lst
10142  * except RuntimeError as err: # <<<<<<<<<<<<<<
10143  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10144  * + repr(frm) + " as frame:\n\t"
10145  */
10146  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10147  if (__pyx_t_8) {
10148  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10149  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10150  __Pyx_GOTREF(__pyx_t_7);
10151  __Pyx_GOTREF(__pyx_t_10);
10152  __Pyx_GOTREF(__pyx_t_11);
10153  __Pyx_INCREF(__pyx_t_10);
10154  __pyx_v_err = __pyx_t_10;
10155 
10156  /* "PyClical.pyx":1102
10157  * return lst
10158  * except RuntimeError as err:
10159  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10160  * + repr(frm) + " as frame:\n\t"
10161  * + str(err))
10162  */
10163  __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10164  __Pyx_GOTREF(__pyx_t_12);
10165  __Pyx_INCREF(((PyObject *)__pyx_v_self));
10166  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
10167  PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_v_self));
10168  __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)
10169  __Pyx_GOTREF(__pyx_t_13);
10170  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10171  __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)
10172  __Pyx_GOTREF(__pyx_t_12);
10173  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10174  __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)
10175  __Pyx_GOTREF(__pyx_t_13);
10176  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10177 
10178  /* "PyClical.pyx":1103
10179  * except RuntimeError as err:
10180  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10181  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10182  * + str(err))
10183  *
10184  */
10185  __pyx_t_12 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10186  __Pyx_GOTREF(__pyx_t_12);
10187  __pyx_t_14 = PyNumber_Add(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10188  __Pyx_GOTREF(__pyx_t_14);
10189  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10190  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10191  __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)
10192  __Pyx_GOTREF(__pyx_t_12);
10193  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10194 
10195  /* "PyClical.pyx":1104
10196  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10197  * + repr(frm) + " as frame:\n\t"
10198  * + str(err)) # <<<<<<<<<<<<<<
10199  *
10200  * def involute(self):
10201  */
10202  __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10203  __Pyx_GOTREF(__pyx_t_14);
10204  __Pyx_INCREF(__pyx_v_err);
10205  __Pyx_GIVEREF(__pyx_v_err);
10206  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_err);
10207  __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)
10208  __Pyx_GOTREF(__pyx_t_13);
10209  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10210  __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10211  __Pyx_GOTREF(__pyx_t_14);
10212  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
10213  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10214 
10215  /* "PyClical.pyx":1102
10216  * return lst
10217  * except RuntimeError as err:
10218  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10219  * + repr(frm) + " as frame:\n\t"
10220  * + str(err))
10221  */
10222  __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10223  __Pyx_GOTREF(__pyx_t_13);
10224  __Pyx_GIVEREF(__pyx_t_14);
10225  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14);
10226  __pyx_t_14 = 0;
10227  __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)
10228  __Pyx_GOTREF(__pyx_t_14);
10229  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10230  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
10231  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10232  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10233  }
10234  goto __pyx_L5_except_error;
10235  __pyx_L5_except_error:;
10236 
10237  /* "PyClical.pyx":1091
10238  * cdef int n
10239  * cdef int i
10240  * try: # <<<<<<<<<<<<<<
10241  * if frm is None:
10242  * vec = self.instance.vector_part()
10243  */
10244  __Pyx_XGIVEREF(__pyx_t_1);
10245  __Pyx_XGIVEREF(__pyx_t_2);
10246  __Pyx_XGIVEREF(__pyx_t_3);
10247  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10248  goto __pyx_L1_error;
10249  __pyx_L7_try_return:;
10250  __Pyx_XGIVEREF(__pyx_t_1);
10251  __Pyx_XGIVEREF(__pyx_t_2);
10252  __Pyx_XGIVEREF(__pyx_t_3);
10253  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10254  goto __pyx_L0;
10255  }
10256 
10257  /* "PyClical.pyx":1078
10258  * return clifford().wrap( self.instance.odd() )
10259  *
10260  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10261  * """
10262  * Vector part of multivector, as a Python list, with respect to frm.
10263  */
10264 
10265  /* function exit code */
10266  __pyx_L1_error:;
10267  __Pyx_XDECREF(__pyx_t_7);
10268  __Pyx_XDECREF(__pyx_t_10);
10269  __Pyx_XDECREF(__pyx_t_11);
10270  __Pyx_XDECREF(__pyx_t_12);
10271  __Pyx_XDECREF(__pyx_t_13);
10272  __Pyx_XDECREF(__pyx_t_14);
10273  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10274  __pyx_r = NULL;
10275  __pyx_L0:;
10276  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10277  __Pyx_XDECREF(__pyx_v_lst);
10278  __Pyx_XDECREF(__pyx_v_err);
10279  __Pyx_XGIVEREF(__pyx_r);
10280  __Pyx_RefNannyFinishContext();
10281  return __pyx_r;
10282  }
10283 
10284  /* "PyClical.pyx":1106
10285  * + str(err))
10286  *
10287  * def involute(self): # <<<<<<<<<<<<<<
10288  * """
10289  * Main involution, each {i} is replaced by -{i} in each term,
10290  */
10291 
10292  /* Python wrapper */
10293  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10294  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 ";
10295  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10296  PyObject *__pyx_r = 0;
10297  __Pyx_RefNannyDeclarations
10298  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10299  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10300 
10301  /* function exit code */
10302  __Pyx_RefNannyFinishContext();
10303  return __pyx_r;
10304  }
10305 
10306  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10307  PyObject *__pyx_r = NULL;
10308  __Pyx_RefNannyDeclarations
10309  PyObject *__pyx_t_1 = NULL;
10310  PyObject *__pyx_t_2 = NULL;
10311  __Pyx_RefNannySetupContext("involute", 0);
10312 
10313  /* "PyClical.pyx":1120
10314  * 1-{1}+{1,2}
10315  * """
10316  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10317  *
10318  * def reverse(self):
10319  */
10320  __Pyx_XDECREF(__pyx_r);
10321  __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)
10322  __Pyx_GOTREF(__pyx_t_1);
10323  __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)
10324  __Pyx_GOTREF(__pyx_t_2);
10325  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10326  __pyx_r = __pyx_t_2;
10327  __pyx_t_2 = 0;
10328  goto __pyx_L0;
10329 
10330  /* "PyClical.pyx":1106
10331  * + str(err))
10332  *
10333  * def involute(self): # <<<<<<<<<<<<<<
10334  * """
10335  * Main involution, each {i} is replaced by -{i} in each term,
10336  */
10337 
10338  /* function exit code */
10339  __pyx_L1_error:;
10340  __Pyx_XDECREF(__pyx_t_1);
10341  __Pyx_XDECREF(__pyx_t_2);
10342  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10343  __pyx_r = NULL;
10344  __pyx_L0:;
10345  __Pyx_XGIVEREF(__pyx_r);
10346  __Pyx_RefNannyFinishContext();
10347  return __pyx_r;
10348  }
10349 
10350  /* "PyClical.pyx":1122
10351  * return clifford().wrap( self.instance.involute() )
10352  *
10353  * def reverse(self): # <<<<<<<<<<<<<<
10354  * """
10355  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10356  */
10357 
10358  /* Python wrapper */
10359  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10360  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 ";
10361  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10362  PyObject *__pyx_r = 0;
10363  __Pyx_RefNannyDeclarations
10364  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10365  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10366 
10367  /* function exit code */
10368  __Pyx_RefNannyFinishContext();
10369  return __pyx_r;
10370  }
10371 
10372  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10373  PyObject *__pyx_r = NULL;
10374  __Pyx_RefNannyDeclarations
10375  PyObject *__pyx_t_1 = NULL;
10376  PyObject *__pyx_t_2 = NULL;
10377  __Pyx_RefNannySetupContext("reverse", 0);
10378 
10379  /* "PyClical.pyx":1135
10380  * 1+{1}-{1,2}
10381  * """
10382  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10383  *
10384  * def conj(self):
10385  */
10386  __Pyx_XDECREF(__pyx_r);
10387  __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)
10388  __Pyx_GOTREF(__pyx_t_1);
10389  __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)
10390  __Pyx_GOTREF(__pyx_t_2);
10391  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10392  __pyx_r = __pyx_t_2;
10393  __pyx_t_2 = 0;
10394  goto __pyx_L0;
10395 
10396  /* "PyClical.pyx":1122
10397  * return clifford().wrap( self.instance.involute() )
10398  *
10399  * def reverse(self): # <<<<<<<<<<<<<<
10400  * """
10401  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10402  */
10403 
10404  /* function exit code */
10405  __pyx_L1_error:;
10406  __Pyx_XDECREF(__pyx_t_1);
10407  __Pyx_XDECREF(__pyx_t_2);
10408  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10409  __pyx_r = NULL;
10410  __pyx_L0:;
10411  __Pyx_XGIVEREF(__pyx_r);
10412  __Pyx_RefNannyFinishContext();
10413  return __pyx_r;
10414  }
10415 
10416  /* "PyClical.pyx":1137
10417  * return clifford().wrap( self.instance.reverse() )
10418  *
10419  * def conj(self): # <<<<<<<<<<<<<<
10420  * """
10421  * Conjugation, reverse o involute == involute o reverse.
10422  */
10423 
10424  /* Python wrapper */
10425  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10426  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 ";
10427  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10428  PyObject *__pyx_r = 0;
10429  __Pyx_RefNannyDeclarations
10430  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10431  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10432 
10433  /* function exit code */
10434  __Pyx_RefNannyFinishContext();
10435  return __pyx_r;
10436  }
10437 
10438  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10439  PyObject *__pyx_r = NULL;
10440  __Pyx_RefNannyDeclarations
10441  PyObject *__pyx_t_1 = NULL;
10442  PyObject *__pyx_t_2 = NULL;
10443  __Pyx_RefNannySetupContext("conj", 0);
10444 
10445  /* "PyClical.pyx":1150
10446  * 1-{1}-{1,2}
10447  * """
10448  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10449  *
10450  * def quad(self):
10451  */
10452  __Pyx_XDECREF(__pyx_r);
10453  __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)
10454  __Pyx_GOTREF(__pyx_t_1);
10455  __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)
10456  __Pyx_GOTREF(__pyx_t_2);
10457  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10458  __pyx_r = __pyx_t_2;
10459  __pyx_t_2 = 0;
10460  goto __pyx_L0;
10461 
10462  /* "PyClical.pyx":1137
10463  * return clifford().wrap( self.instance.reverse() )
10464  *
10465  * def conj(self): # <<<<<<<<<<<<<<
10466  * """
10467  * Conjugation, reverse o involute == involute o reverse.
10468  */
10469 
10470  /* function exit code */
10471  __pyx_L1_error:;
10472  __Pyx_XDECREF(__pyx_t_1);
10473  __Pyx_XDECREF(__pyx_t_2);
10474  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10475  __pyx_r = NULL;
10476  __pyx_L0:;
10477  __Pyx_XGIVEREF(__pyx_r);
10478  __Pyx_RefNannyFinishContext();
10479  return __pyx_r;
10480  }
10481 
10482  /* "PyClical.pyx":1152
10483  * return clifford().wrap( self.instance.conj() )
10484  *
10485  * def quad(self): # <<<<<<<<<<<<<<
10486  * """
10487  * Quadratic form == (rev(x)*x)(0).
10488  */
10489 
10490  /* Python wrapper */
10491  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10492  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 ";
10493  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10494  PyObject *__pyx_r = 0;
10495  __Pyx_RefNannyDeclarations
10496  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10497  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10498 
10499  /* function exit code */
10500  __Pyx_RefNannyFinishContext();
10501  return __pyx_r;
10502  }
10503 
10504  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10505  PyObject *__pyx_r = NULL;
10506  __Pyx_RefNannyDeclarations
10507  PyObject *__pyx_t_1 = NULL;
10508  __Pyx_RefNannySetupContext("quad", 0);
10509 
10510  /* "PyClical.pyx":1161
10511  * 2.0
10512  * """
10513  * return self.instance.quad() # <<<<<<<<<<<<<<
10514  *
10515  * def norm(self):
10516  */
10517  __Pyx_XDECREF(__pyx_r);
10518  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10519  __Pyx_GOTREF(__pyx_t_1);
10520  __pyx_r = __pyx_t_1;
10521  __pyx_t_1 = 0;
10522  goto __pyx_L0;
10523 
10524  /* "PyClical.pyx":1152
10525  * return clifford().wrap( self.instance.conj() )
10526  *
10527  * def quad(self): # <<<<<<<<<<<<<<
10528  * """
10529  * Quadratic form == (rev(x)*x)(0).
10530  */
10531 
10532  /* function exit code */
10533  __pyx_L1_error:;
10534  __Pyx_XDECREF(__pyx_t_1);
10535  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10536  __pyx_r = NULL;
10537  __pyx_L0:;
10538  __Pyx_XGIVEREF(__pyx_r);
10539  __Pyx_RefNannyFinishContext();
10540  return __pyx_r;
10541  }
10542 
10543  /* "PyClical.pyx":1163
10544  * return self.instance.quad()
10545  *
10546  * def norm(self): # <<<<<<<<<<<<<<
10547  * """
10548  * Norm == sum of squares of coordinates.
10549  */
10550 
10551  /* Python wrapper */
10552  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10553  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 ";
10554  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10555  PyObject *__pyx_r = 0;
10556  __Pyx_RefNannyDeclarations
10557  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10558  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10559 
10560  /* function exit code */
10561  __Pyx_RefNannyFinishContext();
10562  return __pyx_r;
10563  }
10564 
10565  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10566  PyObject *__pyx_r = NULL;
10567  __Pyx_RefNannyDeclarations
10568  PyObject *__pyx_t_1 = NULL;
10569  __Pyx_RefNannySetupContext("norm", 0);
10570 
10571  /* "PyClical.pyx":1172
10572  * 4.0
10573  * """
10574  * return self.instance.norm() # <<<<<<<<<<<<<<
10575  *
10576  * def abs(self):
10577  */
10578  __Pyx_XDECREF(__pyx_r);
10579  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10580  __Pyx_GOTREF(__pyx_t_1);
10581  __pyx_r = __pyx_t_1;
10582  __pyx_t_1 = 0;
10583  goto __pyx_L0;
10584 
10585  /* "PyClical.pyx":1163
10586  * return self.instance.quad()
10587  *
10588  * def norm(self): # <<<<<<<<<<<<<<
10589  * """
10590  * Norm == sum of squares of coordinates.
10591  */
10592 
10593  /* function exit code */
10594  __pyx_L1_error:;
10595  __Pyx_XDECREF(__pyx_t_1);
10596  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10597  __pyx_r = NULL;
10598  __pyx_L0:;
10599  __Pyx_XGIVEREF(__pyx_r);
10600  __Pyx_RefNannyFinishContext();
10601  return __pyx_r;
10602  }
10603 
10604  /* "PyClical.pyx":1174
10605  * return self.instance.norm()
10606  *
10607  * def abs(self): # <<<<<<<<<<<<<<
10608  * """
10609  * Absolute value: square root of norm.
10610  */
10611 
10612  /* Python wrapper */
10613  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10614  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 ";
10615  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10616  PyObject *__pyx_r = 0;
10617  __Pyx_RefNannyDeclarations
10618  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10619  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10620 
10621  /* function exit code */
10622  __Pyx_RefNannyFinishContext();
10623  return __pyx_r;
10624  }
10625 
10626  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10627  PyObject *__pyx_r = NULL;
10628  __Pyx_RefNannyDeclarations
10629  PyObject *__pyx_t_1 = NULL;
10630  __Pyx_RefNannySetupContext("abs", 0);
10631 
10632  /* "PyClical.pyx":1181
10633  * 2.0
10634  * """
10635  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10636  *
10637  * def max_abs(self):
10638  */
10639  __Pyx_XDECREF(__pyx_r);
10640  __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)
10641  __Pyx_GOTREF(__pyx_t_1);
10642  __pyx_r = __pyx_t_1;
10643  __pyx_t_1 = 0;
10644  goto __pyx_L0;
10645 
10646  /* "PyClical.pyx":1174
10647  * return self.instance.norm()
10648  *
10649  * def abs(self): # <<<<<<<<<<<<<<
10650  * """
10651  * Absolute value: square root of norm.
10652  */
10653 
10654  /* function exit code */
10655  __pyx_L1_error:;
10656  __Pyx_XDECREF(__pyx_t_1);
10657  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10658  __pyx_r = NULL;
10659  __pyx_L0:;
10660  __Pyx_XGIVEREF(__pyx_r);
10661  __Pyx_RefNannyFinishContext();
10662  return __pyx_r;
10663  }
10664 
10665  /* "PyClical.pyx":1183
10666  * return glucat.abs( self.unwrap() )
10667  *
10668  * def max_abs(self): # <<<<<<<<<<<<<<
10669  * """
10670  * Maximum of absolute values of components of multivector: multivector infinity norm.
10671  */
10672 
10673  /* Python wrapper */
10674  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10675  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 ";
10676  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10677  PyObject *__pyx_r = 0;
10678  __Pyx_RefNannyDeclarations
10679  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10680  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10681 
10682  /* function exit code */
10683  __Pyx_RefNannyFinishContext();
10684  return __pyx_r;
10685  }
10686 
10687  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10688  PyObject *__pyx_r = NULL;
10689  __Pyx_RefNannyDeclarations
10690  PyObject *__pyx_t_1 = NULL;
10691  __Pyx_RefNannySetupContext("max_abs", 0);
10692 
10693  /* "PyClical.pyx":1192
10694  * 3.0
10695  * """
10696  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10697  *
10698  * def truncated(self, limit):
10699  */
10700  __Pyx_XDECREF(__pyx_r);
10701  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10702  __Pyx_GOTREF(__pyx_t_1);
10703  __pyx_r = __pyx_t_1;
10704  __pyx_t_1 = 0;
10705  goto __pyx_L0;
10706 
10707  /* "PyClical.pyx":1183
10708  * return glucat.abs( self.unwrap() )
10709  *
10710  * def max_abs(self): # <<<<<<<<<<<<<<
10711  * """
10712  * Maximum of absolute values of components of multivector: multivector infinity norm.
10713  */
10714 
10715  /* function exit code */
10716  __pyx_L1_error:;
10717  __Pyx_XDECREF(__pyx_t_1);
10718  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10719  __pyx_r = NULL;
10720  __pyx_L0:;
10721  __Pyx_XGIVEREF(__pyx_r);
10722  __Pyx_RefNannyFinishContext();
10723  return __pyx_r;
10724  }
10725 
10726  /* "PyClical.pyx":1194
10727  * return self.instance.max_abs()
10728  *
10729  * def truncated(self, limit): # <<<<<<<<<<<<<<
10730  * """
10731  * Remove all terms of self with relative size smaller than limit.
10732  */
10733 
10734  /* Python wrapper */
10735  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10736  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 ";
10737  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10738  PyObject *__pyx_r = 0;
10739  __Pyx_RefNannyDeclarations
10740  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10741  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10742 
10743  /* function exit code */
10744  __Pyx_RefNannyFinishContext();
10745  return __pyx_r;
10746  }
10747 
10748  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10749  PyObject *__pyx_r = NULL;
10750  __Pyx_RefNannyDeclarations
10751  PyObject *__pyx_t_1 = NULL;
10752  scalar_t __pyx_t_2;
10753  PyObject *__pyx_t_3 = NULL;
10754  __Pyx_RefNannySetupContext("truncated", 0);
10755 
10756  /* "PyClical.pyx":1203
10757  * clifford("10000+{1}")
10758  * """
10759  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10760  *
10761  * def isnan(self):
10762  */
10763  __Pyx_XDECREF(__pyx_r);
10764  __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)
10765  __Pyx_GOTREF(__pyx_t_1);
10766  __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)
10767  __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)
10768  __Pyx_GOTREF(__pyx_t_3);
10769  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10770  __pyx_r = __pyx_t_3;
10771  __pyx_t_3 = 0;
10772  goto __pyx_L0;
10773 
10774  /* "PyClical.pyx":1194
10775  * return self.instance.max_abs()
10776  *
10777  * def truncated(self, limit): # <<<<<<<<<<<<<<
10778  * """
10779  * Remove all terms of self with relative size smaller than limit.
10780  */
10781 
10782  /* function exit code */
10783  __pyx_L1_error:;
10784  __Pyx_XDECREF(__pyx_t_1);
10785  __Pyx_XDECREF(__pyx_t_3);
10786  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10787  __pyx_r = NULL;
10788  __pyx_L0:;
10789  __Pyx_XGIVEREF(__pyx_r);
10790  __Pyx_RefNannyFinishContext();
10791  return __pyx_r;
10792  }
10793 
10794  /* "PyClical.pyx":1205
10795  * return clifford().wrap( self.instance.truncated(limit) )
10796  *
10797  * def isnan(self): # <<<<<<<<<<<<<<
10798  * """
10799  * Check if a multivector contains any IEEE NaN values.
10800  */
10801 
10802  /* Python wrapper */
10803  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10804  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10805  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10806  PyObject *__pyx_r = 0;
10807  __Pyx_RefNannyDeclarations
10808  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10809  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10810 
10811  /* function exit code */
10812  __Pyx_RefNannyFinishContext();
10813  return __pyx_r;
10814  }
10815 
10816  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10817  PyObject *__pyx_r = NULL;
10818  __Pyx_RefNannyDeclarations
10819  PyObject *__pyx_t_1 = NULL;
10820  __Pyx_RefNannySetupContext("isnan", 0);
10821 
10822  /* "PyClical.pyx":1212
10823  * False
10824  * """
10825  * return self.instance.isnan() # <<<<<<<<<<<<<<
10826  *
10827  * def frame(self):
10828  */
10829  __Pyx_XDECREF(__pyx_r);
10830  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10831  __Pyx_GOTREF(__pyx_t_1);
10832  __pyx_r = __pyx_t_1;
10833  __pyx_t_1 = 0;
10834  goto __pyx_L0;
10835 
10836  /* "PyClical.pyx":1205
10837  * return clifford().wrap( self.instance.truncated(limit) )
10838  *
10839  * def isnan(self): # <<<<<<<<<<<<<<
10840  * """
10841  * Check if a multivector contains any IEEE NaN values.
10842  */
10843 
10844  /* function exit code */
10845  __pyx_L1_error:;
10846  __Pyx_XDECREF(__pyx_t_1);
10847  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10848  __pyx_r = NULL;
10849  __pyx_L0:;
10850  __Pyx_XGIVEREF(__pyx_r);
10851  __Pyx_RefNannyFinishContext();
10852  return __pyx_r;
10853  }
10854 
10855  /* "PyClical.pyx":1214
10856  * return self.instance.isnan()
10857  *
10858  * def frame(self): # <<<<<<<<<<<<<<
10859  * """
10860  * Subalgebra generated by all generators of terms of given multivector.
10861  */
10862 
10863  /* Python wrapper */
10864  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10865  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 ";
10866  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10867  PyObject *__pyx_r = 0;
10868  __Pyx_RefNannyDeclarations
10869  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10870  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10871 
10872  /* function exit code */
10873  __Pyx_RefNannyFinishContext();
10874  return __pyx_r;
10875  }
10876 
10877  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10878  PyObject *__pyx_r = NULL;
10879  __Pyx_RefNannyDeclarations
10880  PyObject *__pyx_t_1 = NULL;
10881  PyObject *__pyx_t_2 = NULL;
10882  __Pyx_RefNannySetupContext("frame", 0);
10883 
10884  /* "PyClical.pyx":1223
10885  * <type 'PyClical.index_set'>
10886  * """
10887  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10888  *
10889  * def __repr__(self):
10890  */
10891  __Pyx_XDECREF(__pyx_r);
10892  __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)
10893  __Pyx_GOTREF(__pyx_t_1);
10894  __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)
10895  __Pyx_GOTREF(__pyx_t_2);
10896  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10897  __pyx_r = __pyx_t_2;
10898  __pyx_t_2 = 0;
10899  goto __pyx_L0;
10900 
10901  /* "PyClical.pyx":1214
10902  * return self.instance.isnan()
10903  *
10904  * def frame(self): # <<<<<<<<<<<<<<
10905  * """
10906  * Subalgebra generated by all generators of terms of given multivector.
10907  */
10908 
10909  /* function exit code */
10910  __pyx_L1_error:;
10911  __Pyx_XDECREF(__pyx_t_1);
10912  __Pyx_XDECREF(__pyx_t_2);
10913  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10914  __pyx_r = NULL;
10915  __pyx_L0:;
10916  __Pyx_XGIVEREF(__pyx_r);
10917  __Pyx_RefNannyFinishContext();
10918  return __pyx_r;
10919  }
10920 
10921  /* "PyClical.pyx":1225
10922  * return index_set().wrap( self.instance.frame() )
10923  *
10924  * def __repr__(self): # <<<<<<<<<<<<<<
10925  * """
10926  * The official string representation of self.
10927  */
10928 
10929  /* Python wrapper */
10930  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10931  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 ";
10932  #if CYTHON_COMPILING_IN_CPYTHON
10933  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10934  #endif
10935  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10936  PyObject *__pyx_r = 0;
10937  __Pyx_RefNannyDeclarations
10938  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10939  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10940 
10941  /* function exit code */
10942  __Pyx_RefNannyFinishContext();
10943  return __pyx_r;
10944  }
10945 
10946  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10947  PyObject *__pyx_r = NULL;
10948  __Pyx_RefNannyDeclarations
10949  PyObject *__pyx_t_1 = NULL;
10950  __Pyx_RefNannySetupContext("__repr__", 0);
10951 
10952  /* "PyClical.pyx":1232
10953  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10954  * """
10955  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10956  *
10957  * def __str__(self):
10958  */
10959  __Pyx_XDECREF(__pyx_r);
10960  __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)
10961  __Pyx_GOTREF(__pyx_t_1);
10962  __pyx_r = __pyx_t_1;
10963  __pyx_t_1 = 0;
10964  goto __pyx_L0;
10965 
10966  /* "PyClical.pyx":1225
10967  * return index_set().wrap( self.instance.frame() )
10968  *
10969  * def __repr__(self): # <<<<<<<<<<<<<<
10970  * """
10971  * The official string representation of self.
10972  */
10973 
10974  /* function exit code */
10975  __pyx_L1_error:;
10976  __Pyx_XDECREF(__pyx_t_1);
10977  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10978  __pyx_r = NULL;
10979  __pyx_L0:;
10980  __Pyx_XGIVEREF(__pyx_r);
10981  __Pyx_RefNannyFinishContext();
10982  return __pyx_r;
10983  }
10984 
10985  /* "PyClical.pyx":1234
10986  * return clifford_to_repr( self.unwrap() ).c_str()
10987  *
10988  * def __str__(self): # <<<<<<<<<<<<<<
10989  * """
10990  * The informal string representation of self.
10991  */
10992 
10993  /* Python wrapper */
10994  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10995  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 ";
10996  #if CYTHON_COMPILING_IN_CPYTHON
10997  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10998  #endif
10999  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
11000  PyObject *__pyx_r = 0;
11001  __Pyx_RefNannyDeclarations
11002  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
11003  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11004 
11005  /* function exit code */
11006  __Pyx_RefNannyFinishContext();
11007  return __pyx_r;
11008  }
11009 
11010  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11011  PyObject *__pyx_r = NULL;
11012  __Pyx_RefNannyDeclarations
11013  PyObject *__pyx_t_1 = NULL;
11014  __Pyx_RefNannySetupContext("__str__", 0);
11015 
11016  /* "PyClical.pyx":1241
11017  * '1+3{-1}+2{1,2}+4{-2,7}'
11018  * """
11019  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
11020  *
11021  * def clifford_hidden_doctests():
11022  */
11023  __Pyx_XDECREF(__pyx_r);
11024  __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)
11025  __Pyx_GOTREF(__pyx_t_1);
11026  __pyx_r = __pyx_t_1;
11027  __pyx_t_1 = 0;
11028  goto __pyx_L0;
11029 
11030  /* "PyClical.pyx":1234
11031  * return clifford_to_repr( self.unwrap() ).c_str()
11032  *
11033  * def __str__(self): # <<<<<<<<<<<<<<
11034  * """
11035  * The informal string representation of self.
11036  */
11037 
11038  /* function exit code */
11039  __pyx_L1_error:;
11040  __Pyx_XDECREF(__pyx_t_1);
11041  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11042  __pyx_r = NULL;
11043  __pyx_L0:;
11044  __Pyx_XGIVEREF(__pyx_r);
11045  __Pyx_RefNannyFinishContext();
11046  return __pyx_r;
11047  }
11048 
11049  /* "(tree fragment)":1
11050  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11051  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11052  * def __setstate_cython__(self, __pyx_state):
11053  */
11054 
11055  /* Python wrapper */
11056  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11057  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
11058  PyObject *__pyx_r = 0;
11059  __Pyx_RefNannyDeclarations
11060  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
11061  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
11062 
11063  /* function exit code */
11064  __Pyx_RefNannyFinishContext();
11065  return __pyx_r;
11066  }
11067 
11068  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
11069  PyObject *__pyx_r = NULL;
11070  __Pyx_RefNannyDeclarations
11071  PyObject *__pyx_t_1 = NULL;
11072  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11073 
11074  /* "(tree fragment)":2
11075  * def __reduce_cython__(self):
11076  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11077  * def __setstate_cython__(self, __pyx_state):
11078  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11079  */
11080  __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)
11081  __Pyx_GOTREF(__pyx_t_1);
11082  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11083  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11084  __PYX_ERR(1, 2, __pyx_L1_error)
11085 
11086  /* "(tree fragment)":1
11087  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11088  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11089  * def __setstate_cython__(self, __pyx_state):
11090  */
11091 
11092  /* function exit code */
11093  __pyx_L1_error:;
11094  __Pyx_XDECREF(__pyx_t_1);
11095  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11096  __pyx_r = NULL;
11097  __Pyx_XGIVEREF(__pyx_r);
11098  __Pyx_RefNannyFinishContext();
11099  return __pyx_r;
11100  }
11101 
11102  /* "(tree fragment)":3
11103  * def __reduce_cython__(self):
11104  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11105  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11106  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11107  */
11108 
11109  /* Python wrapper */
11110  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11111  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11112  PyObject *__pyx_r = 0;
11113  __Pyx_RefNannyDeclarations
11114  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11115  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11116 
11117  /* function exit code */
11118  __Pyx_RefNannyFinishContext();
11119  return __pyx_r;
11120  }
11121 
11122  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) {
11123  PyObject *__pyx_r = NULL;
11124  __Pyx_RefNannyDeclarations
11125  PyObject *__pyx_t_1 = NULL;
11126  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11127 
11128  /* "(tree fragment)":4
11129  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11130  * def __setstate_cython__(self, __pyx_state):
11131  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11132  */
11133  __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)
11134  __Pyx_GOTREF(__pyx_t_1);
11135  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11136  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11137  __PYX_ERR(1, 4, __pyx_L1_error)
11138 
11139  /* "(tree fragment)":3
11140  * def __reduce_cython__(self):
11141  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11142  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11143  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11144  */
11145 
11146  /* function exit code */
11147  __pyx_L1_error:;
11148  __Pyx_XDECREF(__pyx_t_1);
11149  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11150  __pyx_r = NULL;
11151  __Pyx_XGIVEREF(__pyx_r);
11152  __Pyx_RefNannyFinishContext();
11153  return __pyx_r;
11154  }
11155 
11156  /* "PyClical.pyx":1243
11157  * return clifford_to_str( self.unwrap() ).c_str()
11158  *
11159  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11160  * """
11161  * Tests for functions that Doctest cannot see.
11162  */
11163 
11164  /* Python wrapper */
11165  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11166  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 ";
11167  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};
11168  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11169  PyObject *__pyx_r = 0;
11170  __Pyx_RefNannyDeclarations
11171  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11172  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11173 
11174  /* function exit code */
11175  __Pyx_RefNannyFinishContext();
11176  return __pyx_r;
11177  }
11178 
11179  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11180  PyObject *__pyx_r = NULL;
11181  __Pyx_RefNannyDeclarations
11182  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11183 
11184  /* "PyClical.pyx":1327
11185  * True
11186  * """
11187  * return # <<<<<<<<<<<<<<
11188  *
11189  * cpdef inline inv(obj):
11190  */
11191  __Pyx_XDECREF(__pyx_r);
11192  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11193  goto __pyx_L0;
11194 
11195  /* "PyClical.pyx":1243
11196  * return clifford_to_str( self.unwrap() ).c_str()
11197  *
11198  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11199  * """
11200  * Tests for functions that Doctest cannot see.
11201  */
11202 
11203  /* function exit code */
11204  __pyx_L0:;
11205  __Pyx_XGIVEREF(__pyx_r);
11206  __Pyx_RefNannyFinishContext();
11207  return __pyx_r;
11208  }
11209 
11210  /* "PyClical.pyx":1329
11211  * return
11212  *
11213  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11214  * """
11215  * Geometric multiplicative inverse.
11216  */
11217 
11218  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11219  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11220  PyObject *__pyx_r = NULL;
11221  __Pyx_RefNannyDeclarations
11222  PyObject *__pyx_t_1 = NULL;
11223  PyObject *__pyx_t_2 = NULL;
11224  PyObject *__pyx_t_3 = NULL;
11225  __Pyx_RefNannySetupContext("inv", 0);
11226 
11227  /* "PyClical.pyx":1342
11228  * nan
11229  * """
11230  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11231  *
11232  * cpdef inline scalar(obj):
11233  */
11234  __Pyx_XDECREF(__pyx_r);
11235  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
11236  __Pyx_GOTREF(__pyx_t_2);
11237  __Pyx_INCREF(__pyx_v_obj);
11238  __Pyx_GIVEREF(__pyx_v_obj);
11239  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11240  __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)
11241  __Pyx_GOTREF(__pyx_t_3);
11242  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11243  __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)
11244  __Pyx_GOTREF(__pyx_t_2);
11245  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11246  __pyx_t_3 = NULL;
11247  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11248  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11249  if (likely(__pyx_t_3)) {
11250  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11251  __Pyx_INCREF(__pyx_t_3);
11252  __Pyx_INCREF(function);
11253  __Pyx_DECREF_SET(__pyx_t_2, function);
11254  }
11255  }
11256  if (__pyx_t_3) {
11257  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11258  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11259  } else {
11260  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11261  }
11262  __Pyx_GOTREF(__pyx_t_1);
11263  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11264  __pyx_r = __pyx_t_1;
11265  __pyx_t_1 = 0;
11266  goto __pyx_L0;
11267 
11268  /* "PyClical.pyx":1329
11269  * return
11270  *
11271  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11272  * """
11273  * Geometric multiplicative inverse.
11274  */
11275 
11276  /* function exit code */
11277  __pyx_L1_error:;
11278  __Pyx_XDECREF(__pyx_t_1);
11279  __Pyx_XDECREF(__pyx_t_2);
11280  __Pyx_XDECREF(__pyx_t_3);
11281  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11282  __pyx_r = 0;
11283  __pyx_L0:;
11284  __Pyx_XGIVEREF(__pyx_r);
11285  __Pyx_RefNannyFinishContext();
11286  return __pyx_r;
11287  }
11288 
11289  /* Python wrapper */
11290  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11291  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 ";
11292  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11293  PyObject *__pyx_r = 0;
11294  __Pyx_RefNannyDeclarations
11295  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11296  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11297 
11298  /* function exit code */
11299  __Pyx_RefNannyFinishContext();
11300  return __pyx_r;
11301  }
11302 
11303  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11304  PyObject *__pyx_r = NULL;
11305  __Pyx_RefNannyDeclarations
11306  PyObject *__pyx_t_1 = NULL;
11307  __Pyx_RefNannySetupContext("inv", 0);
11308  __Pyx_XDECREF(__pyx_r);
11309  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11310  __Pyx_GOTREF(__pyx_t_1);
11311  __pyx_r = __pyx_t_1;
11312  __pyx_t_1 = 0;
11313  goto __pyx_L0;
11314 
11315  /* function exit code */
11316  __pyx_L1_error:;
11317  __Pyx_XDECREF(__pyx_t_1);
11318  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11319  __pyx_r = NULL;
11320  __pyx_L0:;
11321  __Pyx_XGIVEREF(__pyx_r);
11322  __Pyx_RefNannyFinishContext();
11323  return __pyx_r;
11324  }
11325 
11326  /* "PyClical.pyx":1344
11327  * return clifford(obj).inv()
11328  *
11329  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11330  * """
11331  * Scalar part.
11332  */
11333 
11334  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11335  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11336  PyObject *__pyx_r = NULL;
11337  __Pyx_RefNannyDeclarations
11338  PyObject *__pyx_t_1 = NULL;
11339  PyObject *__pyx_t_2 = NULL;
11340  PyObject *__pyx_t_3 = NULL;
11341  __Pyx_RefNannySetupContext("scalar", 0);
11342 
11343  /* "PyClical.pyx":1353
11344  * 0.0
11345  * """
11346  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11347  *
11348  * cpdef inline real(obj):
11349  */
11350  __Pyx_XDECREF(__pyx_r);
11351  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
11352  __Pyx_GOTREF(__pyx_t_2);
11353  __Pyx_INCREF(__pyx_v_obj);
11354  __Pyx_GIVEREF(__pyx_v_obj);
11355  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11356  __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)
11357  __Pyx_GOTREF(__pyx_t_3);
11358  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11359  __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)
11360  __Pyx_GOTREF(__pyx_t_2);
11361  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11362  __pyx_t_3 = NULL;
11363  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11364  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11365  if (likely(__pyx_t_3)) {
11366  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11367  __Pyx_INCREF(__pyx_t_3);
11368  __Pyx_INCREF(function);
11369  __Pyx_DECREF_SET(__pyx_t_2, function);
11370  }
11371  }
11372  if (__pyx_t_3) {
11373  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11374  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11375  } else {
11376  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11377  }
11378  __Pyx_GOTREF(__pyx_t_1);
11379  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11380  __pyx_r = __pyx_t_1;
11381  __pyx_t_1 = 0;
11382  goto __pyx_L0;
11383 
11384  /* "PyClical.pyx":1344
11385  * return clifford(obj).inv()
11386  *
11387  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11388  * """
11389  * Scalar part.
11390  */
11391 
11392  /* function exit code */
11393  __pyx_L1_error:;
11394  __Pyx_XDECREF(__pyx_t_1);
11395  __Pyx_XDECREF(__pyx_t_2);
11396  __Pyx_XDECREF(__pyx_t_3);
11397  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11398  __pyx_r = 0;
11399  __pyx_L0:;
11400  __Pyx_XGIVEREF(__pyx_r);
11401  __Pyx_RefNannyFinishContext();
11402  return __pyx_r;
11403  }
11404 
11405  /* Python wrapper */
11406  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11407  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 ";
11408  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11409  PyObject *__pyx_r = 0;
11410  __Pyx_RefNannyDeclarations
11411  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11412  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11413 
11414  /* function exit code */
11415  __Pyx_RefNannyFinishContext();
11416  return __pyx_r;
11417  }
11418 
11419  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11420  PyObject *__pyx_r = NULL;
11421  __Pyx_RefNannyDeclarations
11422  PyObject *__pyx_t_1 = NULL;
11423  __Pyx_RefNannySetupContext("scalar", 0);
11424  __Pyx_XDECREF(__pyx_r);
11425  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11426  __Pyx_GOTREF(__pyx_t_1);
11427  __pyx_r = __pyx_t_1;
11428  __pyx_t_1 = 0;
11429  goto __pyx_L0;
11430 
11431  /* function exit code */
11432  __pyx_L1_error:;
11433  __Pyx_XDECREF(__pyx_t_1);
11434  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11435  __pyx_r = NULL;
11436  __pyx_L0:;
11437  __Pyx_XGIVEREF(__pyx_r);
11438  __Pyx_RefNannyFinishContext();
11439  return __pyx_r;
11440  }
11441 
11442  /* "PyClical.pyx":1355
11443  * return clifford(obj).scalar()
11444  *
11445  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11446  * """
11447  * Real part: synonym for scalar part.
11448  */
11449 
11450  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11451  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11452  PyObject *__pyx_r = NULL;
11453  __Pyx_RefNannyDeclarations
11454  PyObject *__pyx_t_1 = NULL;
11455  PyObject *__pyx_t_2 = NULL;
11456  PyObject *__pyx_t_3 = NULL;
11457  __Pyx_RefNannySetupContext("real", 0);
11458 
11459  /* "PyClical.pyx":1364
11460  * 0.0
11461  * """
11462  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11463  *
11464  * cpdef inline imag(obj):
11465  */
11466  __Pyx_XDECREF(__pyx_r);
11467  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
11468  __Pyx_GOTREF(__pyx_t_2);
11469  __Pyx_INCREF(__pyx_v_obj);
11470  __Pyx_GIVEREF(__pyx_v_obj);
11471  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11472  __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)
11473  __Pyx_GOTREF(__pyx_t_3);
11474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11475  __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)
11476  __Pyx_GOTREF(__pyx_t_2);
11477  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11478  __pyx_t_3 = NULL;
11479  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11480  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11481  if (likely(__pyx_t_3)) {
11482  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11483  __Pyx_INCREF(__pyx_t_3);
11484  __Pyx_INCREF(function);
11485  __Pyx_DECREF_SET(__pyx_t_2, function);
11486  }
11487  }
11488  if (__pyx_t_3) {
11489  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11490  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11491  } else {
11492  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11493  }
11494  __Pyx_GOTREF(__pyx_t_1);
11495  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11496  __pyx_r = __pyx_t_1;
11497  __pyx_t_1 = 0;
11498  goto __pyx_L0;
11499 
11500  /* "PyClical.pyx":1355
11501  * return clifford(obj).scalar()
11502  *
11503  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11504  * """
11505  * Real part: synonym for scalar part.
11506  */
11507 
11508  /* function exit code */
11509  __pyx_L1_error:;
11510  __Pyx_XDECREF(__pyx_t_1);
11511  __Pyx_XDECREF(__pyx_t_2);
11512  __Pyx_XDECREF(__pyx_t_3);
11513  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11514  __pyx_r = 0;
11515  __pyx_L0:;
11516  __Pyx_XGIVEREF(__pyx_r);
11517  __Pyx_RefNannyFinishContext();
11518  return __pyx_r;
11519  }
11520 
11521  /* Python wrapper */
11522  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11523  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 ";
11524  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11525  PyObject *__pyx_r = 0;
11526  __Pyx_RefNannyDeclarations
11527  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11528  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11529 
11530  /* function exit code */
11531  __Pyx_RefNannyFinishContext();
11532  return __pyx_r;
11533  }
11534 
11535  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11536  PyObject *__pyx_r = NULL;
11537  __Pyx_RefNannyDeclarations
11538  PyObject *__pyx_t_1 = NULL;
11539  __Pyx_RefNannySetupContext("real", 0);
11540  __Pyx_XDECREF(__pyx_r);
11541  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11542  __Pyx_GOTREF(__pyx_t_1);
11543  __pyx_r = __pyx_t_1;
11544  __pyx_t_1 = 0;
11545  goto __pyx_L0;
11546 
11547  /* function exit code */
11548  __pyx_L1_error:;
11549  __Pyx_XDECREF(__pyx_t_1);
11550  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11551  __pyx_r = NULL;
11552  __pyx_L0:;
11553  __Pyx_XGIVEREF(__pyx_r);
11554  __Pyx_RefNannyFinishContext();
11555  return __pyx_r;
11556  }
11557 
11558  /* "PyClical.pyx":1366
11559  * return clifford(obj).scalar()
11560  *
11561  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11562  * """
11563  * Imaginary part: deprecated (always 0).
11564  */
11565 
11566  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11567  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11568  PyObject *__pyx_r = NULL;
11569  __Pyx_RefNannyDeclarations
11570  __Pyx_RefNannySetupContext("imag", 0);
11571 
11572  /* "PyClical.pyx":1375
11573  * 0.0
11574  * """
11575  * return 0.0 # <<<<<<<<<<<<<<
11576  *
11577  * cpdef inline pure(obj):
11578  */
11579  __Pyx_XDECREF(__pyx_r);
11580  __Pyx_INCREF(__pyx_float_0_0);
11581  __pyx_r = __pyx_float_0_0;
11582  goto __pyx_L0;
11583 
11584  /* "PyClical.pyx":1366
11585  * return clifford(obj).scalar()
11586  *
11587  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11588  * """
11589  * Imaginary part: deprecated (always 0).
11590  */
11591 
11592  /* function exit code */
11593  __pyx_L0:;
11594  __Pyx_XGIVEREF(__pyx_r);
11595  __Pyx_RefNannyFinishContext();
11596  return __pyx_r;
11597  }
11598 
11599  /* Python wrapper */
11600  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11601  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 ";
11602  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11603  PyObject *__pyx_r = 0;
11604  __Pyx_RefNannyDeclarations
11605  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11606  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11607 
11608  /* function exit code */
11609  __Pyx_RefNannyFinishContext();
11610  return __pyx_r;
11611  }
11612 
11613  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11614  PyObject *__pyx_r = NULL;
11615  __Pyx_RefNannyDeclarations
11616  PyObject *__pyx_t_1 = NULL;
11617  __Pyx_RefNannySetupContext("imag", 0);
11618  __Pyx_XDECREF(__pyx_r);
11619  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11620  __Pyx_GOTREF(__pyx_t_1);
11621  __pyx_r = __pyx_t_1;
11622  __pyx_t_1 = 0;
11623  goto __pyx_L0;
11624 
11625  /* function exit code */
11626  __pyx_L1_error:;
11627  __Pyx_XDECREF(__pyx_t_1);
11628  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11629  __pyx_r = NULL;
11630  __pyx_L0:;
11631  __Pyx_XGIVEREF(__pyx_r);
11632  __Pyx_RefNannyFinishContext();
11633  return __pyx_r;
11634  }
11635 
11636  /* "PyClical.pyx":1377
11637  * return 0.0
11638  *
11639  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11640  * """
11641  * Pure part
11642  */
11643 
11644  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11645  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11646  PyObject *__pyx_r = NULL;
11647  __Pyx_RefNannyDeclarations
11648  PyObject *__pyx_t_1 = NULL;
11649  PyObject *__pyx_t_2 = NULL;
11650  PyObject *__pyx_t_3 = NULL;
11651  __Pyx_RefNannySetupContext("pure", 0);
11652 
11653  /* "PyClical.pyx":1386
11654  * {1,2}
11655  * """
11656  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11657  *
11658  * cpdef inline even(obj):
11659  */
11660  __Pyx_XDECREF(__pyx_r);
11661  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
11662  __Pyx_GOTREF(__pyx_t_2);
11663  __Pyx_INCREF(__pyx_v_obj);
11664  __Pyx_GIVEREF(__pyx_v_obj);
11665  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11666  __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)
11667  __Pyx_GOTREF(__pyx_t_3);
11668  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11669  __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)
11670  __Pyx_GOTREF(__pyx_t_2);
11671  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11672  __pyx_t_3 = NULL;
11673  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11674  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11675  if (likely(__pyx_t_3)) {
11676  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11677  __Pyx_INCREF(__pyx_t_3);
11678  __Pyx_INCREF(function);
11679  __Pyx_DECREF_SET(__pyx_t_2, function);
11680  }
11681  }
11682  if (__pyx_t_3) {
11683  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11684  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11685  } else {
11686  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11687  }
11688  __Pyx_GOTREF(__pyx_t_1);
11689  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11690  __pyx_r = __pyx_t_1;
11691  __pyx_t_1 = 0;
11692  goto __pyx_L0;
11693 
11694  /* "PyClical.pyx":1377
11695  * return 0.0
11696  *
11697  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11698  * """
11699  * Pure part
11700  */
11701 
11702  /* function exit code */
11703  __pyx_L1_error:;
11704  __Pyx_XDECREF(__pyx_t_1);
11705  __Pyx_XDECREF(__pyx_t_2);
11706  __Pyx_XDECREF(__pyx_t_3);
11707  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11708  __pyx_r = 0;
11709  __pyx_L0:;
11710  __Pyx_XGIVEREF(__pyx_r);
11711  __Pyx_RefNannyFinishContext();
11712  return __pyx_r;
11713  }
11714 
11715  /* Python wrapper */
11716  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11717  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 ";
11718  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11719  PyObject *__pyx_r = 0;
11720  __Pyx_RefNannyDeclarations
11721  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11722  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11723 
11724  /* function exit code */
11725  __Pyx_RefNannyFinishContext();
11726  return __pyx_r;
11727  }
11728 
11729  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11730  PyObject *__pyx_r = NULL;
11731  __Pyx_RefNannyDeclarations
11732  PyObject *__pyx_t_1 = NULL;
11733  __Pyx_RefNannySetupContext("pure", 0);
11734  __Pyx_XDECREF(__pyx_r);
11735  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11736  __Pyx_GOTREF(__pyx_t_1);
11737  __pyx_r = __pyx_t_1;
11738  __pyx_t_1 = 0;
11739  goto __pyx_L0;
11740 
11741  /* function exit code */
11742  __pyx_L1_error:;
11743  __Pyx_XDECREF(__pyx_t_1);
11744  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11745  __pyx_r = NULL;
11746  __pyx_L0:;
11747  __Pyx_XGIVEREF(__pyx_r);
11748  __Pyx_RefNannyFinishContext();
11749  return __pyx_r;
11750  }
11751 
11752  /* "PyClical.pyx":1388
11753  * return clifford(obj).pure()
11754  *
11755  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11756  * """
11757  * Even part of multivector, sum of even grade terms.
11758  */
11759 
11760  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11761  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11762  PyObject *__pyx_r = NULL;
11763  __Pyx_RefNannyDeclarations
11764  PyObject *__pyx_t_1 = NULL;
11765  PyObject *__pyx_t_2 = NULL;
11766  PyObject *__pyx_t_3 = NULL;
11767  __Pyx_RefNannySetupContext("even", 0);
11768 
11769  /* "PyClical.pyx":1395
11770  * 1+{1,2}
11771  * """
11772  * return clifford(obj).even() # <<<<<<<<<<<<<<
11773  *
11774  * cpdef inline odd(obj):
11775  */
11776  __Pyx_XDECREF(__pyx_r);
11777  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
11778  __Pyx_GOTREF(__pyx_t_2);
11779  __Pyx_INCREF(__pyx_v_obj);
11780  __Pyx_GIVEREF(__pyx_v_obj);
11781  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11782  __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)
11783  __Pyx_GOTREF(__pyx_t_3);
11784  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11785  __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)
11786  __Pyx_GOTREF(__pyx_t_2);
11787  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11788  __pyx_t_3 = NULL;
11789  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11790  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11791  if (likely(__pyx_t_3)) {
11792  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11793  __Pyx_INCREF(__pyx_t_3);
11794  __Pyx_INCREF(function);
11795  __Pyx_DECREF_SET(__pyx_t_2, function);
11796  }
11797  }
11798  if (__pyx_t_3) {
11799  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11800  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11801  } else {
11802  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11803  }
11804  __Pyx_GOTREF(__pyx_t_1);
11805  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11806  __pyx_r = __pyx_t_1;
11807  __pyx_t_1 = 0;
11808  goto __pyx_L0;
11809 
11810  /* "PyClical.pyx":1388
11811  * return clifford(obj).pure()
11812  *
11813  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11814  * """
11815  * Even part of multivector, sum of even grade terms.
11816  */
11817 
11818  /* function exit code */
11819  __pyx_L1_error:;
11820  __Pyx_XDECREF(__pyx_t_1);
11821  __Pyx_XDECREF(__pyx_t_2);
11822  __Pyx_XDECREF(__pyx_t_3);
11823  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11824  __pyx_r = 0;
11825  __pyx_L0:;
11826  __Pyx_XGIVEREF(__pyx_r);
11827  __Pyx_RefNannyFinishContext();
11828  return __pyx_r;
11829  }
11830 
11831  /* Python wrapper */
11832  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11833  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 ";
11834  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11835  PyObject *__pyx_r = 0;
11836  __Pyx_RefNannyDeclarations
11837  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11838  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11839 
11840  /* function exit code */
11841  __Pyx_RefNannyFinishContext();
11842  return __pyx_r;
11843  }
11844 
11845  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11846  PyObject *__pyx_r = NULL;
11847  __Pyx_RefNannyDeclarations
11848  PyObject *__pyx_t_1 = NULL;
11849  __Pyx_RefNannySetupContext("even", 0);
11850  __Pyx_XDECREF(__pyx_r);
11851  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11852  __Pyx_GOTREF(__pyx_t_1);
11853  __pyx_r = __pyx_t_1;
11854  __pyx_t_1 = 0;
11855  goto __pyx_L0;
11856 
11857  /* function exit code */
11858  __pyx_L1_error:;
11859  __Pyx_XDECREF(__pyx_t_1);
11860  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11861  __pyx_r = NULL;
11862  __pyx_L0:;
11863  __Pyx_XGIVEREF(__pyx_r);
11864  __Pyx_RefNannyFinishContext();
11865  return __pyx_r;
11866  }
11867 
11868  /* "PyClical.pyx":1397
11869  * return clifford(obj).even()
11870  *
11871  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11872  * """
11873  * Odd part of multivector, sum of odd grade terms.
11874  */
11875 
11876  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11877  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11878  PyObject *__pyx_r = NULL;
11879  __Pyx_RefNannyDeclarations
11880  PyObject *__pyx_t_1 = NULL;
11881  PyObject *__pyx_t_2 = NULL;
11882  PyObject *__pyx_t_3 = NULL;
11883  __Pyx_RefNannySetupContext("odd", 0);
11884 
11885  /* "PyClical.pyx":1404
11886  * {1}
11887  * """
11888  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11889  *
11890  * cpdef inline involute(obj):
11891  */
11892  __Pyx_XDECREF(__pyx_r);
11893  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
11894  __Pyx_GOTREF(__pyx_t_2);
11895  __Pyx_INCREF(__pyx_v_obj);
11896  __Pyx_GIVEREF(__pyx_v_obj);
11897  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
11898  __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)
11899  __Pyx_GOTREF(__pyx_t_3);
11900  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11901  __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)
11902  __Pyx_GOTREF(__pyx_t_2);
11903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11904  __pyx_t_3 = NULL;
11905  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11906  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11907  if (likely(__pyx_t_3)) {
11908  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11909  __Pyx_INCREF(__pyx_t_3);
11910  __Pyx_INCREF(function);
11911  __Pyx_DECREF_SET(__pyx_t_2, function);
11912  }
11913  }
11914  if (__pyx_t_3) {
11915  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11916  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11917  } else {
11918  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11919  }
11920  __Pyx_GOTREF(__pyx_t_1);
11921  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11922  __pyx_r = __pyx_t_1;
11923  __pyx_t_1 = 0;
11924  goto __pyx_L0;
11925 
11926  /* "PyClical.pyx":1397
11927  * return clifford(obj).even()
11928  *
11929  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11930  * """
11931  * Odd part of multivector, sum of odd grade terms.
11932  */
11933 
11934  /* function exit code */
11935  __pyx_L1_error:;
11936  __Pyx_XDECREF(__pyx_t_1);
11937  __Pyx_XDECREF(__pyx_t_2);
11938  __Pyx_XDECREF(__pyx_t_3);
11939  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11940  __pyx_r = 0;
11941  __pyx_L0:;
11942  __Pyx_XGIVEREF(__pyx_r);
11943  __Pyx_RefNannyFinishContext();
11944  return __pyx_r;
11945  }
11946 
11947  /* Python wrapper */
11948  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11949  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 ";
11950  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11951  PyObject *__pyx_r = 0;
11952  __Pyx_RefNannyDeclarations
11953  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11954  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11955 
11956  /* function exit code */
11957  __Pyx_RefNannyFinishContext();
11958  return __pyx_r;
11959  }
11960 
11961  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11962  PyObject *__pyx_r = NULL;
11963  __Pyx_RefNannyDeclarations
11964  PyObject *__pyx_t_1 = NULL;
11965  __Pyx_RefNannySetupContext("odd", 0);
11966  __Pyx_XDECREF(__pyx_r);
11967  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11968  __Pyx_GOTREF(__pyx_t_1);
11969  __pyx_r = __pyx_t_1;
11970  __pyx_t_1 = 0;
11971  goto __pyx_L0;
11972 
11973  /* function exit code */
11974  __pyx_L1_error:;
11975  __Pyx_XDECREF(__pyx_t_1);
11976  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11977  __pyx_r = NULL;
11978  __pyx_L0:;
11979  __Pyx_XGIVEREF(__pyx_r);
11980  __Pyx_RefNannyFinishContext();
11981  return __pyx_r;
11982  }
11983 
11984  /* "PyClical.pyx":1406
11985  * return clifford(obj).odd()
11986  *
11987  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11988  * """
11989  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11990  */
11991 
11992  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11993  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11994  PyObject *__pyx_r = NULL;
11995  __Pyx_RefNannyDeclarations
11996  PyObject *__pyx_t_1 = NULL;
11997  PyObject *__pyx_t_2 = NULL;
11998  PyObject *__pyx_t_3 = NULL;
11999  __Pyx_RefNannySetupContext("involute", 0);
12000 
12001  /* "PyClical.pyx":1419
12002  * 1-{1}+{1,2}
12003  * """
12004  * return clifford(obj).involute() # <<<<<<<<<<<<<<
12005  *
12006  * cpdef inline reverse(obj):
12007  */
12008  __Pyx_XDECREF(__pyx_r);
12009  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
12010  __Pyx_GOTREF(__pyx_t_2);
12011  __Pyx_INCREF(__pyx_v_obj);
12012  __Pyx_GIVEREF(__pyx_v_obj);
12013  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12014  __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)
12015  __Pyx_GOTREF(__pyx_t_3);
12016  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12017  __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)
12018  __Pyx_GOTREF(__pyx_t_2);
12019  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12020  __pyx_t_3 = NULL;
12021  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12022  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12023  if (likely(__pyx_t_3)) {
12024  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12025  __Pyx_INCREF(__pyx_t_3);
12026  __Pyx_INCREF(function);
12027  __Pyx_DECREF_SET(__pyx_t_2, function);
12028  }
12029  }
12030  if (__pyx_t_3) {
12031  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
12032  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12033  } else {
12034  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
12035  }
12036  __Pyx_GOTREF(__pyx_t_1);
12037  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12038  __pyx_r = __pyx_t_1;
12039  __pyx_t_1 = 0;
12040  goto __pyx_L0;
12041 
12042  /* "PyClical.pyx":1406
12043  * return clifford(obj).odd()
12044  *
12045  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
12046  * """
12047  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
12048  */
12049 
12050  /* function exit code */
12051  __pyx_L1_error:;
12052  __Pyx_XDECREF(__pyx_t_1);
12053  __Pyx_XDECREF(__pyx_t_2);
12054  __Pyx_XDECREF(__pyx_t_3);
12055  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12056  __pyx_r = 0;
12057  __pyx_L0:;
12058  __Pyx_XGIVEREF(__pyx_r);
12059  __Pyx_RefNannyFinishContext();
12060  return __pyx_r;
12061  }
12062 
12063  /* Python wrapper */
12064  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12065  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 ";
12066  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12067  PyObject *__pyx_r = 0;
12068  __Pyx_RefNannyDeclarations
12069  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
12070  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
12071 
12072  /* function exit code */
12073  __Pyx_RefNannyFinishContext();
12074  return __pyx_r;
12075  }
12076 
12077  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12078  PyObject *__pyx_r = NULL;
12079  __Pyx_RefNannyDeclarations
12080  PyObject *__pyx_t_1 = NULL;
12081  __Pyx_RefNannySetupContext("involute", 0);
12082  __Pyx_XDECREF(__pyx_r);
12083  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
12084  __Pyx_GOTREF(__pyx_t_1);
12085  __pyx_r = __pyx_t_1;
12086  __pyx_t_1 = 0;
12087  goto __pyx_L0;
12088 
12089  /* function exit code */
12090  __pyx_L1_error:;
12091  __Pyx_XDECREF(__pyx_t_1);
12092  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
12093  __pyx_r = NULL;
12094  __pyx_L0:;
12095  __Pyx_XGIVEREF(__pyx_r);
12096  __Pyx_RefNannyFinishContext();
12097  return __pyx_r;
12098  }
12099 
12100  /* "PyClical.pyx":1421
12101  * return clifford(obj).involute()
12102  *
12103  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12104  * """
12105  * Reversion, eg. {1}*{2} -> {2}*{1}
12106  */
12107 
12108  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12109  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12110  PyObject *__pyx_r = NULL;
12111  __Pyx_RefNannyDeclarations
12112  PyObject *__pyx_t_1 = NULL;
12113  PyObject *__pyx_t_2 = NULL;
12114  PyObject *__pyx_t_3 = NULL;
12115  __Pyx_RefNannySetupContext("reverse", 0);
12116 
12117  /* "PyClical.pyx":1434
12118  * 1+{1}-{1,2}
12119  * """
12120  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
12121  *
12122  * cpdef inline conj(obj):
12123  */
12124  __Pyx_XDECREF(__pyx_r);
12125  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
12126  __Pyx_GOTREF(__pyx_t_2);
12127  __Pyx_INCREF(__pyx_v_obj);
12128  __Pyx_GIVEREF(__pyx_v_obj);
12129  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12130  __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)
12131  __Pyx_GOTREF(__pyx_t_3);
12132  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12133  __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)
12134  __Pyx_GOTREF(__pyx_t_2);
12135  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12136  __pyx_t_3 = NULL;
12137  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12138  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12139  if (likely(__pyx_t_3)) {
12140  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12141  __Pyx_INCREF(__pyx_t_3);
12142  __Pyx_INCREF(function);
12143  __Pyx_DECREF_SET(__pyx_t_2, function);
12144  }
12145  }
12146  if (__pyx_t_3) {
12147  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12148  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12149  } else {
12150  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12151  }
12152  __Pyx_GOTREF(__pyx_t_1);
12153  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12154  __pyx_r = __pyx_t_1;
12155  __pyx_t_1 = 0;
12156  goto __pyx_L0;
12157 
12158  /* "PyClical.pyx":1421
12159  * return clifford(obj).involute()
12160  *
12161  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12162  * """
12163  * Reversion, eg. {1}*{2} -> {2}*{1}
12164  */
12165 
12166  /* function exit code */
12167  __pyx_L1_error:;
12168  __Pyx_XDECREF(__pyx_t_1);
12169  __Pyx_XDECREF(__pyx_t_2);
12170  __Pyx_XDECREF(__pyx_t_3);
12171  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12172  __pyx_r = 0;
12173  __pyx_L0:;
12174  __Pyx_XGIVEREF(__pyx_r);
12175  __Pyx_RefNannyFinishContext();
12176  return __pyx_r;
12177  }
12178 
12179  /* Python wrapper */
12180  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12181  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 ";
12182  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12183  PyObject *__pyx_r = 0;
12184  __Pyx_RefNannyDeclarations
12185  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12186  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12187 
12188  /* function exit code */
12189  __Pyx_RefNannyFinishContext();
12190  return __pyx_r;
12191  }
12192 
12193  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12194  PyObject *__pyx_r = NULL;
12195  __Pyx_RefNannyDeclarations
12196  PyObject *__pyx_t_1 = NULL;
12197  __Pyx_RefNannySetupContext("reverse", 0);
12198  __Pyx_XDECREF(__pyx_r);
12199  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12200  __Pyx_GOTREF(__pyx_t_1);
12201  __pyx_r = __pyx_t_1;
12202  __pyx_t_1 = 0;
12203  goto __pyx_L0;
12204 
12205  /* function exit code */
12206  __pyx_L1_error:;
12207  __Pyx_XDECREF(__pyx_t_1);
12208  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12209  __pyx_r = NULL;
12210  __pyx_L0:;
12211  __Pyx_XGIVEREF(__pyx_r);
12212  __Pyx_RefNannyFinishContext();
12213  return __pyx_r;
12214  }
12215 
12216  /* "PyClical.pyx":1436
12217  * return clifford(obj).reverse()
12218  *
12219  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12220  * """
12221  * Conjugation, reverse o involute == involute o reverse.
12222  */
12223 
12224  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12225  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12226  PyObject *__pyx_r = NULL;
12227  __Pyx_RefNannyDeclarations
12228  PyObject *__pyx_t_1 = NULL;
12229  PyObject *__pyx_t_2 = NULL;
12230  PyObject *__pyx_t_3 = NULL;
12231  __Pyx_RefNannySetupContext("conj", 0);
12232 
12233  /* "PyClical.pyx":1449
12234  * 1-{1}-{1,2}
12235  * """
12236  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12237  *
12238  * cpdef inline quad(obj):
12239  */
12240  __Pyx_XDECREF(__pyx_r);
12241  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
12242  __Pyx_GOTREF(__pyx_t_2);
12243  __Pyx_INCREF(__pyx_v_obj);
12244  __Pyx_GIVEREF(__pyx_v_obj);
12245  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12246  __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)
12247  __Pyx_GOTREF(__pyx_t_3);
12248  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12249  __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)
12250  __Pyx_GOTREF(__pyx_t_2);
12251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12252  __pyx_t_3 = NULL;
12253  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12254  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12255  if (likely(__pyx_t_3)) {
12256  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12257  __Pyx_INCREF(__pyx_t_3);
12258  __Pyx_INCREF(function);
12259  __Pyx_DECREF_SET(__pyx_t_2, function);
12260  }
12261  }
12262  if (__pyx_t_3) {
12263  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12264  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12265  } else {
12266  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12267  }
12268  __Pyx_GOTREF(__pyx_t_1);
12269  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12270  __pyx_r = __pyx_t_1;
12271  __pyx_t_1 = 0;
12272  goto __pyx_L0;
12273 
12274  /* "PyClical.pyx":1436
12275  * return clifford(obj).reverse()
12276  *
12277  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12278  * """
12279  * Conjugation, reverse o involute == involute o reverse.
12280  */
12281 
12282  /* function exit code */
12283  __pyx_L1_error:;
12284  __Pyx_XDECREF(__pyx_t_1);
12285  __Pyx_XDECREF(__pyx_t_2);
12286  __Pyx_XDECREF(__pyx_t_3);
12287  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12288  __pyx_r = 0;
12289  __pyx_L0:;
12290  __Pyx_XGIVEREF(__pyx_r);
12291  __Pyx_RefNannyFinishContext();
12292  return __pyx_r;
12293  }
12294 
12295  /* Python wrapper */
12296  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12297  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 ";
12298  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12299  PyObject *__pyx_r = 0;
12300  __Pyx_RefNannyDeclarations
12301  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12302  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12303 
12304  /* function exit code */
12305  __Pyx_RefNannyFinishContext();
12306  return __pyx_r;
12307  }
12308 
12309  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12310  PyObject *__pyx_r = NULL;
12311  __Pyx_RefNannyDeclarations
12312  PyObject *__pyx_t_1 = NULL;
12313  __Pyx_RefNannySetupContext("conj", 0);
12314  __Pyx_XDECREF(__pyx_r);
12315  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12316  __Pyx_GOTREF(__pyx_t_1);
12317  __pyx_r = __pyx_t_1;
12318  __pyx_t_1 = 0;
12319  goto __pyx_L0;
12320 
12321  /* function exit code */
12322  __pyx_L1_error:;
12323  __Pyx_XDECREF(__pyx_t_1);
12324  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12325  __pyx_r = NULL;
12326  __pyx_L0:;
12327  __Pyx_XGIVEREF(__pyx_r);
12328  __Pyx_RefNannyFinishContext();
12329  return __pyx_r;
12330  }
12331 
12332  /* "PyClical.pyx":1451
12333  * return clifford(obj).conj()
12334  *
12335  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12336  * """
12337  * Quadratic form == (rev(x)*x)(0).
12338  */
12339 
12340  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12341  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12342  PyObject *__pyx_r = NULL;
12343  __Pyx_RefNannyDeclarations
12344  PyObject *__pyx_t_1 = NULL;
12345  PyObject *__pyx_t_2 = NULL;
12346  PyObject *__pyx_t_3 = NULL;
12347  __Pyx_RefNannySetupContext("quad", 0);
12348 
12349  /* "PyClical.pyx":1460
12350  * 2.0
12351  * """
12352  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12353  *
12354  * cpdef inline norm(obj):
12355  */
12356  __Pyx_XDECREF(__pyx_r);
12357  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
12358  __Pyx_GOTREF(__pyx_t_2);
12359  __Pyx_INCREF(__pyx_v_obj);
12360  __Pyx_GIVEREF(__pyx_v_obj);
12361  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12362  __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)
12363  __Pyx_GOTREF(__pyx_t_3);
12364  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12365  __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)
12366  __Pyx_GOTREF(__pyx_t_2);
12367  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12368  __pyx_t_3 = NULL;
12369  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12370  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12371  if (likely(__pyx_t_3)) {
12372  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12373  __Pyx_INCREF(__pyx_t_3);
12374  __Pyx_INCREF(function);
12375  __Pyx_DECREF_SET(__pyx_t_2, function);
12376  }
12377  }
12378  if (__pyx_t_3) {
12379  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12380  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12381  } else {
12382  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12383  }
12384  __Pyx_GOTREF(__pyx_t_1);
12385  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12386  __pyx_r = __pyx_t_1;
12387  __pyx_t_1 = 0;
12388  goto __pyx_L0;
12389 
12390  /* "PyClical.pyx":1451
12391  * return clifford(obj).conj()
12392  *
12393  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12394  * """
12395  * Quadratic form == (rev(x)*x)(0).
12396  */
12397 
12398  /* function exit code */
12399  __pyx_L1_error:;
12400  __Pyx_XDECREF(__pyx_t_1);
12401  __Pyx_XDECREF(__pyx_t_2);
12402  __Pyx_XDECREF(__pyx_t_3);
12403  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12404  __pyx_r = 0;
12405  __pyx_L0:;
12406  __Pyx_XGIVEREF(__pyx_r);
12407  __Pyx_RefNannyFinishContext();
12408  return __pyx_r;
12409  }
12410 
12411  /* Python wrapper */
12412  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12413  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 ";
12414  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12415  PyObject *__pyx_r = 0;
12416  __Pyx_RefNannyDeclarations
12417  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12418  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12419 
12420  /* function exit code */
12421  __Pyx_RefNannyFinishContext();
12422  return __pyx_r;
12423  }
12424 
12425  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12426  PyObject *__pyx_r = NULL;
12427  __Pyx_RefNannyDeclarations
12428  PyObject *__pyx_t_1 = NULL;
12429  __Pyx_RefNannySetupContext("quad", 0);
12430  __Pyx_XDECREF(__pyx_r);
12431  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12432  __Pyx_GOTREF(__pyx_t_1);
12433  __pyx_r = __pyx_t_1;
12434  __pyx_t_1 = 0;
12435  goto __pyx_L0;
12436 
12437  /* function exit code */
12438  __pyx_L1_error:;
12439  __Pyx_XDECREF(__pyx_t_1);
12440  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12441  __pyx_r = NULL;
12442  __pyx_L0:;
12443  __Pyx_XGIVEREF(__pyx_r);
12444  __Pyx_RefNannyFinishContext();
12445  return __pyx_r;
12446  }
12447 
12448  /* "PyClical.pyx":1462
12449  * return clifford(obj).quad()
12450  *
12451  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12452  * """
12453  * norm == sum of squares of coordinates.
12454  */
12455 
12456  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12457  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12458  PyObject *__pyx_r = NULL;
12459  __Pyx_RefNannyDeclarations
12460  PyObject *__pyx_t_1 = NULL;
12461  PyObject *__pyx_t_2 = NULL;
12462  PyObject *__pyx_t_3 = NULL;
12463  __Pyx_RefNannySetupContext("norm", 0);
12464 
12465  /* "PyClical.pyx":1471
12466  * 4.0
12467  * """
12468  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12469  *
12470  * cpdef inline abs(obj):
12471  */
12472  __Pyx_XDECREF(__pyx_r);
12473  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
12474  __Pyx_GOTREF(__pyx_t_2);
12475  __Pyx_INCREF(__pyx_v_obj);
12476  __Pyx_GIVEREF(__pyx_v_obj);
12477  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
12478  __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)
12479  __Pyx_GOTREF(__pyx_t_3);
12480  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12481  __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)
12482  __Pyx_GOTREF(__pyx_t_2);
12483  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12484  __pyx_t_3 = NULL;
12485  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12486  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
12487  if (likely(__pyx_t_3)) {
12488  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12489  __Pyx_INCREF(__pyx_t_3);
12490  __Pyx_INCREF(function);
12491  __Pyx_DECREF_SET(__pyx_t_2, function);
12492  }
12493  }
12494  if (__pyx_t_3) {
12495  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12496  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12497  } else {
12498  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12499  }
12500  __Pyx_GOTREF(__pyx_t_1);
12501  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12502  __pyx_r = __pyx_t_1;
12503  __pyx_t_1 = 0;
12504  goto __pyx_L0;
12505 
12506  /* "PyClical.pyx":1462
12507  * return clifford(obj).quad()
12508  *
12509  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12510  * """
12511  * norm == sum of squares of coordinates.
12512  */
12513 
12514  /* function exit code */
12515  __pyx_L1_error:;
12516  __Pyx_XDECREF(__pyx_t_1);
12517  __Pyx_XDECREF(__pyx_t_2);
12518  __Pyx_XDECREF(__pyx_t_3);
12519  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12520  __pyx_r = 0;
12521  __pyx_L0:;
12522  __Pyx_XGIVEREF(__pyx_r);
12523  __Pyx_RefNannyFinishContext();
12524  return __pyx_r;
12525  }
12526 
12527  /* Python wrapper */
12528  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12529  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 ";
12530  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12531  PyObject *__pyx_r = 0;
12532  __Pyx_RefNannyDeclarations
12533  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12534  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12535 
12536  /* function exit code */
12537  __Pyx_RefNannyFinishContext();
12538  return __pyx_r;
12539  }
12540 
12541  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12542  PyObject *__pyx_r = NULL;
12543  __Pyx_RefNannyDeclarations
12544  PyObject *__pyx_t_1 = NULL;
12545  __Pyx_RefNannySetupContext("norm", 0);
12546  __Pyx_XDECREF(__pyx_r);
12547  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12548  __Pyx_GOTREF(__pyx_t_1);
12549  __pyx_r = __pyx_t_1;
12550  __pyx_t_1 = 0;
12551  goto __pyx_L0;
12552 
12553  /* function exit code */
12554  __pyx_L1_error:;
12555  __Pyx_XDECREF(__pyx_t_1);
12556  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12557  __pyx_r = NULL;
12558  __pyx_L0:;
12559  __Pyx_XGIVEREF(__pyx_r);
12560  __Pyx_RefNannyFinishContext();
12561  return __pyx_r;
12562  }
12563 
12564  /* "PyClical.pyx":1473
12565  * return clifford(obj).norm()
12566  *
12567  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12568  * """
12569  * Absolute value of multivector: multivector 2-norm.
12570  */
12571 
12572  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12573  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12574  PyObject *__pyx_r = NULL;
12575  __Pyx_RefNannyDeclarations
12576  PyObject *__pyx_t_1 = NULL;
12577  __Pyx_RefNannySetupContext("abs", 0);
12578 
12579  /* "PyClical.pyx":1480
12580  * 2.0
12581  * """
12582  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12583  *
12584  * cpdef inline max_abs(obj):
12585  */
12586  __Pyx_XDECREF(__pyx_r);
12587  __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)
12588  __Pyx_GOTREF(__pyx_t_1);
12589  __pyx_r = __pyx_t_1;
12590  __pyx_t_1 = 0;
12591  goto __pyx_L0;
12592 
12593  /* "PyClical.pyx":1473
12594  * return clifford(obj).norm()
12595  *
12596  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12597  * """
12598  * Absolute value of multivector: multivector 2-norm.
12599  */
12600 
12601  /* function exit code */
12602  __pyx_L1_error:;
12603  __Pyx_XDECREF(__pyx_t_1);
12604  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12605  __pyx_r = 0;
12606  __pyx_L0:;
12607  __Pyx_XGIVEREF(__pyx_r);
12608  __Pyx_RefNannyFinishContext();
12609  return __pyx_r;
12610  }
12611 
12612  /* Python wrapper */
12613  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12614  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 ";
12615  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12616  PyObject *__pyx_r = 0;
12617  __Pyx_RefNannyDeclarations
12618  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12619  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12620 
12621  /* function exit code */
12622  __Pyx_RefNannyFinishContext();
12623  return __pyx_r;
12624  }
12625 
12626  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12627  PyObject *__pyx_r = NULL;
12628  __Pyx_RefNannyDeclarations
12629  PyObject *__pyx_t_1 = NULL;
12630  __Pyx_RefNannySetupContext("abs", 0);
12631  __Pyx_XDECREF(__pyx_r);
12632  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12633  __Pyx_GOTREF(__pyx_t_1);
12634  __pyx_r = __pyx_t_1;
12635  __pyx_t_1 = 0;
12636  goto __pyx_L0;
12637 
12638  /* function exit code */
12639  __pyx_L1_error:;
12640  __Pyx_XDECREF(__pyx_t_1);
12641  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12642  __pyx_r = NULL;
12643  __pyx_L0:;
12644  __Pyx_XGIVEREF(__pyx_r);
12645  __Pyx_RefNannyFinishContext();
12646  return __pyx_r;
12647  }
12648 
12649  /* "PyClical.pyx":1482
12650  * return glucat.abs(toClifford(obj))
12651  *
12652  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12653  * """
12654  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12655  */
12656 
12657  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12658  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12659  PyObject *__pyx_r = NULL;
12660  __Pyx_RefNannyDeclarations
12661  PyObject *__pyx_t_1 = NULL;
12662  __Pyx_RefNannySetupContext("max_abs", 0);
12663 
12664  /* "PyClical.pyx":1492
12665  *
12666  * """
12667  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12668  *
12669  * cpdef inline pow(obj, m):
12670  */
12671  __Pyx_XDECREF(__pyx_r);
12672  __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)
12673  __Pyx_GOTREF(__pyx_t_1);
12674  __pyx_r = __pyx_t_1;
12675  __pyx_t_1 = 0;
12676  goto __pyx_L0;
12677 
12678  /* "PyClical.pyx":1482
12679  * return glucat.abs(toClifford(obj))
12680  *
12681  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12682  * """
12683  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12684  */
12685 
12686  /* function exit code */
12687  __pyx_L1_error:;
12688  __Pyx_XDECREF(__pyx_t_1);
12689  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12690  __pyx_r = 0;
12691  __pyx_L0:;
12692  __Pyx_XGIVEREF(__pyx_r);
12693  __Pyx_RefNannyFinishContext();
12694  return __pyx_r;
12695  }
12696 
12697  /* Python wrapper */
12698  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12699  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 ";
12700  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12701  PyObject *__pyx_r = 0;
12702  __Pyx_RefNannyDeclarations
12703  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12704  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12705 
12706  /* function exit code */
12707  __Pyx_RefNannyFinishContext();
12708  return __pyx_r;
12709  }
12710 
12711  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12712  PyObject *__pyx_r = NULL;
12713  __Pyx_RefNannyDeclarations
12714  PyObject *__pyx_t_1 = NULL;
12715  __Pyx_RefNannySetupContext("max_abs", 0);
12716  __Pyx_XDECREF(__pyx_r);
12717  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12718  __Pyx_GOTREF(__pyx_t_1);
12719  __pyx_r = __pyx_t_1;
12720  __pyx_t_1 = 0;
12721  goto __pyx_L0;
12722 
12723  /* function exit code */
12724  __pyx_L1_error:;
12725  __Pyx_XDECREF(__pyx_t_1);
12726  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12727  __pyx_r = NULL;
12728  __pyx_L0:;
12729  __Pyx_XGIVEREF(__pyx_r);
12730  __Pyx_RefNannyFinishContext();
12731  return __pyx_r;
12732  }
12733 
12734  /* "PyClical.pyx":1494
12735  * return glucat.max_abs(toClifford(obj))
12736  *
12737  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12738  * """
12739  * Integer power of multivector: obj to the m.
12740  */
12741 
12742  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12743  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12744  PyObject *__pyx_r = NULL;
12745  __Pyx_RefNannyDeclarations
12746  PyObject *__pyx_t_1 = NULL;
12747  PyObject *__pyx_t_2 = NULL;
12748  PyObject *__pyx_t_3 = NULL;
12749  PyObject *__pyx_t_4 = NULL;
12750  PyObject *__pyx_t_5 = NULL;
12751  PyObject *__pyx_t_6 = NULL;
12752  int __pyx_t_7;
12753  PyObject *__pyx_t_8 = NULL;
12754  PyObject *__pyx_t_9 = NULL;
12755  PyObject *__pyx_t_10 = NULL;
12756  PyObject *__pyx_t_11 = NULL;
12757  __Pyx_RefNannySetupContext("pow", 0);
12758 
12759  /* "PyClical.pyx":1513
12760  * 1
12761  * """
12762  * try: # <<<<<<<<<<<<<<
12763  * math.pow(obj, m)
12764  * except:
12765  */
12766  {
12767  __Pyx_PyThreadState_declare
12768  __Pyx_PyThreadState_assign
12769  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12770  __Pyx_XGOTREF(__pyx_t_1);
12771  __Pyx_XGOTREF(__pyx_t_2);
12772  __Pyx_XGOTREF(__pyx_t_3);
12773  /*try:*/ {
12774 
12775  /* "PyClical.pyx":1514
12776  * """
12777  * try:
12778  * math.pow(obj, m) # <<<<<<<<<<<<<<
12779  * except:
12780  * return clifford(obj).pow(m)
12781  */
12782  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12783  __Pyx_GOTREF(__pyx_t_5);
12784  __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)
12785  __Pyx_GOTREF(__pyx_t_6);
12786  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12787  __pyx_t_5 = NULL;
12788  __pyx_t_7 = 0;
12789  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12790  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12791  if (likely(__pyx_t_5)) {
12792  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12793  __Pyx_INCREF(__pyx_t_5);
12794  __Pyx_INCREF(function);
12795  __Pyx_DECREF_SET(__pyx_t_6, function);
12796  __pyx_t_7 = 1;
12797  }
12798  }
12799  #if CYTHON_FAST_PYCALL
12800  if (PyFunction_Check(__pyx_t_6)) {
12801  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12802  __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)
12803  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12804  __Pyx_GOTREF(__pyx_t_4);
12805  } else
12806  #endif
12807  #if CYTHON_FAST_PYCCALL
12808  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12809  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12810  __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)
12811  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12812  __Pyx_GOTREF(__pyx_t_4);
12813  } else
12814  #endif
12815  {
12816  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12817  __Pyx_GOTREF(__pyx_t_8);
12818  if (__pyx_t_5) {
12819  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12820  }
12821  __Pyx_INCREF(__pyx_v_obj);
12822  __Pyx_GIVEREF(__pyx_v_obj);
12823  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12824  __Pyx_INCREF(__pyx_v_m);
12825  __Pyx_GIVEREF(__pyx_v_m);
12826  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12827  __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)
12828  __Pyx_GOTREF(__pyx_t_4);
12829  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12830  }
12831  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12832  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12833 
12834  /* "PyClical.pyx":1513
12835  * 1
12836  * """
12837  * try: # <<<<<<<<<<<<<<
12838  * math.pow(obj, m)
12839  * except:
12840  */
12841  }
12842  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12843  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12844  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12845  goto __pyx_L8_try_end;
12846  __pyx_L3_error:;
12847  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12848  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12849  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12850  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12851 
12852  /* "PyClical.pyx":1515
12853  * try:
12854  * math.pow(obj, m)
12855  * except: # <<<<<<<<<<<<<<
12856  * return clifford(obj).pow(m)
12857  *
12858  */
12859  /*except:*/ {
12860  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12861  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12862  __Pyx_GOTREF(__pyx_t_4);
12863  __Pyx_GOTREF(__pyx_t_6);
12864  __Pyx_GOTREF(__pyx_t_8);
12865 
12866  /* "PyClical.pyx":1516
12867  * math.pow(obj, m)
12868  * except:
12869  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12870  *
12871  * cpdef inline outer_pow(obj, m):
12872  */
12873  __Pyx_XDECREF(__pyx_r);
12874  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12875  __Pyx_GOTREF(__pyx_t_9);
12876  __Pyx_INCREF(__pyx_v_obj);
12877  __Pyx_GIVEREF(__pyx_v_obj);
12878  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_obj);
12879  __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)
12880  __Pyx_GOTREF(__pyx_t_10);
12881  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12882  __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)
12883  __Pyx_GOTREF(__pyx_t_9);
12884  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12885  __pyx_t_10 = NULL;
12886  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
12887  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
12888  if (likely(__pyx_t_10)) {
12889  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
12890  __Pyx_INCREF(__pyx_t_10);
12891  __Pyx_INCREF(function);
12892  __Pyx_DECREF_SET(__pyx_t_9, function);
12893  }
12894  }
12895  if (!__pyx_t_10) {
12896  __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)
12897  __Pyx_GOTREF(__pyx_t_5);
12898  } else {
12899  #if CYTHON_FAST_PYCALL
12900  if (PyFunction_Check(__pyx_t_9)) {
12901  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_m};
12902  __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)
12903  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12904  __Pyx_GOTREF(__pyx_t_5);
12905  } else
12906  #endif
12907  #if CYTHON_FAST_PYCCALL
12908  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
12909  PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_m};
12910  __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)
12911  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
12912  __Pyx_GOTREF(__pyx_t_5);
12913  } else
12914  #endif
12915  {
12916  __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12917  __Pyx_GOTREF(__pyx_t_11);
12918  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
12919  __Pyx_INCREF(__pyx_v_m);
12920  __Pyx_GIVEREF(__pyx_v_m);
12921  PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12922  __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)
12923  __Pyx_GOTREF(__pyx_t_5);
12924  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12925  }
12926  }
12927  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12928  __pyx_r = __pyx_t_5;
12929  __pyx_t_5 = 0;
12930  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12931  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12932  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12933  goto __pyx_L6_except_return;
12934  }
12935  __pyx_L5_except_error:;
12936 
12937  /* "PyClical.pyx":1513
12938  * 1
12939  * """
12940  * try: # <<<<<<<<<<<<<<
12941  * math.pow(obj, m)
12942  * except:
12943  */
12944  __Pyx_XGIVEREF(__pyx_t_1);
12945  __Pyx_XGIVEREF(__pyx_t_2);
12946  __Pyx_XGIVEREF(__pyx_t_3);
12947  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12948  goto __pyx_L1_error;
12949  __pyx_L6_except_return:;
12950  __Pyx_XGIVEREF(__pyx_t_1);
12951  __Pyx_XGIVEREF(__pyx_t_2);
12952  __Pyx_XGIVEREF(__pyx_t_3);
12953  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12954  goto __pyx_L0;
12955  __pyx_L8_try_end:;
12956  }
12957 
12958  /* "PyClical.pyx":1494
12959  * return glucat.max_abs(toClifford(obj))
12960  *
12961  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12962  * """
12963  * Integer power of multivector: obj to the m.
12964  */
12965 
12966  /* function exit code */
12967  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12968  goto __pyx_L0;
12969  __pyx_L1_error:;
12970  __Pyx_XDECREF(__pyx_t_4);
12971  __Pyx_XDECREF(__pyx_t_5);
12972  __Pyx_XDECREF(__pyx_t_6);
12973  __Pyx_XDECREF(__pyx_t_8);
12974  __Pyx_XDECREF(__pyx_t_9);
12975  __Pyx_XDECREF(__pyx_t_10);
12976  __Pyx_XDECREF(__pyx_t_11);
12977  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12978  __pyx_r = 0;
12979  __pyx_L0:;
12980  __Pyx_XGIVEREF(__pyx_r);
12981  __Pyx_RefNannyFinishContext();
12982  return __pyx_r;
12983  }
12984 
12985  /* Python wrapper */
12986  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12987  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 ";
12988  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12989  PyObject *__pyx_v_obj = 0;
12990  PyObject *__pyx_v_m = 0;
12991  PyObject *__pyx_r = 0;
12992  __Pyx_RefNannyDeclarations
12993  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12994  {
12995  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12996  PyObject* values[2] = {0,0};
12997  if (unlikely(__pyx_kwds)) {
12998  Py_ssize_t kw_args;
12999  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13000  switch (pos_args) {
13001  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13002  CYTHON_FALLTHROUGH;
13003  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13004  CYTHON_FALLTHROUGH;
13005  case 0: break;
13006  default: goto __pyx_L5_argtuple_error;
13007  }
13008  kw_args = PyDict_Size(__pyx_kwds);
13009  switch (pos_args) {
13010  case 0:
13011  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13012  else goto __pyx_L5_argtuple_error;
13013  CYTHON_FALLTHROUGH;
13014  case 1:
13015  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13016  else {
13017  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
13018  }
13019  }
13020  if (unlikely(kw_args > 0)) {
13021  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
13022  }
13023  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13024  goto __pyx_L5_argtuple_error;
13025  } else {
13026  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13027  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13028  }
13029  __pyx_v_obj = values[0];
13030  __pyx_v_m = values[1];
13031  }
13032  goto __pyx_L4_argument_unpacking_done;
13033  __pyx_L5_argtuple_error:;
13034  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
13035  __pyx_L3_error:;
13036  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13037  __Pyx_RefNannyFinishContext();
13038  return NULL;
13039  __pyx_L4_argument_unpacking_done:;
13040  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13041 
13042  /* function exit code */
13043  __Pyx_RefNannyFinishContext();
13044  return __pyx_r;
13045  }
13046 
13047  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13048  PyObject *__pyx_r = NULL;
13049  __Pyx_RefNannyDeclarations
13050  PyObject *__pyx_t_1 = NULL;
13051  __Pyx_RefNannySetupContext("pow", 0);
13052  __Pyx_XDECREF(__pyx_r);
13053  __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)
13054  __Pyx_GOTREF(__pyx_t_1);
13055  __pyx_r = __pyx_t_1;
13056  __pyx_t_1 = 0;
13057  goto __pyx_L0;
13058 
13059  /* function exit code */
13060  __pyx_L1_error:;
13061  __Pyx_XDECREF(__pyx_t_1);
13062  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13063  __pyx_r = NULL;
13064  __pyx_L0:;
13065  __Pyx_XGIVEREF(__pyx_r);
13066  __Pyx_RefNannyFinishContext();
13067  return __pyx_r;
13068  }
13069 
13070  /* "PyClical.pyx":1518
13071  * return clifford(obj).pow(m)
13072  *
13073  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13074  * """
13075  * Outer product power of multivector.
13076  */
13077 
13078  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13079  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
13080  PyObject *__pyx_r = NULL;
13081  __Pyx_RefNannyDeclarations
13082  PyObject *__pyx_t_1 = NULL;
13083  PyObject *__pyx_t_2 = NULL;
13084  PyObject *__pyx_t_3 = NULL;
13085  PyObject *__pyx_t_4 = NULL;
13086  __Pyx_RefNannySetupContext("outer_pow", 0);
13087 
13088  /* "PyClical.pyx":1525
13089  * 1+3{1}+3{1,2}
13090  * """
13091  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
13092  *
13093  * cpdef inline complexifier(obj):
13094  */
13095  __Pyx_XDECREF(__pyx_r);
13096  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
13097  __Pyx_GOTREF(__pyx_t_2);
13098  __Pyx_INCREF(__pyx_v_obj);
13099  __Pyx_GIVEREF(__pyx_v_obj);
13100  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_obj);
13101  __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)
13102  __Pyx_GOTREF(__pyx_t_3);
13103  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13104  __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)
13105  __Pyx_GOTREF(__pyx_t_2);
13106  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13107  __pyx_t_3 = NULL;
13108  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13109  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
13110  if (likely(__pyx_t_3)) {
13111  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13112  __Pyx_INCREF(__pyx_t_3);
13113  __Pyx_INCREF(function);
13114  __Pyx_DECREF_SET(__pyx_t_2, function);
13115  }
13116  }
13117  if (!__pyx_t_3) {
13118  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
13119  __Pyx_GOTREF(__pyx_t_1);
13120  } else {
13121  #if CYTHON_FAST_PYCALL
13122  if (PyFunction_Check(__pyx_t_2)) {
13123  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_m};
13124  __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)
13125  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13126  __Pyx_GOTREF(__pyx_t_1);
13127  } else
13128  #endif
13129  #if CYTHON_FAST_PYCCALL
13130  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
13131  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_m};
13132  __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)
13133  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13134  __Pyx_GOTREF(__pyx_t_1);
13135  } else
13136  #endif
13137  {
13138  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
13139  __Pyx_GOTREF(__pyx_t_4);
13140  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
13141  __Pyx_INCREF(__pyx_v_m);
13142  __Pyx_GIVEREF(__pyx_v_m);
13143  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
13144  __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)
13145  __Pyx_GOTREF(__pyx_t_1);
13146  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13147  }
13148  }
13149  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13150  __pyx_r = __pyx_t_1;
13151  __pyx_t_1 = 0;
13152  goto __pyx_L0;
13153 
13154  /* "PyClical.pyx":1518
13155  * return clifford(obj).pow(m)
13156  *
13157  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
13158  * """
13159  * Outer product power of multivector.
13160  */
13161 
13162  /* function exit code */
13163  __pyx_L1_error:;
13164  __Pyx_XDECREF(__pyx_t_1);
13165  __Pyx_XDECREF(__pyx_t_2);
13166  __Pyx_XDECREF(__pyx_t_3);
13167  __Pyx_XDECREF(__pyx_t_4);
13168  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13169  __pyx_r = 0;
13170  __pyx_L0:;
13171  __Pyx_XGIVEREF(__pyx_r);
13172  __Pyx_RefNannyFinishContext();
13173  return __pyx_r;
13174  }
13175 
13176  /* Python wrapper */
13177  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13178  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 ";
13179  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13180  PyObject *__pyx_v_obj = 0;
13181  PyObject *__pyx_v_m = 0;
13182  PyObject *__pyx_r = 0;
13183  __Pyx_RefNannyDeclarations
13184  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
13185  {
13186  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
13187  PyObject* values[2] = {0,0};
13188  if (unlikely(__pyx_kwds)) {
13189  Py_ssize_t kw_args;
13190  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13191  switch (pos_args) {
13192  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13193  CYTHON_FALLTHROUGH;
13194  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13195  CYTHON_FALLTHROUGH;
13196  case 0: break;
13197  default: goto __pyx_L5_argtuple_error;
13198  }
13199  kw_args = PyDict_Size(__pyx_kwds);
13200  switch (pos_args) {
13201  case 0:
13202  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13203  else goto __pyx_L5_argtuple_error;
13204  CYTHON_FALLTHROUGH;
13205  case 1:
13206  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
13207  else {
13208  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
13209  }
13210  }
13211  if (unlikely(kw_args > 0)) {
13212  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
13213  }
13214  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
13215  goto __pyx_L5_argtuple_error;
13216  } else {
13217  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13218  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13219  }
13220  __pyx_v_obj = values[0];
13221  __pyx_v_m = values[1];
13222  }
13223  goto __pyx_L4_argument_unpacking_done;
13224  __pyx_L5_argtuple_error:;
13225  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
13226  __pyx_L3_error:;
13227  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13228  __Pyx_RefNannyFinishContext();
13229  return NULL;
13230  __pyx_L4_argument_unpacking_done:;
13231  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13232 
13233  /* function exit code */
13234  __Pyx_RefNannyFinishContext();
13235  return __pyx_r;
13236  }
13237 
13238  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13239  PyObject *__pyx_r = NULL;
13240  __Pyx_RefNannyDeclarations
13241  PyObject *__pyx_t_1 = NULL;
13242  __Pyx_RefNannySetupContext("outer_pow", 0);
13243  __Pyx_XDECREF(__pyx_r);
13244  __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)
13245  __Pyx_GOTREF(__pyx_t_1);
13246  __pyx_r = __pyx_t_1;
13247  __pyx_t_1 = 0;
13248  goto __pyx_L0;
13249 
13250  /* function exit code */
13251  __pyx_L1_error:;
13252  __Pyx_XDECREF(__pyx_t_1);
13253  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13254  __pyx_r = NULL;
13255  __pyx_L0:;
13256  __Pyx_XGIVEREF(__pyx_r);
13257  __Pyx_RefNannyFinishContext();
13258  return __pyx_r;
13259  }
13260 
13261  /* "PyClical.pyx":1527
13262  * return clifford(obj).outer_pow(m)
13263  *
13264  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13265  * """
13266  * Square root of -1 which commutes with all members of the frame of the given multivector.
13267  */
13268 
13269  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13270  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13271  PyObject *__pyx_r = NULL;
13272  __Pyx_RefNannyDeclarations
13273  PyObject *__pyx_t_1 = NULL;
13274  PyObject *__pyx_t_2 = NULL;
13275  __Pyx_RefNannySetupContext("complexifier", 0);
13276 
13277  /* "PyClical.pyx":1540
13278  * {-1}
13279  * """
13280  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13281  *
13282  * cpdef inline sqrt(obj, i = None):
13283  */
13284  __Pyx_XDECREF(__pyx_r);
13285  __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)
13286  __Pyx_GOTREF(__pyx_t_1);
13287  __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)
13288  __Pyx_GOTREF(__pyx_t_2);
13289  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13290  __pyx_r = __pyx_t_2;
13291  __pyx_t_2 = 0;
13292  goto __pyx_L0;
13293 
13294  /* "PyClical.pyx":1527
13295  * return clifford(obj).outer_pow(m)
13296  *
13297  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13298  * """
13299  * Square root of -1 which commutes with all members of the frame of the given multivector.
13300  */
13301 
13302  /* function exit code */
13303  __pyx_L1_error:;
13304  __Pyx_XDECREF(__pyx_t_1);
13305  __Pyx_XDECREF(__pyx_t_2);
13306  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13307  __pyx_r = 0;
13308  __pyx_L0:;
13309  __Pyx_XGIVEREF(__pyx_r);
13310  __Pyx_RefNannyFinishContext();
13311  return __pyx_r;
13312  }
13313 
13314  /* Python wrapper */
13315  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13316  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 ";
13317  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13318  PyObject *__pyx_r = 0;
13319  __Pyx_RefNannyDeclarations
13320  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13321  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13322 
13323  /* function exit code */
13324  __Pyx_RefNannyFinishContext();
13325  return __pyx_r;
13326  }
13327 
13328  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13329  PyObject *__pyx_r = NULL;
13330  __Pyx_RefNannyDeclarations
13331  PyObject *__pyx_t_1 = NULL;
13332  __Pyx_RefNannySetupContext("complexifier", 0);
13333  __Pyx_XDECREF(__pyx_r);
13334  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13335  __Pyx_GOTREF(__pyx_t_1);
13336  __pyx_r = __pyx_t_1;
13337  __pyx_t_1 = 0;
13338  goto __pyx_L0;
13339 
13340  /* function exit code */
13341  __pyx_L1_error:;
13342  __Pyx_XDECREF(__pyx_t_1);
13343  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13344  __pyx_r = NULL;
13345  __pyx_L0:;
13346  __Pyx_XGIVEREF(__pyx_r);
13347  __Pyx_RefNannyFinishContext();
13348  return __pyx_r;
13349  }
13350 
13351  /* "PyClical.pyx":1542
13352  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13353  *
13354  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13355  * """
13356  * Square root of multivector with optional complexifier.
13357  */
13358 
13359  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13360  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) {
13361  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13362  PyObject *__pyx_r = NULL;
13363  __Pyx_RefNannyDeclarations
13364  int __pyx_t_1;
13365  int __pyx_t_2;
13366  PyObject *__pyx_t_3 = NULL;
13367  Clifford __pyx_t_4;
13368  PyObject *__pyx_t_5 = NULL;
13369  PyObject *__pyx_t_6 = NULL;
13370  PyObject *__pyx_t_7 = NULL;
13371  PyObject *__pyx_t_8 = NULL;
13372  PyObject *__pyx_t_9 = NULL;
13373  PyObject *__pyx_t_10 = NULL;
13374  PyObject *__pyx_t_11 = NULL;
13375  __Pyx_RefNannySetupContext("sqrt", 0);
13376  if (__pyx_optional_args) {
13377  if (__pyx_optional_args->__pyx_n > 0) {
13378  __pyx_v_i = __pyx_optional_args->i;
13379  }
13380  }
13381 
13382  /* "PyClical.pyx":1557
13383  * -1
13384  * """
13385  * if not (i is None): # <<<<<<<<<<<<<<
13386  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13387  * else:
13388  */
13389  __pyx_t_1 = (__pyx_v_i != Py_None);
13390  __pyx_t_2 = (__pyx_t_1 != 0);
13391  if (__pyx_t_2) {
13392 
13393  /* "PyClical.pyx":1558
13394  * """
13395  * if not (i is None):
13396  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13397  * else:
13398  * try:
13399  */
13400  __Pyx_XDECREF(__pyx_r);
13401  __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)
13402  __Pyx_GOTREF(__pyx_t_3);
13403  try {
13404  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13405  } catch(...) {
13406  __Pyx_CppExn2PyErr();
13407  __PYX_ERR(0, 1558, __pyx_L1_error)
13408  }
13409  __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)
13410  __Pyx_GOTREF(__pyx_t_5);
13411  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13412  __pyx_r = __pyx_t_5;
13413  __pyx_t_5 = 0;
13414  goto __pyx_L0;
13415 
13416  /* "PyClical.pyx":1557
13417  * -1
13418  * """
13419  * if not (i is None): # <<<<<<<<<<<<<<
13420  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13421  * else:
13422  */
13423  }
13424 
13425  /* "PyClical.pyx":1560
13426  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13427  * else:
13428  * try: # <<<<<<<<<<<<<<
13429  * return math.sqrt(obj)
13430  * except:
13431  */
13432  /*else*/ {
13433  {
13434  __Pyx_PyThreadState_declare
13435  __Pyx_PyThreadState_assign
13436  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13437  __Pyx_XGOTREF(__pyx_t_6);
13438  __Pyx_XGOTREF(__pyx_t_7);
13439  __Pyx_XGOTREF(__pyx_t_8);
13440  /*try:*/ {
13441 
13442  /* "PyClical.pyx":1561
13443  * else:
13444  * try:
13445  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13446  * except:
13447  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13448  */
13449  __Pyx_XDECREF(__pyx_r);
13450  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13451  __Pyx_GOTREF(__pyx_t_3);
13452  __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)
13453  __Pyx_GOTREF(__pyx_t_9);
13454  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13455  __pyx_t_3 = NULL;
13456  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13457  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13458  if (likely(__pyx_t_3)) {
13459  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13460  __Pyx_INCREF(__pyx_t_3);
13461  __Pyx_INCREF(function);
13462  __Pyx_DECREF_SET(__pyx_t_9, function);
13463  }
13464  }
13465  if (!__pyx_t_3) {
13466  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13467  __Pyx_GOTREF(__pyx_t_5);
13468  } else {
13469  #if CYTHON_FAST_PYCALL
13470  if (PyFunction_Check(__pyx_t_9)) {
13471  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13472  __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)
13473  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13474  __Pyx_GOTREF(__pyx_t_5);
13475  } else
13476  #endif
13477  #if CYTHON_FAST_PYCCALL
13478  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13479  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13480  __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)
13481  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13482  __Pyx_GOTREF(__pyx_t_5);
13483  } else
13484  #endif
13485  {
13486  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L4_error)
13487  __Pyx_GOTREF(__pyx_t_10);
13488  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13489  __Pyx_INCREF(__pyx_v_obj);
13490  __Pyx_GIVEREF(__pyx_v_obj);
13491  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13492  __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)
13493  __Pyx_GOTREF(__pyx_t_5);
13494  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13495  }
13496  }
13497  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13498  __pyx_r = __pyx_t_5;
13499  __pyx_t_5 = 0;
13500  goto __pyx_L8_try_return;
13501 
13502  /* "PyClical.pyx":1560
13503  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13504  * else:
13505  * try: # <<<<<<<<<<<<<<
13506  * return math.sqrt(obj)
13507  * except:
13508  */
13509  }
13510  __pyx_L4_error:;
13511  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13512  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13513  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13514  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13515 
13516  /* "PyClical.pyx":1562
13517  * try:
13518  * return math.sqrt(obj)
13519  * except: # <<<<<<<<<<<<<<
13520  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13521  *
13522  */
13523  /*except:*/ {
13524  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13525  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13526  __Pyx_GOTREF(__pyx_t_5);
13527  __Pyx_GOTREF(__pyx_t_9);
13528  __Pyx_GOTREF(__pyx_t_10);
13529 
13530  /* "PyClical.pyx":1563
13531  * return math.sqrt(obj)
13532  * except:
13533  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13534  *
13535  * cpdef inline exp(obj):
13536  */
13537  __Pyx_XDECREF(__pyx_r);
13538  __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)
13539  __Pyx_GOTREF(__pyx_t_3);
13540  __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)
13541  __Pyx_GOTREF(__pyx_t_11);
13542  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13543  __pyx_r = __pyx_t_11;
13544  __pyx_t_11 = 0;
13545  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13546  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13547  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13548  goto __pyx_L7_except_return;
13549  }
13550  __pyx_L6_except_error:;
13551 
13552  /* "PyClical.pyx":1560
13553  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13554  * else:
13555  * try: # <<<<<<<<<<<<<<
13556  * return math.sqrt(obj)
13557  * except:
13558  */
13559  __Pyx_XGIVEREF(__pyx_t_6);
13560  __Pyx_XGIVEREF(__pyx_t_7);
13561  __Pyx_XGIVEREF(__pyx_t_8);
13562  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13563  goto __pyx_L1_error;
13564  __pyx_L8_try_return:;
13565  __Pyx_XGIVEREF(__pyx_t_6);
13566  __Pyx_XGIVEREF(__pyx_t_7);
13567  __Pyx_XGIVEREF(__pyx_t_8);
13568  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13569  goto __pyx_L0;
13570  __pyx_L7_except_return:;
13571  __Pyx_XGIVEREF(__pyx_t_6);
13572  __Pyx_XGIVEREF(__pyx_t_7);
13573  __Pyx_XGIVEREF(__pyx_t_8);
13574  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13575  goto __pyx_L0;
13576  }
13577  }
13578 
13579  /* "PyClical.pyx":1542
13580  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13581  *
13582  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13583  * """
13584  * Square root of multivector with optional complexifier.
13585  */
13586 
13587  /* function exit code */
13588  __pyx_L1_error:;
13589  __Pyx_XDECREF(__pyx_t_3);
13590  __Pyx_XDECREF(__pyx_t_5);
13591  __Pyx_XDECREF(__pyx_t_9);
13592  __Pyx_XDECREF(__pyx_t_10);
13593  __Pyx_XDECREF(__pyx_t_11);
13594  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13595  __pyx_r = 0;
13596  __pyx_L0:;
13597  __Pyx_XGIVEREF(__pyx_r);
13598  __Pyx_RefNannyFinishContext();
13599  return __pyx_r;
13600  }
13601 
13602  /* Python wrapper */
13603  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13604  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 ";
13605  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13606  PyObject *__pyx_v_obj = 0;
13607  PyObject *__pyx_v_i = 0;
13608  PyObject *__pyx_r = 0;
13609  __Pyx_RefNannyDeclarations
13610  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13611  {
13612  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13613  PyObject* values[2] = {0,0};
13614  values[1] = ((PyObject *)Py_None);
13615  if (unlikely(__pyx_kwds)) {
13616  Py_ssize_t kw_args;
13617  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13618  switch (pos_args) {
13619  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13620  CYTHON_FALLTHROUGH;
13621  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13622  CYTHON_FALLTHROUGH;
13623  case 0: break;
13624  default: goto __pyx_L5_argtuple_error;
13625  }
13626  kw_args = PyDict_Size(__pyx_kwds);
13627  switch (pos_args) {
13628  case 0:
13629  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13630  else goto __pyx_L5_argtuple_error;
13631  CYTHON_FALLTHROUGH;
13632  case 1:
13633  if (kw_args > 0) {
13634  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
13635  if (value) { values[1] = value; kw_args--; }
13636  }
13637  }
13638  if (unlikely(kw_args > 0)) {
13639  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13640  }
13641  } else {
13642  switch (PyTuple_GET_SIZE(__pyx_args)) {
13643  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13644  CYTHON_FALLTHROUGH;
13645  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13646  break;
13647  default: goto __pyx_L5_argtuple_error;
13648  }
13649  }
13650  __pyx_v_obj = values[0];
13651  __pyx_v_i = values[1];
13652  }
13653  goto __pyx_L4_argument_unpacking_done;
13654  __pyx_L5_argtuple_error:;
13655  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13656  __pyx_L3_error:;
13657  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13658  __Pyx_RefNannyFinishContext();
13659  return NULL;
13660  __pyx_L4_argument_unpacking_done:;
13661  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13662 
13663  /* function exit code */
13664  __Pyx_RefNannyFinishContext();
13665  return __pyx_r;
13666  }
13667 
13668  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13669  PyObject *__pyx_r = NULL;
13670  __Pyx_RefNannyDeclarations
13671  PyObject *__pyx_t_1 = NULL;
13672  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13673  __Pyx_RefNannySetupContext("sqrt", 0);
13674  __Pyx_XDECREF(__pyx_r);
13675  __pyx_t_2.__pyx_n = 1;
13676  __pyx_t_2.i = __pyx_v_i;
13677  __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)
13678  __Pyx_GOTREF(__pyx_t_1);
13679  __pyx_r = __pyx_t_1;
13680  __pyx_t_1 = 0;
13681  goto __pyx_L0;
13682 
13683  /* function exit code */
13684  __pyx_L1_error:;
13685  __Pyx_XDECREF(__pyx_t_1);
13686  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13687  __pyx_r = NULL;
13688  __pyx_L0:;
13689  __Pyx_XGIVEREF(__pyx_r);
13690  __Pyx_RefNannyFinishContext();
13691  return __pyx_r;
13692  }
13693 
13694  /* "PyClical.pyx":1565
13695  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13696  *
13697  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13698  * """
13699  * Exponential of multivector.
13700  */
13701 
13702  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13703  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13704  PyObject *__pyx_r = NULL;
13705  __Pyx_RefNannyDeclarations
13706  PyObject *__pyx_t_1 = NULL;
13707  PyObject *__pyx_t_2 = NULL;
13708  PyObject *__pyx_t_3 = NULL;
13709  PyObject *__pyx_t_4 = NULL;
13710  PyObject *__pyx_t_5 = NULL;
13711  PyObject *__pyx_t_6 = NULL;
13712  PyObject *__pyx_t_7 = NULL;
13713  PyObject *__pyx_t_8 = NULL;
13714  __Pyx_RefNannySetupContext("exp", 0);
13715 
13716  /* "PyClical.pyx":1574
13717  * {1,2}
13718  * """
13719  * try: # <<<<<<<<<<<<<<
13720  * return math.exp(obj)
13721  * except:
13722  */
13723  {
13724  __Pyx_PyThreadState_declare
13725  __Pyx_PyThreadState_assign
13726  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13727  __Pyx_XGOTREF(__pyx_t_1);
13728  __Pyx_XGOTREF(__pyx_t_2);
13729  __Pyx_XGOTREF(__pyx_t_3);
13730  /*try:*/ {
13731 
13732  /* "PyClical.pyx":1575
13733  * """
13734  * try:
13735  * return math.exp(obj) # <<<<<<<<<<<<<<
13736  * except:
13737  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13738  */
13739  __Pyx_XDECREF(__pyx_r);
13740  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13741  __Pyx_GOTREF(__pyx_t_5);
13742  __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)
13743  __Pyx_GOTREF(__pyx_t_6);
13744  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13745  __pyx_t_5 = NULL;
13746  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13747  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13748  if (likely(__pyx_t_5)) {
13749  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13750  __Pyx_INCREF(__pyx_t_5);
13751  __Pyx_INCREF(function);
13752  __Pyx_DECREF_SET(__pyx_t_6, function);
13753  }
13754  }
13755  if (!__pyx_t_5) {
13756  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13757  __Pyx_GOTREF(__pyx_t_4);
13758  } else {
13759  #if CYTHON_FAST_PYCALL
13760  if (PyFunction_Check(__pyx_t_6)) {
13761  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13762  __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)
13763  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13764  __Pyx_GOTREF(__pyx_t_4);
13765  } else
13766  #endif
13767  #if CYTHON_FAST_PYCCALL
13768  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13769  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13770  __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)
13771  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13772  __Pyx_GOTREF(__pyx_t_4);
13773  } else
13774  #endif
13775  {
13776  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L3_error)
13777  __Pyx_GOTREF(__pyx_t_7);
13778  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13779  __Pyx_INCREF(__pyx_v_obj);
13780  __Pyx_GIVEREF(__pyx_v_obj);
13781  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13782  __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)
13783  __Pyx_GOTREF(__pyx_t_4);
13784  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13785  }
13786  }
13787  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13788  __pyx_r = __pyx_t_4;
13789  __pyx_t_4 = 0;
13790  goto __pyx_L7_try_return;
13791 
13792  /* "PyClical.pyx":1574
13793  * {1,2}
13794  * """
13795  * try: # <<<<<<<<<<<<<<
13796  * return math.exp(obj)
13797  * except:
13798  */
13799  }
13800  __pyx_L3_error:;
13801  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13802  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13803  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13804  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13805 
13806  /* "PyClical.pyx":1576
13807  * try:
13808  * return math.exp(obj)
13809  * except: # <<<<<<<<<<<<<<
13810  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13811  *
13812  */
13813  /*except:*/ {
13814  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13815  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13816  __Pyx_GOTREF(__pyx_t_4);
13817  __Pyx_GOTREF(__pyx_t_6);
13818  __Pyx_GOTREF(__pyx_t_7);
13819 
13820  /* "PyClical.pyx":1577
13821  * return math.exp(obj)
13822  * except:
13823  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13824  *
13825  * cpdef inline log(obj,i = None):
13826  */
13827  __Pyx_XDECREF(__pyx_r);
13828  __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)
13829  __Pyx_GOTREF(__pyx_t_5);
13830  __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)
13831  __Pyx_GOTREF(__pyx_t_8);
13832  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13833  __pyx_r = __pyx_t_8;
13834  __pyx_t_8 = 0;
13835  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13836  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13837  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13838  goto __pyx_L6_except_return;
13839  }
13840  __pyx_L5_except_error:;
13841 
13842  /* "PyClical.pyx":1574
13843  * {1,2}
13844  * """
13845  * try: # <<<<<<<<<<<<<<
13846  * return math.exp(obj)
13847  * except:
13848  */
13849  __Pyx_XGIVEREF(__pyx_t_1);
13850  __Pyx_XGIVEREF(__pyx_t_2);
13851  __Pyx_XGIVEREF(__pyx_t_3);
13852  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13853  goto __pyx_L1_error;
13854  __pyx_L7_try_return:;
13855  __Pyx_XGIVEREF(__pyx_t_1);
13856  __Pyx_XGIVEREF(__pyx_t_2);
13857  __Pyx_XGIVEREF(__pyx_t_3);
13858  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13859  goto __pyx_L0;
13860  __pyx_L6_except_return:;
13861  __Pyx_XGIVEREF(__pyx_t_1);
13862  __Pyx_XGIVEREF(__pyx_t_2);
13863  __Pyx_XGIVEREF(__pyx_t_3);
13864  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13865  goto __pyx_L0;
13866  }
13867 
13868  /* "PyClical.pyx":1565
13869  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13870  *
13871  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13872  * """
13873  * Exponential of multivector.
13874  */
13875 
13876  /* function exit code */
13877  __pyx_L1_error:;
13878  __Pyx_XDECREF(__pyx_t_4);
13879  __Pyx_XDECREF(__pyx_t_5);
13880  __Pyx_XDECREF(__pyx_t_6);
13881  __Pyx_XDECREF(__pyx_t_7);
13882  __Pyx_XDECREF(__pyx_t_8);
13883  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13884  __pyx_r = 0;
13885  __pyx_L0:;
13886  __Pyx_XGIVEREF(__pyx_r);
13887  __Pyx_RefNannyFinishContext();
13888  return __pyx_r;
13889  }
13890 
13891  /* Python wrapper */
13892  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13893  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 ";
13894  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13895  PyObject *__pyx_r = 0;
13896  __Pyx_RefNannyDeclarations
13897  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13898  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13899 
13900  /* function exit code */
13901  __Pyx_RefNannyFinishContext();
13902  return __pyx_r;
13903  }
13904 
13905  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13906  PyObject *__pyx_r = NULL;
13907  __Pyx_RefNannyDeclarations
13908  PyObject *__pyx_t_1 = NULL;
13909  __Pyx_RefNannySetupContext("exp", 0);
13910  __Pyx_XDECREF(__pyx_r);
13911  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13912  __Pyx_GOTREF(__pyx_t_1);
13913  __pyx_r = __pyx_t_1;
13914  __pyx_t_1 = 0;
13915  goto __pyx_L0;
13916 
13917  /* function exit code */
13918  __pyx_L1_error:;
13919  __Pyx_XDECREF(__pyx_t_1);
13920  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13921  __pyx_r = NULL;
13922  __pyx_L0:;
13923  __Pyx_XGIVEREF(__pyx_r);
13924  __Pyx_RefNannyFinishContext();
13925  return __pyx_r;
13926  }
13927 
13928  /* "PyClical.pyx":1579
13929  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13930  *
13931  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13932  * """
13933  * Natural logarithm of multivector with optional complexifier.
13934  */
13935 
13936  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13937  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) {
13938  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13939  PyObject *__pyx_r = NULL;
13940  __Pyx_RefNannyDeclarations
13941  int __pyx_t_1;
13942  int __pyx_t_2;
13943  PyObject *__pyx_t_3 = NULL;
13944  Clifford __pyx_t_4;
13945  PyObject *__pyx_t_5 = NULL;
13946  PyObject *__pyx_t_6 = NULL;
13947  PyObject *__pyx_t_7 = NULL;
13948  PyObject *__pyx_t_8 = NULL;
13949  PyObject *__pyx_t_9 = NULL;
13950  PyObject *__pyx_t_10 = NULL;
13951  PyObject *__pyx_t_11 = NULL;
13952  __Pyx_RefNannySetupContext("log", 0);
13953  if (__pyx_optional_args) {
13954  if (__pyx_optional_args->__pyx_n > 0) {
13955  __pyx_v_i = __pyx_optional_args->i;
13956  }
13957  }
13958 
13959  /* "PyClical.pyx":1594
13960  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13961  * """
13962  * if not (i is None): # <<<<<<<<<<<<<<
13963  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13964  * else:
13965  */
13966  __pyx_t_1 = (__pyx_v_i != Py_None);
13967  __pyx_t_2 = (__pyx_t_1 != 0);
13968  if (__pyx_t_2) {
13969 
13970  /* "PyClical.pyx":1595
13971  * """
13972  * if not (i is None):
13973  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13974  * else:
13975  * try:
13976  */
13977  __Pyx_XDECREF(__pyx_r);
13978  __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)
13979  __Pyx_GOTREF(__pyx_t_3);
13980  try {
13981  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13982  } catch(...) {
13983  __Pyx_CppExn2PyErr();
13984  __PYX_ERR(0, 1595, __pyx_L1_error)
13985  }
13986  __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)
13987  __Pyx_GOTREF(__pyx_t_5);
13988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13989  __pyx_r = __pyx_t_5;
13990  __pyx_t_5 = 0;
13991  goto __pyx_L0;
13992 
13993  /* "PyClical.pyx":1594
13994  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13995  * """
13996  * if not (i is None): # <<<<<<<<<<<<<<
13997  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13998  * else:
13999  */
14000  }
14001 
14002  /* "PyClical.pyx":1597
14003  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14004  * else:
14005  * try: # <<<<<<<<<<<<<<
14006  * return math.log(obj)
14007  * except:
14008  */
14009  /*else*/ {
14010  {
14011  __Pyx_PyThreadState_declare
14012  __Pyx_PyThreadState_assign
14013  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14014  __Pyx_XGOTREF(__pyx_t_6);
14015  __Pyx_XGOTREF(__pyx_t_7);
14016  __Pyx_XGOTREF(__pyx_t_8);
14017  /*try:*/ {
14018 
14019  /* "PyClical.pyx":1598
14020  * else:
14021  * try:
14022  * return math.log(obj) # <<<<<<<<<<<<<<
14023  * except:
14024  * return clifford().wrap( glucat.log(toClifford(obj)) )
14025  */
14026  __Pyx_XDECREF(__pyx_r);
14027  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
14028  __Pyx_GOTREF(__pyx_t_3);
14029  __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)
14030  __Pyx_GOTREF(__pyx_t_9);
14031  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14032  __pyx_t_3 = NULL;
14033  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14034  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14035  if (likely(__pyx_t_3)) {
14036  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14037  __Pyx_INCREF(__pyx_t_3);
14038  __Pyx_INCREF(function);
14039  __Pyx_DECREF_SET(__pyx_t_9, function);
14040  }
14041  }
14042  if (!__pyx_t_3) {
14043  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
14044  __Pyx_GOTREF(__pyx_t_5);
14045  } else {
14046  #if CYTHON_FAST_PYCALL
14047  if (PyFunction_Check(__pyx_t_9)) {
14048  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14049  __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)
14050  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14051  __Pyx_GOTREF(__pyx_t_5);
14052  } else
14053  #endif
14054  #if CYTHON_FAST_PYCCALL
14055  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14056  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14057  __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)
14058  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14059  __Pyx_GOTREF(__pyx_t_5);
14060  } else
14061  #endif
14062  {
14063  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1598, __pyx_L4_error)
14064  __Pyx_GOTREF(__pyx_t_10);
14065  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14066  __Pyx_INCREF(__pyx_v_obj);
14067  __Pyx_GIVEREF(__pyx_v_obj);
14068  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14069  __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)
14070  __Pyx_GOTREF(__pyx_t_5);
14071  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14072  }
14073  }
14074  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14075  __pyx_r = __pyx_t_5;
14076  __pyx_t_5 = 0;
14077  goto __pyx_L8_try_return;
14078 
14079  /* "PyClical.pyx":1597
14080  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14081  * else:
14082  * try: # <<<<<<<<<<<<<<
14083  * return math.log(obj)
14084  * except:
14085  */
14086  }
14087  __pyx_L4_error:;
14088  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14089  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14090  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14091  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14092 
14093  /* "PyClical.pyx":1599
14094  * try:
14095  * return math.log(obj)
14096  * except: # <<<<<<<<<<<<<<
14097  * return clifford().wrap( glucat.log(toClifford(obj)) )
14098  *
14099  */
14100  /*except:*/ {
14101  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14102  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
14103  __Pyx_GOTREF(__pyx_t_5);
14104  __Pyx_GOTREF(__pyx_t_9);
14105  __Pyx_GOTREF(__pyx_t_10);
14106 
14107  /* "PyClical.pyx":1600
14108  * return math.log(obj)
14109  * except:
14110  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
14111  *
14112  * cpdef inline cos(obj,i = None):
14113  */
14114  __Pyx_XDECREF(__pyx_r);
14115  __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)
14116  __Pyx_GOTREF(__pyx_t_3);
14117  __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)
14118  __Pyx_GOTREF(__pyx_t_11);
14119  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14120  __pyx_r = __pyx_t_11;
14121  __pyx_t_11 = 0;
14122  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14123  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14124  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14125  goto __pyx_L7_except_return;
14126  }
14127  __pyx_L6_except_error:;
14128 
14129  /* "PyClical.pyx":1597
14130  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
14131  * else:
14132  * try: # <<<<<<<<<<<<<<
14133  * return math.log(obj)
14134  * except:
14135  */
14136  __Pyx_XGIVEREF(__pyx_t_6);
14137  __Pyx_XGIVEREF(__pyx_t_7);
14138  __Pyx_XGIVEREF(__pyx_t_8);
14139  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14140  goto __pyx_L1_error;
14141  __pyx_L8_try_return:;
14142  __Pyx_XGIVEREF(__pyx_t_6);
14143  __Pyx_XGIVEREF(__pyx_t_7);
14144  __Pyx_XGIVEREF(__pyx_t_8);
14145  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14146  goto __pyx_L0;
14147  __pyx_L7_except_return:;
14148  __Pyx_XGIVEREF(__pyx_t_6);
14149  __Pyx_XGIVEREF(__pyx_t_7);
14150  __Pyx_XGIVEREF(__pyx_t_8);
14151  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14152  goto __pyx_L0;
14153  }
14154  }
14155 
14156  /* "PyClical.pyx":1579
14157  * return clifford().wrap( glucat.exp(toClifford(obj)) )
14158  *
14159  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
14160  * """
14161  * Natural logarithm of multivector with optional complexifier.
14162  */
14163 
14164  /* function exit code */
14165  __pyx_L1_error:;
14166  __Pyx_XDECREF(__pyx_t_3);
14167  __Pyx_XDECREF(__pyx_t_5);
14168  __Pyx_XDECREF(__pyx_t_9);
14169  __Pyx_XDECREF(__pyx_t_10);
14170  __Pyx_XDECREF(__pyx_t_11);
14171  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14172  __pyx_r = 0;
14173  __pyx_L0:;
14174  __Pyx_XGIVEREF(__pyx_r);
14175  __Pyx_RefNannyFinishContext();
14176  return __pyx_r;
14177  }
14178 
14179  /* Python wrapper */
14180  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14181  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 ";
14182  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14183  PyObject *__pyx_v_obj = 0;
14184  PyObject *__pyx_v_i = 0;
14185  PyObject *__pyx_r = 0;
14186  __Pyx_RefNannyDeclarations
14187  __Pyx_RefNannySetupContext("log (wrapper)", 0);
14188  {
14189  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14190  PyObject* values[2] = {0,0};
14191  values[1] = ((PyObject *)Py_None);
14192  if (unlikely(__pyx_kwds)) {
14193  Py_ssize_t kw_args;
14194  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14195  switch (pos_args) {
14196  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14197  CYTHON_FALLTHROUGH;
14198  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14199  CYTHON_FALLTHROUGH;
14200  case 0: break;
14201  default: goto __pyx_L5_argtuple_error;
14202  }
14203  kw_args = PyDict_Size(__pyx_kwds);
14204  switch (pos_args) {
14205  case 0:
14206  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14207  else goto __pyx_L5_argtuple_error;
14208  CYTHON_FALLTHROUGH;
14209  case 1:
14210  if (kw_args > 0) {
14211  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14212  if (value) { values[1] = value; kw_args--; }
14213  }
14214  }
14215  if (unlikely(kw_args > 0)) {
14216  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
14217  }
14218  } else {
14219  switch (PyTuple_GET_SIZE(__pyx_args)) {
14220  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14221  CYTHON_FALLTHROUGH;
14222  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14223  break;
14224  default: goto __pyx_L5_argtuple_error;
14225  }
14226  }
14227  __pyx_v_obj = values[0];
14228  __pyx_v_i = values[1];
14229  }
14230  goto __pyx_L4_argument_unpacking_done;
14231  __pyx_L5_argtuple_error:;
14232  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
14233  __pyx_L3_error:;
14234  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14235  __Pyx_RefNannyFinishContext();
14236  return NULL;
14237  __pyx_L4_argument_unpacking_done:;
14238  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14239 
14240  /* function exit code */
14241  __Pyx_RefNannyFinishContext();
14242  return __pyx_r;
14243  }
14244 
14245  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14246  PyObject *__pyx_r = NULL;
14247  __Pyx_RefNannyDeclarations
14248  PyObject *__pyx_t_1 = NULL;
14249  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14250  __Pyx_RefNannySetupContext("log", 0);
14251  __Pyx_XDECREF(__pyx_r);
14252  __pyx_t_2.__pyx_n = 1;
14253  __pyx_t_2.i = __pyx_v_i;
14254  __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)
14255  __Pyx_GOTREF(__pyx_t_1);
14256  __pyx_r = __pyx_t_1;
14257  __pyx_t_1 = 0;
14258  goto __pyx_L0;
14259 
14260  /* function exit code */
14261  __pyx_L1_error:;
14262  __Pyx_XDECREF(__pyx_t_1);
14263  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14264  __pyx_r = NULL;
14265  __pyx_L0:;
14266  __Pyx_XGIVEREF(__pyx_r);
14267  __Pyx_RefNannyFinishContext();
14268  return __pyx_r;
14269  }
14270 
14271  /* "PyClical.pyx":1602
14272  * return clifford().wrap( glucat.log(toClifford(obj)) )
14273  *
14274  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14275  * """
14276  * Cosine of multivector with optional complexifier.
14277  */
14278 
14279  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14280  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) {
14281  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14282  PyObject *__pyx_r = NULL;
14283  __Pyx_RefNannyDeclarations
14284  int __pyx_t_1;
14285  int __pyx_t_2;
14286  PyObject *__pyx_t_3 = NULL;
14287  Clifford __pyx_t_4;
14288  PyObject *__pyx_t_5 = NULL;
14289  PyObject *__pyx_t_6 = NULL;
14290  PyObject *__pyx_t_7 = NULL;
14291  PyObject *__pyx_t_8 = NULL;
14292  PyObject *__pyx_t_9 = NULL;
14293  PyObject *__pyx_t_10 = NULL;
14294  PyObject *__pyx_t_11 = NULL;
14295  __Pyx_RefNannySetupContext("cos", 0);
14296  if (__pyx_optional_args) {
14297  if (__pyx_optional_args->__pyx_n > 0) {
14298  __pyx_v_i = __pyx_optional_args->i;
14299  }
14300  }
14301 
14302  /* "PyClical.pyx":1611
14303  * {1,2}
14304  * """
14305  * if not (i is None): # <<<<<<<<<<<<<<
14306  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14307  * else:
14308  */
14309  __pyx_t_1 = (__pyx_v_i != Py_None);
14310  __pyx_t_2 = (__pyx_t_1 != 0);
14311  if (__pyx_t_2) {
14312 
14313  /* "PyClical.pyx":1612
14314  * """
14315  * if not (i is None):
14316  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14317  * else:
14318  * try:
14319  */
14320  __Pyx_XDECREF(__pyx_r);
14321  __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)
14322  __Pyx_GOTREF(__pyx_t_3);
14323  try {
14324  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14325  } catch(...) {
14326  __Pyx_CppExn2PyErr();
14327  __PYX_ERR(0, 1612, __pyx_L1_error)
14328  }
14329  __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)
14330  __Pyx_GOTREF(__pyx_t_5);
14331  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14332  __pyx_r = __pyx_t_5;
14333  __pyx_t_5 = 0;
14334  goto __pyx_L0;
14335 
14336  /* "PyClical.pyx":1611
14337  * {1,2}
14338  * """
14339  * if not (i is None): # <<<<<<<<<<<<<<
14340  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14341  * else:
14342  */
14343  }
14344 
14345  /* "PyClical.pyx":1614
14346  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14347  * else:
14348  * try: # <<<<<<<<<<<<<<
14349  * return math.cos(obj)
14350  * except:
14351  */
14352  /*else*/ {
14353  {
14354  __Pyx_PyThreadState_declare
14355  __Pyx_PyThreadState_assign
14356  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14357  __Pyx_XGOTREF(__pyx_t_6);
14358  __Pyx_XGOTREF(__pyx_t_7);
14359  __Pyx_XGOTREF(__pyx_t_8);
14360  /*try:*/ {
14361 
14362  /* "PyClical.pyx":1615
14363  * else:
14364  * try:
14365  * return math.cos(obj) # <<<<<<<<<<<<<<
14366  * except:
14367  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14368  */
14369  __Pyx_XDECREF(__pyx_r);
14370  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14371  __Pyx_GOTREF(__pyx_t_3);
14372  __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)
14373  __Pyx_GOTREF(__pyx_t_9);
14374  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14375  __pyx_t_3 = NULL;
14376  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14377  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14378  if (likely(__pyx_t_3)) {
14379  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14380  __Pyx_INCREF(__pyx_t_3);
14381  __Pyx_INCREF(function);
14382  __Pyx_DECREF_SET(__pyx_t_9, function);
14383  }
14384  }
14385  if (!__pyx_t_3) {
14386  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14387  __Pyx_GOTREF(__pyx_t_5);
14388  } else {
14389  #if CYTHON_FAST_PYCALL
14390  if (PyFunction_Check(__pyx_t_9)) {
14391  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14392  __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)
14393  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14394  __Pyx_GOTREF(__pyx_t_5);
14395  } else
14396  #endif
14397  #if CYTHON_FAST_PYCCALL
14398  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14399  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14400  __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)
14401  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14402  __Pyx_GOTREF(__pyx_t_5);
14403  } else
14404  #endif
14405  {
14406  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1615, __pyx_L4_error)
14407  __Pyx_GOTREF(__pyx_t_10);
14408  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14409  __Pyx_INCREF(__pyx_v_obj);
14410  __Pyx_GIVEREF(__pyx_v_obj);
14411  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14412  __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)
14413  __Pyx_GOTREF(__pyx_t_5);
14414  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14415  }
14416  }
14417  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14418  __pyx_r = __pyx_t_5;
14419  __pyx_t_5 = 0;
14420  goto __pyx_L8_try_return;
14421 
14422  /* "PyClical.pyx":1614
14423  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14424  * else:
14425  * try: # <<<<<<<<<<<<<<
14426  * return math.cos(obj)
14427  * except:
14428  */
14429  }
14430  __pyx_L4_error:;
14431  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14432  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14433  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14434  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14435 
14436  /* "PyClical.pyx":1616
14437  * try:
14438  * return math.cos(obj)
14439  * except: # <<<<<<<<<<<<<<
14440  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14441  *
14442  */
14443  /*except:*/ {
14444  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14445  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14446  __Pyx_GOTREF(__pyx_t_5);
14447  __Pyx_GOTREF(__pyx_t_9);
14448  __Pyx_GOTREF(__pyx_t_10);
14449 
14450  /* "PyClical.pyx":1617
14451  * return math.cos(obj)
14452  * except:
14453  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14454  *
14455  * cpdef inline acos(obj,i = None):
14456  */
14457  __Pyx_XDECREF(__pyx_r);
14458  __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)
14459  __Pyx_GOTREF(__pyx_t_3);
14460  __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)
14461  __Pyx_GOTREF(__pyx_t_11);
14462  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14463  __pyx_r = __pyx_t_11;
14464  __pyx_t_11 = 0;
14465  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14466  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14467  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14468  goto __pyx_L7_except_return;
14469  }
14470  __pyx_L6_except_error:;
14471 
14472  /* "PyClical.pyx":1614
14473  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14474  * else:
14475  * try: # <<<<<<<<<<<<<<
14476  * return math.cos(obj)
14477  * except:
14478  */
14479  __Pyx_XGIVEREF(__pyx_t_6);
14480  __Pyx_XGIVEREF(__pyx_t_7);
14481  __Pyx_XGIVEREF(__pyx_t_8);
14482  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14483  goto __pyx_L1_error;
14484  __pyx_L8_try_return:;
14485  __Pyx_XGIVEREF(__pyx_t_6);
14486  __Pyx_XGIVEREF(__pyx_t_7);
14487  __Pyx_XGIVEREF(__pyx_t_8);
14488  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14489  goto __pyx_L0;
14490  __pyx_L7_except_return:;
14491  __Pyx_XGIVEREF(__pyx_t_6);
14492  __Pyx_XGIVEREF(__pyx_t_7);
14493  __Pyx_XGIVEREF(__pyx_t_8);
14494  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14495  goto __pyx_L0;
14496  }
14497  }
14498 
14499  /* "PyClical.pyx":1602
14500  * return clifford().wrap( glucat.log(toClifford(obj)) )
14501  *
14502  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14503  * """
14504  * Cosine of multivector with optional complexifier.
14505  */
14506 
14507  /* function exit code */
14508  __pyx_L1_error:;
14509  __Pyx_XDECREF(__pyx_t_3);
14510  __Pyx_XDECREF(__pyx_t_5);
14511  __Pyx_XDECREF(__pyx_t_9);
14512  __Pyx_XDECREF(__pyx_t_10);
14513  __Pyx_XDECREF(__pyx_t_11);
14514  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14515  __pyx_r = 0;
14516  __pyx_L0:;
14517  __Pyx_XGIVEREF(__pyx_r);
14518  __Pyx_RefNannyFinishContext();
14519  return __pyx_r;
14520  }
14521 
14522  /* Python wrapper */
14523  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14524  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 ";
14525  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14526  PyObject *__pyx_v_obj = 0;
14527  PyObject *__pyx_v_i = 0;
14528  PyObject *__pyx_r = 0;
14529  __Pyx_RefNannyDeclarations
14530  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14531  {
14532  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14533  PyObject* values[2] = {0,0};
14534  values[1] = ((PyObject *)Py_None);
14535  if (unlikely(__pyx_kwds)) {
14536  Py_ssize_t kw_args;
14537  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14538  switch (pos_args) {
14539  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14540  CYTHON_FALLTHROUGH;
14541  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14542  CYTHON_FALLTHROUGH;
14543  case 0: break;
14544  default: goto __pyx_L5_argtuple_error;
14545  }
14546  kw_args = PyDict_Size(__pyx_kwds);
14547  switch (pos_args) {
14548  case 0:
14549  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14550  else goto __pyx_L5_argtuple_error;
14551  CYTHON_FALLTHROUGH;
14552  case 1:
14553  if (kw_args > 0) {
14554  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14555  if (value) { values[1] = value; kw_args--; }
14556  }
14557  }
14558  if (unlikely(kw_args > 0)) {
14559  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14560  }
14561  } else {
14562  switch (PyTuple_GET_SIZE(__pyx_args)) {
14563  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14564  CYTHON_FALLTHROUGH;
14565  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14566  break;
14567  default: goto __pyx_L5_argtuple_error;
14568  }
14569  }
14570  __pyx_v_obj = values[0];
14571  __pyx_v_i = values[1];
14572  }
14573  goto __pyx_L4_argument_unpacking_done;
14574  __pyx_L5_argtuple_error:;
14575  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14576  __pyx_L3_error:;
14577  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14578  __Pyx_RefNannyFinishContext();
14579  return NULL;
14580  __pyx_L4_argument_unpacking_done:;
14581  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14582 
14583  /* function exit code */
14584  __Pyx_RefNannyFinishContext();
14585  return __pyx_r;
14586  }
14587 
14588  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14589  PyObject *__pyx_r = NULL;
14590  __Pyx_RefNannyDeclarations
14591  PyObject *__pyx_t_1 = NULL;
14592  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14593  __Pyx_RefNannySetupContext("cos", 0);
14594  __Pyx_XDECREF(__pyx_r);
14595  __pyx_t_2.__pyx_n = 1;
14596  __pyx_t_2.i = __pyx_v_i;
14597  __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)
14598  __Pyx_GOTREF(__pyx_t_1);
14599  __pyx_r = __pyx_t_1;
14600  __pyx_t_1 = 0;
14601  goto __pyx_L0;
14602 
14603  /* function exit code */
14604  __pyx_L1_error:;
14605  __Pyx_XDECREF(__pyx_t_1);
14606  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14607  __pyx_r = NULL;
14608  __pyx_L0:;
14609  __Pyx_XGIVEREF(__pyx_r);
14610  __Pyx_RefNannyFinishContext();
14611  return __pyx_r;
14612  }
14613 
14614  /* "PyClical.pyx":1619
14615  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14616  *
14617  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14618  * """
14619  * Inverse cosine of multivector with optional complexifier.
14620  */
14621 
14622  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14623  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) {
14624  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14625  PyObject *__pyx_r = NULL;
14626  __Pyx_RefNannyDeclarations
14627  int __pyx_t_1;
14628  int __pyx_t_2;
14629  PyObject *__pyx_t_3 = NULL;
14630  Clifford __pyx_t_4;
14631  PyObject *__pyx_t_5 = NULL;
14632  PyObject *__pyx_t_6 = NULL;
14633  PyObject *__pyx_t_7 = NULL;
14634  PyObject *__pyx_t_8 = NULL;
14635  PyObject *__pyx_t_9 = NULL;
14636  PyObject *__pyx_t_10 = NULL;
14637  PyObject *__pyx_t_11 = NULL;
14638  __Pyx_RefNannySetupContext("acos", 0);
14639  if (__pyx_optional_args) {
14640  if (__pyx_optional_args->__pyx_n > 0) {
14641  __pyx_v_i = __pyx_optional_args->i;
14642  }
14643  }
14644 
14645  /* "PyClical.pyx":1632
14646  * {1,2}
14647  * """
14648  * if not (i is None): # <<<<<<<<<<<<<<
14649  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14650  * else:
14651  */
14652  __pyx_t_1 = (__pyx_v_i != Py_None);
14653  __pyx_t_2 = (__pyx_t_1 != 0);
14654  if (__pyx_t_2) {
14655 
14656  /* "PyClical.pyx":1633
14657  * """
14658  * if not (i is None):
14659  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14660  * else:
14661  * try:
14662  */
14663  __Pyx_XDECREF(__pyx_r);
14664  __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)
14665  __Pyx_GOTREF(__pyx_t_3);
14666  try {
14667  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14668  } catch(...) {
14669  __Pyx_CppExn2PyErr();
14670  __PYX_ERR(0, 1633, __pyx_L1_error)
14671  }
14672  __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)
14673  __Pyx_GOTREF(__pyx_t_5);
14674  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14675  __pyx_r = __pyx_t_5;
14676  __pyx_t_5 = 0;
14677  goto __pyx_L0;
14678 
14679  /* "PyClical.pyx":1632
14680  * {1,2}
14681  * """
14682  * if not (i is None): # <<<<<<<<<<<<<<
14683  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14684  * else:
14685  */
14686  }
14687 
14688  /* "PyClical.pyx":1635
14689  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14690  * else:
14691  * try: # <<<<<<<<<<<<<<
14692  * return math.acos(obj)
14693  * except:
14694  */
14695  /*else*/ {
14696  {
14697  __Pyx_PyThreadState_declare
14698  __Pyx_PyThreadState_assign
14699  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14700  __Pyx_XGOTREF(__pyx_t_6);
14701  __Pyx_XGOTREF(__pyx_t_7);
14702  __Pyx_XGOTREF(__pyx_t_8);
14703  /*try:*/ {
14704 
14705  /* "PyClical.pyx":1636
14706  * else:
14707  * try:
14708  * return math.acos(obj) # <<<<<<<<<<<<<<
14709  * except:
14710  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14711  */
14712  __Pyx_XDECREF(__pyx_r);
14713  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14714  __Pyx_GOTREF(__pyx_t_3);
14715  __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)
14716  __Pyx_GOTREF(__pyx_t_9);
14717  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14718  __pyx_t_3 = NULL;
14719  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14720  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14721  if (likely(__pyx_t_3)) {
14722  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14723  __Pyx_INCREF(__pyx_t_3);
14724  __Pyx_INCREF(function);
14725  __Pyx_DECREF_SET(__pyx_t_9, function);
14726  }
14727  }
14728  if (!__pyx_t_3) {
14729  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14730  __Pyx_GOTREF(__pyx_t_5);
14731  } else {
14732  #if CYTHON_FAST_PYCALL
14733  if (PyFunction_Check(__pyx_t_9)) {
14734  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14735  __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)
14736  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14737  __Pyx_GOTREF(__pyx_t_5);
14738  } else
14739  #endif
14740  #if CYTHON_FAST_PYCCALL
14741  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14742  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14743  __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)
14744  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14745  __Pyx_GOTREF(__pyx_t_5);
14746  } else
14747  #endif
14748  {
14749  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1636, __pyx_L4_error)
14750  __Pyx_GOTREF(__pyx_t_10);
14751  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14752  __Pyx_INCREF(__pyx_v_obj);
14753  __Pyx_GIVEREF(__pyx_v_obj);
14754  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14755  __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)
14756  __Pyx_GOTREF(__pyx_t_5);
14757  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14758  }
14759  }
14760  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14761  __pyx_r = __pyx_t_5;
14762  __pyx_t_5 = 0;
14763  goto __pyx_L8_try_return;
14764 
14765  /* "PyClical.pyx":1635
14766  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14767  * else:
14768  * try: # <<<<<<<<<<<<<<
14769  * return math.acos(obj)
14770  * except:
14771  */
14772  }
14773  __pyx_L4_error:;
14774  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14775  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14776  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14777  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14778 
14779  /* "PyClical.pyx":1637
14780  * try:
14781  * return math.acos(obj)
14782  * except: # <<<<<<<<<<<<<<
14783  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14784  *
14785  */
14786  /*except:*/ {
14787  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14788  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14789  __Pyx_GOTREF(__pyx_t_5);
14790  __Pyx_GOTREF(__pyx_t_9);
14791  __Pyx_GOTREF(__pyx_t_10);
14792 
14793  /* "PyClical.pyx":1638
14794  * return math.acos(obj)
14795  * except:
14796  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14797  *
14798  * cpdef inline cosh(obj):
14799  */
14800  __Pyx_XDECREF(__pyx_r);
14801  __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)
14802  __Pyx_GOTREF(__pyx_t_3);
14803  __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)
14804  __Pyx_GOTREF(__pyx_t_11);
14805  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14806  __pyx_r = __pyx_t_11;
14807  __pyx_t_11 = 0;
14808  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14809  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14810  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14811  goto __pyx_L7_except_return;
14812  }
14813  __pyx_L6_except_error:;
14814 
14815  /* "PyClical.pyx":1635
14816  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14817  * else:
14818  * try: # <<<<<<<<<<<<<<
14819  * return math.acos(obj)
14820  * except:
14821  */
14822  __Pyx_XGIVEREF(__pyx_t_6);
14823  __Pyx_XGIVEREF(__pyx_t_7);
14824  __Pyx_XGIVEREF(__pyx_t_8);
14825  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14826  goto __pyx_L1_error;
14827  __pyx_L8_try_return:;
14828  __Pyx_XGIVEREF(__pyx_t_6);
14829  __Pyx_XGIVEREF(__pyx_t_7);
14830  __Pyx_XGIVEREF(__pyx_t_8);
14831  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14832  goto __pyx_L0;
14833  __pyx_L7_except_return:;
14834  __Pyx_XGIVEREF(__pyx_t_6);
14835  __Pyx_XGIVEREF(__pyx_t_7);
14836  __Pyx_XGIVEREF(__pyx_t_8);
14837  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14838  goto __pyx_L0;
14839  }
14840  }
14841 
14842  /* "PyClical.pyx":1619
14843  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14844  *
14845  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14846  * """
14847  * Inverse cosine of multivector with optional complexifier.
14848  */
14849 
14850  /* function exit code */
14851  __pyx_L1_error:;
14852  __Pyx_XDECREF(__pyx_t_3);
14853  __Pyx_XDECREF(__pyx_t_5);
14854  __Pyx_XDECREF(__pyx_t_9);
14855  __Pyx_XDECREF(__pyx_t_10);
14856  __Pyx_XDECREF(__pyx_t_11);
14857  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14858  __pyx_r = 0;
14859  __pyx_L0:;
14860  __Pyx_XGIVEREF(__pyx_r);
14861  __Pyx_RefNannyFinishContext();
14862  return __pyx_r;
14863  }
14864 
14865  /* Python wrapper */
14866  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14867  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 ";
14868  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14869  PyObject *__pyx_v_obj = 0;
14870  PyObject *__pyx_v_i = 0;
14871  PyObject *__pyx_r = 0;
14872  __Pyx_RefNannyDeclarations
14873  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14874  {
14875  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14876  PyObject* values[2] = {0,0};
14877  values[1] = ((PyObject *)Py_None);
14878  if (unlikely(__pyx_kwds)) {
14879  Py_ssize_t kw_args;
14880  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14881  switch (pos_args) {
14882  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14883  CYTHON_FALLTHROUGH;
14884  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14885  CYTHON_FALLTHROUGH;
14886  case 0: break;
14887  default: goto __pyx_L5_argtuple_error;
14888  }
14889  kw_args = PyDict_Size(__pyx_kwds);
14890  switch (pos_args) {
14891  case 0:
14892  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14893  else goto __pyx_L5_argtuple_error;
14894  CYTHON_FALLTHROUGH;
14895  case 1:
14896  if (kw_args > 0) {
14897  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
14898  if (value) { values[1] = value; kw_args--; }
14899  }
14900  }
14901  if (unlikely(kw_args > 0)) {
14902  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14903  }
14904  } else {
14905  switch (PyTuple_GET_SIZE(__pyx_args)) {
14906  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14907  CYTHON_FALLTHROUGH;
14908  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14909  break;
14910  default: goto __pyx_L5_argtuple_error;
14911  }
14912  }
14913  __pyx_v_obj = values[0];
14914  __pyx_v_i = values[1];
14915  }
14916  goto __pyx_L4_argument_unpacking_done;
14917  __pyx_L5_argtuple_error:;
14918  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14919  __pyx_L3_error:;
14920  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14921  __Pyx_RefNannyFinishContext();
14922  return NULL;
14923  __pyx_L4_argument_unpacking_done:;
14924  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14925 
14926  /* function exit code */
14927  __Pyx_RefNannyFinishContext();
14928  return __pyx_r;
14929  }
14930 
14931  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14932  PyObject *__pyx_r = NULL;
14933  __Pyx_RefNannyDeclarations
14934  PyObject *__pyx_t_1 = NULL;
14935  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14936  __Pyx_RefNannySetupContext("acos", 0);
14937  __Pyx_XDECREF(__pyx_r);
14938  __pyx_t_2.__pyx_n = 1;
14939  __pyx_t_2.i = __pyx_v_i;
14940  __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)
14941  __Pyx_GOTREF(__pyx_t_1);
14942  __pyx_r = __pyx_t_1;
14943  __pyx_t_1 = 0;
14944  goto __pyx_L0;
14945 
14946  /* function exit code */
14947  __pyx_L1_error:;
14948  __Pyx_XDECREF(__pyx_t_1);
14949  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14950  __pyx_r = NULL;
14951  __pyx_L0:;
14952  __Pyx_XGIVEREF(__pyx_r);
14953  __Pyx_RefNannyFinishContext();
14954  return __pyx_r;
14955  }
14956 
14957  /* "PyClical.pyx":1640
14958  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14959  *
14960  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14961  * """
14962  * Hyperbolic cosine of multivector.
14963  */
14964 
14965  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14966  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14967  PyObject *__pyx_r = NULL;
14968  __Pyx_RefNannyDeclarations
14969  PyObject *__pyx_t_1 = NULL;
14970  PyObject *__pyx_t_2 = NULL;
14971  PyObject *__pyx_t_3 = NULL;
14972  PyObject *__pyx_t_4 = NULL;
14973  PyObject *__pyx_t_5 = NULL;
14974  PyObject *__pyx_t_6 = NULL;
14975  PyObject *__pyx_t_7 = NULL;
14976  PyObject *__pyx_t_8 = NULL;
14977  __Pyx_RefNannySetupContext("cosh", 0);
14978 
14979  /* "PyClical.pyx":1651
14980  * {1,2}
14981  * """
14982  * try: # <<<<<<<<<<<<<<
14983  * return math.cosh(obj)
14984  * except:
14985  */
14986  {
14987  __Pyx_PyThreadState_declare
14988  __Pyx_PyThreadState_assign
14989  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14990  __Pyx_XGOTREF(__pyx_t_1);
14991  __Pyx_XGOTREF(__pyx_t_2);
14992  __Pyx_XGOTREF(__pyx_t_3);
14993  /*try:*/ {
14994 
14995  /* "PyClical.pyx":1652
14996  * """
14997  * try:
14998  * return math.cosh(obj) # <<<<<<<<<<<<<<
14999  * except:
15000  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15001  */
15002  __Pyx_XDECREF(__pyx_r);
15003  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
15004  __Pyx_GOTREF(__pyx_t_5);
15005  __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)
15006  __Pyx_GOTREF(__pyx_t_6);
15007  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15008  __pyx_t_5 = NULL;
15009  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15010  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15011  if (likely(__pyx_t_5)) {
15012  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15013  __Pyx_INCREF(__pyx_t_5);
15014  __Pyx_INCREF(function);
15015  __Pyx_DECREF_SET(__pyx_t_6, function);
15016  }
15017  }
15018  if (!__pyx_t_5) {
15019  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
15020  __Pyx_GOTREF(__pyx_t_4);
15021  } else {
15022  #if CYTHON_FAST_PYCALL
15023  if (PyFunction_Check(__pyx_t_6)) {
15024  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
15025  __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)
15026  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15027  __Pyx_GOTREF(__pyx_t_4);
15028  } else
15029  #endif
15030  #if CYTHON_FAST_PYCCALL
15031  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
15032  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
15033  __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)
15034  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15035  __Pyx_GOTREF(__pyx_t_4);
15036  } else
15037  #endif
15038  {
15039  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L3_error)
15040  __Pyx_GOTREF(__pyx_t_7);
15041  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
15042  __Pyx_INCREF(__pyx_v_obj);
15043  __Pyx_GIVEREF(__pyx_v_obj);
15044  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
15045  __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)
15046  __Pyx_GOTREF(__pyx_t_4);
15047  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15048  }
15049  }
15050  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15051  __pyx_r = __pyx_t_4;
15052  __pyx_t_4 = 0;
15053  goto __pyx_L7_try_return;
15054 
15055  /* "PyClical.pyx":1651
15056  * {1,2}
15057  * """
15058  * try: # <<<<<<<<<<<<<<
15059  * return math.cosh(obj)
15060  * except:
15061  */
15062  }
15063  __pyx_L3_error:;
15064  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15065  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
15066  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15067  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15068 
15069  /* "PyClical.pyx":1653
15070  * try:
15071  * return math.cosh(obj)
15072  * except: # <<<<<<<<<<<<<<
15073  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15074  *
15075  */
15076  /*except:*/ {
15077  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15078  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
15079  __Pyx_GOTREF(__pyx_t_4);
15080  __Pyx_GOTREF(__pyx_t_6);
15081  __Pyx_GOTREF(__pyx_t_7);
15082 
15083  /* "PyClical.pyx":1654
15084  * return math.cosh(obj)
15085  * except:
15086  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15087  *
15088  * cpdef inline acosh(obj,i = None):
15089  */
15090  __Pyx_XDECREF(__pyx_r);
15091  __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)
15092  __Pyx_GOTREF(__pyx_t_5);
15093  __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)
15094  __Pyx_GOTREF(__pyx_t_8);
15095  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15096  __pyx_r = __pyx_t_8;
15097  __pyx_t_8 = 0;
15098  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15099  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15100  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15101  goto __pyx_L6_except_return;
15102  }
15103  __pyx_L5_except_error:;
15104 
15105  /* "PyClical.pyx":1651
15106  * {1,2}
15107  * """
15108  * try: # <<<<<<<<<<<<<<
15109  * return math.cosh(obj)
15110  * except:
15111  */
15112  __Pyx_XGIVEREF(__pyx_t_1);
15113  __Pyx_XGIVEREF(__pyx_t_2);
15114  __Pyx_XGIVEREF(__pyx_t_3);
15115  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15116  goto __pyx_L1_error;
15117  __pyx_L7_try_return:;
15118  __Pyx_XGIVEREF(__pyx_t_1);
15119  __Pyx_XGIVEREF(__pyx_t_2);
15120  __Pyx_XGIVEREF(__pyx_t_3);
15121  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15122  goto __pyx_L0;
15123  __pyx_L6_except_return:;
15124  __Pyx_XGIVEREF(__pyx_t_1);
15125  __Pyx_XGIVEREF(__pyx_t_2);
15126  __Pyx_XGIVEREF(__pyx_t_3);
15127  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15128  goto __pyx_L0;
15129  }
15130 
15131  /* "PyClical.pyx":1640
15132  * return clifford().wrap( glucat.acos(toClifford(obj)) )
15133  *
15134  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
15135  * """
15136  * Hyperbolic cosine of multivector.
15137  */
15138 
15139  /* function exit code */
15140  __pyx_L1_error:;
15141  __Pyx_XDECREF(__pyx_t_4);
15142  __Pyx_XDECREF(__pyx_t_5);
15143  __Pyx_XDECREF(__pyx_t_6);
15144  __Pyx_XDECREF(__pyx_t_7);
15145  __Pyx_XDECREF(__pyx_t_8);
15146  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15147  __pyx_r = 0;
15148  __pyx_L0:;
15149  __Pyx_XGIVEREF(__pyx_r);
15150  __Pyx_RefNannyFinishContext();
15151  return __pyx_r;
15152  }
15153 
15154  /* Python wrapper */
15155  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15156  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 ";
15157  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15158  PyObject *__pyx_r = 0;
15159  __Pyx_RefNannyDeclarations
15160  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
15161  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
15162 
15163  /* function exit code */
15164  __Pyx_RefNannyFinishContext();
15165  return __pyx_r;
15166  }
15167 
15168  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15169  PyObject *__pyx_r = NULL;
15170  __Pyx_RefNannyDeclarations
15171  PyObject *__pyx_t_1 = NULL;
15172  __Pyx_RefNannySetupContext("cosh", 0);
15173  __Pyx_XDECREF(__pyx_r);
15174  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
15175  __Pyx_GOTREF(__pyx_t_1);
15176  __pyx_r = __pyx_t_1;
15177  __pyx_t_1 = 0;
15178  goto __pyx_L0;
15179 
15180  /* function exit code */
15181  __pyx_L1_error:;
15182  __Pyx_XDECREF(__pyx_t_1);
15183  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15184  __pyx_r = NULL;
15185  __pyx_L0:;
15186  __Pyx_XGIVEREF(__pyx_r);
15187  __Pyx_RefNannyFinishContext();
15188  return __pyx_r;
15189  }
15190 
15191  /* "PyClical.pyx":1656
15192  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15193  *
15194  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15195  * """
15196  * Inverse hyperbolic cosine of multivector with optional complexifier.
15197  */
15198 
15199  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15200  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) {
15201  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15202  PyObject *__pyx_r = NULL;
15203  __Pyx_RefNannyDeclarations
15204  int __pyx_t_1;
15205  int __pyx_t_2;
15206  PyObject *__pyx_t_3 = NULL;
15207  Clifford __pyx_t_4;
15208  PyObject *__pyx_t_5 = NULL;
15209  PyObject *__pyx_t_6 = NULL;
15210  PyObject *__pyx_t_7 = NULL;
15211  PyObject *__pyx_t_8 = NULL;
15212  PyObject *__pyx_t_9 = NULL;
15213  PyObject *__pyx_t_10 = NULL;
15214  PyObject *__pyx_t_11 = NULL;
15215  __Pyx_RefNannySetupContext("acosh", 0);
15216  if (__pyx_optional_args) {
15217  if (__pyx_optional_args->__pyx_n > 0) {
15218  __pyx_v_i = __pyx_optional_args->i;
15219  }
15220  }
15221 
15222  /* "PyClical.pyx":1671
15223  * {1,2}
15224  * """
15225  * if not (i is None): # <<<<<<<<<<<<<<
15226  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15227  * else:
15228  */
15229  __pyx_t_1 = (__pyx_v_i != Py_None);
15230  __pyx_t_2 = (__pyx_t_1 != 0);
15231  if (__pyx_t_2) {
15232 
15233  /* "PyClical.pyx":1672
15234  * """
15235  * if not (i is None):
15236  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15237  * else:
15238  * try:
15239  */
15240  __Pyx_XDECREF(__pyx_r);
15241  __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)
15242  __Pyx_GOTREF(__pyx_t_3);
15243  try {
15244  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15245  } catch(...) {
15246  __Pyx_CppExn2PyErr();
15247  __PYX_ERR(0, 1672, __pyx_L1_error)
15248  }
15249  __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)
15250  __Pyx_GOTREF(__pyx_t_5);
15251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15252  __pyx_r = __pyx_t_5;
15253  __pyx_t_5 = 0;
15254  goto __pyx_L0;
15255 
15256  /* "PyClical.pyx":1671
15257  * {1,2}
15258  * """
15259  * if not (i is None): # <<<<<<<<<<<<<<
15260  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15261  * else:
15262  */
15263  }
15264 
15265  /* "PyClical.pyx":1674
15266  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15267  * else:
15268  * try: # <<<<<<<<<<<<<<
15269  * return math.acosh(obj)
15270  * except:
15271  */
15272  /*else*/ {
15273  {
15274  __Pyx_PyThreadState_declare
15275  __Pyx_PyThreadState_assign
15276  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15277  __Pyx_XGOTREF(__pyx_t_6);
15278  __Pyx_XGOTREF(__pyx_t_7);
15279  __Pyx_XGOTREF(__pyx_t_8);
15280  /*try:*/ {
15281 
15282  /* "PyClical.pyx":1675
15283  * else:
15284  * try:
15285  * return math.acosh(obj) # <<<<<<<<<<<<<<
15286  * except:
15287  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15288  */
15289  __Pyx_XDECREF(__pyx_r);
15290  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
15291  __Pyx_GOTREF(__pyx_t_3);
15292  __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)
15293  __Pyx_GOTREF(__pyx_t_9);
15294  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15295  __pyx_t_3 = NULL;
15296  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15297  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15298  if (likely(__pyx_t_3)) {
15299  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15300  __Pyx_INCREF(__pyx_t_3);
15301  __Pyx_INCREF(function);
15302  __Pyx_DECREF_SET(__pyx_t_9, function);
15303  }
15304  }
15305  if (!__pyx_t_3) {
15306  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15307  __Pyx_GOTREF(__pyx_t_5);
15308  } else {
15309  #if CYTHON_FAST_PYCALL
15310  if (PyFunction_Check(__pyx_t_9)) {
15311  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15312  __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)
15313  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15314  __Pyx_GOTREF(__pyx_t_5);
15315  } else
15316  #endif
15317  #if CYTHON_FAST_PYCCALL
15318  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15319  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15320  __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)
15321  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15322  __Pyx_GOTREF(__pyx_t_5);
15323  } else
15324  #endif
15325  {
15326  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1675, __pyx_L4_error)
15327  __Pyx_GOTREF(__pyx_t_10);
15328  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15329  __Pyx_INCREF(__pyx_v_obj);
15330  __Pyx_GIVEREF(__pyx_v_obj);
15331  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15332  __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)
15333  __Pyx_GOTREF(__pyx_t_5);
15334  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15335  }
15336  }
15337  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15338  __pyx_r = __pyx_t_5;
15339  __pyx_t_5 = 0;
15340  goto __pyx_L8_try_return;
15341 
15342  /* "PyClical.pyx":1674
15343  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15344  * else:
15345  * try: # <<<<<<<<<<<<<<
15346  * return math.acosh(obj)
15347  * except:
15348  */
15349  }
15350  __pyx_L4_error:;
15351  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15352  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15353  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15354  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15355 
15356  /* "PyClical.pyx":1676
15357  * try:
15358  * return math.acosh(obj)
15359  * except: # <<<<<<<<<<<<<<
15360  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15361  *
15362  */
15363  /*except:*/ {
15364  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15365  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15366  __Pyx_GOTREF(__pyx_t_5);
15367  __Pyx_GOTREF(__pyx_t_9);
15368  __Pyx_GOTREF(__pyx_t_10);
15369 
15370  /* "PyClical.pyx":1677
15371  * return math.acosh(obj)
15372  * except:
15373  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15374  *
15375  * cpdef inline sin(obj,i = None):
15376  */
15377  __Pyx_XDECREF(__pyx_r);
15378  __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)
15379  __Pyx_GOTREF(__pyx_t_3);
15380  __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)
15381  __Pyx_GOTREF(__pyx_t_11);
15382  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15383  __pyx_r = __pyx_t_11;
15384  __pyx_t_11 = 0;
15385  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15386  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15387  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15388  goto __pyx_L7_except_return;
15389  }
15390  __pyx_L6_except_error:;
15391 
15392  /* "PyClical.pyx":1674
15393  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15394  * else:
15395  * try: # <<<<<<<<<<<<<<
15396  * return math.acosh(obj)
15397  * except:
15398  */
15399  __Pyx_XGIVEREF(__pyx_t_6);
15400  __Pyx_XGIVEREF(__pyx_t_7);
15401  __Pyx_XGIVEREF(__pyx_t_8);
15402  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15403  goto __pyx_L1_error;
15404  __pyx_L8_try_return:;
15405  __Pyx_XGIVEREF(__pyx_t_6);
15406  __Pyx_XGIVEREF(__pyx_t_7);
15407  __Pyx_XGIVEREF(__pyx_t_8);
15408  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15409  goto __pyx_L0;
15410  __pyx_L7_except_return:;
15411  __Pyx_XGIVEREF(__pyx_t_6);
15412  __Pyx_XGIVEREF(__pyx_t_7);
15413  __Pyx_XGIVEREF(__pyx_t_8);
15414  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15415  goto __pyx_L0;
15416  }
15417  }
15418 
15419  /* "PyClical.pyx":1656
15420  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15421  *
15422  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15423  * """
15424  * Inverse hyperbolic cosine of multivector with optional complexifier.
15425  */
15426 
15427  /* function exit code */
15428  __pyx_L1_error:;
15429  __Pyx_XDECREF(__pyx_t_3);
15430  __Pyx_XDECREF(__pyx_t_5);
15431  __Pyx_XDECREF(__pyx_t_9);
15432  __Pyx_XDECREF(__pyx_t_10);
15433  __Pyx_XDECREF(__pyx_t_11);
15434  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15435  __pyx_r = 0;
15436  __pyx_L0:;
15437  __Pyx_XGIVEREF(__pyx_r);
15438  __Pyx_RefNannyFinishContext();
15439  return __pyx_r;
15440  }
15441 
15442  /* Python wrapper */
15443  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15444  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 ";
15445  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15446  PyObject *__pyx_v_obj = 0;
15447  PyObject *__pyx_v_i = 0;
15448  PyObject *__pyx_r = 0;
15449  __Pyx_RefNannyDeclarations
15450  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15451  {
15452  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15453  PyObject* values[2] = {0,0};
15454  values[1] = ((PyObject *)Py_None);
15455  if (unlikely(__pyx_kwds)) {
15456  Py_ssize_t kw_args;
15457  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15458  switch (pos_args) {
15459  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15460  CYTHON_FALLTHROUGH;
15461  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15462  CYTHON_FALLTHROUGH;
15463  case 0: break;
15464  default: goto __pyx_L5_argtuple_error;
15465  }
15466  kw_args = PyDict_Size(__pyx_kwds);
15467  switch (pos_args) {
15468  case 0:
15469  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15470  else goto __pyx_L5_argtuple_error;
15471  CYTHON_FALLTHROUGH;
15472  case 1:
15473  if (kw_args > 0) {
15474  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15475  if (value) { values[1] = value; kw_args--; }
15476  }
15477  }
15478  if (unlikely(kw_args > 0)) {
15479  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15480  }
15481  } else {
15482  switch (PyTuple_GET_SIZE(__pyx_args)) {
15483  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15484  CYTHON_FALLTHROUGH;
15485  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15486  break;
15487  default: goto __pyx_L5_argtuple_error;
15488  }
15489  }
15490  __pyx_v_obj = values[0];
15491  __pyx_v_i = values[1];
15492  }
15493  goto __pyx_L4_argument_unpacking_done;
15494  __pyx_L5_argtuple_error:;
15495  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15496  __pyx_L3_error:;
15497  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15498  __Pyx_RefNannyFinishContext();
15499  return NULL;
15500  __pyx_L4_argument_unpacking_done:;
15501  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15502 
15503  /* function exit code */
15504  __Pyx_RefNannyFinishContext();
15505  return __pyx_r;
15506  }
15507 
15508  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15509  PyObject *__pyx_r = NULL;
15510  __Pyx_RefNannyDeclarations
15511  PyObject *__pyx_t_1 = NULL;
15512  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15513  __Pyx_RefNannySetupContext("acosh", 0);
15514  __Pyx_XDECREF(__pyx_r);
15515  __pyx_t_2.__pyx_n = 1;
15516  __pyx_t_2.i = __pyx_v_i;
15517  __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)
15518  __Pyx_GOTREF(__pyx_t_1);
15519  __pyx_r = __pyx_t_1;
15520  __pyx_t_1 = 0;
15521  goto __pyx_L0;
15522 
15523  /* function exit code */
15524  __pyx_L1_error:;
15525  __Pyx_XDECREF(__pyx_t_1);
15526  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15527  __pyx_r = NULL;
15528  __pyx_L0:;
15529  __Pyx_XGIVEREF(__pyx_r);
15530  __Pyx_RefNannyFinishContext();
15531  return __pyx_r;
15532  }
15533 
15534  /* "PyClical.pyx":1679
15535  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15536  *
15537  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15538  * """
15539  * Sine of multivector with optional complexifier.
15540  */
15541 
15542  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15543  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) {
15544  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15545  PyObject *__pyx_r = NULL;
15546  __Pyx_RefNannyDeclarations
15547  int __pyx_t_1;
15548  int __pyx_t_2;
15549  PyObject *__pyx_t_3 = NULL;
15550  Clifford __pyx_t_4;
15551  PyObject *__pyx_t_5 = NULL;
15552  PyObject *__pyx_t_6 = NULL;
15553  PyObject *__pyx_t_7 = NULL;
15554  PyObject *__pyx_t_8 = NULL;
15555  PyObject *__pyx_t_9 = NULL;
15556  PyObject *__pyx_t_10 = NULL;
15557  PyObject *__pyx_t_11 = NULL;
15558  __Pyx_RefNannySetupContext("sin", 0);
15559  if (__pyx_optional_args) {
15560  if (__pyx_optional_args->__pyx_n > 0) {
15561  __pyx_v_i = __pyx_optional_args->i;
15562  }
15563  }
15564 
15565  /* "PyClical.pyx":1690
15566  * {1,2,3}
15567  * """
15568  * if not (i is None): # <<<<<<<<<<<<<<
15569  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15570  * else:
15571  */
15572  __pyx_t_1 = (__pyx_v_i != Py_None);
15573  __pyx_t_2 = (__pyx_t_1 != 0);
15574  if (__pyx_t_2) {
15575 
15576  /* "PyClical.pyx":1691
15577  * """
15578  * if not (i is None):
15579  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15580  * else:
15581  * try:
15582  */
15583  __Pyx_XDECREF(__pyx_r);
15584  __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)
15585  __Pyx_GOTREF(__pyx_t_3);
15586  try {
15587  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15588  } catch(...) {
15589  __Pyx_CppExn2PyErr();
15590  __PYX_ERR(0, 1691, __pyx_L1_error)
15591  }
15592  __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)
15593  __Pyx_GOTREF(__pyx_t_5);
15594  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15595  __pyx_r = __pyx_t_5;
15596  __pyx_t_5 = 0;
15597  goto __pyx_L0;
15598 
15599  /* "PyClical.pyx":1690
15600  * {1,2,3}
15601  * """
15602  * if not (i is None): # <<<<<<<<<<<<<<
15603  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15604  * else:
15605  */
15606  }
15607 
15608  /* "PyClical.pyx":1693
15609  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15610  * else:
15611  * try: # <<<<<<<<<<<<<<
15612  * return math.sin(obj)
15613  * except:
15614  */
15615  /*else*/ {
15616  {
15617  __Pyx_PyThreadState_declare
15618  __Pyx_PyThreadState_assign
15619  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15620  __Pyx_XGOTREF(__pyx_t_6);
15621  __Pyx_XGOTREF(__pyx_t_7);
15622  __Pyx_XGOTREF(__pyx_t_8);
15623  /*try:*/ {
15624 
15625  /* "PyClical.pyx":1694
15626  * else:
15627  * try:
15628  * return math.sin(obj) # <<<<<<<<<<<<<<
15629  * except:
15630  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15631  */
15632  __Pyx_XDECREF(__pyx_r);
15633  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15634  __Pyx_GOTREF(__pyx_t_3);
15635  __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)
15636  __Pyx_GOTREF(__pyx_t_9);
15637  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15638  __pyx_t_3 = NULL;
15639  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15640  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15641  if (likely(__pyx_t_3)) {
15642  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15643  __Pyx_INCREF(__pyx_t_3);
15644  __Pyx_INCREF(function);
15645  __Pyx_DECREF_SET(__pyx_t_9, function);
15646  }
15647  }
15648  if (!__pyx_t_3) {
15649  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15650  __Pyx_GOTREF(__pyx_t_5);
15651  } else {
15652  #if CYTHON_FAST_PYCALL
15653  if (PyFunction_Check(__pyx_t_9)) {
15654  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15655  __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)
15656  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15657  __Pyx_GOTREF(__pyx_t_5);
15658  } else
15659  #endif
15660  #if CYTHON_FAST_PYCCALL
15661  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15662  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15663  __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)
15664  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15665  __Pyx_GOTREF(__pyx_t_5);
15666  } else
15667  #endif
15668  {
15669  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1694, __pyx_L4_error)
15670  __Pyx_GOTREF(__pyx_t_10);
15671  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15672  __Pyx_INCREF(__pyx_v_obj);
15673  __Pyx_GIVEREF(__pyx_v_obj);
15674  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15675  __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)
15676  __Pyx_GOTREF(__pyx_t_5);
15677  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15678  }
15679  }
15680  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15681  __pyx_r = __pyx_t_5;
15682  __pyx_t_5 = 0;
15683  goto __pyx_L8_try_return;
15684 
15685  /* "PyClical.pyx":1693
15686  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15687  * else:
15688  * try: # <<<<<<<<<<<<<<
15689  * return math.sin(obj)
15690  * except:
15691  */
15692  }
15693  __pyx_L4_error:;
15694  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15695  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15696  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15697  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15698 
15699  /* "PyClical.pyx":1695
15700  * try:
15701  * return math.sin(obj)
15702  * except: # <<<<<<<<<<<<<<
15703  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15704  *
15705  */
15706  /*except:*/ {
15707  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15708  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15709  __Pyx_GOTREF(__pyx_t_5);
15710  __Pyx_GOTREF(__pyx_t_9);
15711  __Pyx_GOTREF(__pyx_t_10);
15712 
15713  /* "PyClical.pyx":1696
15714  * return math.sin(obj)
15715  * except:
15716  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15717  *
15718  * cpdef inline asin(obj,i = None):
15719  */
15720  __Pyx_XDECREF(__pyx_r);
15721  __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)
15722  __Pyx_GOTREF(__pyx_t_3);
15723  __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)
15724  __Pyx_GOTREF(__pyx_t_11);
15725  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15726  __pyx_r = __pyx_t_11;
15727  __pyx_t_11 = 0;
15728  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15729  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15730  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15731  goto __pyx_L7_except_return;
15732  }
15733  __pyx_L6_except_error:;
15734 
15735  /* "PyClical.pyx":1693
15736  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15737  * else:
15738  * try: # <<<<<<<<<<<<<<
15739  * return math.sin(obj)
15740  * except:
15741  */
15742  __Pyx_XGIVEREF(__pyx_t_6);
15743  __Pyx_XGIVEREF(__pyx_t_7);
15744  __Pyx_XGIVEREF(__pyx_t_8);
15745  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15746  goto __pyx_L1_error;
15747  __pyx_L8_try_return:;
15748  __Pyx_XGIVEREF(__pyx_t_6);
15749  __Pyx_XGIVEREF(__pyx_t_7);
15750  __Pyx_XGIVEREF(__pyx_t_8);
15751  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15752  goto __pyx_L0;
15753  __pyx_L7_except_return:;
15754  __Pyx_XGIVEREF(__pyx_t_6);
15755  __Pyx_XGIVEREF(__pyx_t_7);
15756  __Pyx_XGIVEREF(__pyx_t_8);
15757  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15758  goto __pyx_L0;
15759  }
15760  }
15761 
15762  /* "PyClical.pyx":1679
15763  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15764  *
15765  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15766  * """
15767  * Sine of multivector with optional complexifier.
15768  */
15769 
15770  /* function exit code */
15771  __pyx_L1_error:;
15772  __Pyx_XDECREF(__pyx_t_3);
15773  __Pyx_XDECREF(__pyx_t_5);
15774  __Pyx_XDECREF(__pyx_t_9);
15775  __Pyx_XDECREF(__pyx_t_10);
15776  __Pyx_XDECREF(__pyx_t_11);
15777  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15778  __pyx_r = 0;
15779  __pyx_L0:;
15780  __Pyx_XGIVEREF(__pyx_r);
15781  __Pyx_RefNannyFinishContext();
15782  return __pyx_r;
15783  }
15784 
15785  /* Python wrapper */
15786  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15787  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 ";
15788  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15789  PyObject *__pyx_v_obj = 0;
15790  PyObject *__pyx_v_i = 0;
15791  PyObject *__pyx_r = 0;
15792  __Pyx_RefNannyDeclarations
15793  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15794  {
15795  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15796  PyObject* values[2] = {0,0};
15797  values[1] = ((PyObject *)Py_None);
15798  if (unlikely(__pyx_kwds)) {
15799  Py_ssize_t kw_args;
15800  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15801  switch (pos_args) {
15802  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15803  CYTHON_FALLTHROUGH;
15804  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15805  CYTHON_FALLTHROUGH;
15806  case 0: break;
15807  default: goto __pyx_L5_argtuple_error;
15808  }
15809  kw_args = PyDict_Size(__pyx_kwds);
15810  switch (pos_args) {
15811  case 0:
15812  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15813  else goto __pyx_L5_argtuple_error;
15814  CYTHON_FALLTHROUGH;
15815  case 1:
15816  if (kw_args > 0) {
15817  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
15818  if (value) { values[1] = value; kw_args--; }
15819  }
15820  }
15821  if (unlikely(kw_args > 0)) {
15822  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15823  }
15824  } else {
15825  switch (PyTuple_GET_SIZE(__pyx_args)) {
15826  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15827  CYTHON_FALLTHROUGH;
15828  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15829  break;
15830  default: goto __pyx_L5_argtuple_error;
15831  }
15832  }
15833  __pyx_v_obj = values[0];
15834  __pyx_v_i = values[1];
15835  }
15836  goto __pyx_L4_argument_unpacking_done;
15837  __pyx_L5_argtuple_error:;
15838  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15839  __pyx_L3_error:;
15840  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15841  __Pyx_RefNannyFinishContext();
15842  return NULL;
15843  __pyx_L4_argument_unpacking_done:;
15844  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15845 
15846  /* function exit code */
15847  __Pyx_RefNannyFinishContext();
15848  return __pyx_r;
15849  }
15850 
15851  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15852  PyObject *__pyx_r = NULL;
15853  __Pyx_RefNannyDeclarations
15854  PyObject *__pyx_t_1 = NULL;
15855  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15856  __Pyx_RefNannySetupContext("sin", 0);
15857  __Pyx_XDECREF(__pyx_r);
15858  __pyx_t_2.__pyx_n = 1;
15859  __pyx_t_2.i = __pyx_v_i;
15860  __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)
15861  __Pyx_GOTREF(__pyx_t_1);
15862  __pyx_r = __pyx_t_1;
15863  __pyx_t_1 = 0;
15864  goto __pyx_L0;
15865 
15866  /* function exit code */
15867  __pyx_L1_error:;
15868  __Pyx_XDECREF(__pyx_t_1);
15869  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15870  __pyx_r = NULL;
15871  __pyx_L0:;
15872  __Pyx_XGIVEREF(__pyx_r);
15873  __Pyx_RefNannyFinishContext();
15874  return __pyx_r;
15875  }
15876 
15877  /* "PyClical.pyx":1698
15878  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15879  *
15880  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15881  * """
15882  * Inverse sine of multivector with optional complexifier.
15883  */
15884 
15885  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15886  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) {
15887  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15888  PyObject *__pyx_r = NULL;
15889  __Pyx_RefNannyDeclarations
15890  int __pyx_t_1;
15891  int __pyx_t_2;
15892  PyObject *__pyx_t_3 = NULL;
15893  Clifford __pyx_t_4;
15894  PyObject *__pyx_t_5 = NULL;
15895  PyObject *__pyx_t_6 = NULL;
15896  PyObject *__pyx_t_7 = NULL;
15897  PyObject *__pyx_t_8 = NULL;
15898  PyObject *__pyx_t_9 = NULL;
15899  PyObject *__pyx_t_10 = NULL;
15900  PyObject *__pyx_t_11 = NULL;
15901  __Pyx_RefNannySetupContext("asin", 0);
15902  if (__pyx_optional_args) {
15903  if (__pyx_optional_args->__pyx_n > 0) {
15904  __pyx_v_i = __pyx_optional_args->i;
15905  }
15906  }
15907 
15908  /* "PyClical.pyx":1711
15909  * {1,2,3}
15910  * """
15911  * if not (i is None): # <<<<<<<<<<<<<<
15912  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15913  * else:
15914  */
15915  __pyx_t_1 = (__pyx_v_i != Py_None);
15916  __pyx_t_2 = (__pyx_t_1 != 0);
15917  if (__pyx_t_2) {
15918 
15919  /* "PyClical.pyx":1712
15920  * """
15921  * if not (i is None):
15922  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15923  * else:
15924  * try:
15925  */
15926  __Pyx_XDECREF(__pyx_r);
15927  __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)
15928  __Pyx_GOTREF(__pyx_t_3);
15929  try {
15930  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15931  } catch(...) {
15932  __Pyx_CppExn2PyErr();
15933  __PYX_ERR(0, 1712, __pyx_L1_error)
15934  }
15935  __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)
15936  __Pyx_GOTREF(__pyx_t_5);
15937  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15938  __pyx_r = __pyx_t_5;
15939  __pyx_t_5 = 0;
15940  goto __pyx_L0;
15941 
15942  /* "PyClical.pyx":1711
15943  * {1,2,3}
15944  * """
15945  * if not (i is None): # <<<<<<<<<<<<<<
15946  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15947  * else:
15948  */
15949  }
15950 
15951  /* "PyClical.pyx":1714
15952  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15953  * else:
15954  * try: # <<<<<<<<<<<<<<
15955  * return math.asin(obj)
15956  * except:
15957  */
15958  /*else*/ {
15959  {
15960  __Pyx_PyThreadState_declare
15961  __Pyx_PyThreadState_assign
15962  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15963  __Pyx_XGOTREF(__pyx_t_6);
15964  __Pyx_XGOTREF(__pyx_t_7);
15965  __Pyx_XGOTREF(__pyx_t_8);
15966  /*try:*/ {
15967 
15968  /* "PyClical.pyx":1715
15969  * else:
15970  * try:
15971  * return math.asin(obj) # <<<<<<<<<<<<<<
15972  * except:
15973  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15974  */
15975  __Pyx_XDECREF(__pyx_r);
15976  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15977  __Pyx_GOTREF(__pyx_t_3);
15978  __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)
15979  __Pyx_GOTREF(__pyx_t_9);
15980  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15981  __pyx_t_3 = NULL;
15982  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15983  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15984  if (likely(__pyx_t_3)) {
15985  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15986  __Pyx_INCREF(__pyx_t_3);
15987  __Pyx_INCREF(function);
15988  __Pyx_DECREF_SET(__pyx_t_9, function);
15989  }
15990  }
15991  if (!__pyx_t_3) {
15992  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15993  __Pyx_GOTREF(__pyx_t_5);
15994  } else {
15995  #if CYTHON_FAST_PYCALL
15996  if (PyFunction_Check(__pyx_t_9)) {
15997  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15998  __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)
15999  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16000  __Pyx_GOTREF(__pyx_t_5);
16001  } else
16002  #endif
16003  #if CYTHON_FAST_PYCCALL
16004  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16005  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16006  __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)
16007  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16008  __Pyx_GOTREF(__pyx_t_5);
16009  } else
16010  #endif
16011  {
16012  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L4_error)
16013  __Pyx_GOTREF(__pyx_t_10);
16014  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16015  __Pyx_INCREF(__pyx_v_obj);
16016  __Pyx_GIVEREF(__pyx_v_obj);
16017  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16018  __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)
16019  __Pyx_GOTREF(__pyx_t_5);
16020  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16021  }
16022  }
16023  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16024  __pyx_r = __pyx_t_5;
16025  __pyx_t_5 = 0;
16026  goto __pyx_L8_try_return;
16027 
16028  /* "PyClical.pyx":1714
16029  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16030  * else:
16031  * try: # <<<<<<<<<<<<<<
16032  * return math.asin(obj)
16033  * except:
16034  */
16035  }
16036  __pyx_L4_error:;
16037  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16038  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16039  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16040  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16041 
16042  /* "PyClical.pyx":1716
16043  * try:
16044  * return math.asin(obj)
16045  * except: # <<<<<<<<<<<<<<
16046  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16047  *
16048  */
16049  /*except:*/ {
16050  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16051  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
16052  __Pyx_GOTREF(__pyx_t_5);
16053  __Pyx_GOTREF(__pyx_t_9);
16054  __Pyx_GOTREF(__pyx_t_10);
16055 
16056  /* "PyClical.pyx":1717
16057  * return math.asin(obj)
16058  * except:
16059  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
16060  *
16061  * cpdef inline sinh(obj):
16062  */
16063  __Pyx_XDECREF(__pyx_r);
16064  __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)
16065  __Pyx_GOTREF(__pyx_t_3);
16066  __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)
16067  __Pyx_GOTREF(__pyx_t_11);
16068  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16069  __pyx_r = __pyx_t_11;
16070  __pyx_t_11 = 0;
16071  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16072  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16073  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16074  goto __pyx_L7_except_return;
16075  }
16076  __pyx_L6_except_error:;
16077 
16078  /* "PyClical.pyx":1714
16079  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
16080  * else:
16081  * try: # <<<<<<<<<<<<<<
16082  * return math.asin(obj)
16083  * except:
16084  */
16085  __Pyx_XGIVEREF(__pyx_t_6);
16086  __Pyx_XGIVEREF(__pyx_t_7);
16087  __Pyx_XGIVEREF(__pyx_t_8);
16088  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16089  goto __pyx_L1_error;
16090  __pyx_L8_try_return:;
16091  __Pyx_XGIVEREF(__pyx_t_6);
16092  __Pyx_XGIVEREF(__pyx_t_7);
16093  __Pyx_XGIVEREF(__pyx_t_8);
16094  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16095  goto __pyx_L0;
16096  __pyx_L7_except_return:;
16097  __Pyx_XGIVEREF(__pyx_t_6);
16098  __Pyx_XGIVEREF(__pyx_t_7);
16099  __Pyx_XGIVEREF(__pyx_t_8);
16100  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16101  goto __pyx_L0;
16102  }
16103  }
16104 
16105  /* "PyClical.pyx":1698
16106  * return clifford().wrap( glucat.sin(toClifford(obj)) )
16107  *
16108  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
16109  * """
16110  * Inverse sine of multivector with optional complexifier.
16111  */
16112 
16113  /* function exit code */
16114  __pyx_L1_error:;
16115  __Pyx_XDECREF(__pyx_t_3);
16116  __Pyx_XDECREF(__pyx_t_5);
16117  __Pyx_XDECREF(__pyx_t_9);
16118  __Pyx_XDECREF(__pyx_t_10);
16119  __Pyx_XDECREF(__pyx_t_11);
16120  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16121  __pyx_r = 0;
16122  __pyx_L0:;
16123  __Pyx_XGIVEREF(__pyx_r);
16124  __Pyx_RefNannyFinishContext();
16125  return __pyx_r;
16126  }
16127 
16128  /* Python wrapper */
16129  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16130  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 ";
16131  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16132  PyObject *__pyx_v_obj = 0;
16133  PyObject *__pyx_v_i = 0;
16134  PyObject *__pyx_r = 0;
16135  __Pyx_RefNannyDeclarations
16136  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
16137  {
16138  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16139  PyObject* values[2] = {0,0};
16140  values[1] = ((PyObject *)Py_None);
16141  if (unlikely(__pyx_kwds)) {
16142  Py_ssize_t kw_args;
16143  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16144  switch (pos_args) {
16145  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16146  CYTHON_FALLTHROUGH;
16147  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16148  CYTHON_FALLTHROUGH;
16149  case 0: break;
16150  default: goto __pyx_L5_argtuple_error;
16151  }
16152  kw_args = PyDict_Size(__pyx_kwds);
16153  switch (pos_args) {
16154  case 0:
16155  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16156  else goto __pyx_L5_argtuple_error;
16157  CYTHON_FALLTHROUGH;
16158  case 1:
16159  if (kw_args > 0) {
16160  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16161  if (value) { values[1] = value; kw_args--; }
16162  }
16163  }
16164  if (unlikely(kw_args > 0)) {
16165  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
16166  }
16167  } else {
16168  switch (PyTuple_GET_SIZE(__pyx_args)) {
16169  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16170  CYTHON_FALLTHROUGH;
16171  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16172  break;
16173  default: goto __pyx_L5_argtuple_error;
16174  }
16175  }
16176  __pyx_v_obj = values[0];
16177  __pyx_v_i = values[1];
16178  }
16179  goto __pyx_L4_argument_unpacking_done;
16180  __pyx_L5_argtuple_error:;
16181  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
16182  __pyx_L3_error:;
16183  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16184  __Pyx_RefNannyFinishContext();
16185  return NULL;
16186  __pyx_L4_argument_unpacking_done:;
16187  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
16188 
16189  /* function exit code */
16190  __Pyx_RefNannyFinishContext();
16191  return __pyx_r;
16192  }
16193 
16194  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16195  PyObject *__pyx_r = NULL;
16196  __Pyx_RefNannyDeclarations
16197  PyObject *__pyx_t_1 = NULL;
16198  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
16199  __Pyx_RefNannySetupContext("asin", 0);
16200  __Pyx_XDECREF(__pyx_r);
16201  __pyx_t_2.__pyx_n = 1;
16202  __pyx_t_2.i = __pyx_v_i;
16203  __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)
16204  __Pyx_GOTREF(__pyx_t_1);
16205  __pyx_r = __pyx_t_1;
16206  __pyx_t_1 = 0;
16207  goto __pyx_L0;
16208 
16209  /* function exit code */
16210  __pyx_L1_error:;
16211  __Pyx_XDECREF(__pyx_t_1);
16212  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
16213  __pyx_r = NULL;
16214  __pyx_L0:;
16215  __Pyx_XGIVEREF(__pyx_r);
16216  __Pyx_RefNannyFinishContext();
16217  return __pyx_r;
16218  }
16219 
16220  /* "PyClical.pyx":1719
16221  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16222  *
16223  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16224  * """
16225  * Hyperbolic sine of multivector.
16226  */
16227 
16228  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16229  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16230  PyObject *__pyx_r = NULL;
16231  __Pyx_RefNannyDeclarations
16232  PyObject *__pyx_t_1 = NULL;
16233  PyObject *__pyx_t_2 = NULL;
16234  PyObject *__pyx_t_3 = NULL;
16235  PyObject *__pyx_t_4 = NULL;
16236  PyObject *__pyx_t_5 = NULL;
16237  PyObject *__pyx_t_6 = NULL;
16238  PyObject *__pyx_t_7 = NULL;
16239  PyObject *__pyx_t_8 = NULL;
16240  __Pyx_RefNannySetupContext("sinh", 0);
16241 
16242  /* "PyClical.pyx":1728
16243  * 0.5{1,2}
16244  * """
16245  * try: # <<<<<<<<<<<<<<
16246  * return math.sinh(obj)
16247  * except:
16248  */
16249  {
16250  __Pyx_PyThreadState_declare
16251  __Pyx_PyThreadState_assign
16252  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16253  __Pyx_XGOTREF(__pyx_t_1);
16254  __Pyx_XGOTREF(__pyx_t_2);
16255  __Pyx_XGOTREF(__pyx_t_3);
16256  /*try:*/ {
16257 
16258  /* "PyClical.pyx":1729
16259  * """
16260  * try:
16261  * return math.sinh(obj) # <<<<<<<<<<<<<<
16262  * except:
16263  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16264  */
16265  __Pyx_XDECREF(__pyx_r);
16266  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
16267  __Pyx_GOTREF(__pyx_t_5);
16268  __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)
16269  __Pyx_GOTREF(__pyx_t_6);
16270  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16271  __pyx_t_5 = NULL;
16272  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16273  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16274  if (likely(__pyx_t_5)) {
16275  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16276  __Pyx_INCREF(__pyx_t_5);
16277  __Pyx_INCREF(function);
16278  __Pyx_DECREF_SET(__pyx_t_6, function);
16279  }
16280  }
16281  if (!__pyx_t_5) {
16282  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16283  __Pyx_GOTREF(__pyx_t_4);
16284  } else {
16285  #if CYTHON_FAST_PYCALL
16286  if (PyFunction_Check(__pyx_t_6)) {
16287  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16288  __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)
16289  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16290  __Pyx_GOTREF(__pyx_t_4);
16291  } else
16292  #endif
16293  #if CYTHON_FAST_PYCCALL
16294  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16295  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16296  __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)
16297  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16298  __Pyx_GOTREF(__pyx_t_4);
16299  } else
16300  #endif
16301  {
16302  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1729, __pyx_L3_error)
16303  __Pyx_GOTREF(__pyx_t_7);
16304  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16305  __Pyx_INCREF(__pyx_v_obj);
16306  __Pyx_GIVEREF(__pyx_v_obj);
16307  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16308  __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)
16309  __Pyx_GOTREF(__pyx_t_4);
16310  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16311  }
16312  }
16313  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16314  __pyx_r = __pyx_t_4;
16315  __pyx_t_4 = 0;
16316  goto __pyx_L7_try_return;
16317 
16318  /* "PyClical.pyx":1728
16319  * 0.5{1,2}
16320  * """
16321  * try: # <<<<<<<<<<<<<<
16322  * return math.sinh(obj)
16323  * except:
16324  */
16325  }
16326  __pyx_L3_error:;
16327  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16328  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16329  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16330  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16331 
16332  /* "PyClical.pyx":1730
16333  * try:
16334  * return math.sinh(obj)
16335  * except: # <<<<<<<<<<<<<<
16336  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16337  *
16338  */
16339  /*except:*/ {
16340  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16341  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16342  __Pyx_GOTREF(__pyx_t_4);
16343  __Pyx_GOTREF(__pyx_t_6);
16344  __Pyx_GOTREF(__pyx_t_7);
16345 
16346  /* "PyClical.pyx":1731
16347  * return math.sinh(obj)
16348  * except:
16349  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16350  *
16351  * cpdef inline asinh(obj,i = None):
16352  */
16353  __Pyx_XDECREF(__pyx_r);
16354  __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)
16355  __Pyx_GOTREF(__pyx_t_5);
16356  __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)
16357  __Pyx_GOTREF(__pyx_t_8);
16358  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16359  __pyx_r = __pyx_t_8;
16360  __pyx_t_8 = 0;
16361  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16362  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16363  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16364  goto __pyx_L6_except_return;
16365  }
16366  __pyx_L5_except_error:;
16367 
16368  /* "PyClical.pyx":1728
16369  * 0.5{1,2}
16370  * """
16371  * try: # <<<<<<<<<<<<<<
16372  * return math.sinh(obj)
16373  * except:
16374  */
16375  __Pyx_XGIVEREF(__pyx_t_1);
16376  __Pyx_XGIVEREF(__pyx_t_2);
16377  __Pyx_XGIVEREF(__pyx_t_3);
16378  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16379  goto __pyx_L1_error;
16380  __pyx_L7_try_return:;
16381  __Pyx_XGIVEREF(__pyx_t_1);
16382  __Pyx_XGIVEREF(__pyx_t_2);
16383  __Pyx_XGIVEREF(__pyx_t_3);
16384  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16385  goto __pyx_L0;
16386  __pyx_L6_except_return:;
16387  __Pyx_XGIVEREF(__pyx_t_1);
16388  __Pyx_XGIVEREF(__pyx_t_2);
16389  __Pyx_XGIVEREF(__pyx_t_3);
16390  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16391  goto __pyx_L0;
16392  }
16393 
16394  /* "PyClical.pyx":1719
16395  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16396  *
16397  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16398  * """
16399  * Hyperbolic sine of multivector.
16400  */
16401 
16402  /* function exit code */
16403  __pyx_L1_error:;
16404  __Pyx_XDECREF(__pyx_t_4);
16405  __Pyx_XDECREF(__pyx_t_5);
16406  __Pyx_XDECREF(__pyx_t_6);
16407  __Pyx_XDECREF(__pyx_t_7);
16408  __Pyx_XDECREF(__pyx_t_8);
16409  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16410  __pyx_r = 0;
16411  __pyx_L0:;
16412  __Pyx_XGIVEREF(__pyx_r);
16413  __Pyx_RefNannyFinishContext();
16414  return __pyx_r;
16415  }
16416 
16417  /* Python wrapper */
16418  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16419  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 ";
16420  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16421  PyObject *__pyx_r = 0;
16422  __Pyx_RefNannyDeclarations
16423  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16424  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16425 
16426  /* function exit code */
16427  __Pyx_RefNannyFinishContext();
16428  return __pyx_r;
16429  }
16430 
16431  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16432  PyObject *__pyx_r = NULL;
16433  __Pyx_RefNannyDeclarations
16434  PyObject *__pyx_t_1 = NULL;
16435  __Pyx_RefNannySetupContext("sinh", 0);
16436  __Pyx_XDECREF(__pyx_r);
16437  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
16438  __Pyx_GOTREF(__pyx_t_1);
16439  __pyx_r = __pyx_t_1;
16440  __pyx_t_1 = 0;
16441  goto __pyx_L0;
16442 
16443  /* function exit code */
16444  __pyx_L1_error:;
16445  __Pyx_XDECREF(__pyx_t_1);
16446  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16447  __pyx_r = NULL;
16448  __pyx_L0:;
16449  __Pyx_XGIVEREF(__pyx_r);
16450  __Pyx_RefNannyFinishContext();
16451  return __pyx_r;
16452  }
16453 
16454  /* "PyClical.pyx":1733
16455  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16456  *
16457  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16458  * """
16459  * Inverse hyperbolic sine of multivector with optional complexifier.
16460  */
16461 
16462  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16463  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) {
16464  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16465  PyObject *__pyx_r = NULL;
16466  __Pyx_RefNannyDeclarations
16467  int __pyx_t_1;
16468  int __pyx_t_2;
16469  PyObject *__pyx_t_3 = NULL;
16470  Clifford __pyx_t_4;
16471  PyObject *__pyx_t_5 = NULL;
16472  PyObject *__pyx_t_6 = NULL;
16473  PyObject *__pyx_t_7 = NULL;
16474  PyObject *__pyx_t_8 = NULL;
16475  PyObject *__pyx_t_9 = NULL;
16476  PyObject *__pyx_t_10 = NULL;
16477  PyObject *__pyx_t_11 = NULL;
16478  __Pyx_RefNannySetupContext("asinh", 0);
16479  if (__pyx_optional_args) {
16480  if (__pyx_optional_args->__pyx_n > 0) {
16481  __pyx_v_i = __pyx_optional_args->i;
16482  }
16483  }
16484 
16485  /* "PyClical.pyx":1744
16486  * {1,2}
16487  * """
16488  * if not (i is None): # <<<<<<<<<<<<<<
16489  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16490  * else:
16491  */
16492  __pyx_t_1 = (__pyx_v_i != Py_None);
16493  __pyx_t_2 = (__pyx_t_1 != 0);
16494  if (__pyx_t_2) {
16495 
16496  /* "PyClical.pyx":1745
16497  * """
16498  * if not (i is None):
16499  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16500  * else:
16501  * try:
16502  */
16503  __Pyx_XDECREF(__pyx_r);
16504  __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)
16505  __Pyx_GOTREF(__pyx_t_3);
16506  try {
16507  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16508  } catch(...) {
16509  __Pyx_CppExn2PyErr();
16510  __PYX_ERR(0, 1745, __pyx_L1_error)
16511  }
16512  __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)
16513  __Pyx_GOTREF(__pyx_t_5);
16514  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16515  __pyx_r = __pyx_t_5;
16516  __pyx_t_5 = 0;
16517  goto __pyx_L0;
16518 
16519  /* "PyClical.pyx":1744
16520  * {1,2}
16521  * """
16522  * if not (i is None): # <<<<<<<<<<<<<<
16523  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16524  * else:
16525  */
16526  }
16527 
16528  /* "PyClical.pyx":1747
16529  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16530  * else:
16531  * try: # <<<<<<<<<<<<<<
16532  * return math.asinh(obj)
16533  * except:
16534  */
16535  /*else*/ {
16536  {
16537  __Pyx_PyThreadState_declare
16538  __Pyx_PyThreadState_assign
16539  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16540  __Pyx_XGOTREF(__pyx_t_6);
16541  __Pyx_XGOTREF(__pyx_t_7);
16542  __Pyx_XGOTREF(__pyx_t_8);
16543  /*try:*/ {
16544 
16545  /* "PyClical.pyx":1748
16546  * else:
16547  * try:
16548  * return math.asinh(obj) # <<<<<<<<<<<<<<
16549  * except:
16550  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16551  */
16552  __Pyx_XDECREF(__pyx_r);
16553  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16554  __Pyx_GOTREF(__pyx_t_3);
16555  __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)
16556  __Pyx_GOTREF(__pyx_t_9);
16557  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16558  __pyx_t_3 = NULL;
16559  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16560  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16561  if (likely(__pyx_t_3)) {
16562  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16563  __Pyx_INCREF(__pyx_t_3);
16564  __Pyx_INCREF(function);
16565  __Pyx_DECREF_SET(__pyx_t_9, function);
16566  }
16567  }
16568  if (!__pyx_t_3) {
16569  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16570  __Pyx_GOTREF(__pyx_t_5);
16571  } else {
16572  #if CYTHON_FAST_PYCALL
16573  if (PyFunction_Check(__pyx_t_9)) {
16574  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16575  __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)
16576  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16577  __Pyx_GOTREF(__pyx_t_5);
16578  } else
16579  #endif
16580  #if CYTHON_FAST_PYCCALL
16581  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16582  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16583  __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)
16584  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16585  __Pyx_GOTREF(__pyx_t_5);
16586  } else
16587  #endif
16588  {
16589  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1748, __pyx_L4_error)
16590  __Pyx_GOTREF(__pyx_t_10);
16591  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16592  __Pyx_INCREF(__pyx_v_obj);
16593  __Pyx_GIVEREF(__pyx_v_obj);
16594  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16595  __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)
16596  __Pyx_GOTREF(__pyx_t_5);
16597  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16598  }
16599  }
16600  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16601  __pyx_r = __pyx_t_5;
16602  __pyx_t_5 = 0;
16603  goto __pyx_L8_try_return;
16604 
16605  /* "PyClical.pyx":1747
16606  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16607  * else:
16608  * try: # <<<<<<<<<<<<<<
16609  * return math.asinh(obj)
16610  * except:
16611  */
16612  }
16613  __pyx_L4_error:;
16614  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16615  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16616  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16617  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16618 
16619  /* "PyClical.pyx":1749
16620  * try:
16621  * return math.asinh(obj)
16622  * except: # <<<<<<<<<<<<<<
16623  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16624  *
16625  */
16626  /*except:*/ {
16627  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16628  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16629  __Pyx_GOTREF(__pyx_t_5);
16630  __Pyx_GOTREF(__pyx_t_9);
16631  __Pyx_GOTREF(__pyx_t_10);
16632 
16633  /* "PyClical.pyx":1750
16634  * return math.asinh(obj)
16635  * except:
16636  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16637  *
16638  * cpdef inline tan(obj,i = None):
16639  */
16640  __Pyx_XDECREF(__pyx_r);
16641  __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)
16642  __Pyx_GOTREF(__pyx_t_3);
16643  __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)
16644  __Pyx_GOTREF(__pyx_t_11);
16645  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16646  __pyx_r = __pyx_t_11;
16647  __pyx_t_11 = 0;
16648  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16649  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16650  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16651  goto __pyx_L7_except_return;
16652  }
16653  __pyx_L6_except_error:;
16654 
16655  /* "PyClical.pyx":1747
16656  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16657  * else:
16658  * try: # <<<<<<<<<<<<<<
16659  * return math.asinh(obj)
16660  * except:
16661  */
16662  __Pyx_XGIVEREF(__pyx_t_6);
16663  __Pyx_XGIVEREF(__pyx_t_7);
16664  __Pyx_XGIVEREF(__pyx_t_8);
16665  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16666  goto __pyx_L1_error;
16667  __pyx_L8_try_return:;
16668  __Pyx_XGIVEREF(__pyx_t_6);
16669  __Pyx_XGIVEREF(__pyx_t_7);
16670  __Pyx_XGIVEREF(__pyx_t_8);
16671  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16672  goto __pyx_L0;
16673  __pyx_L7_except_return:;
16674  __Pyx_XGIVEREF(__pyx_t_6);
16675  __Pyx_XGIVEREF(__pyx_t_7);
16676  __Pyx_XGIVEREF(__pyx_t_8);
16677  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16678  goto __pyx_L0;
16679  }
16680  }
16681 
16682  /* "PyClical.pyx":1733
16683  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16684  *
16685  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16686  * """
16687  * Inverse hyperbolic sine of multivector with optional complexifier.
16688  */
16689 
16690  /* function exit code */
16691  __pyx_L1_error:;
16692  __Pyx_XDECREF(__pyx_t_3);
16693  __Pyx_XDECREF(__pyx_t_5);
16694  __Pyx_XDECREF(__pyx_t_9);
16695  __Pyx_XDECREF(__pyx_t_10);
16696  __Pyx_XDECREF(__pyx_t_11);
16697  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16698  __pyx_r = 0;
16699  __pyx_L0:;
16700  __Pyx_XGIVEREF(__pyx_r);
16701  __Pyx_RefNannyFinishContext();
16702  return __pyx_r;
16703  }
16704 
16705  /* Python wrapper */
16706  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16707  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 ";
16708  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16709  PyObject *__pyx_v_obj = 0;
16710  PyObject *__pyx_v_i = 0;
16711  PyObject *__pyx_r = 0;
16712  __Pyx_RefNannyDeclarations
16713  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16714  {
16715  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16716  PyObject* values[2] = {0,0};
16717  values[1] = ((PyObject *)Py_None);
16718  if (unlikely(__pyx_kwds)) {
16719  Py_ssize_t kw_args;
16720  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16721  switch (pos_args) {
16722  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16723  CYTHON_FALLTHROUGH;
16724  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16725  CYTHON_FALLTHROUGH;
16726  case 0: break;
16727  default: goto __pyx_L5_argtuple_error;
16728  }
16729  kw_args = PyDict_Size(__pyx_kwds);
16730  switch (pos_args) {
16731  case 0:
16732  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16733  else goto __pyx_L5_argtuple_error;
16734  CYTHON_FALLTHROUGH;
16735  case 1:
16736  if (kw_args > 0) {
16737  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
16738  if (value) { values[1] = value; kw_args--; }
16739  }
16740  }
16741  if (unlikely(kw_args > 0)) {
16742  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16743  }
16744  } else {
16745  switch (PyTuple_GET_SIZE(__pyx_args)) {
16746  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16747  CYTHON_FALLTHROUGH;
16748  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16749  break;
16750  default: goto __pyx_L5_argtuple_error;
16751  }
16752  }
16753  __pyx_v_obj = values[0];
16754  __pyx_v_i = values[1];
16755  }
16756  goto __pyx_L4_argument_unpacking_done;
16757  __pyx_L5_argtuple_error:;
16758  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16759  __pyx_L3_error:;
16760  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16761  __Pyx_RefNannyFinishContext();
16762  return NULL;
16763  __pyx_L4_argument_unpacking_done:;
16764  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16765 
16766  /* function exit code */
16767  __Pyx_RefNannyFinishContext();
16768  return __pyx_r;
16769  }
16770 
16771  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16772  PyObject *__pyx_r = NULL;
16773  __Pyx_RefNannyDeclarations
16774  PyObject *__pyx_t_1 = NULL;
16775  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16776  __Pyx_RefNannySetupContext("asinh", 0);
16777  __Pyx_XDECREF(__pyx_r);
16778  __pyx_t_2.__pyx_n = 1;
16779  __pyx_t_2.i = __pyx_v_i;
16780  __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)
16781  __Pyx_GOTREF(__pyx_t_1);
16782  __pyx_r = __pyx_t_1;
16783  __pyx_t_1 = 0;
16784  goto __pyx_L0;
16785 
16786  /* function exit code */
16787  __pyx_L1_error:;
16788  __Pyx_XDECREF(__pyx_t_1);
16789  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16790  __pyx_r = NULL;
16791  __pyx_L0:;
16792  __Pyx_XGIVEREF(__pyx_r);
16793  __Pyx_RefNannyFinishContext();
16794  return __pyx_r;
16795  }
16796 
16797  /* "PyClical.pyx":1752
16798  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16799  *
16800  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16801  * """
16802  * Tangent of multivector with optional complexifier.
16803  */
16804 
16805  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16806  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) {
16807  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16808  PyObject *__pyx_r = NULL;
16809  __Pyx_RefNannyDeclarations
16810  int __pyx_t_1;
16811  int __pyx_t_2;
16812  PyObject *__pyx_t_3 = NULL;
16813  Clifford __pyx_t_4;
16814  PyObject *__pyx_t_5 = NULL;
16815  PyObject *__pyx_t_6 = NULL;
16816  PyObject *__pyx_t_7 = NULL;
16817  PyObject *__pyx_t_8 = NULL;
16818  PyObject *__pyx_t_9 = NULL;
16819  PyObject *__pyx_t_10 = NULL;
16820  PyObject *__pyx_t_11 = NULL;
16821  __Pyx_RefNannySetupContext("tan", 0);
16822  if (__pyx_optional_args) {
16823  if (__pyx_optional_args->__pyx_n > 0) {
16824  __pyx_v_i = __pyx_optional_args->i;
16825  }
16826  }
16827 
16828  /* "PyClical.pyx":1761
16829  * 0.7616{1,2}
16830  * """
16831  * if not (i is None): # <<<<<<<<<<<<<<
16832  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16833  * else:
16834  */
16835  __pyx_t_1 = (__pyx_v_i != Py_None);
16836  __pyx_t_2 = (__pyx_t_1 != 0);
16837  if (__pyx_t_2) {
16838 
16839  /* "PyClical.pyx":1762
16840  * """
16841  * if not (i is None):
16842  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16843  * else:
16844  * try:
16845  */
16846  __Pyx_XDECREF(__pyx_r);
16847  __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)
16848  __Pyx_GOTREF(__pyx_t_3);
16849  try {
16850  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16851  } catch(...) {
16852  __Pyx_CppExn2PyErr();
16853  __PYX_ERR(0, 1762, __pyx_L1_error)
16854  }
16855  __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)
16856  __Pyx_GOTREF(__pyx_t_5);
16857  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16858  __pyx_r = __pyx_t_5;
16859  __pyx_t_5 = 0;
16860  goto __pyx_L0;
16861 
16862  /* "PyClical.pyx":1761
16863  * 0.7616{1,2}
16864  * """
16865  * if not (i is None): # <<<<<<<<<<<<<<
16866  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16867  * else:
16868  */
16869  }
16870 
16871  /* "PyClical.pyx":1764
16872  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16873  * else:
16874  * try: # <<<<<<<<<<<<<<
16875  * return math.tan(obj)
16876  * except:
16877  */
16878  /*else*/ {
16879  {
16880  __Pyx_PyThreadState_declare
16881  __Pyx_PyThreadState_assign
16882  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16883  __Pyx_XGOTREF(__pyx_t_6);
16884  __Pyx_XGOTREF(__pyx_t_7);
16885  __Pyx_XGOTREF(__pyx_t_8);
16886  /*try:*/ {
16887 
16888  /* "PyClical.pyx":1765
16889  * else:
16890  * try:
16891  * return math.tan(obj) # <<<<<<<<<<<<<<
16892  * except:
16893  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16894  */
16895  __Pyx_XDECREF(__pyx_r);
16896  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16897  __Pyx_GOTREF(__pyx_t_3);
16898  __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)
16899  __Pyx_GOTREF(__pyx_t_9);
16900  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16901  __pyx_t_3 = NULL;
16902  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16903  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16904  if (likely(__pyx_t_3)) {
16905  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16906  __Pyx_INCREF(__pyx_t_3);
16907  __Pyx_INCREF(function);
16908  __Pyx_DECREF_SET(__pyx_t_9, function);
16909  }
16910  }
16911  if (!__pyx_t_3) {
16912  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16913  __Pyx_GOTREF(__pyx_t_5);
16914  } else {
16915  #if CYTHON_FAST_PYCALL
16916  if (PyFunction_Check(__pyx_t_9)) {
16917  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16918  __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)
16919  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16920  __Pyx_GOTREF(__pyx_t_5);
16921  } else
16922  #endif
16923  #if CYTHON_FAST_PYCCALL
16924  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16925  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16926  __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)
16927  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16928  __Pyx_GOTREF(__pyx_t_5);
16929  } else
16930  #endif
16931  {
16932  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1765, __pyx_L4_error)
16933  __Pyx_GOTREF(__pyx_t_10);
16934  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16935  __Pyx_INCREF(__pyx_v_obj);
16936  __Pyx_GIVEREF(__pyx_v_obj);
16937  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16938  __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)
16939  __Pyx_GOTREF(__pyx_t_5);
16940  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16941  }
16942  }
16943  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16944  __pyx_r = __pyx_t_5;
16945  __pyx_t_5 = 0;
16946  goto __pyx_L8_try_return;
16947 
16948  /* "PyClical.pyx":1764
16949  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16950  * else:
16951  * try: # <<<<<<<<<<<<<<
16952  * return math.tan(obj)
16953  * except:
16954  */
16955  }
16956  __pyx_L4_error:;
16957  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16958  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16959  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16960  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16961 
16962  /* "PyClical.pyx":1766
16963  * try:
16964  * return math.tan(obj)
16965  * except: # <<<<<<<<<<<<<<
16966  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16967  *
16968  */
16969  /*except:*/ {
16970  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16971  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16972  __Pyx_GOTREF(__pyx_t_5);
16973  __Pyx_GOTREF(__pyx_t_9);
16974  __Pyx_GOTREF(__pyx_t_10);
16975 
16976  /* "PyClical.pyx":1767
16977  * return math.tan(obj)
16978  * except:
16979  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16980  *
16981  * cpdef inline atan(obj,i = None):
16982  */
16983  __Pyx_XDECREF(__pyx_r);
16984  __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)
16985  __Pyx_GOTREF(__pyx_t_3);
16986  __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)
16987  __Pyx_GOTREF(__pyx_t_11);
16988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16989  __pyx_r = __pyx_t_11;
16990  __pyx_t_11 = 0;
16991  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16992  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16993  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16994  goto __pyx_L7_except_return;
16995  }
16996  __pyx_L6_except_error:;
16997 
16998  /* "PyClical.pyx":1764
16999  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
17000  * else:
17001  * try: # <<<<<<<<<<<<<<
17002  * return math.tan(obj)
17003  * except:
17004  */
17005  __Pyx_XGIVEREF(__pyx_t_6);
17006  __Pyx_XGIVEREF(__pyx_t_7);
17007  __Pyx_XGIVEREF(__pyx_t_8);
17008  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17009  goto __pyx_L1_error;
17010  __pyx_L8_try_return:;
17011  __Pyx_XGIVEREF(__pyx_t_6);
17012  __Pyx_XGIVEREF(__pyx_t_7);
17013  __Pyx_XGIVEREF(__pyx_t_8);
17014  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17015  goto __pyx_L0;
17016  __pyx_L7_except_return:;
17017  __Pyx_XGIVEREF(__pyx_t_6);
17018  __Pyx_XGIVEREF(__pyx_t_7);
17019  __Pyx_XGIVEREF(__pyx_t_8);
17020  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17021  goto __pyx_L0;
17022  }
17023  }
17024 
17025  /* "PyClical.pyx":1752
17026  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
17027  *
17028  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
17029  * """
17030  * Tangent of multivector with optional complexifier.
17031  */
17032 
17033  /* function exit code */
17034  __pyx_L1_error:;
17035  __Pyx_XDECREF(__pyx_t_3);
17036  __Pyx_XDECREF(__pyx_t_5);
17037  __Pyx_XDECREF(__pyx_t_9);
17038  __Pyx_XDECREF(__pyx_t_10);
17039  __Pyx_XDECREF(__pyx_t_11);
17040  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17041  __pyx_r = 0;
17042  __pyx_L0:;
17043  __Pyx_XGIVEREF(__pyx_r);
17044  __Pyx_RefNannyFinishContext();
17045  return __pyx_r;
17046  }
17047 
17048  /* Python wrapper */
17049  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17050  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 ";
17051  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17052  PyObject *__pyx_v_obj = 0;
17053  PyObject *__pyx_v_i = 0;
17054  PyObject *__pyx_r = 0;
17055  __Pyx_RefNannyDeclarations
17056  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
17057  {
17058  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17059  PyObject* values[2] = {0,0};
17060  values[1] = ((PyObject *)Py_None);
17061  if (unlikely(__pyx_kwds)) {
17062  Py_ssize_t kw_args;
17063  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17064  switch (pos_args) {
17065  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17066  CYTHON_FALLTHROUGH;
17067  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17068  CYTHON_FALLTHROUGH;
17069  case 0: break;
17070  default: goto __pyx_L5_argtuple_error;
17071  }
17072  kw_args = PyDict_Size(__pyx_kwds);
17073  switch (pos_args) {
17074  case 0:
17075  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17076  else goto __pyx_L5_argtuple_error;
17077  CYTHON_FALLTHROUGH;
17078  case 1:
17079  if (kw_args > 0) {
17080  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17081  if (value) { values[1] = value; kw_args--; }
17082  }
17083  }
17084  if (unlikely(kw_args > 0)) {
17085  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
17086  }
17087  } else {
17088  switch (PyTuple_GET_SIZE(__pyx_args)) {
17089  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17090  CYTHON_FALLTHROUGH;
17091  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17092  break;
17093  default: goto __pyx_L5_argtuple_error;
17094  }
17095  }
17096  __pyx_v_obj = values[0];
17097  __pyx_v_i = values[1];
17098  }
17099  goto __pyx_L4_argument_unpacking_done;
17100  __pyx_L5_argtuple_error:;
17101  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
17102  __pyx_L3_error:;
17103  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17104  __Pyx_RefNannyFinishContext();
17105  return NULL;
17106  __pyx_L4_argument_unpacking_done:;
17107  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17108 
17109  /* function exit code */
17110  __Pyx_RefNannyFinishContext();
17111  return __pyx_r;
17112  }
17113 
17114  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17115  PyObject *__pyx_r = NULL;
17116  __Pyx_RefNannyDeclarations
17117  PyObject *__pyx_t_1 = NULL;
17118  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
17119  __Pyx_RefNannySetupContext("tan", 0);
17120  __Pyx_XDECREF(__pyx_r);
17121  __pyx_t_2.__pyx_n = 1;
17122  __pyx_t_2.i = __pyx_v_i;
17123  __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)
17124  __Pyx_GOTREF(__pyx_t_1);
17125  __pyx_r = __pyx_t_1;
17126  __pyx_t_1 = 0;
17127  goto __pyx_L0;
17128 
17129  /* function exit code */
17130  __pyx_L1_error:;
17131  __Pyx_XDECREF(__pyx_t_1);
17132  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17133  __pyx_r = NULL;
17134  __pyx_L0:;
17135  __Pyx_XGIVEREF(__pyx_r);
17136  __Pyx_RefNannyFinishContext();
17137  return __pyx_r;
17138  }
17139 
17140  /* "PyClical.pyx":1769
17141  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17142  *
17143  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17144  * """
17145  * Inverse tangent of multivector with optional complexifier.
17146  */
17147 
17148  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17149  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) {
17150  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17151  PyObject *__pyx_r = NULL;
17152  __Pyx_RefNannyDeclarations
17153  int __pyx_t_1;
17154  int __pyx_t_2;
17155  PyObject *__pyx_t_3 = NULL;
17156  Clifford __pyx_t_4;
17157  PyObject *__pyx_t_5 = NULL;
17158  PyObject *__pyx_t_6 = NULL;
17159  PyObject *__pyx_t_7 = NULL;
17160  PyObject *__pyx_t_8 = NULL;
17161  PyObject *__pyx_t_9 = NULL;
17162  PyObject *__pyx_t_10 = NULL;
17163  PyObject *__pyx_t_11 = NULL;
17164  __Pyx_RefNannySetupContext("atan", 0);
17165  if (__pyx_optional_args) {
17166  if (__pyx_optional_args->__pyx_n > 0) {
17167  __pyx_v_i = __pyx_optional_args->i;
17168  }
17169  }
17170 
17171  /* "PyClical.pyx":1778
17172  * {1}
17173  * """
17174  * if not (i is None): # <<<<<<<<<<<<<<
17175  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17176  * else:
17177  */
17178  __pyx_t_1 = (__pyx_v_i != Py_None);
17179  __pyx_t_2 = (__pyx_t_1 != 0);
17180  if (__pyx_t_2) {
17181 
17182  /* "PyClical.pyx":1779
17183  * """
17184  * if not (i is None):
17185  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17186  * else:
17187  * try:
17188  */
17189  __Pyx_XDECREF(__pyx_r);
17190  __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)
17191  __Pyx_GOTREF(__pyx_t_3);
17192  try {
17193  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17194  } catch(...) {
17195  __Pyx_CppExn2PyErr();
17196  __PYX_ERR(0, 1779, __pyx_L1_error)
17197  }
17198  __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)
17199  __Pyx_GOTREF(__pyx_t_5);
17200  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17201  __pyx_r = __pyx_t_5;
17202  __pyx_t_5 = 0;
17203  goto __pyx_L0;
17204 
17205  /* "PyClical.pyx":1778
17206  * {1}
17207  * """
17208  * if not (i is None): # <<<<<<<<<<<<<<
17209  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17210  * else:
17211  */
17212  }
17213 
17214  /* "PyClical.pyx":1781
17215  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17216  * else:
17217  * try: # <<<<<<<<<<<<<<
17218  * return math.atan(obj)
17219  * except:
17220  */
17221  /*else*/ {
17222  {
17223  __Pyx_PyThreadState_declare
17224  __Pyx_PyThreadState_assign
17225  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17226  __Pyx_XGOTREF(__pyx_t_6);
17227  __Pyx_XGOTREF(__pyx_t_7);
17228  __Pyx_XGOTREF(__pyx_t_8);
17229  /*try:*/ {
17230 
17231  /* "PyClical.pyx":1782
17232  * else:
17233  * try:
17234  * return math.atan(obj) # <<<<<<<<<<<<<<
17235  * except:
17236  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17237  */
17238  __Pyx_XDECREF(__pyx_r);
17239  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
17240  __Pyx_GOTREF(__pyx_t_3);
17241  __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)
17242  __Pyx_GOTREF(__pyx_t_9);
17243  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17244  __pyx_t_3 = NULL;
17245  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17246  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17247  if (likely(__pyx_t_3)) {
17248  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17249  __Pyx_INCREF(__pyx_t_3);
17250  __Pyx_INCREF(function);
17251  __Pyx_DECREF_SET(__pyx_t_9, function);
17252  }
17253  }
17254  if (!__pyx_t_3) {
17255  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17256  __Pyx_GOTREF(__pyx_t_5);
17257  } else {
17258  #if CYTHON_FAST_PYCALL
17259  if (PyFunction_Check(__pyx_t_9)) {
17260  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17261  __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)
17262  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17263  __Pyx_GOTREF(__pyx_t_5);
17264  } else
17265  #endif
17266  #if CYTHON_FAST_PYCCALL
17267  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17268  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17269  __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)
17270  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17271  __Pyx_GOTREF(__pyx_t_5);
17272  } else
17273  #endif
17274  {
17275  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L4_error)
17276  __Pyx_GOTREF(__pyx_t_10);
17277  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17278  __Pyx_INCREF(__pyx_v_obj);
17279  __Pyx_GIVEREF(__pyx_v_obj);
17280  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17281  __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)
17282  __Pyx_GOTREF(__pyx_t_5);
17283  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17284  }
17285  }
17286  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17287  __pyx_r = __pyx_t_5;
17288  __pyx_t_5 = 0;
17289  goto __pyx_L8_try_return;
17290 
17291  /* "PyClical.pyx":1781
17292  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17293  * else:
17294  * try: # <<<<<<<<<<<<<<
17295  * return math.atan(obj)
17296  * except:
17297  */
17298  }
17299  __pyx_L4_error:;
17300  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17301  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17302  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17303  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17304 
17305  /* "PyClical.pyx":1783
17306  * try:
17307  * return math.atan(obj)
17308  * except: # <<<<<<<<<<<<<<
17309  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17310  *
17311  */
17312  /*except:*/ {
17313  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17314  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17315  __Pyx_GOTREF(__pyx_t_5);
17316  __Pyx_GOTREF(__pyx_t_9);
17317  __Pyx_GOTREF(__pyx_t_10);
17318 
17319  /* "PyClical.pyx":1784
17320  * return math.atan(obj)
17321  * except:
17322  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17323  *
17324  * cpdef inline tanh(obj):
17325  */
17326  __Pyx_XDECREF(__pyx_r);
17327  __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)
17328  __Pyx_GOTREF(__pyx_t_3);
17329  __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)
17330  __Pyx_GOTREF(__pyx_t_11);
17331  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17332  __pyx_r = __pyx_t_11;
17333  __pyx_t_11 = 0;
17334  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17335  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17336  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17337  goto __pyx_L7_except_return;
17338  }
17339  __pyx_L6_except_error:;
17340 
17341  /* "PyClical.pyx":1781
17342  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17343  * else:
17344  * try: # <<<<<<<<<<<<<<
17345  * return math.atan(obj)
17346  * except:
17347  */
17348  __Pyx_XGIVEREF(__pyx_t_6);
17349  __Pyx_XGIVEREF(__pyx_t_7);
17350  __Pyx_XGIVEREF(__pyx_t_8);
17351  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17352  goto __pyx_L1_error;
17353  __pyx_L8_try_return:;
17354  __Pyx_XGIVEREF(__pyx_t_6);
17355  __Pyx_XGIVEREF(__pyx_t_7);
17356  __Pyx_XGIVEREF(__pyx_t_8);
17357  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17358  goto __pyx_L0;
17359  __pyx_L7_except_return:;
17360  __Pyx_XGIVEREF(__pyx_t_6);
17361  __Pyx_XGIVEREF(__pyx_t_7);
17362  __Pyx_XGIVEREF(__pyx_t_8);
17363  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17364  goto __pyx_L0;
17365  }
17366  }
17367 
17368  /* "PyClical.pyx":1769
17369  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17370  *
17371  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17372  * """
17373  * Inverse tangent of multivector with optional complexifier.
17374  */
17375 
17376  /* function exit code */
17377  __pyx_L1_error:;
17378  __Pyx_XDECREF(__pyx_t_3);
17379  __Pyx_XDECREF(__pyx_t_5);
17380  __Pyx_XDECREF(__pyx_t_9);
17381  __Pyx_XDECREF(__pyx_t_10);
17382  __Pyx_XDECREF(__pyx_t_11);
17383  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17384  __pyx_r = 0;
17385  __pyx_L0:;
17386  __Pyx_XGIVEREF(__pyx_r);
17387  __Pyx_RefNannyFinishContext();
17388  return __pyx_r;
17389  }
17390 
17391  /* Python wrapper */
17392  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17393  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 ";
17394  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17395  PyObject *__pyx_v_obj = 0;
17396  PyObject *__pyx_v_i = 0;
17397  PyObject *__pyx_r = 0;
17398  __Pyx_RefNannyDeclarations
17399  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17400  {
17401  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17402  PyObject* values[2] = {0,0};
17403  values[1] = ((PyObject *)Py_None);
17404  if (unlikely(__pyx_kwds)) {
17405  Py_ssize_t kw_args;
17406  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17407  switch (pos_args) {
17408  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17409  CYTHON_FALLTHROUGH;
17410  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17411  CYTHON_FALLTHROUGH;
17412  case 0: break;
17413  default: goto __pyx_L5_argtuple_error;
17414  }
17415  kw_args = PyDict_Size(__pyx_kwds);
17416  switch (pos_args) {
17417  case 0:
17418  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17419  else goto __pyx_L5_argtuple_error;
17420  CYTHON_FALLTHROUGH;
17421  case 1:
17422  if (kw_args > 0) {
17423  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
17424  if (value) { values[1] = value; kw_args--; }
17425  }
17426  }
17427  if (unlikely(kw_args > 0)) {
17428  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
17429  }
17430  } else {
17431  switch (PyTuple_GET_SIZE(__pyx_args)) {
17432  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17433  CYTHON_FALLTHROUGH;
17434  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17435  break;
17436  default: goto __pyx_L5_argtuple_error;
17437  }
17438  }
17439  __pyx_v_obj = values[0];
17440  __pyx_v_i = values[1];
17441  }
17442  goto __pyx_L4_argument_unpacking_done;
17443  __pyx_L5_argtuple_error:;
17444  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
17445  __pyx_L3_error:;
17446  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17447  __Pyx_RefNannyFinishContext();
17448  return NULL;
17449  __pyx_L4_argument_unpacking_done:;
17450  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17451 
17452  /* function exit code */
17453  __Pyx_RefNannyFinishContext();
17454  return __pyx_r;
17455  }
17456 
17457  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17458  PyObject *__pyx_r = NULL;
17459  __Pyx_RefNannyDeclarations
17460  PyObject *__pyx_t_1 = NULL;
17461  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17462  __Pyx_RefNannySetupContext("atan", 0);
17463  __Pyx_XDECREF(__pyx_r);
17464  __pyx_t_2.__pyx_n = 1;
17465  __pyx_t_2.i = __pyx_v_i;
17466  __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)
17467  __Pyx_GOTREF(__pyx_t_1);
17468  __pyx_r = __pyx_t_1;
17469  __pyx_t_1 = 0;
17470  goto __pyx_L0;
17471 
17472  /* function exit code */
17473  __pyx_L1_error:;
17474  __Pyx_XDECREF(__pyx_t_1);
17475  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17476  __pyx_r = NULL;
17477  __pyx_L0:;
17478  __Pyx_XGIVEREF(__pyx_r);
17479  __Pyx_RefNannyFinishContext();
17480  return __pyx_r;
17481  }
17482 
17483  /* "PyClical.pyx":1786
17484  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17485  *
17486  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17487  * """
17488  * Hyperbolic tangent of multivector.
17489  */
17490 
17491  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17492  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17493  PyObject *__pyx_r = NULL;
17494  __Pyx_RefNannyDeclarations
17495  PyObject *__pyx_t_1 = NULL;
17496  PyObject *__pyx_t_2 = NULL;
17497  PyObject *__pyx_t_3 = NULL;
17498  PyObject *__pyx_t_4 = NULL;
17499  PyObject *__pyx_t_5 = NULL;
17500  PyObject *__pyx_t_6 = NULL;
17501  PyObject *__pyx_t_7 = NULL;
17502  PyObject *__pyx_t_8 = NULL;
17503  __Pyx_RefNannySetupContext("tanh", 0);
17504 
17505  /* "PyClical.pyx":1793
17506  * {1,2}
17507  * """
17508  * try: # <<<<<<<<<<<<<<
17509  * return math.tanh(obj)
17510  * except:
17511  */
17512  {
17513  __Pyx_PyThreadState_declare
17514  __Pyx_PyThreadState_assign
17515  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17516  __Pyx_XGOTREF(__pyx_t_1);
17517  __Pyx_XGOTREF(__pyx_t_2);
17518  __Pyx_XGOTREF(__pyx_t_3);
17519  /*try:*/ {
17520 
17521  /* "PyClical.pyx":1794
17522  * """
17523  * try:
17524  * return math.tanh(obj) # <<<<<<<<<<<<<<
17525  * except:
17526  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17527  */
17528  __Pyx_XDECREF(__pyx_r);
17529  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
17530  __Pyx_GOTREF(__pyx_t_5);
17531  __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)
17532  __Pyx_GOTREF(__pyx_t_6);
17533  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17534  __pyx_t_5 = NULL;
17535  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17536  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17537  if (likely(__pyx_t_5)) {
17538  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17539  __Pyx_INCREF(__pyx_t_5);
17540  __Pyx_INCREF(function);
17541  __Pyx_DECREF_SET(__pyx_t_6, function);
17542  }
17543  }
17544  if (!__pyx_t_5) {
17545  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17546  __Pyx_GOTREF(__pyx_t_4);
17547  } else {
17548  #if CYTHON_FAST_PYCALL
17549  if (PyFunction_Check(__pyx_t_6)) {
17550  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17551  __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)
17552  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17553  __Pyx_GOTREF(__pyx_t_4);
17554  } else
17555  #endif
17556  #if CYTHON_FAST_PYCCALL
17557  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17558  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17559  __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)
17560  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17561  __Pyx_GOTREF(__pyx_t_4);
17562  } else
17563  #endif
17564  {
17565  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1794, __pyx_L3_error)
17566  __Pyx_GOTREF(__pyx_t_7);
17567  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
17568  __Pyx_INCREF(__pyx_v_obj);
17569  __Pyx_GIVEREF(__pyx_v_obj);
17570  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
17571  __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)
17572  __Pyx_GOTREF(__pyx_t_4);
17573  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17574  }
17575  }
17576  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17577  __pyx_r = __pyx_t_4;
17578  __pyx_t_4 = 0;
17579  goto __pyx_L7_try_return;
17580 
17581  /* "PyClical.pyx":1793
17582  * {1,2}
17583  * """
17584  * try: # <<<<<<<<<<<<<<
17585  * return math.tanh(obj)
17586  * except:
17587  */
17588  }
17589  __pyx_L3_error:;
17590  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17591  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17592  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17593  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17594 
17595  /* "PyClical.pyx":1795
17596  * try:
17597  * return math.tanh(obj)
17598  * except: # <<<<<<<<<<<<<<
17599  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17600  *
17601  */
17602  /*except:*/ {
17603  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17604  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17605  __Pyx_GOTREF(__pyx_t_4);
17606  __Pyx_GOTREF(__pyx_t_6);
17607  __Pyx_GOTREF(__pyx_t_7);
17608 
17609  /* "PyClical.pyx":1796
17610  * return math.tanh(obj)
17611  * except:
17612  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17613  *
17614  * cpdef inline atanh(obj,i = None):
17615  */
17616  __Pyx_XDECREF(__pyx_r);
17617  __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)
17618  __Pyx_GOTREF(__pyx_t_5);
17619  __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)
17620  __Pyx_GOTREF(__pyx_t_8);
17621  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17622  __pyx_r = __pyx_t_8;
17623  __pyx_t_8 = 0;
17624  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17625  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17626  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17627  goto __pyx_L6_except_return;
17628  }
17629  __pyx_L5_except_error:;
17630 
17631  /* "PyClical.pyx":1793
17632  * {1,2}
17633  * """
17634  * try: # <<<<<<<<<<<<<<
17635  * return math.tanh(obj)
17636  * except:
17637  */
17638  __Pyx_XGIVEREF(__pyx_t_1);
17639  __Pyx_XGIVEREF(__pyx_t_2);
17640  __Pyx_XGIVEREF(__pyx_t_3);
17641  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17642  goto __pyx_L1_error;
17643  __pyx_L7_try_return:;
17644  __Pyx_XGIVEREF(__pyx_t_1);
17645  __Pyx_XGIVEREF(__pyx_t_2);
17646  __Pyx_XGIVEREF(__pyx_t_3);
17647  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17648  goto __pyx_L0;
17649  __pyx_L6_except_return:;
17650  __Pyx_XGIVEREF(__pyx_t_1);
17651  __Pyx_XGIVEREF(__pyx_t_2);
17652  __Pyx_XGIVEREF(__pyx_t_3);
17653  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17654  goto __pyx_L0;
17655  }
17656 
17657  /* "PyClical.pyx":1786
17658  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17659  *
17660  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17661  * """
17662  * Hyperbolic tangent of multivector.
17663  */
17664 
17665  /* function exit code */
17666  __pyx_L1_error:;
17667  __Pyx_XDECREF(__pyx_t_4);
17668  __Pyx_XDECREF(__pyx_t_5);
17669  __Pyx_XDECREF(__pyx_t_6);
17670  __Pyx_XDECREF(__pyx_t_7);
17671  __Pyx_XDECREF(__pyx_t_8);
17672  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17673  __pyx_r = 0;
17674  __pyx_L0:;
17675  __Pyx_XGIVEREF(__pyx_r);
17676  __Pyx_RefNannyFinishContext();
17677  return __pyx_r;
17678  }
17679 
17680  /* Python wrapper */
17681  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17682  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 ";
17683  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17684  PyObject *__pyx_r = 0;
17685  __Pyx_RefNannyDeclarations
17686  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17687  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17688 
17689  /* function exit code */
17690  __Pyx_RefNannyFinishContext();
17691  return __pyx_r;
17692  }
17693 
17694  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17695  PyObject *__pyx_r = NULL;
17696  __Pyx_RefNannyDeclarations
17697  PyObject *__pyx_t_1 = NULL;
17698  __Pyx_RefNannySetupContext("tanh", 0);
17699  __Pyx_XDECREF(__pyx_r);
17700  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17701  __Pyx_GOTREF(__pyx_t_1);
17702  __pyx_r = __pyx_t_1;
17703  __pyx_t_1 = 0;
17704  goto __pyx_L0;
17705 
17706  /* function exit code */
17707  __pyx_L1_error:;
17708  __Pyx_XDECREF(__pyx_t_1);
17709  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17710  __pyx_r = NULL;
17711  __pyx_L0:;
17712  __Pyx_XGIVEREF(__pyx_r);
17713  __Pyx_RefNannyFinishContext();
17714  return __pyx_r;
17715  }
17716 
17717  /* "PyClical.pyx":1798
17718  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17719  *
17720  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17721  * """
17722  * Inverse hyperbolic tangent of multivector with optional complexifier.
17723  */
17724 
17725  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17726  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) {
17727  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17728  PyObject *__pyx_r = NULL;
17729  __Pyx_RefNannyDeclarations
17730  int __pyx_t_1;
17731  int __pyx_t_2;
17732  PyObject *__pyx_t_3 = NULL;
17733  Clifford __pyx_t_4;
17734  PyObject *__pyx_t_5 = NULL;
17735  PyObject *__pyx_t_6 = NULL;
17736  PyObject *__pyx_t_7 = NULL;
17737  PyObject *__pyx_t_8 = NULL;
17738  PyObject *__pyx_t_9 = NULL;
17739  PyObject *__pyx_t_10 = NULL;
17740  PyObject *__pyx_t_11 = NULL;
17741  __Pyx_RefNannySetupContext("atanh", 0);
17742  if (__pyx_optional_args) {
17743  if (__pyx_optional_args->__pyx_n > 0) {
17744  __pyx_v_i = __pyx_optional_args->i;
17745  }
17746  }
17747 
17748  /* "PyClical.pyx":1807
17749  * {1,2}
17750  * """
17751  * if not (i is None): # <<<<<<<<<<<<<<
17752  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17753  * else:
17754  */
17755  __pyx_t_1 = (__pyx_v_i != Py_None);
17756  __pyx_t_2 = (__pyx_t_1 != 0);
17757  if (__pyx_t_2) {
17758 
17759  /* "PyClical.pyx":1808
17760  * """
17761  * if not (i is None):
17762  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17763  * else:
17764  * try:
17765  */
17766  __Pyx_XDECREF(__pyx_r);
17767  __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)
17768  __Pyx_GOTREF(__pyx_t_3);
17769  try {
17770  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17771  } catch(...) {
17772  __Pyx_CppExn2PyErr();
17773  __PYX_ERR(0, 1808, __pyx_L1_error)
17774  }
17775  __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)
17776  __Pyx_GOTREF(__pyx_t_5);
17777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17778  __pyx_r = __pyx_t_5;
17779  __pyx_t_5 = 0;
17780  goto __pyx_L0;
17781 
17782  /* "PyClical.pyx":1807
17783  * {1,2}
17784  * """
17785  * if not (i is None): # <<<<<<<<<<<<<<
17786  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17787  * else:
17788  */
17789  }
17790 
17791  /* "PyClical.pyx":1810
17792  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17793  * else:
17794  * try: # <<<<<<<<<<<<<<
17795  * return math.atanh(obj)
17796  * except:
17797  */
17798  /*else*/ {
17799  {
17800  __Pyx_PyThreadState_declare
17801  __Pyx_PyThreadState_assign
17802  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17803  __Pyx_XGOTREF(__pyx_t_6);
17804  __Pyx_XGOTREF(__pyx_t_7);
17805  __Pyx_XGOTREF(__pyx_t_8);
17806  /*try:*/ {
17807 
17808  /* "PyClical.pyx":1811
17809  * else:
17810  * try:
17811  * return math.atanh(obj) # <<<<<<<<<<<<<<
17812  * except:
17813  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17814  */
17815  __Pyx_XDECREF(__pyx_r);
17816  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17817  __Pyx_GOTREF(__pyx_t_3);
17818  __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)
17819  __Pyx_GOTREF(__pyx_t_9);
17820  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17821  __pyx_t_3 = NULL;
17822  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17823  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17824  if (likely(__pyx_t_3)) {
17825  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17826  __Pyx_INCREF(__pyx_t_3);
17827  __Pyx_INCREF(function);
17828  __Pyx_DECREF_SET(__pyx_t_9, function);
17829  }
17830  }
17831  if (!__pyx_t_3) {
17832  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17833  __Pyx_GOTREF(__pyx_t_5);
17834  } else {
17835  #if CYTHON_FAST_PYCALL
17836  if (PyFunction_Check(__pyx_t_9)) {
17837  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17838  __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)
17839  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17840  __Pyx_GOTREF(__pyx_t_5);
17841  } else
17842  #endif
17843  #if CYTHON_FAST_PYCCALL
17844  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17845  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17846  __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)
17847  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17848  __Pyx_GOTREF(__pyx_t_5);
17849  } else
17850  #endif
17851  {
17852  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1811, __pyx_L4_error)
17853  __Pyx_GOTREF(__pyx_t_10);
17854  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17855  __Pyx_INCREF(__pyx_v_obj);
17856  __Pyx_GIVEREF(__pyx_v_obj);
17857  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17858  __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)
17859  __Pyx_GOTREF(__pyx_t_5);
17860  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17861  }
17862  }
17863  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17864  __pyx_r = __pyx_t_5;
17865  __pyx_t_5 = 0;
17866  goto __pyx_L8_try_return;
17867 
17868  /* "PyClical.pyx":1810
17869  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17870  * else:
17871  * try: # <<<<<<<<<<<<<<
17872  * return math.atanh(obj)
17873  * except:
17874  */
17875  }
17876  __pyx_L4_error:;
17877  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17878  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17879  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17880  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17881 
17882  /* "PyClical.pyx":1812
17883  * try:
17884  * return math.atanh(obj)
17885  * except: # <<<<<<<<<<<<<<
17886  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17887  *
17888  */
17889  /*except:*/ {
17890  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17891  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17892  __Pyx_GOTREF(__pyx_t_5);
17893  __Pyx_GOTREF(__pyx_t_9);
17894  __Pyx_GOTREF(__pyx_t_10);
17895 
17896  /* "PyClical.pyx":1813
17897  * return math.atanh(obj)
17898  * except:
17899  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17900  *
17901  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17902  */
17903  __Pyx_XDECREF(__pyx_r);
17904  __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)
17905  __Pyx_GOTREF(__pyx_t_3);
17906  __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)
17907  __Pyx_GOTREF(__pyx_t_11);
17908  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17909  __pyx_r = __pyx_t_11;
17910  __pyx_t_11 = 0;
17911  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17912  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17913  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17914  goto __pyx_L7_except_return;
17915  }
17916  __pyx_L6_except_error:;
17917 
17918  /* "PyClical.pyx":1810
17919  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17920  * else:
17921  * try: # <<<<<<<<<<<<<<
17922  * return math.atanh(obj)
17923  * except:
17924  */
17925  __Pyx_XGIVEREF(__pyx_t_6);
17926  __Pyx_XGIVEREF(__pyx_t_7);
17927  __Pyx_XGIVEREF(__pyx_t_8);
17928  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17929  goto __pyx_L1_error;
17930  __pyx_L8_try_return:;
17931  __Pyx_XGIVEREF(__pyx_t_6);
17932  __Pyx_XGIVEREF(__pyx_t_7);
17933  __Pyx_XGIVEREF(__pyx_t_8);
17934  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17935  goto __pyx_L0;
17936  __pyx_L7_except_return:;
17937  __Pyx_XGIVEREF(__pyx_t_6);
17938  __Pyx_XGIVEREF(__pyx_t_7);
17939  __Pyx_XGIVEREF(__pyx_t_8);
17940  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17941  goto __pyx_L0;
17942  }
17943  }
17944 
17945  /* "PyClical.pyx":1798
17946  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17947  *
17948  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17949  * """
17950  * Inverse hyperbolic tangent of multivector with optional complexifier.
17951  */
17952 
17953  /* function exit code */
17954  __pyx_L1_error:;
17955  __Pyx_XDECREF(__pyx_t_3);
17956  __Pyx_XDECREF(__pyx_t_5);
17957  __Pyx_XDECREF(__pyx_t_9);
17958  __Pyx_XDECREF(__pyx_t_10);
17959  __Pyx_XDECREF(__pyx_t_11);
17960  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17961  __pyx_r = 0;
17962  __pyx_L0:;
17963  __Pyx_XGIVEREF(__pyx_r);
17964  __Pyx_RefNannyFinishContext();
17965  return __pyx_r;
17966  }
17967 
17968  /* Python wrapper */
17969  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17970  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 ";
17971  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17972  PyObject *__pyx_v_obj = 0;
17973  PyObject *__pyx_v_i = 0;
17974  PyObject *__pyx_r = 0;
17975  __Pyx_RefNannyDeclarations
17976  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17977  {
17978  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17979  PyObject* values[2] = {0,0};
17980  values[1] = ((PyObject *)Py_None);
17981  if (unlikely(__pyx_kwds)) {
17982  Py_ssize_t kw_args;
17983  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17984  switch (pos_args) {
17985  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17986  CYTHON_FALLTHROUGH;
17987  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17988  CYTHON_FALLTHROUGH;
17989  case 0: break;
17990  default: goto __pyx_L5_argtuple_error;
17991  }
17992  kw_args = PyDict_Size(__pyx_kwds);
17993  switch (pos_args) {
17994  case 0:
17995  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17996  else goto __pyx_L5_argtuple_error;
17997  CYTHON_FALLTHROUGH;
17998  case 1:
17999  if (kw_args > 0) {
18000  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i);
18001  if (value) { values[1] = value; kw_args--; }
18002  }
18003  }
18004  if (unlikely(kw_args > 0)) {
18005  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
18006  }
18007  } else {
18008  switch (PyTuple_GET_SIZE(__pyx_args)) {
18009  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18010  CYTHON_FALLTHROUGH;
18011  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18012  break;
18013  default: goto __pyx_L5_argtuple_error;
18014  }
18015  }
18016  __pyx_v_obj = values[0];
18017  __pyx_v_i = values[1];
18018  }
18019  goto __pyx_L4_argument_unpacking_done;
18020  __pyx_L5_argtuple_error:;
18021  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
18022  __pyx_L3_error:;
18023  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18024  __Pyx_RefNannyFinishContext();
18025  return NULL;
18026  __pyx_L4_argument_unpacking_done:;
18027  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
18028 
18029  /* function exit code */
18030  __Pyx_RefNannyFinishContext();
18031  return __pyx_r;
18032  }
18033 
18034  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
18035  PyObject *__pyx_r = NULL;
18036  __Pyx_RefNannyDeclarations
18037  PyObject *__pyx_t_1 = NULL;
18038  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
18039  __Pyx_RefNannySetupContext("atanh", 0);
18040  __Pyx_XDECREF(__pyx_r);
18041  __pyx_t_2.__pyx_n = 1;
18042  __pyx_t_2.i = __pyx_v_i;
18043  __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)
18044  __Pyx_GOTREF(__pyx_t_1);
18045  __pyx_r = __pyx_t_1;
18046  __pyx_t_1 = 0;
18047  goto __pyx_L0;
18048 
18049  /* function exit code */
18050  __pyx_L1_error:;
18051  __Pyx_XDECREF(__pyx_t_1);
18052  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18053  __pyx_r = NULL;
18054  __pyx_L0:;
18055  __Pyx_XGIVEREF(__pyx_r);
18056  __Pyx_RefNannyFinishContext();
18057  return __pyx_r;
18058  }
18059 
18060  /* "PyClical.pyx":1815
18061  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18062  *
18063  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18064  * """
18065  * Random multivector within a frame.
18066  */
18067 
18068  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18069  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) {
18070  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
18071  PyObject *__pyx_r = NULL;
18072  __Pyx_RefNannyDeclarations
18073  PyObject *__pyx_t_1 = NULL;
18074  PyObject *__pyx_t_2 = NULL;
18075  scalar_t __pyx_t_3;
18076  PyObject *__pyx_t_4 = NULL;
18077  __Pyx_RefNannySetupContext("random_clifford", 0);
18078  if (__pyx_optional_args) {
18079  if (__pyx_optional_args->__pyx_n > 0) {
18080  __pyx_v_fill = __pyx_optional_args->fill;
18081  }
18082  }
18083 
18084  /* "PyClical.pyx":1822
18085  * {-3,-1,2}
18086  * """
18087  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
18088  *
18089  * cpdef inline cga3(obj):
18090  */
18091  __Pyx_XDECREF(__pyx_r);
18092  __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)
18093  __Pyx_GOTREF(__pyx_t_1);
18094  __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)
18095  __Pyx_GOTREF(__pyx_t_2);
18096  __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)
18097  __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)
18098  __Pyx_GOTREF(__pyx_t_4);
18099  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18100  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18101  __pyx_r = __pyx_t_4;
18102  __pyx_t_4 = 0;
18103  goto __pyx_L0;
18104 
18105  /* "PyClical.pyx":1815
18106  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
18107  *
18108  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
18109  * """
18110  * Random multivector within a frame.
18111  */
18112 
18113  /* function exit code */
18114  __pyx_L1_error:;
18115  __Pyx_XDECREF(__pyx_t_1);
18116  __Pyx_XDECREF(__pyx_t_2);
18117  __Pyx_XDECREF(__pyx_t_4);
18118  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18119  __pyx_r = 0;
18120  __pyx_L0:;
18121  __Pyx_XGIVEREF(__pyx_r);
18122  __Pyx_RefNannyFinishContext();
18123  return __pyx_r;
18124  }
18125 
18126  /* Python wrapper */
18127  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18128  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 ";
18129  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18130  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
18131  PyObject *__pyx_v_fill = 0;
18132  PyObject *__pyx_r = 0;
18133  __Pyx_RefNannyDeclarations
18134  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
18135  {
18136  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
18137  PyObject* values[2] = {0,0};
18138  values[1] = ((PyObject *)__pyx_float_1_0);
18139  if (unlikely(__pyx_kwds)) {
18140  Py_ssize_t kw_args;
18141  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18142  switch (pos_args) {
18143  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18144  CYTHON_FALLTHROUGH;
18145  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18146  CYTHON_FALLTHROUGH;
18147  case 0: break;
18148  default: goto __pyx_L5_argtuple_error;
18149  }
18150  kw_args = PyDict_Size(__pyx_kwds);
18151  switch (pos_args) {
18152  case 0:
18153  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
18154  else goto __pyx_L5_argtuple_error;
18155  CYTHON_FALLTHROUGH;
18156  case 1:
18157  if (kw_args > 0) {
18158  PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fill);
18159  if (value) { values[1] = value; kw_args--; }
18160  }
18161  }
18162  if (unlikely(kw_args > 0)) {
18163  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
18164  }
18165  } else {
18166  switch (PyTuple_GET_SIZE(__pyx_args)) {
18167  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18168  CYTHON_FALLTHROUGH;
18169  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18170  break;
18171  default: goto __pyx_L5_argtuple_error;
18172  }
18173  }
18174  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
18175  __pyx_v_fill = values[1];
18176  }
18177  goto __pyx_L4_argument_unpacking_done;
18178  __pyx_L5_argtuple_error:;
18179  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
18180  __pyx_L3_error:;
18181  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18182  __Pyx_RefNannyFinishContext();
18183  return NULL;
18184  __pyx_L4_argument_unpacking_done:;
18185  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
18186  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
18187 
18188  /* function exit code */
18189  goto __pyx_L0;
18190  __pyx_L1_error:;
18191  __pyx_r = NULL;
18192  __pyx_L0:;
18193  __Pyx_RefNannyFinishContext();
18194  return __pyx_r;
18195  }
18196 
18197  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) {
18198  PyObject *__pyx_r = NULL;
18199  __Pyx_RefNannyDeclarations
18200  PyObject *__pyx_t_1 = NULL;
18201  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
18202  __Pyx_RefNannySetupContext("random_clifford", 0);
18203  __Pyx_XDECREF(__pyx_r);
18204  __pyx_t_2.__pyx_n = 1;
18205  __pyx_t_2.fill = __pyx_v_fill;
18206  __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)
18207  __Pyx_GOTREF(__pyx_t_1);
18208  __pyx_r = __pyx_t_1;
18209  __pyx_t_1 = 0;
18210  goto __pyx_L0;
18211 
18212  /* function exit code */
18213  __pyx_L1_error:;
18214  __Pyx_XDECREF(__pyx_t_1);
18215  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
18216  __pyx_r = NULL;
18217  __pyx_L0:;
18218  __Pyx_XGIVEREF(__pyx_r);
18219  __Pyx_RefNannyFinishContext();
18220  return __pyx_r;
18221  }
18222 
18223  /* "PyClical.pyx":1824
18224  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18225  *
18226  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18227  * """
18228  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18229  */
18230 
18231  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18232  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18233  PyObject *__pyx_r = NULL;
18234  __Pyx_RefNannyDeclarations
18235  PyObject *__pyx_t_1 = NULL;
18236  PyObject *__pyx_t_2 = NULL;
18237  __Pyx_RefNannySetupContext("cga3", 0);
18238 
18239  /* "PyClical.pyx":1831
18240  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18241  * """
18242  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18243  *
18244  * cpdef inline cga3std(obj):
18245  */
18246  __Pyx_XDECREF(__pyx_r);
18247  __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)
18248  __Pyx_GOTREF(__pyx_t_1);
18249  __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)
18250  __Pyx_GOTREF(__pyx_t_2);
18251  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18252  __pyx_r = __pyx_t_2;
18253  __pyx_t_2 = 0;
18254  goto __pyx_L0;
18255 
18256  /* "PyClical.pyx":1824
18257  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18258  *
18259  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18260  * """
18261  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18262  */
18263 
18264  /* function exit code */
18265  __pyx_L1_error:;
18266  __Pyx_XDECREF(__pyx_t_1);
18267  __Pyx_XDECREF(__pyx_t_2);
18268  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18269  __pyx_r = 0;
18270  __pyx_L0:;
18271  __Pyx_XGIVEREF(__pyx_r);
18272  __Pyx_RefNannyFinishContext();
18273  return __pyx_r;
18274  }
18275 
18276  /* Python wrapper */
18277  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18278  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 ";
18279  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18280  PyObject *__pyx_r = 0;
18281  __Pyx_RefNannyDeclarations
18282  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18283  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18284 
18285  /* function exit code */
18286  __Pyx_RefNannyFinishContext();
18287  return __pyx_r;
18288  }
18289 
18290  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18291  PyObject *__pyx_r = NULL;
18292  __Pyx_RefNannyDeclarations
18293  PyObject *__pyx_t_1 = NULL;
18294  __Pyx_RefNannySetupContext("cga3", 0);
18295  __Pyx_XDECREF(__pyx_r);
18296  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
18297  __Pyx_GOTREF(__pyx_t_1);
18298  __pyx_r = __pyx_t_1;
18299  __pyx_t_1 = 0;
18300  goto __pyx_L0;
18301 
18302  /* function exit code */
18303  __pyx_L1_error:;
18304  __Pyx_XDECREF(__pyx_t_1);
18305  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18306  __pyx_r = NULL;
18307  __pyx_L0:;
18308  __Pyx_XGIVEREF(__pyx_r);
18309  __Pyx_RefNannyFinishContext();
18310  return __pyx_r;
18311  }
18312 
18313  /* "PyClical.pyx":1833
18314  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18315  *
18316  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18317  * """
18318  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18319  */
18320 
18321  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18322  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18323  PyObject *__pyx_r = NULL;
18324  __Pyx_RefNannyDeclarations
18325  PyObject *__pyx_t_1 = NULL;
18326  PyObject *__pyx_t_2 = NULL;
18327  __Pyx_RefNannySetupContext("cga3std", 0);
18328 
18329  /* "PyClical.pyx":1842
18330  * 0
18331  * """
18332  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18333  *
18334  * cpdef inline agc3(obj):
18335  */
18336  __Pyx_XDECREF(__pyx_r);
18337  __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)
18338  __Pyx_GOTREF(__pyx_t_1);
18339  __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)
18340  __Pyx_GOTREF(__pyx_t_2);
18341  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18342  __pyx_r = __pyx_t_2;
18343  __pyx_t_2 = 0;
18344  goto __pyx_L0;
18345 
18346  /* "PyClical.pyx":1833
18347  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18348  *
18349  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18350  * """
18351  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18352  */
18353 
18354  /* function exit code */
18355  __pyx_L1_error:;
18356  __Pyx_XDECREF(__pyx_t_1);
18357  __Pyx_XDECREF(__pyx_t_2);
18358  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18359  __pyx_r = 0;
18360  __pyx_L0:;
18361  __Pyx_XGIVEREF(__pyx_r);
18362  __Pyx_RefNannyFinishContext();
18363  return __pyx_r;
18364  }
18365 
18366  /* Python wrapper */
18367  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18368  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 ";
18369  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18370  PyObject *__pyx_r = 0;
18371  __Pyx_RefNannyDeclarations
18372  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18373  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18374 
18375  /* function exit code */
18376  __Pyx_RefNannyFinishContext();
18377  return __pyx_r;
18378  }
18379 
18380  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18381  PyObject *__pyx_r = NULL;
18382  __Pyx_RefNannyDeclarations
18383  PyObject *__pyx_t_1 = NULL;
18384  __Pyx_RefNannySetupContext("cga3std", 0);
18385  __Pyx_XDECREF(__pyx_r);
18386  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
18387  __Pyx_GOTREF(__pyx_t_1);
18388  __pyx_r = __pyx_t_1;
18389  __pyx_t_1 = 0;
18390  goto __pyx_L0;
18391 
18392  /* function exit code */
18393  __pyx_L1_error:;
18394  __Pyx_XDECREF(__pyx_t_1);
18395  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18396  __pyx_r = NULL;
18397  __pyx_L0:;
18398  __Pyx_XGIVEREF(__pyx_r);
18399  __Pyx_RefNannyFinishContext();
18400  return __pyx_r;
18401  }
18402 
18403  /* "PyClical.pyx":1844
18404  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18405  *
18406  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18407  * """
18408  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18409  */
18410 
18411  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18412  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18413  PyObject *__pyx_r = NULL;
18414  __Pyx_RefNannyDeclarations
18415  PyObject *__pyx_t_1 = NULL;
18416  PyObject *__pyx_t_2 = NULL;
18417  __Pyx_RefNannySetupContext("agc3", 0);
18418 
18419  /* "PyClical.pyx":1853
18420  * 0
18421  * """
18422  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18423  *
18424  * # Some abbreviations.
18425  */
18426  __Pyx_XDECREF(__pyx_r);
18427  __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)
18428  __Pyx_GOTREF(__pyx_t_1);
18429  __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)
18430  __Pyx_GOTREF(__pyx_t_2);
18431  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18432  __pyx_r = __pyx_t_2;
18433  __pyx_t_2 = 0;
18434  goto __pyx_L0;
18435 
18436  /* "PyClical.pyx":1844
18437  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18438  *
18439  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18440  * """
18441  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18442  */
18443 
18444  /* function exit code */
18445  __pyx_L1_error:;
18446  __Pyx_XDECREF(__pyx_t_1);
18447  __Pyx_XDECREF(__pyx_t_2);
18448  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18449  __pyx_r = 0;
18450  __pyx_L0:;
18451  __Pyx_XGIVEREF(__pyx_r);
18452  __Pyx_RefNannyFinishContext();
18453  return __pyx_r;
18454  }
18455 
18456  /* Python wrapper */
18457  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18458  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 ";
18459  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18460  PyObject *__pyx_r = 0;
18461  __Pyx_RefNannyDeclarations
18462  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18463  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18464 
18465  /* function exit code */
18466  __Pyx_RefNannyFinishContext();
18467  return __pyx_r;
18468  }
18469 
18470  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18471  PyObject *__pyx_r = NULL;
18472  __Pyx_RefNannyDeclarations
18473  PyObject *__pyx_t_1 = NULL;
18474  __Pyx_RefNannySetupContext("agc3", 0);
18475  __Pyx_XDECREF(__pyx_r);
18476  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
18477  __Pyx_GOTREF(__pyx_t_1);
18478  __pyx_r = __pyx_t_1;
18479  __pyx_t_1 = 0;
18480  goto __pyx_L0;
18481 
18482  /* function exit code */
18483  __pyx_L1_error:;
18484  __Pyx_XDECREF(__pyx_t_1);
18485  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18486  __pyx_r = NULL;
18487  __pyx_L0:;
18488  __Pyx_XGIVEREF(__pyx_r);
18489  __Pyx_RefNannyFinishContext();
18490  return __pyx_r;
18491  }
18492 
18493  /* "PyClical.pyx":1887
18494  * """
18495  *
18496  * def e(obj): # <<<<<<<<<<<<<<
18497  * """
18498  * Abbreviation for clifford(index_set(obj)).
18499  */
18500 
18501  /* Python wrapper */
18502  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18503  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 ";
18504  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18505  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18506  PyObject *__pyx_r = 0;
18507  __Pyx_RefNannyDeclarations
18508  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18509  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18510 
18511  /* function exit code */
18512  __Pyx_RefNannyFinishContext();
18513  return __pyx_r;
18514  }
18515 
18516  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18517  PyObject *__pyx_r = NULL;
18518  __Pyx_RefNannyDeclarations
18519  PyObject *__pyx_t_1 = NULL;
18520  PyObject *__pyx_t_2 = NULL;
18521  __Pyx_RefNannySetupContext("e", 0);
18522 
18523  /* "PyClical.pyx":1898
18524  * 1
18525  * """
18526  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18527  *
18528  * def istpq(p, q):
18529  */
18530  __Pyx_XDECREF(__pyx_r);
18531  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18532  __Pyx_GOTREF(__pyx_t_1);
18533  __Pyx_INCREF(__pyx_v_obj);
18534  __Pyx_GIVEREF(__pyx_v_obj);
18535  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_obj);
18536  __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)
18537  __Pyx_GOTREF(__pyx_t_2);
18538  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18539  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18540  __Pyx_GOTREF(__pyx_t_1);
18541  __Pyx_GIVEREF(__pyx_t_2);
18542  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
18543  __pyx_t_2 = 0;
18544  __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)
18545  __Pyx_GOTREF(__pyx_t_2);
18546  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18547  __pyx_r = __pyx_t_2;
18548  __pyx_t_2 = 0;
18549  goto __pyx_L0;
18550 
18551  /* "PyClical.pyx":1887
18552  * """
18553  *
18554  * def e(obj): # <<<<<<<<<<<<<<
18555  * """
18556  * Abbreviation for clifford(index_set(obj)).
18557  */
18558 
18559  /* function exit code */
18560  __pyx_L1_error:;
18561  __Pyx_XDECREF(__pyx_t_1);
18562  __Pyx_XDECREF(__pyx_t_2);
18563  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18564  __pyx_r = NULL;
18565  __pyx_L0:;
18566  __Pyx_XGIVEREF(__pyx_r);
18567  __Pyx_RefNannyFinishContext();
18568  return __pyx_r;
18569  }
18570 
18571  /* "PyClical.pyx":1900
18572  * return clifford(index_set(obj))
18573  *
18574  * def istpq(p, q): # <<<<<<<<<<<<<<
18575  * """
18576  * Abbreviation for index_set({-q,...p}).
18577  */
18578 
18579  /* Python wrapper */
18580  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18581  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 ";
18582  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18583  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18584  PyObject *__pyx_v_p = 0;
18585  PyObject *__pyx_v_q = 0;
18586  PyObject *__pyx_r = 0;
18587  __Pyx_RefNannyDeclarations
18588  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18589  {
18590  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18591  PyObject* values[2] = {0,0};
18592  if (unlikely(__pyx_kwds)) {
18593  Py_ssize_t kw_args;
18594  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18595  switch (pos_args) {
18596  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18597  CYTHON_FALLTHROUGH;
18598  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18599  CYTHON_FALLTHROUGH;
18600  case 0: break;
18601  default: goto __pyx_L5_argtuple_error;
18602  }
18603  kw_args = PyDict_Size(__pyx_kwds);
18604  switch (pos_args) {
18605  case 0:
18606  if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18607  else goto __pyx_L5_argtuple_error;
18608  CYTHON_FALLTHROUGH;
18609  case 1:
18610  if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18611  else {
18612  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
18613  }
18614  }
18615  if (unlikely(kw_args > 0)) {
18616  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
18617  }
18618  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18619  goto __pyx_L5_argtuple_error;
18620  } else {
18621  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18622  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18623  }
18624  __pyx_v_p = values[0];
18625  __pyx_v_q = values[1];
18626  }
18627  goto __pyx_L4_argument_unpacking_done;
18628  __pyx_L5_argtuple_error:;
18629  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
18630  __pyx_L3_error:;
18631  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18632  __Pyx_RefNannyFinishContext();
18633  return NULL;
18634  __pyx_L4_argument_unpacking_done:;
18635  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18636 
18637  /* function exit code */
18638  __Pyx_RefNannyFinishContext();
18639  return __pyx_r;
18640  }
18641 
18642  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18643  PyObject *__pyx_r = NULL;
18644  __Pyx_RefNannyDeclarations
18645  PyObject *__pyx_t_1 = NULL;
18646  PyObject *__pyx_t_2 = NULL;
18647  PyObject *__pyx_t_3 = NULL;
18648  __Pyx_RefNannySetupContext("istpq", 0);
18649 
18650  /* "PyClical.pyx":1907
18651  * {-3,-2,-1,1,2}
18652  * """
18653  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18654  *
18655  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18656  */
18657  __Pyx_XDECREF(__pyx_r);
18658  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
18659  __Pyx_GOTREF(__pyx_t_1);
18660  __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)
18661  __Pyx_GOTREF(__pyx_t_2);
18662  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18663  __Pyx_GOTREF(__pyx_t_3);
18664  __Pyx_GIVEREF(__pyx_t_1);
18665  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18666  __Pyx_GIVEREF(__pyx_t_2);
18667  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18668  __pyx_t_1 = 0;
18669  __pyx_t_2 = 0;
18670  __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)
18671  __Pyx_GOTREF(__pyx_t_2);
18672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18673  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18674  __Pyx_GOTREF(__pyx_t_3);
18675  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18676  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18677  __Pyx_GOTREF(__pyx_t_2);
18678  __Pyx_GIVEREF(__pyx_t_3);
18679  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
18680  __pyx_t_3 = 0;
18681  __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)
18682  __Pyx_GOTREF(__pyx_t_3);
18683  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18684  __pyx_r = __pyx_t_3;
18685  __pyx_t_3 = 0;
18686  goto __pyx_L0;
18687 
18688  /* "PyClical.pyx":1900
18689  * return clifford(index_set(obj))
18690  *
18691  * def istpq(p, q): # <<<<<<<<<<<<<<
18692  * """
18693  * Abbreviation for index_set({-q,...p}).
18694  */
18695 
18696  /* function exit code */
18697  __pyx_L1_error:;
18698  __Pyx_XDECREF(__pyx_t_1);
18699  __Pyx_XDECREF(__pyx_t_2);
18700  __Pyx_XDECREF(__pyx_t_3);
18701  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18702  __pyx_r = NULL;
18703  __pyx_L0:;
18704  __Pyx_XGIVEREF(__pyx_r);
18705  __Pyx_RefNannyFinishContext();
18706  return __pyx_r;
18707  }
18708 
18709  /* "PyClical.pyx":1913
18710  *
18711  * # Doctest interface.
18712  * def _test(): # <<<<<<<<<<<<<<
18713  * import PyClical, doctest
18714  * return doctest.testmod(PyClical)
18715  */
18716 
18717  /* Python wrapper */
18718  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18719  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18720  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18721  PyObject *__pyx_r = 0;
18722  __Pyx_RefNannyDeclarations
18723  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18724  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18725 
18726  /* function exit code */
18727  __Pyx_RefNannyFinishContext();
18728  return __pyx_r;
18729  }
18730 
18731  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18732  PyObject *__pyx_v_PyClical = NULL;
18733  PyObject *__pyx_v_doctest = NULL;
18734  PyObject *__pyx_r = NULL;
18735  __Pyx_RefNannyDeclarations
18736  PyObject *__pyx_t_1 = NULL;
18737  PyObject *__pyx_t_2 = NULL;
18738  PyObject *__pyx_t_3 = NULL;
18739  PyObject *__pyx_t_4 = NULL;
18740  __Pyx_RefNannySetupContext("_test", 0);
18741 
18742  /* "PyClical.pyx":1914
18743  * # Doctest interface.
18744  * def _test():
18745  * import PyClical, doctest # <<<<<<<<<<<<<<
18746  * return doctest.testmod(PyClical)
18747  *
18748  */
18749  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18750  __Pyx_GOTREF(__pyx_t_1);
18751  __pyx_v_PyClical = __pyx_t_1;
18752  __pyx_t_1 = 0;
18753  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18754  __Pyx_GOTREF(__pyx_t_1);
18755  __pyx_v_doctest = __pyx_t_1;
18756  __pyx_t_1 = 0;
18757 
18758  /* "PyClical.pyx":1915
18759  * def _test():
18760  * import PyClical, doctest
18761  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18762  *
18763  * if __name__ == "__main__":
18764  */
18765  __Pyx_XDECREF(__pyx_r);
18766  __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)
18767  __Pyx_GOTREF(__pyx_t_2);
18768  __pyx_t_3 = NULL;
18769  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18770  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18771  if (likely(__pyx_t_3)) {
18772  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18773  __Pyx_INCREF(__pyx_t_3);
18774  __Pyx_INCREF(function);
18775  __Pyx_DECREF_SET(__pyx_t_2, function);
18776  }
18777  }
18778  if (!__pyx_t_3) {
18779  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18780  __Pyx_GOTREF(__pyx_t_1);
18781  } else {
18782  #if CYTHON_FAST_PYCALL
18783  if (PyFunction_Check(__pyx_t_2)) {
18784  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18785  __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)
18786  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18787  __Pyx_GOTREF(__pyx_t_1);
18788  } else
18789  #endif
18790  #if CYTHON_FAST_PYCCALL
18791  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18792  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18793  __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)
18794  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18795  __Pyx_GOTREF(__pyx_t_1);
18796  } else
18797  #endif
18798  {
18799  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
18800  __Pyx_GOTREF(__pyx_t_4);
18801  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18802  __Pyx_INCREF(__pyx_v_PyClical);
18803  __Pyx_GIVEREF(__pyx_v_PyClical);
18804  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18805  __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)
18806  __Pyx_GOTREF(__pyx_t_1);
18807  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18808  }
18809  }
18810  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18811  __pyx_r = __pyx_t_1;
18812  __pyx_t_1 = 0;
18813  goto __pyx_L0;
18814 
18815  /* "PyClical.pyx":1913
18816  *
18817  * # Doctest interface.
18818  * def _test(): # <<<<<<<<<<<<<<
18819  * import PyClical, doctest
18820  * return doctest.testmod(PyClical)
18821  */
18822 
18823  /* function exit code */
18824  __pyx_L1_error:;
18825  __Pyx_XDECREF(__pyx_t_1);
18826  __Pyx_XDECREF(__pyx_t_2);
18827  __Pyx_XDECREF(__pyx_t_3);
18828  __Pyx_XDECREF(__pyx_t_4);
18829  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18830  __pyx_r = NULL;
18831  __pyx_L0:;
18832  __Pyx_XDECREF(__pyx_v_PyClical);
18833  __Pyx_XDECREF(__pyx_v_doctest);
18834  __Pyx_XGIVEREF(__pyx_r);
18835  __Pyx_RefNannyFinishContext();
18836  return __pyx_r;
18837  }
18838  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18839 
18840  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18841  struct __pyx_obj_8PyClical_index_set *p;
18842  PyObject *o;
18843  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18844  o = (*t->tp_alloc)(t, 0);
18845  } else {
18846  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18847  }
18848  if (unlikely(!o)) return 0;
18849  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18850  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18851  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18852  return o;
18853  bad:
18854  Py_DECREF(o); o = 0;
18855  return NULL;
18856  }
18857 
18858  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18859  #if CYTHON_USE_TP_FINALIZE
18860  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))) {
18861  if (PyObject_CallFinalizerFromDealloc(o)) return;
18862  }
18863  #endif
18864  {
18865  PyObject *etype, *eval, *etb;
18866  PyErr_Fetch(&etype, &eval, &etb);
18867  ++Py_REFCNT(o);
18868  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18869  --Py_REFCNT(o);
18870  PyErr_Restore(etype, eval, etb);
18871  }
18872  (*Py_TYPE(o)->tp_free)(o);
18873  }
18874  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18875  PyObject *r;
18876  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18877  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18878  Py_DECREF(x);
18879  return r;
18880  }
18881 
18882  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18883  if (v) {
18884  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18885  }
18886  else {
18887  PyErr_Format(PyExc_NotImplementedError,
18888  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18889  return -1;
18890  }
18891  }
18892 
18893  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18894  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18895  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18896  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18897  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18898  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18899  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18900  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18901  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18902  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18903  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18904  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18905  {0, 0, 0, 0}
18906  };
18907 
18908  static PyNumberMethods __pyx_tp_as_number_index_set = {
18909  0, /*nb_add*/
18910  0, /*nb_subtract*/
18911  0, /*nb_multiply*/
18912  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18913  0, /*nb_divide*/
18914  #endif
18915  0, /*nb_remainder*/
18916  0, /*nb_divmod*/
18917  0, /*nb_power*/
18918  0, /*nb_negative*/
18919  0, /*nb_positive*/
18920  0, /*nb_absolute*/
18921  0, /*nb_nonzero*/
18922  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18923  0, /*nb_lshift*/
18924  0, /*nb_rshift*/
18925  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18926  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18927  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18928  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18929  0, /*nb_coerce*/
18930  #endif
18931  0, /*nb_int*/
18932  #if PY_MAJOR_VERSION < 3
18933  0, /*nb_long*/
18934  #else
18935  0, /*reserved*/
18936  #endif
18937  0, /*nb_float*/
18938  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18939  0, /*nb_oct*/
18940  #endif
18941  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18942  0, /*nb_hex*/
18943  #endif
18944  0, /*nb_inplace_add*/
18945  0, /*nb_inplace_subtract*/
18946  0, /*nb_inplace_multiply*/
18947  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18948  0, /*nb_inplace_divide*/
18949  #endif
18950  0, /*nb_inplace_remainder*/
18951  0, /*nb_inplace_power*/
18952  0, /*nb_inplace_lshift*/
18953  0, /*nb_inplace_rshift*/
18954  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18955  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18956  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18957  0, /*nb_floor_divide*/
18958  0, /*nb_true_divide*/
18959  0, /*nb_inplace_floor_divide*/
18960  0, /*nb_inplace_true_divide*/
18961  0, /*nb_index*/
18962  #if PY_VERSION_HEX >= 0x03050000
18963  0, /*nb_matrix_multiply*/
18964  #endif
18965  #if PY_VERSION_HEX >= 0x03050000
18966  0, /*nb_inplace_matrix_multiply*/
18967  #endif
18968  };
18969 
18970  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18971  0, /*sq_length*/
18972  0, /*sq_concat*/
18973  0, /*sq_repeat*/
18974  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18975  0, /*sq_slice*/
18976  0, /*sq_ass_item*/
18977  0, /*sq_ass_slice*/
18978  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18979  0, /*sq_inplace_concat*/
18980  0, /*sq_inplace_repeat*/
18981  };
18982 
18983  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18984  0, /*mp_length*/
18985  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18986  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18987  };
18988 
18989  static PyTypeObject __pyx_type_8PyClical_index_set = {
18990  PyVarObject_HEAD_INIT(0, 0)
18991  "PyClical.index_set", /*tp_name*/
18992  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18993  0, /*tp_itemsize*/
18994  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18995  0, /*tp_print*/
18996  0, /*tp_getattr*/
18997  0, /*tp_setattr*/
18998  #if PY_MAJOR_VERSION < 3
18999  0, /*tp_compare*/
19000  #endif
19001  #if PY_MAJOR_VERSION >= 3
19002  0, /*tp_as_async*/
19003  #endif
19004  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
19005  &__pyx_tp_as_number_index_set, /*tp_as_number*/
19006  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
19007  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
19008  0, /*tp_hash*/
19009  0, /*tp_call*/
19010  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
19011  0, /*tp_getattro*/
19012  0, /*tp_setattro*/
19013  0, /*tp_as_buffer*/
19014  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19015  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
19016  0, /*tp_traverse*/
19017  0, /*tp_clear*/
19018  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
19019  0, /*tp_weaklistoffset*/
19020  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
19021  0, /*tp_iternext*/
19022  __pyx_methods_8PyClical_index_set, /*tp_methods*/
19023  0, /*tp_members*/
19024  0, /*tp_getset*/
19025  0, /*tp_base*/
19026  0, /*tp_dict*/
19027  0, /*tp_descr_get*/
19028  0, /*tp_descr_set*/
19029  0, /*tp_dictoffset*/
19030  0, /*tp_init*/
19031  0, /*tp_alloc*/
19032  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
19033  0, /*tp_free*/
19034  0, /*tp_is_gc*/
19035  0, /*tp_bases*/
19036  0, /*tp_mro*/
19037  0, /*tp_cache*/
19038  0, /*tp_subclasses*/
19039  0, /*tp_weaklist*/
19040  0, /*tp_del*/
19041  0, /*tp_version_tag*/
19042  #if PY_VERSION_HEX >= 0x030400a1
19043  0, /*tp_finalize*/
19044  #endif
19045  };
19046  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
19047 
19048  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
19049  struct __pyx_obj_8PyClical_clifford *p;
19050  PyObject *o;
19051  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
19052  o = (*t->tp_alloc)(t, 0);
19053  } else {
19054  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
19055  }
19056  if (unlikely(!o)) return 0;
19057  p = ((struct __pyx_obj_8PyClical_clifford *)o);
19058  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
19059  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
19060  return o;
19061  bad:
19062  Py_DECREF(o); o = 0;
19063  return NULL;
19064  }
19065 
19066  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
19067  #if CYTHON_USE_TP_FINALIZE
19068  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))) {
19069  if (PyObject_CallFinalizerFromDealloc(o)) return;
19070  }
19071  #endif
19072  {
19073  PyObject *etype, *eval, *etb;
19074  PyErr_Fetch(&etype, &eval, &etb);
19075  ++Py_REFCNT(o);
19076  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
19077  --Py_REFCNT(o);
19078  PyErr_Restore(etype, eval, etb);
19079  }
19080  (*Py_TYPE(o)->tp_free)(o);
19081  }
19082  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
19083  PyObject *r;
19084  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
19085  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
19086  Py_DECREF(x);
19087  return r;
19088  }
19089 
19090  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
19091  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
19092  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
19093  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
19094  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
19095  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
19096  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
19097  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
19098  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
19099  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
19100  {"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
19101  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
19102  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
19103  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
19104  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
19105  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
19106  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
19107  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
19108  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
19109  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
19110  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
19111  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
19112  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
19113  {0, 0, 0, 0}
19114  };
19115 
19116  static PyNumberMethods __pyx_tp_as_number_clifford = {
19117  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
19118  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
19119  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
19120  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19121  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
19122  #endif
19123  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
19124  0, /*nb_divmod*/
19125  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
19126  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
19127  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
19128  0, /*nb_absolute*/
19129  0, /*nb_nonzero*/
19130  0, /*nb_invert*/
19131  0, /*nb_lshift*/
19132  0, /*nb_rshift*/
19133  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
19134  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
19135  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
19136  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19137  0, /*nb_coerce*/
19138  #endif
19139  0, /*nb_int*/
19140  #if PY_MAJOR_VERSION < 3
19141  0, /*nb_long*/
19142  #else
19143  0, /*reserved*/
19144  #endif
19145  0, /*nb_float*/
19146  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19147  0, /*nb_oct*/
19148  #endif
19149  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19150  0, /*nb_hex*/
19151  #endif
19152  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
19153  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
19154  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
19155  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19156  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
19157  #endif
19158  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
19159  0, /*nb_inplace_power*/
19160  0, /*nb_inplace_lshift*/
19161  0, /*nb_inplace_rshift*/
19162  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
19163  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
19164  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
19165  0, /*nb_floor_divide*/
19166  0, /*nb_true_divide*/
19167  0, /*nb_inplace_floor_divide*/
19168  0, /*nb_inplace_true_divide*/
19169  0, /*nb_index*/
19170  #if PY_VERSION_HEX >= 0x03050000
19171  0, /*nb_matrix_multiply*/
19172  #endif
19173  #if PY_VERSION_HEX >= 0x03050000
19174  0, /*nb_inplace_matrix_multiply*/
19175  #endif
19176  };
19177 
19178  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
19179  0, /*sq_length*/
19180  0, /*sq_concat*/
19181  0, /*sq_repeat*/
19182  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
19183  0, /*sq_slice*/
19184  0, /*sq_ass_item*/
19185  0, /*sq_ass_slice*/
19186  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
19187  0, /*sq_inplace_concat*/
19188  0, /*sq_inplace_repeat*/
19189  };
19190 
19191  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
19192  0, /*mp_length*/
19193  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
19194  0, /*mp_ass_subscript*/
19195  };
19196 
19197  static PyTypeObject __pyx_type_8PyClical_clifford = {
19198  PyVarObject_HEAD_INIT(0, 0)
19199  "PyClical.clifford", /*tp_name*/
19200  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
19201  0, /*tp_itemsize*/
19202  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
19203  0, /*tp_print*/
19204  0, /*tp_getattr*/
19205  0, /*tp_setattr*/
19206  #if PY_MAJOR_VERSION < 3
19207  0, /*tp_compare*/
19208  #endif
19209  #if PY_MAJOR_VERSION >= 3
19210  0, /*tp_as_async*/
19211  #endif
19212  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
19213  &__pyx_tp_as_number_clifford, /*tp_as_number*/
19214  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
19215  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
19216  0, /*tp_hash*/
19217  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
19218  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
19219  0, /*tp_getattro*/
19220  0, /*tp_setattro*/
19221  0, /*tp_as_buffer*/
19222  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
19223  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
19224  0, /*tp_traverse*/
19225  0, /*tp_clear*/
19226  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
19227  0, /*tp_weaklistoffset*/
19228  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
19229  0, /*tp_iternext*/
19230  __pyx_methods_8PyClical_clifford, /*tp_methods*/
19231  0, /*tp_members*/
19232  0, /*tp_getset*/
19233  0, /*tp_base*/
19234  0, /*tp_dict*/
19235  0, /*tp_descr_get*/
19236  0, /*tp_descr_set*/
19237  0, /*tp_dictoffset*/
19238  0, /*tp_init*/
19239  0, /*tp_alloc*/
19240  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19241  0, /*tp_free*/
19242  0, /*tp_is_gc*/
19243  0, /*tp_bases*/
19244  0, /*tp_mro*/
19245  0, /*tp_cache*/
19246  0, /*tp_subclasses*/
19247  0, /*tp_weaklist*/
19248  0, /*tp_del*/
19249  0, /*tp_version_tag*/
19250  #if PY_VERSION_HEX >= 0x030400a1
19251  0, /*tp_finalize*/
19252  #endif
19253  };
19254 
19255  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19256  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19257 
19258  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19259  PyObject *o;
19260  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__)))) {
19261  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19262  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19263  (void) PyObject_INIT(o, t);
19264  PyObject_GC_Track(o);
19265  } else {
19266  o = (*t->tp_alloc)(t, 0);
19267  if (unlikely(!o)) return 0;
19268  }
19269  return o;
19270  }
19271 
19272  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19273  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19274  PyObject_GC_UnTrack(o);
19275  Py_CLEAR(p->__pyx_v_idx);
19276  Py_CLEAR(p->__pyx_v_self);
19277  Py_CLEAR(p->__pyx_t_0);
19278  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__)))) {
19279  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19280  } else {
19281  (*Py_TYPE(o)->tp_free)(o);
19282  }
19283  }
19284 
19285  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19286  int e;
19287  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19288  if (p->__pyx_v_idx) {
19289  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19290  }
19291  if (p->__pyx_v_self) {
19292  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19293  }
19294  if (p->__pyx_t_0) {
19295  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19296  }
19297  return 0;
19298  }
19299 
19300  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19301  PyVarObject_HEAD_INIT(0, 0)
19302  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19303  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19304  0, /*tp_itemsize*/
19305  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19306  0, /*tp_print*/
19307  0, /*tp_getattr*/
19308  0, /*tp_setattr*/
19309  #if PY_MAJOR_VERSION < 3
19310  0, /*tp_compare*/
19311  #endif
19312  #if PY_MAJOR_VERSION >= 3
19313  0, /*tp_as_async*/
19314  #endif
19315  0, /*tp_repr*/
19316  0, /*tp_as_number*/
19317  0, /*tp_as_sequence*/
19318  0, /*tp_as_mapping*/
19319  0, /*tp_hash*/
19320  0, /*tp_call*/
19321  0, /*tp_str*/
19322  0, /*tp_getattro*/
19323  0, /*tp_setattro*/
19324  0, /*tp_as_buffer*/
19325  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19326  0, /*tp_doc*/
19327  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19328  0, /*tp_clear*/
19329  0, /*tp_richcompare*/
19330  0, /*tp_weaklistoffset*/
19331  0, /*tp_iter*/
19332  0, /*tp_iternext*/
19333  0, /*tp_methods*/
19334  0, /*tp_members*/
19335  0, /*tp_getset*/
19336  0, /*tp_base*/
19337  0, /*tp_dict*/
19338  0, /*tp_descr_get*/
19339  0, /*tp_descr_set*/
19340  0, /*tp_dictoffset*/
19341  0, /*tp_init*/
19342  0, /*tp_alloc*/
19343  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19344  0, /*tp_free*/
19345  0, /*tp_is_gc*/
19346  0, /*tp_bases*/
19347  0, /*tp_mro*/
19348  0, /*tp_cache*/
19349  0, /*tp_subclasses*/
19350  0, /*tp_weaklist*/
19351  0, /*tp_del*/
19352  0, /*tp_version_tag*/
19353  #if PY_VERSION_HEX >= 0x030400a1
19354  0, /*tp_finalize*/
19355  #endif
19356  };
19357 
19358  static PyMethodDef __pyx_methods[] = {
19359  {"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19360  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19361  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19362  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19363  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19364  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19365  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19366  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19367  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19368  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19369  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19370  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19371  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19372  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19373  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19374  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19375  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19376  {"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19377  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19378  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19379  {"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19380  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19381  {"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19382  {"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19383  {"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19384  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19385  {"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19386  {"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19387  {"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19388  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19389  {"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19390  {"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19391  {"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19392  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19393  {"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19394  {"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19395  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19396  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19397  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19398  {0, 0, 0, 0}
19399  };
19400 
19401  #if PY_MAJOR_VERSION >= 3
19402  #if CYTHON_PEP489_MULTI_PHASE_INIT
19403  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19404  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19405  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19406  {Py_mod_create, (void*)__pyx_pymod_create},
19407  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19408  {0, NULL}
19409  };
19410  #endif
19411 
19412  static struct PyModuleDef __pyx_moduledef = {
19413  PyModuleDef_HEAD_INIT,
19414  "PyClical",
19415  0, /* m_doc */
19416  #if CYTHON_PEP489_MULTI_PHASE_INIT
19417  0, /* m_size */
19418  #else
19419  -1, /* m_size */
19420  #endif
19421  __pyx_methods /* m_methods */,
19422  #if CYTHON_PEP489_MULTI_PHASE_INIT
19423  __pyx_moduledef_slots, /* m_slots */
19424  #else
19425  NULL, /* m_reload */
19426  #endif
19427  NULL, /* m_traverse */
19428  NULL, /* m_clear */
19429  NULL /* m_free */
19430  };
19431  #endif
19432 
19433 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19434  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
19435  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
19436  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19437  {&__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},
19438  {&__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},
19439  {&__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},
19440  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
19441  {&__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},
19442  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
19443  {&__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},
19444  {&__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},
19445  {&__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},
19446  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19447  {&__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},
19448  {&__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},
19449  {&__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},
19450  {&__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},
19451  {&__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},
19452  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19453  {&__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},
19454  {&__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},
19455  {&__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},
19456  {&__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},
19457  {&__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},
19458  {&__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},
19459  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19460  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19461  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19462  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19463  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19464  {&__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},
19465  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19466  {&__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},
19467  {&__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},
19468  {&__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},
19469  {&__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},
19470  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19471  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19472  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19473  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19474  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19475  {&__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},
19476  {&__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},
19477  {&__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},
19478  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19479  {&__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},
19480  {&__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},
19481  {&__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},
19482  {&__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},
19483  {&__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},
19484  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19485  {&__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},
19486  {&__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},
19487  {&__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},
19488  {&__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},
19489  {&__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},
19490  {&__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},
19491  {&__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},
19492  {&__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},
19493  {&__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},
19494  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19495  {&__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},
19496  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19497  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
19498  {&__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},
19499  {&__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},
19500  {&__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},
19501  {&__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},
19502  {&__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},
19503  {&__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},
19504  {&__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},
19505  {&__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},
19506  {&__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},
19507  {&__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},
19508  {&__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},
19509  {&__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},
19510  {&__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},
19511  {&__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},
19512  {&__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},
19513  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19514  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19515  {&__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},
19516  {&__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},
19517  {&__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},
19518  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19519  {&__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},
19520  {&__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},
19521  {&__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},
19522  {&__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},
19523  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19524  {&__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},
19525  {&__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},
19526  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19527  {&__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},
19528  {&__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},
19529  {&__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},
19530  {&__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},
19531  {&__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},
19532  {&__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},
19533  {&__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},
19534  {&__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},
19535  {&__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},
19536  {&__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},
19537  {&__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},
19538  {&__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},
19539  {&__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},
19540  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19541  {&__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},
19542  {&__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},
19543  {&__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},
19544  {&__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},
19545  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19546  {&__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},
19547  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19548  {&__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},
19549  {&__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},
19550  {&__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},
19551  {&__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},
19552  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19553  {&__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},
19554  {&__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},
19555  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19556  {&__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},
19557  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
19558  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
19559  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
19560  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
19561  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
19562  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
19563  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
19564  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19565  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
19566  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19567  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
19568  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
19569  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19570  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
19571  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19572  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
19573  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19574  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
19575  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19576  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
19577  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19578  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
19579  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
19580  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
19581  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19582  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
19583  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
19584  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
19585  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
19586  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
19587  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
19588  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
19589  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
19590  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
19591  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
19592  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
19593  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
19594  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
19595  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
19596  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
19597  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
19598  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
19599  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
19600  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
19601  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
19602  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
19603  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
19604  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
19605  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
19606  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
19607  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
19608  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
19609  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
19610  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
19611  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
19612  {&__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},
19613  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
19614  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
19615  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
19616  {&__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},
19617  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
19618  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
19619  {&__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},
19620  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
19621  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
19622  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
19623  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
19624  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
19625  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
19626  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
19627  {&__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},
19628  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19629  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
19630  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
19631  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
19632  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
19633  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
19634  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
19635  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
19636  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
19637  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19638  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19639  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19640  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19641  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
19642  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19643  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
19644  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19645  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
19646  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19647  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
19648  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
19649  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
19650  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19651  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
19652  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
19653  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19654  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19655  {&__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},
19656  {&__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},
19657  {&__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},
19658  {&__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},
19659  {&__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},
19660  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19661  {&__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},
19662  {&__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},
19663  {&__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},
19664  {&__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},
19665  {&__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},
19666  {&__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},
19667  {&__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},
19668  {&__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},
19669  {&__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},
19670  {&__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},
19671  {&__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},
19672  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19673  {&__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},
19674  {&__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},
19675  {&__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},
19676  {&__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},
19677  {&__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},
19678  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19679  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19680  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19681  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19682  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19683  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19684  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19685  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19686  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19687  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19688  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19689  {&__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},
19690  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19691  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19692  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19693  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19694  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19695  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19696  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19697  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19698  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19699  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19700  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19701  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19702  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19703  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19704  {&__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},
19705  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19706  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19707  {&__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},
19708  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19709  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19710  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19711  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19712  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19713  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19714  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19715  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19716  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19717  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19718  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19719  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19720  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19721  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19722  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19723  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19724  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19725  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19726  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19727  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19728  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19729  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19730  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19731  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19732  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19733  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19734  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19735  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19736  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19737  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19738  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19739  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19740  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19741  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19742  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19743  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19744  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19745  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19746  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19747  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19748  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19749  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19750  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19751  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19752  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19753  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19754  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19755  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19756  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19757  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19758  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19759  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19760  {0, 0, 0, 0, 0, 0, 0}
19761 };
19762 static int __Pyx_InitCachedBuiltins(void) {
19763  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19764  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19765  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19766  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19767  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19768  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19769  #if PY_MAJOR_VERSION >= 3
19770  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19771  #else
19772  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19773  #endif
19774  return 0;
19775  __pyx_L1_error:;
19776  return -1;
19777 }
19778 
19779 static int __Pyx_InitCachedConstants(void) {
19780  __Pyx_RefNannyDeclarations
19781  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19782 
19783  /* "(tree fragment)":2
19784  * def __reduce_cython__(self):
19785  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19786  * def __setstate_cython__(self, __pyx_state):
19787  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19788  */
19789  __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)
19790  __Pyx_GOTREF(__pyx_tuple__3);
19791  __Pyx_GIVEREF(__pyx_tuple__3);
19792 
19793  /* "(tree fragment)":4
19794  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19795  * def __setstate_cython__(self, __pyx_state):
19796  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19797  */
19798  __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)
19799  __Pyx_GOTREF(__pyx_tuple__4);
19800  __Pyx_GIVEREF(__pyx_tuple__4);
19801 
19802  /* "PyClical.pyx":635
19803  * TypeError: Not applicable.
19804  * """
19805  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19806  *
19807  * def __iter__(self):
19808  */
19809  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19810  __Pyx_GOTREF(__pyx_tuple__10);
19811  __Pyx_GIVEREF(__pyx_tuple__10);
19812 
19813  /* "PyClical.pyx":646
19814  * TypeError: Not applicable.
19815  * """
19816  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19817  *
19818  * def reframe(self, ixt):
19819  */
19820  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 646, __pyx_L1_error)
19821  __Pyx_GOTREF(__pyx_tuple__11);
19822  __Pyx_GIVEREF(__pyx_tuple__11);
19823 
19824  /* "(tree fragment)":2
19825  * def __reduce_cython__(self):
19826  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19827  * def __setstate_cython__(self, __pyx_state):
19828  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19829  */
19830  __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)
19831  __Pyx_GOTREF(__pyx_tuple__12);
19832  __Pyx_GIVEREF(__pyx_tuple__12);
19833 
19834  /* "(tree fragment)":4
19835  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19836  * def __setstate_cython__(self, __pyx_state):
19837  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19838  */
19839  __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)
19840  __Pyx_GOTREF(__pyx_tuple__13);
19841  __Pyx_GIVEREF(__pyx_tuple__13);
19842 
19843  /* "PyClical.pyx":404
19844  * return index_set_to_str( self.unwrap() ).c_str()
19845  *
19846  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19847  * """
19848  * Tests for functions that Doctest cannot see.
19849  */
19850  __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)
19851 
19852  /* "PyClical.pyx":1243
19853  * return clifford_to_str( self.unwrap() ).c_str()
19854  *
19855  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19856  * """
19857  * Tests for functions that Doctest cannot see.
19858  */
19859  __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)
19860 
19861  /* "PyClical.pyx":1856
19862  *
19863  * # Some abbreviations.
19864  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19865  * pi = tau / 2.0
19866  *
19867  */
19868  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1856, __pyx_L1_error)
19869  __Pyx_GOTREF(__pyx_tuple__16);
19870  __Pyx_GIVEREF(__pyx_tuple__16);
19871 
19872  /* "PyClical.pyx":1887
19873  * """
19874  *
19875  * def e(obj): # <<<<<<<<<<<<<<
19876  * """
19877  * Abbreviation for clifford(index_set(obj)).
19878  */
19879  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19880  __Pyx_GOTREF(__pyx_tuple__17);
19881  __Pyx_GIVEREF(__pyx_tuple__17);
19882  __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)
19883 
19884  /* "PyClical.pyx":1900
19885  * return clifford(index_set(obj))
19886  *
19887  * def istpq(p, q): # <<<<<<<<<<<<<<
19888  * """
19889  * Abbreviation for index_set({-q,...p}).
19890  */
19891  __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)
19892  __Pyx_GOTREF(__pyx_tuple__19);
19893  __Pyx_GIVEREF(__pyx_tuple__19);
19894  __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)
19895 
19896  /* "PyClical.pyx":1909
19897  * return index_set(set(range(-q,p+1)))
19898  *
19899  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19900  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19901  *
19902  */
19903  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19904  __Pyx_GOTREF(__pyx_tuple__21);
19905  __Pyx_GIVEREF(__pyx_tuple__21);
19906  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1909, __pyx_L1_error)
19907  __Pyx_GOTREF(__pyx_tuple__22);
19908  __Pyx_GIVEREF(__pyx_tuple__22);
19909 
19910  /* "PyClical.pyx":1910
19911  *
19912  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19913  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19914  *
19915  * # Doctest interface.
19916  */
19917  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1910, __pyx_L1_error)
19918  __Pyx_GOTREF(__pyx_tuple__23);
19919  __Pyx_GIVEREF(__pyx_tuple__23);
19920  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1910, __pyx_L1_error)
19921  __Pyx_GOTREF(__pyx_tuple__24);
19922  __Pyx_GIVEREF(__pyx_tuple__24);
19923 
19924  /* "PyClical.pyx":1913
19925  *
19926  * # Doctest interface.
19927  * def _test(): # <<<<<<<<<<<<<<
19928  * import PyClical, doctest
19929  * return doctest.testmod(PyClical)
19930  */
19931  __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)
19932  __Pyx_GOTREF(__pyx_tuple__25);
19933  __Pyx_GIVEREF(__pyx_tuple__25);
19934  __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)
19935  __Pyx_RefNannyFinishContext();
19936  return 0;
19937  __pyx_L1_error:;
19938  __Pyx_RefNannyFinishContext();
19939  return -1;
19940 }
19941 
19942 static int __Pyx_InitGlobals(void) {
19943  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19944  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19945  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19946  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19947  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19948  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19949  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19950  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19951  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19952  return 0;
19953  __pyx_L1_error:;
19954  return -1;
19955 }
19956 
19957 #if PY_MAJOR_VERSION < 3
19958 PyMODINIT_FUNC initPyClical(void); /*proto*/
19959 PyMODINIT_FUNC initPyClical(void)
19960 #else
19961 PyMODINIT_FUNC PyInit_PyClical(void); /*proto*/
19962 PyMODINIT_FUNC PyInit_PyClical(void)
19963 #if CYTHON_PEP489_MULTI_PHASE_INIT
19964 {
19965  return PyModuleDef_Init(&__pyx_moduledef);
19966 }
19967 static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
19968  PyObject *value = PyObject_GetAttrString(spec, from_name);
19969  int result = 0;
19970  if (likely(value)) {
19971  result = PyDict_SetItemString(moddict, to_name, value);
19972  Py_DECREF(value);
19973  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19974  PyErr_Clear();
19975  } else {
19976  result = -1;
19977  }
19978  return result;
19979 }
19980 static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19981  PyObject *module = NULL, *moddict, *modname;
19982  if (__pyx_m)
19983  return __Pyx_NewRef(__pyx_m);
19984  modname = PyObject_GetAttrString(spec, "name");
19985  if (unlikely(!modname)) goto bad;
19986  module = PyModule_NewObject(modname);
19987  Py_DECREF(modname);
19988  if (unlikely(!module)) goto bad;
19989  moddict = PyModule_GetDict(module);
19990  if (unlikely(!moddict)) goto bad;
19991  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
19992  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
19993  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
19994  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
19995  return module;
19996 bad:
19997  Py_XDECREF(module);
19998  return NULL;
19999 }
20000 
20001 
20002 static int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20003 #endif
20004 #endif
20005 {
20006  PyObject *__pyx_t_1 = NULL;
20007  PyObject *__pyx_t_2 = NULL;
20008  PyObject *__pyx_t_3 = NULL;
20009  int __pyx_t_4;
20010  __Pyx_RefNannyDeclarations
20011  #if CYTHON_PEP489_MULTI_PHASE_INIT
20012  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
20013  #endif
20014  #if CYTHON_REFNANNY
20015  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20016  if (!__Pyx_RefNanny) {
20017  PyErr_Clear();
20018  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20019  if (!__Pyx_RefNanny)
20020  Py_FatalError("failed to import 'refnanny' module");
20021  }
20022  #endif
20023  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20024  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20025  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20026  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20027  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20028  #ifdef __Pyx_CyFunction_USED
20029  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20030  #endif
20031  #ifdef __Pyx_FusedFunction_USED
20032  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20033  #endif
20034  #ifdef __Pyx_Coroutine_USED
20035  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20036  #endif
20037  #ifdef __Pyx_Generator_USED
20038  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20039  #endif
20040  #ifdef __Pyx_AsyncGen_USED
20041  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20042  #endif
20043  #ifdef __Pyx_StopAsyncIteration_USED
20044  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20045  #endif
20046  /*--- Library function declarations ---*/
20047  /*--- Threads initialization code ---*/
20048  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20049  #ifdef WITH_THREAD /* Python build with threading support? */
20050  PyEval_InitThreads();
20051  #endif
20052  #endif
20053  /*--- Module creation code ---*/
20054  #if CYTHON_PEP489_MULTI_PHASE_INIT
20055  __pyx_m = __pyx_pyinit_module;
20056  Py_INCREF(__pyx_m);
20057  #else
20058  #if PY_MAJOR_VERSION < 3
20059  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20060  #else
20061  __pyx_m = PyModule_Create(&__pyx_moduledef);
20062  #endif
20063  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20064  #endif
20065  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20066  Py_INCREF(__pyx_d);
20067  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20068  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20069  #if CYTHON_COMPILING_IN_PYPY
20070  Py_INCREF(__pyx_b);
20071  #endif
20072  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20073  /*--- Initialize various global constants etc. ---*/
20074  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20075  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20076  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20077  #endif
20078  if (__pyx_module_is_main_PyClical) {
20079  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20080  }
20081  #if PY_MAJOR_VERSION >= 3
20082  {
20083  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20084  if (!PyDict_GetItemString(modules, "PyClical")) {
20085  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
20086  }
20087  }
20088  #endif
20089  /*--- Builtin init code ---*/
20090  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20091  /*--- Constants init code ---*/
20092  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20093  /*--- Global init code ---*/
20094  /*--- Variable export code ---*/
20095  /*--- Function export code ---*/
20096  /*--- Type init code ---*/
20097  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
20098  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
20099  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
20100  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
20101  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20102  __pyx_type_8PyClical_index_set.tp_print = 0;
20103  #if CYTHON_COMPILING_IN_CPYTHON
20104  {
20105  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20106  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20107  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20108  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
20109  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
20110  }
20111  }
20112  #endif
20113  #if CYTHON_COMPILING_IN_CPYTHON
20114  {
20115  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20116  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20117  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20118  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
20119  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
20120  }
20121  }
20122  #endif
20123  #if CYTHON_COMPILING_IN_CPYTHON
20124  {
20125  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20126  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20127  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20128  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
20129  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
20130  }
20131  }
20132  #endif
20133  #if CYTHON_COMPILING_IN_CPYTHON
20134  {
20135  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20136  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20137  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20138  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
20139  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
20140  }
20141  }
20142  #endif
20143  #if CYTHON_COMPILING_IN_CPYTHON
20144  {
20145  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20146  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20147  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20148  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
20149  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
20150  }
20151  }
20152  #endif
20153  #if CYTHON_COMPILING_IN_CPYTHON
20154  {
20155  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20156  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20157  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20158  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
20159  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
20160  }
20161  }
20162  #endif
20163  #if CYTHON_COMPILING_IN_CPYTHON
20164  {
20165  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20166  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20167  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20168  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
20169  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
20170  }
20171  }
20172  #endif
20173  #if CYTHON_COMPILING_IN_CPYTHON
20174  {
20175  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20176  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20177  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20178  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
20179  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
20180  }
20181  }
20182  #endif
20183  #if CYTHON_COMPILING_IN_CPYTHON
20184  {
20185  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20186  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20187  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20188  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
20189  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
20190  }
20191  }
20192  #endif
20193  #if CYTHON_COMPILING_IN_CPYTHON
20194  {
20195  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20196  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20197  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20198  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
20199  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
20200  }
20201  }
20202  #endif
20203  #if CYTHON_COMPILING_IN_CPYTHON
20204  {
20205  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20206  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20207  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20208  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
20209  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
20210  }
20211  }
20212  #endif
20213  #if CYTHON_COMPILING_IN_CPYTHON
20214  {
20215  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20216  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20217  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20218  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
20219  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
20220  }
20221  }
20222  #endif
20223  #if CYTHON_COMPILING_IN_CPYTHON
20224  {
20225  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
20226  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20227  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20228  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
20229  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
20230  }
20231  }
20232  #endif
20233  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20234  if (PyObject_SetAttrString(__pyx_m, "index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20235  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
20236  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
20237  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
20238  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
20239  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
20240  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
20241  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20242  __pyx_type_8PyClical_clifford.tp_print = 0;
20243  #if CYTHON_COMPILING_IN_CPYTHON
20244  {
20245  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20246  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20247  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20248  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
20249  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
20250  }
20251  }
20252  #endif
20253  #if CYTHON_COMPILING_IN_CPYTHON
20254  {
20255  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20256  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20257  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20258  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
20259  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
20260  }
20261  }
20262  #endif
20263  #if CYTHON_COMPILING_IN_CPYTHON
20264  {
20265  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20266  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20267  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20268  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
20269  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
20270  }
20271  }
20272  #endif
20273  #if CYTHON_COMPILING_IN_CPYTHON
20274  {
20275  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20276  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20277  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20278  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
20279  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
20280  }
20281  }
20282  #endif
20283  #if CYTHON_COMPILING_IN_CPYTHON
20284  {
20285  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20286  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20287  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20288  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
20289  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
20290  }
20291  }
20292  #endif
20293  #if CYTHON_COMPILING_IN_CPYTHON
20294  {
20295  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20296  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20297  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20298  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
20299  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
20300  }
20301  }
20302  #endif
20303  #if CYTHON_COMPILING_IN_CPYTHON
20304  {
20305  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20306  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20307  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20308  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
20309  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
20310  }
20311  }
20312  #endif
20313  #if CYTHON_COMPILING_IN_CPYTHON
20314  {
20315  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20316  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20317  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20318  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
20319  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
20320  }
20321  }
20322  #endif
20323  #if CYTHON_COMPILING_IN_CPYTHON
20324  {
20325  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20326  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20327  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20328  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
20329  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
20330  }
20331  }
20332  #endif
20333  #if CYTHON_COMPILING_IN_CPYTHON
20334  {
20335  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20336  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20337  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20338  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20339  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20340  }
20341  }
20342  #endif
20343  #if CYTHON_COMPILING_IN_CPYTHON
20344  {
20345  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20346  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20347  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20348  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20349  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20350  }
20351  }
20352  #endif
20353  #if CYTHON_COMPILING_IN_CPYTHON
20354  {
20355  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20356  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20357  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20358  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20359  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20360  }
20361  }
20362  #endif
20363  #if CYTHON_COMPILING_IN_CPYTHON
20364  {
20365  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20366  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20367  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20368  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20369  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20370  }
20371  }
20372  #endif
20373  #if CYTHON_COMPILING_IN_CPYTHON
20374  {
20375  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20376  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20377  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20378  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20379  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20380  }
20381  }
20382  #endif
20383  #if CYTHON_COMPILING_IN_CPYTHON
20384  {
20385  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20386  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20387  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20388  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20389  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20390  }
20391  }
20392  #endif
20393  #if CYTHON_COMPILING_IN_CPYTHON
20394  {
20395  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20396  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20397  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20398  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20399  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20400  }
20401  }
20402  #endif
20403  #if CYTHON_COMPILING_IN_CPYTHON
20404  {
20405  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20406  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20407  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20408  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20409  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20410  }
20411  }
20412  #endif
20413  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20414  #if CYTHON_COMPILING_IN_CPYTHON
20415  {
20416  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20417  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20418  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20419  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
20420  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
20421  }
20422  }
20423  #endif
20424  #endif
20425  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20426  #if CYTHON_COMPILING_IN_CPYTHON
20427  {
20428  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20429  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20430  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20431  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20432  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20433  }
20434  }
20435  #endif
20436  #endif
20437  #if CYTHON_COMPILING_IN_CPYTHON
20438  {
20439  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20440  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20441  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20442  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20443  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20444  }
20445  }
20446  #endif
20447  #if CYTHON_COMPILING_IN_CPYTHON
20448  {
20449  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20450  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20451  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20452  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20453  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20454  }
20455  }
20456  #endif
20457  #if CYTHON_COMPILING_IN_CPYTHON
20458  {
20459  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20460  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20461  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20462  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20463  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20464  }
20465  }
20466  #endif
20467  #if CYTHON_COMPILING_IN_CPYTHON
20468  {
20469  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20470  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20471  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20472  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20473  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20474  }
20475  }
20476  #endif
20477  #if CYTHON_COMPILING_IN_CPYTHON
20478  {
20479  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20480  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20481  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20482  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20483  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20484  }
20485  }
20486  #endif
20487  #if CYTHON_COMPILING_IN_CPYTHON
20488  {
20489  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20490  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20491  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20492  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20493  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20494  }
20495  }
20496  #endif
20497  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20498  if (PyObject_SetAttrString(__pyx_m, "clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20499  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20500  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20501  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
20502  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20503  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20504  /*--- Type import code ---*/
20505  /*--- Variable import code ---*/
20506  /*--- Function import code ---*/
20507  /*--- Execution code ---*/
20508  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20509  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20510  #endif
20511 
20512  /* "PyClical.pyx":28
20513  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
20514  *
20515  * import math # <<<<<<<<<<<<<<
20516  * import numbers
20517  * import collections
20518  */
20519  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
20520  __Pyx_GOTREF(__pyx_t_1);
20521  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
20522  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20523 
20524  /* "PyClical.pyx":29
20525  *
20526  * import math
20527  * import numbers # <<<<<<<<<<<<<<
20528  * import collections
20529  *
20530  */
20531  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
20532  __Pyx_GOTREF(__pyx_t_1);
20533  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
20534  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20535 
20536  /* "PyClical.pyx":30
20537  * import math
20538  * import numbers
20539  * import collections # <<<<<<<<<<<<<<
20540  *
20541  * __version__ = "0.8.2"
20542  */
20543  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
20544  __Pyx_GOTREF(__pyx_t_1);
20545  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
20546  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20547 
20548  /* "PyClical.pyx":32
20549  * import collections
20550  *
20551  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
20552  *
20553  * from PyClical cimport *
20554  */
20555  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
20556 
20557  /* "PyClical.pyx":404
20558  * return index_set_to_str( self.unwrap() ).c_str()
20559  *
20560  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20561  * """
20562  * Tests for functions that Doctest cannot see.
20563  */
20564  __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)
20565  __Pyx_GOTREF(__pyx_t_1);
20566  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
20567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20568 
20569  /* "PyClical.pyx":1243
20570  * return clifford_to_str( self.unwrap() ).c_str()
20571  *
20572  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20573  * """
20574  * Tests for functions that Doctest cannot see.
20575  */
20576  __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)
20577  __Pyx_GOTREF(__pyx_t_1);
20578  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20579  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20580 
20581  /* "PyClical.pyx":1856
20582  *
20583  * # Some abbreviations.
20584  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20585  * pi = tau / 2.0
20586  *
20587  */
20588  __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)
20589  __Pyx_GOTREF(__pyx_t_1);
20590  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20591  __Pyx_GOTREF(__pyx_t_2);
20592  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20593  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20594  __Pyx_GOTREF(__pyx_t_1);
20595  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20596  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20598 
20599  /* "PyClical.pyx":1857
20600  * # Some abbreviations.
20601  * tau = atan(clifford(1.0)) * 8.0
20602  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20603  *
20604  * cl = clifford
20605  */
20606  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20607  __Pyx_GOTREF(__pyx_t_1);
20608  __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)
20609  __Pyx_GOTREF(__pyx_t_2);
20610  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20611  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20612  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20613 
20614  /* "PyClical.pyx":1859
20615  * pi = tau / 2.0
20616  *
20617  * cl = clifford # <<<<<<<<<<<<<<
20618  * """
20619  * Abbreviation for clifford.
20620  */
20621  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20622 
20623  /* "PyClical.pyx":1879
20624  * """
20625  *
20626  * ist = index_set # <<<<<<<<<<<<<<
20627  * """
20628  * Abbreviation for index_set.
20629  */
20630  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20631 
20632  /* "PyClical.pyx":1887
20633  * """
20634  *
20635  * def e(obj): # <<<<<<<<<<<<<<
20636  * """
20637  * Abbreviation for clifford(index_set(obj)).
20638  */
20639  __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)
20640  __Pyx_GOTREF(__pyx_t_2);
20641  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20642  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20643 
20644  /* "PyClical.pyx":1900
20645  * return clifford(index_set(obj))
20646  *
20647  * def istpq(p, q): # <<<<<<<<<<<<<<
20648  * """
20649  * Abbreviation for index_set({-q,...p}).
20650  */
20651  __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)
20652  __Pyx_GOTREF(__pyx_t_2);
20653  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20654  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20655 
20656  /* "PyClical.pyx":1909
20657  * return index_set(set(range(-q,p+1)))
20658  *
20659  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20660  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20661  *
20662  */
20663  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20664  __Pyx_GOTREF(__pyx_t_2);
20665  __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)
20666  __Pyx_GOTREF(__pyx_t_1);
20667  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20668  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20669  __Pyx_GOTREF(__pyx_t_2);
20670  __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)
20671  __Pyx_GOTREF(__pyx_t_3);
20672  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20673  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20674  __Pyx_GOTREF(__pyx_t_2);
20675  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20676  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20677  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20678  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20679 
20680  /* "PyClical.pyx":1910
20681  *
20682  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20683  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20684  *
20685  * # Doctest interface.
20686  */
20687  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20688  __Pyx_GOTREF(__pyx_t_2);
20689  __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)
20690  __Pyx_GOTREF(__pyx_t_3);
20691  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20692  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20693  __Pyx_GOTREF(__pyx_t_2);
20694  __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)
20695  __Pyx_GOTREF(__pyx_t_1);
20696  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20697  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20698  __Pyx_GOTREF(__pyx_t_2);
20699  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20700  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20701  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20702  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20703 
20704  /* "PyClical.pyx":1913
20705  *
20706  * # Doctest interface.
20707  * def _test(): # <<<<<<<<<<<<<<
20708  * import PyClical, doctest
20709  * return doctest.testmod(PyClical)
20710  */
20711  __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)
20712  __Pyx_GOTREF(__pyx_t_2);
20713  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20714  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20715 
20716  /* "PyClical.pyx":1917
20717  * return doctest.testmod(PyClical)
20718  *
20719  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20720  * _test()
20721  */
20722  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20723  __Pyx_GOTREF(__pyx_t_2);
20724  __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)
20725  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20726  if (__pyx_t_4) {
20727 
20728  /* "PyClical.pyx":1918
20729  *
20730  * if __name__ == "__main__":
20731  * _test() # <<<<<<<<<<<<<<
20732  */
20733  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_test); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20734  __Pyx_GOTREF(__pyx_t_1);
20735  __pyx_t_3 = NULL;
20736  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
20737  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
20738  if (likely(__pyx_t_3)) {
20739  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
20740  __Pyx_INCREF(__pyx_t_3);
20741  __Pyx_INCREF(function);
20742  __Pyx_DECREF_SET(__pyx_t_1, function);
20743  }
20744  }
20745  if (__pyx_t_3) {
20746  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20747  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20748  } else {
20749  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20750  }
20751  __Pyx_GOTREF(__pyx_t_2);
20752  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20753  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20754 
20755  /* "PyClical.pyx":1917
20756  * return doctest.testmod(PyClical)
20757  *
20758  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20759  * _test()
20760  */
20761  }
20762 
20763  /* "PyClical.pyx":1
20764  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20765  * # distutils: language = c++
20766  * #
20767  */
20768  __pyx_t_2 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
20769  __Pyx_GOTREF(__pyx_t_2);
20770  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)
20771  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)
20772  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)
20773  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)
20774  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)
20775  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)
20776  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)
20777  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)
20778  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)
20779  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)
20780  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)
20781  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)
20782  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)
20783  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)
20784  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)
20785  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)
20786  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)
20787  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)
20788  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)
20789  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)
20790  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)
20791  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)
20792  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)
20793  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)
20794  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)
20795  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)
20796  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)
20797  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)
20798  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)
20799  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)
20800  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)
20801  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)
20802  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)
20803  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)
20804  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)
20805  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)
20806  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)
20807  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)
20808  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)
20809  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)
20810  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)
20811  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)
20812  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)
20813  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)
20814  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)
20815  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)
20816  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)
20817  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)
20818  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)
20819  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)
20820  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)
20821  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)
20822  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)
20823  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)
20824  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)
20825  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)
20826  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)
20827  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)
20828  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)
20829  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)
20830  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)
20831  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)
20832  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)
20833  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)
20834  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)
20835  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)
20836  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)
20837  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)
20838  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)
20839  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)
20840  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)
20841  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)
20842  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)
20843  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)
20844  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)
20845  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)
20846  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)
20847  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)
20848  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)
20849  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)
20850  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)
20851  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)
20852  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)
20853  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)
20854  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)
20855  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)
20856  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)
20857  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)
20858  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)
20859  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)
20860  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)
20861  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)
20862  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)
20863  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)
20864  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)
20865  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)
20866  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)
20867  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)
20868  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)
20869  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)
20870  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)
20871  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)
20872  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)
20873  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)
20874  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)
20875  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)
20876  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)
20877  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20878  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20879 
20880  /*--- Wrapped vars code ---*/
20881 
20882  goto __pyx_L0;
20883  __pyx_L1_error:;
20884  __Pyx_XDECREF(__pyx_t_1);
20885  __Pyx_XDECREF(__pyx_t_2);
20886  __Pyx_XDECREF(__pyx_t_3);
20887  if (__pyx_m) {
20888  if (__pyx_d) {
20889  __Pyx_AddTraceback("init PyClical", 0, __pyx_lineno, __pyx_filename);
20890  }
20891  Py_DECREF(__pyx_m); __pyx_m = 0;
20892  } else if (!PyErr_Occurred()) {
20893  PyErr_SetString(PyExc_ImportError, "init PyClical");
20894  }
20895  __pyx_L0:;
20896  __Pyx_RefNannyFinishContext();
20897  #if CYTHON_PEP489_MULTI_PHASE_INIT
20898  return (__pyx_m != NULL) ? 0 : -1;
20899  #elif PY_MAJOR_VERSION >= 3
20900  return __pyx_m;
20901  #else
20902  return;
20903  #endif
20904 }
20905 
20906 /* --- Runtime support code --- */
20907 /* Refnanny */
20908 #if CYTHON_REFNANNY
20909 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20910  PyObject *m = NULL, *p = NULL;
20911  void *r = NULL;
20912  m = PyImport_ImportModule((char *)modname);
20913  if (!m) goto end;
20914  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
20915  if (!p) goto end;
20916  r = PyLong_AsVoidPtr(p);
20917 end:
20918  Py_XDECREF(p);
20919  Py_XDECREF(m);
20920  return (__Pyx_RefNannyAPIStruct *)r;
20921 }
20922 #endif
20923 
20924 /* GetBuiltinName */
20925 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20926  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20927  if (unlikely(!result)) {
20928  PyErr_Format(PyExc_NameError,
20929 #if PY_MAJOR_VERSION >= 3
20930  "name '%U' is not defined", name);
20931 #else
20932  "name '%.200s' is not defined", PyString_AS_STRING(name));
20933 #endif
20934  }
20935  return result;
20936 }
20937 
20938 /* PyObjectCall */
20939 #if CYTHON_COMPILING_IN_CPYTHON
20940 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20941  PyObject *result;
20942  ternaryfunc call = func->ob_type->tp_call;
20943  if (unlikely(!call))
20944  return PyObject_Call(func, arg, kw);
20945  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20946  return NULL;
20947  result = (*call)(func, arg, kw);
20948  Py_LeaveRecursiveCall();
20949  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20950  PyErr_SetString(
20951  PyExc_SystemError,
20952  "NULL result without error in PyObject_Call");
20953  }
20954  return result;
20955 }
20956 #endif
20957 
20958 /* PyErrFetchRestore */
20959 #if CYTHON_FAST_THREAD_STATE
20960 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20961  PyObject *tmp_type, *tmp_value, *tmp_tb;
20962  tmp_type = tstate->curexc_type;
20963  tmp_value = tstate->curexc_value;
20964  tmp_tb = tstate->curexc_traceback;
20965  tstate->curexc_type = type;
20966  tstate->curexc_value = value;
20967  tstate->curexc_traceback = tb;
20968  Py_XDECREF(tmp_type);
20969  Py_XDECREF(tmp_value);
20970  Py_XDECREF(tmp_tb);
20971 }
20972 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20973  *type = tstate->curexc_type;
20974  *value = tstate->curexc_value;
20975  *tb = tstate->curexc_traceback;
20976  tstate->curexc_type = 0;
20977  tstate->curexc_value = 0;
20978  tstate->curexc_traceback = 0;
20979 }
20980 #endif
20981 
20982 /* WriteUnraisableException */
20983 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20984  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20985  int full_traceback, CYTHON_UNUSED int nogil) {
20986  PyObject *old_exc, *old_val, *old_tb;
20987  PyObject *ctx;
20988  __Pyx_PyThreadState_declare
20989 #ifdef WITH_THREAD
20990  PyGILState_STATE state;
20991  if (nogil)
20992  state = PyGILState_Ensure();
20993 #ifdef _MSC_VER
20994  else state = (PyGILState_STATE)-1;
20995 #endif
20996 #endif
20997  __Pyx_PyThreadState_assign
20998  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20999  if (full_traceback) {
21000  Py_XINCREF(old_exc);
21001  Py_XINCREF(old_val);
21002  Py_XINCREF(old_tb);
21003  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21004  PyErr_PrintEx(1);
21005  }
21006  #if PY_MAJOR_VERSION < 3
21007  ctx = PyString_FromString(name);
21008  #else
21009  ctx = PyUnicode_FromString(name);
21010  #endif
21011  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21012  if (!ctx) {
21013  PyErr_WriteUnraisable(Py_None);
21014  } else {
21015  PyErr_WriteUnraisable(ctx);
21016  Py_DECREF(ctx);
21017  }
21018 #ifdef WITH_THREAD
21019  if (nogil)
21020  PyGILState_Release(state);
21021 #endif
21022 }
21023 
21024 /* PyCFunctionFastCall */
21025 #if CYTHON_FAST_PYCCALL
21026 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
21027  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
21028  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
21029  PyObject *self = PyCFunction_GET_SELF(func);
21030  int flags = PyCFunction_GET_FLAGS(func);
21031  assert(PyCFunction_Check(func));
21032  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
21033  assert(nargs >= 0);
21034  assert(nargs == 0 || args != NULL);
21035  /* _PyCFunction_FastCallDict() must not be called with an exception set,
21036  because it may clear it (directly or indirectly) and so the
21037  caller loses its exception */
21038  assert(!PyErr_Occurred());
21039  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
21040  return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
21041  } else {
21042  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
21043  }
21044 }
21045 #endif
21046 
21047 /* PyFunctionFastCall */
21048 #if CYTHON_FAST_PYCALL
21049 #include "frameobject.h"
21050 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
21051  PyObject *globals) {
21052  PyFrameObject *f;
21053  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21054  PyObject **fastlocals;
21055  Py_ssize_t i;
21056  PyObject *result;
21057  assert(globals != NULL);
21058  /* XXX Perhaps we should create a specialized
21059  PyFrame_New() that doesn't take locals, but does
21060  take builtins without sanity checking them.
21061  */
21062  assert(tstate != NULL);
21063  f = PyFrame_New(tstate, co, globals, NULL);
21064  if (f == NULL) {
21065  return NULL;
21066  }
21067  fastlocals = f->f_localsplus;
21068  for (i = 0; i < na; i++) {
21069  Py_INCREF(*args);
21070  fastlocals[i] = *args++;
21071  }
21072  result = PyEval_EvalFrameEx(f,0);
21073  ++tstate->recursion_depth;
21074  Py_DECREF(f);
21075  --tstate->recursion_depth;
21076  return result;
21077 }
21078 #if 1 || PY_VERSION_HEX < 0x030600B1
21079 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
21080  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
21081  PyObject *globals = PyFunction_GET_GLOBALS(func);
21082  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
21083  PyObject *closure;
21084 #if PY_MAJOR_VERSION >= 3
21085  PyObject *kwdefs;
21086 #endif
21087  PyObject *kwtuple, **k;
21088  PyObject **d;
21089  Py_ssize_t nd;
21090  Py_ssize_t nk;
21091  PyObject *result;
21092  assert(kwargs == NULL || PyDict_Check(kwargs));
21093  nk = kwargs ? PyDict_Size(kwargs) : 0;
21094  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
21095  return NULL;
21096  }
21097  if (
21098 #if PY_MAJOR_VERSION >= 3
21099  co->co_kwonlyargcount == 0 &&
21100 #endif
21101  likely(kwargs == NULL || nk == 0) &&
21102  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
21103  if (argdefs == NULL && co->co_argcount == nargs) {
21104  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
21105  goto done;
21106  }
21107  else if (nargs == 0 && argdefs != NULL
21108  && co->co_argcount == Py_SIZE(argdefs)) {
21109  /* function called with no arguments, but all parameters have
21110  a default value: use default values as arguments .*/
21111  args = &PyTuple_GET_ITEM(argdefs, 0);
21112  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
21113  goto done;
21114  }
21115  }
21116  if (kwargs != NULL) {
21117  Py_ssize_t pos, i;
21118  kwtuple = PyTuple_New(2 * nk);
21119  if (kwtuple == NULL) {
21120  result = NULL;
21121  goto done;
21122  }
21123  k = &PyTuple_GET_ITEM(kwtuple, 0);
21124  pos = i = 0;
21125  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
21126  Py_INCREF(k[i]);
21127  Py_INCREF(k[i+1]);
21128  i += 2;
21129  }
21130  nk = i / 2;
21131  }
21132  else {
21133  kwtuple = NULL;
21134  k = NULL;
21135  }
21136  closure = PyFunction_GET_CLOSURE(func);
21137 #if PY_MAJOR_VERSION >= 3
21138  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
21139 #endif
21140  if (argdefs != NULL) {
21141  d = &PyTuple_GET_ITEM(argdefs, 0);
21142  nd = Py_SIZE(argdefs);
21143  }
21144  else {
21145  d = NULL;
21146  nd = 0;
21147  }
21148 #if PY_MAJOR_VERSION >= 3
21149  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
21150  args, nargs,
21151  k, (int)nk,
21152  d, (int)nd, kwdefs, closure);
21153 #else
21154  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
21155  args, nargs,
21156  k, (int)nk,
21157  d, (int)nd, closure);
21158 #endif
21159  Py_XDECREF(kwtuple);
21160 done:
21161  Py_LeaveRecursiveCall();
21162  return result;
21163 }
21164 #endif
21165 #endif
21166 
21167 /* PyObjectCallMethO */
21168 #if CYTHON_COMPILING_IN_CPYTHON
21169 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
21170  PyObject *self, *result;
21171  PyCFunction cfunc;
21172  cfunc = PyCFunction_GET_FUNCTION(func);
21173  self = PyCFunction_GET_SELF(func);
21174  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
21175  return NULL;
21176  result = cfunc(self, arg);
21177  Py_LeaveRecursiveCall();
21178  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
21179  PyErr_SetString(
21180  PyExc_SystemError,
21181  "NULL result without error in PyObject_Call");
21182  }
21183  return result;
21184 }
21185 #endif
21186 
21187 /* PyObjectCallOneArg */
21188 #if CYTHON_COMPILING_IN_CPYTHON
21189 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21190  PyObject *result;
21191  PyObject *args = PyTuple_New(1);
21192  if (unlikely(!args)) return NULL;
21193  Py_INCREF(arg);
21194  PyTuple_SET_ITEM(args, 0, arg);
21195  result = __Pyx_PyObject_Call(func, args, NULL);
21196  Py_DECREF(args);
21197  return result;
21198 }
21199 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21200 #if CYTHON_FAST_PYCALL
21201  if (PyFunction_Check(func)) {
21202  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21203  }
21204 #endif
21205  if (likely(PyCFunction_Check(func))) {
21206  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21207  return __Pyx_PyObject_CallMethO(func, arg);
21208 #if CYTHON_FAST_PYCCALL
21209  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21210  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21211 #endif
21212  }
21213  }
21214  return __Pyx__PyObject_CallOneArg(func, arg);
21215 }
21216 #else
21217 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21218  PyObject *result;
21219  PyObject *args = PyTuple_Pack(1, arg);
21220  if (unlikely(!args)) return NULL;
21221  result = __Pyx_PyObject_Call(func, args, NULL);
21222  Py_DECREF(args);
21223  return result;
21224 }
21225 #endif
21226 
21227 /* PyObjectCallNoArg */
21228 #if CYTHON_COMPILING_IN_CPYTHON
21229 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21230 #if CYTHON_FAST_PYCALL
21231  if (PyFunction_Check(func)) {
21232  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21233  }
21234 #endif
21235 #ifdef __Pyx_CyFunction_USED
21236  if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
21237 #else
21238  if (likely(PyCFunction_Check(func))) {
21239 #endif
21240  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21241  return __Pyx_PyObject_CallMethO(func, NULL);
21242  }
21243  }
21244  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21245 }
21246 #endif
21247 
21248 /* RaiseDoubleKeywords */
21249  static void __Pyx_RaiseDoubleKeywordsError(
21250  const char* func_name,
21251  PyObject* kw_name)
21252 {
21253  PyErr_Format(PyExc_TypeError,
21254  #if PY_MAJOR_VERSION >= 3
21255  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21256  #else
21257  "%s() got multiple values for keyword argument '%s'", func_name,
21258  PyString_AsString(kw_name));
21259  #endif
21260 }
21261 
21262 /* ParseKeywords */
21263  static int __Pyx_ParseOptionalKeywords(
21264  PyObject *kwds,
21265  PyObject **argnames[],
21266  PyObject *kwds2,
21267  PyObject *values[],
21268  Py_ssize_t num_pos_args,
21269  const char* function_name)
21270 {
21271  PyObject *key = 0, *value = 0;
21272  Py_ssize_t pos = 0;
21273  PyObject*** name;
21274  PyObject*** first_kw_arg = argnames + num_pos_args;
21275  while (PyDict_Next(kwds, &pos, &key, &value)) {
21276  name = first_kw_arg;
21277  while (*name && (**name != key)) name++;
21278  if (*name) {
21279  values[name-argnames] = value;
21280  continue;
21281  }
21282  name = first_kw_arg;
21283  #if PY_MAJOR_VERSION < 3
21284  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
21285  while (*name) {
21286  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21287  && _PyString_Eq(**name, key)) {
21288  values[name-argnames] = value;
21289  break;
21290  }
21291  name++;
21292  }
21293  if (*name) continue;
21294  else {
21295  PyObject*** argname = argnames;
21296  while (argname != first_kw_arg) {
21297  if ((**argname == key) || (
21298  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21299  && _PyString_Eq(**argname, key))) {
21300  goto arg_passed_twice;
21301  }
21302  argname++;
21303  }
21304  }
21305  } else
21306  #endif
21307  if (likely(PyUnicode_Check(key))) {
21308  while (*name) {
21309  int cmp = (**name == key) ? 0 :
21310  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21311  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
21312  #endif
21313  PyUnicode_Compare(**name, key);
21314  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21315  if (cmp == 0) {
21316  values[name-argnames] = value;
21317  break;
21318  }
21319  name++;
21320  }
21321  if (*name) continue;
21322  else {
21323  PyObject*** argname = argnames;
21324  while (argname != first_kw_arg) {
21325  int cmp = (**argname == key) ? 0 :
21326  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21327  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
21328  #endif
21329  PyUnicode_Compare(**argname, key);
21330  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21331  if (cmp == 0) goto arg_passed_twice;
21332  argname++;
21333  }
21334  }
21335  } else
21336  goto invalid_keyword_type;
21337  if (kwds2) {
21338  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21339  } else {
21340  goto invalid_keyword;
21341  }
21342  }
21343  return 0;
21344 arg_passed_twice:
21345  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21346  goto bad;
21347 invalid_keyword_type:
21348  PyErr_Format(PyExc_TypeError,
21349  "%.200s() keywords must be strings", function_name);
21350  goto bad;
21351 invalid_keyword:
21352  PyErr_Format(PyExc_TypeError,
21353  #if PY_MAJOR_VERSION < 3
21354  "%.200s() got an unexpected keyword argument '%.200s'",
21355  function_name, PyString_AsString(key));
21356  #else
21357  "%s() got an unexpected keyword argument '%U'",
21358  function_name, key);
21359  #endif
21360 bad:
21361  return -1;
21362 }
21363 
21364 /* RaiseArgTupleInvalid */
21365  static void __Pyx_RaiseArgtupleInvalid(
21366  const char* func_name,
21367  int exact,
21368  Py_ssize_t num_min,
21369  Py_ssize_t num_max,
21370  Py_ssize_t num_found)
21371 {
21372  Py_ssize_t num_expected;
21373  const char *more_or_less;
21374  if (num_found < num_min) {
21375  num_expected = num_min;
21376  more_or_less = "at least";
21377  } else {
21378  num_expected = num_max;
21379  more_or_less = "at most";
21380  }
21381  if (exact) {
21382  more_or_less = "exactly";
21383  }
21384  PyErr_Format(PyExc_TypeError,
21385  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21386  func_name, more_or_less, num_expected,
21387  (num_expected == 1) ? "" : "s", num_found);
21388 }
21389 
21390 /* GetModuleGlobalName */
21391  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
21392  PyObject *result;
21393 #if !CYTHON_AVOID_BORROWED_REFS
21394  result = PyDict_GetItem(__pyx_d, name);
21395  if (likely(result)) {
21396  Py_INCREF(result);
21397  } else {
21398 #else
21399  result = PyObject_GetItem(__pyx_d, name);
21400  if (!result) {
21401  PyErr_Clear();
21402 #endif
21403  result = __Pyx_GetBuiltinName(name);
21404  }
21405  return result;
21406 }
21407 
21408 /* SaveResetException */
21409  #if CYTHON_FAST_THREAD_STATE
21410 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21411  #if PY_VERSION_HEX >= 0x030700A2
21412  *type = tstate->exc_state.exc_type;
21413  *value = tstate->exc_state.exc_value;
21414  *tb = tstate->exc_state.exc_traceback;
21415  #else
21416  *type = tstate->exc_type;
21417  *value = tstate->exc_value;
21418  *tb = tstate->exc_traceback;
21419  #endif
21420  Py_XINCREF(*type);
21421  Py_XINCREF(*value);
21422  Py_XINCREF(*tb);
21423 }
21424 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21425  PyObject *tmp_type, *tmp_value, *tmp_tb;
21426  #if PY_VERSION_HEX >= 0x030700A2
21427  tmp_type = tstate->exc_state.exc_type;
21428  tmp_value = tstate->exc_state.exc_value;
21429  tmp_tb = tstate->exc_state.exc_traceback;
21430  tstate->exc_state.exc_type = type;
21431  tstate->exc_state.exc_value = value;
21432  tstate->exc_state.exc_traceback = tb;
21433  #else
21434  tmp_type = tstate->exc_type;
21435  tmp_value = tstate->exc_value;
21436  tmp_tb = tstate->exc_traceback;
21437  tstate->exc_type = type;
21438  tstate->exc_value = value;
21439  tstate->exc_traceback = tb;
21440  #endif
21441  Py_XDECREF(tmp_type);
21442  Py_XDECREF(tmp_value);
21443  Py_XDECREF(tmp_tb);
21444 }
21445 #endif
21446 
21447 /* PyErrExceptionMatches */
21448  #if CYTHON_FAST_THREAD_STATE
21449 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21450  Py_ssize_t i, n;
21451  n = PyTuple_GET_SIZE(tuple);
21452 #if PY_MAJOR_VERSION >= 3
21453  for (i=0; i<n; i++) {
21454  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21455  }
21456 #endif
21457  for (i=0; i<n; i++) {
21458  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21459  }
21460  return 0;
21461 }
21462 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21463  PyObject *exc_type = tstate->curexc_type;
21464  if (exc_type == err) return 1;
21465  if (unlikely(!exc_type)) return 0;
21466  if (unlikely(PyTuple_Check(err)))
21467  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21468  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21469 }
21470 #endif
21471 
21472 /* GetException */
21473  #if CYTHON_FAST_THREAD_STATE
21474 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21475 #else
21476 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
21477 #endif
21478  PyObject *local_type, *local_value, *local_tb;
21479 #if CYTHON_FAST_THREAD_STATE
21480  PyObject *tmp_type, *tmp_value, *tmp_tb;
21481  local_type = tstate->curexc_type;
21482  local_value = tstate->curexc_value;
21483  local_tb = tstate->curexc_traceback;
21484  tstate->curexc_type = 0;
21485  tstate->curexc_value = 0;
21486  tstate->curexc_traceback = 0;
21487 #else
21488  PyErr_Fetch(&local_type, &local_value, &local_tb);
21489 #endif
21490  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21491 #if CYTHON_FAST_THREAD_STATE
21492  if (unlikely(tstate->curexc_type))
21493 #else
21494  if (unlikely(PyErr_Occurred()))
21495 #endif
21496  goto bad;
21497  #if PY_MAJOR_VERSION >= 3
21498  if (local_tb) {
21499  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21500  goto bad;
21501  }
21502  #endif
21503  Py_XINCREF(local_tb);
21504  Py_XINCREF(local_type);
21505  Py_XINCREF(local_value);
21506  *type = local_type;
21507  *value = local_value;
21508  *tb = local_tb;
21509 #if CYTHON_FAST_THREAD_STATE
21510  #if PY_VERSION_HEX >= 0x030700A2
21511  tmp_type = tstate->exc_state.exc_type;
21512  tmp_value = tstate->exc_state.exc_value;
21513  tmp_tb = tstate->exc_state.exc_traceback;
21514  tstate->exc_state.exc_type = local_type;
21515  tstate->exc_state.exc_value = local_value;
21516  tstate->exc_state.exc_traceback = local_tb;
21517  #else
21518  tmp_type = tstate->exc_type;
21519  tmp_value = tstate->exc_value;
21520  tmp_tb = tstate->exc_traceback;
21521  tstate->exc_type = local_type;
21522  tstate->exc_value = local_value;
21523  tstate->exc_traceback = local_tb;
21524  #endif
21525  Py_XDECREF(tmp_type);
21526  Py_XDECREF(tmp_value);
21527  Py_XDECREF(tmp_tb);
21528 #else
21529  PyErr_SetExcInfo(local_type, local_value, local_tb);
21530 #endif
21531  return 0;
21532 bad:
21533  *type = 0;
21534  *value = 0;
21535  *tb = 0;
21536  Py_XDECREF(local_type);
21537  Py_XDECREF(local_value);
21538  Py_XDECREF(local_tb);
21539  return -1;
21540 }
21541 
21542 /* RaiseException */
21543  #if PY_MAJOR_VERSION < 3
21544 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21545  CYTHON_UNUSED PyObject *cause) {
21546  __Pyx_PyThreadState_declare
21547  Py_XINCREF(type);
21548  if (!value || value == Py_None)
21549  value = NULL;
21550  else
21551  Py_INCREF(value);
21552  if (!tb || tb == Py_None)
21553  tb = NULL;
21554  else {
21555  Py_INCREF(tb);
21556  if (!PyTraceBack_Check(tb)) {
21557  PyErr_SetString(PyExc_TypeError,
21558  "raise: arg 3 must be a traceback or None");
21559  goto raise_error;
21560  }
21561  }
21562  if (PyType_Check(type)) {
21563 #if CYTHON_COMPILING_IN_PYPY
21564  if (!value) {
21565  Py_INCREF(Py_None);
21566  value = Py_None;
21567  }
21568 #endif
21569  PyErr_NormalizeException(&type, &value, &tb);
21570  } else {
21571  if (value) {
21572  PyErr_SetString(PyExc_TypeError,
21573  "instance exception may not have a separate value");
21574  goto raise_error;
21575  }
21576  value = type;
21577  type = (PyObject*) Py_TYPE(type);
21578  Py_INCREF(type);
21579  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21580  PyErr_SetString(PyExc_TypeError,
21581  "raise: exception class must be a subclass of BaseException");
21582  goto raise_error;
21583  }
21584  }
21585  __Pyx_PyThreadState_assign
21586  __Pyx_ErrRestore(type, value, tb);
21587  return;
21588 raise_error:
21589  Py_XDECREF(value);
21590  Py_XDECREF(type);
21591  Py_XDECREF(tb);
21592  return;
21593 }
21594 #else
21595 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21596  PyObject* owned_instance = NULL;
21597  if (tb == Py_None) {
21598  tb = 0;
21599  } else if (tb && !PyTraceBack_Check(tb)) {
21600  PyErr_SetString(PyExc_TypeError,
21601  "raise: arg 3 must be a traceback or None");
21602  goto bad;
21603  }
21604  if (value == Py_None)
21605  value = 0;
21606  if (PyExceptionInstance_Check(type)) {
21607  if (value) {
21608  PyErr_SetString(PyExc_TypeError,
21609  "instance exception may not have a separate value");
21610  goto bad;
21611  }
21612  value = type;
21613  type = (PyObject*) Py_TYPE(value);
21614  } else if (PyExceptionClass_Check(type)) {
21615  PyObject *instance_class = NULL;
21616  if (value && PyExceptionInstance_Check(value)) {
21617  instance_class = (PyObject*) Py_TYPE(value);
21618  if (instance_class != type) {
21619  int is_subclass = PyObject_IsSubclass(instance_class, type);
21620  if (!is_subclass) {
21621  instance_class = NULL;
21622  } else if (unlikely(is_subclass == -1)) {
21623  goto bad;
21624  } else {
21625  type = instance_class;
21626  }
21627  }
21628  }
21629  if (!instance_class) {
21630  PyObject *args;
21631  if (!value)
21632  args = PyTuple_New(0);
21633  else if (PyTuple_Check(value)) {
21634  Py_INCREF(value);
21635  args = value;
21636  } else
21637  args = PyTuple_Pack(1, value);
21638  if (!args)
21639  goto bad;
21640  owned_instance = PyObject_Call(type, args, NULL);
21641  Py_DECREF(args);
21642  if (!owned_instance)
21643  goto bad;
21644  value = owned_instance;
21645  if (!PyExceptionInstance_Check(value)) {
21646  PyErr_Format(PyExc_TypeError,
21647  "calling %R should have returned an instance of "
21648  "BaseException, not %R",
21649  type, Py_TYPE(value));
21650  goto bad;
21651  }
21652  }
21653  } else {
21654  PyErr_SetString(PyExc_TypeError,
21655  "raise: exception class must be a subclass of BaseException");
21656  goto bad;
21657  }
21658  if (cause) {
21659  PyObject *fixed_cause;
21660  if (cause == Py_None) {
21661  fixed_cause = NULL;
21662  } else if (PyExceptionClass_Check(cause)) {
21663  fixed_cause = PyObject_CallObject(cause, NULL);
21664  if (fixed_cause == NULL)
21665  goto bad;
21666  } else if (PyExceptionInstance_Check(cause)) {
21667  fixed_cause = cause;
21668  Py_INCREF(fixed_cause);
21669  } else {
21670  PyErr_SetString(PyExc_TypeError,
21671  "exception causes must derive from "
21672  "BaseException");
21673  goto bad;
21674  }
21675  PyException_SetCause(value, fixed_cause);
21676  }
21677  PyErr_SetObject(type, value);
21678  if (tb) {
21679 #if CYTHON_COMPILING_IN_PYPY
21680  PyObject *tmp_type, *tmp_value, *tmp_tb;
21681  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21682  Py_INCREF(tb);
21683  PyErr_Restore(tmp_type, tmp_value, tb);
21684  Py_XDECREF(tmp_tb);
21685 #else
21686  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21687  PyObject* tmp_tb = tstate->curexc_traceback;
21688  if (tb != tmp_tb) {
21689  Py_INCREF(tb);
21690  tstate->curexc_traceback = tb;
21691  Py_XDECREF(tmp_tb);
21692  }
21693 #endif
21694  }
21695 bad:
21696  Py_XDECREF(owned_instance);
21697  return;
21698 }
21699 #endif
21700 
21701 /* PyIntBinop */
21702  #if !CYTHON_COMPILING_IN_PYPY
21703 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
21704  #if PY_MAJOR_VERSION < 3
21705  if (likely(PyInt_CheckExact(op1))) {
21706  const long b = intval;
21707  long x;
21708  long a = PyInt_AS_LONG(op1);
21709  x = (long)((unsigned long)a + b);
21710  if (likely((x^a) >= 0 || (x^b) >= 0))
21711  return PyInt_FromLong(x);
21712  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21713  }
21714  #endif
21715  #if CYTHON_USE_PYLONG_INTERNALS
21716  if (likely(PyLong_CheckExact(op1))) {
21717  const long b = intval;
21718  long a, x;
21719 #ifdef HAVE_LONG_LONG
21720  const PY_LONG_LONG llb = intval;
21721  PY_LONG_LONG lla, llx;
21722 #endif
21723  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21724  const Py_ssize_t size = Py_SIZE(op1);
21725  if (likely(__Pyx_sst_abs(size) <= 1)) {
21726  a = likely(size) ? digits[0] : 0;
21727  if (size == -1) a = -a;
21728  } else {
21729  switch (size) {
21730  case -2:
21731  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21732  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21733  break;
21734 #ifdef HAVE_LONG_LONG
21735  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21736  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21737  goto long_long;
21738 #endif
21739  }
21740  case 2:
21741  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21742  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21743  break;
21744 #ifdef HAVE_LONG_LONG
21745  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21746  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21747  goto long_long;
21748 #endif
21749  }
21750  case -3:
21751  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21752  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21753  break;
21754 #ifdef HAVE_LONG_LONG
21755  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21756  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]));
21757  goto long_long;
21758 #endif
21759  }
21760  case 3:
21761  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21762  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21763  break;
21764 #ifdef HAVE_LONG_LONG
21765  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21766  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]));
21767  goto long_long;
21768 #endif
21769  }
21770  case -4:
21771  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21772  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21773  break;
21774 #ifdef HAVE_LONG_LONG
21775  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21776  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]));
21777  goto long_long;
21778 #endif
21779  }
21780  case 4:
21781  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21782  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21783  break;
21784 #ifdef HAVE_LONG_LONG
21785  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21786  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]));
21787  goto long_long;
21788 #endif
21789  }
21790  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21791  }
21792  }
21793  x = a + b;
21794  return PyLong_FromLong(x);
21795 #ifdef HAVE_LONG_LONG
21796  long_long:
21797  llx = lla + llb;
21798  return PyLong_FromLongLong(llx);
21799 #endif
21800 
21801 
21802  }
21803  #endif
21804  if (PyFloat_CheckExact(op1)) {
21805  const long b = intval;
21806  double a = PyFloat_AS_DOUBLE(op1);
21807  double result;
21808  PyFPE_START_PROTECT("add", return NULL)
21809  result = ((double)a) + (double)b;
21810  PyFPE_END_PROTECT(result)
21811  return PyFloat_FromDouble(result);
21812  }
21813  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21814 }
21815 #endif
21816 
21817 /* SetItemInt */
21818  static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21819  int r;
21820  if (!j) return -1;
21821  r = PyObject_SetItem(o, j, v);
21822  Py_DECREF(j);
21823  return r;
21824 }
21825 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21826  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21827 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21828  if (is_list || PyList_CheckExact(o)) {
21829  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21830  if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
21831  PyObject* old = PyList_GET_ITEM(o, n);
21832  Py_INCREF(v);
21833  PyList_SET_ITEM(o, n, v);
21834  Py_DECREF(old);
21835  return 1;
21836  }
21837  } else {
21838  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21839  if (likely(m && m->sq_ass_item)) {
21840  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21841  Py_ssize_t l = m->sq_length(o);
21842  if (likely(l >= 0)) {
21843  i += l;
21844  } else {
21845  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21846  return -1;
21847  PyErr_Clear();
21848  }
21849  }
21850  return m->sq_ass_item(o, i, v);
21851  }
21852  }
21853 #else
21854 #if CYTHON_COMPILING_IN_PYPY
21855  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
21856 #else
21857  if (is_list || PySequence_Check(o)) {
21858 #endif
21859  return PySequence_SetItem(o, i, v);
21860  }
21861 #endif
21862  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21863 }
21864 
21865 /* ArgTypeTest */
21866  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21867 {
21868  if (unlikely(!type)) {
21869  PyErr_SetString(PyExc_SystemError, "Missing type object");
21870  return 0;
21871  }
21872  else if (exact) {
21873  #if PY_MAJOR_VERSION == 2
21874  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21875  #endif
21876  }
21877  else {
21878  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21879  }
21880  PyErr_Format(PyExc_TypeError,
21881  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21882  name, type->tp_name, Py_TYPE(obj)->tp_name);
21883  return 0;
21884 }
21885 
21886 /* Import */
21887  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21888  PyObject *empty_list = 0;
21889  PyObject *module = 0;
21890  PyObject *global_dict = 0;
21891  PyObject *empty_dict = 0;
21892  PyObject *list;
21893  #if PY_MAJOR_VERSION < 3
21894  PyObject *py_import;
21895  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21896  if (!py_import)
21897  goto bad;
21898  #endif
21899  if (from_list)
21900  list = from_list;
21901  else {
21902  empty_list = PyList_New(0);
21903  if (!empty_list)
21904  goto bad;
21905  list = empty_list;
21906  }
21907  global_dict = PyModule_GetDict(__pyx_m);
21908  if (!global_dict)
21909  goto bad;
21910  empty_dict = PyDict_New();
21911  if (!empty_dict)
21912  goto bad;
21913  {
21914  #if PY_MAJOR_VERSION >= 3
21915  if (level == -1) {
21916  if (strchr(__Pyx_MODULE_NAME, '.')) {
21917  module = PyImport_ImportModuleLevelObject(
21918  name, global_dict, empty_dict, list, 1);
21919  if (!module) {
21920  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21921  goto bad;
21922  PyErr_Clear();
21923  }
21924  }
21925  level = 0;
21926  }
21927  #endif
21928  if (!module) {
21929  #if PY_MAJOR_VERSION < 3
21930  PyObject *py_level = PyInt_FromLong(level);
21931  if (!py_level)
21932  goto bad;
21933  module = PyObject_CallFunctionObjArgs(py_import,
21934  name, global_dict, empty_dict, list, py_level, NULL);
21935  Py_DECREF(py_level);
21936  #else
21937  module = PyImport_ImportModuleLevelObject(
21938  name, global_dict, empty_dict, list, level);
21939  #endif
21940  }
21941  }
21942 bad:
21943  #if PY_MAJOR_VERSION < 3
21944  Py_XDECREF(py_import);
21945  #endif
21946  Py_XDECREF(empty_list);
21947  Py_XDECREF(empty_dict);
21948  return module;
21949 }
21950 
21951 /* SetVTable */
21952  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21953 #if PY_VERSION_HEX >= 0x02070000
21954  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21955 #else
21956  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21957 #endif
21958  if (!ob)
21959  goto bad;
21960  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21961  goto bad;
21962  Py_DECREF(ob);
21963  return 0;
21964 bad:
21965  Py_XDECREF(ob);
21966  return -1;
21967 }
21968 
21969 /* SetupReduce */
21970  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21971  int ret;
21972  PyObject *name_attr;
21973  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21974  if (likely(name_attr)) {
21975  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21976  } else {
21977  ret = -1;
21978  }
21979  if (unlikely(ret < 0)) {
21980  PyErr_Clear();
21981  ret = 0;
21982  }
21983  Py_XDECREF(name_attr);
21984  return ret;
21985 }
21986 static int __Pyx_setup_reduce(PyObject* type_obj) {
21987  int ret = 0;
21988  PyObject *object_reduce = NULL;
21989  PyObject *object_reduce_ex = NULL;
21990  PyObject *reduce = NULL;
21991  PyObject *reduce_ex = NULL;
21992  PyObject *reduce_cython = NULL;
21993  PyObject *setstate = NULL;
21994  PyObject *setstate_cython = NULL;
21995 #if CYTHON_USE_PYTYPE_LOOKUP
21996  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21997 #else
21998  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21999 #endif
22000 #if CYTHON_USE_PYTYPE_LOOKUP
22001  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22002 #else
22003  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
22004 #endif
22005  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
22006  if (reduce_ex == object_reduce_ex) {
22007 #if CYTHON_USE_PYTYPE_LOOKUP
22008  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22009 #else
22010  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
22011 #endif
22012  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
22013  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
22014  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
22015  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
22016  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
22017  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
22018  if (!setstate) PyErr_Clear();
22019  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
22020  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
22021  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
22022  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
22023  }
22024  PyType_Modified((PyTypeObject*)type_obj);
22025  }
22026  }
22027  goto GOOD;
22028 BAD:
22029  if (!PyErr_Occurred())
22030  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
22031  ret = -1;
22032 GOOD:
22033 #if !CYTHON_USE_PYTYPE_LOOKUP
22034  Py_XDECREF(object_reduce);
22035  Py_XDECREF(object_reduce_ex);
22036 #endif
22037  Py_XDECREF(reduce);
22038  Py_XDECREF(reduce_ex);
22039  Py_XDECREF(reduce_cython);
22040  Py_XDECREF(setstate);
22041  Py_XDECREF(setstate_cython);
22042  return ret;
22043 }
22044 
22045 /* PyFloatBinop */
22046  #if !CYTHON_COMPILING_IN_PYPY
22047 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
22048  const double b = floatval;
22049  double a, result;
22050  if (likely(PyFloat_CheckExact(op1))) {
22051  a = PyFloat_AS_DOUBLE(op1);
22052  } else
22053  #if PY_MAJOR_VERSION < 3
22054  if (likely(PyInt_CheckExact(op1))) {
22055  a = (double) PyInt_AS_LONG(op1);
22056  } else
22057  #endif
22058  if (likely(PyLong_CheckExact(op1))) {
22059  #if CYTHON_USE_PYLONG_INTERNALS
22060  const digit* digits = ((PyLongObject*)op1)->ob_digit;
22061  const Py_ssize_t size = Py_SIZE(op1);
22062  switch (size) {
22063  case 0: a = 0.0; break;
22064  case -1: a = -(double) digits[0]; break;
22065  case 1: a = (double) digits[0]; break;
22066  case -2:
22067  case 2:
22068  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
22069  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22070  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22071  if (size == -2)
22072  a = -a;
22073  break;
22074  }
22075  }
22076  case -3:
22077  case 3:
22078  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
22079  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22080  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22081  if (size == -3)
22082  a = -a;
22083  break;
22084  }
22085  }
22086  case -4:
22087  case 4:
22088  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
22089  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22090  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22091  if (size == -4)
22092  a = -a;
22093  break;
22094  }
22095  }
22096  default:
22097  #else
22098  {
22099  #endif
22100  a = PyLong_AsDouble(op1);
22101  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
22102  }
22103  } else {
22104  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
22105  }
22106  PyFPE_START_PROTECT("divide", return NULL)
22107  result = a / b;
22108  PyFPE_END_PROTECT(result)
22109  return PyFloat_FromDouble(result);
22110 }
22111 #endif
22112 
22113 /* BytesEquals */
22114  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22115 #if CYTHON_COMPILING_IN_PYPY
22116  return PyObject_RichCompareBool(s1, s2, equals);
22117 #else
22118  if (s1 == s2) {
22119  return (equals == Py_EQ);
22120  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22121  const char *ps1, *ps2;
22122  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22123  if (length != PyBytes_GET_SIZE(s2))
22124  return (equals == Py_NE);
22125  ps1 = PyBytes_AS_STRING(s1);
22126  ps2 = PyBytes_AS_STRING(s2);
22127  if (ps1[0] != ps2[0]) {
22128  return (equals == Py_NE);
22129  } else if (length == 1) {
22130  return (equals == Py_EQ);
22131  } else {
22132  int result;
22133 #if CYTHON_USE_UNICODE_INTERNALS
22134  Py_hash_t hash1, hash2;
22135  hash1 = ((PyBytesObject*)s1)->ob_shash;
22136  hash2 = ((PyBytesObject*)s2)->ob_shash;
22137  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22138  return (equals == Py_NE);
22139  }
22140 #endif
22141  result = memcmp(ps1, ps2, (size_t)length);
22142  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22143  }
22144  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22145  return (equals == Py_NE);
22146  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22147  return (equals == Py_NE);
22148  } else {
22149  int result;
22150  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22151  if (!py_result)
22152  return -1;
22153  result = __Pyx_PyObject_IsTrue(py_result);
22154  Py_DECREF(py_result);
22155  return result;
22156  }
22157 #endif
22158 }
22159 
22160 /* UnicodeEquals */
22161  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22162 #if CYTHON_COMPILING_IN_PYPY
22163  return PyObject_RichCompareBool(s1, s2, equals);
22164 #else
22165 #if PY_MAJOR_VERSION < 3
22166  PyObject* owned_ref = NULL;
22167 #endif
22168  int s1_is_unicode, s2_is_unicode;
22169  if (s1 == s2) {
22170  goto return_eq;
22171  }
22172  s1_is_unicode = PyUnicode_CheckExact(s1);
22173  s2_is_unicode = PyUnicode_CheckExact(s2);
22174 #if PY_MAJOR_VERSION < 3
22175  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22176  owned_ref = PyUnicode_FromObject(s2);
22177  if (unlikely(!owned_ref))
22178  return -1;
22179  s2 = owned_ref;
22180  s2_is_unicode = 1;
22181  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22182  owned_ref = PyUnicode_FromObject(s1);
22183  if (unlikely(!owned_ref))
22184  return -1;
22185  s1 = owned_ref;
22186  s1_is_unicode = 1;
22187  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22188  return __Pyx_PyBytes_Equals(s1, s2, equals);
22189  }
22190 #endif
22191  if (s1_is_unicode & s2_is_unicode) {
22192  Py_ssize_t length;
22193  int kind;
22194  void *data1, *data2;
22195  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22196  return -1;
22197  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22198  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22199  goto return_ne;
22200  }
22201 #if CYTHON_USE_UNICODE_INTERNALS
22202  {
22203  Py_hash_t hash1, hash2;
22204  #if CYTHON_PEP393_ENABLED
22205  hash1 = ((PyASCIIObject*)s1)->hash;
22206  hash2 = ((PyASCIIObject*)s2)->hash;
22207  #else
22208  hash1 = ((PyUnicodeObject*)s1)->hash;
22209  hash2 = ((PyUnicodeObject*)s2)->hash;
22210  #endif
22211  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22212  goto return_ne;
22213  }
22214  }
22215 #endif
22216  kind = __Pyx_PyUnicode_KIND(s1);
22217  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22218  goto return_ne;
22219  }
22220  data1 = __Pyx_PyUnicode_DATA(s1);
22221  data2 = __Pyx_PyUnicode_DATA(s2);
22222  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22223  goto return_ne;
22224  } else if (length == 1) {
22225  goto return_eq;
22226  } else {
22227  int result = memcmp(data1, data2, (size_t)(length * kind));
22228  #if PY_MAJOR_VERSION < 3
22229  Py_XDECREF(owned_ref);
22230  #endif
22231  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22232  }
22233  } else if ((s1 == Py_None) & s2_is_unicode) {
22234  goto return_ne;
22235  } else if ((s2 == Py_None) & s1_is_unicode) {
22236  goto return_ne;
22237  } else {
22238  int result;
22239  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22240  if (!py_result)
22241  return -1;
22242  result = __Pyx_PyObject_IsTrue(py_result);
22243  Py_DECREF(py_result);
22244  return result;
22245  }
22246 return_eq:
22247  #if PY_MAJOR_VERSION < 3
22248  Py_XDECREF(owned_ref);
22249  #endif
22250  return (equals == Py_EQ);
22251 return_ne:
22252  #if PY_MAJOR_VERSION < 3
22253  Py_XDECREF(owned_ref);
22254  #endif
22255  return (equals == Py_NE);
22256 #endif
22257 }
22258 
22259 /* CLineInTraceback */
22260  #ifndef CYTHON_CLINE_IN_TRACEBACK
22261 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
22262  PyObject *use_cline;
22263  PyObject *ptype, *pvalue, *ptraceback;
22264 #if CYTHON_COMPILING_IN_CPYTHON
22265  PyObject **cython_runtime_dict;
22266 #endif
22267  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22268 #if CYTHON_COMPILING_IN_CPYTHON
22269  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22270  if (likely(cython_runtime_dict)) {
22271  use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
22272  } else
22273 #endif
22274  {
22275  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22276  if (use_cline_obj) {
22277  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22278  Py_DECREF(use_cline_obj);
22279  } else {
22280  PyErr_Clear();
22281  use_cline = NULL;
22282  }
22283  }
22284  if (!use_cline) {
22285  c_line = 0;
22286  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22287  }
22288  else if (PyObject_Not(use_cline) != 0) {
22289  c_line = 0;
22290  }
22291  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22292  return c_line;
22293 }
22294 #endif
22295 
22296 /* CodeObjectCache */
22297  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22298  int start = 0, mid = 0, end = count - 1;
22299  if (end >= 0 && code_line > entries[end].code_line) {
22300  return count;
22301  }
22302  while (start < end) {
22303  mid = start + (end - start) / 2;
22304  if (code_line < entries[mid].code_line) {
22305  end = mid;
22306  } else if (code_line > entries[mid].code_line) {
22307  start = mid + 1;
22308  } else {
22309  return mid;
22310  }
22311  }
22312  if (code_line <= entries[mid].code_line) {
22313  return mid;
22314  } else {
22315  return mid + 1;
22316  }
22317 }
22318 static PyCodeObject *__pyx_find_code_object(int code_line) {
22319  PyCodeObject* code_object;
22320  int pos;
22321  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
22322  return NULL;
22323  }
22324  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22325  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
22326  return NULL;
22327  }
22328  code_object = __pyx_code_cache.entries[pos].code_object;
22329  Py_INCREF(code_object);
22330  return code_object;
22331 }
22332 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22333  int pos, i;
22334  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22335  if (unlikely(!code_line)) {
22336  return;
22337  }
22338  if (unlikely(!entries)) {
22339  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22340  if (likely(entries)) {
22341  __pyx_code_cache.entries = entries;
22342  __pyx_code_cache.max_count = 64;
22343  __pyx_code_cache.count = 1;
22344  entries[0].code_line = code_line;
22345  entries[0].code_object = code_object;
22346  Py_INCREF(code_object);
22347  }
22348  return;
22349  }
22350  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22351  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
22352  PyCodeObject* tmp = entries[pos].code_object;
22353  entries[pos].code_object = code_object;
22354  Py_DECREF(tmp);
22355  return;
22356  }
22357  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22358  int new_max = __pyx_code_cache.max_count + 64;
22359  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22360  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22361  if (unlikely(!entries)) {
22362  return;
22363  }
22364  __pyx_code_cache.entries = entries;
22365  __pyx_code_cache.max_count = new_max;
22366  }
22367  for (i=__pyx_code_cache.count; i>pos; i--) {
22368  entries[i] = entries[i-1];
22369  }
22370  entries[pos].code_line = code_line;
22371  entries[pos].code_object = code_object;
22372  __pyx_code_cache.count++;
22373  Py_INCREF(code_object);
22374 }
22375 
22376 /* AddTraceback */
22377  #include "compile.h"
22378 #include "frameobject.h"
22379 #include "traceback.h"
22380 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22381  const char *funcname, int c_line,
22382  int py_line, const char *filename) {
22383  PyCodeObject *py_code = 0;
22384  PyObject *py_srcfile = 0;
22385  PyObject *py_funcname = 0;
22386  #if PY_MAJOR_VERSION < 3
22387  py_srcfile = PyString_FromString(filename);
22388  #else
22389  py_srcfile = PyUnicode_FromString(filename);
22390  #endif
22391  if (!py_srcfile) goto bad;
22392  if (c_line) {
22393  #if PY_MAJOR_VERSION < 3
22394  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22395  #else
22396  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22397  #endif
22398  }
22399  else {
22400  #if PY_MAJOR_VERSION < 3
22401  py_funcname = PyString_FromString(funcname);
22402  #else
22403  py_funcname = PyUnicode_FromString(funcname);
22404  #endif
22405  }
22406  if (!py_funcname) goto bad;
22407  py_code = __Pyx_PyCode_New(
22408  0,
22409  0,
22410  0,
22411  0,
22412  0,
22413  __pyx_empty_bytes, /*PyObject *code,*/
22414  __pyx_empty_tuple, /*PyObject *consts,*/
22415  __pyx_empty_tuple, /*PyObject *names,*/
22416  __pyx_empty_tuple, /*PyObject *varnames,*/
22417  __pyx_empty_tuple, /*PyObject *freevars,*/
22418  __pyx_empty_tuple, /*PyObject *cellvars,*/
22419  py_srcfile, /*PyObject *filename,*/
22420  py_funcname, /*PyObject *name,*/
22421  py_line,
22422  __pyx_empty_bytes /*PyObject *lnotab*/
22423  );
22424  Py_DECREF(py_srcfile);
22425  Py_DECREF(py_funcname);
22426  return py_code;
22427 bad:
22428  Py_XDECREF(py_srcfile);
22429  Py_XDECREF(py_funcname);
22430  return NULL;
22431 }
22432 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22433  int py_line, const char *filename) {
22434  PyCodeObject *py_code = 0;
22435  PyFrameObject *py_frame = 0;
22436  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22437  if (c_line) {
22438  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22439  }
22440  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22441  if (!py_code) {
22442  py_code = __Pyx_CreateCodeObjectForTraceback(
22443  funcname, c_line, py_line, filename);
22444  if (!py_code) goto bad;
22445  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22446  }
22447  py_frame = PyFrame_New(
22448  tstate, /*PyThreadState *tstate,*/
22449  py_code, /*PyCodeObject *code,*/
22450  __pyx_d, /*PyObject *globals,*/
22451  0 /*PyObject *locals*/
22452  );
22453  if (!py_frame) goto bad;
22454  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22455  PyTraceBack_Here(py_frame);
22456 bad:
22457  Py_XDECREF(py_code);
22458  Py_XDECREF(py_frame);
22459 }
22460 
22461 /* CIntFromPyVerify */
22462  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22463  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22464 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22465  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22466 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22467  {\
22468  func_type value = func_value;\
22469  if (sizeof(target_type) < sizeof(func_type)) {\
22470  if (unlikely(value != (func_type) (target_type) value)) {\
22471  func_type zero = 0;\
22472  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22473  return (target_type) -1;\
22474  if (is_unsigned && unlikely(value < zero))\
22475  goto raise_neg_overflow;\
22476  else\
22477  goto raise_overflow;\
22478  }\
22479  }\
22480  return (target_type) value;\
22481  }
22482 
22483 /* CIntToPy */
22484  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22485  const int neg_one = (int) -1, const_zero = (int) 0;
22486  const int is_unsigned = neg_one > const_zero;
22487  if (is_unsigned) {
22488  if (sizeof(int) < sizeof(long)) {
22489  return PyInt_FromLong((long) value);
22490  } else if (sizeof(int) <= sizeof(unsigned long)) {
22491  return PyLong_FromUnsignedLong((unsigned long) value);
22492 #ifdef HAVE_LONG_LONG
22493  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22494  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22495 #endif
22496  }
22497  } else {
22498  if (sizeof(int) <= sizeof(long)) {
22499  return PyInt_FromLong((long) value);
22500 #ifdef HAVE_LONG_LONG
22501  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22502  return PyLong_FromLongLong((PY_LONG_LONG) value);
22503 #endif
22504  }
22505  }
22506  {
22507  int one = 1; int little = (int)*(unsigned char *)&one;
22508  unsigned char *bytes = (unsigned char *)&value;
22509  return _PyLong_FromByteArray(bytes, sizeof(int),
22510  little, !is_unsigned);
22511  }
22512 }
22513 
22514 /* CIntFromPy */
22515  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22516  const int neg_one = (int) -1, const_zero = (int) 0;
22517  const int is_unsigned = neg_one > const_zero;
22518 #if PY_MAJOR_VERSION < 3
22519  if (likely(PyInt_Check(x))) {
22520  if (sizeof(int) < sizeof(long)) {
22521  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22522  } else {
22523  long val = PyInt_AS_LONG(x);
22524  if (is_unsigned && unlikely(val < 0)) {
22525  goto raise_neg_overflow;
22526  }
22527  return (int) val;
22528  }
22529  } else
22530 #endif
22531  if (likely(PyLong_Check(x))) {
22532  if (is_unsigned) {
22533 #if CYTHON_USE_PYLONG_INTERNALS
22534  const digit* digits = ((PyLongObject*)x)->ob_digit;
22535  switch (Py_SIZE(x)) {
22536  case 0: return (int) 0;
22537  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22538  case 2:
22539  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22540  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22541  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22542  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22543  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22544  }
22545  }
22546  break;
22547  case 3:
22548  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22549  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22550  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22551  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22552  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22553  }
22554  }
22555  break;
22556  case 4:
22557  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22558  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22559  __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])))
22560  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22561  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22562  }
22563  }
22564  break;
22565  }
22566 #endif
22567 #if CYTHON_COMPILING_IN_CPYTHON
22568  if (unlikely(Py_SIZE(x) < 0)) {
22569  goto raise_neg_overflow;
22570  }
22571 #else
22572  {
22573  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22574  if (unlikely(result < 0))
22575  return (int) -1;
22576  if (unlikely(result == 1))
22577  goto raise_neg_overflow;
22578  }
22579 #endif
22580  if (sizeof(int) <= sizeof(unsigned long)) {
22581  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22582 #ifdef HAVE_LONG_LONG
22583  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22584  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22585 #endif
22586  }
22587  } else {
22588 #if CYTHON_USE_PYLONG_INTERNALS
22589  const digit* digits = ((PyLongObject*)x)->ob_digit;
22590  switch (Py_SIZE(x)) {
22591  case 0: return (int) 0;
22592  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22593  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22594  case -2:
22595  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22596  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22597  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22598  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22599  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22600  }
22601  }
22602  break;
22603  case 2:
22604  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22605  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22606  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22607  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22608  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22609  }
22610  }
22611  break;
22612  case -3:
22613  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22614  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22615  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22616  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22617  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22618  }
22619  }
22620  break;
22621  case 3:
22622  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22623  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22624  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22625  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22626  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22627  }
22628  }
22629  break;
22630  case -4:
22631  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22632  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22633  __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])))
22634  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22635  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22636  }
22637  }
22638  break;
22639  case 4:
22640  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22641  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22642  __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])))
22643  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22644  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22645  }
22646  }
22647  break;
22648  }
22649 #endif
22650  if (sizeof(int) <= sizeof(long)) {
22651  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22652 #ifdef HAVE_LONG_LONG
22653  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22654  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22655 #endif
22656  }
22657  }
22658  {
22659 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22660  PyErr_SetString(PyExc_RuntimeError,
22661  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22662 #else
22663  int val;
22664  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22665  #if PY_MAJOR_VERSION < 3
22666  if (likely(v) && !PyLong_Check(v)) {
22667  PyObject *tmp = v;
22668  v = PyNumber_Long(tmp);
22669  Py_DECREF(tmp);
22670  }
22671  #endif
22672  if (likely(v)) {
22673  int one = 1; int is_little = (int)*(unsigned char *)&one;
22674  unsigned char *bytes = (unsigned char *)&val;
22675  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22676  bytes, sizeof(val),
22677  is_little, !is_unsigned);
22678  Py_DECREF(v);
22679  if (likely(!ret))
22680  return val;
22681  }
22682 #endif
22683  return (int) -1;
22684  }
22685  } else {
22686  int val;
22687  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22688  if (!tmp) return (int) -1;
22689  val = __Pyx_PyInt_As_int(tmp);
22690  Py_DECREF(tmp);
22691  return val;
22692  }
22693 raise_overflow:
22694  PyErr_SetString(PyExc_OverflowError,
22695  "value too large to convert to int");
22696  return (int) -1;
22697 raise_neg_overflow:
22698  PyErr_SetString(PyExc_OverflowError,
22699  "can't convert negative value to int");
22700  return (int) -1;
22701 }
22702 
22703 /* CIntToPy */
22704  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22705  const long neg_one = (long) -1, const_zero = (long) 0;
22706  const int is_unsigned = neg_one > const_zero;
22707  if (is_unsigned) {
22708  if (sizeof(long) < sizeof(long)) {
22709  return PyInt_FromLong((long) value);
22710  } else if (sizeof(long) <= sizeof(unsigned long)) {
22711  return PyLong_FromUnsignedLong((unsigned long) value);
22712 #ifdef HAVE_LONG_LONG
22713  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22714  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22715 #endif
22716  }
22717  } else {
22718  if (sizeof(long) <= sizeof(long)) {
22719  return PyInt_FromLong((long) value);
22720 #ifdef HAVE_LONG_LONG
22721  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22722  return PyLong_FromLongLong((PY_LONG_LONG) value);
22723 #endif
22724  }
22725  }
22726  {
22727  int one = 1; int little = (int)*(unsigned char *)&one;
22728  unsigned char *bytes = (unsigned char *)&value;
22729  return _PyLong_FromByteArray(bytes, sizeof(long),
22730  little, !is_unsigned);
22731  }
22732 }
22733 
22734 /* CIntFromPy */
22735  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22736  const long neg_one = (long) -1, const_zero = (long) 0;
22737  const int is_unsigned = neg_one > const_zero;
22738 #if PY_MAJOR_VERSION < 3
22739  if (likely(PyInt_Check(x))) {
22740  if (sizeof(long) < sizeof(long)) {
22741  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22742  } else {
22743  long val = PyInt_AS_LONG(x);
22744  if (is_unsigned && unlikely(val < 0)) {
22745  goto raise_neg_overflow;
22746  }
22747  return (long) val;
22748  }
22749  } else
22750 #endif
22751  if (likely(PyLong_Check(x))) {
22752  if (is_unsigned) {
22753 #if CYTHON_USE_PYLONG_INTERNALS
22754  const digit* digits = ((PyLongObject*)x)->ob_digit;
22755  switch (Py_SIZE(x)) {
22756  case 0: return (long) 0;
22757  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22758  case 2:
22759  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22760  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22761  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22762  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22763  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22764  }
22765  }
22766  break;
22767  case 3:
22768  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22769  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22770  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22771  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22772  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22773  }
22774  }
22775  break;
22776  case 4:
22777  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22778  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22779  __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])))
22780  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22781  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22782  }
22783  }
22784  break;
22785  }
22786 #endif
22787 #if CYTHON_COMPILING_IN_CPYTHON
22788  if (unlikely(Py_SIZE(x) < 0)) {
22789  goto raise_neg_overflow;
22790  }
22791 #else
22792  {
22793  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22794  if (unlikely(result < 0))
22795  return (long) -1;
22796  if (unlikely(result == 1))
22797  goto raise_neg_overflow;
22798  }
22799 #endif
22800  if (sizeof(long) <= sizeof(unsigned long)) {
22801  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22802 #ifdef HAVE_LONG_LONG
22803  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22804  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22805 #endif
22806  }
22807  } else {
22808 #if CYTHON_USE_PYLONG_INTERNALS
22809  const digit* digits = ((PyLongObject*)x)->ob_digit;
22810  switch (Py_SIZE(x)) {
22811  case 0: return (long) 0;
22812  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22813  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22814  case -2:
22815  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22816  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22817  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22818  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22819  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22820  }
22821  }
22822  break;
22823  case 2:
22824  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22825  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22826  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22827  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22828  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22829  }
22830  }
22831  break;
22832  case -3:
22833  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22834  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22835  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22836  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22837  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22838  }
22839  }
22840  break;
22841  case 3:
22842  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22843  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22844  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22845  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22846  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22847  }
22848  }
22849  break;
22850  case -4:
22851  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22852  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22853  __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])))
22854  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22855  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22856  }
22857  }
22858  break;
22859  case 4:
22860  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22861  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22862  __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])))
22863  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22864  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22865  }
22866  }
22867  break;
22868  }
22869 #endif
22870  if (sizeof(long) <= sizeof(long)) {
22871  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22872 #ifdef HAVE_LONG_LONG
22873  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22874  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22875 #endif
22876  }
22877  }
22878  {
22879 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22880  PyErr_SetString(PyExc_RuntimeError,
22881  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22882 #else
22883  long val;
22884  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22885  #if PY_MAJOR_VERSION < 3
22886  if (likely(v) && !PyLong_Check(v)) {
22887  PyObject *tmp = v;
22888  v = PyNumber_Long(tmp);
22889  Py_DECREF(tmp);
22890  }
22891  #endif
22892  if (likely(v)) {
22893  int one = 1; int is_little = (int)*(unsigned char *)&one;
22894  unsigned char *bytes = (unsigned char *)&val;
22895  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22896  bytes, sizeof(val),
22897  is_little, !is_unsigned);
22898  Py_DECREF(v);
22899  if (likely(!ret))
22900  return val;
22901  }
22902 #endif
22903  return (long) -1;
22904  }
22905  } else {
22906  long val;
22907  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22908  if (!tmp) return (long) -1;
22909  val = __Pyx_PyInt_As_long(tmp);
22910  Py_DECREF(tmp);
22911  return val;
22912  }
22913 raise_overflow:
22914  PyErr_SetString(PyExc_OverflowError,
22915  "value too large to convert to long");
22916  return (long) -1;
22917 raise_neg_overflow:
22918  PyErr_SetString(PyExc_OverflowError,
22919  "can't convert negative value to long");
22920  return (long) -1;
22921 }
22922 
22923 /* FastTypeChecks */
22924  #if CYTHON_COMPILING_IN_CPYTHON
22925 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22926  while (a) {
22927  a = a->tp_base;
22928  if (a == b)
22929  return 1;
22930  }
22931  return b == &PyBaseObject_Type;
22932 }
22933 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22934  PyObject *mro;
22935  if (a == b) return 1;
22936  mro = a->tp_mro;
22937  if (likely(mro)) {
22938  Py_ssize_t i, n;
22939  n = PyTuple_GET_SIZE(mro);
22940  for (i = 0; i < n; i++) {
22941  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22942  return 1;
22943  }
22944  return 0;
22945  }
22946  return __Pyx_InBases(a, b);
22947 }
22948 #if PY_MAJOR_VERSION == 2
22949 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22950  PyObject *exception, *value, *tb;
22951  int res;
22952  __Pyx_PyThreadState_declare
22953  __Pyx_PyThreadState_assign
22954  __Pyx_ErrFetch(&exception, &value, &tb);
22955  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22956  if (unlikely(res == -1)) {
22957  PyErr_WriteUnraisable(err);
22958  res = 0;
22959  }
22960  if (!res) {
22961  res = PyObject_IsSubclass(err, exc_type2);
22962  if (unlikely(res == -1)) {
22963  PyErr_WriteUnraisable(err);
22964  res = 0;
22965  }
22966  }
22967  __Pyx_ErrRestore(exception, value, tb);
22968  return res;
22969 }
22970 #else
22971 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22972  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22973  if (!res) {
22974  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22975  }
22976  return res;
22977 }
22978 #endif
22979 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22980  if (likely(err == exc_type)) return 1;
22981  if (likely(PyExceptionClass_Check(err))) {
22982  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22983  }
22984  return PyErr_GivenExceptionMatches(err, exc_type);
22985 }
22986 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22987  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22988  if (likely(PyExceptionClass_Check(err))) {
22989  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22990  }
22991  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22992 }
22993 #endif
22994 
22995 /* FetchCommonType */
22996  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22997  PyObject* fake_module;
22998  PyTypeObject* cached_type = NULL;
22999  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
23000  if (!fake_module) return NULL;
23001  Py_INCREF(fake_module);
23002  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
23003  if (cached_type) {
23004  if (!PyType_Check((PyObject*)cached_type)) {
23005  PyErr_Format(PyExc_TypeError,
23006  "Shared Cython type %.200s is not a type object",
23007  type->tp_name);
23008  goto bad;
23009  }
23010  if (cached_type->tp_basicsize != type->tp_basicsize) {
23011  PyErr_Format(PyExc_TypeError,
23012  "Shared Cython type %.200s has the wrong size, try recompiling",
23013  type->tp_name);
23014  goto bad;
23015  }
23016  } else {
23017  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
23018  PyErr_Clear();
23019  if (PyType_Ready(type) < 0) goto bad;
23020  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
23021  goto bad;
23022  Py_INCREF(type);
23023  cached_type = type;
23024  }
23025 done:
23026  Py_DECREF(fake_module);
23027  return cached_type;
23028 bad:
23029  Py_XDECREF(cached_type);
23030  cached_type = NULL;
23031  goto done;
23032 }
23033 
23034 /* SwapException */
23035  #if CYTHON_FAST_THREAD_STATE
23036 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23037  PyObject *tmp_type, *tmp_value, *tmp_tb;
23038  #if PY_VERSION_HEX >= 0x030700A2
23039  tmp_type = tstate->exc_state.exc_type;
23040  tmp_value = tstate->exc_state.exc_value;
23041  tmp_tb = tstate->exc_state.exc_traceback;
23042  tstate->exc_state.exc_type = *type;
23043  tstate->exc_state.exc_value = *value;
23044  tstate->exc_state.exc_traceback = *tb;
23045  #else
23046  tmp_type = tstate->exc_type;
23047  tmp_value = tstate->exc_value;
23048  tmp_tb = tstate->exc_traceback;
23049  tstate->exc_type = *type;
23050  tstate->exc_value = *value;
23051  tstate->exc_traceback = *tb;
23052  #endif
23053  *type = tmp_type;
23054  *value = tmp_value;
23055  *tb = tmp_tb;
23056 }
23057 #else
23058 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
23059  PyObject *tmp_type, *tmp_value, *tmp_tb;
23060  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
23061  PyErr_SetExcInfo(*type, *value, *tb);
23062  *type = tmp_type;
23063  *value = tmp_value;
23064  *tb = tmp_tb;
23065 }
23066 #endif
23067 
23068 /* PyObjectCallMethod1 */
23069  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23070  PyObject *result = NULL;
23071 #if CYTHON_UNPACK_METHODS
23072  if (likely(PyMethod_Check(method))) {
23073  PyObject *self = PyMethod_GET_SELF(method);
23074  if (likely(self)) {
23075  PyObject *args;
23076  PyObject *function = PyMethod_GET_FUNCTION(method);
23077  #if CYTHON_FAST_PYCALL
23078  if (PyFunction_Check(function)) {
23079  PyObject *args[2] = {self, arg};
23080  result = __Pyx_PyFunction_FastCall(function, args, 2);
23081  goto done;
23082  }
23083  #endif
23084  #if CYTHON_FAST_PYCCALL
23085  if (__Pyx_PyFastCFunction_Check(function)) {
23086  PyObject *args[2] = {self, arg};
23087  result = __Pyx_PyCFunction_FastCall(function, args, 2);
23088  goto done;
23089  }
23090  #endif
23091  args = PyTuple_New(2);
23092  if (unlikely(!args)) goto done;
23093  Py_INCREF(self);
23094  PyTuple_SET_ITEM(args, 0, self);
23095  Py_INCREF(arg);
23096  PyTuple_SET_ITEM(args, 1, arg);
23097  Py_INCREF(function);
23098  result = __Pyx_PyObject_Call(function, args, NULL);
23099  Py_DECREF(args);
23100  Py_DECREF(function);
23101  return result;
23102  }
23103  }
23104 #endif
23105  result = __Pyx_PyObject_CallOneArg(method, arg);
23106  goto done;
23107 done:
23108  return result;
23109 }
23110 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23111  PyObject *method, *result = NULL;
23112  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
23113  if (unlikely(!method)) goto done;
23114  result = __Pyx__PyObject_CallMethod1(method, arg);
23115 done:
23116  Py_XDECREF(method);
23117  return result;
23118 }
23119 
23120 /* CoroutineBase */
23121  #include <structmember.h>
23122 #include <frameobject.h>
23123 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23124 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23125  PyObject *et, *ev, *tb;
23126  PyObject *value = NULL;
23127  __Pyx_ErrFetch(&et, &ev, &tb);
23128  if (!et) {
23129  Py_XDECREF(tb);
23130  Py_XDECREF(ev);
23131  Py_INCREF(Py_None);
23132  *pvalue = Py_None;
23133  return 0;
23134  }
23135  if (likely(et == PyExc_StopIteration)) {
23136  if (!ev) {
23137  Py_INCREF(Py_None);
23138  value = Py_None;
23139  }
23140 #if PY_VERSION_HEX >= 0x030300A0
23141  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23142  value = ((PyStopIterationObject *)ev)->value;
23143  Py_INCREF(value);
23144  Py_DECREF(ev);
23145  }
23146 #endif
23147  else if (unlikely(PyTuple_Check(ev))) {
23148  if (PyTuple_GET_SIZE(ev) >= 1) {
23149 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23150  value = PyTuple_GET_ITEM(ev, 0);
23151  Py_INCREF(value);
23152 #else
23153  value = PySequence_ITEM(ev, 0);
23154 #endif
23155  } else {
23156  Py_INCREF(Py_None);
23157  value = Py_None;
23158  }
23159  Py_DECREF(ev);
23160  }
23161  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23162  value = ev;
23163  }
23164  if (likely(value)) {
23165  Py_XDECREF(tb);
23166  Py_DECREF(et);
23167  *pvalue = value;
23168  return 0;
23169  }
23170  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23171  __Pyx_ErrRestore(et, ev, tb);
23172  return -1;
23173  }
23174  PyErr_NormalizeException(&et, &ev, &tb);
23175  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23176  __Pyx_ErrRestore(et, ev, tb);
23177  return -1;
23178  }
23179  Py_XDECREF(tb);
23180  Py_DECREF(et);
23181 #if PY_VERSION_HEX >= 0x030300A0
23182  value = ((PyStopIterationObject *)ev)->value;
23183  Py_INCREF(value);
23184  Py_DECREF(ev);
23185 #else
23186  {
23187  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23188  Py_DECREF(ev);
23189  if (likely(args)) {
23190  value = PySequence_GetItem(args, 0);
23191  Py_DECREF(args);
23192  }
23193  if (unlikely(!value)) {
23194  __Pyx_ErrRestore(NULL, NULL, NULL);
23195  Py_INCREF(Py_None);
23196  value = Py_None;
23197  }
23198  }
23199 #endif
23200  *pvalue = value;
23201  return 0;
23202 }
23203 static CYTHON_INLINE
23204 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
23205  PyObject *exc_type = self->exc_type;
23206  PyObject *exc_value = self->exc_value;
23207  PyObject *exc_traceback = self->exc_traceback;
23208  self->exc_type = NULL;
23209  self->exc_value = NULL;
23210  self->exc_traceback = NULL;
23211  Py_XDECREF(exc_type);
23212  Py_XDECREF(exc_value);
23213  Py_XDECREF(exc_traceback);
23214 }
23215 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23216 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23217  const char *msg;
23218  if (0) {
23219  #ifdef __Pyx_Coroutine_USED
23220  } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
23221  msg = "coroutine already executing";
23222  #endif
23223  #ifdef __Pyx_AsyncGen_USED
23224  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
23225  msg = "async generator already executing";
23226  #endif
23227  } else {
23228  msg = "generator already executing";
23229  }
23230  PyErr_SetString(PyExc_ValueError, msg);
23231 }
23232 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
23233 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
23234  const char *msg;
23235  if (0) {
23236  #ifdef __Pyx_Coroutine_USED
23237  } else if (__Pyx_Coroutine_CheckExact(gen)) {
23238  msg = "can't send non-None value to a just-started coroutine";
23239  #endif
23240  #ifdef __Pyx_AsyncGen_USED
23241  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
23242  msg = "can't send non-None value to a just-started async generator";
23243  #endif
23244  } else {
23245  msg = "can't send non-None value to a just-started generator";
23246  }
23247  PyErr_SetString(PyExc_TypeError, msg);
23248 }
23249 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
23250 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
23251  #ifdef __Pyx_Coroutine_USED
23252  if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
23253  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
23254  } else
23255  #endif
23256  if (value) {
23257  #ifdef __Pyx_AsyncGen_USED
23258  if (__Pyx_AsyncGen_CheckExact(gen))
23259  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
23260  else
23261  #endif
23262  PyErr_SetNone(PyExc_StopIteration);
23263  }
23264 }
23265 static
23266 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
23267  __Pyx_PyThreadState_declare
23268  PyThreadState *tstate;
23269  PyObject *retval;
23270  assert(!self->is_running);
23271  if (unlikely(self->resume_label == 0)) {
23272  if (unlikely(value && value != Py_None)) {
23273  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
23274  }
23275  }
23276  if (unlikely(self->resume_label == -1)) {
23277  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
23278  }
23279 #if CYTHON_FAST_THREAD_STATE
23280  __Pyx_PyThreadState_assign
23281  tstate = __pyx_tstate;
23282 #else
23283  tstate = __Pyx_PyThreadState_Current;
23284 #endif
23285  if (self->exc_type) {
23286 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23287 #else
23288  if (self->exc_traceback) {
23289  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23290  PyFrameObject *f = tb->tb_frame;
23291  Py_XINCREF(tstate->frame);
23292  assert(f->f_back == NULL);
23293  f->f_back = tstate->frame;
23294  }
23295 #endif
23296  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
23297  &self->exc_traceback);
23298  } else {
23299  __Pyx_Coroutine_ExceptionClear(self);
23300  __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
23301  }
23302  self->is_running = 1;
23303  retval = self->body((PyObject *) self, tstate, value);
23304  self->is_running = 0;
23305  return retval;
23306 }
23307 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
23308  if (likely(self->exc_traceback)) {
23309 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23310 #else
23311  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23312  PyFrameObject *f = tb->tb_frame;
23313  Py_CLEAR(f->f_back);
23314 #endif
23315  }
23316 }
23317 static CYTHON_INLINE
23318 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23319  if (unlikely(!retval)) {
23320  __Pyx_PyThreadState_declare
23321  __Pyx_PyThreadState_assign
23322  if (!__Pyx_PyErr_Occurred()) {
23323  PyObject *exc = PyExc_StopIteration;
23324  #ifdef __Pyx_AsyncGen_USED
23325  if (__Pyx_AsyncGen_CheckExact(gen))
23326  exc = __Pyx_PyExc_StopAsyncIteration;
23327  #endif
23328  __Pyx_PyErr_SetNone(exc);
23329  }
23330  }
23331  return retval;
23332 }
23333 static CYTHON_INLINE
23334 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23335  PyObject *ret;
23336  PyObject *val = NULL;
23337  __Pyx_Coroutine_Undelegate(gen);
23338  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23339  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23340  Py_XDECREF(val);
23341  return ret;
23342 }
23343 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23344  PyObject *retval;
23345  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23346  PyObject *yf = gen->yieldfrom;
23347  if (unlikely(gen->is_running))
23348  return __Pyx_Coroutine_AlreadyRunningError(gen);
23349  if (yf) {
23350  PyObject *ret;
23351  gen->is_running = 1;
23352  #ifdef __Pyx_Generator_USED
23353  if (__Pyx_Generator_CheckExact(yf)) {
23354  ret = __Pyx_Coroutine_Send(yf, value);
23355  } else
23356  #endif
23357  #ifdef __Pyx_Coroutine_USED
23358  if (__Pyx_Coroutine_CheckExact(yf)) {
23359  ret = __Pyx_Coroutine_Send(yf, value);
23360  } else
23361  #endif
23362  #ifdef __Pyx_AsyncGen_USED
23363  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23364  ret = __Pyx_async_gen_asend_send(yf, value);
23365  } else
23366  #endif
23367  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23368  if (PyGen_CheckExact(yf)) {
23369  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23370  } else
23371  #endif
23372  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23373  if (PyCoro_CheckExact(yf)) {
23374  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23375  } else
23376  #endif
23377  {
23378  if (value == Py_None)
23379  ret = Py_TYPE(yf)->tp_iternext(yf);
23380  else
23381  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23382  }
23383  gen->is_running = 0;
23384  if (likely(ret)) {
23385  return ret;
23386  }
23387  retval = __Pyx_Coroutine_FinishDelegation(gen);
23388  } else {
23389  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23390  }
23391  return __Pyx_Coroutine_MethodReturn(self, retval);
23392 }
23393 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23394  PyObject *retval = NULL;
23395  int err = 0;
23396  #ifdef __Pyx_Generator_USED
23397  if (__Pyx_Generator_CheckExact(yf)) {
23398  retval = __Pyx_Coroutine_Close(yf);
23399  if (!retval)
23400  return -1;
23401  } else
23402  #endif
23403  #ifdef __Pyx_Coroutine_USED
23404  if (__Pyx_Coroutine_CheckExact(yf)) {
23405  retval = __Pyx_Coroutine_Close(yf);
23406  if (!retval)
23407  return -1;
23408  } else
23409  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23410  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
23411  if (!retval)
23412  return -1;
23413  } else
23414  #endif
23415  #ifdef __Pyx_AsyncGen_USED
23416  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23417  retval = __Pyx_async_gen_asend_close(yf, NULL);
23418  } else
23419  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23420  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23421  } else
23422  #endif
23423  {
23424  PyObject *meth;
23425  gen->is_running = 1;
23426  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23427  if (unlikely(!meth)) {
23428  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23429  PyErr_WriteUnraisable(yf);
23430  }
23431  PyErr_Clear();
23432  } else {
23433  retval = PyObject_CallFunction(meth, NULL);
23434  Py_DECREF(meth);
23435  if (!retval)
23436  err = -1;
23437  }
23438  gen->is_running = 0;
23439  }
23440  Py_XDECREF(retval);
23441  return err;
23442 }
23443 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23444  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23445  PyObject *yf = gen->yieldfrom;
23446  if (unlikely(gen->is_running))
23447  return __Pyx_Coroutine_AlreadyRunningError(gen);
23448  if (yf) {
23449  PyObject *ret;
23450  gen->is_running = 1;
23451  #ifdef __Pyx_Generator_USED
23452  if (__Pyx_Generator_CheckExact(yf)) {
23453  ret = __Pyx_Generator_Next(yf);
23454  } else
23455  #endif
23456  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23457  if (PyGen_CheckExact(yf)) {
23458  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23459  } else
23460  #endif
23461  ret = Py_TYPE(yf)->tp_iternext(yf);
23462  gen->is_running = 0;
23463  if (likely(ret)) {
23464  return ret;
23465  }
23466  return __Pyx_Coroutine_FinishDelegation(gen);
23467  }
23468  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23469 }
23470 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23471  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23472  PyObject *retval, *raised_exception;
23473  PyObject *yf = gen->yieldfrom;
23474  int err = 0;
23475  if (unlikely(gen->is_running))
23476  return __Pyx_Coroutine_AlreadyRunningError(gen);
23477  if (yf) {
23478  Py_INCREF(yf);
23479  err = __Pyx_Coroutine_CloseIter(gen, yf);
23480  __Pyx_Coroutine_Undelegate(gen);
23481  Py_DECREF(yf);
23482  }
23483  if (err == 0)
23484  PyErr_SetNone(PyExc_GeneratorExit);
23485  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23486  if (unlikely(retval)) {
23487  const char *msg;
23488  Py_DECREF(retval);
23489  if ((0)) {
23490  #ifdef __Pyx_Coroutine_USED
23491  } else if (__Pyx_Coroutine_CheckExact(self)) {
23492  msg = "coroutine ignored GeneratorExit";
23493  #endif
23494  #ifdef __Pyx_AsyncGen_USED
23495  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23496 #if PY_VERSION_HEX < 0x03060000
23497  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23498 #else
23499  msg = "async generator ignored GeneratorExit";
23500 #endif
23501  #endif
23502  } else {
23503  msg = "generator ignored GeneratorExit";
23504  }
23505  PyErr_SetString(PyExc_RuntimeError, msg);
23506  return NULL;
23507  }
23508  raised_exception = PyErr_Occurred();
23509  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23510  if (raised_exception) PyErr_Clear();
23511  Py_INCREF(Py_None);
23512  return Py_None;
23513  }
23514  return NULL;
23515 }
23516 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23517  PyObject *args, int close_on_genexit) {
23518  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23519  PyObject *yf = gen->yieldfrom;
23520  if (unlikely(gen->is_running))
23521  return __Pyx_Coroutine_AlreadyRunningError(gen);
23522  if (yf) {
23523  PyObject *ret;
23524  Py_INCREF(yf);
23525  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23526  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23527  Py_DECREF(yf);
23528  __Pyx_Coroutine_Undelegate(gen);
23529  if (err < 0)
23530  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23531  goto throw_here;
23532  }
23533  gen->is_running = 1;
23534  if (0
23535  #ifdef __Pyx_Generator_USED
23536  || __Pyx_Generator_CheckExact(yf)
23537  #endif
23538  #ifdef __Pyx_Coroutine_USED
23539  || __Pyx_Coroutine_CheckExact(yf)
23540  #endif
23541  ) {
23542  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23543  #ifdef __Pyx_Coroutine_USED
23544  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23545  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23546  #endif
23547  } else {
23548  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23549  if (unlikely(!meth)) {
23550  Py_DECREF(yf);
23551  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23552  gen->is_running = 0;
23553  return NULL;
23554  }
23555  PyErr_Clear();
23556  __Pyx_Coroutine_Undelegate(gen);
23557  gen->is_running = 0;
23558  goto throw_here;
23559  }
23560  if (likely(args)) {
23561  ret = PyObject_CallObject(meth, args);
23562  } else {
23563  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23564  }
23565  Py_DECREF(meth);
23566  }
23567  gen->is_running = 0;
23568  Py_DECREF(yf);
23569  if (!ret) {
23570  ret = __Pyx_Coroutine_FinishDelegation(gen);
23571  }
23572  return __Pyx_Coroutine_MethodReturn(self, ret);
23573  }
23574 throw_here:
23575  __Pyx_Raise(typ, val, tb, NULL);
23576  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23577 }
23578 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23579  PyObject *typ;
23580  PyObject *val = NULL;
23581  PyObject *tb = NULL;
23582  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23583  return NULL;
23584  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23585 }
23586 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23587  Py_VISIT(gen->closure);
23588  Py_VISIT(gen->classobj);
23589  Py_VISIT(gen->yieldfrom);
23590  Py_VISIT(gen->exc_type);
23591  Py_VISIT(gen->exc_value);
23592  Py_VISIT(gen->exc_traceback);
23593  return 0;
23594 }
23595 static int __Pyx_Coroutine_clear(PyObject *self) {
23596  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23597  Py_CLEAR(gen->closure);
23598  Py_CLEAR(gen->classobj);
23599  Py_CLEAR(gen->yieldfrom);
23600  Py_CLEAR(gen->exc_type);
23601  Py_CLEAR(gen->exc_value);
23602  Py_CLEAR(gen->exc_traceback);
23603 #ifdef __Pyx_AsyncGen_USED
23604  if (__Pyx_AsyncGen_CheckExact(self)) {
23605  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23606  }
23607 #endif
23608  Py_CLEAR(gen->gi_name);
23609  Py_CLEAR(gen->gi_qualname);
23610  Py_CLEAR(gen->gi_modulename);
23611  return 0;
23612 }
23613 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23614  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23615  PyObject_GC_UnTrack(gen);
23616  if (gen->gi_weakreflist != NULL)
23617  PyObject_ClearWeakRefs(self);
23618  if (gen->resume_label >= 0) {
23619  PyObject_GC_Track(self);
23620 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23621  if (PyObject_CallFinalizerFromDealloc(self))
23622 #else
23623  Py_TYPE(gen)->tp_del(self);
23624  if (self->ob_refcnt > 0)
23625 #endif
23626  {
23627  return;
23628  }
23629  PyObject_GC_UnTrack(self);
23630  }
23631 #ifdef __Pyx_AsyncGen_USED
23632  if (__Pyx_AsyncGen_CheckExact(self)) {
23633  /* We have to handle this case for asynchronous generators
23634  right here, because this code has to be between UNTRACK
23635  and GC_Del. */
23636  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23637  }
23638 #endif
23639  __Pyx_Coroutine_clear(self);
23640  PyObject_GC_Del(gen);
23641 }
23642 static void __Pyx_Coroutine_del(PyObject *self) {
23643  PyObject *error_type, *error_value, *error_traceback;
23644  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23645  __Pyx_PyThreadState_declare
23646  if (gen->resume_label < 0) {
23647  return;
23648  }
23649 #if !CYTHON_USE_TP_FINALIZE
23650  assert(self->ob_refcnt == 0);
23651  self->ob_refcnt = 1;
23652 #endif
23653  __Pyx_PyThreadState_assign
23654  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23655 #ifdef __Pyx_AsyncGen_USED
23656  if (__Pyx_AsyncGen_CheckExact(self)) {
23657  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23658  PyObject *finalizer = agen->ag_finalizer;
23659  if (finalizer && !agen->ag_closed) {
23660  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23661  if (unlikely(!res)) {
23662  PyErr_WriteUnraisable(self);
23663  } else {
23664  Py_DECREF(res);
23665  }
23666  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23667  return;
23668  }
23669  }
23670 #endif
23671  if (unlikely(gen->resume_label == 0 && !error_value)) {
23672 #ifdef __Pyx_Coroutine_USED
23673 #ifdef __Pyx_Generator_USED
23674  if (!__Pyx_Generator_CheckExact(self))
23675 #endif
23676  {
23677  PyObject_GC_UnTrack(self);
23678 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23679  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23680  PyErr_WriteUnraisable(self);
23681 #else
23682  {PyObject *msg;
23683  char *cmsg;
23684  #if CYTHON_COMPILING_IN_PYPY
23685  msg = NULL;
23686  cmsg = (char*) "coroutine was never awaited";
23687  #else
23688  char *cname;
23689  PyObject *qualname;
23690  qualname = gen->gi_qualname;
23691  cname = PyString_AS_STRING(qualname);
23692  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23693  if (unlikely(!msg)) {
23694  PyErr_Clear();
23695  cmsg = (char*) "coroutine was never awaited";
23696  } else {
23697  cmsg = PyString_AS_STRING(msg);
23698  }
23699  #endif
23700  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23701  PyErr_WriteUnraisable(self);
23702  Py_XDECREF(msg);}
23703 #endif
23704  PyObject_GC_Track(self);
23705  }
23706 #endif
23707  } else {
23708  PyObject *res = __Pyx_Coroutine_Close(self);
23709  if (unlikely(!res)) {
23710  if (PyErr_Occurred())
23711  PyErr_WriteUnraisable(self);
23712  } else {
23713  Py_DECREF(res);
23714  }
23715  }
23716  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23717 #if !CYTHON_USE_TP_FINALIZE
23718  assert(self->ob_refcnt > 0);
23719  if (--self->ob_refcnt == 0) {
23720  return;
23721  }
23722  {
23723  Py_ssize_t refcnt = self->ob_refcnt;
23724  _Py_NewReference(self);
23725  self->ob_refcnt = refcnt;
23726  }
23727 #if CYTHON_COMPILING_IN_CPYTHON
23728  assert(PyType_IS_GC(self->ob_type) &&
23729  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23730  _Py_DEC_REFTOTAL;
23731 #endif
23732 #ifdef COUNT_ALLOCS
23733  --Py_TYPE(self)->tp_frees;
23734  --Py_TYPE(self)->tp_allocs;
23735 #endif
23736 #endif
23737 }
23738 static PyObject *
23739 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
23740 {
23741  PyObject *name = self->gi_name;
23742  if (unlikely(!name)) name = Py_None;
23743  Py_INCREF(name);
23744  return name;
23745 }
23746 static int
23747 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
23748 {
23749  PyObject *tmp;
23750 #if PY_MAJOR_VERSION >= 3
23751  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23752 #else
23753  if (unlikely(value == NULL || !PyString_Check(value))) {
23754 #endif
23755  PyErr_SetString(PyExc_TypeError,
23756  "__name__ must be set to a string object");
23757  return -1;
23758  }
23759  tmp = self->gi_name;
23760  Py_INCREF(value);
23761  self->gi_name = value;
23762  Py_XDECREF(tmp);
23763  return 0;
23764 }
23765 static PyObject *
23766 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
23767 {
23768  PyObject *name = self->gi_qualname;
23769  if (unlikely(!name)) name = Py_None;
23770  Py_INCREF(name);
23771  return name;
23772 }
23773 static int
23774 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
23775 {
23776  PyObject *tmp;
23777 #if PY_MAJOR_VERSION >= 3
23778  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23779 #else
23780  if (unlikely(value == NULL || !PyString_Check(value))) {
23781 #endif
23782  PyErr_SetString(PyExc_TypeError,
23783  "__qualname__ must be set to a string object");
23784  return -1;
23785  }
23786  tmp = self->gi_qualname;
23787  Py_INCREF(value);
23788  self->gi_qualname = value;
23789  Py_XDECREF(tmp);
23790  return 0;
23791 }
23792 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23793  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
23794  PyObject *name, PyObject *qualname, PyObject *module_name) {
23795  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23796  if (unlikely(!gen))
23797  return NULL;
23798  return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
23799 }
23800 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23801  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
23802  PyObject *name, PyObject *qualname, PyObject *module_name) {
23803  gen->body = body;
23804  gen->closure = closure;
23805  Py_XINCREF(closure);
23806  gen->is_running = 0;
23807  gen->resume_label = 0;
23808  gen->classobj = NULL;
23809  gen->yieldfrom = NULL;
23810  gen->exc_type = NULL;
23811  gen->exc_value = NULL;
23812  gen->exc_traceback = NULL;
23813  gen->gi_weakreflist = NULL;
23814  Py_XINCREF(qualname);
23815  gen->gi_qualname = qualname;
23816  Py_XINCREF(name);
23817  gen->gi_name = name;
23818  Py_XINCREF(module_name);
23819  gen->gi_modulename = module_name;
23820  PyObject_GC_Track(gen);
23821  return gen;
23822 }
23823 
23824 /* PatchModuleWithCoroutine */
23825  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23826 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23827  int result;
23828  PyObject *globals, *result_obj;
23829  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23830  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23831  #ifdef __Pyx_Coroutine_USED
23832  (PyObject*)__pyx_CoroutineType);
23833  #else
23834  Py_None);
23835  #endif
23836  if (unlikely(result < 0)) goto ignore;
23837  result = PyDict_SetItemString(globals, "_cython_generator_type",
23838  #ifdef __Pyx_Generator_USED
23839  (PyObject*)__pyx_GeneratorType);
23840  #else
23841  Py_None);
23842  #endif
23843  if (unlikely(result < 0)) goto ignore;
23844  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23845  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23846  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23847  if (unlikely(!result_obj)) goto ignore;
23848  Py_DECREF(result_obj);
23849  Py_DECREF(globals);
23850  return module;
23851 ignore:
23852  Py_XDECREF(globals);
23853  PyErr_WriteUnraisable(module);
23854  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23855  Py_DECREF(module);
23856  module = NULL;
23857  }
23858 #else
23859  py_code++;
23860 #endif
23861  return module;
23862 }
23863 
23864 /* PatchGeneratorABC */
23865  #ifndef CYTHON_REGISTER_ABCS
23866 #define CYTHON_REGISTER_ABCS 1
23867 #endif
23868 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23869 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23870 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23871  module = __Pyx_Coroutine_patch_module(
23872  module, ""
23873 "if _cython_generator_type is not None:\n"
23874 " try: Generator = _module.Generator\n"
23875 " except AttributeError: pass\n"
23876 " else: Generator.register(_cython_generator_type)\n"
23877 "if _cython_coroutine_type is not None:\n"
23878 " try: Coroutine = _module.Coroutine\n"
23879 " except AttributeError: pass\n"
23880 " else: Coroutine.register(_cython_coroutine_type)\n"
23881  );
23882  return module;
23883 }
23884 #endif
23885 static int __Pyx_patch_abc(void) {
23886 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23887  static int abc_patched = 0;
23888  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23889  PyObject *module;
23890  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23891  if (!module) {
23892  PyErr_WriteUnraisable(NULL);
23893  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23894  ((PY_MAJOR_VERSION >= 3) ?
23895  "Cython module failed to register with collections.abc module" :
23896  "Cython module failed to register with collections module"), 1) < 0)) {
23897  return -1;
23898  }
23899  } else {
23900  module = __Pyx_patch_abc_module(module);
23901  abc_patched = 1;
23902  if (unlikely(!module))
23903  return -1;
23904  Py_DECREF(module);
23905  }
23906  module = PyImport_ImportModule("backports_abc");
23907  if (module) {
23908  module = __Pyx_patch_abc_module(module);
23909  Py_XDECREF(module);
23910  }
23911  if (!module) {
23912  PyErr_Clear();
23913  }
23914  }
23915 #else
23916  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23917 #endif
23918  return 0;
23919 }
23920 
23921 /* Generator */
23922  static PyMethodDef __pyx_Generator_methods[] = {
23923  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23924  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23925  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23926  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23927  {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
23928  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23929  {0, 0, 0, 0}
23930 };
23931 static PyMemberDef __pyx_Generator_memberlist[] = {
23932  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23933  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23934  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23935  {0, 0, 0, 0, 0}
23936 };
23937 static PyGetSetDef __pyx_Generator_getsets[] = {
23938  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23939  (char*) PyDoc_STR("name of the generator"), 0},
23940  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23941  (char*) PyDoc_STR("qualified name of the generator"), 0},
23942  {0, 0, 0, 0, 0}
23943 };
23944 static PyTypeObject __pyx_GeneratorType_type = {
23945  PyVarObject_HEAD_INIT(0, 0)
23946  "generator",
23947  sizeof(__pyx_CoroutineObject),
23948  0,
23949  (destructor) __Pyx_Coroutine_dealloc,
23950  0,
23951  0,
23952  0,
23953  0,
23954  0,
23955  0,
23956  0,
23957  0,
23958  0,
23959  0,
23960  0,
23961  0,
23962  0,
23963  0,
23964  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23965  0,
23966  (traverseproc) __Pyx_Coroutine_traverse,
23967  0,
23968  0,
23969  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23970  0,
23971  (iternextfunc) __Pyx_Generator_Next,
23972  __pyx_Generator_methods,
23973  __pyx_Generator_memberlist,
23974  __pyx_Generator_getsets,
23975  0,
23976  0,
23977  0,
23978  0,
23979  0,
23980  0,
23981  0,
23982  0,
23983  0,
23984  0,
23985  0,
23986  0,
23987  0,
23988  0,
23989  0,
23990 #if CYTHON_USE_TP_FINALIZE
23991  0,
23992 #else
23993  __Pyx_Coroutine_del,
23994 #endif
23995  0,
23996 #if CYTHON_USE_TP_FINALIZE
23997  __Pyx_Coroutine_del,
23998 #elif PY_VERSION_HEX >= 0x030400a1
23999  0,
24000 #endif
24001 };
24002 static int __pyx_Generator_init(void) {
24003  __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
24004  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
24005  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
24006  if (unlikely(!__pyx_GeneratorType)) {
24007  return -1;
24008  }
24009  return 0;
24010 }
24011 
24012 /* CheckBinaryVersion */
24013  static int __Pyx_check_binary_version(void) {
24014  char ctversion[4], rtversion[4];
24015  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
24016  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
24017  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
24018  char message[200];
24019  PyOS_snprintf(message, sizeof(message),
24020  "compiletime version %s of module '%.100s' "
24021  "does not match runtime version %s",
24022  ctversion, __Pyx_MODULE_NAME, rtversion);
24023  return PyErr_WarnEx(NULL, message, 1);
24024  }
24025  return 0;
24026 }
24027 
24028 /* InitStrings */
24029  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24030  while (t->p) {
24031  #if PY_MAJOR_VERSION < 3
24032  if (t->is_unicode) {
24033  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24034  } else if (t->intern) {
24035  *t->p = PyString_InternFromString(t->s);
24036  } else {
24037  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24038  }
24039  #else
24040  if (t->is_unicode | t->is_str) {
24041  if (t->intern) {
24042  *t->p = PyUnicode_InternFromString(t->s);
24043  } else if (t->encoding) {
24044  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24045  } else {
24046  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24047  }
24048  } else {
24049  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24050  }
24051  #endif
24052  if (!*t->p)
24053  return -1;
24054  if (PyObject_Hash(*t->p) == -1)
24055  PyErr_Clear();
24056  ++t;
24057  }
24058  return 0;
24059 }
24060 
24061 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24062  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24063 }
24064 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24065  Py_ssize_t ignore;
24066  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24067 }
24068 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24069 #if !CYTHON_PEP393_ENABLED
24070 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24071  char* defenc_c;
24072  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24073  if (!defenc) return NULL;
24074  defenc_c = PyBytes_AS_STRING(defenc);
24075 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24076  {
24077  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24078  char* c;
24079  for (c = defenc_c; c < end; c++) {
24080  if ((unsigned char) (*c) >= 128) {
24081  PyUnicode_AsASCIIString(o);
24082  return NULL;
24083  }
24084  }
24085  }
24086 #endif
24087  *length = PyBytes_GET_SIZE(defenc);
24088  return defenc_c;
24089 }
24090 #else
24091 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24092  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24093 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24094  if (likely(PyUnicode_IS_ASCII(o))) {
24095  *length = PyUnicode_GET_LENGTH(o);
24096  return PyUnicode_AsUTF8(o);
24097  } else {
24098  PyUnicode_AsASCIIString(o);
24099  return NULL;
24100  }
24101 #else
24102  return PyUnicode_AsUTF8AndSize(o, length);
24103 #endif
24104 }
24105 #endif
24106 #endif
24107 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24108 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24109  if (
24110 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24111  __Pyx_sys_getdefaultencoding_not_ascii &&
24112 #endif
24113  PyUnicode_Check(o)) {
24114  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24115  } else
24116 #endif
24117 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24118  if (PyByteArray_Check(o)) {
24119  *length = PyByteArray_GET_SIZE(o);
24120  return PyByteArray_AS_STRING(o);
24121  } else
24122 #endif
24123  {
24124  char* result;
24125  int r = PyBytes_AsStringAndSize(o, &result, length);
24126  if (unlikely(r < 0)) {
24127  return NULL;
24128  } else {
24129  return result;
24130  }
24131  }
24132 }
24133 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24134  int is_true = x == Py_True;
24135  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24136  else return PyObject_IsTrue(x);
24137 }
24138 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24139 #if PY_MAJOR_VERSION >= 3
24140  if (PyLong_Check(result)) {
24141  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24142  "__int__ returned non-int (type %.200s). "
24143  "The ability to return an instance of a strict subclass of int "
24144  "is deprecated, and may be removed in a future version of Python.",
24145  Py_TYPE(result)->tp_name)) {
24146  Py_DECREF(result);
24147  return NULL;
24148  }
24149  return result;
24150  }
24151 #endif
24152  PyErr_Format(PyExc_TypeError,
24153  "__%.4s__ returned non-%.4s (type %.200s)",
24154  type_name, type_name, Py_TYPE(result)->tp_name);
24155  Py_DECREF(result);
24156  return NULL;
24157 }
24158 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24159 #if CYTHON_USE_TYPE_SLOTS
24160  PyNumberMethods *m;
24161 #endif
24162  const char *name = NULL;
24163  PyObject *res = NULL;
24164 #if PY_MAJOR_VERSION < 3
24165  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24166 #else
24167  if (likely(PyLong_Check(x)))
24168 #endif
24169  return __Pyx_NewRef(x);
24170 #if CYTHON_USE_TYPE_SLOTS
24171  m = Py_TYPE(x)->tp_as_number;
24172  #if PY_MAJOR_VERSION < 3
24173  if (m && m->nb_int) {
24174  name = "int";
24175  res = m->nb_int(x);
24176  }
24177  else if (m && m->nb_long) {
24178  name = "long";
24179  res = m->nb_long(x);
24180  }
24181  #else
24182  if (likely(m && m->nb_int)) {
24183  name = "int";
24184  res = m->nb_int(x);
24185  }
24186  #endif
24187 #else
24188  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24189  res = PyNumber_Int(x);
24190  }
24191 #endif
24192  if (likely(res)) {
24193 #if PY_MAJOR_VERSION < 3
24194  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24195 #else
24196  if (unlikely(!PyLong_CheckExact(res))) {
24197 #endif
24198  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24199  }
24200  }
24201  else if (!PyErr_Occurred()) {
24202  PyErr_SetString(PyExc_TypeError,
24203  "an integer is required");
24204  }
24205  return res;
24206 }
24207 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24208  Py_ssize_t ival;
24209  PyObject *x;
24210 #if PY_MAJOR_VERSION < 3
24211  if (likely(PyInt_CheckExact(b))) {
24212  if (sizeof(Py_ssize_t) >= sizeof(long))
24213  return PyInt_AS_LONG(b);
24214  else
24215  return PyInt_AsSsize_t(x);
24216  }
24217 #endif
24218  if (likely(PyLong_CheckExact(b))) {
24219  #if CYTHON_USE_PYLONG_INTERNALS
24220  const digit* digits = ((PyLongObject*)b)->ob_digit;
24221  const Py_ssize_t size = Py_SIZE(b);
24222  if (likely(__Pyx_sst_abs(size) <= 1)) {
24223  ival = likely(size) ? digits[0] : 0;
24224  if (size == -1) ival = -ival;
24225  return ival;
24226  } else {
24227  switch (size) {
24228  case 2:
24229  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24230  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24231  }
24232  break;
24233  case -2:
24234  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24235  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24236  }
24237  break;
24238  case 3:
24239  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24240  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24241  }
24242  break;
24243  case -3:
24244  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24245  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24246  }
24247  break;
24248  case 4:
24249  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24250  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]));
24251  }
24252  break;
24253  case -4:
24254  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24255  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]));
24256  }
24257  break;
24258  }
24259  }
24260  #endif
24261  return PyLong_AsSsize_t(b);
24262  }
24263  x = PyNumber_Index(b);
24264  if (!x) return -1;
24265  ival = PyInt_AsSsize_t(x);
24266  Py_DECREF(x);
24267  return ival;
24268 }
24269 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24270  return PyInt_FromSize_t(ival);
24271 }
24272 
24273 
24274 #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