glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.28.3 */
2 
3 /* BEGIN: Cython Metadata
4 {
5  "distutils": {
6  "depends": [
7  "PyClical.h"
8  ],
9  "extra_compile_args": [
10  "-I.",
11  "-I..",
12  "-fno-strict-aliasing",
13  "-Wno-unused",
14  "-Wall",
15  "-std=c++11",
16  "-g",
17  "-O3",
18  "-fmessage-length=0",
19  "-grecord-gcc-switches",
20  "-O2",
21  "-Wall",
22  "-D_FORTIFY_SOURCE=2",
23  "-fstack-protector-strong",
24  "-funwind-tables",
25  "-fasynchronous-unwind-tables",
26  "-fstack-clash-protection",
27  "-g",
28  "-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_28_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 #ifndef __has_attribute
241  #define __has_attribute(x) 0
242 #endif
243 #ifndef __has_cpp_attribute
244  #define __has_cpp_attribute(x) 0
245 #endif
246 #ifndef CYTHON_RESTRICT
247  #if defined(__GNUC__)
248  #define CYTHON_RESTRICT __restrict__
249  #elif defined(_MSC_VER) && _MSC_VER >= 1400
250  #define CYTHON_RESTRICT __restrict
251  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
252  #define CYTHON_RESTRICT restrict
253  #else
254  #define CYTHON_RESTRICT
255  #endif
256 #endif
257 #ifndef CYTHON_UNUSED
258 # if defined(__GNUC__)
259 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
260 # define CYTHON_UNUSED __attribute__ ((__unused__))
261 # else
262 # define CYTHON_UNUSED
263 # endif
264 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
265 # define CYTHON_UNUSED __attribute__ ((__unused__))
266 # else
267 # define CYTHON_UNUSED
268 # endif
269 #endif
270 #ifndef CYTHON_MAYBE_UNUSED_VAR
271 # if defined(__cplusplus)
272  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
273 # else
274 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
275 # endif
276 #endif
277 #ifndef CYTHON_NCP_UNUSED
278 # if CYTHON_COMPILING_IN_CPYTHON
279 # define CYTHON_NCP_UNUSED
280 # else
281 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
282 # endif
283 #endif
284 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
285 #ifdef _MSC_VER
286  #ifndef _MSC_STDINT_H_
287  #if _MSC_VER < 1300
288  typedef unsigned char uint8_t;
289  typedef unsigned int uint32_t;
290  #else
291  typedef unsigned __int8 uint8_t;
292  typedef unsigned __int32 uint32_t;
293  #endif
294  #endif
295 #else
296  #include <stdint.h>
297 #endif
298 #ifndef CYTHON_FALLTHROUGH
299  #if defined(__cplusplus) && __cplusplus >= 201103L
300  #if __has_cpp_attribute(fallthrough)
301  #define CYTHON_FALLTHROUGH [[fallthrough]]
302  #elif __has_cpp_attribute(clang::fallthrough)
303  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
304  #elif __has_cpp_attribute(gnu::fallthrough)
305  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
306  #endif
307  #endif
308  #ifndef CYTHON_FALLTHROUGH
309  #if __has_attribute(fallthrough)
310  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
311  #else
312  #define CYTHON_FALLTHROUGH
313  #endif
314  #endif
315  #if defined(__clang__ ) && defined(__apple_build_version__)
316  #if __apple_build_version__ < 7000000
317  #undef CYTHON_FALLTHROUGH
318  #define CYTHON_FALLTHROUGH
319  #endif
320  #endif
321 #endif
322 
323 #ifndef __cplusplus
324  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
325 #endif
326 #ifndef CYTHON_INLINE
327  #if defined(__clang__)
328  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
329  #else
330  #define CYTHON_INLINE inline
331  #endif
332 #endif
333 template<typename T>
334 void __Pyx_call_destructor(T& x) {
335  x.~T();
336 }
337 template<typename T>
338 class __Pyx_FakeReference {
339  public:
340  __Pyx_FakeReference() : ptr(NULL) { }
341  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
342  T *operator->() { return ptr; }
343  T *operator&() { return ptr; }
344  operator T&() { return *ptr; }
345  template<typename U> bool operator ==(U other) { return *ptr == other; }
346  template<typename U> bool operator !=(U other) { return *ptr != other; }
347  private:
348  T *ptr;
349 };
350 
351 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
352  #define Py_OptimizeFlag 0
353 #endif
354 #define __PYX_BUILD_PY_SSIZE_T "n"
355 #define CYTHON_FORMAT_SSIZE_T "z"
356 #if PY_MAJOR_VERSION < 3
357  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
358  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
359  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
360  #define __Pyx_DefaultClassType PyClass_Type
361 #else
362  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
363  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
364  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
365  #define __Pyx_DefaultClassType PyType_Type
366 #endif
367 #ifndef Py_TPFLAGS_CHECKTYPES
368  #define Py_TPFLAGS_CHECKTYPES 0
369 #endif
370 #ifndef Py_TPFLAGS_HAVE_INDEX
371  #define Py_TPFLAGS_HAVE_INDEX 0
372 #endif
373 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
374  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
375 #endif
376 #ifndef Py_TPFLAGS_HAVE_FINALIZE
377  #define Py_TPFLAGS_HAVE_FINALIZE 0
378 #endif
379 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
380  #ifndef METH_FASTCALL
381  #define METH_FASTCALL 0x80
382  #endif
383  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
384  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
385  Py_ssize_t nargs, PyObject *kwnames);
386 #else
387  #define __Pyx_PyCFunctionFast _PyCFunctionFast
388  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
389 #endif
390 #if CYTHON_FAST_PYCCALL
391 #define __Pyx_PyFastCFunction_Check(func)\
392  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
393 #else
394 #define __Pyx_PyFastCFunction_Check(func) 0
395 #endif
396 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
397  #define PyObject_Malloc(s) PyMem_Malloc(s)
398  #define PyObject_Free(p) PyMem_Free(p)
399  #define PyObject_Realloc(p) PyMem_Realloc(p)
400 #endif
401 #if CYTHON_COMPILING_IN_PYSTON
402  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
403  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
404 #else
405  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
406  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
407 #endif
408 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
409  #define __Pyx_PyThreadState_Current PyThreadState_GET()
410 #elif PY_VERSION_HEX >= 0x03060000
411  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
412 #elif PY_VERSION_HEX >= 0x03000000
413  #define __Pyx_PyThreadState_Current PyThreadState_GET()
414 #else
415  #define __Pyx_PyThreadState_Current _PyThreadState_Current
416 #endif
417 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
418 #include "pythread.h"
419 #define Py_tss_NEEDS_INIT 0
420 typedef int Py_tss_t;
421 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
422  *key = PyThread_create_key();
423  return 0; // PyThread_create_key reports success always
424 }
425 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
426  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
427  *key = Py_tss_NEEDS_INIT;
428  return key;
429 }
430 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
431  PyObject_Free(key);
432 }
433 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
434  return *key != Py_tss_NEEDS_INIT;
435 }
436 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
437  PyThread_delete_key(*key);
438  *key = Py_tss_NEEDS_INIT;
439 }
440 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
441  return PyThread_set_key_value(*key, value);
442 }
443 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
444  return PyThread_get_key_value(*key);
445 }
446 #endif // TSS (Thread Specific Storage) API
447 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
448 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
449 #else
450 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
451 #endif
452 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
453  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
454  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
455 #else
456  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
457  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
458 #endif
459 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
460 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
461 #else
462 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
463 #endif
464 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
465  #define CYTHON_PEP393_ENABLED 1
466  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
467  0 : _PyUnicode_Ready((PyObject *)(op)))
468  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
469  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
470  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
471  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
472  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
473  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
474  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
475  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
476 #else
477  #define CYTHON_PEP393_ENABLED 0
478  #define PyUnicode_1BYTE_KIND 1
479  #define PyUnicode_2BYTE_KIND 2
480  #define PyUnicode_4BYTE_KIND 4
481  #define __Pyx_PyUnicode_READY(op) (0)
482  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
483  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
484  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
485  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
486  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
487  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
488  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
489  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
490 #endif
491 #if CYTHON_COMPILING_IN_PYPY
492  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
493  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
494 #else
495  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
496  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
497  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
498 #endif
499 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
500  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
501 #endif
502 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
503  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
504 #endif
505 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
506  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
507 #endif
508 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
509 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
510 #if PY_MAJOR_VERSION >= 3
511  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
512 #else
513  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
514 #endif
515 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
516  #define PyObject_ASCII(o) PyObject_Repr(o)
517 #endif
518 #if PY_MAJOR_VERSION >= 3
519  #define PyBaseString_Type PyUnicode_Type
520  #define PyStringObject PyUnicodeObject
521  #define PyString_Type PyUnicode_Type
522  #define PyString_Check PyUnicode_Check
523  #define PyString_CheckExact PyUnicode_CheckExact
524  #define PyObject_Unicode PyObject_Str
525 #endif
526 #if PY_MAJOR_VERSION >= 3
527  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
528  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
529 #else
530  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
531  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
532 #endif
533 #ifndef PySet_CheckExact
534  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
535 #endif
536 #if CYTHON_ASSUME_SAFE_MACROS
537  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
538 #else
539  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
540 #endif
541 #if PY_MAJOR_VERSION >= 3
542  #define PyIntObject PyLongObject
543  #define PyInt_Type PyLong_Type
544  #define PyInt_Check(op) PyLong_Check(op)
545  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
546  #define PyInt_FromString PyLong_FromString
547  #define PyInt_FromUnicode PyLong_FromUnicode
548  #define PyInt_FromLong PyLong_FromLong
549  #define PyInt_FromSize_t PyLong_FromSize_t
550  #define PyInt_FromSsize_t PyLong_FromSsize_t
551  #define PyInt_AsLong PyLong_AsLong
552  #define PyInt_AS_LONG PyLong_AS_LONG
553  #define PyInt_AsSsize_t PyLong_AsSsize_t
554  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
555  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
556  #define PyNumber_Int PyNumber_Long
557 #endif
558 #if PY_MAJOR_VERSION >= 3
559  #define PyBoolObject PyLongObject
560 #endif
561 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
562  #ifndef PyUnicode_InternFromString
563  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
564  #endif
565 #endif
566 #if PY_VERSION_HEX < 0x030200A4
567  typedef long Py_hash_t;
568  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
569  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
570 #else
571  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
572  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
573 #endif
574 #if PY_MAJOR_VERSION >= 3
575  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
576 #else
577  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
578 #endif
579 #if CYTHON_USE_ASYNC_SLOTS
580  #if PY_VERSION_HEX >= 0x030500B1
581  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
582  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
583  #else
584  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
585  #endif
586 #else
587  #define __Pyx_PyType_AsAsync(obj) NULL
588 #endif
589 #ifndef __Pyx_PyAsyncMethodsStruct
590  typedef struct {
591  unaryfunc am_await;
592  unaryfunc am_aiter;
593  unaryfunc am_anext;
594  } __Pyx_PyAsyncMethodsStruct;
595 #endif
596 
597 #if defined(WIN32) || defined(MS_WINDOWS)
598  #define _USE_MATH_DEFINES
599 #endif
600 #include <math.h>
601 #ifdef NAN
602 #define __PYX_NAN() ((float) NAN)
603 #else
604 static CYTHON_INLINE float __PYX_NAN() {
605  float value;
606  memset(&value, 0xFF, sizeof(value));
607  return value;
608 }
609 #endif
610 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
611 #define __Pyx_truncl trunc
612 #else
613 #define __Pyx_truncl truncl
614 #endif
615 
616 
617 #define __PYX_ERR(f_index, lineno, Ln_error) \
618 { \
619  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
620 }
621 
622 #ifndef __PYX_EXTERN_C
623  #ifdef __cplusplus
624  #define __PYX_EXTERN_C extern "C"
625  #else
626  #define __PYX_EXTERN_C extern
627  #endif
628 #endif
629 
630 #define __PYX_HAVE__PyClical
631 #define __PYX_HAVE_API__PyClical
632 /* Early includes */
633 #include "ios"
634 #include "new"
635 #include "stdexcept"
636 #include "typeinfo"
637 #include <vector>
638 #include "PyClical.h"
639 #ifdef _OPENMP
640 #include <omp.h>
641 #endif /* _OPENMP */
642 
643 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
644 #define CYTHON_WITHOUT_ASSERTIONS
645 #endif
646 
647 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
648  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
649 
650 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
651 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
652 #define __PYX_DEFAULT_STRING_ENCODING ""
653 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
654 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
655 #define __Pyx_uchar_cast(c) ((unsigned char)c)
656 #define __Pyx_long_cast(x) ((long)x)
657 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
658  (sizeof(type) < sizeof(Py_ssize_t)) ||\
659  (sizeof(type) > sizeof(Py_ssize_t) &&\
660  likely(v < (type)PY_SSIZE_T_MAX ||\
661  v == (type)PY_SSIZE_T_MAX) &&\
662  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
663  v == (type)PY_SSIZE_T_MIN))) ||\
664  (sizeof(type) == sizeof(Py_ssize_t) &&\
665  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
666  v == (type)PY_SSIZE_T_MAX))) )
667 #if defined (__cplusplus) && __cplusplus >= 201103L
668  #include <cstdlib>
669  #define __Pyx_sst_abs(value) std::abs(value)
670 #elif SIZEOF_INT >= SIZEOF_SIZE_T
671  #define __Pyx_sst_abs(value) abs(value)
672 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
673  #define __Pyx_sst_abs(value) labs(value)
674 #elif defined (_MSC_VER)
675  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
676 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
677  #define __Pyx_sst_abs(value) llabs(value)
678 #elif defined (__GNUC__)
679  #define __Pyx_sst_abs(value) __builtin_llabs(value)
680 #else
681  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
682 #endif
683 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
684 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
685 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
686 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
687 #define __Pyx_PyBytes_FromString PyBytes_FromString
688 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
689 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
690 #if PY_MAJOR_VERSION < 3
691  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
692  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
693 #else
694  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
695  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
696 #endif
697 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
698 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
699 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
700 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
701 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
702 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
703 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
704 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
705 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
706 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
707 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
708 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
709 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
710 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
711 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
712 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
713 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
714  const Py_UNICODE *u_end = u;
715  while (*u_end++) ;
716  return (size_t)(u_end - u - 1);
717 }
718 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
719 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
720 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
721 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
722 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
723 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
724 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
725 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
726 #define __Pyx_PySequence_Tuple(obj)\
727  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
728 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
729 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
730 #if CYTHON_ASSUME_SAFE_MACROS
731 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
732 #else
733 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
734 #endif
735 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
736 #if PY_MAJOR_VERSION >= 3
737 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
738 #else
739 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
740 #endif
741 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
742 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
743 static int __Pyx_sys_getdefaultencoding_not_ascii;
744 static int __Pyx_init_sys_getdefaultencoding_params(void) {
745  PyObject* sys;
746  PyObject* default_encoding = NULL;
747  PyObject* ascii_chars_u = NULL;
748  PyObject* ascii_chars_b = NULL;
749  const char* default_encoding_c;
750  sys = PyImport_ImportModule("sys");
751  if (!sys) goto bad;
752  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
753  Py_DECREF(sys);
754  if (!default_encoding) goto bad;
755  default_encoding_c = PyBytes_AsString(default_encoding);
756  if (!default_encoding_c) goto bad;
757  if (strcmp(default_encoding_c, "ascii") == 0) {
758  __Pyx_sys_getdefaultencoding_not_ascii = 0;
759  } else {
760  char ascii_chars[128];
761  int c;
762  for (c = 0; c < 128; c++) {
763  ascii_chars[c] = c;
764  }
765  __Pyx_sys_getdefaultencoding_not_ascii = 1;
766  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
767  if (!ascii_chars_u) goto bad;
768  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
769  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
770  PyErr_Format(
771  PyExc_ValueError,
772  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
773  default_encoding_c);
774  goto bad;
775  }
776  Py_DECREF(ascii_chars_u);
777  Py_DECREF(ascii_chars_b);
778  }
779  Py_DECREF(default_encoding);
780  return 0;
781 bad:
782  Py_XDECREF(default_encoding);
783  Py_XDECREF(ascii_chars_u);
784  Py_XDECREF(ascii_chars_b);
785  return -1;
786 }
787 #endif
788 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
789 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
790 #else
791 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
792 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
793 static char* __PYX_DEFAULT_STRING_ENCODING;
794 static int __Pyx_init_sys_getdefaultencoding_params(void) {
795  PyObject* sys;
796  PyObject* default_encoding = NULL;
797  char* default_encoding_c;
798  sys = PyImport_ImportModule("sys");
799  if (!sys) goto bad;
800  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
801  Py_DECREF(sys);
802  if (!default_encoding) goto bad;
803  default_encoding_c = PyBytes_AsString(default_encoding);
804  if (!default_encoding_c) goto bad;
805  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
806  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
807  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
808  Py_DECREF(default_encoding);
809  return 0;
810 bad:
811  Py_XDECREF(default_encoding);
812  return -1;
813 }
814 #endif
815 #endif
816 
817 
818 /* Test for GCC > 2.95 */
819 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
820  #define likely(x) __builtin_expect(!!(x), 1)
821  #define unlikely(x) __builtin_expect(!!(x), 0)
822 #else /* !__GNUC__ or GCC < 2.95 */
823  #define likely(x) (x)
824  #define unlikely(x) (x)
825 #endif /* __GNUC__ */
826 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
827 
828 static PyObject *__pyx_m = NULL;
829 static PyObject *__pyx_d;
830 static PyObject *__pyx_b;
831 static PyObject *__pyx_cython_runtime = NULL;
832 static PyObject *__pyx_empty_tuple;
833 static PyObject *__pyx_empty_bytes;
834 static PyObject *__pyx_empty_unicode;
835 static int __pyx_lineno;
836 static int __pyx_clineno = 0;
837 static const char * __pyx_cfilenm= __FILE__;
838 static const char *__pyx_filename;
839 
840 
841 static const char *__pyx_f[] = {
842  "PyClical.pyx",
843  "stringsource",
844 };
845 
846 /*--- Type declarations ---*/
847 struct __pyx_obj_8PyClical_index_set;
848 struct __pyx_obj_8PyClical_clifford;
849 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
850 struct __pyx_opt_args_8PyClical_sqrt;
851 struct __pyx_opt_args_8PyClical_log;
852 struct __pyx_opt_args_8PyClical_cos;
853 struct __pyx_opt_args_8PyClical_acos;
854 struct __pyx_opt_args_8PyClical_acosh;
855 struct __pyx_opt_args_8PyClical_sin;
856 struct __pyx_opt_args_8PyClical_asin;
857 struct __pyx_opt_args_8PyClical_asinh;
858 struct __pyx_opt_args_8PyClical_tan;
859 struct __pyx_opt_args_8PyClical_atan;
860 struct __pyx_opt_args_8PyClical_atanh;
861 struct __pyx_opt_args_8PyClical_random_clifford;
862 
863 /* "PyClical.pyx":1542
864  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
865  *
866  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
867  * """
868  * Square root of multivector with optional complexifier.
869  */
870 struct __pyx_opt_args_8PyClical_sqrt {
871  int __pyx_n;
872  PyObject *i;
873 };
874 
875 /* "PyClical.pyx":1579
876  * return clifford().wrap( glucat.exp(toClifford(obj)) )
877  *
878  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
879  * """
880  * Natural logarithm of multivector with optional complexifier.
881  */
882 struct __pyx_opt_args_8PyClical_log {
883  int __pyx_n;
884  PyObject *i;
885 };
886 
887 /* "PyClical.pyx":1602
888  * return clifford().wrap( glucat.log(toClifford(obj)) )
889  *
890  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
891  * """
892  * Cosine of multivector with optional complexifier.
893  */
894 struct __pyx_opt_args_8PyClical_cos {
895  int __pyx_n;
896  PyObject *i;
897 };
898 
899 /* "PyClical.pyx":1619
900  * return clifford().wrap( glucat.cos(toClifford(obj)) )
901  *
902  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
903  * """
904  * Inverse cosine of multivector with optional complexifier.
905  */
906 struct __pyx_opt_args_8PyClical_acos {
907  int __pyx_n;
908  PyObject *i;
909 };
910 
911 /* "PyClical.pyx":1656
912  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
913  *
914  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
915  * """
916  * Inverse hyperbolic cosine of multivector with optional complexifier.
917  */
918 struct __pyx_opt_args_8PyClical_acosh {
919  int __pyx_n;
920  PyObject *i;
921 };
922 
923 /* "PyClical.pyx":1679
924  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
925  *
926  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
927  * """
928  * Sine of multivector with optional complexifier.
929  */
930 struct __pyx_opt_args_8PyClical_sin {
931  int __pyx_n;
932  PyObject *i;
933 };
934 
935 /* "PyClical.pyx":1698
936  * return clifford().wrap( glucat.sin(toClifford(obj)) )
937  *
938  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
939  * """
940  * Inverse sine of multivector with optional complexifier.
941  */
942 struct __pyx_opt_args_8PyClical_asin {
943  int __pyx_n;
944  PyObject *i;
945 };
946 
947 /* "PyClical.pyx":1733
948  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
949  *
950  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
951  * """
952  * Inverse hyperbolic sine of multivector with optional complexifier.
953  */
954 struct __pyx_opt_args_8PyClical_asinh {
955  int __pyx_n;
956  PyObject *i;
957 };
958 
959 /* "PyClical.pyx":1752
960  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
961  *
962  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
963  * """
964  * Tangent of multivector with optional complexifier.
965  */
966 struct __pyx_opt_args_8PyClical_tan {
967  int __pyx_n;
968  PyObject *i;
969 };
970 
971 /* "PyClical.pyx":1769
972  * return clifford().wrap( glucat.tan(toClifford(obj)) )
973  *
974  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
975  * """
976  * Inverse tangent of multivector with optional complexifier.
977  */
978 struct __pyx_opt_args_8PyClical_atan {
979  int __pyx_n;
980  PyObject *i;
981 };
982 
983 /* "PyClical.pyx":1798
984  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
985  *
986  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
987  * """
988  * Inverse hyperbolic tangent of multivector with optional complexifier.
989  */
990 struct __pyx_opt_args_8PyClical_atanh {
991  int __pyx_n;
992  PyObject *i;
993 };
994 
995 /* "PyClical.pyx":1815
996  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
997  *
998  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
999  * """
1000  * Random multivector within a frame.
1001  */
1002 struct __pyx_opt_args_8PyClical_random_clifford {
1003  int __pyx_n;
1004  PyObject *fill;
1005 };
1006 
1007 /* "PyClical.pyx":37
1008  *
1009  * # Forward reference
1010  * cdef class index_set # <<<<<<<<<<<<<<
1011  *
1012  * cdef inline IndexSet toIndexSet(obj):
1013  */
1014 struct __pyx_obj_8PyClical_index_set {
1015  PyObject_HEAD
1016  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1017  IndexSet *instance;
1018 };
1019 
1020 
1021 /* "PyClical.pyx":530
1022  *
1023  * # Forward reference.
1024  * cdef class clifford # <<<<<<<<<<<<<<
1025  *
1026  * cdef inline Clifford toClifford(obj):
1027  */
1028 struct __pyx_obj_8PyClical_clifford {
1029  PyObject_HEAD
1030  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1031  Clifford *instance;
1032 };
1033 
1034 
1035 /* "PyClical.pyx":227
1036  * return self.instance.getitem(idx)
1037  *
1038  * def __iter__(self): # <<<<<<<<<<<<<<
1039  * """
1040  * Iterate over the indices of an index_set.
1041  */
1042 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1043  PyObject_HEAD
1044  PyObject *__pyx_v_idx;
1045  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1046  PyObject *__pyx_t_0;
1047  Py_ssize_t __pyx_t_1;
1048  PyObject *(*__pyx_t_2)(PyObject *);
1049 };
1050 
1051 
1052 
1053 /* "PyClical.pyx":45
1054  * return index_set(obj).instance[0]
1055  *
1056  * cdef class index_set: # <<<<<<<<<<<<<<
1057  * """
1058  * Python class index_set wraps C++ class IndexSet.
1059  */
1060 
1061 struct __pyx_vtabstruct_8PyClical_index_set {
1062  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1063  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1064  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1065 };
1066 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1067 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1068 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1069 
1070 
1071 /* "PyClical.pyx":535
1072  * return clifford(obj).instance[0]
1073  *
1074  * cdef class clifford: # <<<<<<<<<<<<<<
1075  * """
1076  * Python class clifford wraps C++ class Clifford.
1077  */
1078 
1079 struct __pyx_vtabstruct_8PyClical_clifford {
1080  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1081  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1082  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1083 };
1084 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1085 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1086 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1087 
1088 /* --- Runtime support code (head) --- */
1089 /* Refnanny.proto */
1090 #ifndef CYTHON_REFNANNY
1091  #define CYTHON_REFNANNY 0
1092 #endif
1093 #if CYTHON_REFNANNY
1094  typedef struct {
1095  void (*INCREF)(void*, PyObject*, int);
1096  void (*DECREF)(void*, PyObject*, int);
1097  void (*GOTREF)(void*, PyObject*, int);
1098  void (*GIVEREF)(void*, PyObject*, int);
1099  void* (*SetupContext)(const char*, int, const char*);
1100  void (*FinishContext)(void**);
1101  } __Pyx_RefNannyAPIStruct;
1102  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1103  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1104  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1105 #ifdef WITH_THREAD
1106  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1107  if (acquire_gil) {\
1108  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1109  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1110  PyGILState_Release(__pyx_gilstate_save);\
1111  } else {\
1112  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1113  }
1114 #else
1115  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1116  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1117 #endif
1118  #define __Pyx_RefNannyFinishContext()\
1119  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1120  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1121  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1122  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1123  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1124  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1125  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1126  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1127  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1128 #else
1129  #define __Pyx_RefNannyDeclarations
1130  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1131  #define __Pyx_RefNannyFinishContext()
1132  #define __Pyx_INCREF(r) Py_INCREF(r)
1133  #define __Pyx_DECREF(r) Py_DECREF(r)
1134  #define __Pyx_GOTREF(r)
1135  #define __Pyx_GIVEREF(r)
1136  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1137  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1138  #define __Pyx_XGOTREF(r)
1139  #define __Pyx_XGIVEREF(r)
1140 #endif
1141 #define __Pyx_XDECREF_SET(r, v) do {\
1142  PyObject *tmp = (PyObject *) r;\
1143  r = v; __Pyx_XDECREF(tmp);\
1144  } while (0)
1145 #define __Pyx_DECREF_SET(r, v) do {\
1146  PyObject *tmp = (PyObject *) r;\
1147  r = v; __Pyx_DECREF(tmp);\
1148  } while (0)
1149 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1150 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1151 
1152 /* PyObjectGetAttrStr.proto */
1153 #if CYTHON_USE_TYPE_SLOTS
1154 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1155 #else
1156 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1157 #endif
1158 
1159 /* GetBuiltinName.proto */
1160 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1161 
1162 /* PyCFunctionFastCall.proto */
1163 #if CYTHON_FAST_PYCCALL
1164 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1165 #else
1166 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1167 #endif
1168 
1169 /* PyFunctionFastCall.proto */
1170 #if CYTHON_FAST_PYCALL
1171 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1172  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1173 #if 1 || PY_VERSION_HEX < 0x030600B1
1174 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1175 #else
1176 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1177 #endif
1178 #endif
1179 
1180 /* PyObjectCall.proto */
1181 #if CYTHON_COMPILING_IN_CPYTHON
1182 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1183 #else
1184 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1185 #endif
1186 
1187 /* PyObjectCallMethO.proto */
1188 #if CYTHON_COMPILING_IN_CPYTHON
1189 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1190 #endif
1191 
1192 /* PyObjectCallOneArg.proto */
1193 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1194 
1195 /* PyThreadStateGet.proto */
1196 #if CYTHON_FAST_THREAD_STATE
1197 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1198 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1199 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1200 #else
1201 #define __Pyx_PyThreadState_declare
1202 #define __Pyx_PyThreadState_assign
1203 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1204 #endif
1205 
1206 /* PyErrFetchRestore.proto */
1207 #if CYTHON_FAST_THREAD_STATE
1208 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1209 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1210 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1211 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1212 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1213 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1214 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1215 #if CYTHON_COMPILING_IN_CPYTHON
1216 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1217 #else
1218 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1219 #endif
1220 #else
1221 #define __Pyx_PyErr_Clear() PyErr_Clear()
1222 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1223 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1224 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1225 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1226 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1227 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1228 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1229 #endif
1230 
1231 /* WriteUnraisableException.proto */
1232 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1233  int lineno, const char *filename,
1234  int full_traceback, int nogil);
1235 
1236 /* PyObjectCallNoArg.proto */
1237 #if CYTHON_COMPILING_IN_CPYTHON
1238 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1239 #else
1240 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1241 #endif
1242 
1243 /* RaiseDoubleKeywords.proto */
1244 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1245 
1246 /* ParseKeywords.proto */
1247 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1248  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1249  const char* function_name);
1250 
1251 /* RaiseArgTupleInvalid.proto */
1252 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1253  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1254 
1255 /* GetModuleGlobalName.proto */
1256 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1257 
1258 /* SaveResetException.proto */
1259 #if CYTHON_FAST_THREAD_STATE
1260 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1261 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1262 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1263 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1264 #else
1265 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1266 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1267 #endif
1268 
1269 /* PyErrExceptionMatches.proto */
1270 #if CYTHON_FAST_THREAD_STATE
1271 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1272 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1273 #else
1274 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1275 #endif
1276 
1277 /* GetException.proto */
1278 #if CYTHON_FAST_THREAD_STATE
1279 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1280 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1281 #else
1282 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1283 #endif
1284 
1285 /* RaiseException.proto */
1286 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1287 
1288 /* PyIntBinop.proto */
1289 #if !CYTHON_COMPILING_IN_PYPY
1290 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1291 #else
1292 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1293  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1294 #endif
1295 
1296 /* PySequenceContains.proto */
1297 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1298  int result = PySequence_Contains(seq, item);
1299  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1300 }
1301 
1302 /* SetItemInt.proto */
1303 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1304  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1305  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1306  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1307  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1308 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1309 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1310  int is_list, int wraparound, int boundscheck);
1311 
1312 /* ArgTypeTest.proto */
1313 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1314  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1315  __Pyx__ArgTypeTest(obj, type, name, exact))
1316 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1317 
1318 /* Import.proto */
1319 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1320 
1321 /* IncludeStringH.proto */
1322 #include <string.h>
1323 
1324 /* PyObject_GenericGetAttrNoDict.proto */
1325 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1326 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1327 #else
1328 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1329 #endif
1330 
1331 /* PyObject_GenericGetAttr.proto */
1332 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1333 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1334 #else
1335 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1336 #endif
1337 
1338 /* SetVTable.proto */
1339 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1340 
1341 /* SetupReduce.proto */
1342 static int __Pyx_setup_reduce(PyObject* type_obj);
1343 
1344 /* PyFloatBinop.proto */
1345 #if !CYTHON_COMPILING_IN_PYPY
1346 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
1347 #else
1348 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
1349  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1350  #endif
1351 
1352 /* BytesEquals.proto */
1353 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1354 
1355 /* UnicodeEquals.proto */
1356 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1357 
1358 /* StrEquals.proto */
1359 #if PY_MAJOR_VERSION >= 3
1360 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1361 #else
1362 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1363 #endif
1364 
1365 /* CLineInTraceback.proto */
1366 #ifdef CYTHON_CLINE_IN_TRACEBACK
1367 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1368 #else
1369 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1370 #endif
1371 
1372 /* CodeObjectCache.proto */
1373 typedef struct {
1374  PyCodeObject* code_object;
1375  int code_line;
1376 } __Pyx_CodeObjectCacheEntry;
1377 struct __Pyx_CodeObjectCache {
1378  int count;
1379  int max_count;
1380  __Pyx_CodeObjectCacheEntry* entries;
1381 };
1382 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1383 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1384 static PyCodeObject *__pyx_find_code_object(int code_line);
1385 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1386 
1387 /* AddTraceback.proto */
1388 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1389  int py_line, const char *filename);
1390 
1391 /* CppExceptionConversion.proto */
1392 #ifndef __Pyx_CppExn2PyErr
1393 #include <new>
1394 #include <typeinfo>
1395 #include <stdexcept>
1396 #include <ios>
1397 static void __Pyx_CppExn2PyErr() {
1398  try {
1399  if (PyErr_Occurred())
1400  ; // let the latest Python exn pass through and ignore the current one
1401  else
1402  throw;
1403  } catch (const std::bad_alloc& exn) {
1404  PyErr_SetString(PyExc_MemoryError, exn.what());
1405  } catch (const std::bad_cast& exn) {
1406  PyErr_SetString(PyExc_TypeError, exn.what());
1407  } catch (const std::bad_typeid& exn) {
1408  PyErr_SetString(PyExc_TypeError, exn.what());
1409  } catch (const std::domain_error& exn) {
1410  PyErr_SetString(PyExc_ValueError, exn.what());
1411  } catch (const std::invalid_argument& exn) {
1412  PyErr_SetString(PyExc_ValueError, exn.what());
1413  } catch (const std::ios_base::failure& exn) {
1414  PyErr_SetString(PyExc_IOError, exn.what());
1415  } catch (const std::out_of_range& exn) {
1416  PyErr_SetString(PyExc_IndexError, exn.what());
1417  } catch (const std::overflow_error& exn) {
1418  PyErr_SetString(PyExc_OverflowError, exn.what());
1419  } catch (const std::range_error& exn) {
1420  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1421  } catch (const std::underflow_error& exn) {
1422  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1423  } catch (const std::exception& exn) {
1424  PyErr_SetString(PyExc_RuntimeError, exn.what());
1425  }
1426  catch (...)
1427  {
1428  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1429  }
1430 }
1431 #endif
1432 
1433 /* CIntToPy.proto */
1434 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1435 
1436 /* CIntFromPy.proto */
1437 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1438 
1439 /* CIntToPy.proto */
1440 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1441 
1442 /* CIntFromPy.proto */
1443 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1444 
1445 /* FastTypeChecks.proto */
1446 #if CYTHON_COMPILING_IN_CPYTHON
1447 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1448 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1449 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1450 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1451 #else
1452 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1453 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1454 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1455 #endif
1456 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1457 
1458 /* FetchCommonType.proto */
1459 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1460 
1461 /* SwapException.proto */
1462 #if CYTHON_FAST_THREAD_STATE
1463 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1464 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1465 #else
1466 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1467 #endif
1468 
1469 /* PyObjectCallMethod1.proto */
1470 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1471 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
1472 
1473 /* CoroutineBase.proto */
1474 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1475 typedef struct {
1476  PyObject_HEAD
1477  __pyx_coroutine_body_t body;
1478  PyObject *closure;
1479  PyObject *exc_type;
1480  PyObject *exc_value;
1481  PyObject *exc_traceback;
1482  PyObject *gi_weakreflist;
1483  PyObject *classobj;
1484  PyObject *yieldfrom;
1485  PyObject *gi_name;
1486  PyObject *gi_qualname;
1487  PyObject *gi_modulename;
1488  PyObject *gi_code;
1489  int resume_label;
1490  char is_running;
1491 } __pyx_CoroutineObject;
1492 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1493  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1494  PyObject *name, PyObject *qualname, PyObject *module_name);
1495 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1496  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1497  PyObject *name, PyObject *qualname, PyObject *module_name);
1498 static int __Pyx_Coroutine_clear(PyObject *self);
1499 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1500 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1501 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1502 #define __Pyx_Coroutine_SwapException(self) {\
1503  __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
1504  __Pyx_Coroutine_ResetFrameBackpointer(self);\
1505  }
1506 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1507  __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
1508  (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
1509  }
1510 #if CYTHON_FAST_THREAD_STATE
1511 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1512  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1513 #else
1514 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1515  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1516 #endif
1517 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1518 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
1519 
1520 /* PatchModuleWithCoroutine.proto */
1521 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1522 
1523 /* PatchGeneratorABC.proto */
1524 static int __Pyx_patch_abc(void);
1525 
1526 /* Generator.proto */
1527 #define __Pyx_Generator_USED
1528 static PyTypeObject *__pyx_GeneratorType = 0;
1529 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1530 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1531  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1532 static PyObject *__Pyx_Generator_Next(PyObject *self);
1533 static int __pyx_Generator_init(void);
1534 
1535 /* CheckBinaryVersion.proto */
1536 static int __Pyx_check_binary_version(void);
1537 
1538 /* InitStrings.proto */
1539 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1540 
1541 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1542 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1543 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1544 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1545 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1546 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1547 
1548 /* Module declarations from 'libcpp.vector' */
1549 
1550 /* Module declarations from 'glucat' */
1551 
1552 /* Module declarations from 'PyClical' */
1553 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1554 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1555 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1556 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1557 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1558 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1559 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1560 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1561 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1562 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1563 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1564 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1565 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1566 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1567 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1568 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1569 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1570 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1571 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1572 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1573 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1574 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1575 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1576 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1577 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1578 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1579 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1580 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1581 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1582 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1583 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1584 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1585 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1586 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1587 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1588 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1589 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1590 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1591 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1592 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1593 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1594 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*/
1595 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1596 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1597 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1598 #define __Pyx_MODULE_NAME "PyClical"
1599 extern int __pyx_module_is_main_PyClical;
1600 int __pyx_module_is_main_PyClical = 0;
1601 
1602 /* Implementation of 'PyClical' */
1603 static PyObject *__pyx_builtin_IndexError;
1604 static PyObject *__pyx_builtin_RuntimeError;
1605 static PyObject *__pyx_builtin_TypeError;
1606 static PyObject *__pyx_builtin_ValueError;
1607 static PyObject *__pyx_builtin_NotImplemented;
1608 static PyObject *__pyx_builtin_range;
1609 static PyObject *__pyx_builtin_xrange;
1610 static const char __pyx_k_[] = ".";
1611 static const char __pyx_k_e[] = "e";
1612 static const char __pyx_k_i[] = "i";
1613 static const char __pyx_k_m[] = "m";
1614 static const char __pyx_k_p[] = "p";
1615 static const char __pyx_k_q[] = "q";
1616 static const char __pyx_k__2[] = " ";
1617 static const char __pyx_k__5[] = ":";
1618 static const char __pyx_k__6[] = "\n\t";
1619 static const char __pyx_k__7[] = " (";
1620 static const char __pyx_k__8[] = ", ";
1621 static const char __pyx_k__9[] = ").";
1622 static const char __pyx_k_cl[] = "cl";
1623 static const char __pyx_k_pi[] = "pi";
1624 static const char __pyx_k_cos[] = "cos";
1625 static const char __pyx_k_exp[] = "exp";
1626 static const char __pyx_k_frm[] = "frm";
1627 static const char __pyx_k_inv[] = "inv";
1628 static const char __pyx_k_ist[] = "ist";
1629 static const char __pyx_k_ixt[] = "ixt";
1630 static const char __pyx_k_lhs[] = "lhs";
1631 static const char __pyx_k_log[] = "log";
1632 static const char __pyx_k_max[] = "max";
1633 static const char __pyx_k_min[] = "min";
1634 static const char __pyx_k_obj[] = "obj";
1635 static const char __pyx_k_odd[] = "odd";
1636 static const char __pyx_k_pow[] = "pow";
1637 static const char __pyx_k_rhs[] = "rhs";
1638 static const char __pyx_k_sin[] = "sin";
1639 static const char __pyx_k_tan[] = "tan";
1640 static const char __pyx_k_tau[] = "tau";
1641 static const char __pyx_k_Real[] = "Real";
1642 static const char __pyx_k_acos[] = "acos";
1643 static const char __pyx_k_args[] = "args";
1644 static const char __pyx_k_asin[] = "asin";
1645 static const char __pyx_k_atan[] = "atan";
1646 static const char __pyx_k_conj[] = "conj";
1647 static const char __pyx_k_copy[] = "copy";
1648 static const char __pyx_k_cosh[] = "cosh";
1649 static const char __pyx_k_even[] = "even";
1650 static const char __pyx_k_fill[] = "fill";
1651 static const char __pyx_k_from[] = " from ";
1652 static const char __pyx_k_iter[] = "__iter__";
1653 static const char __pyx_k_main[] = "__main__";
1654 static const char __pyx_k_math[] = "math";
1655 static const char __pyx_k_name[] = "__name__";
1656 static const char __pyx_k_norm[] = "norm";
1657 static const char __pyx_k_pure[] = "pure";
1658 static const char __pyx_k_quad[] = "quad";
1659 static const char __pyx_k_send[] = "send";
1660 static const char __pyx_k_sinh[] = "sinh";
1661 static const char __pyx_k_sqrt[] = "sqrt";
1662 static const char __pyx_k_tanh[] = "tanh";
1663 static const char __pyx_k_test[] = "_test";
1664 static const char __pyx_k_0_8_2[] = "0.8.2";
1665 static const char __pyx_k_acosh[] = "acosh";
1666 static const char __pyx_k_asinh[] = "asinh";
1667 static const char __pyx_k_atanh[] = "atanh";
1668 static const char __pyx_k_close[] = "close";
1669 static const char __pyx_k_grade[] = "grade";
1670 static const char __pyx_k_istpq[] = "istpq";
1671 static const char __pyx_k_nbar3[] = "nbar3";
1672 static const char __pyx_k_ninf3[] = "ninf3";
1673 static const char __pyx_k_other[] = "other";
1674 static const char __pyx_k_range[] = "range";
1675 static const char __pyx_k_throw[] = "throw";
1676 static const char __pyx_k_using[] = " using (";
1677 static const char __pyx_k_value[] = " value ";
1678 static const char __pyx_k_import[] = "__import__";
1679 static const char __pyx_k_reduce[] = "__reduce__";
1680 static const char __pyx_k_scalar[] = "scalar";
1681 static const char __pyx_k_test_2[] = "__test__";
1682 static const char __pyx_k_xrange[] = "xrange";
1683 static const char __pyx_k_doctest[] = "doctest";
1684 static const char __pyx_k_invalid[] = " invalid ";
1685 static const char __pyx_k_numbers[] = "numbers";
1686 static const char __pyx_k_reverse[] = "reverse";
1687 static const char __pyx_k_testmod[] = "testmod";
1688 static const char __pyx_k_version[] = "__version__";
1689 static const char __pyx_k_Integral[] = "Integral";
1690 static const char __pyx_k_PyClical[] = "PyClical";
1691 static const char __pyx_k_Sequence[] = "Sequence";
1692 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1693 static const char __pyx_k_getstate[] = "__getstate__";
1694 static const char __pyx_k_involute[] = "involute";
1695 static const char __pyx_k_setstate[] = "__setstate__";
1696 static const char __pyx_k_to_frame[] = " to frame ";
1697 static const char __pyx_k_TypeError[] = "TypeError";
1698 static const char __pyx_k_outer_pow[] = "outer_pow";
1699 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1700 static const char __pyx_k_IndexError[] = "IndexError";
1701 static const char __pyx_k_ValueError[] = "ValueError";
1702 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1703 static const char __pyx_k_collections[] = "collections";
1704 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1705 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1706 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1707 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1708 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1709 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1710 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1711 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1712 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1713 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1714 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1715 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1716 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1717 static const char __pyx_k_using_invalid[] = " using invalid ";
1718 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1719 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1720 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1721 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1722 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1723 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1724 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1725 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1726 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1727 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1728 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1729 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1730 static const char __pyx_k_invalid_string[] = " invalid string ";
1731 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1732 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1733 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1734 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1735 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1736 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1737 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1738 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1739 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1740 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1741 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1742 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1743 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1744 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1745 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1746 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1747 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1748 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1749 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1750 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1751 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1752 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1753 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1754 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1755 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1756 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1757 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1758 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1759 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1760 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1761 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1762 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1763 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1764 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1765 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1766 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1767 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1768 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1769 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1770 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1771 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1772 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1773 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1774 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1775 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1776 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1777 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1778 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1779 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1780 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1781 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1782 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1783 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1784 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1785 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1786 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1787 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1788 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1789 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1790 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1791 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1792 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1793 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1794 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1795 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1796 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1797 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1798 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1799 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1800 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1801 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1802 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1803 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1804 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1805 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1806 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1807 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1808 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1809 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1810 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1811 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1812 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1813 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1814 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1815 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1816 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1817 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1818 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1819 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1820 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 ";
1821 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 ";
1822 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 ";
1823 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 ";
1824 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 ";
1825 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 ";
1826 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 ";
1827 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 ";
1828 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 ";
1829 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 ";
1830 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 ";
1831 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 ";
1832 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 ";
1833 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 ";
1834 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 ";
1835 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 ";
1836 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 ";
1837 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 ";
1838 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 ";
1839 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 ";
1840 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 ";
1841 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1842 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1843 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1844 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 ";
1845 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 ";
1846 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 ";
1847 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 ";
1848 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 ";
1849 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 ";
1850 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 ";
1851 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 ";
1852 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 ";
1853 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 ";
1854 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 ";
1855 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 ";
1856 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 ";
1857 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 ";
1858 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 ";
1859 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 ";
1860 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 ";
1861 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 ";
1862 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 ";
1863 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 ";
1864 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 ";
1865 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 ";
1866 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 ";
1867 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 ";
1868 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 ";
1869 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 ";
1870 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 ";
1871 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 ";
1872 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 ";
1873 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 ";
1874 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 ";
1875 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 ";
1876 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 ";
1877 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 ";
1878 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 ";
1879 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 ";
1880 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 ";
1881 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 ";
1882 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 ";
1883 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 ";
1884 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 ";
1885 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 ";
1886 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 ";
1887 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 ";
1888 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 ";
1889 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 ";
1890 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 ";
1891 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 ";
1892 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 ";
1893 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 ";
1894 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 ";
1895 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 ";
1896 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 ";
1897 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 ";
1898 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 ";
1899 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 ";
1900 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 ";
1901 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 ";
1902 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 ";
1903 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 ";
1904 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 ";
1905 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 ";
1906 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 ";
1907 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 ";
1908 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 ";
1909 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 ";
1910 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 ";
1911 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 ";
1912  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 ";
1913  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 ";
1914  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
1915  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 ";
1916  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
1917  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 ";
1918  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
1919  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
1920  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 ";
1921  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 ";
1922  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 ";
1923  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 ";
1924  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 ";
1925  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
1926  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
1927  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
1928  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
1929  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 ";
1930  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 ";
1931  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 ";
1932  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 ";
1933  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 ";
1934  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 ";
1935  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 ";
1936  static PyObject *__pyx_kp_s_;
1937  static PyObject *__pyx_kp_s_0_8_2;
1938  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1939  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1940  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1941  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1942  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1943  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1944  static PyObject *__pyx_kp_s_Cannot_reframe;
1945  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1946  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1947  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1948  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1949  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1950  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1951  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1952  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1953  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1954  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1955  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1956  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1957  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1958  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1959  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1960  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1961  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1962  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1963  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1964  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1965  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1966  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1967  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1968  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1969  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1970  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1971  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1972  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1973  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1974  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1975  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1976  static PyObject *__pyx_n_s_IndexError;
1977  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1978  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1979  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1980  static PyObject *__pyx_n_s_Integral;
1981  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1982  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1983  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1984  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1985  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1986  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1987  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1988  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1989  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1990  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1991  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1992  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1993  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1994  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1995  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1996  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1997  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1998  static PyObject *__pyx_n_s_NotImplemented;
1999  static PyObject *__pyx_kp_s_Not_applicable;
2000  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2001  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2002  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2003  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2004  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2005  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2006  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2007  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2008  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2009  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2010  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2011  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2012  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2013  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2014  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2015  static PyObject *__pyx_n_s_PyClical;
2016  static PyObject *__pyx_kp_s_PyClical_pyx;
2017  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2018  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2019  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2020  static PyObject *__pyx_n_s_Real;
2021  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2022  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2023  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2024  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2025  static PyObject *__pyx_n_s_RuntimeError;
2026  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2027  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2028  static PyObject *__pyx_n_s_Sequence;
2029  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2030  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2031  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2032  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2033  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2034  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2035  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2036  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2037  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2038  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2039  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2040  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2041  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2042  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2043  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2044  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2045  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2046  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2047  static PyObject *__pyx_kp_u_The_informal_string_representat;
2048  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2049  static PyObject *__pyx_kp_u_The_official_string_representat;
2050  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2051  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2052  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2053  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2054  static PyObject *__pyx_n_s_TypeError;
2055  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2056  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2057  static PyObject *__pyx_n_s_ValueError;
2058  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2059  static PyObject *__pyx_kp_s__2;
2060  static PyObject *__pyx_kp_s__5;
2061  static PyObject *__pyx_kp_s__6;
2062  static PyObject *__pyx_kp_s__7;
2063  static PyObject *__pyx_kp_s__8;
2064  static PyObject *__pyx_kp_s__9;
2065  static PyObject *__pyx_kp_u_abs_line_1473;
2066  static PyObject *__pyx_n_s_acos;
2067  static PyObject *__pyx_kp_u_acos_line_1619;
2068  static PyObject *__pyx_n_s_acosh;
2069  static PyObject *__pyx_kp_u_acosh_line_1656;
2070  static PyObject *__pyx_kp_u_agc3_line_1844;
2071  static PyObject *__pyx_n_s_args;
2072  static PyObject *__pyx_kp_s_as_frame;
2073  static PyObject *__pyx_n_s_asin;
2074  static PyObject *__pyx_kp_u_asin_line_1698;
2075  static PyObject *__pyx_n_s_asinh;
2076  static PyObject *__pyx_kp_u_asinh_line_1733;
2077  static PyObject *__pyx_n_s_atan;
2078  static PyObject *__pyx_kp_u_atan_line_1769;
2079  static PyObject *__pyx_n_s_atanh;
2080  static PyObject *__pyx_kp_u_atanh_line_1798;
2081  static PyObject *__pyx_kp_u_cga3_line_1824;
2082  static PyObject *__pyx_kp_u_cga3std_line_1833;
2083  static PyObject *__pyx_n_s_cl;
2084  static PyObject *__pyx_kp_u_clifford___add___line_739;
2085  static PyObject *__pyx_kp_u_clifford___and___line_835;
2086  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2087  static PyObject *__pyx_kp_u_clifford___div___line_895;
2088  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2089  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2090  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2091  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2092  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2093  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2094  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2095  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2096  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2097  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2098  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2099  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2100  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2101  static PyObject *__pyx_kp_u_clifford___or___line_938;
2102  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2103  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2104  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2105  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2106  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2107  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2108  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2109  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2110  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2111  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2112  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2113  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2114  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2115  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2116  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2117  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2118  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2119  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2120  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2121  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2122  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2123  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2124  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2125  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2126  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2127  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2128  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2129  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2130  static PyObject *__pyx_n_s_cline_in_traceback;
2131  static PyObject *__pyx_n_s_close;
2132  static PyObject *__pyx_n_s_collections;
2133  static PyObject *__pyx_kp_u_compare_line_490;
2134  static PyObject *__pyx_kp_u_complexifier_line_1527;
2135  static PyObject *__pyx_n_s_conj;
2136  static PyObject *__pyx_kp_u_conj_line_1436;
2137  static PyObject *__pyx_n_s_copy;
2138  static PyObject *__pyx_n_s_cos;
2139  static PyObject *__pyx_kp_u_cos_line_1602;
2140  static PyObject *__pyx_n_s_cosh;
2141  static PyObject *__pyx_kp_u_cosh_line_1640;
2142  static PyObject *__pyx_n_s_doctest;
2143  static PyObject *__pyx_n_s_e;
2144  static PyObject *__pyx_kp_u_e_line_1887;
2145  static PyObject *__pyx_n_s_even;
2146  static PyObject *__pyx_kp_u_even_line_1388;
2147  static PyObject *__pyx_n_s_exp;
2148  static PyObject *__pyx_kp_u_exp_line_1565;
2149  static PyObject *__pyx_n_s_fill;
2150  static PyObject *__pyx_n_s_frm;
2151  static PyObject *__pyx_kp_s_from;
2152  static PyObject *__pyx_n_s_getstate;
2153  static PyObject *__pyx_n_s_grade;
2154  static PyObject *__pyx_n_s_i;
2155  static PyObject *__pyx_kp_u_imag_line_1366;
2156  static PyObject *__pyx_n_s_import;
2157  static PyObject *__pyx_kp_u_index_set___and___line_269;
2158  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2159  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2160  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2161  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2162  static PyObject *__pyx_n_s_index_set___iter;
2163  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2164  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2165  static PyObject *__pyx_kp_u_index_set___or___line_291;
2166  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2167  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2168  static PyObject *__pyx_kp_u_index_set___str___line_393;
2169  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2170  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2171  static PyObject *__pyx_kp_u_index_set_count_line_313;
2172  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2173  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2174  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2175  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2176  static PyObject *__pyx_kp_u_index_set_max_line_349;
2177  static PyObject *__pyx_kp_u_index_set_min_line_340;
2178  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2179  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2180  static PyObject *__pyx_n_s_inv;
2181  static PyObject *__pyx_kp_u_inv_line_1329;
2182  static PyObject *__pyx_kp_s_invalid;
2183  static PyObject *__pyx_kp_s_invalid_string;
2184  static PyObject *__pyx_n_s_involute;
2185  static PyObject *__pyx_kp_u_involute_line_1406;
2186  static PyObject *__pyx_n_s_ist;
2187  static PyObject *__pyx_n_s_istpq;
2188  static PyObject *__pyx_kp_u_istpq_line_1900;
2189  static PyObject *__pyx_n_s_iter;
2190  static PyObject *__pyx_n_s_ixt;
2191  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2192  static PyObject *__pyx_n_s_lhs;
2193  static PyObject *__pyx_n_s_log;
2194  static PyObject *__pyx_kp_u_log_line_1579;
2195  static PyObject *__pyx_n_s_m;
2196  static PyObject *__pyx_n_s_main;
2197  static PyObject *__pyx_n_s_math;
2198  static PyObject *__pyx_n_s_max;
2199  static PyObject *__pyx_kp_u_max_abs_line_1482;
2200  static PyObject *__pyx_kp_u_max_pos_line_511;
2201  static PyObject *__pyx_n_s_min;
2202  static PyObject *__pyx_kp_u_min_neg_line_502;
2203  static PyObject *__pyx_n_s_name;
2204  static PyObject *__pyx_n_s_nbar3;
2205  static PyObject *__pyx_n_s_ninf3;
2206  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2207  static PyObject *__pyx_n_s_norm;
2208  static PyObject *__pyx_kp_u_norm_line_1462;
2209  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2210  static PyObject *__pyx_n_s_numbers;
2211  static PyObject *__pyx_n_s_obj;
2212  static PyObject *__pyx_n_s_odd;
2213  static PyObject *__pyx_kp_u_odd_line_1397;
2214  static PyObject *__pyx_n_s_other;
2215  static PyObject *__pyx_n_s_outer_pow;
2216  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2217  static PyObject *__pyx_n_s_p;
2218  static PyObject *__pyx_n_s_pi;
2219  static PyObject *__pyx_n_s_pow;
2220  static PyObject *__pyx_kp_u_pow_line_1494;
2221  static PyObject *__pyx_n_s_pure;
2222  static PyObject *__pyx_kp_u_pure_line_1377;
2223  static PyObject *__pyx_n_s_pyx_vtable;
2224  static PyObject *__pyx_n_s_q;
2225  static PyObject *__pyx_n_s_quad;
2226  static PyObject *__pyx_kp_u_quad_line_1451;
2227  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2228  static PyObject *__pyx_n_s_range;
2229  static PyObject *__pyx_kp_u_real_line_1355;
2230  static PyObject *__pyx_n_s_reduce;
2231  static PyObject *__pyx_n_s_reduce_cython;
2232  static PyObject *__pyx_n_s_reduce_ex;
2233  static PyObject *__pyx_n_s_reverse;
2234  static PyObject *__pyx_kp_u_reverse_line_1421;
2235  static PyObject *__pyx_n_s_rhs;
2236  static PyObject *__pyx_n_s_scalar;
2237  static PyObject *__pyx_kp_u_scalar_line_1344;
2238  static PyObject *__pyx_n_s_send;
2239  static PyObject *__pyx_n_s_setstate;
2240  static PyObject *__pyx_n_s_setstate_cython;
2241  static PyObject *__pyx_n_s_sin;
2242  static PyObject *__pyx_kp_u_sin_line_1679;
2243  static PyObject *__pyx_n_s_sinh;
2244  static PyObject *__pyx_kp_u_sinh_line_1719;
2245  static PyObject *__pyx_n_s_sqrt;
2246  static PyObject *__pyx_kp_u_sqrt_line_1542;
2247  static PyObject *__pyx_n_s_tan;
2248  static PyObject *__pyx_kp_u_tan_line_1752;
2249  static PyObject *__pyx_n_s_tanh;
2250  static PyObject *__pyx_kp_u_tanh_line_1786;
2251  static PyObject *__pyx_n_s_tau;
2252  static PyObject *__pyx_n_s_test;
2253  static PyObject *__pyx_n_s_test_2;
2254  static PyObject *__pyx_n_s_testmod;
2255  static PyObject *__pyx_n_s_throw;
2256  static PyObject *__pyx_kp_s_to_frame;
2257  static PyObject *__pyx_kp_s_using;
2258  static PyObject *__pyx_kp_s_using_invalid;
2259  static PyObject *__pyx_kp_s_value;
2260  static PyObject *__pyx_n_s_version;
2261  static PyObject *__pyx_n_s_xrange;
2262 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2263 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2264 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2265 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2266 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 */
2267 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2268 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2269 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2270 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2271 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2272 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2273 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2274 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2275 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2276 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2277 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2278 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2279 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2280 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2281 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2282 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2283 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2284 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2285 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2286 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2287 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2288 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 */
2289 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2290 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2291 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2292 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2293 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2294 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 */
2295 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2296 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 */
2297 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2298 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2299 static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /* proto */
2300 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2301 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2302 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2303 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2304 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2305 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2306 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2307 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2308 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2309 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2310 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2311 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2312 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2313 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2314 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2315 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2316 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2317 #endif
2318 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2319 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2320 #endif
2321 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2322 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2323 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2324 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2325 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2326 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2327 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2328 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2329 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2330 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2331 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2332 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2333 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2334 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2335 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2336 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2337 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2338 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2339 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2340 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2341 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2342 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2343 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2344 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2345 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2346 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 */
2347 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2348 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2349 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2350 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2351 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2352 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2353 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2354 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2355 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2356 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2357 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2358 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2359 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2360 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2361 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2362 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2363 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2364 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2365 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2366 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2367 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2368 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2369 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2370 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2371 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2372 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2373 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2374 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2375 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2376 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2377 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2378 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2379 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2380 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 */
2381 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2382 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2383 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2384 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2385 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2386 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2387 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2388 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2389 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2390 static PyObject *__pyx_float_0_0;
2391 static PyObject *__pyx_float_1_0;
2392 static PyObject *__pyx_float_2_0;
2393 static PyObject *__pyx_float_8_0;
2394 static PyObject *__pyx_int_0;
2395 static PyObject *__pyx_int_1;
2396 static PyObject *__pyx_int_4;
2397 static PyObject *__pyx_int_neg_1;
2398 static PyObject *__pyx_tuple__3;
2399 static PyObject *__pyx_tuple__4;
2400 static PyObject *__pyx_tuple__10;
2401 static PyObject *__pyx_tuple__11;
2402 static PyObject *__pyx_tuple__12;
2403 static PyObject *__pyx_tuple__13;
2404 static PyObject *__pyx_tuple__16;
2405 static PyObject *__pyx_tuple__17;
2406 static PyObject *__pyx_tuple__19;
2407 static PyObject *__pyx_tuple__21;
2408 static PyObject *__pyx_tuple__22;
2409 static PyObject *__pyx_tuple__23;
2410 static PyObject *__pyx_tuple__24;
2411 static PyObject *__pyx_tuple__25;
2412 static PyObject *__pyx_codeobj__14;
2413 static PyObject *__pyx_codeobj__15;
2414 static PyObject *__pyx_codeobj__18;
2415 static PyObject *__pyx_codeobj__20;
2416 static PyObject *__pyx_codeobj__26;
2417 /* Late includes */
2418 
2419 /* "PyClical.pyx":39
2420  * cdef class index_set
2421  *
2422  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2423  * """
2424  * Return the C++ IndexSet instance wrapped by index_set(obj).
2425  */
2426 
2427 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2428  IndexSet __pyx_r;
2429  __Pyx_RefNannyDeclarations
2430  PyObject *__pyx_t_1 = NULL;
2431  __Pyx_RefNannySetupContext("toIndexSet", 0);
2432 
2433  /* "PyClical.pyx":43
2434  * Return the C++ IndexSet instance wrapped by index_set(obj).
2435  * """
2436  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2437  *
2438  * cdef class index_set:
2439  */
2440  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
2441  __Pyx_GOTREF(__pyx_t_1);
2442  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2443  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2444  goto __pyx_L0;
2445 
2446  /* "PyClical.pyx":39
2447  * cdef class index_set
2448  *
2449  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2450  * """
2451  * Return the C++ IndexSet instance wrapped by index_set(obj).
2452  */
2453 
2454  /* function exit code */
2455  __pyx_L1_error:;
2456  __Pyx_XDECREF(__pyx_t_1);
2457  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2458  __Pyx_pretend_to_initialize(&__pyx_r);
2459  __pyx_L0:;
2460  __Pyx_RefNannyFinishContext();
2461  return __pyx_r;
2462 }
2463 
2464 /* "PyClical.pyx":51
2465  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2466  *
2467  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2468  * """
2469  * Wrap an instance of the C++ class IndexSet.
2470  */
2471 
2472 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2473  PyObject *__pyx_r = NULL;
2474  __Pyx_RefNannyDeclarations
2475  __Pyx_RefNannySetupContext("wrap", 0);
2476 
2477  /* "PyClical.pyx":55
2478  * Wrap an instance of the C++ class IndexSet.
2479  * """
2480  * self.instance[0] = other # <<<<<<<<<<<<<<
2481  * return self
2482  *
2483  */
2484  (__pyx_v_self->instance[0]) = __pyx_v_other;
2485 
2486  /* "PyClical.pyx":56
2487  * """
2488  * self.instance[0] = other
2489  * return self # <<<<<<<<<<<<<<
2490  *
2491  * cdef inline IndexSet unwrap(index_set self):
2492  */
2493  __Pyx_XDECREF(__pyx_r);
2494  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2495  __pyx_r = ((PyObject *)__pyx_v_self);
2496  goto __pyx_L0;
2497 
2498  /* "PyClical.pyx":51
2499  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2500  *
2501  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2502  * """
2503  * Wrap an instance of the C++ class IndexSet.
2504  */
2505 
2506  /* function exit code */
2507  __pyx_L0:;
2508  __Pyx_XGIVEREF(__pyx_r);
2509  __Pyx_RefNannyFinishContext();
2510  return __pyx_r;
2511 }
2512 
2513 /* "PyClical.pyx":58
2514  * return self
2515  *
2516  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2517  * """
2518  * Return the wrapped C++ IndexSet instance.
2519  */
2520 
2521 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2522  IndexSet __pyx_r;
2523  __Pyx_RefNannyDeclarations
2524  __Pyx_RefNannySetupContext("unwrap", 0);
2525 
2526  /* "PyClical.pyx":62
2527  * Return the wrapped C++ IndexSet instance.
2528  * """
2529  * return self.instance[0] # <<<<<<<<<<<<<<
2530  *
2531  * cpdef copy(index_set self):
2532  */
2533  __pyx_r = (__pyx_v_self->instance[0]);
2534  goto __pyx_L0;
2535 
2536  /* "PyClical.pyx":58
2537  * return self
2538  *
2539  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2540  * """
2541  * Return the wrapped C++ IndexSet instance.
2542  */
2543 
2544  /* function exit code */
2545  __pyx_L0:;
2546  __Pyx_RefNannyFinishContext();
2547  return __pyx_r;
2548 }
2549 
2550 /* "PyClical.pyx":64
2551  * return self.instance[0]
2552  *
2553  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2554  * """
2555  * Copy this index_set object.
2556  */
2557 
2558 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2559 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2560  PyObject *__pyx_r = NULL;
2561  __Pyx_RefNannyDeclarations
2562  PyObject *__pyx_t_1 = NULL;
2563  PyObject *__pyx_t_2 = NULL;
2564  PyObject *__pyx_t_3 = NULL;
2565  PyObject *__pyx_t_4 = NULL;
2566  __Pyx_RefNannySetupContext("copy", 0);
2567  /* Check if called by wrapper */
2568  if (unlikely(__pyx_skip_dispatch)) ;
2569  /* Check if overridden in Python */
2570  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2571  __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)
2572  __Pyx_GOTREF(__pyx_t_1);
2573  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2574  __Pyx_XDECREF(__pyx_r);
2575  __Pyx_INCREF(__pyx_t_1);
2576  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2577  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2578  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2579  if (likely(__pyx_t_4)) {
2580  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2581  __Pyx_INCREF(__pyx_t_4);
2582  __Pyx_INCREF(function);
2583  __Pyx_DECREF_SET(__pyx_t_3, function);
2584  }
2585  }
2586  if (__pyx_t_4) {
2587  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2588  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2589  } else {
2590  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2591  }
2592  __Pyx_GOTREF(__pyx_t_2);
2593  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2594  __pyx_r = __pyx_t_2;
2595  __pyx_t_2 = 0;
2596  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2597  goto __pyx_L0;
2598  }
2599  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2600  }
2601 
2602  /* "PyClical.pyx":71
2603  * {1}
2604  * """
2605  * return index_set(self) # <<<<<<<<<<<<<<
2606  *
2607  * def __cinit__(self, other = 0):
2608  */
2609  __Pyx_XDECREF(__pyx_r);
2610  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
2611  __Pyx_GOTREF(__pyx_t_1);
2612  __pyx_r = __pyx_t_1;
2613  __pyx_t_1 = 0;
2614  goto __pyx_L0;
2615 
2616  /* "PyClical.pyx":64
2617  * return self.instance[0]
2618  *
2619  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2620  * """
2621  * Copy this index_set object.
2622  */
2623 
2624  /* function exit code */
2625  __pyx_L1_error:;
2626  __Pyx_XDECREF(__pyx_t_1);
2627  __Pyx_XDECREF(__pyx_t_2);
2628  __Pyx_XDECREF(__pyx_t_3);
2629  __Pyx_XDECREF(__pyx_t_4);
2630  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2631  __pyx_r = 0;
2632  __pyx_L0:;
2633  __Pyx_XGIVEREF(__pyx_r);
2634  __Pyx_RefNannyFinishContext();
2635  return __pyx_r;
2636 }
2637 
2638 /* Python wrapper */
2639 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2640 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 ";
2641 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2642  PyObject *__pyx_r = 0;
2643  __Pyx_RefNannyDeclarations
2644  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2645  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2646 
2647  /* function exit code */
2648  __Pyx_RefNannyFinishContext();
2649  return __pyx_r;
2650 }
2651 
2652 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2653  PyObject *__pyx_r = NULL;
2654  __Pyx_RefNannyDeclarations
2655  PyObject *__pyx_t_1 = NULL;
2656  __Pyx_RefNannySetupContext("copy", 0);
2657  __Pyx_XDECREF(__pyx_r);
2658  __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)
2659  __Pyx_GOTREF(__pyx_t_1);
2660  __pyx_r = __pyx_t_1;
2661  __pyx_t_1 = 0;
2662  goto __pyx_L0;
2663 
2664  /* function exit code */
2665  __pyx_L1_error:;
2666  __Pyx_XDECREF(__pyx_t_1);
2667  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2668  __pyx_r = NULL;
2669  __pyx_L0:;
2670  __Pyx_XGIVEREF(__pyx_r);
2671  __Pyx_RefNannyFinishContext();
2672  return __pyx_r;
2673 }
2674 
2675 /* "PyClical.pyx":73
2676  * return index_set(self)
2677  *
2678  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2679  * """
2680  * Construct an object of type index_set.
2681  */
2682 
2683 /* Python wrapper */
2684 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2685 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2686  PyObject *__pyx_v_other = 0;
2687  int __pyx_r;
2688  __Pyx_RefNannyDeclarations
2689  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2690  {
2691  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2692  PyObject* values[1] = {0};
2693  values[0] = ((PyObject *)__pyx_int_0);
2694  if (unlikely(__pyx_kwds)) {
2695  Py_ssize_t kw_args;
2696  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2697  switch (pos_args) {
2698  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2699  CYTHON_FALLTHROUGH;
2700  case 0: break;
2701  default: goto __pyx_L5_argtuple_error;
2702  }
2703  kw_args = PyDict_Size(__pyx_kwds);
2704  switch (pos_args) {
2705  case 0:
2706  if (kw_args > 0) {
2707  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2708  if (value) { values[0] = value; kw_args--; }
2709  }
2710  }
2711  if (unlikely(kw_args > 0)) {
2712  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2713  }
2714  } else {
2715  switch (PyTuple_GET_SIZE(__pyx_args)) {
2716  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2717  CYTHON_FALLTHROUGH;
2718  case 0: break;
2719  default: goto __pyx_L5_argtuple_error;
2720  }
2721  }
2722  __pyx_v_other = values[0];
2723  }
2724  goto __pyx_L4_argument_unpacking_done;
2725  __pyx_L5_argtuple_error:;
2726  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2727  __pyx_L3_error:;
2728  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2729  __Pyx_RefNannyFinishContext();
2730  return -1;
2731  __pyx_L4_argument_unpacking_done:;
2732  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2733 
2734  /* function exit code */
2735  __Pyx_RefNannyFinishContext();
2736  return __pyx_r;
2737 }
2738 
2739 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2740  PyObject *__pyx_v_error_msg_prefix = NULL;
2741  PyObject *__pyx_v_idx = NULL;
2742  int __pyx_r;
2743  __Pyx_RefNannyDeclarations
2744  int __pyx_t_1;
2745  int __pyx_t_2;
2746  IndexSet *__pyx_t_3;
2747  PyObject *__pyx_t_4 = NULL;
2748  PyObject *__pyx_t_5 = NULL;
2749  int __pyx_t_6;
2750  int __pyx_t_7;
2751  PyObject *__pyx_t_8 = NULL;
2752  PyObject *__pyx_t_9 = NULL;
2753  PyObject *__pyx_t_10 = NULL;
2754  Py_ssize_t __pyx_t_11;
2755  PyObject *(*__pyx_t_12)(PyObject *);
2756  PyObject *__pyx_t_13 = NULL;
2757  PyObject *__pyx_t_14 = NULL;
2758  PyObject *__pyx_t_15 = NULL;
2759  PyObject *__pyx_t_16 = NULL;
2760  char *__pyx_t_17;
2761  __Pyx_RefNannySetupContext("__cinit__", 0);
2762 
2763  /* "PyClical.pyx":92
2764  * {}
2765  * """
2766  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2767  * if isinstance(other, index_set):
2768  * self.instance = new IndexSet((<index_set>other).unwrap())
2769  */
2770  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2771  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2772 
2773  /* "PyClical.pyx":93
2774  * """
2775  * error_msg_prefix = "Cannot initialize index_set object from"
2776  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2777  * self.instance = new IndexSet((<index_set>other).unwrap())
2778  * elif isinstance(other, numbers.Integral):
2779  */
2780  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2781  __pyx_t_2 = (__pyx_t_1 != 0);
2782  if (__pyx_t_2) {
2783 
2784  /* "PyClical.pyx":94
2785  * error_msg_prefix = "Cannot initialize index_set object from"
2786  * if isinstance(other, index_set):
2787  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2788  * elif isinstance(other, numbers.Integral):
2789  * self.instance = new IndexSet(<int>other)
2790  */
2791  try {
2792  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2793  } catch(...) {
2794  __Pyx_CppExn2PyErr();
2795  __PYX_ERR(0, 94, __pyx_L1_error)
2796  }
2797  __pyx_v_self->instance = __pyx_t_3;
2798 
2799  /* "PyClical.pyx":93
2800  * """
2801  * error_msg_prefix = "Cannot initialize index_set object from"
2802  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2803  * self.instance = new IndexSet((<index_set>other).unwrap())
2804  * elif isinstance(other, numbers.Integral):
2805  */
2806  goto __pyx_L3;
2807  }
2808 
2809  /* "PyClical.pyx":95
2810  * if isinstance(other, index_set):
2811  * self.instance = new IndexSet((<index_set>other).unwrap())
2812  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2813  * self.instance = new IndexSet(<int>other)
2814  * elif isinstance(other, (set, frozenset)):
2815  */
2816  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2817  __Pyx_GOTREF(__pyx_t_4);
2818  __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)
2819  __Pyx_GOTREF(__pyx_t_5);
2820  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2821  __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)
2822  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2823  __pyx_t_1 = (__pyx_t_2 != 0);
2824  if (__pyx_t_1) {
2825 
2826  /* "PyClical.pyx":96
2827  * self.instance = new IndexSet((<index_set>other).unwrap())
2828  * elif isinstance(other, numbers.Integral):
2829  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2830  * elif isinstance(other, (set, frozenset)):
2831  * try:
2832  */
2833  __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)
2834  try {
2835  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2836  } catch(...) {
2837  __Pyx_CppExn2PyErr();
2838  __PYX_ERR(0, 96, __pyx_L1_error)
2839  }
2840  __pyx_v_self->instance = __pyx_t_3;
2841 
2842  /* "PyClical.pyx":95
2843  * if isinstance(other, index_set):
2844  * self.instance = new IndexSet((<index_set>other).unwrap())
2845  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2846  * self.instance = new IndexSet(<int>other)
2847  * elif isinstance(other, (set, frozenset)):
2848  */
2849  goto __pyx_L3;
2850  }
2851 
2852  /* "PyClical.pyx":97
2853  * elif isinstance(other, numbers.Integral):
2854  * self.instance = new IndexSet(<int>other)
2855  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2856  * try:
2857  * self.instance = new IndexSet()
2858  */
2859  __pyx_t_2 = PySet_Check(__pyx_v_other);
2860  __pyx_t_7 = (__pyx_t_2 != 0);
2861  if (!__pyx_t_7) {
2862  } else {
2863  __pyx_t_1 = __pyx_t_7;
2864  goto __pyx_L4_bool_binop_done;
2865  }
2866  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2867  __pyx_t_2 = (__pyx_t_7 != 0);
2868  __pyx_t_1 = __pyx_t_2;
2869  __pyx_L4_bool_binop_done:;
2870  __pyx_t_2 = (__pyx_t_1 != 0);
2871  if (__pyx_t_2) {
2872 
2873  /* "PyClical.pyx":98
2874  * self.instance = new IndexSet(<int>other)
2875  * elif isinstance(other, (set, frozenset)):
2876  * try: # <<<<<<<<<<<<<<
2877  * self.instance = new IndexSet()
2878  * for idx in other:
2879  */
2880  {
2881  __Pyx_PyThreadState_declare
2882  __Pyx_PyThreadState_assign
2883  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2884  __Pyx_XGOTREF(__pyx_t_8);
2885  __Pyx_XGOTREF(__pyx_t_9);
2886  __Pyx_XGOTREF(__pyx_t_10);
2887  /*try:*/ {
2888 
2889  /* "PyClical.pyx":99
2890  * elif isinstance(other, (set, frozenset)):
2891  * try:
2892  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2893  * for idx in other:
2894  * self[idx] = True
2895  */
2896  __pyx_t_3 = new IndexSet();
2897  __pyx_v_self->instance = __pyx_t_3;
2898 
2899  /* "PyClical.pyx":100
2900  * try:
2901  * self.instance = new IndexSet()
2902  * for idx in other: # <<<<<<<<<<<<<<
2903  * self[idx] = True
2904  * except IndexError:
2905  */
2906  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2907  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2908  __pyx_t_12 = NULL;
2909  } else {
2910  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
2911  __Pyx_GOTREF(__pyx_t_5);
2912  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
2913  }
2914  for (;;) {
2915  if (likely(!__pyx_t_12)) {
2916  if (likely(PyList_CheckExact(__pyx_t_5))) {
2917  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
2918  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2919  __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)
2920  #else
2921  __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)
2922  __Pyx_GOTREF(__pyx_t_4);
2923  #endif
2924  } else {
2925  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2926  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2927  __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)
2928  #else
2929  __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)
2930  __Pyx_GOTREF(__pyx_t_4);
2931  #endif
2932  }
2933  } else {
2934  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2935  if (unlikely(!__pyx_t_4)) {
2936  PyObject* exc_type = PyErr_Occurred();
2937  if (exc_type) {
2938  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2939  else __PYX_ERR(0, 100, __pyx_L6_error)
2940  }
2941  break;
2942  }
2943  __Pyx_GOTREF(__pyx_t_4);
2944  }
2945  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2946  __pyx_t_4 = 0;
2947 
2948  /* "PyClical.pyx":101
2949  * self.instance = new IndexSet()
2950  * for idx in other:
2951  * self[idx] = True # <<<<<<<<<<<<<<
2952  * except IndexError:
2953  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2954  */
2955  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
2956 
2957  /* "PyClical.pyx":100
2958  * try:
2959  * self.instance = new IndexSet()
2960  * for idx in other: # <<<<<<<<<<<<<<
2961  * self[idx] = True
2962  * except IndexError:
2963  */
2964  }
2965  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2966 
2967  /* "PyClical.pyx":98
2968  * self.instance = new IndexSet(<int>other)
2969  * elif isinstance(other, (set, frozenset)):
2970  * try: # <<<<<<<<<<<<<<
2971  * self.instance = new IndexSet()
2972  * for idx in other:
2973  */
2974  }
2975  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2976  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2977  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2978  goto __pyx_L11_try_end;
2979  __pyx_L6_error:;
2980  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2981  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2982 
2983  /* "PyClical.pyx":102
2984  * for idx in other:
2985  * self[idx] = True
2986  * except IndexError: # <<<<<<<<<<<<<<
2987  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2988  * except (RuntimeError, TypeError):
2989  */
2990  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2991  if (__pyx_t_6) {
2992  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2993  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
2994  __Pyx_GOTREF(__pyx_t_5);
2995  __Pyx_GOTREF(__pyx_t_4);
2996  __Pyx_GOTREF(__pyx_t_13);
2997 
2998  /* "PyClical.pyx":103
2999  * self[idx] = True
3000  * except IndexError:
3001  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3002  * except (RuntimeError, TypeError):
3003  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3004  */
3005  __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)
3006  __Pyx_GOTREF(__pyx_t_14);
3007  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3008  __Pyx_GOTREF(__pyx_t_15);
3009  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3010  __Pyx_GOTREF(__pyx_t_16);
3011  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3012  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3013  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3014  __Pyx_GOTREF(__pyx_t_15);
3015  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3016  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3017  __Pyx_GOTREF(__pyx_t_16);
3018  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3019  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3020  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3021  __PYX_ERR(0, 103, __pyx_L8_except_error)
3022  }
3023 
3024  /* "PyClical.pyx":104
3025  * except IndexError:
3026  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3027  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3028  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3029  * elif isinstance(other, str):
3030  */
3031  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3032  if (__pyx_t_6) {
3033  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3034  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3035  __Pyx_GOTREF(__pyx_t_13);
3036  __Pyx_GOTREF(__pyx_t_4);
3037  __Pyx_GOTREF(__pyx_t_5);
3038 
3039  /* "PyClical.pyx":105
3040  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3041  * except (RuntimeError, TypeError):
3042  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3043  * elif isinstance(other, str):
3044  * try:
3045  */
3046  __pyx_t_16 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3047  __Pyx_GOTREF(__pyx_t_16);
3048  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3049  __Pyx_GOTREF(__pyx_t_15);
3050  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3051  __Pyx_GOTREF(__pyx_t_14);
3052  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3053  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3054  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3055  __Pyx_GOTREF(__pyx_t_15);
3056  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3057  __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3058  __Pyx_GOTREF(__pyx_t_14);
3059  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3060  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3061  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3062  __PYX_ERR(0, 105, __pyx_L8_except_error)
3063  }
3064  goto __pyx_L8_except_error;
3065  __pyx_L8_except_error:;
3066 
3067  /* "PyClical.pyx":98
3068  * self.instance = new IndexSet(<int>other)
3069  * elif isinstance(other, (set, frozenset)):
3070  * try: # <<<<<<<<<<<<<<
3071  * self.instance = new IndexSet()
3072  * for idx in other:
3073  */
3074  __Pyx_XGIVEREF(__pyx_t_8);
3075  __Pyx_XGIVEREF(__pyx_t_9);
3076  __Pyx_XGIVEREF(__pyx_t_10);
3077  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3078  goto __pyx_L1_error;
3079  __pyx_L11_try_end:;
3080  }
3081 
3082  /* "PyClical.pyx":97
3083  * elif isinstance(other, numbers.Integral):
3084  * self.instance = new IndexSet(<int>other)
3085  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3086  * try:
3087  * self.instance = new IndexSet()
3088  */
3089  goto __pyx_L3;
3090  }
3091 
3092  /* "PyClical.pyx":106
3093  * except (RuntimeError, TypeError):
3094  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3095  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3096  * try:
3097  * self.instance = new IndexSet(<char *>other)
3098  */
3099  __pyx_t_2 = PyString_Check(__pyx_v_other);
3100  __pyx_t_1 = (__pyx_t_2 != 0);
3101  if (likely(__pyx_t_1)) {
3102 
3103  /* "PyClical.pyx":107
3104  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3105  * elif isinstance(other, str):
3106  * try: # <<<<<<<<<<<<<<
3107  * self.instance = new IndexSet(<char *>other)
3108  * except RuntimeError:
3109  */
3110  {
3111  __Pyx_PyThreadState_declare
3112  __Pyx_PyThreadState_assign
3113  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3114  __Pyx_XGOTREF(__pyx_t_10);
3115  __Pyx_XGOTREF(__pyx_t_9);
3116  __Pyx_XGOTREF(__pyx_t_8);
3117  /*try:*/ {
3118 
3119  /* "PyClical.pyx":108
3120  * elif isinstance(other, str):
3121  * try:
3122  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3123  * except RuntimeError:
3124  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3125  */
3126  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3127  try {
3128  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3129  } catch(...) {
3130  __Pyx_CppExn2PyErr();
3131  __PYX_ERR(0, 108, __pyx_L18_error)
3132  }
3133  __pyx_v_self->instance = __pyx_t_3;
3134 
3135  /* "PyClical.pyx":107
3136  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3137  * elif isinstance(other, str):
3138  * try: # <<<<<<<<<<<<<<
3139  * self.instance = new IndexSet(<char *>other)
3140  * except RuntimeError:
3141  */
3142  }
3143  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3144  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3145  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3146  goto __pyx_L23_try_end;
3147  __pyx_L18_error:;
3148  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3149  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3150  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3151  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3152  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3153  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3154 
3155  /* "PyClical.pyx":109
3156  * try:
3157  * self.instance = new IndexSet(<char *>other)
3158  * except RuntimeError: # <<<<<<<<<<<<<<
3159  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3160  * else:
3161  */
3162  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3163  if (__pyx_t_6) {
3164  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3165  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3166  __Pyx_GOTREF(__pyx_t_5);
3167  __Pyx_GOTREF(__pyx_t_4);
3168  __Pyx_GOTREF(__pyx_t_13);
3169 
3170  /* "PyClical.pyx":110
3171  * self.instance = new IndexSet(<char *>other)
3172  * except RuntimeError:
3173  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3174  * else:
3175  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3176  */
3177  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s_invalid_string); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3178  __Pyx_GOTREF(__pyx_t_14);
3179  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3180  __Pyx_GOTREF(__pyx_t_15);
3181  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3182  __Pyx_GOTREF(__pyx_t_16);
3183  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3184  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3185  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3186  __Pyx_GOTREF(__pyx_t_15);
3187  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3188  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3189  __Pyx_GOTREF(__pyx_t_16);
3190  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3191  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3192  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3193  __PYX_ERR(0, 110, __pyx_L20_except_error)
3194  }
3195  goto __pyx_L20_except_error;
3196  __pyx_L20_except_error:;
3197 
3198  /* "PyClical.pyx":107
3199  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3200  * elif isinstance(other, str):
3201  * try: # <<<<<<<<<<<<<<
3202  * self.instance = new IndexSet(<char *>other)
3203  * except RuntimeError:
3204  */
3205  __Pyx_XGIVEREF(__pyx_t_10);
3206  __Pyx_XGIVEREF(__pyx_t_9);
3207  __Pyx_XGIVEREF(__pyx_t_8);
3208  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3209  goto __pyx_L1_error;
3210  __pyx_L23_try_end:;
3211  }
3212 
3213  /* "PyClical.pyx":106
3214  * except (RuntimeError, TypeError):
3215  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3216  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3217  * try:
3218  * self.instance = new IndexSet(<char *>other)
3219  */
3220  goto __pyx_L3;
3221  }
3222 
3223  /* "PyClical.pyx":112
3224  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3225  * else:
3226  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3227  *
3228  * def __dealloc__(self):
3229  */
3230  /*else*/ {
3231  __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)
3232  __Pyx_GOTREF(__pyx_t_13);
3233  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3234  __Pyx_GOTREF(__pyx_t_4);
3235  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3236  __Pyx_GOTREF(__pyx_t_5);
3237  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3238  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3239  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3240  __Pyx_GOTREF(__pyx_t_4);
3241  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3242  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3243  __Pyx_GOTREF(__pyx_t_5);
3244  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3245  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3246  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3247  __PYX_ERR(0, 112, __pyx_L1_error)
3248  }
3249  __pyx_L3:;
3250 
3251  /* "PyClical.pyx":73
3252  * return index_set(self)
3253  *
3254  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3255  * """
3256  * Construct an object of type index_set.
3257  */
3258 
3259  /* function exit code */
3260  __pyx_r = 0;
3261  goto __pyx_L0;
3262  __pyx_L1_error:;
3263  __Pyx_XDECREF(__pyx_t_4);
3264  __Pyx_XDECREF(__pyx_t_5);
3265  __Pyx_XDECREF(__pyx_t_13);
3266  __Pyx_XDECREF(__pyx_t_14);
3267  __Pyx_XDECREF(__pyx_t_15);
3268  __Pyx_XDECREF(__pyx_t_16);
3269  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3270  __pyx_r = -1;
3271  __pyx_L0:;
3272  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3273  __Pyx_XDECREF(__pyx_v_idx);
3274  __Pyx_RefNannyFinishContext();
3275  return __pyx_r;
3276 }
3277 
3278 /* "PyClical.pyx":114
3279  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3280  *
3281  * def __dealloc__(self): # <<<<<<<<<<<<<<
3282  * """
3283  * Clean up by deallocating the instance of C++ class IndexSet.
3284  */
3285 
3286 /* Python wrapper */
3287 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3288 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3289  __Pyx_RefNannyDeclarations
3290  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3291  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3292 
3293  /* function exit code */
3294  __Pyx_RefNannyFinishContext();
3295 }
3296 
3297 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3298  __Pyx_RefNannyDeclarations
3299  __Pyx_RefNannySetupContext("__dealloc__", 0);
3300 
3301  /* "PyClical.pyx":118
3302  * Clean up by deallocating the instance of C++ class IndexSet.
3303  * """
3304  * del self.instance # <<<<<<<<<<<<<<
3305  *
3306  * def __richcmp__(lhs, rhs, int op):
3307  */
3308  delete __pyx_v_self->instance;
3309 
3310  /* "PyClical.pyx":114
3311  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3312  *
3313  * def __dealloc__(self): # <<<<<<<<<<<<<<
3314  * """
3315  * Clean up by deallocating the instance of C++ class IndexSet.
3316  */
3317 
3318  /* function exit code */
3319  __Pyx_RefNannyFinishContext();
3320 }
3321 
3322 /* "PyClical.pyx":120
3323  * del self.instance
3324  *
3325  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3326  * """
3327  * Compare two objects of class index_set.
3328  */
3329 
3330 /* Python wrapper */
3331 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3332 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3333  PyObject *__pyx_r = 0;
3334  __Pyx_RefNannyDeclarations
3335  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3336  __pyx_r = __pyx_pf_8PyClical_9index_set_6__richcmp__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
3337 
3338  /* function exit code */
3339  __Pyx_RefNannyFinishContext();
3340  return __pyx_r;
3341 }
3342 
3343 static PyObject *__pyx_pf_8PyClical_9index_set_6__richcmp__(struct __pyx_obj_8PyClical_index_set *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3344  PyObject *__pyx_v_eq = NULL;
3345  PyObject *__pyx_v_lt = NULL;
3346  PyObject *__pyx_r = NULL;
3347  __Pyx_RefNannyDeclarations
3348  int __pyx_t_1;
3349  int __pyx_t_2;
3350  int __pyx_t_3;
3351  PyObject *__pyx_t_4 = NULL;
3352  __Pyx_RefNannySetupContext("__richcmp__", 0);
3353 
3354  /* "PyClical.pyx":141
3355  * False
3356  * """
3357  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3358  * eq = bool(lhs is rhs)
3359  * if op == 2: # ==
3360  */
3361  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3362  __pyx_t_3 = (__pyx_t_2 != 0);
3363  if (!__pyx_t_3) {
3364  } else {
3365  __pyx_t_1 = __pyx_t_3;
3366  goto __pyx_L4_bool_binop_done;
3367  }
3368  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3369  __pyx_t_2 = (__pyx_t_3 != 0);
3370  __pyx_t_1 = __pyx_t_2;
3371  __pyx_L4_bool_binop_done:;
3372  if (__pyx_t_1) {
3373 
3374  /* "PyClical.pyx":142
3375  * """
3376  * if (lhs is None) or (rhs is None):
3377  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3378  * if op == 2: # ==
3379  * return eq
3380  */
3381  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3382  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3383  __Pyx_GOTREF(__pyx_t_4);
3384  __pyx_v_eq = __pyx_t_4;
3385  __pyx_t_4 = 0;
3386 
3387  /* "PyClical.pyx":143
3388  * if (lhs is None) or (rhs is None):
3389  * eq = bool(lhs is rhs)
3390  * if op == 2: # == # <<<<<<<<<<<<<<
3391  * return eq
3392  * elif op == 3: # !=
3393  */
3394  switch (__pyx_v_op) {
3395  case 2:
3396 
3397  /* "PyClical.pyx":144
3398  * eq = bool(lhs is rhs)
3399  * if op == 2: # ==
3400  * return eq # <<<<<<<<<<<<<<
3401  * elif op == 3: # !=
3402  * return not eq
3403  */
3404  __Pyx_XDECREF(__pyx_r);
3405  __Pyx_INCREF(__pyx_v_eq);
3406  __pyx_r = __pyx_v_eq;
3407  goto __pyx_L0;
3408 
3409  /* "PyClical.pyx":143
3410  * if (lhs is None) or (rhs is None):
3411  * eq = bool(lhs is rhs)
3412  * if op == 2: # == # <<<<<<<<<<<<<<
3413  * return eq
3414  * elif op == 3: # !=
3415  */
3416  break;
3417 
3418  /* "PyClical.pyx":145
3419  * if op == 2: # ==
3420  * return eq
3421  * elif op == 3: # != # <<<<<<<<<<<<<<
3422  * return not eq
3423  * else:
3424  */
3425  case 3:
3426 
3427  /* "PyClical.pyx":146
3428  * return eq
3429  * elif op == 3: # !=
3430  * return not eq # <<<<<<<<<<<<<<
3431  * else:
3432  * if op == 0: # <
3433  */
3434  __Pyx_XDECREF(__pyx_r);
3435  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3436  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3437  __Pyx_GOTREF(__pyx_t_4);
3438  __pyx_r = __pyx_t_4;
3439  __pyx_t_4 = 0;
3440  goto __pyx_L0;
3441 
3442  /* "PyClical.pyx":145
3443  * if op == 2: # ==
3444  * return eq
3445  * elif op == 3: # != # <<<<<<<<<<<<<<
3446  * return not eq
3447  * else:
3448  */
3449  break;
3450  default:
3451 
3452  /* "PyClical.pyx":148
3453  * return not eq
3454  * else:
3455  * if op == 0: # < # <<<<<<<<<<<<<<
3456  * return False
3457  * elif op == 1: # <=
3458  */
3459  switch (__pyx_v_op) {
3460  case 0:
3461 
3462  /* "PyClical.pyx":149
3463  * else:
3464  * if op == 0: # <
3465  * return False # <<<<<<<<<<<<<<
3466  * elif op == 1: # <=
3467  * return eq
3468  */
3469  __Pyx_XDECREF(__pyx_r);
3470  __Pyx_INCREF(Py_False);
3471  __pyx_r = Py_False;
3472  goto __pyx_L0;
3473 
3474  /* "PyClical.pyx":148
3475  * return not eq
3476  * else:
3477  * if op == 0: # < # <<<<<<<<<<<<<<
3478  * return False
3479  * elif op == 1: # <=
3480  */
3481  break;
3482 
3483  /* "PyClical.pyx":150
3484  * if op == 0: # <
3485  * return False
3486  * elif op == 1: # <= # <<<<<<<<<<<<<<
3487  * return eq
3488  * elif op == 4: # >
3489  */
3490  case 1:
3491 
3492  /* "PyClical.pyx":151
3493  * return False
3494  * elif op == 1: # <=
3495  * return eq # <<<<<<<<<<<<<<
3496  * elif op == 4: # >
3497  * return False
3498  */
3499  __Pyx_XDECREF(__pyx_r);
3500  __Pyx_INCREF(__pyx_v_eq);
3501  __pyx_r = __pyx_v_eq;
3502  goto __pyx_L0;
3503 
3504  /* "PyClical.pyx":150
3505  * if op == 0: # <
3506  * return False
3507  * elif op == 1: # <= # <<<<<<<<<<<<<<
3508  * return eq
3509  * elif op == 4: # >
3510  */
3511  break;
3512 
3513  /* "PyClical.pyx":152
3514  * elif op == 1: # <=
3515  * return eq
3516  * elif op == 4: # > # <<<<<<<<<<<<<<
3517  * return False
3518  * elif op == 5: # >=
3519  */
3520  case 4:
3521 
3522  /* "PyClical.pyx":153
3523  * return eq
3524  * elif op == 4: # >
3525  * return False # <<<<<<<<<<<<<<
3526  * elif op == 5: # >=
3527  * return eq
3528  */
3529  __Pyx_XDECREF(__pyx_r);
3530  __Pyx_INCREF(Py_False);
3531  __pyx_r = Py_False;
3532  goto __pyx_L0;
3533 
3534  /* "PyClical.pyx":152
3535  * elif op == 1: # <=
3536  * return eq
3537  * elif op == 4: # > # <<<<<<<<<<<<<<
3538  * return False
3539  * elif op == 5: # >=
3540  */
3541  break;
3542 
3543  /* "PyClical.pyx":154
3544  * elif op == 4: # >
3545  * return False
3546  * elif op == 5: # >= # <<<<<<<<<<<<<<
3547  * return eq
3548  * else:
3549  */
3550  case 5:
3551 
3552  /* "PyClical.pyx":155
3553  * return False
3554  * elif op == 5: # >=
3555  * return eq # <<<<<<<<<<<<<<
3556  * else:
3557  * return NotImplemented
3558  */
3559  __Pyx_XDECREF(__pyx_r);
3560  __Pyx_INCREF(__pyx_v_eq);
3561  __pyx_r = __pyx_v_eq;
3562  goto __pyx_L0;
3563 
3564  /* "PyClical.pyx":154
3565  * elif op == 4: # >
3566  * return False
3567  * elif op == 5: # >= # <<<<<<<<<<<<<<
3568  * return eq
3569  * else:
3570  */
3571  break;
3572  default:
3573 
3574  /* "PyClical.pyx":157
3575  * return eq
3576  * else:
3577  * return NotImplemented # <<<<<<<<<<<<<<
3578  * else:
3579  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3580  */
3581  __Pyx_XDECREF(__pyx_r);
3582  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3583  __pyx_r = __pyx_builtin_NotImplemented;
3584  goto __pyx_L0;
3585  break;
3586  }
3587  break;
3588  }
3589 
3590  /* "PyClical.pyx":141
3591  * False
3592  * """
3593  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3594  * eq = bool(lhs is rhs)
3595  * if op == 2: # ==
3596  */
3597  }
3598 
3599  /* "PyClical.pyx":159
3600  * return NotImplemented
3601  * else:
3602  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3603  * if op == 2: # ==
3604  * return eq
3605  */
3606  /*else*/ {
3607  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3608  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3609  __Pyx_GOTREF(__pyx_t_4);
3610  __pyx_v_eq = __pyx_t_4;
3611  __pyx_t_4 = 0;
3612 
3613  /* "PyClical.pyx":160
3614  * else:
3615  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3616  * if op == 2: # == # <<<<<<<<<<<<<<
3617  * return eq
3618  * elif op == 3: # !=
3619  */
3620  switch (__pyx_v_op) {
3621  case 2:
3622 
3623  /* "PyClical.pyx":161
3624  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3625  * if op == 2: # ==
3626  * return eq # <<<<<<<<<<<<<<
3627  * elif op == 3: # !=
3628  * return not eq
3629  */
3630  __Pyx_XDECREF(__pyx_r);
3631  __Pyx_INCREF(__pyx_v_eq);
3632  __pyx_r = __pyx_v_eq;
3633  goto __pyx_L0;
3634 
3635  /* "PyClical.pyx":160
3636  * else:
3637  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3638  * if op == 2: # == # <<<<<<<<<<<<<<
3639  * return eq
3640  * elif op == 3: # !=
3641  */
3642  break;
3643 
3644  /* "PyClical.pyx":162
3645  * if op == 2: # ==
3646  * return eq
3647  * elif op == 3: # != # <<<<<<<<<<<<<<
3648  * return not eq
3649  * else:
3650  */
3651  case 3:
3652 
3653  /* "PyClical.pyx":163
3654  * return eq
3655  * elif op == 3: # !=
3656  * return not eq # <<<<<<<<<<<<<<
3657  * else:
3658  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3659  */
3660  __Pyx_XDECREF(__pyx_r);
3661  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3662  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3663  __Pyx_GOTREF(__pyx_t_4);
3664  __pyx_r = __pyx_t_4;
3665  __pyx_t_4 = 0;
3666  goto __pyx_L0;
3667 
3668  /* "PyClical.pyx":162
3669  * if op == 2: # ==
3670  * return eq
3671  * elif op == 3: # != # <<<<<<<<<<<<<<
3672  * return not eq
3673  * else:
3674  */
3675  break;
3676  default:
3677 
3678  /* "PyClical.pyx":165
3679  * return not eq
3680  * else:
3681  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3682  * if op == 0: # <
3683  * return lt
3684  */
3685  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3686  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3687  __Pyx_GOTREF(__pyx_t_4);
3688  __pyx_v_lt = __pyx_t_4;
3689  __pyx_t_4 = 0;
3690 
3691  /* "PyClical.pyx":166
3692  * else:
3693  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3694  * if op == 0: # < # <<<<<<<<<<<<<<
3695  * return lt
3696  * elif op == 1: # <=
3697  */
3698  switch (__pyx_v_op) {
3699  case 0:
3700 
3701  /* "PyClical.pyx":167
3702  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3703  * if op == 0: # <
3704  * return lt # <<<<<<<<<<<<<<
3705  * elif op == 1: # <=
3706  * return lt or eq
3707  */
3708  __Pyx_XDECREF(__pyx_r);
3709  __Pyx_INCREF(__pyx_v_lt);
3710  __pyx_r = __pyx_v_lt;
3711  goto __pyx_L0;
3712 
3713  /* "PyClical.pyx":166
3714  * else:
3715  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3716  * if op == 0: # < # <<<<<<<<<<<<<<
3717  * return lt
3718  * elif op == 1: # <=
3719  */
3720  break;
3721 
3722  /* "PyClical.pyx":168
3723  * if op == 0: # <
3724  * return lt
3725  * elif op == 1: # <= # <<<<<<<<<<<<<<
3726  * return lt or eq
3727  * elif op == 4: # >
3728  */
3729  case 1:
3730 
3731  /* "PyClical.pyx":169
3732  * return lt
3733  * elif op == 1: # <=
3734  * return lt or eq # <<<<<<<<<<<<<<
3735  * elif op == 4: # >
3736  * return not (lt or eq)
3737  */
3738  __Pyx_XDECREF(__pyx_r);
3739  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3740  if (!__pyx_t_1) {
3741  } else {
3742  __Pyx_INCREF(__pyx_v_lt);
3743  __pyx_t_4 = __pyx_v_lt;
3744  goto __pyx_L6_bool_binop_done;
3745  }
3746  __Pyx_INCREF(__pyx_v_eq);
3747  __pyx_t_4 = __pyx_v_eq;
3748  __pyx_L6_bool_binop_done:;
3749  __pyx_r = __pyx_t_4;
3750  __pyx_t_4 = 0;
3751  goto __pyx_L0;
3752 
3753  /* "PyClical.pyx":168
3754  * if op == 0: # <
3755  * return lt
3756  * elif op == 1: # <= # <<<<<<<<<<<<<<
3757  * return lt or eq
3758  * elif op == 4: # >
3759  */
3760  break;
3761 
3762  /* "PyClical.pyx":170
3763  * elif op == 1: # <=
3764  * return lt or eq
3765  * elif op == 4: # > # <<<<<<<<<<<<<<
3766  * return not (lt or eq)
3767  * elif op == 5: # >=
3768  */
3769  case 4:
3770 
3771  /* "PyClical.pyx":171
3772  * return lt or eq
3773  * elif op == 4: # >
3774  * return not (lt or eq) # <<<<<<<<<<<<<<
3775  * elif op == 5: # >=
3776  * return not lt
3777  */
3778  __Pyx_XDECREF(__pyx_r);
3779  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3780  if (!__pyx_t_2) {
3781  } else {
3782  __pyx_t_1 = __pyx_t_2;
3783  goto __pyx_L8_bool_binop_done;
3784  }
3785  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3786  __pyx_t_1 = __pyx_t_2;
3787  __pyx_L8_bool_binop_done:;
3788  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3789  __Pyx_GOTREF(__pyx_t_4);
3790  __pyx_r = __pyx_t_4;
3791  __pyx_t_4 = 0;
3792  goto __pyx_L0;
3793 
3794  /* "PyClical.pyx":170
3795  * elif op == 1: # <=
3796  * return lt or eq
3797  * elif op == 4: # > # <<<<<<<<<<<<<<
3798  * return not (lt or eq)
3799  * elif op == 5: # >=
3800  */
3801  break;
3802 
3803  /* "PyClical.pyx":172
3804  * elif op == 4: # >
3805  * return not (lt or eq)
3806  * elif op == 5: # >= # <<<<<<<<<<<<<<
3807  * return not lt
3808  * else:
3809  */
3810  case 5:
3811 
3812  /* "PyClical.pyx":173
3813  * return not (lt or eq)
3814  * elif op == 5: # >=
3815  * return not lt # <<<<<<<<<<<<<<
3816  * else:
3817  * return NotImplemented
3818  */
3819  __Pyx_XDECREF(__pyx_r);
3820  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3821  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3822  __Pyx_GOTREF(__pyx_t_4);
3823  __pyx_r = __pyx_t_4;
3824  __pyx_t_4 = 0;
3825  goto __pyx_L0;
3826 
3827  /* "PyClical.pyx":172
3828  * elif op == 4: # >
3829  * return not (lt or eq)
3830  * elif op == 5: # >= # <<<<<<<<<<<<<<
3831  * return not lt
3832  * else:
3833  */
3834  break;
3835  default:
3836 
3837  /* "PyClical.pyx":175
3838  * return not lt
3839  * else:
3840  * return NotImplemented # <<<<<<<<<<<<<<
3841  *
3842  * def __setitem__(self, idx, val):
3843  */
3844  __Pyx_XDECREF(__pyx_r);
3845  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3846  __pyx_r = __pyx_builtin_NotImplemented;
3847  goto __pyx_L0;
3848  break;
3849  }
3850  break;
3851  }
3852  }
3853 
3854  /* "PyClical.pyx":120
3855  * del self.instance
3856  *
3857  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3858  * """
3859  * Compare two objects of class index_set.
3860  */
3861 
3862  /* function exit code */
3863  __pyx_L1_error:;
3864  __Pyx_XDECREF(__pyx_t_4);
3865  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3866  __pyx_r = NULL;
3867  __pyx_L0:;
3868  __Pyx_XDECREF(__pyx_v_eq);
3869  __Pyx_XDECREF(__pyx_v_lt);
3870  __Pyx_XGIVEREF(__pyx_r);
3871  __Pyx_RefNannyFinishContext();
3872  return __pyx_r;
3873 }
3874 
3875 /* "PyClical.pyx":177
3876  * return NotImplemented
3877  *
3878  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3879  * """
3880  * Set the value of an index_set object at index idx to value val.
3881  */
3882 
3883 /* Python wrapper */
3884 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3885 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 ";
3886 #if CYTHON_COMPILING_IN_CPYTHON
3887 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3888 #endif
3889 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3890  int __pyx_r;
3891  __Pyx_RefNannyDeclarations
3892  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3893  __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));
3894 
3895  /* function exit code */
3896  __Pyx_RefNannyFinishContext();
3897  return __pyx_r;
3898 }
3899 
3900 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) {
3901  int __pyx_r;
3902  __Pyx_RefNannyDeclarations
3903  int __pyx_t_1;
3904  int __pyx_t_2;
3905  __Pyx_RefNannySetupContext("__setitem__", 0);
3906 
3907  /* "PyClical.pyx":186
3908  * {2}
3909  * """
3910  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3911  * return
3912  *
3913  */
3914  __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)
3915  __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)
3916  try {
3917  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3918  } catch(...) {
3919  __Pyx_CppExn2PyErr();
3920  __PYX_ERR(0, 186, __pyx_L1_error)
3921  }
3922 
3923  /* "PyClical.pyx":187
3924  * """
3925  * self.instance.set(idx, val)
3926  * return # <<<<<<<<<<<<<<
3927  *
3928  * def __getitem__(self, idx):
3929  */
3930  __pyx_r = 0;
3931  goto __pyx_L0;
3932 
3933  /* "PyClical.pyx":177
3934  * return NotImplemented
3935  *
3936  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3937  * """
3938  * Set the value of an index_set object at index idx to value val.
3939  */
3940 
3941  /* function exit code */
3942  __pyx_L1_error:;
3943  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3944  __pyx_r = -1;
3945  __pyx_L0:;
3946  __Pyx_RefNannyFinishContext();
3947  return __pyx_r;
3948 }
3949 
3950 /* "PyClical.pyx":189
3951  * return
3952  *
3953  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3954  * """
3955  * Get the value of an index_set object at an index.
3956  */
3957 
3958 /* Python wrapper */
3959 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3960 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 ";
3961 #if CYTHON_COMPILING_IN_CPYTHON
3962 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3963 #endif
3964 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3965  PyObject *__pyx_r = 0;
3966  __Pyx_RefNannyDeclarations
3967  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
3968  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3969 
3970  /* function exit code */
3971  __Pyx_RefNannyFinishContext();
3972  return __pyx_r;
3973 }
3974 
3975 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3976  PyObject *__pyx_r = NULL;
3977  __Pyx_RefNannyDeclarations
3978  int __pyx_t_1;
3979  PyObject *__pyx_t_2 = NULL;
3980  __Pyx_RefNannySetupContext("__getitem__", 0);
3981 
3982  /* "PyClical.pyx":206
3983  * False
3984  * """
3985  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3986  *
3987  * def __contains__(self, idx):
3988  */
3989  __Pyx_XDECREF(__pyx_r);
3990  __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)
3991  __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)
3992  __Pyx_GOTREF(__pyx_t_2);
3993  __pyx_r = __pyx_t_2;
3994  __pyx_t_2 = 0;
3995  goto __pyx_L0;
3996 
3997  /* "PyClical.pyx":189
3998  * return
3999  *
4000  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4001  * """
4002  * Get the value of an index_set object at an index.
4003  */
4004 
4005  /* function exit code */
4006  __pyx_L1_error:;
4007  __Pyx_XDECREF(__pyx_t_2);
4008  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4009  __pyx_r = NULL;
4010  __pyx_L0:;
4011  __Pyx_XGIVEREF(__pyx_r);
4012  __Pyx_RefNannyFinishContext();
4013  return __pyx_r;
4014 }
4015 
4016 /* "PyClical.pyx":208
4017  * return self.instance.getitem(idx)
4018  *
4019  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4020  * """
4021  * Check that an index_set object contains the index idx: idx in self.
4022  */
4023 
4024 /* Python wrapper */
4025 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4026 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 ";
4027 #if CYTHON_COMPILING_IN_CPYTHON
4028 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4029 #endif
4030 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4031  int __pyx_r;
4032  __Pyx_RefNannyDeclarations
4033  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4034  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4035 
4036  /* function exit code */
4037  __Pyx_RefNannyFinishContext();
4038  return __pyx_r;
4039 }
4040 
4041 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4042  int __pyx_r;
4043  __Pyx_RefNannyDeclarations
4044  int __pyx_t_1;
4045  __Pyx_RefNannySetupContext("__contains__", 0);
4046 
4047  /* "PyClical.pyx":225
4048  * False
4049  * """
4050  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4051  *
4052  * def __iter__(self):
4053  */
4054  __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)
4055  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4056  goto __pyx_L0;
4057 
4058  /* "PyClical.pyx":208
4059  * return self.instance.getitem(idx)
4060  *
4061  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4062  * """
4063  * Check that an index_set object contains the index idx: idx in self.
4064  */
4065 
4066  /* function exit code */
4067  __pyx_L1_error:;
4068  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4069  __pyx_r = -1;
4070  __pyx_L0:;
4071  __Pyx_RefNannyFinishContext();
4072  return __pyx_r;
4073 }
4074 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4075 
4076 /* "PyClical.pyx":227
4077  * return self.instance.getitem(idx)
4078  *
4079  * def __iter__(self): # <<<<<<<<<<<<<<
4080  * """
4081  * Iterate over the indices of an index_set.
4082  */
4083 
4084 /* Python wrapper */
4085 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4086 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 ";
4087 #if CYTHON_COMPILING_IN_CPYTHON
4088 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4089 #endif
4090 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4091  PyObject *__pyx_r = 0;
4092  __Pyx_RefNannyDeclarations
4093  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4094  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4095 
4096  /* function exit code */
4097  __Pyx_RefNannyFinishContext();
4098  return __pyx_r;
4099 }
4100 
4101 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4102  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4103  PyObject *__pyx_r = NULL;
4104  __Pyx_RefNannyDeclarations
4105  __Pyx_RefNannySetupContext("__iter__", 0);
4106  __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);
4107  if (unlikely(!__pyx_cur_scope)) {
4108  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4109  __Pyx_INCREF(Py_None);
4110  __PYX_ERR(0, 227, __pyx_L1_error)
4111  } else {
4112  __Pyx_GOTREF(__pyx_cur_scope);
4113  }
4114  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4115  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4116  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4117  {
4118  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8PyClical_9index_set_16generator, NULL, (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)
4119  __Pyx_DECREF(__pyx_cur_scope);
4120  __Pyx_RefNannyFinishContext();
4121  return (PyObject *) gen;
4122  }
4123 
4124  /* function exit code */
4125  __pyx_L1_error:;
4126  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4127  __pyx_r = NULL;
4128  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4129  __Pyx_XGIVEREF(__pyx_r);
4130  __Pyx_RefNannyFinishContext();
4131  return __pyx_r;
4132 }
4133 
4134 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4135 {
4136  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4137  PyObject *__pyx_r = NULL;
4138  PyObject *__pyx_t_1 = NULL;
4139  PyObject *__pyx_t_2 = NULL;
4140  PyObject *__pyx_t_3 = NULL;
4141  PyObject *__pyx_t_4 = NULL;
4142  Py_ssize_t __pyx_t_5;
4143  PyObject *(*__pyx_t_6)(PyObject *);
4144  int __pyx_t_7;
4145  int __pyx_t_8;
4146  __Pyx_RefNannyDeclarations
4147  __Pyx_RefNannySetupContext("__iter__", 0);
4148  switch (__pyx_generator->resume_label) {
4149  case 0: goto __pyx_L3_first_run;
4150  case 1: goto __pyx_L7_resume_from_yield;
4151  default: /* CPython raises the right error here */
4152  __Pyx_RefNannyFinishContext();
4153  return NULL;
4154  }
4155  __pyx_L3_first_run:;
4156  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4157 
4158  /* "PyClical.pyx":234
4159  * -3 4 7
4160  * """
4161  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4162  * if idx in self:
4163  * yield idx
4164  */
4165  __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)
4166  __Pyx_GOTREF(__pyx_t_2);
4167  __pyx_t_3 = NULL;
4168  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4169  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4170  if (likely(__pyx_t_3)) {
4171  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4172  __Pyx_INCREF(__pyx_t_3);
4173  __Pyx_INCREF(function);
4174  __Pyx_DECREF_SET(__pyx_t_2, function);
4175  }
4176  }
4177  if (__pyx_t_3) {
4178  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4179  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4180  } else {
4181  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4182  }
4183  __Pyx_GOTREF(__pyx_t_1);
4184  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4185  __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)
4186  __Pyx_GOTREF(__pyx_t_3);
4187  __pyx_t_4 = NULL;
4188  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4189  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4190  if (likely(__pyx_t_4)) {
4191  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4192  __Pyx_INCREF(__pyx_t_4);
4193  __Pyx_INCREF(function);
4194  __Pyx_DECREF_SET(__pyx_t_3, function);
4195  }
4196  }
4197  if (__pyx_t_4) {
4198  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4199  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4200  } else {
4201  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4202  }
4203  __Pyx_GOTREF(__pyx_t_2);
4204  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4205  __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)
4206  __Pyx_GOTREF(__pyx_t_3);
4207  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4208  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4209  __Pyx_GOTREF(__pyx_t_2);
4210  __Pyx_GIVEREF(__pyx_t_1);
4211  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4212  __Pyx_GIVEREF(__pyx_t_3);
4213  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4214  __pyx_t_1 = 0;
4215  __pyx_t_3 = 0;
4216  __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)
4217  __Pyx_GOTREF(__pyx_t_3);
4218  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4219  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4220  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4221  __pyx_t_6 = NULL;
4222  } else {
4223  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4224  __Pyx_GOTREF(__pyx_t_2);
4225  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4226  }
4227  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4228  for (;;) {
4229  if (likely(!__pyx_t_6)) {
4230  if (likely(PyList_CheckExact(__pyx_t_2))) {
4231  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4232  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4233  __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)
4234  #else
4235  __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)
4236  __Pyx_GOTREF(__pyx_t_3);
4237  #endif
4238  } else {
4239  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4240  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4241  __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)
4242  #else
4243  __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)
4244  __Pyx_GOTREF(__pyx_t_3);
4245  #endif
4246  }
4247  } else {
4248  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4249  if (unlikely(!__pyx_t_3)) {
4250  PyObject* exc_type = PyErr_Occurred();
4251  if (exc_type) {
4252  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4253  else __PYX_ERR(0, 234, __pyx_L1_error)
4254  }
4255  break;
4256  }
4257  __Pyx_GOTREF(__pyx_t_3);
4258  }
4259  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4260  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4261  __Pyx_GIVEREF(__pyx_t_3);
4262  __pyx_t_3 = 0;
4263 
4264  /* "PyClical.pyx":235
4265  * """
4266  * for idx in range(self.min(), self.max()+1):
4267  * if idx in self: # <<<<<<<<<<<<<<
4268  * yield idx
4269  *
4270  */
4271  __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)
4272  __pyx_t_8 = (__pyx_t_7 != 0);
4273  if (__pyx_t_8) {
4274 
4275  /* "PyClical.pyx":236
4276  * for idx in range(self.min(), self.max()+1):
4277  * if idx in self:
4278  * yield idx # <<<<<<<<<<<<<<
4279  *
4280  * def __invert__(self):
4281  */
4282  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4283  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4284  __Pyx_XGIVEREF(__pyx_t_2);
4285  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4286  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4287  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4288  __Pyx_XGIVEREF(__pyx_r);
4289  __Pyx_RefNannyFinishContext();
4290  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4291  /* return from generator, yielding value */
4292  __pyx_generator->resume_label = 1;
4293  return __pyx_r;
4294  __pyx_L7_resume_from_yield:;
4295  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4296  __pyx_cur_scope->__pyx_t_0 = 0;
4297  __Pyx_XGOTREF(__pyx_t_2);
4298  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4299  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4300  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4301 
4302  /* "PyClical.pyx":235
4303  * """
4304  * for idx in range(self.min(), self.max()+1):
4305  * if idx in self: # <<<<<<<<<<<<<<
4306  * yield idx
4307  *
4308  */
4309  }
4310 
4311  /* "PyClical.pyx":234
4312  * -3 4 7
4313  * """
4314  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4315  * if idx in self:
4316  * yield idx
4317  */
4318  }
4319  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4320  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4321 
4322  /* "PyClical.pyx":227
4323  * return self.instance.getitem(idx)
4324  *
4325  * def __iter__(self): # <<<<<<<<<<<<<<
4326  * """
4327  * Iterate over the indices of an index_set.
4328  */
4329 
4330  /* function exit code */
4331  PyErr_SetNone(PyExc_StopIteration);
4332  goto __pyx_L0;
4333  __pyx_L1_error:;
4334  __Pyx_XDECREF(__pyx_t_1);
4335  __Pyx_XDECREF(__pyx_t_2);
4336  __Pyx_XDECREF(__pyx_t_3);
4337  __Pyx_XDECREF(__pyx_t_4);
4338  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4339  __pyx_L0:;
4340  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4341  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4342  __pyx_generator->resume_label = -1;
4343  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4344  __Pyx_RefNannyFinishContext();
4345  return __pyx_r;
4346 }
4347 
4348 /* "PyClical.pyx":238
4349  * yield idx
4350  *
4351  * def __invert__(self): # <<<<<<<<<<<<<<
4352  * """
4353  * Set complement: not.
4354  */
4355 
4356 /* Python wrapper */
4357 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4358 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 ";
4359 #if CYTHON_COMPILING_IN_CPYTHON
4360 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4361 #endif
4362 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4363  PyObject *__pyx_r = 0;
4364  __Pyx_RefNannyDeclarations
4365  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4366  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4367 
4368  /* function exit code */
4369  __Pyx_RefNannyFinishContext();
4370  return __pyx_r;
4371 }
4372 
4373 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4374  PyObject *__pyx_r = NULL;
4375  __Pyx_RefNannyDeclarations
4376  PyObject *__pyx_t_1 = NULL;
4377  PyObject *__pyx_t_2 = NULL;
4378  __Pyx_RefNannySetupContext("__invert__", 0);
4379 
4380  /* "PyClical.pyx":245
4381  * {-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}
4382  * """
4383  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4384  *
4385  * def __xor__(lhs, rhs):
4386  */
4387  __Pyx_XDECREF(__pyx_r);
4388  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4389  __Pyx_GOTREF(__pyx_t_1);
4390  __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)
4391  __Pyx_GOTREF(__pyx_t_2);
4392  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4393  __pyx_r = __pyx_t_2;
4394  __pyx_t_2 = 0;
4395  goto __pyx_L0;
4396 
4397  /* "PyClical.pyx":238
4398  * yield idx
4399  *
4400  * def __invert__(self): # <<<<<<<<<<<<<<
4401  * """
4402  * Set complement: not.
4403  */
4404 
4405  /* function exit code */
4406  __pyx_L1_error:;
4407  __Pyx_XDECREF(__pyx_t_1);
4408  __Pyx_XDECREF(__pyx_t_2);
4409  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4410  __pyx_r = NULL;
4411  __pyx_L0:;
4412  __Pyx_XGIVEREF(__pyx_r);
4413  __Pyx_RefNannyFinishContext();
4414  return __pyx_r;
4415 }
4416 
4417 /* "PyClical.pyx":247
4418  * return index_set().wrap( self.instance.invert() )
4419  *
4420  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4421  * """
4422  * Symmetric set difference: exclusive or.
4423  */
4424 
4425 /* Python wrapper */
4426 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4427 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 ";
4428 #if CYTHON_COMPILING_IN_CPYTHON
4429 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4430 #endif
4431 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4432  PyObject *__pyx_r = 0;
4433  __Pyx_RefNannyDeclarations
4434  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4435  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4436 
4437  /* function exit code */
4438  __Pyx_RefNannyFinishContext();
4439  return __pyx_r;
4440 }
4441 
4442 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4443  PyObject *__pyx_r = NULL;
4444  __Pyx_RefNannyDeclarations
4445  PyObject *__pyx_t_1 = NULL;
4446  PyObject *__pyx_t_2 = NULL;
4447  __Pyx_RefNannySetupContext("__xor__", 0);
4448 
4449  /* "PyClical.pyx":256
4450  * {1}
4451  * """
4452  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4453  *
4454  * def __ixor__(self, rhs):
4455  */
4456  __Pyx_XDECREF(__pyx_r);
4457  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4458  __Pyx_GOTREF(__pyx_t_1);
4459  __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)
4460  __Pyx_GOTREF(__pyx_t_2);
4461  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4462  __pyx_r = __pyx_t_2;
4463  __pyx_t_2 = 0;
4464  goto __pyx_L0;
4465 
4466  /* "PyClical.pyx":247
4467  * return index_set().wrap( self.instance.invert() )
4468  *
4469  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4470  * """
4471  * Symmetric set difference: exclusive or.
4472  */
4473 
4474  /* function exit code */
4475  __pyx_L1_error:;
4476  __Pyx_XDECREF(__pyx_t_1);
4477  __Pyx_XDECREF(__pyx_t_2);
4478  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4479  __pyx_r = NULL;
4480  __pyx_L0:;
4481  __Pyx_XGIVEREF(__pyx_r);
4482  __Pyx_RefNannyFinishContext();
4483  return __pyx_r;
4484 }
4485 
4486 /* "PyClical.pyx":258
4487  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4488  *
4489  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4490  * """
4491  * Symmetric set difference: exclusive or.
4492  */
4493 
4494 /* Python wrapper */
4495 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4496 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 ";
4497 #if CYTHON_COMPILING_IN_CPYTHON
4498 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4499 #endif
4500 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4501  PyObject *__pyx_r = 0;
4502  __Pyx_RefNannyDeclarations
4503  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4504  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4505 
4506  /* function exit code */
4507  __Pyx_RefNannyFinishContext();
4508  return __pyx_r;
4509 }
4510 
4511 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4512  PyObject *__pyx_r = NULL;
4513  __Pyx_RefNannyDeclarations
4514  PyObject *__pyx_t_1 = NULL;
4515  __Pyx_RefNannySetupContext("__ixor__", 0);
4516 
4517  /* "PyClical.pyx":267
4518  * {1}
4519  * """
4520  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4521  *
4522  * def __and__(lhs, rhs):
4523  */
4524  __Pyx_XDECREF(__pyx_r);
4525  __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)
4526  __Pyx_GOTREF(__pyx_t_1);
4527  __pyx_r = __pyx_t_1;
4528  __pyx_t_1 = 0;
4529  goto __pyx_L0;
4530 
4531  /* "PyClical.pyx":258
4532  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4533  *
4534  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4535  * """
4536  * Symmetric set difference: exclusive or.
4537  */
4538 
4539  /* function exit code */
4540  __pyx_L1_error:;
4541  __Pyx_XDECREF(__pyx_t_1);
4542  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4543  __pyx_r = NULL;
4544  __pyx_L0:;
4545  __Pyx_XGIVEREF(__pyx_r);
4546  __Pyx_RefNannyFinishContext();
4547  return __pyx_r;
4548 }
4549 
4550 /* "PyClical.pyx":269
4551  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4552  *
4553  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4554  * """
4555  * Set intersection: and.
4556  */
4557 
4558 /* Python wrapper */
4559 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4560 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 ";
4561 #if CYTHON_COMPILING_IN_CPYTHON
4562 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4563 #endif
4564 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4565  PyObject *__pyx_r = 0;
4566  __Pyx_RefNannyDeclarations
4567  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4568  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4569 
4570  /* function exit code */
4571  __Pyx_RefNannyFinishContext();
4572  return __pyx_r;
4573 }
4574 
4575 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4576  PyObject *__pyx_r = NULL;
4577  __Pyx_RefNannyDeclarations
4578  PyObject *__pyx_t_1 = NULL;
4579  PyObject *__pyx_t_2 = NULL;
4580  __Pyx_RefNannySetupContext("__and__", 0);
4581 
4582  /* "PyClical.pyx":278
4583  * {2}
4584  * """
4585  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4586  *
4587  * def __iand__(self, rhs):
4588  */
4589  __Pyx_XDECREF(__pyx_r);
4590  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4591  __Pyx_GOTREF(__pyx_t_1);
4592  __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)
4593  __Pyx_GOTREF(__pyx_t_2);
4594  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4595  __pyx_r = __pyx_t_2;
4596  __pyx_t_2 = 0;
4597  goto __pyx_L0;
4598 
4599  /* "PyClical.pyx":269
4600  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4601  *
4602  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4603  * """
4604  * Set intersection: and.
4605  */
4606 
4607  /* function exit code */
4608  __pyx_L1_error:;
4609  __Pyx_XDECREF(__pyx_t_1);
4610  __Pyx_XDECREF(__pyx_t_2);
4611  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4612  __pyx_r = NULL;
4613  __pyx_L0:;
4614  __Pyx_XGIVEREF(__pyx_r);
4615  __Pyx_RefNannyFinishContext();
4616  return __pyx_r;
4617 }
4618 
4619 /* "PyClical.pyx":280
4620  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4621  *
4622  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4623  * """
4624  * Set intersection: and.
4625  */
4626 
4627 /* Python wrapper */
4628 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4629 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 ";
4630 #if CYTHON_COMPILING_IN_CPYTHON
4631 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4632 #endif
4633 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4634  PyObject *__pyx_r = 0;
4635  __Pyx_RefNannyDeclarations
4636  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4637  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4638 
4639  /* function exit code */
4640  __Pyx_RefNannyFinishContext();
4641  return __pyx_r;
4642 }
4643 
4644 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4645  PyObject *__pyx_r = NULL;
4646  __Pyx_RefNannyDeclarations
4647  PyObject *__pyx_t_1 = NULL;
4648  __Pyx_RefNannySetupContext("__iand__", 0);
4649 
4650  /* "PyClical.pyx":289
4651  * {2}
4652  * """
4653  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4654  *
4655  * def __or__(lhs, rhs):
4656  */
4657  __Pyx_XDECREF(__pyx_r);
4658  __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)
4659  __Pyx_GOTREF(__pyx_t_1);
4660  __pyx_r = __pyx_t_1;
4661  __pyx_t_1 = 0;
4662  goto __pyx_L0;
4663 
4664  /* "PyClical.pyx":280
4665  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4666  *
4667  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4668  * """
4669  * Set intersection: and.
4670  */
4671 
4672  /* function exit code */
4673  __pyx_L1_error:;
4674  __Pyx_XDECREF(__pyx_t_1);
4675  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4676  __pyx_r = NULL;
4677  __pyx_L0:;
4678  __Pyx_XGIVEREF(__pyx_r);
4679  __Pyx_RefNannyFinishContext();
4680  return __pyx_r;
4681 }
4682 
4683 /* "PyClical.pyx":291
4684  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4685  *
4686  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4687  * """
4688  * Set union: or.
4689  */
4690 
4691 /* Python wrapper */
4692 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4693 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 ";
4694 #if CYTHON_COMPILING_IN_CPYTHON
4695 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4696 #endif
4697 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4698  PyObject *__pyx_r = 0;
4699  __Pyx_RefNannyDeclarations
4700  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4701  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4702 
4703  /* function exit code */
4704  __Pyx_RefNannyFinishContext();
4705  return __pyx_r;
4706 }
4707 
4708 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4709  PyObject *__pyx_r = NULL;
4710  __Pyx_RefNannyDeclarations
4711  PyObject *__pyx_t_1 = NULL;
4712  PyObject *__pyx_t_2 = NULL;
4713  __Pyx_RefNannySetupContext("__or__", 0);
4714 
4715  /* "PyClical.pyx":300
4716  * {1,2}
4717  * """
4718  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4719  *
4720  * def __ior__(self, rhs):
4721  */
4722  __Pyx_XDECREF(__pyx_r);
4723  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4724  __Pyx_GOTREF(__pyx_t_1);
4725  __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)
4726  __Pyx_GOTREF(__pyx_t_2);
4727  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4728  __pyx_r = __pyx_t_2;
4729  __pyx_t_2 = 0;
4730  goto __pyx_L0;
4731 
4732  /* "PyClical.pyx":291
4733  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4734  *
4735  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4736  * """
4737  * Set union: or.
4738  */
4739 
4740  /* function exit code */
4741  __pyx_L1_error:;
4742  __Pyx_XDECREF(__pyx_t_1);
4743  __Pyx_XDECREF(__pyx_t_2);
4744  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4745  __pyx_r = NULL;
4746  __pyx_L0:;
4747  __Pyx_XGIVEREF(__pyx_r);
4748  __Pyx_RefNannyFinishContext();
4749  return __pyx_r;
4750 }
4751 
4752 /* "PyClical.pyx":302
4753  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4754  *
4755  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4756  * """
4757  * Set union: or.
4758  */
4759 
4760 /* Python wrapper */
4761 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4762 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 ";
4763 #if CYTHON_COMPILING_IN_CPYTHON
4764 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4765 #endif
4766 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4767  PyObject *__pyx_r = 0;
4768  __Pyx_RefNannyDeclarations
4769  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4770  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4771 
4772  /* function exit code */
4773  __Pyx_RefNannyFinishContext();
4774  return __pyx_r;
4775 }
4776 
4777 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4778  PyObject *__pyx_r = NULL;
4779  __Pyx_RefNannyDeclarations
4780  PyObject *__pyx_t_1 = NULL;
4781  __Pyx_RefNannySetupContext("__ior__", 0);
4782 
4783  /* "PyClical.pyx":311
4784  * {1,2}
4785  * """
4786  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4787  *
4788  * def count(self):
4789  */
4790  __Pyx_XDECREF(__pyx_r);
4791  __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)
4792  __Pyx_GOTREF(__pyx_t_1);
4793  __pyx_r = __pyx_t_1;
4794  __pyx_t_1 = 0;
4795  goto __pyx_L0;
4796 
4797  /* "PyClical.pyx":302
4798  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4799  *
4800  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4801  * """
4802  * Set union: or.
4803  */
4804 
4805  /* function exit code */
4806  __pyx_L1_error:;
4807  __Pyx_XDECREF(__pyx_t_1);
4808  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4809  __pyx_r = NULL;
4810  __pyx_L0:;
4811  __Pyx_XGIVEREF(__pyx_r);
4812  __Pyx_RefNannyFinishContext();
4813  return __pyx_r;
4814 }
4815 
4816 /* "PyClical.pyx":313
4817  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4818  *
4819  * def count(self): # <<<<<<<<<<<<<<
4820  * """
4821  * Cardinality: Number of indices included in set.
4822  */
4823 
4824 /* Python wrapper */
4825 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4826 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 ";
4827 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4828  PyObject *__pyx_r = 0;
4829  __Pyx_RefNannyDeclarations
4830  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4831  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4832 
4833  /* function exit code */
4834  __Pyx_RefNannyFinishContext();
4835  return __pyx_r;
4836 }
4837 
4838 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4839  PyObject *__pyx_r = NULL;
4840  __Pyx_RefNannyDeclarations
4841  PyObject *__pyx_t_1 = NULL;
4842  __Pyx_RefNannySetupContext("count", 0);
4843 
4844  /* "PyClical.pyx":320
4845  * 3
4846  * """
4847  * return self.instance.count() # <<<<<<<<<<<<<<
4848  *
4849  * def count_neg(self):
4850  */
4851  __Pyx_XDECREF(__pyx_r);
4852  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4853  __Pyx_GOTREF(__pyx_t_1);
4854  __pyx_r = __pyx_t_1;
4855  __pyx_t_1 = 0;
4856  goto __pyx_L0;
4857 
4858  /* "PyClical.pyx":313
4859  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4860  *
4861  * def count(self): # <<<<<<<<<<<<<<
4862  * """
4863  * Cardinality: Number of indices included in set.
4864  */
4865 
4866  /* function exit code */
4867  __pyx_L1_error:;
4868  __Pyx_XDECREF(__pyx_t_1);
4869  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4870  __pyx_r = NULL;
4871  __pyx_L0:;
4872  __Pyx_XGIVEREF(__pyx_r);
4873  __Pyx_RefNannyFinishContext();
4874  return __pyx_r;
4875 }
4876 
4877 /* "PyClical.pyx":322
4878  * return self.instance.count()
4879  *
4880  * def count_neg(self): # <<<<<<<<<<<<<<
4881  * """
4882  * Number of negative indices included in set.
4883  */
4884 
4885 /* Python wrapper */
4886 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4887 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 ";
4888 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4889  PyObject *__pyx_r = 0;
4890  __Pyx_RefNannyDeclarations
4891  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4892  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4893 
4894  /* function exit code */
4895  __Pyx_RefNannyFinishContext();
4896  return __pyx_r;
4897 }
4898 
4899 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4900  PyObject *__pyx_r = NULL;
4901  __Pyx_RefNannyDeclarations
4902  PyObject *__pyx_t_1 = NULL;
4903  __Pyx_RefNannySetupContext("count_neg", 0);
4904 
4905  /* "PyClical.pyx":329
4906  * 1
4907  * """
4908  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4909  *
4910  * def count_pos(self):
4911  */
4912  __Pyx_XDECREF(__pyx_r);
4913  __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)
4914  __Pyx_GOTREF(__pyx_t_1);
4915  __pyx_r = __pyx_t_1;
4916  __pyx_t_1 = 0;
4917  goto __pyx_L0;
4918 
4919  /* "PyClical.pyx":322
4920  * return self.instance.count()
4921  *
4922  * def count_neg(self): # <<<<<<<<<<<<<<
4923  * """
4924  * Number of negative indices included in set.
4925  */
4926 
4927  /* function exit code */
4928  __pyx_L1_error:;
4929  __Pyx_XDECREF(__pyx_t_1);
4930  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4931  __pyx_r = NULL;
4932  __pyx_L0:;
4933  __Pyx_XGIVEREF(__pyx_r);
4934  __Pyx_RefNannyFinishContext();
4935  return __pyx_r;
4936 }
4937 
4938 /* "PyClical.pyx":331
4939  * return self.instance.count_neg()
4940  *
4941  * def count_pos(self): # <<<<<<<<<<<<<<
4942  * """
4943  * Number of positive indices included in set.
4944  */
4945 
4946 /* Python wrapper */
4947 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4948 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 ";
4949 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4950  PyObject *__pyx_r = 0;
4951  __Pyx_RefNannyDeclarations
4952  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
4953  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4954 
4955  /* function exit code */
4956  __Pyx_RefNannyFinishContext();
4957  return __pyx_r;
4958 }
4959 
4960 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4961  PyObject *__pyx_r = NULL;
4962  __Pyx_RefNannyDeclarations
4963  PyObject *__pyx_t_1 = NULL;
4964  __Pyx_RefNannySetupContext("count_pos", 0);
4965 
4966  /* "PyClical.pyx":338
4967  * 2
4968  * """
4969  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4970  *
4971  * def min(self):
4972  */
4973  __Pyx_XDECREF(__pyx_r);
4974  __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)
4975  __Pyx_GOTREF(__pyx_t_1);
4976  __pyx_r = __pyx_t_1;
4977  __pyx_t_1 = 0;
4978  goto __pyx_L0;
4979 
4980  /* "PyClical.pyx":331
4981  * return self.instance.count_neg()
4982  *
4983  * def count_pos(self): # <<<<<<<<<<<<<<
4984  * """
4985  * Number of positive indices included in set.
4986  */
4987 
4988  /* function exit code */
4989  __pyx_L1_error:;
4990  __Pyx_XDECREF(__pyx_t_1);
4991  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4992  __pyx_r = NULL;
4993  __pyx_L0:;
4994  __Pyx_XGIVEREF(__pyx_r);
4995  __Pyx_RefNannyFinishContext();
4996  return __pyx_r;
4997 }
4998 
4999 /* "PyClical.pyx":340
5000  * return self.instance.count_pos()
5001  *
5002  * def min(self): # <<<<<<<<<<<<<<
5003  * """
5004  * Minimum member.
5005  */
5006 
5007 /* Python wrapper */
5008 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5009 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5010 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5011  PyObject *__pyx_r = 0;
5012  __Pyx_RefNannyDeclarations
5013  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5014  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5015 
5016  /* function exit code */
5017  __Pyx_RefNannyFinishContext();
5018  return __pyx_r;
5019 }
5020 
5021 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5022  PyObject *__pyx_r = NULL;
5023  __Pyx_RefNannyDeclarations
5024  PyObject *__pyx_t_1 = NULL;
5025  __Pyx_RefNannySetupContext("min", 0);
5026 
5027  /* "PyClical.pyx":347
5028  * -1
5029  * """
5030  * return self.instance.min() # <<<<<<<<<<<<<<
5031  *
5032  * def max(self):
5033  */
5034  __Pyx_XDECREF(__pyx_r);
5035  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5036  __Pyx_GOTREF(__pyx_t_1);
5037  __pyx_r = __pyx_t_1;
5038  __pyx_t_1 = 0;
5039  goto __pyx_L0;
5040 
5041  /* "PyClical.pyx":340
5042  * return self.instance.count_pos()
5043  *
5044  * def min(self): # <<<<<<<<<<<<<<
5045  * """
5046  * Minimum member.
5047  */
5048 
5049  /* function exit code */
5050  __pyx_L1_error:;
5051  __Pyx_XDECREF(__pyx_t_1);
5052  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5053  __pyx_r = NULL;
5054  __pyx_L0:;
5055  __Pyx_XGIVEREF(__pyx_r);
5056  __Pyx_RefNannyFinishContext();
5057  return __pyx_r;
5058 }
5059 
5060 /* "PyClical.pyx":349
5061  * return self.instance.min()
5062  *
5063  * def max(self): # <<<<<<<<<<<<<<
5064  * """
5065  * Maximum member.
5066  */
5067 
5068 /* Python wrapper */
5069 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5070 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5071 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5072  PyObject *__pyx_r = 0;
5073  __Pyx_RefNannyDeclarations
5074  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5075  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5076 
5077  /* function exit code */
5078  __Pyx_RefNannyFinishContext();
5079  return __pyx_r;
5080 }
5081 
5082 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5083  PyObject *__pyx_r = NULL;
5084  __Pyx_RefNannyDeclarations
5085  PyObject *__pyx_t_1 = NULL;
5086  __Pyx_RefNannySetupContext("max", 0);
5087 
5088  /* "PyClical.pyx":356
5089  * 2
5090  * """
5091  * return self.instance.max() # <<<<<<<<<<<<<<
5092  *
5093  * def hash_fn(self):
5094  */
5095  __Pyx_XDECREF(__pyx_r);
5096  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5097  __Pyx_GOTREF(__pyx_t_1);
5098  __pyx_r = __pyx_t_1;
5099  __pyx_t_1 = 0;
5100  goto __pyx_L0;
5101 
5102  /* "PyClical.pyx":349
5103  * return self.instance.min()
5104  *
5105  * def max(self): # <<<<<<<<<<<<<<
5106  * """
5107  * Maximum member.
5108  */
5109 
5110  /* function exit code */
5111  __pyx_L1_error:;
5112  __Pyx_XDECREF(__pyx_t_1);
5113  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5114  __pyx_r = NULL;
5115  __pyx_L0:;
5116  __Pyx_XGIVEREF(__pyx_r);
5117  __Pyx_RefNannyFinishContext();
5118  return __pyx_r;
5119 }
5120 
5121 /* "PyClical.pyx":358
5122  * return self.instance.max()
5123  *
5124  * def hash_fn(self): # <<<<<<<<<<<<<<
5125  * """
5126  * Hash function.
5127  */
5128 
5129 /* Python wrapper */
5130 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5131 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5132 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5133  PyObject *__pyx_r = 0;
5134  __Pyx_RefNannyDeclarations
5135  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5136  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5137 
5138  /* function exit code */
5139  __Pyx_RefNannyFinishContext();
5140  return __pyx_r;
5141 }
5142 
5143 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5144  PyObject *__pyx_r = NULL;
5145  __Pyx_RefNannyDeclarations
5146  PyObject *__pyx_t_1 = NULL;
5147  __Pyx_RefNannySetupContext("hash_fn", 0);
5148 
5149  /* "PyClical.pyx":362
5150  * Hash function.
5151  * """
5152  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5153  *
5154  * def sign_of_mult(self, rhs):
5155  */
5156  __Pyx_XDECREF(__pyx_r);
5157  __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)
5158  __Pyx_GOTREF(__pyx_t_1);
5159  __pyx_r = __pyx_t_1;
5160  __pyx_t_1 = 0;
5161  goto __pyx_L0;
5162 
5163  /* "PyClical.pyx":358
5164  * return self.instance.max()
5165  *
5166  * def hash_fn(self): # <<<<<<<<<<<<<<
5167  * """
5168  * Hash function.
5169  */
5170 
5171  /* function exit code */
5172  __pyx_L1_error:;
5173  __Pyx_XDECREF(__pyx_t_1);
5174  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5175  __pyx_r = NULL;
5176  __pyx_L0:;
5177  __Pyx_XGIVEREF(__pyx_r);
5178  __Pyx_RefNannyFinishContext();
5179  return __pyx_r;
5180 }
5181 
5182 /* "PyClical.pyx":364
5183  * return self.instance.hash_fn()
5184  *
5185  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5186  * """
5187  * Sign of geometric product of two Clifford basis elements.
5188  */
5189 
5190 /* Python wrapper */
5191 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5192 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 ";
5193 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5194  PyObject *__pyx_r = 0;
5195  __Pyx_RefNannyDeclarations
5196  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5197  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5198 
5199  /* function exit code */
5200  __Pyx_RefNannyFinishContext();
5201  return __pyx_r;
5202 }
5203 
5204 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5205  PyObject *__pyx_r = NULL;
5206  __Pyx_RefNannyDeclarations
5207  PyObject *__pyx_t_1 = NULL;
5208  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5209 
5210  /* "PyClical.pyx":371
5211  * 1
5212  * """
5213  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5214  *
5215  * def sign_of_square(self):
5216  */
5217  __Pyx_XDECREF(__pyx_r);
5218  __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)
5219  __Pyx_GOTREF(__pyx_t_1);
5220  __pyx_r = __pyx_t_1;
5221  __pyx_t_1 = 0;
5222  goto __pyx_L0;
5223 
5224  /* "PyClical.pyx":364
5225  * return self.instance.hash_fn()
5226  *
5227  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5228  * """
5229  * Sign of geometric product of two Clifford basis elements.
5230  */
5231 
5232  /* function exit code */
5233  __pyx_L1_error:;
5234  __Pyx_XDECREF(__pyx_t_1);
5235  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5236  __pyx_r = NULL;
5237  __pyx_L0:;
5238  __Pyx_XGIVEREF(__pyx_r);
5239  __Pyx_RefNannyFinishContext();
5240  return __pyx_r;
5241 }
5242 
5243 /* "PyClical.pyx":373
5244  * return self.instance.sign_of_mult(toIndexSet(rhs))
5245  *
5246  * def sign_of_square(self): # <<<<<<<<<<<<<<
5247  * """
5248  * Sign of geometric square of a Clifford basis element.
5249  */
5250 
5251 /* Python wrapper */
5252 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5253 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 ";
5254 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5255  PyObject *__pyx_r = 0;
5256  __Pyx_RefNannyDeclarations
5257  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5258  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5259 
5260  /* function exit code */
5261  __Pyx_RefNannyFinishContext();
5262  return __pyx_r;
5263 }
5264 
5265 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5266  PyObject *__pyx_r = NULL;
5267  __Pyx_RefNannyDeclarations
5268  PyObject *__pyx_t_1 = NULL;
5269  __Pyx_RefNannySetupContext("sign_of_square", 0);
5270 
5271  /* "PyClical.pyx":380
5272  * -1
5273  * """
5274  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5275  *
5276  * def __repr__(self):
5277  */
5278  __Pyx_XDECREF(__pyx_r);
5279  __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)
5280  __Pyx_GOTREF(__pyx_t_1);
5281  __pyx_r = __pyx_t_1;
5282  __pyx_t_1 = 0;
5283  goto __pyx_L0;
5284 
5285  /* "PyClical.pyx":373
5286  * return self.instance.sign_of_mult(toIndexSet(rhs))
5287  *
5288  * def sign_of_square(self): # <<<<<<<<<<<<<<
5289  * """
5290  * Sign of geometric square of a Clifford basis element.
5291  */
5292 
5293  /* function exit code */
5294  __pyx_L1_error:;
5295  __Pyx_XDECREF(__pyx_t_1);
5296  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5297  __pyx_r = NULL;
5298  __pyx_L0:;
5299  __Pyx_XGIVEREF(__pyx_r);
5300  __Pyx_RefNannyFinishContext();
5301  return __pyx_r;
5302 }
5303 
5304 /* "PyClical.pyx":382
5305  * return self.instance.sign_of_square()
5306  *
5307  * def __repr__(self): # <<<<<<<<<<<<<<
5308  * """
5309  * The official string representation of self.
5310  */
5311 
5312 /* Python wrapper */
5313 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5314 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 ";
5315 #if CYTHON_COMPILING_IN_CPYTHON
5316 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5317 #endif
5318 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5319  PyObject *__pyx_r = 0;
5320  __Pyx_RefNannyDeclarations
5321  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5322  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5323 
5324  /* function exit code */
5325  __Pyx_RefNannyFinishContext();
5326  return __pyx_r;
5327 }
5328 
5329 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5330  PyObject *__pyx_r = NULL;
5331  __Pyx_RefNannyDeclarations
5332  PyObject *__pyx_t_1 = NULL;
5333  __Pyx_RefNannySetupContext("__repr__", 0);
5334 
5335  /* "PyClical.pyx":391
5336  * 'index_set({1,2})'
5337  * """
5338  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5339  *
5340  * def __str__(self):
5341  */
5342  __Pyx_XDECREF(__pyx_r);
5343  __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)
5344  __Pyx_GOTREF(__pyx_t_1);
5345  __pyx_r = __pyx_t_1;
5346  __pyx_t_1 = 0;
5347  goto __pyx_L0;
5348 
5349  /* "PyClical.pyx":382
5350  * return self.instance.sign_of_square()
5351  *
5352  * def __repr__(self): # <<<<<<<<<<<<<<
5353  * """
5354  * The official string representation of self.
5355  */
5356 
5357  /* function exit code */
5358  __pyx_L1_error:;
5359  __Pyx_XDECREF(__pyx_t_1);
5360  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5361  __pyx_r = NULL;
5362  __pyx_L0:;
5363  __Pyx_XGIVEREF(__pyx_r);
5364  __Pyx_RefNannyFinishContext();
5365  return __pyx_r;
5366 }
5367 
5368 /* "PyClical.pyx":393
5369  * return index_set_to_repr( self.unwrap() ).c_str()
5370  *
5371  * def __str__(self): # <<<<<<<<<<<<<<
5372  * """
5373  * The informal string representation of self.
5374  */
5375 
5376 /* Python wrapper */
5377 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5378 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 ";
5379 #if CYTHON_COMPILING_IN_CPYTHON
5380 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5381 #endif
5382 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5383  PyObject *__pyx_r = 0;
5384  __Pyx_RefNannyDeclarations
5385  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5386  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5387 
5388  /* function exit code */
5389  __Pyx_RefNannyFinishContext();
5390  return __pyx_r;
5391 }
5392 
5393 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5394  PyObject *__pyx_r = NULL;
5395  __Pyx_RefNannyDeclarations
5396  PyObject *__pyx_t_1 = NULL;
5397  __Pyx_RefNannySetupContext("__str__", 0);
5398 
5399  /* "PyClical.pyx":402
5400  * '{1,2}'
5401  * """
5402  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5403  *
5404  * def index_set_hidden_doctests():
5405  */
5406  __Pyx_XDECREF(__pyx_r);
5407  __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)
5408  __Pyx_GOTREF(__pyx_t_1);
5409  __pyx_r = __pyx_t_1;
5410  __pyx_t_1 = 0;
5411  goto __pyx_L0;
5412 
5413  /* "PyClical.pyx":393
5414  * return index_set_to_repr( self.unwrap() ).c_str()
5415  *
5416  * def __str__(self): # <<<<<<<<<<<<<<
5417  * """
5418  * The informal string representation of self.
5419  */
5420 
5421  /* function exit code */
5422  __pyx_L1_error:;
5423  __Pyx_XDECREF(__pyx_t_1);
5424  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5425  __pyx_r = NULL;
5426  __pyx_L0:;
5427  __Pyx_XGIVEREF(__pyx_r);
5428  __Pyx_RefNannyFinishContext();
5429  return __pyx_r;
5430 }
5431 
5432 /* "(tree fragment)":1
5433  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5434  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5435  * def __setstate_cython__(self, __pyx_state):
5436  */
5437 
5438 /* Python wrapper */
5439 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5440 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5441  PyObject *__pyx_r = 0;
5442  __Pyx_RefNannyDeclarations
5443  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5444  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5445 
5446  /* function exit code */
5447  __Pyx_RefNannyFinishContext();
5448  return __pyx_r;
5449 }
5450 
5451 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5452  PyObject *__pyx_r = NULL;
5453  __Pyx_RefNannyDeclarations
5454  PyObject *__pyx_t_1 = NULL;
5455  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5456 
5457  /* "(tree fragment)":2
5458  * def __reduce_cython__(self):
5459  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5460  * def __setstate_cython__(self, __pyx_state):
5461  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5462  */
5463  __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)
5464  __Pyx_GOTREF(__pyx_t_1);
5465  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5466  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5467  __PYX_ERR(1, 2, __pyx_L1_error)
5468 
5469  /* "(tree fragment)":1
5470  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5471  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5472  * def __setstate_cython__(self, __pyx_state):
5473  */
5474 
5475  /* function exit code */
5476  __pyx_L1_error:;
5477  __Pyx_XDECREF(__pyx_t_1);
5478  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5479  __pyx_r = NULL;
5480  __Pyx_XGIVEREF(__pyx_r);
5481  __Pyx_RefNannyFinishContext();
5482  return __pyx_r;
5483 }
5484 
5485 /* "(tree fragment)":3
5486  * def __reduce_cython__(self):
5487  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5488  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5489  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5490  */
5491 
5492 /* Python wrapper */
5493 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5494 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5495  PyObject *__pyx_r = 0;
5496  __Pyx_RefNannyDeclarations
5497  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5498  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5499 
5500  /* function exit code */
5501  __Pyx_RefNannyFinishContext();
5502  return __pyx_r;
5503 }
5504 
5505 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) {
5506  PyObject *__pyx_r = NULL;
5507  __Pyx_RefNannyDeclarations
5508  PyObject *__pyx_t_1 = NULL;
5509  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5510 
5511  /* "(tree fragment)":4
5512  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5513  * def __setstate_cython__(self, __pyx_state):
5514  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5515  */
5516  __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)
5517  __Pyx_GOTREF(__pyx_t_1);
5518  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5519  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5520  __PYX_ERR(1, 4, __pyx_L1_error)
5521 
5522  /* "(tree fragment)":3
5523  * def __reduce_cython__(self):
5524  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5525  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5526  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5527  */
5528 
5529  /* function exit code */
5530  __pyx_L1_error:;
5531  __Pyx_XDECREF(__pyx_t_1);
5532  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5533  __pyx_r = NULL;
5534  __Pyx_XGIVEREF(__pyx_r);
5535  __Pyx_RefNannyFinishContext();
5536  return __pyx_r;
5537 }
5538 
5539 /* "PyClical.pyx":404
5540  * return index_set_to_str( self.unwrap() ).c_str()
5541  *
5542  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5543  * """
5544  * Tests for functions that Doctest cannot see.
5545  */
5546 
5547 /* Python wrapper */
5548 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5549 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 ";
5550  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};
5551  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5552  PyObject *__pyx_r = 0;
5553  __Pyx_RefNannyDeclarations
5554  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5555  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5556 
5557  /* function exit code */
5558  __Pyx_RefNannyFinishContext();
5559  return __pyx_r;
5560  }
5561 
5562  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5563  PyObject *__pyx_r = NULL;
5564  __Pyx_RefNannyDeclarations
5565  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5566 
5567  /* "PyClical.pyx":488
5568  * False
5569  * """
5570  * return # <<<<<<<<<<<<<<
5571  *
5572  * cpdef inline compare(lhs,rhs):
5573  */
5574  __Pyx_XDECREF(__pyx_r);
5575  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5576  goto __pyx_L0;
5577 
5578  /* "PyClical.pyx":404
5579  * return index_set_to_str( self.unwrap() ).c_str()
5580  *
5581  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5582  * """
5583  * Tests for functions that Doctest cannot see.
5584  */
5585 
5586  /* function exit code */
5587  __pyx_L0:;
5588  __Pyx_XGIVEREF(__pyx_r);
5589  __Pyx_RefNannyFinishContext();
5590  return __pyx_r;
5591  }
5592 
5593  /* "PyClical.pyx":490
5594  * return
5595  *
5596  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5597  * """
5598  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5599  */
5600 
5601  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5602  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5603  PyObject *__pyx_r = NULL;
5604  __Pyx_RefNannyDeclarations
5605  PyObject *__pyx_t_1 = NULL;
5606  __Pyx_RefNannySetupContext("compare", 0);
5607 
5608  /* "PyClical.pyx":500
5609  * 1
5610  * """
5611  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5612  *
5613  * cpdef inline min_neg(obj):
5614  */
5615  __Pyx_XDECREF(__pyx_r);
5616  __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)
5617  __Pyx_GOTREF(__pyx_t_1);
5618  __pyx_r = __pyx_t_1;
5619  __pyx_t_1 = 0;
5620  goto __pyx_L0;
5621 
5622  /* "PyClical.pyx":490
5623  * return
5624  *
5625  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5626  * """
5627  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5628  */
5629 
5630  /* function exit code */
5631  __pyx_L1_error:;
5632  __Pyx_XDECREF(__pyx_t_1);
5633  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5634  __pyx_r = 0;
5635  __pyx_L0:;
5636  __Pyx_XGIVEREF(__pyx_r);
5637  __Pyx_RefNannyFinishContext();
5638  return __pyx_r;
5639  }
5640 
5641  /* Python wrapper */
5642  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5643  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 ";
5644  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5645  PyObject *__pyx_v_lhs = 0;
5646  PyObject *__pyx_v_rhs = 0;
5647  PyObject *__pyx_r = 0;
5648  __Pyx_RefNannyDeclarations
5649  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5650  {
5651  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5652  PyObject* values[2] = {0,0};
5653  if (unlikely(__pyx_kwds)) {
5654  Py_ssize_t kw_args;
5655  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5656  switch (pos_args) {
5657  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5658  CYTHON_FALLTHROUGH;
5659  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5660  CYTHON_FALLTHROUGH;
5661  case 0: break;
5662  default: goto __pyx_L5_argtuple_error;
5663  }
5664  kw_args = PyDict_Size(__pyx_kwds);
5665  switch (pos_args) {
5666  case 0:
5667  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5668  else goto __pyx_L5_argtuple_error;
5669  CYTHON_FALLTHROUGH;
5670  case 1:
5671  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5672  else {
5673  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5674  }
5675  }
5676  if (unlikely(kw_args > 0)) {
5677  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5678  }
5679  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5680  goto __pyx_L5_argtuple_error;
5681  } else {
5682  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5683  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5684  }
5685  __pyx_v_lhs = values[0];
5686  __pyx_v_rhs = values[1];
5687  }
5688  goto __pyx_L4_argument_unpacking_done;
5689  __pyx_L5_argtuple_error:;
5690  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5691  __pyx_L3_error:;
5692  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5693  __Pyx_RefNannyFinishContext();
5694  return NULL;
5695  __pyx_L4_argument_unpacking_done:;
5696  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5697 
5698  /* function exit code */
5699  __Pyx_RefNannyFinishContext();
5700  return __pyx_r;
5701  }
5702 
5703  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5704  PyObject *__pyx_r = NULL;
5705  __Pyx_RefNannyDeclarations
5706  PyObject *__pyx_t_1 = NULL;
5707  __Pyx_RefNannySetupContext("compare", 0);
5708  __Pyx_XDECREF(__pyx_r);
5709  __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)
5710  __Pyx_GOTREF(__pyx_t_1);
5711  __pyx_r = __pyx_t_1;
5712  __pyx_t_1 = 0;
5713  goto __pyx_L0;
5714 
5715  /* function exit code */
5716  __pyx_L1_error:;
5717  __Pyx_XDECREF(__pyx_t_1);
5718  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5719  __pyx_r = NULL;
5720  __pyx_L0:;
5721  __Pyx_XGIVEREF(__pyx_r);
5722  __Pyx_RefNannyFinishContext();
5723  return __pyx_r;
5724  }
5725 
5726  /* "PyClical.pyx":502
5727  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5728  *
5729  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5730  * """
5731  * Minimum negative index, or 0 if none.
5732  */
5733 
5734  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5735  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5736  PyObject *__pyx_r = NULL;
5737  __Pyx_RefNannyDeclarations
5738  PyObject *__pyx_t_1 = NULL;
5739  __Pyx_RefNannySetupContext("min_neg", 0);
5740 
5741  /* "PyClical.pyx":509
5742  * 0
5743  * """
5744  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5745  *
5746  * cpdef inline max_pos(obj):
5747  */
5748  __Pyx_XDECREF(__pyx_r);
5749  __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)
5750  __Pyx_GOTREF(__pyx_t_1);
5751  __pyx_r = __pyx_t_1;
5752  __pyx_t_1 = 0;
5753  goto __pyx_L0;
5754 
5755  /* "PyClical.pyx":502
5756  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5757  *
5758  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5759  * """
5760  * Minimum negative index, or 0 if none.
5761  */
5762 
5763  /* function exit code */
5764  __pyx_L1_error:;
5765  __Pyx_XDECREF(__pyx_t_1);
5766  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5767  __pyx_r = 0;
5768  __pyx_L0:;
5769  __Pyx_XGIVEREF(__pyx_r);
5770  __Pyx_RefNannyFinishContext();
5771  return __pyx_r;
5772  }
5773 
5774  /* Python wrapper */
5775  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5776  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 ";
5777  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5778  PyObject *__pyx_r = 0;
5779  __Pyx_RefNannyDeclarations
5780  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5781  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5782 
5783  /* function exit code */
5784  __Pyx_RefNannyFinishContext();
5785  return __pyx_r;
5786  }
5787 
5788  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5789  PyObject *__pyx_r = NULL;
5790  __Pyx_RefNannyDeclarations
5791  PyObject *__pyx_t_1 = NULL;
5792  __Pyx_RefNannySetupContext("min_neg", 0);
5793  __Pyx_XDECREF(__pyx_r);
5794  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5795  __Pyx_GOTREF(__pyx_t_1);
5796  __pyx_r = __pyx_t_1;
5797  __pyx_t_1 = 0;
5798  goto __pyx_L0;
5799 
5800  /* function exit code */
5801  __pyx_L1_error:;
5802  __Pyx_XDECREF(__pyx_t_1);
5803  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5804  __pyx_r = NULL;
5805  __pyx_L0:;
5806  __Pyx_XGIVEREF(__pyx_r);
5807  __Pyx_RefNannyFinishContext();
5808  return __pyx_r;
5809  }
5810 
5811  /* "PyClical.pyx":511
5812  * return glucat.min_neg( toIndexSet(obj) )
5813  *
5814  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5815  * """
5816  * Maximum positive index, or 0 if none.
5817  */
5818 
5819  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5820  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5821  PyObject *__pyx_r = NULL;
5822  __Pyx_RefNannyDeclarations
5823  PyObject *__pyx_t_1 = NULL;
5824  __Pyx_RefNannySetupContext("max_pos", 0);
5825 
5826  /* "PyClical.pyx":518
5827  * 2
5828  * """
5829  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5830  *
5831  * cdef inline vector[scalar_t] list_to_vector(lst):
5832  */
5833  __Pyx_XDECREF(__pyx_r);
5834  __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)
5835  __Pyx_GOTREF(__pyx_t_1);
5836  __pyx_r = __pyx_t_1;
5837  __pyx_t_1 = 0;
5838  goto __pyx_L0;
5839 
5840  /* "PyClical.pyx":511
5841  * return glucat.min_neg( toIndexSet(obj) )
5842  *
5843  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5844  * """
5845  * Maximum positive index, or 0 if none.
5846  */
5847 
5848  /* function exit code */
5849  __pyx_L1_error:;
5850  __Pyx_XDECREF(__pyx_t_1);
5851  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5852  __pyx_r = 0;
5853  __pyx_L0:;
5854  __Pyx_XGIVEREF(__pyx_r);
5855  __Pyx_RefNannyFinishContext();
5856  return __pyx_r;
5857  }
5858 
5859  /* Python wrapper */
5860  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5861  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 ";
5862  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5863  PyObject *__pyx_r = 0;
5864  __Pyx_RefNannyDeclarations
5865  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5866  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5867 
5868  /* function exit code */
5869  __Pyx_RefNannyFinishContext();
5870  return __pyx_r;
5871  }
5872 
5873  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5874  PyObject *__pyx_r = NULL;
5875  __Pyx_RefNannyDeclarations
5876  PyObject *__pyx_t_1 = NULL;
5877  __Pyx_RefNannySetupContext("max_pos", 0);
5878  __Pyx_XDECREF(__pyx_r);
5879  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5880  __Pyx_GOTREF(__pyx_t_1);
5881  __pyx_r = __pyx_t_1;
5882  __pyx_t_1 = 0;
5883  goto __pyx_L0;
5884 
5885  /* function exit code */
5886  __pyx_L1_error:;
5887  __Pyx_XDECREF(__pyx_t_1);
5888  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5889  __pyx_r = NULL;
5890  __pyx_L0:;
5891  __Pyx_XGIVEREF(__pyx_r);
5892  __Pyx_RefNannyFinishContext();
5893  return __pyx_r;
5894  }
5895 
5896  /* "PyClical.pyx":520
5897  * return glucat.max_pos( toIndexSet(obj) )
5898  *
5899  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5900  * """
5901  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5902  */
5903 
5904  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5905  std::vector<scalar_t> __pyx_v_v;
5906  PyObject *__pyx_v_s = NULL;
5907  std::vector<scalar_t> __pyx_r;
5908  __Pyx_RefNannyDeclarations
5909  PyObject *__pyx_t_1 = NULL;
5910  Py_ssize_t __pyx_t_2;
5911  PyObject *(*__pyx_t_3)(PyObject *);
5912  PyObject *__pyx_t_4 = NULL;
5913  scalar_t __pyx_t_5;
5914  __Pyx_RefNannySetupContext("list_to_vector", 0);
5915 
5916  /* "PyClical.pyx":525
5917  * """
5918  * cdef vector[scalar_t] v
5919  * for s in lst: # <<<<<<<<<<<<<<
5920  * v.push_back(<scalar_t>s)
5921  * return v
5922  */
5923  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5924  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5925  __pyx_t_3 = NULL;
5926  } else {
5927  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5928  __Pyx_GOTREF(__pyx_t_1);
5929  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5930  }
5931  for (;;) {
5932  if (likely(!__pyx_t_3)) {
5933  if (likely(PyList_CheckExact(__pyx_t_1))) {
5934  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5935  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5936  __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)
5937  #else
5938  __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)
5939  __Pyx_GOTREF(__pyx_t_4);
5940  #endif
5941  } else {
5942  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5943  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5944  __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)
5945  #else
5946  __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)
5947  __Pyx_GOTREF(__pyx_t_4);
5948  #endif
5949  }
5950  } else {
5951  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5952  if (unlikely(!__pyx_t_4)) {
5953  PyObject* exc_type = PyErr_Occurred();
5954  if (exc_type) {
5955  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5956  else __PYX_ERR(0, 525, __pyx_L1_error)
5957  }
5958  break;
5959  }
5960  __Pyx_GOTREF(__pyx_t_4);
5961  }
5962  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5963  __pyx_t_4 = 0;
5964 
5965  /* "PyClical.pyx":526
5966  * cdef vector[scalar_t] v
5967  * for s in lst:
5968  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
5969  * return v
5970  *
5971  */
5972  __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)
5973  try {
5974  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
5975  } catch(...) {
5976  __Pyx_CppExn2PyErr();
5977  __PYX_ERR(0, 526, __pyx_L1_error)
5978  }
5979 
5980  /* "PyClical.pyx":525
5981  * """
5982  * cdef vector[scalar_t] v
5983  * for s in lst: # <<<<<<<<<<<<<<
5984  * v.push_back(<scalar_t>s)
5985  * return v
5986  */
5987  }
5988  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5989 
5990  /* "PyClical.pyx":527
5991  * for s in lst:
5992  * v.push_back(<scalar_t>s)
5993  * return v # <<<<<<<<<<<<<<
5994  *
5995  * # Forward reference.
5996  */
5997  __pyx_r = __pyx_v_v;
5998  goto __pyx_L0;
5999 
6000  /* "PyClical.pyx":520
6001  * return glucat.max_pos( toIndexSet(obj) )
6002  *
6003  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6004  * """
6005  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6006  */
6007 
6008  /* function exit code */
6009  __pyx_L1_error:;
6010  __Pyx_XDECREF(__pyx_t_1);
6011  __Pyx_XDECREF(__pyx_t_4);
6012  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6013  __Pyx_pretend_to_initialize(&__pyx_r);
6014  __pyx_L0:;
6015  __Pyx_XDECREF(__pyx_v_s);
6016  __Pyx_RefNannyFinishContext();
6017  return __pyx_r;
6018  }
6019 
6020  /* "PyClical.pyx":532
6021  * cdef class clifford
6022  *
6023  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6024  * return clifford(obj).instance[0]
6025  *
6026  */
6027 
6028  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6029  Clifford __pyx_r;
6030  __Pyx_RefNannyDeclarations
6031  PyObject *__pyx_t_1 = NULL;
6032  __Pyx_RefNannySetupContext("toClifford", 0);
6033 
6034  /* "PyClical.pyx":533
6035  *
6036  * cdef inline Clifford toClifford(obj):
6037  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6038  *
6039  * cdef class clifford:
6040  */
6041  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
6042  __Pyx_GOTREF(__pyx_t_1);
6043  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6044  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6045  goto __pyx_L0;
6046 
6047  /* "PyClical.pyx":532
6048  * cdef class clifford
6049  *
6050  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6051  * return clifford(obj).instance[0]
6052  *
6053  */
6054 
6055  /* function exit code */
6056  __pyx_L1_error:;
6057  __Pyx_XDECREF(__pyx_t_1);
6058  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6059  __Pyx_pretend_to_initialize(&__pyx_r);
6060  __pyx_L0:;
6061  __Pyx_RefNannyFinishContext();
6062  return __pyx_r;
6063  }
6064 
6065  /* "PyClical.pyx":541
6066  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6067  *
6068  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6069  * """
6070  * Wrap an instance of the C++ class Clifford.
6071  */
6072 
6073  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6074  PyObject *__pyx_r = NULL;
6075  __Pyx_RefNannyDeclarations
6076  __Pyx_RefNannySetupContext("wrap", 0);
6077 
6078  /* "PyClical.pyx":545
6079  * Wrap an instance of the C++ class Clifford.
6080  * """
6081  * self.instance[0] = other # <<<<<<<<<<<<<<
6082  * return self
6083  *
6084  */
6085  (__pyx_v_self->instance[0]) = __pyx_v_other;
6086 
6087  /* "PyClical.pyx":546
6088  * """
6089  * self.instance[0] = other
6090  * return self # <<<<<<<<<<<<<<
6091  *
6092  * cdef inline Clifford unwrap(clifford self):
6093  */
6094  __Pyx_XDECREF(__pyx_r);
6095  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6096  __pyx_r = ((PyObject *)__pyx_v_self);
6097  goto __pyx_L0;
6098 
6099  /* "PyClical.pyx":541
6100  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6101  *
6102  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6103  * """
6104  * Wrap an instance of the C++ class Clifford.
6105  */
6106 
6107  /* function exit code */
6108  __pyx_L0:;
6109  __Pyx_XGIVEREF(__pyx_r);
6110  __Pyx_RefNannyFinishContext();
6111  return __pyx_r;
6112  }
6113 
6114  /* "PyClical.pyx":548
6115  * return self
6116  *
6117  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6118  * """
6119  * Return the wrapped C++ Clifford instance.
6120  */
6121 
6122  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6123  Clifford __pyx_r;
6124  __Pyx_RefNannyDeclarations
6125  __Pyx_RefNannySetupContext("unwrap", 0);
6126 
6127  /* "PyClical.pyx":552
6128  * Return the wrapped C++ Clifford instance.
6129  * """
6130  * return self.instance[0] # <<<<<<<<<<<<<<
6131  *
6132  * cpdef copy(clifford self):
6133  */
6134  __pyx_r = (__pyx_v_self->instance[0]);
6135  goto __pyx_L0;
6136 
6137  /* "PyClical.pyx":548
6138  * return self
6139  *
6140  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6141  * """
6142  * Return the wrapped C++ Clifford instance.
6143  */
6144 
6145  /* function exit code */
6146  __pyx_L0:;
6147  __Pyx_RefNannyFinishContext();
6148  return __pyx_r;
6149  }
6150 
6151  /* "PyClical.pyx":554
6152  * return self.instance[0]
6153  *
6154  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6155  * """
6156  * Copy this clifford object.
6157  */
6158 
6159  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6160  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6161  PyObject *__pyx_r = NULL;
6162  __Pyx_RefNannyDeclarations
6163  PyObject *__pyx_t_1 = NULL;
6164  PyObject *__pyx_t_2 = NULL;
6165  PyObject *__pyx_t_3 = NULL;
6166  PyObject *__pyx_t_4 = NULL;
6167  __Pyx_RefNannySetupContext("copy", 0);
6168  /* Check if called by wrapper */
6169  if (unlikely(__pyx_skip_dispatch)) ;
6170  /* Check if overridden in Python */
6171  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
6172  __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)
6173  __Pyx_GOTREF(__pyx_t_1);
6174  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
6175  __Pyx_XDECREF(__pyx_r);
6176  __Pyx_INCREF(__pyx_t_1);
6177  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6178  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6179  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6180  if (likely(__pyx_t_4)) {
6181  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6182  __Pyx_INCREF(__pyx_t_4);
6183  __Pyx_INCREF(function);
6184  __Pyx_DECREF_SET(__pyx_t_3, function);
6185  }
6186  }
6187  if (__pyx_t_4) {
6188  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6189  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6190  } else {
6191  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6192  }
6193  __Pyx_GOTREF(__pyx_t_2);
6194  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6195  __pyx_r = __pyx_t_2;
6196  __pyx_t_2 = 0;
6197  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6198  goto __pyx_L0;
6199  }
6200  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6201  }
6202 
6203  /* "PyClical.pyx":561
6204  * {2}
6205  * """
6206  * return clifford(self) # <<<<<<<<<<<<<<
6207  *
6208  * def __cinit__(self, other = 0, ixt = None):
6209  */
6210  __Pyx_XDECREF(__pyx_r);
6211  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
6212  __Pyx_GOTREF(__pyx_t_1);
6213  __pyx_r = __pyx_t_1;
6214  __pyx_t_1 = 0;
6215  goto __pyx_L0;
6216 
6217  /* "PyClical.pyx":554
6218  * return self.instance[0]
6219  *
6220  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6221  * """
6222  * Copy this clifford object.
6223  */
6224 
6225  /* function exit code */
6226  __pyx_L1_error:;
6227  __Pyx_XDECREF(__pyx_t_1);
6228  __Pyx_XDECREF(__pyx_t_2);
6229  __Pyx_XDECREF(__pyx_t_3);
6230  __Pyx_XDECREF(__pyx_t_4);
6231  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6232  __pyx_r = 0;
6233  __pyx_L0:;
6234  __Pyx_XGIVEREF(__pyx_r);
6235  __Pyx_RefNannyFinishContext();
6236  return __pyx_r;
6237  }
6238 
6239  /* Python wrapper */
6240  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6241  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 ";
6242  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6243  PyObject *__pyx_r = 0;
6244  __Pyx_RefNannyDeclarations
6245  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6246  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6247 
6248  /* function exit code */
6249  __Pyx_RefNannyFinishContext();
6250  return __pyx_r;
6251  }
6252 
6253  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6254  PyObject *__pyx_r = NULL;
6255  __Pyx_RefNannyDeclarations
6256  PyObject *__pyx_t_1 = NULL;
6257  __Pyx_RefNannySetupContext("copy", 0);
6258  __Pyx_XDECREF(__pyx_r);
6259  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6260  __Pyx_GOTREF(__pyx_t_1);
6261  __pyx_r = __pyx_t_1;
6262  __pyx_t_1 = 0;
6263  goto __pyx_L0;
6264 
6265  /* function exit code */
6266  __pyx_L1_error:;
6267  __Pyx_XDECREF(__pyx_t_1);
6268  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6269  __pyx_r = NULL;
6270  __pyx_L0:;
6271  __Pyx_XGIVEREF(__pyx_r);
6272  __Pyx_RefNannyFinishContext();
6273  return __pyx_r;
6274  }
6275 
6276  /* "PyClical.pyx":563
6277  * return clifford(self)
6278  *
6279  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6280  * """
6281  * Construct an object of type clifford.
6282  */
6283 
6284  /* Python wrapper */
6285  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6286  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6287  PyObject *__pyx_v_other = 0;
6288  PyObject *__pyx_v_ixt = 0;
6289  int __pyx_r;
6290  __Pyx_RefNannyDeclarations
6291  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6292  {
6293  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6294  PyObject* values[2] = {0,0};
6295  values[0] = ((PyObject *)__pyx_int_0);
6296  values[1] = ((PyObject *)Py_None);
6297  if (unlikely(__pyx_kwds)) {
6298  Py_ssize_t kw_args;
6299  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6300  switch (pos_args) {
6301  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6302  CYTHON_FALLTHROUGH;
6303  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6304  CYTHON_FALLTHROUGH;
6305  case 0: break;
6306  default: goto __pyx_L5_argtuple_error;
6307  }
6308  kw_args = PyDict_Size(__pyx_kwds);
6309  switch (pos_args) {
6310  case 0:
6311  if (kw_args > 0) {
6312  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6313  if (value) { values[0] = value; kw_args--; }
6314  }
6315  CYTHON_FALLTHROUGH;
6316  case 1:
6317  if (kw_args > 0) {
6318  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6319  if (value) { values[1] = value; kw_args--; }
6320  }
6321  }
6322  if (unlikely(kw_args > 0)) {
6323  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6324  }
6325  } else {
6326  switch (PyTuple_GET_SIZE(__pyx_args)) {
6327  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6328  CYTHON_FALLTHROUGH;
6329  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6330  CYTHON_FALLTHROUGH;
6331  case 0: break;
6332  default: goto __pyx_L5_argtuple_error;
6333  }
6334  }
6335  __pyx_v_other = values[0];
6336  __pyx_v_ixt = values[1];
6337  }
6338  goto __pyx_L4_argument_unpacking_done;
6339  __pyx_L5_argtuple_error:;
6340  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6341  __pyx_L3_error:;
6342  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6343  __Pyx_RefNannyFinishContext();
6344  return -1;
6345  __pyx_L4_argument_unpacking_done:;
6346  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6347 
6348  /* function exit code */
6349  __Pyx_RefNannyFinishContext();
6350  return __pyx_r;
6351  }
6352 
6353  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6354  PyObject *__pyx_v_error_msg_prefix = NULL;
6355  PyObject *__pyx_v_err = NULL;
6356  int __pyx_r;
6357  __Pyx_RefNannyDeclarations
6358  int __pyx_t_1;
6359  int __pyx_t_2;
6360  PyObject *__pyx_t_3 = NULL;
6361  PyObject *__pyx_t_4 = NULL;
6362  PyObject *__pyx_t_5 = NULL;
6363  Clifford *__pyx_t_6;
6364  PyObject *__pyx_t_7 = NULL;
6365  PyObject *__pyx_t_8 = NULL;
6366  scalar_t __pyx_t_9;
6367  PyObject *__pyx_t_10 = NULL;
6368  PyObject *__pyx_t_11 = NULL;
6369  PyObject *__pyx_t_12 = NULL;
6370  char *__pyx_t_13;
6371  int __pyx_t_14;
6372  PyObject *__pyx_t_15 = NULL;
6373  PyObject *__pyx_t_16 = NULL;
6374  PyObject *__pyx_t_17 = NULL;
6375  PyObject *__pyx_t_18 = NULL;
6376  __Pyx_RefNannySetupContext("__cinit__", 0);
6377 
6378  /* "PyClical.pyx":588
6379  * 2{1}+3{2}
6380  * """
6381  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6382  * if ixt is None:
6383  * try:
6384  */
6385  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6386  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6387 
6388  /* "PyClical.pyx":589
6389  * """
6390  * error_msg_prefix = "Cannot initialize clifford object from"
6391  * if ixt is None: # <<<<<<<<<<<<<<
6392  * try:
6393  * if isinstance(other, clifford):
6394  */
6395  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6396  __pyx_t_2 = (__pyx_t_1 != 0);
6397  if (__pyx_t_2) {
6398 
6399  /* "PyClical.pyx":590
6400  * error_msg_prefix = "Cannot initialize clifford object from"
6401  * if ixt is None:
6402  * try: # <<<<<<<<<<<<<<
6403  * if isinstance(other, clifford):
6404  * self.instance = new Clifford((<clifford>other).unwrap())
6405  */
6406  {
6407  __Pyx_PyThreadState_declare
6408  __Pyx_PyThreadState_assign
6409  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6410  __Pyx_XGOTREF(__pyx_t_3);
6411  __Pyx_XGOTREF(__pyx_t_4);
6412  __Pyx_XGOTREF(__pyx_t_5);
6413  /*try:*/ {
6414 
6415  /* "PyClical.pyx":591
6416  * if ixt is None:
6417  * try:
6418  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6419  * self.instance = new Clifford((<clifford>other).unwrap())
6420  * elif isinstance(other, index_set):
6421  */
6422  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6423  __pyx_t_1 = (__pyx_t_2 != 0);
6424  if (__pyx_t_1) {
6425 
6426  /* "PyClical.pyx":592
6427  * try:
6428  * if isinstance(other, clifford):
6429  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6430  * elif isinstance(other, index_set):
6431  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6432  */
6433  try {
6434  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6435  } catch(...) {
6436  __Pyx_CppExn2PyErr();
6437  __PYX_ERR(0, 592, __pyx_L4_error)
6438  }
6439  __pyx_v_self->instance = __pyx_t_6;
6440 
6441  /* "PyClical.pyx":591
6442  * if ixt is None:
6443  * try:
6444  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6445  * self.instance = new Clifford((<clifford>other).unwrap())
6446  * elif isinstance(other, index_set):
6447  */
6448  goto __pyx_L10;
6449  }
6450 
6451  /* "PyClical.pyx":593
6452  * if isinstance(other, clifford):
6453  * self.instance = new Clifford((<clifford>other).unwrap())
6454  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6455  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6456  * elif isinstance(other, numbers.Real):
6457  */
6458  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6459  __pyx_t_2 = (__pyx_t_1 != 0);
6460  if (__pyx_t_2) {
6461 
6462  /* "PyClical.pyx":594
6463  * self.instance = new Clifford((<clifford>other).unwrap())
6464  * elif isinstance(other, index_set):
6465  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6466  * elif isinstance(other, numbers.Real):
6467  * self.instance = new Clifford(<scalar_t>other)
6468  */
6469  try {
6470  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6471  } catch(...) {
6472  __Pyx_CppExn2PyErr();
6473  __PYX_ERR(0, 594, __pyx_L4_error)
6474  }
6475  __pyx_v_self->instance = __pyx_t_6;
6476 
6477  /* "PyClical.pyx":593
6478  * if isinstance(other, clifford):
6479  * self.instance = new Clifford((<clifford>other).unwrap())
6480  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6481  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6482  * elif isinstance(other, numbers.Real):
6483  */
6484  goto __pyx_L10;
6485  }
6486 
6487  /* "PyClical.pyx":595
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  * self.instance = new Clifford(<scalar_t>other)
6492  * elif isinstance(other, str):
6493  */
6494  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6495  __Pyx_GOTREF(__pyx_t_7);
6496  __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)
6497  __Pyx_GOTREF(__pyx_t_8);
6498  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6499  __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)
6500  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6501  __pyx_t_1 = (__pyx_t_2 != 0);
6502  if (__pyx_t_1) {
6503 
6504  /* "PyClical.pyx":596
6505  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6506  * elif isinstance(other, numbers.Real):
6507  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6508  * elif isinstance(other, str):
6509  * try:
6510  */
6511  __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)
6512  try {
6513  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6514  } catch(...) {
6515  __Pyx_CppExn2PyErr();
6516  __PYX_ERR(0, 596, __pyx_L4_error)
6517  }
6518  __pyx_v_self->instance = __pyx_t_6;
6519 
6520  /* "PyClical.pyx":595
6521  * elif isinstance(other, index_set):
6522  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6523  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6524  * self.instance = new Clifford(<scalar_t>other)
6525  * elif isinstance(other, str):
6526  */
6527  goto __pyx_L10;
6528  }
6529 
6530  /* "PyClical.pyx":597
6531  * elif isinstance(other, numbers.Real):
6532  * self.instance = new Clifford(<scalar_t>other)
6533  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6534  * try:
6535  * self.instance = new Clifford(<char *>other)
6536  */
6537  __pyx_t_1 = PyString_Check(__pyx_v_other);
6538  __pyx_t_2 = (__pyx_t_1 != 0);
6539  if (likely(__pyx_t_2)) {
6540 
6541  /* "PyClical.pyx":598
6542  * self.instance = new Clifford(<scalar_t>other)
6543  * elif isinstance(other, str):
6544  * try: # <<<<<<<<<<<<<<
6545  * self.instance = new Clifford(<char *>other)
6546  * except RuntimeError:
6547  */
6548  {
6549  __Pyx_PyThreadState_declare
6550  __Pyx_PyThreadState_assign
6551  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6552  __Pyx_XGOTREF(__pyx_t_10);
6553  __Pyx_XGOTREF(__pyx_t_11);
6554  __Pyx_XGOTREF(__pyx_t_12);
6555  /*try:*/ {
6556 
6557  /* "PyClical.pyx":599
6558  * elif isinstance(other, str):
6559  * try:
6560  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6561  * except RuntimeError:
6562  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6563  */
6564  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6565  try {
6566  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6567  } catch(...) {
6568  __Pyx_CppExn2PyErr();
6569  __PYX_ERR(0, 599, __pyx_L11_error)
6570  }
6571  __pyx_v_self->instance = __pyx_t_6;
6572 
6573  /* "PyClical.pyx":598
6574  * self.instance = new Clifford(<scalar_t>other)
6575  * elif isinstance(other, str):
6576  * try: # <<<<<<<<<<<<<<
6577  * self.instance = new Clifford(<char *>other)
6578  * except RuntimeError:
6579  */
6580  }
6581  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6582  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6583  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6584  goto __pyx_L16_try_end;
6585  __pyx_L11_error:;
6586  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6587  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6588 
6589  /* "PyClical.pyx":600
6590  * try:
6591  * self.instance = new Clifford(<char *>other)
6592  * except RuntimeError: # <<<<<<<<<<<<<<
6593  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6594  * else:
6595  */
6596  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6597  if (__pyx_t_14) {
6598  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6599  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6600  __Pyx_GOTREF(__pyx_t_8);
6601  __Pyx_GOTREF(__pyx_t_7);
6602  __Pyx_GOTREF(__pyx_t_15);
6603 
6604  /* "PyClical.pyx":601
6605  * self.instance = new Clifford(<char *>other)
6606  * except RuntimeError:
6607  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6608  * else:
6609  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6610  */
6611  __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)
6612  __Pyx_GOTREF(__pyx_t_16);
6613  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6614  __Pyx_GOTREF(__pyx_t_17);
6615  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6616  __Pyx_GOTREF(__pyx_t_18);
6617  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6618  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6619  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6620  __Pyx_GOTREF(__pyx_t_17);
6621  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6622  __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6623  __Pyx_GOTREF(__pyx_t_18);
6624  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6625  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6626  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6627  __PYX_ERR(0, 601, __pyx_L13_except_error)
6628  }
6629  goto __pyx_L13_except_error;
6630  __pyx_L13_except_error:;
6631 
6632  /* "PyClical.pyx":598
6633  * self.instance = new Clifford(<scalar_t>other)
6634  * elif isinstance(other, str):
6635  * try: # <<<<<<<<<<<<<<
6636  * self.instance = new Clifford(<char *>other)
6637  * except RuntimeError:
6638  */
6639  __Pyx_XGIVEREF(__pyx_t_10);
6640  __Pyx_XGIVEREF(__pyx_t_11);
6641  __Pyx_XGIVEREF(__pyx_t_12);
6642  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6643  goto __pyx_L4_error;
6644  __pyx_L16_try_end:;
6645  }
6646 
6647  /* "PyClical.pyx":597
6648  * elif isinstance(other, numbers.Real):
6649  * self.instance = new Clifford(<scalar_t>other)
6650  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6651  * try:
6652  * self.instance = new Clifford(<char *>other)
6653  */
6654  goto __pyx_L10;
6655  }
6656 
6657  /* "PyClical.pyx":603
6658  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6659  * else:
6660  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6661  * except RuntimeError as err:
6662  * raise ValueError(error_msg_prefix + " " + str(type(other))
6663  */
6664  /*else*/ {
6665  __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)
6666  __Pyx_GOTREF(__pyx_t_15);
6667  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6668  __Pyx_GOTREF(__pyx_t_7);
6669  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6670  __Pyx_GOTREF(__pyx_t_8);
6671  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6672  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6673  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6674  __Pyx_GOTREF(__pyx_t_7);
6675  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6676  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6677  __Pyx_GOTREF(__pyx_t_8);
6678  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6679  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6680  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6681  __PYX_ERR(0, 603, __pyx_L4_error)
6682  }
6683  __pyx_L10:;
6684 
6685  /* "PyClical.pyx":590
6686  * error_msg_prefix = "Cannot initialize clifford object from"
6687  * if ixt is None:
6688  * try: # <<<<<<<<<<<<<<
6689  * if isinstance(other, clifford):
6690  * self.instance = new Clifford((<clifford>other).unwrap())
6691  */
6692  }
6693  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6694  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6695  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6696  goto __pyx_L9_try_end;
6697  __pyx_L4_error:;
6698  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6699  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6700  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6701  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6702  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6703  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6704 
6705  /* "PyClical.pyx":604
6706  * else:
6707  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6708  * except RuntimeError as err: # <<<<<<<<<<<<<<
6709  * raise ValueError(error_msg_prefix + " " + str(type(other))
6710  * + " value " + repr(other) + ":"
6711  */
6712  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6713  if (__pyx_t_14) {
6714  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6715  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6716  __Pyx_GOTREF(__pyx_t_8);
6717  __Pyx_GOTREF(__pyx_t_7);
6718  __Pyx_GOTREF(__pyx_t_15);
6719  __Pyx_INCREF(__pyx_t_7);
6720  __pyx_v_err = __pyx_t_7;
6721 
6722  /* "PyClical.pyx":605
6723  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6724  * except RuntimeError as err:
6725  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6726  * + " value " + repr(other) + ":"
6727  * + "\n\t" + str(err))
6728  */
6729  __pyx_t_18 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6730  __Pyx_GOTREF(__pyx_t_18);
6731  __pyx_t_17 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6732  __Pyx_GOTREF(__pyx_t_17);
6733  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6734  __Pyx_GOTREF(__pyx_t_16);
6735  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6736  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6737 
6738  /* "PyClical.pyx":606
6739  * except RuntimeError as err:
6740  * raise ValueError(error_msg_prefix + " " + str(type(other))
6741  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6742  * + "\n\t" + str(err))
6743  * elif isinstance(ixt, index_set):
6744  */
6745  __pyx_t_17 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_value); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6746  __Pyx_GOTREF(__pyx_t_17);
6747  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6748  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6749  __Pyx_GOTREF(__pyx_t_16);
6750  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6751  __Pyx_GOTREF(__pyx_t_18);
6752  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6753  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6754  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_kp_s__5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6755  __Pyx_GOTREF(__pyx_t_16);
6756  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6757 
6758  /* "PyClical.pyx":607
6759  * raise ValueError(error_msg_prefix + " " + str(type(other))
6760  * + " value " + repr(other) + ":"
6761  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6762  * elif isinstance(ixt, index_set):
6763  * if isinstance(other, numbers.Real):
6764  */
6765  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_kp_s__6); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6766  __Pyx_GOTREF(__pyx_t_18);
6767  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6768  __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_err); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6769  __Pyx_GOTREF(__pyx_t_16);
6770  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6771  __Pyx_GOTREF(__pyx_t_17);
6772  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6773  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6774 
6775  /* "PyClical.pyx":605
6776  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6777  * except RuntimeError as err:
6778  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6779  * + " value " + repr(other) + ":"
6780  * + "\n\t" + str(err))
6781  */
6782  __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6783  __Pyx_GOTREF(__pyx_t_16);
6784  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6785  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6786  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6787  __PYX_ERR(0, 605, __pyx_L6_except_error)
6788  }
6789  goto __pyx_L6_except_error;
6790  __pyx_L6_except_error:;
6791 
6792  /* "PyClical.pyx":590
6793  * error_msg_prefix = "Cannot initialize clifford object from"
6794  * if ixt is None:
6795  * try: # <<<<<<<<<<<<<<
6796  * if isinstance(other, clifford):
6797  * self.instance = new Clifford((<clifford>other).unwrap())
6798  */
6799  __Pyx_XGIVEREF(__pyx_t_3);
6800  __Pyx_XGIVEREF(__pyx_t_4);
6801  __Pyx_XGIVEREF(__pyx_t_5);
6802  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6803  goto __pyx_L1_error;
6804  __pyx_L9_try_end:;
6805  }
6806 
6807  /* "PyClical.pyx":589
6808  * """
6809  * error_msg_prefix = "Cannot initialize clifford object from"
6810  * if ixt is None: # <<<<<<<<<<<<<<
6811  * try:
6812  * if isinstance(other, clifford):
6813  */
6814  goto __pyx_L3;
6815  }
6816 
6817  /* "PyClical.pyx":608
6818  * + " value " + repr(other) + ":"
6819  * + "\n\t" + str(err))
6820  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6821  * if isinstance(other, numbers.Real):
6822  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6823  */
6824  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6825  __pyx_t_1 = (__pyx_t_2 != 0);
6826  if (likely(__pyx_t_1)) {
6827 
6828  /* "PyClical.pyx":609
6829  * + "\n\t" + str(err))
6830  * elif isinstance(ixt, index_set):
6831  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6832  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6833  * elif isinstance(other, collections.Sequence):
6834  */
6835  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6836  __Pyx_GOTREF(__pyx_t_15);
6837  __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)
6838  __Pyx_GOTREF(__pyx_t_7);
6839  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6840  __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)
6841  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6842  __pyx_t_2 = (__pyx_t_1 != 0);
6843  if (__pyx_t_2) {
6844 
6845  /* "PyClical.pyx":610
6846  * elif isinstance(ixt, index_set):
6847  * if isinstance(other, numbers.Real):
6848  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6849  * elif isinstance(other, collections.Sequence):
6850  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6851  */
6852  __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)
6853  try {
6854  __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));
6855  } catch(...) {
6856  __Pyx_CppExn2PyErr();
6857  __PYX_ERR(0, 610, __pyx_L1_error)
6858  }
6859  __pyx_v_self->instance = __pyx_t_6;
6860 
6861  /* "PyClical.pyx":609
6862  * + "\n\t" + str(err))
6863  * elif isinstance(ixt, index_set):
6864  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6865  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6866  * elif isinstance(other, collections.Sequence):
6867  */
6868  goto __pyx_L21;
6869  }
6870 
6871  /* "PyClical.pyx":611
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  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6876  * else:
6877  */
6878  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6879  __Pyx_GOTREF(__pyx_t_7);
6880  __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)
6881  __Pyx_GOTREF(__pyx_t_15);
6882  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6883  __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)
6884  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6885  __pyx_t_1 = (__pyx_t_2 != 0);
6886  if (likely(__pyx_t_1)) {
6887 
6888  /* "PyClical.pyx":612
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  * else:
6893  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6894  */
6895  try {
6896  __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)));
6897  } catch(...) {
6898  __Pyx_CppExn2PyErr();
6899  __PYX_ERR(0, 612, __pyx_L1_error)
6900  }
6901  __pyx_v_self->instance = __pyx_t_6;
6902 
6903  /* "PyClical.pyx":611
6904  * if isinstance(other, numbers.Real):
6905  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6906  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6907  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6908  * else:
6909  */
6910  goto __pyx_L21;
6911  }
6912 
6913  /* "PyClical.pyx":614
6914  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6915  * else:
6916  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6917  * + ", " + repr(ixt) + ").")
6918  * else:
6919  */
6920  /*else*/ {
6921  __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)
6922  __Pyx_GOTREF(__pyx_t_15);
6923  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
6924  __Pyx_GOTREF(__pyx_t_7);
6925  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6926  __Pyx_GOTREF(__pyx_t_8);
6927  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6928  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6929 
6930  /* "PyClical.pyx":615
6931  * else:
6932  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6933  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6934  * else:
6935  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6936  */
6937  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6938  __Pyx_GOTREF(__pyx_t_7);
6939  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6940  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6941  __Pyx_GOTREF(__pyx_t_8);
6942  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
6943  __Pyx_GOTREF(__pyx_t_15);
6944  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6945  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6946  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6947  __Pyx_GOTREF(__pyx_t_8);
6948  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6949 
6950  /* "PyClical.pyx":614
6951  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6952  * else:
6953  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6954  * + ", " + repr(ixt) + ").")
6955  * else:
6956  */
6957  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
6958  __Pyx_GOTREF(__pyx_t_15);
6959  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6960  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
6961  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6962  __PYX_ERR(0, 614, __pyx_L1_error)
6963  }
6964  __pyx_L21:;
6965 
6966  /* "PyClical.pyx":608
6967  * + " value " + repr(other) + ":"
6968  * + "\n\t" + str(err))
6969  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6970  * if isinstance(other, numbers.Real):
6971  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6972  */
6973  goto __pyx_L3;
6974  }
6975 
6976  /* "PyClical.pyx":617
6977  * + ", " + repr(ixt) + ").")
6978  * else:
6979  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6980  * + ", " + str(type(ixt)) + ").")
6981  *
6982  */
6983  /*else*/ {
6984  __pyx_t_15 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_kp_s__7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
6985  __Pyx_GOTREF(__pyx_t_15);
6986  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 617, __pyx_L1_error)
6987  __Pyx_GOTREF(__pyx_t_8);
6988  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
6989  __Pyx_GOTREF(__pyx_t_7);
6990  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6991  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6992 
6993  /* "PyClical.pyx":618
6994  * else:
6995  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6996  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
6997  *
6998  * def __dealloc__(self):
6999  */
7000  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7001  __Pyx_GOTREF(__pyx_t_8);
7002  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7003  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7004  __Pyx_GOTREF(__pyx_t_7);
7005  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7006  __Pyx_GOTREF(__pyx_t_15);
7007  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7008  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7009  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7010  __Pyx_GOTREF(__pyx_t_7);
7011  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7012 
7013  /* "PyClical.pyx":617
7014  * + ", " + repr(ixt) + ").")
7015  * else:
7016  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7017  * + ", " + str(type(ixt)) + ").")
7018  *
7019  */
7020  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7021  __Pyx_GOTREF(__pyx_t_15);
7022  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7023  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7024  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7025  __PYX_ERR(0, 617, __pyx_L1_error)
7026  }
7027  __pyx_L3:;
7028 
7029  /* "PyClical.pyx":563
7030  * return clifford(self)
7031  *
7032  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7033  * """
7034  * Construct an object of type clifford.
7035  */
7036 
7037  /* function exit code */
7038  __pyx_r = 0;
7039  goto __pyx_L0;
7040  __pyx_L1_error:;
7041  __Pyx_XDECREF(__pyx_t_7);
7042  __Pyx_XDECREF(__pyx_t_8);
7043  __Pyx_XDECREF(__pyx_t_15);
7044  __Pyx_XDECREF(__pyx_t_16);
7045  __Pyx_XDECREF(__pyx_t_17);
7046  __Pyx_XDECREF(__pyx_t_18);
7047  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7048  __pyx_r = -1;
7049  __pyx_L0:;
7050  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7051  __Pyx_XDECREF(__pyx_v_err);
7052  __Pyx_RefNannyFinishContext();
7053  return __pyx_r;
7054  }
7055 
7056  /* "PyClical.pyx":620
7057  * + ", " + str(type(ixt)) + ").")
7058  *
7059  * def __dealloc__(self): # <<<<<<<<<<<<<<
7060  * """
7061  * Clean up by deallocating the instance of C++ class Clifford.
7062  */
7063 
7064  /* Python wrapper */
7065  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7066  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7067  __Pyx_RefNannyDeclarations
7068  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7069  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7070 
7071  /* function exit code */
7072  __Pyx_RefNannyFinishContext();
7073  }
7074 
7075  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7076  __Pyx_RefNannyDeclarations
7077  __Pyx_RefNannySetupContext("__dealloc__", 0);
7078 
7079  /* "PyClical.pyx":624
7080  * Clean up by deallocating the instance of C++ class Clifford.
7081  * """
7082  * del self.instance # <<<<<<<<<<<<<<
7083  *
7084  * def __contains__(self, x):
7085  */
7086  delete __pyx_v_self->instance;
7087 
7088  /* "PyClical.pyx":620
7089  * + ", " + str(type(ixt)) + ").")
7090  *
7091  * def __dealloc__(self): # <<<<<<<<<<<<<<
7092  * """
7093  * Clean up by deallocating the instance of C++ class Clifford.
7094  */
7095 
7096  /* function exit code */
7097  __Pyx_RefNannyFinishContext();
7098  }
7099 
7100  /* "PyClical.pyx":626
7101  * del self.instance
7102  *
7103  * def __contains__(self, x): # <<<<<<<<<<<<<<
7104  * """
7105  * Not applicable.
7106  */
7107 
7108  /* Python wrapper */
7109  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7110  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 ";
7111  #if CYTHON_COMPILING_IN_CPYTHON
7112  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7113  #endif
7114  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7115  int __pyx_r;
7116  __Pyx_RefNannyDeclarations
7117  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7118  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7119 
7120  /* function exit code */
7121  __Pyx_RefNannyFinishContext();
7122  return __pyx_r;
7123  }
7124 
7125  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7126  int __pyx_r;
7127  __Pyx_RefNannyDeclarations
7128  PyObject *__pyx_t_1 = NULL;
7129  __Pyx_RefNannySetupContext("__contains__", 0);
7130 
7131  /* "PyClical.pyx":635
7132  * TypeError: Not applicable.
7133  * """
7134  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7135  *
7136  * def __iter__(self):
7137  */
7138  __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)
7139  __Pyx_GOTREF(__pyx_t_1);
7140  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7141  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7142  __PYX_ERR(0, 635, __pyx_L1_error)
7143 
7144  /* "PyClical.pyx":626
7145  * del self.instance
7146  *
7147  * def __contains__(self, x): # <<<<<<<<<<<<<<
7148  * """
7149  * Not applicable.
7150  */
7151 
7152  /* function exit code */
7153  __pyx_L1_error:;
7154  __Pyx_XDECREF(__pyx_t_1);
7155  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7156  __pyx_r = -1;
7157  __Pyx_RefNannyFinishContext();
7158  return __pyx_r;
7159  }
7160 
7161  /* "PyClical.pyx":637
7162  * raise TypeError("Not applicable.")
7163  *
7164  * def __iter__(self): # <<<<<<<<<<<<<<
7165  * """
7166  * Not applicable.
7167  */
7168 
7169  /* Python wrapper */
7170  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7171  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 ";
7172  #if CYTHON_COMPILING_IN_CPYTHON
7173  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7174  #endif
7175  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7176  PyObject *__pyx_r = 0;
7177  __Pyx_RefNannyDeclarations
7178  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7179  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7180 
7181  /* function exit code */
7182  __Pyx_RefNannyFinishContext();
7183  return __pyx_r;
7184  }
7185 
7186  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7187  PyObject *__pyx_r = NULL;
7188  __Pyx_RefNannyDeclarations
7189  PyObject *__pyx_t_1 = NULL;
7190  __Pyx_RefNannySetupContext("__iter__", 0);
7191 
7192  /* "PyClical.pyx":646
7193  * TypeError: Not applicable.
7194  * """
7195  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7196  *
7197  * def reframe(self, ixt):
7198  */
7199  __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)
7200  __Pyx_GOTREF(__pyx_t_1);
7201  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7202  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7203  __PYX_ERR(0, 646, __pyx_L1_error)
7204 
7205  /* "PyClical.pyx":637
7206  * raise TypeError("Not applicable.")
7207  *
7208  * def __iter__(self): # <<<<<<<<<<<<<<
7209  * """
7210  * Not applicable.
7211  */
7212 
7213  /* function exit code */
7214  __pyx_L1_error:;
7215  __Pyx_XDECREF(__pyx_t_1);
7216  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7217  __pyx_r = NULL;
7218  __Pyx_XGIVEREF(__pyx_r);
7219  __Pyx_RefNannyFinishContext();
7220  return __pyx_r;
7221  }
7222 
7223  /* "PyClical.pyx":648
7224  * raise TypeError("Not applicable.")
7225  *
7226  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7227  * """
7228  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7229  */
7230 
7231  /* Python wrapper */
7232  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7233  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 ";
7234  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7235  PyObject *__pyx_r = 0;
7236  __Pyx_RefNannyDeclarations
7237  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7238  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7239 
7240  /* function exit code */
7241  __Pyx_RefNannyFinishContext();
7242  return __pyx_r;
7243  }
7244 
7245  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7246  PyObject *__pyx_v_error_msg_prefix = NULL;
7247  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7248  PyObject *__pyx_v_err = NULL;
7249  PyObject *__pyx_r = NULL;
7250  __Pyx_RefNannyDeclarations
7251  int __pyx_t_1;
7252  int __pyx_t_2;
7253  PyObject *__pyx_t_3 = NULL;
7254  PyObject *__pyx_t_4 = NULL;
7255  PyObject *__pyx_t_5 = NULL;
7256  PyObject *__pyx_t_6 = NULL;
7257  Clifford *__pyx_t_7;
7258  int __pyx_t_8;
7259  PyObject *__pyx_t_9 = NULL;
7260  PyObject *__pyx_t_10 = NULL;
7261  PyObject *__pyx_t_11 = NULL;
7262  PyObject *__pyx_t_12 = NULL;
7263  PyObject *__pyx_t_13 = NULL;
7264  __Pyx_RefNannySetupContext("reframe", 0);
7265 
7266  /* "PyClical.pyx":658
7267  * True
7268  * """
7269  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7270  * if isinstance(ixt, index_set):
7271  * try:
7272  */
7273  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7274  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7275 
7276  /* "PyClical.pyx":659
7277  * """
7278  * error_msg_prefix = "Cannot reframe"
7279  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7280  * try:
7281  * result = clifford()
7282  */
7283  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7284  __pyx_t_2 = (__pyx_t_1 != 0);
7285  if (likely(__pyx_t_2)) {
7286 
7287  /* "PyClical.pyx":660
7288  * error_msg_prefix = "Cannot reframe"
7289  * if isinstance(ixt, index_set):
7290  * try: # <<<<<<<<<<<<<<
7291  * result = clifford()
7292  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7293  */
7294  {
7295  __Pyx_PyThreadState_declare
7296  __Pyx_PyThreadState_assign
7297  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7298  __Pyx_XGOTREF(__pyx_t_3);
7299  __Pyx_XGOTREF(__pyx_t_4);
7300  __Pyx_XGOTREF(__pyx_t_5);
7301  /*try:*/ {
7302 
7303  /* "PyClical.pyx":661
7304  * if isinstance(ixt, index_set):
7305  * try:
7306  * result = clifford() # <<<<<<<<<<<<<<
7307  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7308  * except RuntimeError as err:
7309  */
7310  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7311  __Pyx_GOTREF(__pyx_t_6);
7312  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7313  __pyx_t_6 = 0;
7314 
7315  /* "PyClical.pyx":662
7316  * try:
7317  * result = clifford()
7318  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7319  * except RuntimeError as err:
7320  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7321  */
7322  try {
7323  __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)));
7324  } catch(...) {
7325  __Pyx_CppExn2PyErr();
7326  __PYX_ERR(0, 662, __pyx_L4_error)
7327  }
7328  __pyx_v_result->instance = __pyx_t_7;
7329 
7330  /* "PyClical.pyx":660
7331  * error_msg_prefix = "Cannot reframe"
7332  * if isinstance(ixt, index_set):
7333  * try: # <<<<<<<<<<<<<<
7334  * result = clifford()
7335  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7336  */
7337  }
7338  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7339  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7340  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7341  goto __pyx_L9_try_end;
7342  __pyx_L4_error:;
7343  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7344 
7345  /* "PyClical.pyx":663
7346  * result = clifford()
7347  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7348  * except RuntimeError as err: # <<<<<<<<<<<<<<
7349  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7350  * + str(ixt) + ":"
7351  */
7352  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7353  if (__pyx_t_8) {
7354  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7355  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7356  __Pyx_GOTREF(__pyx_t_6);
7357  __Pyx_GOTREF(__pyx_t_9);
7358  __Pyx_GOTREF(__pyx_t_10);
7359  __Pyx_INCREF(__pyx_t_9);
7360  __pyx_v_err = __pyx_t_9;
7361 
7362  /* "PyClical.pyx":664
7363  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7364  * except RuntimeError as err:
7365  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7366  * + str(ixt) + ":"
7367  * + "\n\t" + str(err))
7368  */
7369  __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)
7370  __Pyx_GOTREF(__pyx_t_11);
7371  __pyx_t_12 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7372  __Pyx_GOTREF(__pyx_t_12);
7373  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7374  __Pyx_GOTREF(__pyx_t_13);
7375  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7376  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7377  __pyx_t_12 = PyNumber_Add(__pyx_t_13, __pyx_kp_s_to_frame); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7378  __Pyx_GOTREF(__pyx_t_12);
7379  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7380 
7381  /* "PyClical.pyx":665
7382  * except RuntimeError as err:
7383  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7384  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7385  * + "\n\t" + str(err))
7386  * else:
7387  */
7388  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_ixt); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7389  __Pyx_GOTREF(__pyx_t_13);
7390  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7391  __Pyx_GOTREF(__pyx_t_11);
7392  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7393  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7394  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7395  __Pyx_GOTREF(__pyx_t_13);
7396  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7397 
7398  /* "PyClical.pyx":666
7399  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7400  * + str(ixt) + ":"
7401  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7402  * else:
7403  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7404  */
7405  __pyx_t_11 = PyNumber_Add(__pyx_t_13, __pyx_kp_s__6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7406  __Pyx_GOTREF(__pyx_t_11);
7407  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7408  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_err); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7409  __Pyx_GOTREF(__pyx_t_13);
7410  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7411  __Pyx_GOTREF(__pyx_t_12);
7412  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7413  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7414 
7415  /* "PyClical.pyx":664
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  * + "\n\t" + str(err))
7421  */
7422  __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7423  __Pyx_GOTREF(__pyx_t_13);
7424  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7425  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7426  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7427  __PYX_ERR(0, 664, __pyx_L6_except_error)
7428  }
7429  goto __pyx_L6_except_error;
7430  __pyx_L6_except_error:;
7431 
7432  /* "PyClical.pyx":660
7433  * error_msg_prefix = "Cannot reframe"
7434  * if isinstance(ixt, index_set):
7435  * try: # <<<<<<<<<<<<<<
7436  * result = clifford()
7437  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7438  */
7439  __Pyx_XGIVEREF(__pyx_t_3);
7440  __Pyx_XGIVEREF(__pyx_t_4);
7441  __Pyx_XGIVEREF(__pyx_t_5);
7442  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7443  goto __pyx_L1_error;
7444  __pyx_L9_try_end:;
7445  }
7446 
7447  /* "PyClical.pyx":659
7448  * """
7449  * error_msg_prefix = "Cannot reframe"
7450  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7451  * try:
7452  * result = clifford()
7453  */
7454  goto __pyx_L3;
7455  }
7456 
7457  /* "PyClical.pyx":668
7458  * + "\n\t" + str(err))
7459  * else:
7460  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7461  * return result
7462  *
7463  */
7464  /*else*/ {
7465  __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)
7466  __Pyx_GOTREF(__pyx_t_10);
7467  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_ixt))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7468  __Pyx_GOTREF(__pyx_t_9);
7469  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7470  __Pyx_GOTREF(__pyx_t_6);
7471  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7472  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7473  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7474  __Pyx_GOTREF(__pyx_t_9);
7475  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7476  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7477  __Pyx_GOTREF(__pyx_t_6);
7478  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7479  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7480  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7481  __PYX_ERR(0, 668, __pyx_L1_error)
7482  }
7483  __pyx_L3:;
7484 
7485  /* "PyClical.pyx":669
7486  * else:
7487  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7488  * return result # <<<<<<<<<<<<<<
7489  *
7490  * def __richcmp__(lhs, rhs, int op):
7491  */
7492  __Pyx_XDECREF(__pyx_r);
7493  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7494  __pyx_r = ((PyObject *)__pyx_v_result);
7495  goto __pyx_L0;
7496 
7497  /* "PyClical.pyx":648
7498  * raise TypeError("Not applicable.")
7499  *
7500  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7501  * """
7502  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7503  */
7504 
7505  /* function exit code */
7506  __pyx_L1_error:;
7507  __Pyx_XDECREF(__pyx_t_6);
7508  __Pyx_XDECREF(__pyx_t_9);
7509  __Pyx_XDECREF(__pyx_t_10);
7510  __Pyx_XDECREF(__pyx_t_11);
7511  __Pyx_XDECREF(__pyx_t_12);
7512  __Pyx_XDECREF(__pyx_t_13);
7513  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7514  __pyx_r = NULL;
7515  __pyx_L0:;
7516  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7517  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7518  __Pyx_XDECREF(__pyx_v_err);
7519  __Pyx_XGIVEREF(__pyx_r);
7520  __Pyx_RefNannyFinishContext();
7521  return __pyx_r;
7522  }
7523 
7524  /* "PyClical.pyx":671
7525  * return result
7526  *
7527  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7528  * """
7529  * Compare objects of type clifford.
7530  */
7531 
7532  /* Python wrapper */
7533  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7534  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7535  PyObject *__pyx_r = 0;
7536  __Pyx_RefNannyDeclarations
7537  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7538  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7539 
7540  /* function exit code */
7541  __Pyx_RefNannyFinishContext();
7542  return __pyx_r;
7543  }
7544 
7545  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7546  PyObject *__pyx_r = NULL;
7547  __Pyx_RefNannyDeclarations
7548  int __pyx_t_1;
7549  int __pyx_t_2;
7550  int __pyx_t_3;
7551  PyObject *__pyx_t_4 = NULL;
7552  PyObject *__pyx_t_5 = NULL;
7553  PyObject *__pyx_t_6 = NULL;
7554  __Pyx_RefNannySetupContext("__richcmp__", 0);
7555 
7556  /* "PyClical.pyx":690
7557  * True
7558  * """
7559  * if op == 2: # == # <<<<<<<<<<<<<<
7560  * if (lhs is None) or (rhs is None):
7561  * return bool(lhs is rhs)
7562  */
7563  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7564  if (__pyx_t_1) {
7565 
7566  /* "PyClical.pyx":691
7567  * """
7568  * if op == 2: # ==
7569  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7570  * return bool(lhs is rhs)
7571  * else:
7572  */
7573  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7574  __pyx_t_3 = (__pyx_t_2 != 0);
7575  if (!__pyx_t_3) {
7576  } else {
7577  __pyx_t_1 = __pyx_t_3;
7578  goto __pyx_L5_bool_binop_done;
7579  }
7580  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7581  __pyx_t_2 = (__pyx_t_3 != 0);
7582  __pyx_t_1 = __pyx_t_2;
7583  __pyx_L5_bool_binop_done:;
7584  if (__pyx_t_1) {
7585 
7586  /* "PyClical.pyx":692
7587  * if op == 2: # ==
7588  * if (lhs is None) or (rhs is None):
7589  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7590  * else:
7591  * return bool( toClifford(lhs) == toClifford(rhs) )
7592  */
7593  __Pyx_XDECREF(__pyx_r);
7594  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7595  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7596  __Pyx_GOTREF(__pyx_t_4);
7597  __pyx_r = __pyx_t_4;
7598  __pyx_t_4 = 0;
7599  goto __pyx_L0;
7600 
7601  /* "PyClical.pyx":691
7602  * """
7603  * if op == 2: # ==
7604  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7605  * return bool(lhs is rhs)
7606  * else:
7607  */
7608  }
7609 
7610  /* "PyClical.pyx":694
7611  * return bool(lhs is rhs)
7612  * else:
7613  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7614  * elif op == 3: # !=
7615  * if (lhs is None) or (rhs is None):
7616  */
7617  /*else*/ {
7618  __Pyx_XDECREF(__pyx_r);
7619  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7620  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7621  __Pyx_GOTREF(__pyx_t_4);
7622  __pyx_r = __pyx_t_4;
7623  __pyx_t_4 = 0;
7624  goto __pyx_L0;
7625  }
7626 
7627  /* "PyClical.pyx":690
7628  * True
7629  * """
7630  * if op == 2: # == # <<<<<<<<<<<<<<
7631  * if (lhs is None) or (rhs is None):
7632  * return bool(lhs is rhs)
7633  */
7634  }
7635 
7636  /* "PyClical.pyx":695
7637  * else:
7638  * return bool( toClifford(lhs) == toClifford(rhs) )
7639  * elif op == 3: # != # <<<<<<<<<<<<<<
7640  * if (lhs is None) or (rhs is None):
7641  * return not bool(lhs is rhs)
7642  */
7643  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7644  if (__pyx_t_1) {
7645 
7646  /* "PyClical.pyx":696
7647  * return bool( toClifford(lhs) == toClifford(rhs) )
7648  * elif op == 3: # !=
7649  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7650  * return not bool(lhs is rhs)
7651  * else:
7652  */
7653  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7654  __pyx_t_3 = (__pyx_t_2 != 0);
7655  if (!__pyx_t_3) {
7656  } else {
7657  __pyx_t_1 = __pyx_t_3;
7658  goto __pyx_L8_bool_binop_done;
7659  }
7660  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7661  __pyx_t_2 = (__pyx_t_3 != 0);
7662  __pyx_t_1 = __pyx_t_2;
7663  __pyx_L8_bool_binop_done:;
7664  if (__pyx_t_1) {
7665 
7666  /* "PyClical.pyx":697
7667  * elif op == 3: # !=
7668  * if (lhs is None) or (rhs is None):
7669  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7670  * else:
7671  * return bool( toClifford(lhs) != toClifford(rhs) )
7672  */
7673  __Pyx_XDECREF(__pyx_r);
7674  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7675  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7676  __Pyx_GOTREF(__pyx_t_4);
7677  __pyx_r = __pyx_t_4;
7678  __pyx_t_4 = 0;
7679  goto __pyx_L0;
7680 
7681  /* "PyClical.pyx":696
7682  * return bool( toClifford(lhs) == toClifford(rhs) )
7683  * elif op == 3: # !=
7684  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7685  * return not bool(lhs is rhs)
7686  * else:
7687  */
7688  }
7689 
7690  /* "PyClical.pyx":699
7691  * return not bool(lhs is rhs)
7692  * else:
7693  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7694  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7695  * raise TypeError("This comparison operator is not implemented for "
7696  */
7697  /*else*/ {
7698  __Pyx_XDECREF(__pyx_r);
7699  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7700  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7701  __Pyx_GOTREF(__pyx_t_4);
7702  __pyx_r = __pyx_t_4;
7703  __pyx_t_4 = 0;
7704  goto __pyx_L0;
7705  }
7706 
7707  /* "PyClical.pyx":695
7708  * else:
7709  * return bool( toClifford(lhs) == toClifford(rhs) )
7710  * elif op == 3: # != # <<<<<<<<<<<<<<
7711  * if (lhs is None) or (rhs is None):
7712  * return not bool(lhs is rhs)
7713  */
7714  }
7715 
7716  /* "PyClical.pyx":700
7717  * else:
7718  * return bool( toClifford(lhs) != toClifford(rhs) )
7719  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7720  * raise TypeError("This comparison operator is not implemented for "
7721  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7722  */
7723  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7724  __pyx_t_3 = (__pyx_t_2 != 0);
7725  if (!__pyx_t_3) {
7726  } else {
7727  __pyx_t_1 = __pyx_t_3;
7728  goto __pyx_L10_bool_binop_done;
7729  }
7730  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7731  __pyx_t_2 = (__pyx_t_3 != 0);
7732  __pyx_t_1 = __pyx_t_2;
7733  __pyx_L10_bool_binop_done:;
7734  if (unlikely(__pyx_t_1)) {
7735 
7736  /* "PyClical.pyx":702
7737  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7738  * raise TypeError("This comparison operator is not implemented for "
7739  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7740  * else:
7741  * return NotImplemented
7742  */
7743  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_lhs)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7744  __Pyx_GOTREF(__pyx_t_4);
7745  __pyx_t_5 = PyNumber_Add(__pyx_kp_s_This_comparison_operator_is_not, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7746  __Pyx_GOTREF(__pyx_t_5);
7747  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7748  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7749  __Pyx_GOTREF(__pyx_t_4);
7750  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7751  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)Py_TYPE(__pyx_v_rhs))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7752  __Pyx_GOTREF(__pyx_t_5);
7753  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7754  __Pyx_GOTREF(__pyx_t_6);
7755  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7756  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7757  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7758  __Pyx_GOTREF(__pyx_t_5);
7759  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7760 
7761  /* "PyClical.pyx":701
7762  * return bool( toClifford(lhs) != toClifford(rhs) )
7763  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7764  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7765  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7766  * else:
7767  */
7768  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7769  __Pyx_GOTREF(__pyx_t_6);
7770  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7771  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7772  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7773  __PYX_ERR(0, 701, __pyx_L1_error)
7774 
7775  /* "PyClical.pyx":700
7776  * else:
7777  * return bool( toClifford(lhs) != toClifford(rhs) )
7778  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7779  * raise TypeError("This comparison operator is not implemented for "
7780  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7781  */
7782  }
7783 
7784  /* "PyClical.pyx":704
7785  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7786  * else:
7787  * return NotImplemented # <<<<<<<<<<<<<<
7788  *
7789  * def __getitem__(self, ixt):
7790  */
7791  /*else*/ {
7792  __Pyx_XDECREF(__pyx_r);
7793  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7794  __pyx_r = __pyx_builtin_NotImplemented;
7795  goto __pyx_L0;
7796  }
7797 
7798  /* "PyClical.pyx":671
7799  * return result
7800  *
7801  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7802  * """
7803  * Compare objects of type clifford.
7804  */
7805 
7806  /* function exit code */
7807  __pyx_L1_error:;
7808  __Pyx_XDECREF(__pyx_t_4);
7809  __Pyx_XDECREF(__pyx_t_5);
7810  __Pyx_XDECREF(__pyx_t_6);
7811  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7812  __pyx_r = NULL;
7813  __pyx_L0:;
7814  __Pyx_XGIVEREF(__pyx_r);
7815  __Pyx_RefNannyFinishContext();
7816  return __pyx_r;
7817  }
7818 
7819  /* "PyClical.pyx":706
7820  * return NotImplemented
7821  *
7822  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7823  * """
7824  * Subscripting: map from index set to scalar coordinate.
7825  */
7826 
7827  /* Python wrapper */
7828  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7829  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 ";
7830  #if CYTHON_COMPILING_IN_CPYTHON
7831  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7832  #endif
7833  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7834  PyObject *__pyx_r = 0;
7835  __Pyx_RefNannyDeclarations
7836  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7837  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7838 
7839  /* function exit code */
7840  __Pyx_RefNannyFinishContext();
7841  return __pyx_r;
7842  }
7843 
7844  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7845  PyObject *__pyx_r = NULL;
7846  __Pyx_RefNannyDeclarations
7847  PyObject *__pyx_t_1 = NULL;
7848  __Pyx_RefNannySetupContext("__getitem__", 0);
7849 
7850  /* "PyClical.pyx":719
7851  * 2.0
7852  * """
7853  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7854  *
7855  * def __neg__(self):
7856  */
7857  __Pyx_XDECREF(__pyx_r);
7858  __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)
7859  __Pyx_GOTREF(__pyx_t_1);
7860  __pyx_r = __pyx_t_1;
7861  __pyx_t_1 = 0;
7862  goto __pyx_L0;
7863 
7864  /* "PyClical.pyx":706
7865  * return NotImplemented
7866  *
7867  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7868  * """
7869  * Subscripting: map from index set to scalar coordinate.
7870  */
7871 
7872  /* function exit code */
7873  __pyx_L1_error:;
7874  __Pyx_XDECREF(__pyx_t_1);
7875  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7876  __pyx_r = NULL;
7877  __pyx_L0:;
7878  __Pyx_XGIVEREF(__pyx_r);
7879  __Pyx_RefNannyFinishContext();
7880  return __pyx_r;
7881  }
7882 
7883  /* "PyClical.pyx":721
7884  * return self.instance.getitem(toIndexSet(ixt))
7885  *
7886  * def __neg__(self): # <<<<<<<<<<<<<<
7887  * """
7888  * Unary -.
7889  */
7890 
7891  /* Python wrapper */
7892  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7893  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7894  #if CYTHON_COMPILING_IN_CPYTHON
7895  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7896  #endif
7897  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7898  PyObject *__pyx_r = 0;
7899  __Pyx_RefNannyDeclarations
7900  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7901  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7902 
7903  /* function exit code */
7904  __Pyx_RefNannyFinishContext();
7905  return __pyx_r;
7906  }
7907 
7908  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7909  PyObject *__pyx_r = NULL;
7910  __Pyx_RefNannyDeclarations
7911  PyObject *__pyx_t_1 = NULL;
7912  PyObject *__pyx_t_2 = NULL;
7913  __Pyx_RefNannySetupContext("__neg__", 0);
7914 
7915  /* "PyClical.pyx":728
7916  * -{1}
7917  * """
7918  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7919  *
7920  * def __pos__(self):
7921  */
7922  __Pyx_XDECREF(__pyx_r);
7923  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7924  __Pyx_GOTREF(__pyx_t_1);
7925  __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)
7926  __Pyx_GOTREF(__pyx_t_2);
7927  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7928  __pyx_r = __pyx_t_2;
7929  __pyx_t_2 = 0;
7930  goto __pyx_L0;
7931 
7932  /* "PyClical.pyx":721
7933  * return self.instance.getitem(toIndexSet(ixt))
7934  *
7935  * def __neg__(self): # <<<<<<<<<<<<<<
7936  * """
7937  * Unary -.
7938  */
7939 
7940  /* function exit code */
7941  __pyx_L1_error:;
7942  __Pyx_XDECREF(__pyx_t_1);
7943  __Pyx_XDECREF(__pyx_t_2);
7944  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7945  __pyx_r = NULL;
7946  __pyx_L0:;
7947  __Pyx_XGIVEREF(__pyx_r);
7948  __Pyx_RefNannyFinishContext();
7949  return __pyx_r;
7950  }
7951 
7952  /* "PyClical.pyx":730
7953  * return clifford().wrap( self.instance.neg() )
7954  *
7955  * def __pos__(self): # <<<<<<<<<<<<<<
7956  * """
7957  * Unary +.
7958  */
7959 
7960  /* Python wrapper */
7961  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
7962  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
7963  #if CYTHON_COMPILING_IN_CPYTHON
7964  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
7965  #endif
7966  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
7967  PyObject *__pyx_r = 0;
7968  __Pyx_RefNannyDeclarations
7969  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
7970  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7971 
7972  /* function exit code */
7973  __Pyx_RefNannyFinishContext();
7974  return __pyx_r;
7975  }
7976 
7977  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7978  PyObject *__pyx_r = NULL;
7979  __Pyx_RefNannyDeclarations
7980  PyObject *__pyx_t_1 = NULL;
7981  __Pyx_RefNannySetupContext("__pos__", 0);
7982 
7983  /* "PyClical.pyx":737
7984  * {1}
7985  * """
7986  * return clifford(self) # <<<<<<<<<<<<<<
7987  *
7988  * def __add__(lhs, rhs):
7989  */
7990  __Pyx_XDECREF(__pyx_r);
7991  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error)
7992  __Pyx_GOTREF(__pyx_t_1);
7993  __pyx_r = __pyx_t_1;
7994  __pyx_t_1 = 0;
7995  goto __pyx_L0;
7996 
7997  /* "PyClical.pyx":730
7998  * return clifford().wrap( self.instance.neg() )
7999  *
8000  * def __pos__(self): # <<<<<<<<<<<<<<
8001  * """
8002  * Unary +.
8003  */
8004 
8005  /* function exit code */
8006  __pyx_L1_error:;
8007  __Pyx_XDECREF(__pyx_t_1);
8008  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8009  __pyx_r = NULL;
8010  __pyx_L0:;
8011  __Pyx_XGIVEREF(__pyx_r);
8012  __Pyx_RefNannyFinishContext();
8013  return __pyx_r;
8014  }
8015 
8016  /* "PyClical.pyx":739
8017  * return clifford(self)
8018  *
8019  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8020  * """
8021  * Geometric sum.
8022  */
8023 
8024  /* Python wrapper */
8025  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8026  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 ";
8027  #if CYTHON_COMPILING_IN_CPYTHON
8028  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8029  #endif
8030  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8031  PyObject *__pyx_r = 0;
8032  __Pyx_RefNannyDeclarations
8033  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8034  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8035 
8036  /* function exit code */
8037  __Pyx_RefNannyFinishContext();
8038  return __pyx_r;
8039  }
8040 
8041  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8042  PyObject *__pyx_r = NULL;
8043  __Pyx_RefNannyDeclarations
8044  PyObject *__pyx_t_1 = NULL;
8045  PyObject *__pyx_t_2 = NULL;
8046  __Pyx_RefNannySetupContext("__add__", 0);
8047 
8048  /* "PyClical.pyx":748
8049  * {1}+{2}
8050  * """
8051  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8052  *
8053  * def __iadd__(self, rhs):
8054  */
8055  __Pyx_XDECREF(__pyx_r);
8056  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8057  __Pyx_GOTREF(__pyx_t_1);
8058  __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)
8059  __Pyx_GOTREF(__pyx_t_2);
8060  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8061  __pyx_r = __pyx_t_2;
8062  __pyx_t_2 = 0;
8063  goto __pyx_L0;
8064 
8065  /* "PyClical.pyx":739
8066  * return clifford(self)
8067  *
8068  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8069  * """
8070  * Geometric sum.
8071  */
8072 
8073  /* function exit code */
8074  __pyx_L1_error:;
8075  __Pyx_XDECREF(__pyx_t_1);
8076  __Pyx_XDECREF(__pyx_t_2);
8077  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8078  __pyx_r = NULL;
8079  __pyx_L0:;
8080  __Pyx_XGIVEREF(__pyx_r);
8081  __Pyx_RefNannyFinishContext();
8082  return __pyx_r;
8083  }
8084 
8085  /* "PyClical.pyx":750
8086  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8087  *
8088  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8089  * """
8090  * Geometric sum.
8091  */
8092 
8093  /* Python wrapper */
8094  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8095  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 ";
8096  #if CYTHON_COMPILING_IN_CPYTHON
8097  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8098  #endif
8099  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8100  PyObject *__pyx_r = 0;
8101  __Pyx_RefNannyDeclarations
8102  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8103  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8104 
8105  /* function exit code */
8106  __Pyx_RefNannyFinishContext();
8107  return __pyx_r;
8108  }
8109 
8110  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8111  PyObject *__pyx_r = NULL;
8112  __Pyx_RefNannyDeclarations
8113  PyObject *__pyx_t_1 = NULL;
8114  __Pyx_RefNannySetupContext("__iadd__", 0);
8115 
8116  /* "PyClical.pyx":757
8117  * 1+{2}
8118  * """
8119  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8120  *
8121  * def __sub__(lhs, rhs):
8122  */
8123  __Pyx_XDECREF(__pyx_r);
8124  __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)
8125  __Pyx_GOTREF(__pyx_t_1);
8126  __pyx_r = __pyx_t_1;
8127  __pyx_t_1 = 0;
8128  goto __pyx_L0;
8129 
8130  /* "PyClical.pyx":750
8131  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8132  *
8133  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8134  * """
8135  * Geometric sum.
8136  */
8137 
8138  /* function exit code */
8139  __pyx_L1_error:;
8140  __Pyx_XDECREF(__pyx_t_1);
8141  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8142  __pyx_r = NULL;
8143  __pyx_L0:;
8144  __Pyx_XGIVEREF(__pyx_r);
8145  __Pyx_RefNannyFinishContext();
8146  return __pyx_r;
8147  }
8148 
8149  /* "PyClical.pyx":759
8150  * return self.wrap( self.unwrap() + toClifford(rhs) )
8151  *
8152  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8153  * """
8154  * Geometric difference.
8155  */
8156 
8157  /* Python wrapper */
8158  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8159  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 ";
8160  #if CYTHON_COMPILING_IN_CPYTHON
8161  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8162  #endif
8163  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8164  PyObject *__pyx_r = 0;
8165  __Pyx_RefNannyDeclarations
8166  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8167  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8168 
8169  /* function exit code */
8170  __Pyx_RefNannyFinishContext();
8171  return __pyx_r;
8172  }
8173 
8174  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8175  PyObject *__pyx_r = NULL;
8176  __Pyx_RefNannyDeclarations
8177  PyObject *__pyx_t_1 = NULL;
8178  PyObject *__pyx_t_2 = NULL;
8179  __Pyx_RefNannySetupContext("__sub__", 0);
8180 
8181  /* "PyClical.pyx":768
8182  * {1}-{2}
8183  * """
8184  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8185  *
8186  * def __isub__(self, rhs):
8187  */
8188  __Pyx_XDECREF(__pyx_r);
8189  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8190  __Pyx_GOTREF(__pyx_t_1);
8191  __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)
8192  __Pyx_GOTREF(__pyx_t_2);
8193  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8194  __pyx_r = __pyx_t_2;
8195  __pyx_t_2 = 0;
8196  goto __pyx_L0;
8197 
8198  /* "PyClical.pyx":759
8199  * return self.wrap( self.unwrap() + toClifford(rhs) )
8200  *
8201  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8202  * """
8203  * Geometric difference.
8204  */
8205 
8206  /* function exit code */
8207  __pyx_L1_error:;
8208  __Pyx_XDECREF(__pyx_t_1);
8209  __Pyx_XDECREF(__pyx_t_2);
8210  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8211  __pyx_r = NULL;
8212  __pyx_L0:;
8213  __Pyx_XGIVEREF(__pyx_r);
8214  __Pyx_RefNannyFinishContext();
8215  return __pyx_r;
8216  }
8217 
8218  /* "PyClical.pyx":770
8219  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8220  *
8221  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8222  * """
8223  * Geometric difference.
8224  */
8225 
8226  /* Python wrapper */
8227  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8228  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 ";
8229  #if CYTHON_COMPILING_IN_CPYTHON
8230  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8231  #endif
8232  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8233  PyObject *__pyx_r = 0;
8234  __Pyx_RefNannyDeclarations
8235  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8236  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8237 
8238  /* function exit code */
8239  __Pyx_RefNannyFinishContext();
8240  return __pyx_r;
8241  }
8242 
8243  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8244  PyObject *__pyx_r = NULL;
8245  __Pyx_RefNannyDeclarations
8246  PyObject *__pyx_t_1 = NULL;
8247  __Pyx_RefNannySetupContext("__isub__", 0);
8248 
8249  /* "PyClical.pyx":777
8250  * 1-{2}
8251  * """
8252  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8253  *
8254  * def __mul__(lhs, rhs):
8255  */
8256  __Pyx_XDECREF(__pyx_r);
8257  __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)
8258  __Pyx_GOTREF(__pyx_t_1);
8259  __pyx_r = __pyx_t_1;
8260  __pyx_t_1 = 0;
8261  goto __pyx_L0;
8262 
8263  /* "PyClical.pyx":770
8264  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8265  *
8266  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8267  * """
8268  * Geometric difference.
8269  */
8270 
8271  /* function exit code */
8272  __pyx_L1_error:;
8273  __Pyx_XDECREF(__pyx_t_1);
8274  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8275  __pyx_r = NULL;
8276  __pyx_L0:;
8277  __Pyx_XGIVEREF(__pyx_r);
8278  __Pyx_RefNannyFinishContext();
8279  return __pyx_r;
8280  }
8281 
8282  /* "PyClical.pyx":779
8283  * return self.wrap( self.unwrap() - toClifford(rhs) )
8284  *
8285  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8286  * """
8287  * Geometric product.
8288  */
8289 
8290  /* Python wrapper */
8291  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8292  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 ";
8293  #if CYTHON_COMPILING_IN_CPYTHON
8294  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8295  #endif
8296  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8297  PyObject *__pyx_r = 0;
8298  __Pyx_RefNannyDeclarations
8299  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8300  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8301 
8302  /* function exit code */
8303  __Pyx_RefNannyFinishContext();
8304  return __pyx_r;
8305  }
8306 
8307  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8308  PyObject *__pyx_r = NULL;
8309  __Pyx_RefNannyDeclarations
8310  PyObject *__pyx_t_1 = NULL;
8311  PyObject *__pyx_t_2 = NULL;
8312  __Pyx_RefNannySetupContext("__mul__", 0);
8313 
8314  /* "PyClical.pyx":790
8315  * {2}
8316  * """
8317  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8318  *
8319  * def __imul__(self, rhs):
8320  */
8321  __Pyx_XDECREF(__pyx_r);
8322  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8323  __Pyx_GOTREF(__pyx_t_1);
8324  __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)
8325  __Pyx_GOTREF(__pyx_t_2);
8326  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8327  __pyx_r = __pyx_t_2;
8328  __pyx_t_2 = 0;
8329  goto __pyx_L0;
8330 
8331  /* "PyClical.pyx":779
8332  * return self.wrap( self.unwrap() - toClifford(rhs) )
8333  *
8334  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8335  * """
8336  * Geometric product.
8337  */
8338 
8339  /* function exit code */
8340  __pyx_L1_error:;
8341  __Pyx_XDECREF(__pyx_t_1);
8342  __Pyx_XDECREF(__pyx_t_2);
8343  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8344  __pyx_r = NULL;
8345  __pyx_L0:;
8346  __Pyx_XGIVEREF(__pyx_r);
8347  __Pyx_RefNannyFinishContext();
8348  return __pyx_r;
8349  }
8350 
8351  /* "PyClical.pyx":792
8352  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8353  *
8354  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8355  * """
8356  * Geometric product.
8357  */
8358 
8359  /* Python wrapper */
8360  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8361  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 ";
8362  #if CYTHON_COMPILING_IN_CPYTHON
8363  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8364  #endif
8365  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8366  PyObject *__pyx_r = 0;
8367  __Pyx_RefNannyDeclarations
8368  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8369  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8370 
8371  /* function exit code */
8372  __Pyx_RefNannyFinishContext();
8373  return __pyx_r;
8374  }
8375 
8376  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8377  PyObject *__pyx_r = NULL;
8378  __Pyx_RefNannyDeclarations
8379  PyObject *__pyx_t_1 = NULL;
8380  __Pyx_RefNannySetupContext("__imul__", 0);
8381 
8382  /* "PyClical.pyx":803
8383  * {2}
8384  * """
8385  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8386  *
8387  * def __mod__(lhs, rhs):
8388  */
8389  __Pyx_XDECREF(__pyx_r);
8390  __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)
8391  __Pyx_GOTREF(__pyx_t_1);
8392  __pyx_r = __pyx_t_1;
8393  __pyx_t_1 = 0;
8394  goto __pyx_L0;
8395 
8396  /* "PyClical.pyx":792
8397  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8398  *
8399  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8400  * """
8401  * Geometric product.
8402  */
8403 
8404  /* function exit code */
8405  __pyx_L1_error:;
8406  __Pyx_XDECREF(__pyx_t_1);
8407  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8408  __pyx_r = NULL;
8409  __pyx_L0:;
8410  __Pyx_XGIVEREF(__pyx_r);
8411  __Pyx_RefNannyFinishContext();
8412  return __pyx_r;
8413  }
8414 
8415  /* "PyClical.pyx":805
8416  * return self.wrap( self.unwrap() * toClifford(rhs) )
8417  *
8418  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8419  * """
8420  * Contraction.
8421  */
8422 
8423  /* Python wrapper */
8424  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8425  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 ";
8426  #if CYTHON_COMPILING_IN_CPYTHON
8427  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8428  #endif
8429  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8430  PyObject *__pyx_r = 0;
8431  __Pyx_RefNannyDeclarations
8432  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8433  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8434 
8435  /* function exit code */
8436  __Pyx_RefNannyFinishContext();
8437  return __pyx_r;
8438  }
8439 
8440  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8441  PyObject *__pyx_r = NULL;
8442  __Pyx_RefNannyDeclarations
8443  PyObject *__pyx_t_1 = NULL;
8444  PyObject *__pyx_t_2 = NULL;
8445  __Pyx_RefNannySetupContext("__mod__", 0);
8446 
8447  /* "PyClical.pyx":818
8448  * {2}
8449  * """
8450  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8451  *
8452  * def __imod__(self, rhs):
8453  */
8454  __Pyx_XDECREF(__pyx_r);
8455  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8456  __Pyx_GOTREF(__pyx_t_1);
8457  __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)
8458  __Pyx_GOTREF(__pyx_t_2);
8459  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8460  __pyx_r = __pyx_t_2;
8461  __pyx_t_2 = 0;
8462  goto __pyx_L0;
8463 
8464  /* "PyClical.pyx":805
8465  * return self.wrap( self.unwrap() * toClifford(rhs) )
8466  *
8467  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8468  * """
8469  * Contraction.
8470  */
8471 
8472  /* function exit code */
8473  __pyx_L1_error:;
8474  __Pyx_XDECREF(__pyx_t_1);
8475  __Pyx_XDECREF(__pyx_t_2);
8476  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8477  __pyx_r = NULL;
8478  __pyx_L0:;
8479  __Pyx_XGIVEREF(__pyx_r);
8480  __Pyx_RefNannyFinishContext();
8481  return __pyx_r;
8482  }
8483 
8484  /* "PyClical.pyx":820
8485  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8486  *
8487  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8488  * """
8489  * Contraction.
8490  */
8491 
8492  /* Python wrapper */
8493  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8494  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 ";
8495  #if CYTHON_COMPILING_IN_CPYTHON
8496  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8497  #endif
8498  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8499  PyObject *__pyx_r = 0;
8500  __Pyx_RefNannyDeclarations
8501  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8502  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8503 
8504  /* function exit code */
8505  __Pyx_RefNannyFinishContext();
8506  return __pyx_r;
8507  }
8508 
8509  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8510  PyObject *__pyx_r = NULL;
8511  __Pyx_RefNannyDeclarations
8512  PyObject *__pyx_t_1 = NULL;
8513  __Pyx_RefNannySetupContext("__imod__", 0);
8514 
8515  /* "PyClical.pyx":833
8516  * {2}
8517  * """
8518  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8519  *
8520  * def __and__(lhs, rhs):
8521  */
8522  __Pyx_XDECREF(__pyx_r);
8523  __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)
8524  __Pyx_GOTREF(__pyx_t_1);
8525  __pyx_r = __pyx_t_1;
8526  __pyx_t_1 = 0;
8527  goto __pyx_L0;
8528 
8529  /* "PyClical.pyx":820
8530  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8531  *
8532  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8533  * """
8534  * Contraction.
8535  */
8536 
8537  /* function exit code */
8538  __pyx_L1_error:;
8539  __Pyx_XDECREF(__pyx_t_1);
8540  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8541  __pyx_r = NULL;
8542  __pyx_L0:;
8543  __Pyx_XGIVEREF(__pyx_r);
8544  __Pyx_RefNannyFinishContext();
8545  return __pyx_r;
8546  }
8547 
8548  /* "PyClical.pyx":835
8549  * return self.wrap( self.unwrap() % toClifford(rhs) )
8550  *
8551  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8552  * """
8553  * Inner product.
8554  */
8555 
8556  /* Python wrapper */
8557  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8558  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 ";
8559  #if CYTHON_COMPILING_IN_CPYTHON
8560  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8561  #endif
8562  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8563  PyObject *__pyx_r = 0;
8564  __Pyx_RefNannyDeclarations
8565  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8566  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8567 
8568  /* function exit code */
8569  __Pyx_RefNannyFinishContext();
8570  return __pyx_r;
8571  }
8572 
8573  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8574  PyObject *__pyx_r = NULL;
8575  __Pyx_RefNannyDeclarations
8576  PyObject *__pyx_t_1 = NULL;
8577  PyObject *__pyx_t_2 = NULL;
8578  __Pyx_RefNannySetupContext("__and__", 0);
8579 
8580  /* "PyClical.pyx":848
8581  * {2}
8582  * """
8583  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8584  *
8585  * def __iand__(self, rhs):
8586  */
8587  __Pyx_XDECREF(__pyx_r);
8588  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8589  __Pyx_GOTREF(__pyx_t_1);
8590  __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)
8591  __Pyx_GOTREF(__pyx_t_2);
8592  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8593  __pyx_r = __pyx_t_2;
8594  __pyx_t_2 = 0;
8595  goto __pyx_L0;
8596 
8597  /* "PyClical.pyx":835
8598  * return self.wrap( self.unwrap() % toClifford(rhs) )
8599  *
8600  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8601  * """
8602  * Inner product.
8603  */
8604 
8605  /* function exit code */
8606  __pyx_L1_error:;
8607  __Pyx_XDECREF(__pyx_t_1);
8608  __Pyx_XDECREF(__pyx_t_2);
8609  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8610  __pyx_r = NULL;
8611  __pyx_L0:;
8612  __Pyx_XGIVEREF(__pyx_r);
8613  __Pyx_RefNannyFinishContext();
8614  return __pyx_r;
8615  }
8616 
8617  /* "PyClical.pyx":850
8618  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8619  *
8620  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8621  * """
8622  * Inner product.
8623  */
8624 
8625  /* Python wrapper */
8626  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8627  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 ";
8628  #if CYTHON_COMPILING_IN_CPYTHON
8629  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8630  #endif
8631  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8632  PyObject *__pyx_r = 0;
8633  __Pyx_RefNannyDeclarations
8634  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8635  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8636 
8637  /* function exit code */
8638  __Pyx_RefNannyFinishContext();
8639  return __pyx_r;
8640  }
8641 
8642  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8643  PyObject *__pyx_r = NULL;
8644  __Pyx_RefNannyDeclarations
8645  PyObject *__pyx_t_1 = NULL;
8646  __Pyx_RefNannySetupContext("__iand__", 0);
8647 
8648  /* "PyClical.pyx":863
8649  * {2}
8650  * """
8651  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8652  *
8653  * def __xor__(lhs, rhs):
8654  */
8655  __Pyx_XDECREF(__pyx_r);
8656  __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)
8657  __Pyx_GOTREF(__pyx_t_1);
8658  __pyx_r = __pyx_t_1;
8659  __pyx_t_1 = 0;
8660  goto __pyx_L0;
8661 
8662  /* "PyClical.pyx":850
8663  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8664  *
8665  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8666  * """
8667  * Inner product.
8668  */
8669 
8670  /* function exit code */
8671  __pyx_L1_error:;
8672  __Pyx_XDECREF(__pyx_t_1);
8673  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8674  __pyx_r = NULL;
8675  __pyx_L0:;
8676  __Pyx_XGIVEREF(__pyx_r);
8677  __Pyx_RefNannyFinishContext();
8678  return __pyx_r;
8679  }
8680 
8681  /* "PyClical.pyx":865
8682  * return self.wrap( self.unwrap() & toClifford(rhs) )
8683  *
8684  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8685  * """
8686  * Outer product.
8687  */
8688 
8689  /* Python wrapper */
8690  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8691  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 ";
8692  #if CYTHON_COMPILING_IN_CPYTHON
8693  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8694  #endif
8695  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8696  PyObject *__pyx_r = 0;
8697  __Pyx_RefNannyDeclarations
8698  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8699  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8700 
8701  /* function exit code */
8702  __Pyx_RefNannyFinishContext();
8703  return __pyx_r;
8704  }
8705 
8706  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8707  PyObject *__pyx_r = NULL;
8708  __Pyx_RefNannyDeclarations
8709  PyObject *__pyx_t_1 = NULL;
8710  PyObject *__pyx_t_2 = NULL;
8711  __Pyx_RefNannySetupContext("__xor__", 0);
8712 
8713  /* "PyClical.pyx":878
8714  * 0
8715  * """
8716  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8717  *
8718  * def __ixor__(self, rhs):
8719  */
8720  __Pyx_XDECREF(__pyx_r);
8721  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8722  __Pyx_GOTREF(__pyx_t_1);
8723  __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)
8724  __Pyx_GOTREF(__pyx_t_2);
8725  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8726  __pyx_r = __pyx_t_2;
8727  __pyx_t_2 = 0;
8728  goto __pyx_L0;
8729 
8730  /* "PyClical.pyx":865
8731  * return self.wrap( self.unwrap() & toClifford(rhs) )
8732  *
8733  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8734  * """
8735  * Outer product.
8736  */
8737 
8738  /* function exit code */
8739  __pyx_L1_error:;
8740  __Pyx_XDECREF(__pyx_t_1);
8741  __Pyx_XDECREF(__pyx_t_2);
8742  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8743  __pyx_r = NULL;
8744  __pyx_L0:;
8745  __Pyx_XGIVEREF(__pyx_r);
8746  __Pyx_RefNannyFinishContext();
8747  return __pyx_r;
8748  }
8749 
8750  /* "PyClical.pyx":880
8751  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8752  *
8753  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8754  * """
8755  * Outer product.
8756  */
8757 
8758  /* Python wrapper */
8759  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8760  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 ";
8761  #if CYTHON_COMPILING_IN_CPYTHON
8762  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8763  #endif
8764  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8765  PyObject *__pyx_r = 0;
8766  __Pyx_RefNannyDeclarations
8767  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8768  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8769 
8770  /* function exit code */
8771  __Pyx_RefNannyFinishContext();
8772  return __pyx_r;
8773  }
8774 
8775  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8776  PyObject *__pyx_r = NULL;
8777  __Pyx_RefNannyDeclarations
8778  PyObject *__pyx_t_1 = NULL;
8779  __Pyx_RefNannySetupContext("__ixor__", 0);
8780 
8781  /* "PyClical.pyx":893
8782  * 0
8783  * """
8784  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8785  *
8786  * def __div__(lhs, rhs):
8787  */
8788  __Pyx_XDECREF(__pyx_r);
8789  __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)
8790  __Pyx_GOTREF(__pyx_t_1);
8791  __pyx_r = __pyx_t_1;
8792  __pyx_t_1 = 0;
8793  goto __pyx_L0;
8794 
8795  /* "PyClical.pyx":880
8796  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8797  *
8798  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8799  * """
8800  * Outer product.
8801  */
8802 
8803  /* function exit code */
8804  __pyx_L1_error:;
8805  __Pyx_XDECREF(__pyx_t_1);
8806  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8807  __pyx_r = NULL;
8808  __pyx_L0:;
8809  __Pyx_XGIVEREF(__pyx_r);
8810  __Pyx_RefNannyFinishContext();
8811  return __pyx_r;
8812  }
8813 
8814  /* "PyClical.pyx":895
8815  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8816  *
8817  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8818  * """
8819  * Geometric quotient.
8820  */
8821 
8822  /* Python wrapper */
8823  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8824  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8825  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 ";
8826  #if CYTHON_COMPILING_IN_CPYTHON
8827  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8828  #endif
8829  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8830  PyObject *__pyx_r = 0;
8831  __Pyx_RefNannyDeclarations
8832  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8833  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8834 
8835  /* function exit code */
8836  __Pyx_RefNannyFinishContext();
8837  return __pyx_r;
8838  }
8839  #endif
8841  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8842  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8843  PyObject *__pyx_r = NULL;
8844  __Pyx_RefNannyDeclarations
8845  PyObject *__pyx_t_1 = NULL;
8846  PyObject *__pyx_t_2 = NULL;
8847  __Pyx_RefNannySetupContext("__div__", 0);
8848 
8849  /* "PyClical.pyx":908
8850  * -{2}
8851  * """
8852  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8853  *
8854  * def __idiv__(self, rhs):
8855  */
8856  __Pyx_XDECREF(__pyx_r);
8857  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8858  __Pyx_GOTREF(__pyx_t_1);
8859  __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)
8860  __Pyx_GOTREF(__pyx_t_2);
8861  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8862  __pyx_r = __pyx_t_2;
8863  __pyx_t_2 = 0;
8864  goto __pyx_L0;
8865 
8866  /* "PyClical.pyx":895
8867  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8868  *
8869  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8870  * """
8871  * Geometric quotient.
8872  */
8873 
8874  /* function exit code */
8875  __pyx_L1_error:;
8876  __Pyx_XDECREF(__pyx_t_1);
8877  __Pyx_XDECREF(__pyx_t_2);
8878  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8879  __pyx_r = NULL;
8880  __pyx_L0:;
8881  __Pyx_XGIVEREF(__pyx_r);
8882  __Pyx_RefNannyFinishContext();
8883  return __pyx_r;
8884  }
8885  #endif
8887  /* "PyClical.pyx":910
8888  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8889  *
8890  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8891  * """
8892  * Geometric quotient.
8893  */
8894 
8895  /* Python wrapper */
8896  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8897  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8898  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 ";
8899  #if CYTHON_COMPILING_IN_CPYTHON
8900  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8901  #endif
8902  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8903  PyObject *__pyx_r = 0;
8904  __Pyx_RefNannyDeclarations
8905  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8906  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8907 
8908  /* function exit code */
8909  __Pyx_RefNannyFinishContext();
8910  return __pyx_r;
8911  }
8912  #endif
8914  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8915  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8916  PyObject *__pyx_r = NULL;
8917  __Pyx_RefNannyDeclarations
8918  PyObject *__pyx_t_1 = NULL;
8919  __Pyx_RefNannySetupContext("__idiv__", 0);
8920 
8921  /* "PyClical.pyx":923
8922  * -{2}
8923  * """
8924  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8925  *
8926  * def inv(self):
8927  */
8928  __Pyx_XDECREF(__pyx_r);
8929  __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)
8930  __Pyx_GOTREF(__pyx_t_1);
8931  __pyx_r = __pyx_t_1;
8932  __pyx_t_1 = 0;
8933  goto __pyx_L0;
8934 
8935  /* "PyClical.pyx":910
8936  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8937  *
8938  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8939  * """
8940  * Geometric quotient.
8941  */
8942 
8943  /* function exit code */
8944  __pyx_L1_error:;
8945  __Pyx_XDECREF(__pyx_t_1);
8946  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8947  __pyx_r = NULL;
8948  __pyx_L0:;
8949  __Pyx_XGIVEREF(__pyx_r);
8950  __Pyx_RefNannyFinishContext();
8951  return __pyx_r;
8952  }
8953  #endif
8955  /* "PyClical.pyx":925
8956  * return self.wrap( self.unwrap() / toClifford(rhs) )
8957  *
8958  * def inv(self): # <<<<<<<<<<<<<<
8959  * """
8960  * Geometric multiplicative inverse.
8961  */
8962 
8963  /* Python wrapper */
8964  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8965  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 ";
8966  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8967  PyObject *__pyx_r = 0;
8968  __Pyx_RefNannyDeclarations
8969  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
8970  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8971 
8972  /* function exit code */
8973  __Pyx_RefNannyFinishContext();
8974  return __pyx_r;
8975  }
8976 
8977  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8978  PyObject *__pyx_r = NULL;
8979  __Pyx_RefNannyDeclarations
8980  PyObject *__pyx_t_1 = NULL;
8981  PyObject *__pyx_t_2 = NULL;
8982  __Pyx_RefNannySetupContext("inv", 0);
8983 
8984  /* "PyClical.pyx":936
8985  * -{1,2}
8986  * """
8987  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
8988  *
8989  * def __or__(lhs, rhs):
8990  */
8991  __Pyx_XDECREF(__pyx_r);
8992  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
8993  __Pyx_GOTREF(__pyx_t_1);
8994  __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)
8995  __Pyx_GOTREF(__pyx_t_2);
8996  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8997  __pyx_r = __pyx_t_2;
8998  __pyx_t_2 = 0;
8999  goto __pyx_L0;
9000 
9001  /* "PyClical.pyx":925
9002  * return self.wrap( self.unwrap() / toClifford(rhs) )
9003  *
9004  * def inv(self): # <<<<<<<<<<<<<<
9005  * """
9006  * Geometric multiplicative inverse.
9007  */
9008 
9009  /* function exit code */
9010  __pyx_L1_error:;
9011  __Pyx_XDECREF(__pyx_t_1);
9012  __Pyx_XDECREF(__pyx_t_2);
9013  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9014  __pyx_r = NULL;
9015  __pyx_L0:;
9016  __Pyx_XGIVEREF(__pyx_r);
9017  __Pyx_RefNannyFinishContext();
9018  return __pyx_r;
9019  }
9020 
9021  /* "PyClical.pyx":938
9022  * return clifford().wrap( self.instance.inv() )
9023  *
9024  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9025  * """
9026  * Transform left hand side, using right hand side as a transformation.
9027  */
9028 
9029  /* Python wrapper */
9030  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9031  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 ";
9032  #if CYTHON_COMPILING_IN_CPYTHON
9033  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9034  #endif
9035  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9036  PyObject *__pyx_r = 0;
9037  __Pyx_RefNannyDeclarations
9038  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9039  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9040 
9041  /* function exit code */
9042  __Pyx_RefNannyFinishContext();
9043  return __pyx_r;
9044  }
9045 
9046  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9047  PyObject *__pyx_r = NULL;
9048  __Pyx_RefNannyDeclarations
9049  PyObject *__pyx_t_1 = NULL;
9050  PyObject *__pyx_t_2 = NULL;
9051  __Pyx_RefNannySetupContext("__or__", 0);
9052 
9053  /* "PyClical.pyx":947
9054  * -{1}
9055  * """
9056  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9057  *
9058  * def __ior__(self, rhs):
9059  */
9060  __Pyx_XDECREF(__pyx_r);
9061  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9062  __Pyx_GOTREF(__pyx_t_1);
9063  __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)
9064  __Pyx_GOTREF(__pyx_t_2);
9065  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9066  __pyx_r = __pyx_t_2;
9067  __pyx_t_2 = 0;
9068  goto __pyx_L0;
9069 
9070  /* "PyClical.pyx":938
9071  * return clifford().wrap( self.instance.inv() )
9072  *
9073  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9074  * """
9075  * Transform left hand side, using right hand side as a transformation.
9076  */
9077 
9078  /* function exit code */
9079  __pyx_L1_error:;
9080  __Pyx_XDECREF(__pyx_t_1);
9081  __Pyx_XDECREF(__pyx_t_2);
9082  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9083  __pyx_r = NULL;
9084  __pyx_L0:;
9085  __Pyx_XGIVEREF(__pyx_r);
9086  __Pyx_RefNannyFinishContext();
9087  return __pyx_r;
9088  }
9089 
9090  /* "PyClical.pyx":949
9091  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9092  *
9093  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9094  * """
9095  * Transform left hand side, using right hand side as a transformation.
9096  */
9097 
9098  /* Python wrapper */
9099  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9100  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 ";
9101  #if CYTHON_COMPILING_IN_CPYTHON
9102  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9103  #endif
9104  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9105  PyObject *__pyx_r = 0;
9106  __Pyx_RefNannyDeclarations
9107  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9108  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9109 
9110  /* function exit code */
9111  __Pyx_RefNannyFinishContext();
9112  return __pyx_r;
9113  }
9114 
9115  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9116  PyObject *__pyx_r = NULL;
9117  __Pyx_RefNannyDeclarations
9118  PyObject *__pyx_t_1 = NULL;
9119  __Pyx_RefNannySetupContext("__ior__", 0);
9120 
9121  /* "PyClical.pyx":958
9122  * -{1}
9123  * """
9124  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9125  *
9126  * def __pow__(self, m, dummy):
9127  */
9128  __Pyx_XDECREF(__pyx_r);
9129  __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)
9130  __Pyx_GOTREF(__pyx_t_1);
9131  __pyx_r = __pyx_t_1;
9132  __pyx_t_1 = 0;
9133  goto __pyx_L0;
9134 
9135  /* "PyClical.pyx":949
9136  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9137  *
9138  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9139  * """
9140  * Transform left hand side, using right hand side as a transformation.
9141  */
9142 
9143  /* function exit code */
9144  __pyx_L1_error:;
9145  __Pyx_XDECREF(__pyx_t_1);
9146  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9147  __pyx_r = NULL;
9148  __pyx_L0:;
9149  __Pyx_XGIVEREF(__pyx_r);
9150  __Pyx_RefNannyFinishContext();
9151  return __pyx_r;
9152  }
9153 
9154  /* "PyClical.pyx":960
9155  * return self.wrap( self.unwrap() | toClifford(rhs) )
9156  *
9157  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9158  * """
9159  * Power: self to the m.
9160  */
9161 
9162  /* Python wrapper */
9163  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9164  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 ";
9165  #if CYTHON_COMPILING_IN_CPYTHON
9166  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9167  #endif
9168  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9169  PyObject *__pyx_r = 0;
9170  __Pyx_RefNannyDeclarations
9171  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9172  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9173 
9174  /* function exit code */
9175  __Pyx_RefNannyFinishContext();
9176  return __pyx_r;
9177  }
9178 
9179  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9180  PyObject *__pyx_r = NULL;
9181  __Pyx_RefNannyDeclarations
9182  PyObject *__pyx_t_1 = NULL;
9183  __Pyx_RefNannySetupContext("__pow__", 0);
9184 
9185  /* "PyClical.pyx":977
9186  * 1
9187  * """
9188  * return pow(self, m) # <<<<<<<<<<<<<<
9189  *
9190  * def pow(self, m):
9191  */
9192  __Pyx_XDECREF(__pyx_r);
9193  __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)
9194  __Pyx_GOTREF(__pyx_t_1);
9195  __pyx_r = __pyx_t_1;
9196  __pyx_t_1 = 0;
9197  goto __pyx_L0;
9198 
9199  /* "PyClical.pyx":960
9200  * return self.wrap( self.unwrap() | toClifford(rhs) )
9201  *
9202  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9203  * """
9204  * Power: self to the m.
9205  */
9206 
9207  /* function exit code */
9208  __pyx_L1_error:;
9209  __Pyx_XDECREF(__pyx_t_1);
9210  __Pyx_AddTraceback("PyClical.clifford.__pow__", __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":979
9219  * return pow(self, m)
9220  *
9221  * def pow(self, m): # <<<<<<<<<<<<<<
9222  * """
9223  * Power: self to the m.
9224  */
9225 
9226  /* Python wrapper */
9227  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9228  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 ";
9229  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9230  PyObject *__pyx_r = 0;
9231  __Pyx_RefNannyDeclarations
9232  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9233  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9234 
9235  /* function exit code */
9236  __Pyx_RefNannyFinishContext();
9237  return __pyx_r;
9238  }
9239 
9240  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9241  PyObject *__pyx_r = NULL;
9242  __Pyx_RefNannyDeclarations
9243  PyObject *__pyx_t_1 = NULL;
9244  PyObject *__pyx_t_2 = NULL;
9245  int __pyx_t_3;
9246  int __pyx_t_4;
9247  int __pyx_t_5;
9248  __Pyx_RefNannySetupContext("pow", 0);
9249 
9250  /* "PyClical.pyx":998
9251  * 1
9252  * """
9253  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9254  * return clifford().wrap( self.instance.pow(m) )
9255  * else:
9256  */
9257  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9258  __Pyx_GOTREF(__pyx_t_1);
9259  __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)
9260  __Pyx_GOTREF(__pyx_t_2);
9261  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9262  __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)
9263  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9264  __pyx_t_4 = (__pyx_t_3 != 0);
9265  if (__pyx_t_4) {
9266 
9267  /* "PyClical.pyx":999
9268  * """
9269  * if isinstance(m, numbers.Integral):
9270  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9271  * else:
9272  * return exp(m * log(self))
9273  */
9274  __Pyx_XDECREF(__pyx_r);
9275  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9276  __Pyx_GOTREF(__pyx_t_2);
9277  __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)
9278  __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)
9279  __Pyx_GOTREF(__pyx_t_1);
9280  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9281  __pyx_r = __pyx_t_1;
9282  __pyx_t_1 = 0;
9283  goto __pyx_L0;
9284 
9285  /* "PyClical.pyx":998
9286  * 1
9287  * """
9288  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9289  * return clifford().wrap( self.instance.pow(m) )
9290  * else:
9291  */
9292  }
9293 
9294  /* "PyClical.pyx":1001
9295  * return clifford().wrap( self.instance.pow(m) )
9296  * else:
9297  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9298  *
9299  * def outer_pow(self, m):
9300  */
9301  /*else*/ {
9302  __Pyx_XDECREF(__pyx_r);
9303  __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)
9304  __Pyx_GOTREF(__pyx_t_1);
9305  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9306  __Pyx_GOTREF(__pyx_t_2);
9307  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9308  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9309  __Pyx_GOTREF(__pyx_t_1);
9310  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9311  __pyx_r = __pyx_t_1;
9312  __pyx_t_1 = 0;
9313  goto __pyx_L0;
9314  }
9315 
9316  /* "PyClical.pyx":979
9317  * return pow(self, m)
9318  *
9319  * def pow(self, m): # <<<<<<<<<<<<<<
9320  * """
9321  * Power: self to the m.
9322  */
9323 
9324  /* function exit code */
9325  __pyx_L1_error:;
9326  __Pyx_XDECREF(__pyx_t_1);
9327  __Pyx_XDECREF(__pyx_t_2);
9328  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9329  __pyx_r = NULL;
9330  __pyx_L0:;
9331  __Pyx_XGIVEREF(__pyx_r);
9332  __Pyx_RefNannyFinishContext();
9333  return __pyx_r;
9334  }
9335 
9336  /* "PyClical.pyx":1003
9337  * return exp(m * log(self))
9338  *
9339  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9340  * """
9341  * Outer product power.
9342  */
9343 
9344  /* Python wrapper */
9345  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9346  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 ";
9347  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9348  PyObject *__pyx_r = 0;
9349  __Pyx_RefNannyDeclarations
9350  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9351  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9352 
9353  /* function exit code */
9354  __Pyx_RefNannyFinishContext();
9355  return __pyx_r;
9356  }
9357 
9358  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9359  PyObject *__pyx_r = NULL;
9360  __Pyx_RefNannyDeclarations
9361  PyObject *__pyx_t_1 = NULL;
9362  int __pyx_t_2;
9363  PyObject *__pyx_t_3 = NULL;
9364  __Pyx_RefNannySetupContext("outer_pow", 0);
9365 
9366  /* "PyClical.pyx":1017
9367  *
9368  * """
9369  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9370  *
9371  * def __call__(self, grade):
9372  */
9373  __Pyx_XDECREF(__pyx_r);
9374  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9375  __Pyx_GOTREF(__pyx_t_1);
9376  __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)
9377  __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)
9378  __Pyx_GOTREF(__pyx_t_3);
9379  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9380  __pyx_r = __pyx_t_3;
9381  __pyx_t_3 = 0;
9382  goto __pyx_L0;
9383 
9384  /* "PyClical.pyx":1003
9385  * return exp(m * log(self))
9386  *
9387  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9388  * """
9389  * Outer product power.
9390  */
9391 
9392  /* function exit code */
9393  __pyx_L1_error:;
9394  __Pyx_XDECREF(__pyx_t_1);
9395  __Pyx_XDECREF(__pyx_t_3);
9396  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9397  __pyx_r = NULL;
9398  __pyx_L0:;
9399  __Pyx_XGIVEREF(__pyx_r);
9400  __Pyx_RefNannyFinishContext();
9401  return __pyx_r;
9402  }
9403 
9404  /* "PyClical.pyx":1019
9405  * return clifford().wrap( self.instance.outer_pow(m) )
9406  *
9407  * def __call__(self, grade): # <<<<<<<<<<<<<<
9408  * """
9409  * Pure grade-vector part.
9410  */
9411 
9412  /* Python wrapper */
9413  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9414  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 ";
9415  #if CYTHON_COMPILING_IN_CPYTHON
9416  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9417  #endif
9418  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9419  PyObject *__pyx_v_grade = 0;
9420  PyObject *__pyx_r = 0;
9421  __Pyx_RefNannyDeclarations
9422  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9423  {
9424  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9425  PyObject* values[1] = {0};
9426  if (unlikely(__pyx_kwds)) {
9427  Py_ssize_t kw_args;
9428  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9429  switch (pos_args) {
9430  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9431  CYTHON_FALLTHROUGH;
9432  case 0: break;
9433  default: goto __pyx_L5_argtuple_error;
9434  }
9435  kw_args = PyDict_Size(__pyx_kwds);
9436  switch (pos_args) {
9437  case 0:
9438  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9439  else goto __pyx_L5_argtuple_error;
9440  }
9441  if (unlikely(kw_args > 0)) {
9442  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9443  }
9444  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9445  goto __pyx_L5_argtuple_error;
9446  } else {
9447  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9448  }
9449  __pyx_v_grade = values[0];
9450  }
9451  goto __pyx_L4_argument_unpacking_done;
9452  __pyx_L5_argtuple_error:;
9453  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9454  __pyx_L3_error:;
9455  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9456  __Pyx_RefNannyFinishContext();
9457  return NULL;
9458  __pyx_L4_argument_unpacking_done:;
9459  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9460 
9461  /* function exit code */
9462  __Pyx_RefNannyFinishContext();
9463  return __pyx_r;
9464  }
9465 
9466  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9467  PyObject *__pyx_r = NULL;
9468  __Pyx_RefNannyDeclarations
9469  PyObject *__pyx_t_1 = NULL;
9470  int __pyx_t_2;
9471  PyObject *__pyx_t_3 = NULL;
9472  __Pyx_RefNannySetupContext("__call__", 0);
9473 
9474  /* "PyClical.pyx":1036
9475  * 0
9476  * """
9477  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9478  *
9479  * def scalar(self):
9480  */
9481  __Pyx_XDECREF(__pyx_r);
9482  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9483  __Pyx_GOTREF(__pyx_t_1);
9484  __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)
9485  __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)
9486  __Pyx_GOTREF(__pyx_t_3);
9487  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9488  __pyx_r = __pyx_t_3;
9489  __pyx_t_3 = 0;
9490  goto __pyx_L0;
9491 
9492  /* "PyClical.pyx":1019
9493  * return clifford().wrap( self.instance.outer_pow(m) )
9494  *
9495  * def __call__(self, grade): # <<<<<<<<<<<<<<
9496  * """
9497  * Pure grade-vector part.
9498  */
9499 
9500  /* function exit code */
9501  __pyx_L1_error:;
9502  __Pyx_XDECREF(__pyx_t_1);
9503  __Pyx_XDECREF(__pyx_t_3);
9504  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9505  __pyx_r = NULL;
9506  __pyx_L0:;
9507  __Pyx_XGIVEREF(__pyx_r);
9508  __Pyx_RefNannyFinishContext();
9509  return __pyx_r;
9510  }
9511 
9512  /* "PyClical.pyx":1038
9513  * return clifford().wrap( self.instance.call(grade) )
9514  *
9515  * def scalar(self): # <<<<<<<<<<<<<<
9516  * """
9517  * Scalar part.
9518  */
9519 
9520  /* Python wrapper */
9521  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9522  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 ";
9523  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9524  PyObject *__pyx_r = 0;
9525  __Pyx_RefNannyDeclarations
9526  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9527  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9528 
9529  /* function exit code */
9530  __Pyx_RefNannyFinishContext();
9531  return __pyx_r;
9532  }
9533 
9534  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9535  PyObject *__pyx_r = NULL;
9536  __Pyx_RefNannyDeclarations
9537  PyObject *__pyx_t_1 = NULL;
9538  __Pyx_RefNannySetupContext("scalar", 0);
9539 
9540  /* "PyClical.pyx":1047
9541  * 0.0
9542  * """
9543  * return self.instance.scalar() # <<<<<<<<<<<<<<
9544  *
9545  * def pure(self):
9546  */
9547  __Pyx_XDECREF(__pyx_r);
9548  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9549  __Pyx_GOTREF(__pyx_t_1);
9550  __pyx_r = __pyx_t_1;
9551  __pyx_t_1 = 0;
9552  goto __pyx_L0;
9553 
9554  /* "PyClical.pyx":1038
9555  * return clifford().wrap( self.instance.call(grade) )
9556  *
9557  * def scalar(self): # <<<<<<<<<<<<<<
9558  * """
9559  * Scalar part.
9560  */
9561 
9562  /* function exit code */
9563  __pyx_L1_error:;
9564  __Pyx_XDECREF(__pyx_t_1);
9565  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9566  __pyx_r = NULL;
9567  __pyx_L0:;
9568  __Pyx_XGIVEREF(__pyx_r);
9569  __Pyx_RefNannyFinishContext();
9570  return __pyx_r;
9571  }
9572 
9573  /* "PyClical.pyx":1049
9574  * return self.instance.scalar()
9575  *
9576  * def pure(self): # <<<<<<<<<<<<<<
9577  * """
9578  * Pure part.
9579  */
9580 
9581  /* Python wrapper */
9582  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9583  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 ";
9584  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9585  PyObject *__pyx_r = 0;
9586  __Pyx_RefNannyDeclarations
9587  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9588  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9589 
9590  /* function exit code */
9591  __Pyx_RefNannyFinishContext();
9592  return __pyx_r;
9593  }
9594 
9595  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9596  PyObject *__pyx_r = NULL;
9597  __Pyx_RefNannyDeclarations
9598  PyObject *__pyx_t_1 = NULL;
9599  PyObject *__pyx_t_2 = NULL;
9600  __Pyx_RefNannySetupContext("pure", 0);
9601 
9602  /* "PyClical.pyx":1058
9603  * {1,2}
9604  * """
9605  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9606  *
9607  * def even(self):
9608  */
9609  __Pyx_XDECREF(__pyx_r);
9610  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9611  __Pyx_GOTREF(__pyx_t_1);
9612  __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)
9613  __Pyx_GOTREF(__pyx_t_2);
9614  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9615  __pyx_r = __pyx_t_2;
9616  __pyx_t_2 = 0;
9617  goto __pyx_L0;
9618 
9619  /* "PyClical.pyx":1049
9620  * return self.instance.scalar()
9621  *
9622  * def pure(self): # <<<<<<<<<<<<<<
9623  * """
9624  * Pure part.
9625  */
9626 
9627  /* function exit code */
9628  __pyx_L1_error:;
9629  __Pyx_XDECREF(__pyx_t_1);
9630  __Pyx_XDECREF(__pyx_t_2);
9631  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9632  __pyx_r = NULL;
9633  __pyx_L0:;
9634  __Pyx_XGIVEREF(__pyx_r);
9635  __Pyx_RefNannyFinishContext();
9636  return __pyx_r;
9637  }
9638 
9639  /* "PyClical.pyx":1060
9640  * return clifford().wrap( self.instance.pure() )
9641  *
9642  * def even(self): # <<<<<<<<<<<<<<
9643  * """
9644  * Even part of multivector, sum of even grade terms.
9645  */
9646 
9647  /* Python wrapper */
9648  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9649  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 ";
9650  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9651  PyObject *__pyx_r = 0;
9652  __Pyx_RefNannyDeclarations
9653  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9654  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9655 
9656  /* function exit code */
9657  __Pyx_RefNannyFinishContext();
9658  return __pyx_r;
9659  }
9660 
9661  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9662  PyObject *__pyx_r = NULL;
9663  __Pyx_RefNannyDeclarations
9664  PyObject *__pyx_t_1 = NULL;
9665  PyObject *__pyx_t_2 = NULL;
9666  __Pyx_RefNannySetupContext("even", 0);
9667 
9668  /* "PyClical.pyx":1067
9669  * 1+{1,2}
9670  * """
9671  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9672  *
9673  * def odd(self):
9674  */
9675  __Pyx_XDECREF(__pyx_r);
9676  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9677  __Pyx_GOTREF(__pyx_t_1);
9678  __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)
9679  __Pyx_GOTREF(__pyx_t_2);
9680  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9681  __pyx_r = __pyx_t_2;
9682  __pyx_t_2 = 0;
9683  goto __pyx_L0;
9684 
9685  /* "PyClical.pyx":1060
9686  * return clifford().wrap( self.instance.pure() )
9687  *
9688  * def even(self): # <<<<<<<<<<<<<<
9689  * """
9690  * Even part of multivector, sum of even grade terms.
9691  */
9692 
9693  /* function exit code */
9694  __pyx_L1_error:;
9695  __Pyx_XDECREF(__pyx_t_1);
9696  __Pyx_XDECREF(__pyx_t_2);
9697  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9698  __pyx_r = NULL;
9699  __pyx_L0:;
9700  __Pyx_XGIVEREF(__pyx_r);
9701  __Pyx_RefNannyFinishContext();
9702  return __pyx_r;
9703  }
9704 
9705  /* "PyClical.pyx":1069
9706  * return clifford().wrap( self.instance.even() )
9707  *
9708  * def odd(self): # <<<<<<<<<<<<<<
9709  * """
9710  * Odd part of multivector, sum of odd grade terms.
9711  */
9712 
9713  /* Python wrapper */
9714  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9715  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 ";
9716  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9717  PyObject *__pyx_r = 0;
9718  __Pyx_RefNannyDeclarations
9719  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9720  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9721 
9722  /* function exit code */
9723  __Pyx_RefNannyFinishContext();
9724  return __pyx_r;
9725  }
9726 
9727  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9728  PyObject *__pyx_r = NULL;
9729  __Pyx_RefNannyDeclarations
9730  PyObject *__pyx_t_1 = NULL;
9731  PyObject *__pyx_t_2 = NULL;
9732  __Pyx_RefNannySetupContext("odd", 0);
9733 
9734  /* "PyClical.pyx":1076
9735  * {1}
9736  * """
9737  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9738  *
9739  * def vector_part(self, frm = None):
9740  */
9741  __Pyx_XDECREF(__pyx_r);
9742  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9743  __Pyx_GOTREF(__pyx_t_1);
9744  __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)
9745  __Pyx_GOTREF(__pyx_t_2);
9746  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9747  __pyx_r = __pyx_t_2;
9748  __pyx_t_2 = 0;
9749  goto __pyx_L0;
9750 
9751  /* "PyClical.pyx":1069
9752  * return clifford().wrap( self.instance.even() )
9753  *
9754  * def odd(self): # <<<<<<<<<<<<<<
9755  * """
9756  * Odd part of multivector, sum of odd grade terms.
9757  */
9758 
9759  /* function exit code */
9760  __pyx_L1_error:;
9761  __Pyx_XDECREF(__pyx_t_1);
9762  __Pyx_XDECREF(__pyx_t_2);
9763  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9764  __pyx_r = NULL;
9765  __pyx_L0:;
9766  __Pyx_XGIVEREF(__pyx_r);
9767  __Pyx_RefNannyFinishContext();
9768  return __pyx_r;
9769  }
9770 
9771  /* "PyClical.pyx":1078
9772  * return clifford().wrap( self.instance.odd() )
9773  *
9774  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9775  * """
9776  * Vector part of multivector, as a Python list, with respect to frm.
9777  */
9778 
9779  /* Python wrapper */
9780  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9781  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 ";
9782  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9783  PyObject *__pyx_v_frm = 0;
9784  PyObject *__pyx_r = 0;
9785  __Pyx_RefNannyDeclarations
9786  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9787  {
9788  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9789  PyObject* values[1] = {0};
9790  values[0] = ((PyObject *)Py_None);
9791  if (unlikely(__pyx_kwds)) {
9792  Py_ssize_t kw_args;
9793  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9794  switch (pos_args) {
9795  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9796  CYTHON_FALLTHROUGH;
9797  case 0: break;
9798  default: goto __pyx_L5_argtuple_error;
9799  }
9800  kw_args = PyDict_Size(__pyx_kwds);
9801  switch (pos_args) {
9802  case 0:
9803  if (kw_args > 0) {
9804  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9805  if (value) { values[0] = value; kw_args--; }
9806  }
9807  }
9808  if (unlikely(kw_args > 0)) {
9809  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9810  }
9811  } else {
9812  switch (PyTuple_GET_SIZE(__pyx_args)) {
9813  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9814  CYTHON_FALLTHROUGH;
9815  case 0: break;
9816  default: goto __pyx_L5_argtuple_error;
9817  }
9818  }
9819  __pyx_v_frm = values[0];
9820  }
9821  goto __pyx_L4_argument_unpacking_done;
9822  __pyx_L5_argtuple_error:;
9823  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9824  __pyx_L3_error:;
9825  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9826  __Pyx_RefNannyFinishContext();
9827  return NULL;
9828  __pyx_L4_argument_unpacking_done:;
9829  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9830 
9831  /* function exit code */
9832  __Pyx_RefNannyFinishContext();
9833  return __pyx_r;
9834  }
9835 
9836  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9837  PyObject *__pyx_v_error_msg_prefix = NULL;
9838  std::vector<scalar_t> __pyx_v_vec;
9839  int __pyx_v_n;
9840  int __pyx_v_i;
9841  PyObject *__pyx_v_lst = NULL;
9842  PyObject *__pyx_v_err = NULL;
9843  PyObject *__pyx_r = NULL;
9844  __Pyx_RefNannyDeclarations
9845  PyObject *__pyx_t_1 = NULL;
9846  PyObject *__pyx_t_2 = NULL;
9847  PyObject *__pyx_t_3 = NULL;
9848  int __pyx_t_4;
9849  int __pyx_t_5;
9850  std::vector<scalar_t> __pyx_t_6;
9851  PyObject *__pyx_t_7 = NULL;
9852  int __pyx_t_8;
9853  int __pyx_t_9;
9854  int __pyx_t_10;
9855  PyObject *__pyx_t_11 = NULL;
9856  PyObject *__pyx_t_12 = NULL;
9857  PyObject *__pyx_t_13 = NULL;
9858  PyObject *__pyx_t_14 = NULL;
9859  PyObject *__pyx_t_15 = NULL;
9860  __Pyx_RefNannySetupContext("vector_part", 0);
9861 
9862  /* "PyClical.pyx":1087
9863  * [0.0, 2.0, 3.0]
9864  * """
9865  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9866  * cdef vector[scalar_t] vec
9867  * cdef int n
9868  */
9869  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9870  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9871 
9872  /* "PyClical.pyx":1091
9873  * cdef int n
9874  * cdef int i
9875  * try: # <<<<<<<<<<<<<<
9876  * if frm is None:
9877  * vec = self.instance.vector_part()
9878  */
9879  {
9880  __Pyx_PyThreadState_declare
9881  __Pyx_PyThreadState_assign
9882  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9883  __Pyx_XGOTREF(__pyx_t_1);
9884  __Pyx_XGOTREF(__pyx_t_2);
9885  __Pyx_XGOTREF(__pyx_t_3);
9886  /*try:*/ {
9887 
9888  /* "PyClical.pyx":1092
9889  * cdef int i
9890  * try:
9891  * if frm is None: # <<<<<<<<<<<<<<
9892  * vec = self.instance.vector_part()
9893  * else:
9894  */
9895  __pyx_t_4 = (__pyx_v_frm == Py_None);
9896  __pyx_t_5 = (__pyx_t_4 != 0);
9897  if (__pyx_t_5) {
9898 
9899  /* "PyClical.pyx":1093
9900  * try:
9901  * if frm is None:
9902  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9903  * else:
9904  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9905  */
9906  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9907  __pyx_v_vec = __pyx_t_6;
9908 
9909  /* "PyClical.pyx":1092
9910  * cdef int i
9911  * try:
9912  * if frm is None: # <<<<<<<<<<<<<<
9913  * vec = self.instance.vector_part()
9914  * else:
9915  */
9916  goto __pyx_L9;
9917  }
9918 
9919  /* "PyClical.pyx":1095
9920  * vec = self.instance.vector_part()
9921  * else:
9922  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9923  * n = vec.size()
9924  * lst = [0.0]*n
9925  */
9926  /*else*/ {
9927  try {
9928  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9929  } catch(...) {
9930  __Pyx_CppExn2PyErr();
9931  __PYX_ERR(0, 1095, __pyx_L3_error)
9932  }
9933  __pyx_v_vec = __pyx_t_6;
9934  }
9935  __pyx_L9:;
9936 
9937  /* "PyClical.pyx":1096
9938  * else:
9939  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9940  * n = vec.size() # <<<<<<<<<<<<<<
9941  * lst = [0.0]*n
9942  * for i in xrange(n):
9943  */
9944  __pyx_v_n = __pyx_v_vec.size();
9945 
9946  /* "PyClical.pyx":1097
9947  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9948  * n = vec.size()
9949  * lst = [0.0]*n # <<<<<<<<<<<<<<
9950  * for i in xrange(n):
9951  * lst[i] = vec[i]
9952  */
9953  __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)
9954  __Pyx_GOTREF(__pyx_t_7);
9955  { Py_ssize_t __pyx_temp;
9956  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
9957  __Pyx_INCREF(__pyx_float_0_0);
9958  __Pyx_GIVEREF(__pyx_float_0_0);
9959  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
9960  }
9961  }
9962  __pyx_v_lst = ((PyObject*)__pyx_t_7);
9963  __pyx_t_7 = 0;
9964 
9965  /* "PyClical.pyx":1098
9966  * n = vec.size()
9967  * lst = [0.0]*n
9968  * for i in xrange(n): # <<<<<<<<<<<<<<
9969  * lst[i] = vec[i]
9970  * return lst
9971  */
9972  __pyx_t_8 = __pyx_v_n;
9973  __pyx_t_9 = __pyx_t_8;
9974  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
9975  __pyx_v_i = __pyx_t_10;
9976 
9977  /* "PyClical.pyx":1099
9978  * lst = [0.0]*n
9979  * for i in xrange(n):
9980  * lst[i] = vec[i] # <<<<<<<<<<<<<<
9981  * return lst
9982  * except RuntimeError as err:
9983  */
9984  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
9985  __Pyx_GOTREF(__pyx_t_7);
9986  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)
9987  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9988  }
9989 
9990  /* "PyClical.pyx":1100
9991  * for i in xrange(n):
9992  * lst[i] = vec[i]
9993  * return lst # <<<<<<<<<<<<<<
9994  * except RuntimeError as err:
9995  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
9996  */
9997  __Pyx_XDECREF(__pyx_r);
9998  __Pyx_INCREF(__pyx_v_lst);
9999  __pyx_r = __pyx_v_lst;
10000  goto __pyx_L7_try_return;
10001 
10002  /* "PyClical.pyx":1091
10003  * cdef int n
10004  * cdef int i
10005  * try: # <<<<<<<<<<<<<<
10006  * if frm is None:
10007  * vec = self.instance.vector_part()
10008  */
10009  }
10010  __pyx_L3_error:;
10011  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10012 
10013  /* "PyClical.pyx":1101
10014  * lst[i] = vec[i]
10015  * return lst
10016  * except RuntimeError as err: # <<<<<<<<<<<<<<
10017  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10018  * + repr(frm) + " as frame:\n\t"
10019  */
10020  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10021  if (__pyx_t_8) {
10022  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10023  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10024  __Pyx_GOTREF(__pyx_t_7);
10025  __Pyx_GOTREF(__pyx_t_11);
10026  __Pyx_GOTREF(__pyx_t_12);
10027  __Pyx_INCREF(__pyx_t_11);
10028  __pyx_v_err = __pyx_t_11;
10029 
10030  /* "PyClical.pyx":1102
10031  * return lst
10032  * except RuntimeError as err:
10033  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10034  * + repr(frm) + " as frame:\n\t"
10035  * + str(err))
10036  */
10037  __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10038  __Pyx_GOTREF(__pyx_t_13);
10039  __pyx_t_14 = PyNumber_Add(__pyx_v_error_msg_prefix, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10040  __Pyx_GOTREF(__pyx_t_14);
10041  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10042  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_using_invalid); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10043  __Pyx_GOTREF(__pyx_t_13);
10044  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10045 
10046  /* "PyClical.pyx":1103
10047  * except RuntimeError as err:
10048  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10049  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10050  * + str(err))
10051  *
10052  */
10053  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10054  __Pyx_GOTREF(__pyx_t_14);
10055  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10056  __Pyx_GOTREF(__pyx_t_15);
10057  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10058  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10059  __pyx_t_14 = PyNumber_Add(__pyx_t_15, __pyx_kp_s_as_frame); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10060  __Pyx_GOTREF(__pyx_t_14);
10061  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10062 
10063  /* "PyClical.pyx":1104
10064  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10065  * + repr(frm) + " as frame:\n\t"
10066  * + str(err)) # <<<<<<<<<<<<<<
10067  *
10068  * def involute(self):
10069  */
10070  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_err); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10071  __Pyx_GOTREF(__pyx_t_15);
10072  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10073  __Pyx_GOTREF(__pyx_t_13);
10074  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10075  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10076 
10077  /* "PyClical.pyx":1102
10078  * return lst
10079  * except RuntimeError as err:
10080  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10081  * + repr(frm) + " as frame:\n\t"
10082  * + str(err))
10083  */
10084  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1102, __pyx_L5_except_error)
10085  __Pyx_GOTREF(__pyx_t_15);
10086  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10087  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10088  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10089  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10090  }
10091  goto __pyx_L5_except_error;
10092  __pyx_L5_except_error:;
10093 
10094  /* "PyClical.pyx":1091
10095  * cdef int n
10096  * cdef int i
10097  * try: # <<<<<<<<<<<<<<
10098  * if frm is None:
10099  * vec = self.instance.vector_part()
10100  */
10101  __Pyx_XGIVEREF(__pyx_t_1);
10102  __Pyx_XGIVEREF(__pyx_t_2);
10103  __Pyx_XGIVEREF(__pyx_t_3);
10104  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10105  goto __pyx_L1_error;
10106  __pyx_L7_try_return:;
10107  __Pyx_XGIVEREF(__pyx_t_1);
10108  __Pyx_XGIVEREF(__pyx_t_2);
10109  __Pyx_XGIVEREF(__pyx_t_3);
10110  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10111  goto __pyx_L0;
10112  }
10113 
10114  /* "PyClical.pyx":1078
10115  * return clifford().wrap( self.instance.odd() )
10116  *
10117  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10118  * """
10119  * Vector part of multivector, as a Python list, with respect to frm.
10120  */
10121 
10122  /* function exit code */
10123  __pyx_L1_error:;
10124  __Pyx_XDECREF(__pyx_t_7);
10125  __Pyx_XDECREF(__pyx_t_11);
10126  __Pyx_XDECREF(__pyx_t_12);
10127  __Pyx_XDECREF(__pyx_t_13);
10128  __Pyx_XDECREF(__pyx_t_14);
10129  __Pyx_XDECREF(__pyx_t_15);
10130  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10131  __pyx_r = NULL;
10132  __pyx_L0:;
10133  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10134  __Pyx_XDECREF(__pyx_v_lst);
10135  __Pyx_XDECREF(__pyx_v_err);
10136  __Pyx_XGIVEREF(__pyx_r);
10137  __Pyx_RefNannyFinishContext();
10138  return __pyx_r;
10139  }
10140 
10141  /* "PyClical.pyx":1106
10142  * + str(err))
10143  *
10144  * def involute(self): # <<<<<<<<<<<<<<
10145  * """
10146  * Main involution, each {i} is replaced by -{i} in each term,
10147  */
10148 
10149  /* Python wrapper */
10150  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10151  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 ";
10152  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10153  PyObject *__pyx_r = 0;
10154  __Pyx_RefNannyDeclarations
10155  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10156  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10157 
10158  /* function exit code */
10159  __Pyx_RefNannyFinishContext();
10160  return __pyx_r;
10161  }
10162 
10163  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10164  PyObject *__pyx_r = NULL;
10165  __Pyx_RefNannyDeclarations
10166  PyObject *__pyx_t_1 = NULL;
10167  PyObject *__pyx_t_2 = NULL;
10168  __Pyx_RefNannySetupContext("involute", 0);
10169 
10170  /* "PyClical.pyx":1120
10171  * 1-{1}+{1,2}
10172  * """
10173  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10174  *
10175  * def reverse(self):
10176  */
10177  __Pyx_XDECREF(__pyx_r);
10178  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10179  __Pyx_GOTREF(__pyx_t_1);
10180  __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)
10181  __Pyx_GOTREF(__pyx_t_2);
10182  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10183  __pyx_r = __pyx_t_2;
10184  __pyx_t_2 = 0;
10185  goto __pyx_L0;
10186 
10187  /* "PyClical.pyx":1106
10188  * + str(err))
10189  *
10190  * def involute(self): # <<<<<<<<<<<<<<
10191  * """
10192  * Main involution, each {i} is replaced by -{i} in each term,
10193  */
10194 
10195  /* function exit code */
10196  __pyx_L1_error:;
10197  __Pyx_XDECREF(__pyx_t_1);
10198  __Pyx_XDECREF(__pyx_t_2);
10199  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10200  __pyx_r = NULL;
10201  __pyx_L0:;
10202  __Pyx_XGIVEREF(__pyx_r);
10203  __Pyx_RefNannyFinishContext();
10204  return __pyx_r;
10205  }
10206 
10207  /* "PyClical.pyx":1122
10208  * return clifford().wrap( self.instance.involute() )
10209  *
10210  * def reverse(self): # <<<<<<<<<<<<<<
10211  * """
10212  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10213  */
10214 
10215  /* Python wrapper */
10216  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10217  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 ";
10218  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10219  PyObject *__pyx_r = 0;
10220  __Pyx_RefNannyDeclarations
10221  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10222  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10223 
10224  /* function exit code */
10225  __Pyx_RefNannyFinishContext();
10226  return __pyx_r;
10227  }
10228 
10229  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10230  PyObject *__pyx_r = NULL;
10231  __Pyx_RefNannyDeclarations
10232  PyObject *__pyx_t_1 = NULL;
10233  PyObject *__pyx_t_2 = NULL;
10234  __Pyx_RefNannySetupContext("reverse", 0);
10235 
10236  /* "PyClical.pyx":1135
10237  * 1+{1}-{1,2}
10238  * """
10239  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10240  *
10241  * def conj(self):
10242  */
10243  __Pyx_XDECREF(__pyx_r);
10244  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10245  __Pyx_GOTREF(__pyx_t_1);
10246  __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)
10247  __Pyx_GOTREF(__pyx_t_2);
10248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10249  __pyx_r = __pyx_t_2;
10250  __pyx_t_2 = 0;
10251  goto __pyx_L0;
10252 
10253  /* "PyClical.pyx":1122
10254  * return clifford().wrap( self.instance.involute() )
10255  *
10256  * def reverse(self): # <<<<<<<<<<<<<<
10257  * """
10258  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10259  */
10260 
10261  /* function exit code */
10262  __pyx_L1_error:;
10263  __Pyx_XDECREF(__pyx_t_1);
10264  __Pyx_XDECREF(__pyx_t_2);
10265  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10266  __pyx_r = NULL;
10267  __pyx_L0:;
10268  __Pyx_XGIVEREF(__pyx_r);
10269  __Pyx_RefNannyFinishContext();
10270  return __pyx_r;
10271  }
10272 
10273  /* "PyClical.pyx":1137
10274  * return clifford().wrap( self.instance.reverse() )
10275  *
10276  * def conj(self): # <<<<<<<<<<<<<<
10277  * """
10278  * Conjugation, reverse o involute == involute o reverse.
10279  */
10280 
10281  /* Python wrapper */
10282  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10283  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 ";
10284  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10285  PyObject *__pyx_r = 0;
10286  __Pyx_RefNannyDeclarations
10287  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10288  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10289 
10290  /* function exit code */
10291  __Pyx_RefNannyFinishContext();
10292  return __pyx_r;
10293  }
10294 
10295  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10296  PyObject *__pyx_r = NULL;
10297  __Pyx_RefNannyDeclarations
10298  PyObject *__pyx_t_1 = NULL;
10299  PyObject *__pyx_t_2 = NULL;
10300  __Pyx_RefNannySetupContext("conj", 0);
10301 
10302  /* "PyClical.pyx":1150
10303  * 1-{1}-{1,2}
10304  * """
10305  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10306  *
10307  * def quad(self):
10308  */
10309  __Pyx_XDECREF(__pyx_r);
10310  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10311  __Pyx_GOTREF(__pyx_t_1);
10312  __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)
10313  __Pyx_GOTREF(__pyx_t_2);
10314  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10315  __pyx_r = __pyx_t_2;
10316  __pyx_t_2 = 0;
10317  goto __pyx_L0;
10318 
10319  /* "PyClical.pyx":1137
10320  * return clifford().wrap( self.instance.reverse() )
10321  *
10322  * def conj(self): # <<<<<<<<<<<<<<
10323  * """
10324  * Conjugation, reverse o involute == involute o reverse.
10325  */
10326 
10327  /* function exit code */
10328  __pyx_L1_error:;
10329  __Pyx_XDECREF(__pyx_t_1);
10330  __Pyx_XDECREF(__pyx_t_2);
10331  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10332  __pyx_r = NULL;
10333  __pyx_L0:;
10334  __Pyx_XGIVEREF(__pyx_r);
10335  __Pyx_RefNannyFinishContext();
10336  return __pyx_r;
10337  }
10338 
10339  /* "PyClical.pyx":1152
10340  * return clifford().wrap( self.instance.conj() )
10341  *
10342  * def quad(self): # <<<<<<<<<<<<<<
10343  * """
10344  * Quadratic form == (rev(x)*x)(0).
10345  */
10346 
10347  /* Python wrapper */
10348  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10349  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 ";
10350  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10351  PyObject *__pyx_r = 0;
10352  __Pyx_RefNannyDeclarations
10353  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10354  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10355 
10356  /* function exit code */
10357  __Pyx_RefNannyFinishContext();
10358  return __pyx_r;
10359  }
10360 
10361  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10362  PyObject *__pyx_r = NULL;
10363  __Pyx_RefNannyDeclarations
10364  PyObject *__pyx_t_1 = NULL;
10365  __Pyx_RefNannySetupContext("quad", 0);
10366 
10367  /* "PyClical.pyx":1161
10368  * 2.0
10369  * """
10370  * return self.instance.quad() # <<<<<<<<<<<<<<
10371  *
10372  * def norm(self):
10373  */
10374  __Pyx_XDECREF(__pyx_r);
10375  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10376  __Pyx_GOTREF(__pyx_t_1);
10377  __pyx_r = __pyx_t_1;
10378  __pyx_t_1 = 0;
10379  goto __pyx_L0;
10380 
10381  /* "PyClical.pyx":1152
10382  * return clifford().wrap( self.instance.conj() )
10383  *
10384  * def quad(self): # <<<<<<<<<<<<<<
10385  * """
10386  * Quadratic form == (rev(x)*x)(0).
10387  */
10388 
10389  /* function exit code */
10390  __pyx_L1_error:;
10391  __Pyx_XDECREF(__pyx_t_1);
10392  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10393  __pyx_r = NULL;
10394  __pyx_L0:;
10395  __Pyx_XGIVEREF(__pyx_r);
10396  __Pyx_RefNannyFinishContext();
10397  return __pyx_r;
10398  }
10399 
10400  /* "PyClical.pyx":1163
10401  * return self.instance.quad()
10402  *
10403  * def norm(self): # <<<<<<<<<<<<<<
10404  * """
10405  * Norm == sum of squares of coordinates.
10406  */
10407 
10408  /* Python wrapper */
10409  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10410  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 ";
10411  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10412  PyObject *__pyx_r = 0;
10413  __Pyx_RefNannyDeclarations
10414  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10415  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10416 
10417  /* function exit code */
10418  __Pyx_RefNannyFinishContext();
10419  return __pyx_r;
10420  }
10421 
10422  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10423  PyObject *__pyx_r = NULL;
10424  __Pyx_RefNannyDeclarations
10425  PyObject *__pyx_t_1 = NULL;
10426  __Pyx_RefNannySetupContext("norm", 0);
10427 
10428  /* "PyClical.pyx":1172
10429  * 4.0
10430  * """
10431  * return self.instance.norm() # <<<<<<<<<<<<<<
10432  *
10433  * def abs(self):
10434  */
10435  __Pyx_XDECREF(__pyx_r);
10436  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10437  __Pyx_GOTREF(__pyx_t_1);
10438  __pyx_r = __pyx_t_1;
10439  __pyx_t_1 = 0;
10440  goto __pyx_L0;
10441 
10442  /* "PyClical.pyx":1163
10443  * return self.instance.quad()
10444  *
10445  * def norm(self): # <<<<<<<<<<<<<<
10446  * """
10447  * Norm == sum of squares of coordinates.
10448  */
10449 
10450  /* function exit code */
10451  __pyx_L1_error:;
10452  __Pyx_XDECREF(__pyx_t_1);
10453  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10454  __pyx_r = NULL;
10455  __pyx_L0:;
10456  __Pyx_XGIVEREF(__pyx_r);
10457  __Pyx_RefNannyFinishContext();
10458  return __pyx_r;
10459  }
10460 
10461  /* "PyClical.pyx":1174
10462  * return self.instance.norm()
10463  *
10464  * def abs(self): # <<<<<<<<<<<<<<
10465  * """
10466  * Absolute value: square root of norm.
10467  */
10468 
10469  /* Python wrapper */
10470  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10471  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 ";
10472  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10473  PyObject *__pyx_r = 0;
10474  __Pyx_RefNannyDeclarations
10475  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10476  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10477 
10478  /* function exit code */
10479  __Pyx_RefNannyFinishContext();
10480  return __pyx_r;
10481  }
10482 
10483  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10484  PyObject *__pyx_r = NULL;
10485  __Pyx_RefNannyDeclarations
10486  PyObject *__pyx_t_1 = NULL;
10487  __Pyx_RefNannySetupContext("abs", 0);
10488 
10489  /* "PyClical.pyx":1181
10490  * 2.0
10491  * """
10492  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10493  *
10494  * def max_abs(self):
10495  */
10496  __Pyx_XDECREF(__pyx_r);
10497  __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)
10498  __Pyx_GOTREF(__pyx_t_1);
10499  __pyx_r = __pyx_t_1;
10500  __pyx_t_1 = 0;
10501  goto __pyx_L0;
10502 
10503  /* "PyClical.pyx":1174
10504  * return self.instance.norm()
10505  *
10506  * def abs(self): # <<<<<<<<<<<<<<
10507  * """
10508  * Absolute value: square root of norm.
10509  */
10510 
10511  /* function exit code */
10512  __pyx_L1_error:;
10513  __Pyx_XDECREF(__pyx_t_1);
10514  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10515  __pyx_r = NULL;
10516  __pyx_L0:;
10517  __Pyx_XGIVEREF(__pyx_r);
10518  __Pyx_RefNannyFinishContext();
10519  return __pyx_r;
10520  }
10521 
10522  /* "PyClical.pyx":1183
10523  * return glucat.abs( self.unwrap() )
10524  *
10525  * def max_abs(self): # <<<<<<<<<<<<<<
10526  * """
10527  * Maximum of absolute values of components of multivector: multivector infinity norm.
10528  */
10529 
10530  /* Python wrapper */
10531  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10532  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 ";
10533  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10534  PyObject *__pyx_r = 0;
10535  __Pyx_RefNannyDeclarations
10536  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10537  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10538 
10539  /* function exit code */
10540  __Pyx_RefNannyFinishContext();
10541  return __pyx_r;
10542  }
10543 
10544  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10545  PyObject *__pyx_r = NULL;
10546  __Pyx_RefNannyDeclarations
10547  PyObject *__pyx_t_1 = NULL;
10548  __Pyx_RefNannySetupContext("max_abs", 0);
10549 
10550  /* "PyClical.pyx":1192
10551  * 3.0
10552  * """
10553  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10554  *
10555  * def truncated(self, limit):
10556  */
10557  __Pyx_XDECREF(__pyx_r);
10558  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10559  __Pyx_GOTREF(__pyx_t_1);
10560  __pyx_r = __pyx_t_1;
10561  __pyx_t_1 = 0;
10562  goto __pyx_L0;
10563 
10564  /* "PyClical.pyx":1183
10565  * return glucat.abs( self.unwrap() )
10566  *
10567  * def max_abs(self): # <<<<<<<<<<<<<<
10568  * """
10569  * Maximum of absolute values of components of multivector: multivector infinity norm.
10570  */
10571 
10572  /* function exit code */
10573  __pyx_L1_error:;
10574  __Pyx_XDECREF(__pyx_t_1);
10575  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10576  __pyx_r = NULL;
10577  __pyx_L0:;
10578  __Pyx_XGIVEREF(__pyx_r);
10579  __Pyx_RefNannyFinishContext();
10580  return __pyx_r;
10581  }
10582 
10583  /* "PyClical.pyx":1194
10584  * return self.instance.max_abs()
10585  *
10586  * def truncated(self, limit): # <<<<<<<<<<<<<<
10587  * """
10588  * Remove all terms of self with relative size smaller than limit.
10589  */
10590 
10591  /* Python wrapper */
10592  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10593  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 ";
10594  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10595  PyObject *__pyx_r = 0;
10596  __Pyx_RefNannyDeclarations
10597  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10598  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10599 
10600  /* function exit code */
10601  __Pyx_RefNannyFinishContext();
10602  return __pyx_r;
10603  }
10604 
10605  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10606  PyObject *__pyx_r = NULL;
10607  __Pyx_RefNannyDeclarations
10608  PyObject *__pyx_t_1 = NULL;
10609  scalar_t __pyx_t_2;
10610  PyObject *__pyx_t_3 = NULL;
10611  __Pyx_RefNannySetupContext("truncated", 0);
10612 
10613  /* "PyClical.pyx":1203
10614  * clifford("10000+{1}")
10615  * """
10616  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10617  *
10618  * def isnan(self):
10619  */
10620  __Pyx_XDECREF(__pyx_r);
10621  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10622  __Pyx_GOTREF(__pyx_t_1);
10623  __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)
10624  __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)
10625  __Pyx_GOTREF(__pyx_t_3);
10626  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10627  __pyx_r = __pyx_t_3;
10628  __pyx_t_3 = 0;
10629  goto __pyx_L0;
10630 
10631  /* "PyClical.pyx":1194
10632  * return self.instance.max_abs()
10633  *
10634  * def truncated(self, limit): # <<<<<<<<<<<<<<
10635  * """
10636  * Remove all terms of self with relative size smaller than limit.
10637  */
10638 
10639  /* function exit code */
10640  __pyx_L1_error:;
10641  __Pyx_XDECREF(__pyx_t_1);
10642  __Pyx_XDECREF(__pyx_t_3);
10643  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10644  __pyx_r = NULL;
10645  __pyx_L0:;
10646  __Pyx_XGIVEREF(__pyx_r);
10647  __Pyx_RefNannyFinishContext();
10648  return __pyx_r;
10649  }
10650 
10651  /* "PyClical.pyx":1205
10652  * return clifford().wrap( self.instance.truncated(limit) )
10653  *
10654  * def isnan(self): # <<<<<<<<<<<<<<
10655  * """
10656  * Check if a multivector contains any IEEE NaN values.
10657  */
10658 
10659  /* Python wrapper */
10660  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10661  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10662  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10663  PyObject *__pyx_r = 0;
10664  __Pyx_RefNannyDeclarations
10665  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10666  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10667 
10668  /* function exit code */
10669  __Pyx_RefNannyFinishContext();
10670  return __pyx_r;
10671  }
10672 
10673  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10674  PyObject *__pyx_r = NULL;
10675  __Pyx_RefNannyDeclarations
10676  PyObject *__pyx_t_1 = NULL;
10677  __Pyx_RefNannySetupContext("isnan", 0);
10678 
10679  /* "PyClical.pyx":1212
10680  * False
10681  * """
10682  * return self.instance.isnan() # <<<<<<<<<<<<<<
10683  *
10684  * def frame(self):
10685  */
10686  __Pyx_XDECREF(__pyx_r);
10687  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10688  __Pyx_GOTREF(__pyx_t_1);
10689  __pyx_r = __pyx_t_1;
10690  __pyx_t_1 = 0;
10691  goto __pyx_L0;
10692 
10693  /* "PyClical.pyx":1205
10694  * return clifford().wrap( self.instance.truncated(limit) )
10695  *
10696  * def isnan(self): # <<<<<<<<<<<<<<
10697  * """
10698  * Check if a multivector contains any IEEE NaN values.
10699  */
10700 
10701  /* function exit code */
10702  __pyx_L1_error:;
10703  __Pyx_XDECREF(__pyx_t_1);
10704  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10705  __pyx_r = NULL;
10706  __pyx_L0:;
10707  __Pyx_XGIVEREF(__pyx_r);
10708  __Pyx_RefNannyFinishContext();
10709  return __pyx_r;
10710  }
10711 
10712  /* "PyClical.pyx":1214
10713  * return self.instance.isnan()
10714  *
10715  * def frame(self): # <<<<<<<<<<<<<<
10716  * """
10717  * Subalgebra generated by all generators of terms of given multivector.
10718  */
10719 
10720  /* Python wrapper */
10721  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10722  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 ";
10723  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10724  PyObject *__pyx_r = 0;
10725  __Pyx_RefNannyDeclarations
10726  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10727  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10728 
10729  /* function exit code */
10730  __Pyx_RefNannyFinishContext();
10731  return __pyx_r;
10732  }
10733 
10734  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10735  PyObject *__pyx_r = NULL;
10736  __Pyx_RefNannyDeclarations
10737  PyObject *__pyx_t_1 = NULL;
10738  PyObject *__pyx_t_2 = NULL;
10739  __Pyx_RefNannySetupContext("frame", 0);
10740 
10741  /* "PyClical.pyx":1223
10742  * <type 'PyClical.index_set'>
10743  * """
10744  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10745  *
10746  * def __repr__(self):
10747  */
10748  __Pyx_XDECREF(__pyx_r);
10749  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10750  __Pyx_GOTREF(__pyx_t_1);
10751  __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)
10752  __Pyx_GOTREF(__pyx_t_2);
10753  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10754  __pyx_r = __pyx_t_2;
10755  __pyx_t_2 = 0;
10756  goto __pyx_L0;
10757 
10758  /* "PyClical.pyx":1214
10759  * return self.instance.isnan()
10760  *
10761  * def frame(self): # <<<<<<<<<<<<<<
10762  * """
10763  * Subalgebra generated by all generators of terms of given multivector.
10764  */
10765 
10766  /* function exit code */
10767  __pyx_L1_error:;
10768  __Pyx_XDECREF(__pyx_t_1);
10769  __Pyx_XDECREF(__pyx_t_2);
10770  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10771  __pyx_r = NULL;
10772  __pyx_L0:;
10773  __Pyx_XGIVEREF(__pyx_r);
10774  __Pyx_RefNannyFinishContext();
10775  return __pyx_r;
10776  }
10777 
10778  /* "PyClical.pyx":1225
10779  * return index_set().wrap( self.instance.frame() )
10780  *
10781  * def __repr__(self): # <<<<<<<<<<<<<<
10782  * """
10783  * The official string representation of self.
10784  */
10785 
10786  /* Python wrapper */
10787  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10788  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 ";
10789  #if CYTHON_COMPILING_IN_CPYTHON
10790  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10791  #endif
10792  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10793  PyObject *__pyx_r = 0;
10794  __Pyx_RefNannyDeclarations
10795  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10796  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10797 
10798  /* function exit code */
10799  __Pyx_RefNannyFinishContext();
10800  return __pyx_r;
10801  }
10802 
10803  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10804  PyObject *__pyx_r = NULL;
10805  __Pyx_RefNannyDeclarations
10806  PyObject *__pyx_t_1 = NULL;
10807  __Pyx_RefNannySetupContext("__repr__", 0);
10808 
10809  /* "PyClical.pyx":1232
10810  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10811  * """
10812  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10813  *
10814  * def __str__(self):
10815  */
10816  __Pyx_XDECREF(__pyx_r);
10817  __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)
10818  __Pyx_GOTREF(__pyx_t_1);
10819  __pyx_r = __pyx_t_1;
10820  __pyx_t_1 = 0;
10821  goto __pyx_L0;
10822 
10823  /* "PyClical.pyx":1225
10824  * return index_set().wrap( self.instance.frame() )
10825  *
10826  * def __repr__(self): # <<<<<<<<<<<<<<
10827  * """
10828  * The official string representation of self.
10829  */
10830 
10831  /* function exit code */
10832  __pyx_L1_error:;
10833  __Pyx_XDECREF(__pyx_t_1);
10834  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10835  __pyx_r = NULL;
10836  __pyx_L0:;
10837  __Pyx_XGIVEREF(__pyx_r);
10838  __Pyx_RefNannyFinishContext();
10839  return __pyx_r;
10840  }
10841 
10842  /* "PyClical.pyx":1234
10843  * return clifford_to_repr( self.unwrap() ).c_str()
10844  *
10845  * def __str__(self): # <<<<<<<<<<<<<<
10846  * """
10847  * The informal string representation of self.
10848  */
10849 
10850  /* Python wrapper */
10851  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10852  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 ";
10853  #if CYTHON_COMPILING_IN_CPYTHON
10854  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10855  #endif
10856  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10857  PyObject *__pyx_r = 0;
10858  __Pyx_RefNannyDeclarations
10859  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10860  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10861 
10862  /* function exit code */
10863  __Pyx_RefNannyFinishContext();
10864  return __pyx_r;
10865  }
10866 
10867  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10868  PyObject *__pyx_r = NULL;
10869  __Pyx_RefNannyDeclarations
10870  PyObject *__pyx_t_1 = NULL;
10871  __Pyx_RefNannySetupContext("__str__", 0);
10872 
10873  /* "PyClical.pyx":1241
10874  * '1+3{-1}+2{1,2}+4{-2,7}'
10875  * """
10876  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10877  *
10878  * def clifford_hidden_doctests():
10879  */
10880  __Pyx_XDECREF(__pyx_r);
10881  __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)
10882  __Pyx_GOTREF(__pyx_t_1);
10883  __pyx_r = __pyx_t_1;
10884  __pyx_t_1 = 0;
10885  goto __pyx_L0;
10886 
10887  /* "PyClical.pyx":1234
10888  * return clifford_to_repr( self.unwrap() ).c_str()
10889  *
10890  * def __str__(self): # <<<<<<<<<<<<<<
10891  * """
10892  * The informal string representation of self.
10893  */
10894 
10895  /* function exit code */
10896  __pyx_L1_error:;
10897  __Pyx_XDECREF(__pyx_t_1);
10898  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10899  __pyx_r = NULL;
10900  __pyx_L0:;
10901  __Pyx_XGIVEREF(__pyx_r);
10902  __Pyx_RefNannyFinishContext();
10903  return __pyx_r;
10904  }
10905 
10906  /* "(tree fragment)":1
10907  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10908  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10909  * def __setstate_cython__(self, __pyx_state):
10910  */
10911 
10912  /* Python wrapper */
10913  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10914  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10915  PyObject *__pyx_r = 0;
10916  __Pyx_RefNannyDeclarations
10917  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10918  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10919 
10920  /* function exit code */
10921  __Pyx_RefNannyFinishContext();
10922  return __pyx_r;
10923  }
10924 
10925  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10926  PyObject *__pyx_r = NULL;
10927  __Pyx_RefNannyDeclarations
10928  PyObject *__pyx_t_1 = NULL;
10929  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10930 
10931  /* "(tree fragment)":2
10932  * def __reduce_cython__(self):
10933  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10934  * def __setstate_cython__(self, __pyx_state):
10935  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10936  */
10937  __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)
10938  __Pyx_GOTREF(__pyx_t_1);
10939  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10940  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10941  __PYX_ERR(1, 2, __pyx_L1_error)
10942 
10943  /* "(tree fragment)":1
10944  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10945  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10946  * def __setstate_cython__(self, __pyx_state):
10947  */
10948 
10949  /* function exit code */
10950  __pyx_L1_error:;
10951  __Pyx_XDECREF(__pyx_t_1);
10952  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10953  __pyx_r = NULL;
10954  __Pyx_XGIVEREF(__pyx_r);
10955  __Pyx_RefNannyFinishContext();
10956  return __pyx_r;
10957  }
10958 
10959  /* "(tree fragment)":3
10960  * def __reduce_cython__(self):
10961  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10962  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10963  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10964  */
10965 
10966  /* Python wrapper */
10967  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
10968  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10969  PyObject *__pyx_r = 0;
10970  __Pyx_RefNannyDeclarations
10971  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10972  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10973 
10974  /* function exit code */
10975  __Pyx_RefNannyFinishContext();
10976  return __pyx_r;
10977  }
10978 
10979  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) {
10980  PyObject *__pyx_r = NULL;
10981  __Pyx_RefNannyDeclarations
10982  PyObject *__pyx_t_1 = NULL;
10983  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10984 
10985  /* "(tree fragment)":4
10986  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10987  * def __setstate_cython__(self, __pyx_state):
10988  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10989  */
10990  __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)
10991  __Pyx_GOTREF(__pyx_t_1);
10992  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10993  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10994  __PYX_ERR(1, 4, __pyx_L1_error)
10995 
10996  /* "(tree fragment)":3
10997  * def __reduce_cython__(self):
10998  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10999  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11000  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11001  */
11002 
11003  /* function exit code */
11004  __pyx_L1_error:;
11005  __Pyx_XDECREF(__pyx_t_1);
11006  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11007  __pyx_r = NULL;
11008  __Pyx_XGIVEREF(__pyx_r);
11009  __Pyx_RefNannyFinishContext();
11010  return __pyx_r;
11011  }
11012 
11013  /* "PyClical.pyx":1243
11014  * return clifford_to_str( self.unwrap() ).c_str()
11015  *
11016  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11017  * """
11018  * Tests for functions that Doctest cannot see.
11019  */
11020 
11021  /* Python wrapper */
11022  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11023  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 ";
11024  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};
11025  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11026  PyObject *__pyx_r = 0;
11027  __Pyx_RefNannyDeclarations
11028  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11029  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11030 
11031  /* function exit code */
11032  __Pyx_RefNannyFinishContext();
11033  return __pyx_r;
11034  }
11035 
11036  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11037  PyObject *__pyx_r = NULL;
11038  __Pyx_RefNannyDeclarations
11039  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11040 
11041  /* "PyClical.pyx":1327
11042  * True
11043  * """
11044  * return # <<<<<<<<<<<<<<
11045  *
11046  * cpdef inline inv(obj):
11047  */
11048  __Pyx_XDECREF(__pyx_r);
11049  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11050  goto __pyx_L0;
11051 
11052  /* "PyClical.pyx":1243
11053  * return clifford_to_str( self.unwrap() ).c_str()
11054  *
11055  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11056  * """
11057  * Tests for functions that Doctest cannot see.
11058  */
11059 
11060  /* function exit code */
11061  __pyx_L0:;
11062  __Pyx_XGIVEREF(__pyx_r);
11063  __Pyx_RefNannyFinishContext();
11064  return __pyx_r;
11065  }
11066 
11067  /* "PyClical.pyx":1329
11068  * return
11069  *
11070  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11071  * """
11072  * Geometric multiplicative inverse.
11073  */
11074 
11075  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11076  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11077  PyObject *__pyx_r = NULL;
11078  __Pyx_RefNannyDeclarations
11079  PyObject *__pyx_t_1 = NULL;
11080  PyObject *__pyx_t_2 = NULL;
11081  PyObject *__pyx_t_3 = NULL;
11082  __Pyx_RefNannySetupContext("inv", 0);
11083 
11084  /* "PyClical.pyx":1342
11085  * nan
11086  * """
11087  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11088  *
11089  * cpdef inline scalar(obj):
11090  */
11091  __Pyx_XDECREF(__pyx_r);
11092  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error)
11093  __Pyx_GOTREF(__pyx_t_2);
11094  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_inv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
11095  __Pyx_GOTREF(__pyx_t_3);
11096  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11097  __pyx_t_2 = NULL;
11098  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11099  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11100  if (likely(__pyx_t_2)) {
11101  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11102  __Pyx_INCREF(__pyx_t_2);
11103  __Pyx_INCREF(function);
11104  __Pyx_DECREF_SET(__pyx_t_3, function);
11105  }
11106  }
11107  if (__pyx_t_2) {
11108  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11109  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11110  } else {
11111  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11112  }
11113  __Pyx_GOTREF(__pyx_t_1);
11114  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11115  __pyx_r = __pyx_t_1;
11116  __pyx_t_1 = 0;
11117  goto __pyx_L0;
11118 
11119  /* "PyClical.pyx":1329
11120  * return
11121  *
11122  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11123  * """
11124  * Geometric multiplicative inverse.
11125  */
11126 
11127  /* function exit code */
11128  __pyx_L1_error:;
11129  __Pyx_XDECREF(__pyx_t_1);
11130  __Pyx_XDECREF(__pyx_t_2);
11131  __Pyx_XDECREF(__pyx_t_3);
11132  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11133  __pyx_r = 0;
11134  __pyx_L0:;
11135  __Pyx_XGIVEREF(__pyx_r);
11136  __Pyx_RefNannyFinishContext();
11137  return __pyx_r;
11138  }
11139 
11140  /* Python wrapper */
11141  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11142  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 ";
11143  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11144  PyObject *__pyx_r = 0;
11145  __Pyx_RefNannyDeclarations
11146  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11147  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11148 
11149  /* function exit code */
11150  __Pyx_RefNannyFinishContext();
11151  return __pyx_r;
11152  }
11153 
11154  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11155  PyObject *__pyx_r = NULL;
11156  __Pyx_RefNannyDeclarations
11157  PyObject *__pyx_t_1 = NULL;
11158  __Pyx_RefNannySetupContext("inv", 0);
11159  __Pyx_XDECREF(__pyx_r);
11160  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11161  __Pyx_GOTREF(__pyx_t_1);
11162  __pyx_r = __pyx_t_1;
11163  __pyx_t_1 = 0;
11164  goto __pyx_L0;
11165 
11166  /* function exit code */
11167  __pyx_L1_error:;
11168  __Pyx_XDECREF(__pyx_t_1);
11169  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11170  __pyx_r = NULL;
11171  __pyx_L0:;
11172  __Pyx_XGIVEREF(__pyx_r);
11173  __Pyx_RefNannyFinishContext();
11174  return __pyx_r;
11175  }
11176 
11177  /* "PyClical.pyx":1344
11178  * return clifford(obj).inv()
11179  *
11180  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11181  * """
11182  * Scalar part.
11183  */
11184 
11185  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11186  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11187  PyObject *__pyx_r = NULL;
11188  __Pyx_RefNannyDeclarations
11189  PyObject *__pyx_t_1 = NULL;
11190  PyObject *__pyx_t_2 = NULL;
11191  PyObject *__pyx_t_3 = NULL;
11192  __Pyx_RefNannySetupContext("scalar", 0);
11193 
11194  /* "PyClical.pyx":1353
11195  * 0.0
11196  * """
11197  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11198  *
11199  * cpdef inline real(obj):
11200  */
11201  __Pyx_XDECREF(__pyx_r);
11202  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error)
11203  __Pyx_GOTREF(__pyx_t_2);
11204  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
11205  __Pyx_GOTREF(__pyx_t_3);
11206  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11207  __pyx_t_2 = NULL;
11208  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11209  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11210  if (likely(__pyx_t_2)) {
11211  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11212  __Pyx_INCREF(__pyx_t_2);
11213  __Pyx_INCREF(function);
11214  __Pyx_DECREF_SET(__pyx_t_3, function);
11215  }
11216  }
11217  if (__pyx_t_2) {
11218  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11219  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11220  } else {
11221  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11222  }
11223  __Pyx_GOTREF(__pyx_t_1);
11224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11225  __pyx_r = __pyx_t_1;
11226  __pyx_t_1 = 0;
11227  goto __pyx_L0;
11228 
11229  /* "PyClical.pyx":1344
11230  * return clifford(obj).inv()
11231  *
11232  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11233  * """
11234  * Scalar part.
11235  */
11236 
11237  /* function exit code */
11238  __pyx_L1_error:;
11239  __Pyx_XDECREF(__pyx_t_1);
11240  __Pyx_XDECREF(__pyx_t_2);
11241  __Pyx_XDECREF(__pyx_t_3);
11242  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11243  __pyx_r = 0;
11244  __pyx_L0:;
11245  __Pyx_XGIVEREF(__pyx_r);
11246  __Pyx_RefNannyFinishContext();
11247  return __pyx_r;
11248  }
11249 
11250  /* Python wrapper */
11251  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11252  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 ";
11253  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11254  PyObject *__pyx_r = 0;
11255  __Pyx_RefNannyDeclarations
11256  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11257  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11258 
11259  /* function exit code */
11260  __Pyx_RefNannyFinishContext();
11261  return __pyx_r;
11262  }
11263 
11264  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11265  PyObject *__pyx_r = NULL;
11266  __Pyx_RefNannyDeclarations
11267  PyObject *__pyx_t_1 = NULL;
11268  __Pyx_RefNannySetupContext("scalar", 0);
11269  __Pyx_XDECREF(__pyx_r);
11270  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11271  __Pyx_GOTREF(__pyx_t_1);
11272  __pyx_r = __pyx_t_1;
11273  __pyx_t_1 = 0;
11274  goto __pyx_L0;
11275 
11276  /* function exit code */
11277  __pyx_L1_error:;
11278  __Pyx_XDECREF(__pyx_t_1);
11279  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11280  __pyx_r = NULL;
11281  __pyx_L0:;
11282  __Pyx_XGIVEREF(__pyx_r);
11283  __Pyx_RefNannyFinishContext();
11284  return __pyx_r;
11285  }
11286 
11287  /* "PyClical.pyx":1355
11288  * return clifford(obj).scalar()
11289  *
11290  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11291  * """
11292  * Real part: synonym for scalar part.
11293  */
11294 
11295  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11296  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11297  PyObject *__pyx_r = NULL;
11298  __Pyx_RefNannyDeclarations
11299  PyObject *__pyx_t_1 = NULL;
11300  PyObject *__pyx_t_2 = NULL;
11301  PyObject *__pyx_t_3 = NULL;
11302  __Pyx_RefNannySetupContext("real", 0);
11303 
11304  /* "PyClical.pyx":1364
11305  * 0.0
11306  * """
11307  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11308  *
11309  * cpdef inline imag(obj):
11310  */
11311  __Pyx_XDECREF(__pyx_r);
11312  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
11313  __Pyx_GOTREF(__pyx_t_2);
11314  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
11315  __Pyx_GOTREF(__pyx_t_3);
11316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11317  __pyx_t_2 = NULL;
11318  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11319  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11320  if (likely(__pyx_t_2)) {
11321  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11322  __Pyx_INCREF(__pyx_t_2);
11323  __Pyx_INCREF(function);
11324  __Pyx_DECREF_SET(__pyx_t_3, function);
11325  }
11326  }
11327  if (__pyx_t_2) {
11328  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11329  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11330  } else {
11331  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11332  }
11333  __Pyx_GOTREF(__pyx_t_1);
11334  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11335  __pyx_r = __pyx_t_1;
11336  __pyx_t_1 = 0;
11337  goto __pyx_L0;
11338 
11339  /* "PyClical.pyx":1355
11340  * return clifford(obj).scalar()
11341  *
11342  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11343  * """
11344  * Real part: synonym for scalar part.
11345  */
11346 
11347  /* function exit code */
11348  __pyx_L1_error:;
11349  __Pyx_XDECREF(__pyx_t_1);
11350  __Pyx_XDECREF(__pyx_t_2);
11351  __Pyx_XDECREF(__pyx_t_3);
11352  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11353  __pyx_r = 0;
11354  __pyx_L0:;
11355  __Pyx_XGIVEREF(__pyx_r);
11356  __Pyx_RefNannyFinishContext();
11357  return __pyx_r;
11358  }
11359 
11360  /* Python wrapper */
11361  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11362  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 ";
11363  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11364  PyObject *__pyx_r = 0;
11365  __Pyx_RefNannyDeclarations
11366  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11367  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11368 
11369  /* function exit code */
11370  __Pyx_RefNannyFinishContext();
11371  return __pyx_r;
11372  }
11373 
11374  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11375  PyObject *__pyx_r = NULL;
11376  __Pyx_RefNannyDeclarations
11377  PyObject *__pyx_t_1 = NULL;
11378  __Pyx_RefNannySetupContext("real", 0);
11379  __Pyx_XDECREF(__pyx_r);
11380  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11381  __Pyx_GOTREF(__pyx_t_1);
11382  __pyx_r = __pyx_t_1;
11383  __pyx_t_1 = 0;
11384  goto __pyx_L0;
11385 
11386  /* function exit code */
11387  __pyx_L1_error:;
11388  __Pyx_XDECREF(__pyx_t_1);
11389  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11390  __pyx_r = NULL;
11391  __pyx_L0:;
11392  __Pyx_XGIVEREF(__pyx_r);
11393  __Pyx_RefNannyFinishContext();
11394  return __pyx_r;
11395  }
11396 
11397  /* "PyClical.pyx":1366
11398  * return clifford(obj).scalar()
11399  *
11400  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11401  * """
11402  * Imaginary part: deprecated (always 0).
11403  */
11404 
11405  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11406  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11407  PyObject *__pyx_r = NULL;
11408  __Pyx_RefNannyDeclarations
11409  __Pyx_RefNannySetupContext("imag", 0);
11410 
11411  /* "PyClical.pyx":1375
11412  * 0.0
11413  * """
11414  * return 0.0 # <<<<<<<<<<<<<<
11415  *
11416  * cpdef inline pure(obj):
11417  */
11418  __Pyx_XDECREF(__pyx_r);
11419  __Pyx_INCREF(__pyx_float_0_0);
11420  __pyx_r = __pyx_float_0_0;
11421  goto __pyx_L0;
11422 
11423  /* "PyClical.pyx":1366
11424  * return clifford(obj).scalar()
11425  *
11426  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11427  * """
11428  * Imaginary part: deprecated (always 0).
11429  */
11430 
11431  /* function exit code */
11432  __pyx_L0:;
11433  __Pyx_XGIVEREF(__pyx_r);
11434  __Pyx_RefNannyFinishContext();
11435  return __pyx_r;
11436  }
11437 
11438  /* Python wrapper */
11439  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11440  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 ";
11441  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11442  PyObject *__pyx_r = 0;
11443  __Pyx_RefNannyDeclarations
11444  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11445  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11446 
11447  /* function exit code */
11448  __Pyx_RefNannyFinishContext();
11449  return __pyx_r;
11450  }
11451 
11452  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11453  PyObject *__pyx_r = NULL;
11454  __Pyx_RefNannyDeclarations
11455  PyObject *__pyx_t_1 = NULL;
11456  __Pyx_RefNannySetupContext("imag", 0);
11457  __Pyx_XDECREF(__pyx_r);
11458  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11459  __Pyx_GOTREF(__pyx_t_1);
11460  __pyx_r = __pyx_t_1;
11461  __pyx_t_1 = 0;
11462  goto __pyx_L0;
11463 
11464  /* function exit code */
11465  __pyx_L1_error:;
11466  __Pyx_XDECREF(__pyx_t_1);
11467  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11468  __pyx_r = NULL;
11469  __pyx_L0:;
11470  __Pyx_XGIVEREF(__pyx_r);
11471  __Pyx_RefNannyFinishContext();
11472  return __pyx_r;
11473  }
11474 
11475  /* "PyClical.pyx":1377
11476  * return 0.0
11477  *
11478  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11479  * """
11480  * Pure part
11481  */
11482 
11483  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11484  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11485  PyObject *__pyx_r = NULL;
11486  __Pyx_RefNannyDeclarations
11487  PyObject *__pyx_t_1 = NULL;
11488  PyObject *__pyx_t_2 = NULL;
11489  PyObject *__pyx_t_3 = NULL;
11490  __Pyx_RefNannySetupContext("pure", 0);
11491 
11492  /* "PyClical.pyx":1386
11493  * {1,2}
11494  * """
11495  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11496  *
11497  * cpdef inline even(obj):
11498  */
11499  __Pyx_XDECREF(__pyx_r);
11500  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error)
11501  __Pyx_GOTREF(__pyx_t_2);
11502  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pure); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error)
11503  __Pyx_GOTREF(__pyx_t_3);
11504  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11505  __pyx_t_2 = NULL;
11506  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11507  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11508  if (likely(__pyx_t_2)) {
11509  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11510  __Pyx_INCREF(__pyx_t_2);
11511  __Pyx_INCREF(function);
11512  __Pyx_DECREF_SET(__pyx_t_3, function);
11513  }
11514  }
11515  if (__pyx_t_2) {
11516  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11517  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11518  } else {
11519  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11520  }
11521  __Pyx_GOTREF(__pyx_t_1);
11522  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11523  __pyx_r = __pyx_t_1;
11524  __pyx_t_1 = 0;
11525  goto __pyx_L0;
11526 
11527  /* "PyClical.pyx":1377
11528  * return 0.0
11529  *
11530  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11531  * """
11532  * Pure part
11533  */
11534 
11535  /* function exit code */
11536  __pyx_L1_error:;
11537  __Pyx_XDECREF(__pyx_t_1);
11538  __Pyx_XDECREF(__pyx_t_2);
11539  __Pyx_XDECREF(__pyx_t_3);
11540  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11541  __pyx_r = 0;
11542  __pyx_L0:;
11543  __Pyx_XGIVEREF(__pyx_r);
11544  __Pyx_RefNannyFinishContext();
11545  return __pyx_r;
11546  }
11547 
11548  /* Python wrapper */
11549  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11550  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 ";
11551  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11552  PyObject *__pyx_r = 0;
11553  __Pyx_RefNannyDeclarations
11554  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11555  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11556 
11557  /* function exit code */
11558  __Pyx_RefNannyFinishContext();
11559  return __pyx_r;
11560  }
11561 
11562  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11563  PyObject *__pyx_r = NULL;
11564  __Pyx_RefNannyDeclarations
11565  PyObject *__pyx_t_1 = NULL;
11566  __Pyx_RefNannySetupContext("pure", 0);
11567  __Pyx_XDECREF(__pyx_r);
11568  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11569  __Pyx_GOTREF(__pyx_t_1);
11570  __pyx_r = __pyx_t_1;
11571  __pyx_t_1 = 0;
11572  goto __pyx_L0;
11573 
11574  /* function exit code */
11575  __pyx_L1_error:;
11576  __Pyx_XDECREF(__pyx_t_1);
11577  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11578  __pyx_r = NULL;
11579  __pyx_L0:;
11580  __Pyx_XGIVEREF(__pyx_r);
11581  __Pyx_RefNannyFinishContext();
11582  return __pyx_r;
11583  }
11584 
11585  /* "PyClical.pyx":1388
11586  * return clifford(obj).pure()
11587  *
11588  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11589  * """
11590  * Even part of multivector, sum of even grade terms.
11591  */
11592 
11593  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11594  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11595  PyObject *__pyx_r = NULL;
11596  __Pyx_RefNannyDeclarations
11597  PyObject *__pyx_t_1 = NULL;
11598  PyObject *__pyx_t_2 = NULL;
11599  PyObject *__pyx_t_3 = NULL;
11600  __Pyx_RefNannySetupContext("even", 0);
11601 
11602  /* "PyClical.pyx":1395
11603  * 1+{1,2}
11604  * """
11605  * return clifford(obj).even() # <<<<<<<<<<<<<<
11606  *
11607  * cpdef inline odd(obj):
11608  */
11609  __Pyx_XDECREF(__pyx_r);
11610  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error)
11611  __Pyx_GOTREF(__pyx_t_2);
11612  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_even); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __pyx_L1_error)
11613  __Pyx_GOTREF(__pyx_t_3);
11614  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11615  __pyx_t_2 = NULL;
11616  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11617  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11618  if (likely(__pyx_t_2)) {
11619  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11620  __Pyx_INCREF(__pyx_t_2);
11621  __Pyx_INCREF(function);
11622  __Pyx_DECREF_SET(__pyx_t_3, function);
11623  }
11624  }
11625  if (__pyx_t_2) {
11626  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11627  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11628  } else {
11629  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11630  }
11631  __Pyx_GOTREF(__pyx_t_1);
11632  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11633  __pyx_r = __pyx_t_1;
11634  __pyx_t_1 = 0;
11635  goto __pyx_L0;
11636 
11637  /* "PyClical.pyx":1388
11638  * return clifford(obj).pure()
11639  *
11640  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11641  * """
11642  * Even part of multivector, sum of even grade terms.
11643  */
11644 
11645  /* function exit code */
11646  __pyx_L1_error:;
11647  __Pyx_XDECREF(__pyx_t_1);
11648  __Pyx_XDECREF(__pyx_t_2);
11649  __Pyx_XDECREF(__pyx_t_3);
11650  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11651  __pyx_r = 0;
11652  __pyx_L0:;
11653  __Pyx_XGIVEREF(__pyx_r);
11654  __Pyx_RefNannyFinishContext();
11655  return __pyx_r;
11656  }
11657 
11658  /* Python wrapper */
11659  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11660  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 ";
11661  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11662  PyObject *__pyx_r = 0;
11663  __Pyx_RefNannyDeclarations
11664  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11665  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11666 
11667  /* function exit code */
11668  __Pyx_RefNannyFinishContext();
11669  return __pyx_r;
11670  }
11671 
11672  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11673  PyObject *__pyx_r = NULL;
11674  __Pyx_RefNannyDeclarations
11675  PyObject *__pyx_t_1 = NULL;
11676  __Pyx_RefNannySetupContext("even", 0);
11677  __Pyx_XDECREF(__pyx_r);
11678  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11679  __Pyx_GOTREF(__pyx_t_1);
11680  __pyx_r = __pyx_t_1;
11681  __pyx_t_1 = 0;
11682  goto __pyx_L0;
11683 
11684  /* function exit code */
11685  __pyx_L1_error:;
11686  __Pyx_XDECREF(__pyx_t_1);
11687  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11688  __pyx_r = NULL;
11689  __pyx_L0:;
11690  __Pyx_XGIVEREF(__pyx_r);
11691  __Pyx_RefNannyFinishContext();
11692  return __pyx_r;
11693  }
11694 
11695  /* "PyClical.pyx":1397
11696  * return clifford(obj).even()
11697  *
11698  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11699  * """
11700  * Odd part of multivector, sum of odd grade terms.
11701  */
11702 
11703  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11704  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11705  PyObject *__pyx_r = NULL;
11706  __Pyx_RefNannyDeclarations
11707  PyObject *__pyx_t_1 = NULL;
11708  PyObject *__pyx_t_2 = NULL;
11709  PyObject *__pyx_t_3 = NULL;
11710  __Pyx_RefNannySetupContext("odd", 0);
11711 
11712  /* "PyClical.pyx":1404
11713  * {1}
11714  * """
11715  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11716  *
11717  * cpdef inline involute(obj):
11718  */
11719  __Pyx_XDECREF(__pyx_r);
11720  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
11721  __Pyx_GOTREF(__pyx_t_2);
11722  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_odd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
11723  __Pyx_GOTREF(__pyx_t_3);
11724  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11725  __pyx_t_2 = NULL;
11726  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11727  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11728  if (likely(__pyx_t_2)) {
11729  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11730  __Pyx_INCREF(__pyx_t_2);
11731  __Pyx_INCREF(function);
11732  __Pyx_DECREF_SET(__pyx_t_3, function);
11733  }
11734  }
11735  if (__pyx_t_2) {
11736  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11737  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11738  } else {
11739  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11740  }
11741  __Pyx_GOTREF(__pyx_t_1);
11742  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11743  __pyx_r = __pyx_t_1;
11744  __pyx_t_1 = 0;
11745  goto __pyx_L0;
11746 
11747  /* "PyClical.pyx":1397
11748  * return clifford(obj).even()
11749  *
11750  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11751  * """
11752  * Odd part of multivector, sum of odd grade terms.
11753  */
11754 
11755  /* function exit code */
11756  __pyx_L1_error:;
11757  __Pyx_XDECREF(__pyx_t_1);
11758  __Pyx_XDECREF(__pyx_t_2);
11759  __Pyx_XDECREF(__pyx_t_3);
11760  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11761  __pyx_r = 0;
11762  __pyx_L0:;
11763  __Pyx_XGIVEREF(__pyx_r);
11764  __Pyx_RefNannyFinishContext();
11765  return __pyx_r;
11766  }
11767 
11768  /* Python wrapper */
11769  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11770  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 ";
11771  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11772  PyObject *__pyx_r = 0;
11773  __Pyx_RefNannyDeclarations
11774  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11775  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11776 
11777  /* function exit code */
11778  __Pyx_RefNannyFinishContext();
11779  return __pyx_r;
11780  }
11781 
11782  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11783  PyObject *__pyx_r = NULL;
11784  __Pyx_RefNannyDeclarations
11785  PyObject *__pyx_t_1 = NULL;
11786  __Pyx_RefNannySetupContext("odd", 0);
11787  __Pyx_XDECREF(__pyx_r);
11788  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11789  __Pyx_GOTREF(__pyx_t_1);
11790  __pyx_r = __pyx_t_1;
11791  __pyx_t_1 = 0;
11792  goto __pyx_L0;
11793 
11794  /* function exit code */
11795  __pyx_L1_error:;
11796  __Pyx_XDECREF(__pyx_t_1);
11797  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11798  __pyx_r = NULL;
11799  __pyx_L0:;
11800  __Pyx_XGIVEREF(__pyx_r);
11801  __Pyx_RefNannyFinishContext();
11802  return __pyx_r;
11803  }
11804 
11805  /* "PyClical.pyx":1406
11806  * return clifford(obj).odd()
11807  *
11808  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11809  * """
11810  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11811  */
11812 
11813  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11814  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11815  PyObject *__pyx_r = NULL;
11816  __Pyx_RefNannyDeclarations
11817  PyObject *__pyx_t_1 = NULL;
11818  PyObject *__pyx_t_2 = NULL;
11819  PyObject *__pyx_t_3 = NULL;
11820  __Pyx_RefNannySetupContext("involute", 0);
11821 
11822  /* "PyClical.pyx":1419
11823  * 1-{1}+{1,2}
11824  * """
11825  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11826  *
11827  * cpdef inline reverse(obj):
11828  */
11829  __Pyx_XDECREF(__pyx_r);
11830  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
11831  __Pyx_GOTREF(__pyx_t_2);
11832  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_involute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error)
11833  __Pyx_GOTREF(__pyx_t_3);
11834  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11835  __pyx_t_2 = NULL;
11836  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11837  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11838  if (likely(__pyx_t_2)) {
11839  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11840  __Pyx_INCREF(__pyx_t_2);
11841  __Pyx_INCREF(function);
11842  __Pyx_DECREF_SET(__pyx_t_3, function);
11843  }
11844  }
11845  if (__pyx_t_2) {
11846  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11847  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11848  } else {
11849  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11850  }
11851  __Pyx_GOTREF(__pyx_t_1);
11852  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11853  __pyx_r = __pyx_t_1;
11854  __pyx_t_1 = 0;
11855  goto __pyx_L0;
11856 
11857  /* "PyClical.pyx":1406
11858  * return clifford(obj).odd()
11859  *
11860  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11861  * """
11862  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11863  */
11864 
11865  /* function exit code */
11866  __pyx_L1_error:;
11867  __Pyx_XDECREF(__pyx_t_1);
11868  __Pyx_XDECREF(__pyx_t_2);
11869  __Pyx_XDECREF(__pyx_t_3);
11870  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11871  __pyx_r = 0;
11872  __pyx_L0:;
11873  __Pyx_XGIVEREF(__pyx_r);
11874  __Pyx_RefNannyFinishContext();
11875  return __pyx_r;
11876  }
11877 
11878  /* Python wrapper */
11879  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11880  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 ";
11881  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11882  PyObject *__pyx_r = 0;
11883  __Pyx_RefNannyDeclarations
11884  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11885  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11886 
11887  /* function exit code */
11888  __Pyx_RefNannyFinishContext();
11889  return __pyx_r;
11890  }
11891 
11892  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11893  PyObject *__pyx_r = NULL;
11894  __Pyx_RefNannyDeclarations
11895  PyObject *__pyx_t_1 = NULL;
11896  __Pyx_RefNannySetupContext("involute", 0);
11897  __Pyx_XDECREF(__pyx_r);
11898  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11899  __Pyx_GOTREF(__pyx_t_1);
11900  __pyx_r = __pyx_t_1;
11901  __pyx_t_1 = 0;
11902  goto __pyx_L0;
11903 
11904  /* function exit code */
11905  __pyx_L1_error:;
11906  __Pyx_XDECREF(__pyx_t_1);
11907  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11908  __pyx_r = NULL;
11909  __pyx_L0:;
11910  __Pyx_XGIVEREF(__pyx_r);
11911  __Pyx_RefNannyFinishContext();
11912  return __pyx_r;
11913  }
11914 
11915  /* "PyClical.pyx":1421
11916  * return clifford(obj).involute()
11917  *
11918  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11919  * """
11920  * Reversion, eg. {1}*{2} -> {2}*{1}
11921  */
11922 
11923  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11924  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11925  PyObject *__pyx_r = NULL;
11926  __Pyx_RefNannyDeclarations
11927  PyObject *__pyx_t_1 = NULL;
11928  PyObject *__pyx_t_2 = NULL;
11929  PyObject *__pyx_t_3 = NULL;
11930  __Pyx_RefNannySetupContext("reverse", 0);
11931 
11932  /* "PyClical.pyx":1434
11933  * 1+{1}-{1,2}
11934  * """
11935  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11936  *
11937  * cpdef inline conj(obj):
11938  */
11939  __Pyx_XDECREF(__pyx_r);
11940  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
11941  __Pyx_GOTREF(__pyx_t_2);
11942  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_reverse); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
11943  __Pyx_GOTREF(__pyx_t_3);
11944  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11945  __pyx_t_2 = NULL;
11946  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11947  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11948  if (likely(__pyx_t_2)) {
11949  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11950  __Pyx_INCREF(__pyx_t_2);
11951  __Pyx_INCREF(function);
11952  __Pyx_DECREF_SET(__pyx_t_3, function);
11953  }
11954  }
11955  if (__pyx_t_2) {
11956  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
11957  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11958  } else {
11959  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
11960  }
11961  __Pyx_GOTREF(__pyx_t_1);
11962  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11963  __pyx_r = __pyx_t_1;
11964  __pyx_t_1 = 0;
11965  goto __pyx_L0;
11966 
11967  /* "PyClical.pyx":1421
11968  * return clifford(obj).involute()
11969  *
11970  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11971  * """
11972  * Reversion, eg. {1}*{2} -> {2}*{1}
11973  */
11974 
11975  /* function exit code */
11976  __pyx_L1_error:;
11977  __Pyx_XDECREF(__pyx_t_1);
11978  __Pyx_XDECREF(__pyx_t_2);
11979  __Pyx_XDECREF(__pyx_t_3);
11980  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11981  __pyx_r = 0;
11982  __pyx_L0:;
11983  __Pyx_XGIVEREF(__pyx_r);
11984  __Pyx_RefNannyFinishContext();
11985  return __pyx_r;
11986  }
11987 
11988  /* Python wrapper */
11989  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11990  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 ";
11991  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11992  PyObject *__pyx_r = 0;
11993  __Pyx_RefNannyDeclarations
11994  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
11995  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
11996 
11997  /* function exit code */
11998  __Pyx_RefNannyFinishContext();
11999  return __pyx_r;
12000  }
12001 
12002  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12003  PyObject *__pyx_r = NULL;
12004  __Pyx_RefNannyDeclarations
12005  PyObject *__pyx_t_1 = NULL;
12006  __Pyx_RefNannySetupContext("reverse", 0);
12007  __Pyx_XDECREF(__pyx_r);
12008  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12009  __Pyx_GOTREF(__pyx_t_1);
12010  __pyx_r = __pyx_t_1;
12011  __pyx_t_1 = 0;
12012  goto __pyx_L0;
12013 
12014  /* function exit code */
12015  __pyx_L1_error:;
12016  __Pyx_XDECREF(__pyx_t_1);
12017  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12018  __pyx_r = NULL;
12019  __pyx_L0:;
12020  __Pyx_XGIVEREF(__pyx_r);
12021  __Pyx_RefNannyFinishContext();
12022  return __pyx_r;
12023  }
12024 
12025  /* "PyClical.pyx":1436
12026  * return clifford(obj).reverse()
12027  *
12028  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12029  * """
12030  * Conjugation, reverse o involute == involute o reverse.
12031  */
12032 
12033  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12034  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12035  PyObject *__pyx_r = NULL;
12036  __Pyx_RefNannyDeclarations
12037  PyObject *__pyx_t_1 = NULL;
12038  PyObject *__pyx_t_2 = NULL;
12039  PyObject *__pyx_t_3 = NULL;
12040  __Pyx_RefNannySetupContext("conj", 0);
12041 
12042  /* "PyClical.pyx":1449
12043  * 1-{1}-{1,2}
12044  * """
12045  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12046  *
12047  * cpdef inline quad(obj):
12048  */
12049  __Pyx_XDECREF(__pyx_r);
12050  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1449, __pyx_L1_error)
12051  __Pyx_GOTREF(__pyx_t_2);
12052  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_conj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error)
12053  __Pyx_GOTREF(__pyx_t_3);
12054  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12055  __pyx_t_2 = NULL;
12056  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12057  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12058  if (likely(__pyx_t_2)) {
12059  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12060  __Pyx_INCREF(__pyx_t_2);
12061  __Pyx_INCREF(function);
12062  __Pyx_DECREF_SET(__pyx_t_3, function);
12063  }
12064  }
12065  if (__pyx_t_2) {
12066  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12067  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12068  } else {
12069  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12070  }
12071  __Pyx_GOTREF(__pyx_t_1);
12072  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12073  __pyx_r = __pyx_t_1;
12074  __pyx_t_1 = 0;
12075  goto __pyx_L0;
12076 
12077  /* "PyClical.pyx":1436
12078  * return clifford(obj).reverse()
12079  *
12080  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12081  * """
12082  * Conjugation, reverse o involute == involute o reverse.
12083  */
12084 
12085  /* function exit code */
12086  __pyx_L1_error:;
12087  __Pyx_XDECREF(__pyx_t_1);
12088  __Pyx_XDECREF(__pyx_t_2);
12089  __Pyx_XDECREF(__pyx_t_3);
12090  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12091  __pyx_r = 0;
12092  __pyx_L0:;
12093  __Pyx_XGIVEREF(__pyx_r);
12094  __Pyx_RefNannyFinishContext();
12095  return __pyx_r;
12096  }
12097 
12098  /* Python wrapper */
12099  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12100  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 ";
12101  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12102  PyObject *__pyx_r = 0;
12103  __Pyx_RefNannyDeclarations
12104  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12105  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12106 
12107  /* function exit code */
12108  __Pyx_RefNannyFinishContext();
12109  return __pyx_r;
12110  }
12111 
12112  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12113  PyObject *__pyx_r = NULL;
12114  __Pyx_RefNannyDeclarations
12115  PyObject *__pyx_t_1 = NULL;
12116  __Pyx_RefNannySetupContext("conj", 0);
12117  __Pyx_XDECREF(__pyx_r);
12118  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12119  __Pyx_GOTREF(__pyx_t_1);
12120  __pyx_r = __pyx_t_1;
12121  __pyx_t_1 = 0;
12122  goto __pyx_L0;
12123 
12124  /* function exit code */
12125  __pyx_L1_error:;
12126  __Pyx_XDECREF(__pyx_t_1);
12127  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12128  __pyx_r = NULL;
12129  __pyx_L0:;
12130  __Pyx_XGIVEREF(__pyx_r);
12131  __Pyx_RefNannyFinishContext();
12132  return __pyx_r;
12133  }
12134 
12135  /* "PyClical.pyx":1451
12136  * return clifford(obj).conj()
12137  *
12138  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12139  * """
12140  * Quadratic form == (rev(x)*x)(0).
12141  */
12142 
12143  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12144  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12145  PyObject *__pyx_r = NULL;
12146  __Pyx_RefNannyDeclarations
12147  PyObject *__pyx_t_1 = NULL;
12148  PyObject *__pyx_t_2 = NULL;
12149  PyObject *__pyx_t_3 = NULL;
12150  __Pyx_RefNannySetupContext("quad", 0);
12151 
12152  /* "PyClical.pyx":1460
12153  * 2.0
12154  * """
12155  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12156  *
12157  * cpdef inline norm(obj):
12158  */
12159  __Pyx_XDECREF(__pyx_r);
12160  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1460, __pyx_L1_error)
12161  __Pyx_GOTREF(__pyx_t_2);
12162  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_quad); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1460, __pyx_L1_error)
12163  __Pyx_GOTREF(__pyx_t_3);
12164  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12165  __pyx_t_2 = NULL;
12166  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12167  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12168  if (likely(__pyx_t_2)) {
12169  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12170  __Pyx_INCREF(__pyx_t_2);
12171  __Pyx_INCREF(function);
12172  __Pyx_DECREF_SET(__pyx_t_3, function);
12173  }
12174  }
12175  if (__pyx_t_2) {
12176  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12177  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12178  } else {
12179  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12180  }
12181  __Pyx_GOTREF(__pyx_t_1);
12182  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12183  __pyx_r = __pyx_t_1;
12184  __pyx_t_1 = 0;
12185  goto __pyx_L0;
12186 
12187  /* "PyClical.pyx":1451
12188  * return clifford(obj).conj()
12189  *
12190  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12191  * """
12192  * Quadratic form == (rev(x)*x)(0).
12193  */
12194 
12195  /* function exit code */
12196  __pyx_L1_error:;
12197  __Pyx_XDECREF(__pyx_t_1);
12198  __Pyx_XDECREF(__pyx_t_2);
12199  __Pyx_XDECREF(__pyx_t_3);
12200  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12201  __pyx_r = 0;
12202  __pyx_L0:;
12203  __Pyx_XGIVEREF(__pyx_r);
12204  __Pyx_RefNannyFinishContext();
12205  return __pyx_r;
12206  }
12207 
12208  /* Python wrapper */
12209  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12210  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 ";
12211  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12212  PyObject *__pyx_r = 0;
12213  __Pyx_RefNannyDeclarations
12214  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12215  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12216 
12217  /* function exit code */
12218  __Pyx_RefNannyFinishContext();
12219  return __pyx_r;
12220  }
12221 
12222  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12223  PyObject *__pyx_r = NULL;
12224  __Pyx_RefNannyDeclarations
12225  PyObject *__pyx_t_1 = NULL;
12226  __Pyx_RefNannySetupContext("quad", 0);
12227  __Pyx_XDECREF(__pyx_r);
12228  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12229  __Pyx_GOTREF(__pyx_t_1);
12230  __pyx_r = __pyx_t_1;
12231  __pyx_t_1 = 0;
12232  goto __pyx_L0;
12233 
12234  /* function exit code */
12235  __pyx_L1_error:;
12236  __Pyx_XDECREF(__pyx_t_1);
12237  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12238  __pyx_r = NULL;
12239  __pyx_L0:;
12240  __Pyx_XGIVEREF(__pyx_r);
12241  __Pyx_RefNannyFinishContext();
12242  return __pyx_r;
12243  }
12244 
12245  /* "PyClical.pyx":1462
12246  * return clifford(obj).quad()
12247  *
12248  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12249  * """
12250  * norm == sum of squares of coordinates.
12251  */
12252 
12253  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12254  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12255  PyObject *__pyx_r = NULL;
12256  __Pyx_RefNannyDeclarations
12257  PyObject *__pyx_t_1 = NULL;
12258  PyObject *__pyx_t_2 = NULL;
12259  PyObject *__pyx_t_3 = NULL;
12260  __Pyx_RefNannySetupContext("norm", 0);
12261 
12262  /* "PyClical.pyx":1471
12263  * 4.0
12264  * """
12265  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12266  *
12267  * cpdef inline abs(obj):
12268  */
12269  __Pyx_XDECREF(__pyx_r);
12270  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
12271  __Pyx_GOTREF(__pyx_t_2);
12272  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_norm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1471, __pyx_L1_error)
12273  __Pyx_GOTREF(__pyx_t_3);
12274  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12275  __pyx_t_2 = NULL;
12276  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12277  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12278  if (likely(__pyx_t_2)) {
12279  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12280  __Pyx_INCREF(__pyx_t_2);
12281  __Pyx_INCREF(function);
12282  __Pyx_DECREF_SET(__pyx_t_3, function);
12283  }
12284  }
12285  if (__pyx_t_2) {
12286  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12287  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12288  } else {
12289  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12290  }
12291  __Pyx_GOTREF(__pyx_t_1);
12292  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12293  __pyx_r = __pyx_t_1;
12294  __pyx_t_1 = 0;
12295  goto __pyx_L0;
12296 
12297  /* "PyClical.pyx":1462
12298  * return clifford(obj).quad()
12299  *
12300  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12301  * """
12302  * norm == sum of squares of coordinates.
12303  */
12304 
12305  /* function exit code */
12306  __pyx_L1_error:;
12307  __Pyx_XDECREF(__pyx_t_1);
12308  __Pyx_XDECREF(__pyx_t_2);
12309  __Pyx_XDECREF(__pyx_t_3);
12310  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12311  __pyx_r = 0;
12312  __pyx_L0:;
12313  __Pyx_XGIVEREF(__pyx_r);
12314  __Pyx_RefNannyFinishContext();
12315  return __pyx_r;
12316  }
12317 
12318  /* Python wrapper */
12319  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12320  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 ";
12321  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12322  PyObject *__pyx_r = 0;
12323  __Pyx_RefNannyDeclarations
12324  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12325  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12326 
12327  /* function exit code */
12328  __Pyx_RefNannyFinishContext();
12329  return __pyx_r;
12330  }
12331 
12332  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12333  PyObject *__pyx_r = NULL;
12334  __Pyx_RefNannyDeclarations
12335  PyObject *__pyx_t_1 = NULL;
12336  __Pyx_RefNannySetupContext("norm", 0);
12337  __Pyx_XDECREF(__pyx_r);
12338  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12339  __Pyx_GOTREF(__pyx_t_1);
12340  __pyx_r = __pyx_t_1;
12341  __pyx_t_1 = 0;
12342  goto __pyx_L0;
12343 
12344  /* function exit code */
12345  __pyx_L1_error:;
12346  __Pyx_XDECREF(__pyx_t_1);
12347  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12348  __pyx_r = NULL;
12349  __pyx_L0:;
12350  __Pyx_XGIVEREF(__pyx_r);
12351  __Pyx_RefNannyFinishContext();
12352  return __pyx_r;
12353  }
12354 
12355  /* "PyClical.pyx":1473
12356  * return clifford(obj).norm()
12357  *
12358  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12359  * """
12360  * Absolute value of multivector: multivector 2-norm.
12361  */
12362 
12363  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12364  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12365  PyObject *__pyx_r = NULL;
12366  __Pyx_RefNannyDeclarations
12367  PyObject *__pyx_t_1 = NULL;
12368  __Pyx_RefNannySetupContext("abs", 0);
12369 
12370  /* "PyClical.pyx":1480
12371  * 2.0
12372  * """
12373  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12374  *
12375  * cpdef inline max_abs(obj):
12376  */
12377  __Pyx_XDECREF(__pyx_r);
12378  __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)
12379  __Pyx_GOTREF(__pyx_t_1);
12380  __pyx_r = __pyx_t_1;
12381  __pyx_t_1 = 0;
12382  goto __pyx_L0;
12383 
12384  /* "PyClical.pyx":1473
12385  * return clifford(obj).norm()
12386  *
12387  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12388  * """
12389  * Absolute value of multivector: multivector 2-norm.
12390  */
12391 
12392  /* function exit code */
12393  __pyx_L1_error:;
12394  __Pyx_XDECREF(__pyx_t_1);
12395  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12396  __pyx_r = 0;
12397  __pyx_L0:;
12398  __Pyx_XGIVEREF(__pyx_r);
12399  __Pyx_RefNannyFinishContext();
12400  return __pyx_r;
12401  }
12402 
12403  /* Python wrapper */
12404  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12405  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 ";
12406  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12407  PyObject *__pyx_r = 0;
12408  __Pyx_RefNannyDeclarations
12409  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12410  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12411 
12412  /* function exit code */
12413  __Pyx_RefNannyFinishContext();
12414  return __pyx_r;
12415  }
12416 
12417  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12418  PyObject *__pyx_r = NULL;
12419  __Pyx_RefNannyDeclarations
12420  PyObject *__pyx_t_1 = NULL;
12421  __Pyx_RefNannySetupContext("abs", 0);
12422  __Pyx_XDECREF(__pyx_r);
12423  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12424  __Pyx_GOTREF(__pyx_t_1);
12425  __pyx_r = __pyx_t_1;
12426  __pyx_t_1 = 0;
12427  goto __pyx_L0;
12428 
12429  /* function exit code */
12430  __pyx_L1_error:;
12431  __Pyx_XDECREF(__pyx_t_1);
12432  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12433  __pyx_r = NULL;
12434  __pyx_L0:;
12435  __Pyx_XGIVEREF(__pyx_r);
12436  __Pyx_RefNannyFinishContext();
12437  return __pyx_r;
12438  }
12439 
12440  /* "PyClical.pyx":1482
12441  * return glucat.abs(toClifford(obj))
12442  *
12443  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12444  * """
12445  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12446  */
12447 
12448  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12449  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12450  PyObject *__pyx_r = NULL;
12451  __Pyx_RefNannyDeclarations
12452  PyObject *__pyx_t_1 = NULL;
12453  __Pyx_RefNannySetupContext("max_abs", 0);
12454 
12455  /* "PyClical.pyx":1492
12456  *
12457  * """
12458  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12459  *
12460  * cpdef inline pow(obj, m):
12461  */
12462  __Pyx_XDECREF(__pyx_r);
12463  __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)
12464  __Pyx_GOTREF(__pyx_t_1);
12465  __pyx_r = __pyx_t_1;
12466  __pyx_t_1 = 0;
12467  goto __pyx_L0;
12468 
12469  /* "PyClical.pyx":1482
12470  * return glucat.abs(toClifford(obj))
12471  *
12472  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12473  * """
12474  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12475  */
12476 
12477  /* function exit code */
12478  __pyx_L1_error:;
12479  __Pyx_XDECREF(__pyx_t_1);
12480  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12481  __pyx_r = 0;
12482  __pyx_L0:;
12483  __Pyx_XGIVEREF(__pyx_r);
12484  __Pyx_RefNannyFinishContext();
12485  return __pyx_r;
12486  }
12487 
12488  /* Python wrapper */
12489  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12490  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 ";
12491  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12492  PyObject *__pyx_r = 0;
12493  __Pyx_RefNannyDeclarations
12494  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12495  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12496 
12497  /* function exit code */
12498  __Pyx_RefNannyFinishContext();
12499  return __pyx_r;
12500  }
12501 
12502  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12503  PyObject *__pyx_r = NULL;
12504  __Pyx_RefNannyDeclarations
12505  PyObject *__pyx_t_1 = NULL;
12506  __Pyx_RefNannySetupContext("max_abs", 0);
12507  __Pyx_XDECREF(__pyx_r);
12508  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12509  __Pyx_GOTREF(__pyx_t_1);
12510  __pyx_r = __pyx_t_1;
12511  __pyx_t_1 = 0;
12512  goto __pyx_L0;
12513 
12514  /* function exit code */
12515  __pyx_L1_error:;
12516  __Pyx_XDECREF(__pyx_t_1);
12517  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12518  __pyx_r = NULL;
12519  __pyx_L0:;
12520  __Pyx_XGIVEREF(__pyx_r);
12521  __Pyx_RefNannyFinishContext();
12522  return __pyx_r;
12523  }
12524 
12525  /* "PyClical.pyx":1494
12526  * return glucat.max_abs(toClifford(obj))
12527  *
12528  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12529  * """
12530  * Integer power of multivector: obj to the m.
12531  */
12532 
12533  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12534  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12535  PyObject *__pyx_r = NULL;
12536  __Pyx_RefNannyDeclarations
12537  PyObject *__pyx_t_1 = NULL;
12538  PyObject *__pyx_t_2 = NULL;
12539  PyObject *__pyx_t_3 = NULL;
12540  PyObject *__pyx_t_4 = NULL;
12541  PyObject *__pyx_t_5 = NULL;
12542  PyObject *__pyx_t_6 = NULL;
12543  int __pyx_t_7;
12544  PyObject *__pyx_t_8 = NULL;
12545  PyObject *__pyx_t_9 = NULL;
12546  PyObject *__pyx_t_10 = NULL;
12547  PyObject *__pyx_t_11 = NULL;
12548  __Pyx_RefNannySetupContext("pow", 0);
12549 
12550  /* "PyClical.pyx":1513
12551  * 1
12552  * """
12553  * try: # <<<<<<<<<<<<<<
12554  * math.pow(obj, m)
12555  * except:
12556  */
12557  {
12558  __Pyx_PyThreadState_declare
12559  __Pyx_PyThreadState_assign
12560  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12561  __Pyx_XGOTREF(__pyx_t_1);
12562  __Pyx_XGOTREF(__pyx_t_2);
12563  __Pyx_XGOTREF(__pyx_t_3);
12564  /*try:*/ {
12565 
12566  /* "PyClical.pyx":1514
12567  * """
12568  * try:
12569  * math.pow(obj, m) # <<<<<<<<<<<<<<
12570  * except:
12571  * return clifford(obj).pow(m)
12572  */
12573  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12574  __Pyx_GOTREF(__pyx_t_5);
12575  __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)
12576  __Pyx_GOTREF(__pyx_t_6);
12577  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12578  __pyx_t_5 = NULL;
12579  __pyx_t_7 = 0;
12580  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12581  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12582  if (likely(__pyx_t_5)) {
12583  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12584  __Pyx_INCREF(__pyx_t_5);
12585  __Pyx_INCREF(function);
12586  __Pyx_DECREF_SET(__pyx_t_6, function);
12587  __pyx_t_7 = 1;
12588  }
12589  }
12590  #if CYTHON_FAST_PYCALL
12591  if (PyFunction_Check(__pyx_t_6)) {
12592  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12593  __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)
12594  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12595  __Pyx_GOTREF(__pyx_t_4);
12596  } else
12597  #endif
12598  #if CYTHON_FAST_PYCCALL
12599  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12600  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12601  __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)
12602  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12603  __Pyx_GOTREF(__pyx_t_4);
12604  } else
12605  #endif
12606  {
12607  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12608  __Pyx_GOTREF(__pyx_t_8);
12609  if (__pyx_t_5) {
12610  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12611  }
12612  __Pyx_INCREF(__pyx_v_obj);
12613  __Pyx_GIVEREF(__pyx_v_obj);
12614  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12615  __Pyx_INCREF(__pyx_v_m);
12616  __Pyx_GIVEREF(__pyx_v_m);
12617  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12618  __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)
12619  __Pyx_GOTREF(__pyx_t_4);
12620  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12621  }
12622  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12623  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12624 
12625  /* "PyClical.pyx":1513
12626  * 1
12627  * """
12628  * try: # <<<<<<<<<<<<<<
12629  * math.pow(obj, m)
12630  * except:
12631  */
12632  }
12633  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12634  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12635  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12636  goto __pyx_L8_try_end;
12637  __pyx_L3_error:;
12638  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12639  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12640  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12641  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12642 
12643  /* "PyClical.pyx":1515
12644  * try:
12645  * math.pow(obj, m)
12646  * except: # <<<<<<<<<<<<<<
12647  * return clifford(obj).pow(m)
12648  *
12649  */
12650  /*except:*/ {
12651  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12652  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12653  __Pyx_GOTREF(__pyx_t_4);
12654  __Pyx_GOTREF(__pyx_t_6);
12655  __Pyx_GOTREF(__pyx_t_8);
12656 
12657  /* "PyClical.pyx":1516
12658  * math.pow(obj, m)
12659  * except:
12660  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12661  *
12662  * cpdef inline outer_pow(obj, m):
12663  */
12664  __Pyx_XDECREF(__pyx_r);
12665  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12666  __Pyx_GOTREF(__pyx_t_9);
12667  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_pow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12668  __Pyx_GOTREF(__pyx_t_10);
12669  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12670  __pyx_t_9 = NULL;
12671  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12672  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12673  if (likely(__pyx_t_9)) {
12674  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12675  __Pyx_INCREF(__pyx_t_9);
12676  __Pyx_INCREF(function);
12677  __Pyx_DECREF_SET(__pyx_t_10, function);
12678  }
12679  }
12680  if (!__pyx_t_9) {
12681  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_m); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12682  __Pyx_GOTREF(__pyx_t_5);
12683  } else {
12684  #if CYTHON_FAST_PYCALL
12685  if (PyFunction_Check(__pyx_t_10)) {
12686  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_m};
12687  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12688  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12689  __Pyx_GOTREF(__pyx_t_5);
12690  } else
12691  #endif
12692  #if CYTHON_FAST_PYCCALL
12693  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
12694  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_m};
12695  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12696  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12697  __Pyx_GOTREF(__pyx_t_5);
12698  } else
12699  #endif
12700  {
12701  __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12702  __Pyx_GOTREF(__pyx_t_11);
12703  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
12704  __Pyx_INCREF(__pyx_v_m);
12705  __Pyx_GIVEREF(__pyx_v_m);
12706  PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12707  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12708  __Pyx_GOTREF(__pyx_t_5);
12709  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12710  }
12711  }
12712  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12713  __pyx_r = __pyx_t_5;
12714  __pyx_t_5 = 0;
12715  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12716  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12717  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12718  goto __pyx_L6_except_return;
12719  }
12720  __pyx_L5_except_error:;
12721 
12722  /* "PyClical.pyx":1513
12723  * 1
12724  * """
12725  * try: # <<<<<<<<<<<<<<
12726  * math.pow(obj, m)
12727  * except:
12728  */
12729  __Pyx_XGIVEREF(__pyx_t_1);
12730  __Pyx_XGIVEREF(__pyx_t_2);
12731  __Pyx_XGIVEREF(__pyx_t_3);
12732  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12733  goto __pyx_L1_error;
12734  __pyx_L6_except_return:;
12735  __Pyx_XGIVEREF(__pyx_t_1);
12736  __Pyx_XGIVEREF(__pyx_t_2);
12737  __Pyx_XGIVEREF(__pyx_t_3);
12738  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12739  goto __pyx_L0;
12740  __pyx_L8_try_end:;
12741  }
12742 
12743  /* "PyClical.pyx":1494
12744  * return glucat.max_abs(toClifford(obj))
12745  *
12746  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12747  * """
12748  * Integer power of multivector: obj to the m.
12749  */
12750 
12751  /* function exit code */
12752  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12753  goto __pyx_L0;
12754  __pyx_L1_error:;
12755  __Pyx_XDECREF(__pyx_t_4);
12756  __Pyx_XDECREF(__pyx_t_5);
12757  __Pyx_XDECREF(__pyx_t_6);
12758  __Pyx_XDECREF(__pyx_t_8);
12759  __Pyx_XDECREF(__pyx_t_9);
12760  __Pyx_XDECREF(__pyx_t_10);
12761  __Pyx_XDECREF(__pyx_t_11);
12762  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12763  __pyx_r = 0;
12764  __pyx_L0:;
12765  __Pyx_XGIVEREF(__pyx_r);
12766  __Pyx_RefNannyFinishContext();
12767  return __pyx_r;
12768  }
12769 
12770  /* Python wrapper */
12771  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12772  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 ";
12773  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12774  PyObject *__pyx_v_obj = 0;
12775  PyObject *__pyx_v_m = 0;
12776  PyObject *__pyx_r = 0;
12777  __Pyx_RefNannyDeclarations
12778  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12779  {
12780  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12781  PyObject* values[2] = {0,0};
12782  if (unlikely(__pyx_kwds)) {
12783  Py_ssize_t kw_args;
12784  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12785  switch (pos_args) {
12786  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12787  CYTHON_FALLTHROUGH;
12788  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12789  CYTHON_FALLTHROUGH;
12790  case 0: break;
12791  default: goto __pyx_L5_argtuple_error;
12792  }
12793  kw_args = PyDict_Size(__pyx_kwds);
12794  switch (pos_args) {
12795  case 0:
12796  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12797  else goto __pyx_L5_argtuple_error;
12798  CYTHON_FALLTHROUGH;
12799  case 1:
12800  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12801  else {
12802  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12803  }
12804  }
12805  if (unlikely(kw_args > 0)) {
12806  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12807  }
12808  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12809  goto __pyx_L5_argtuple_error;
12810  } else {
12811  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12812  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12813  }
12814  __pyx_v_obj = values[0];
12815  __pyx_v_m = values[1];
12816  }
12817  goto __pyx_L4_argument_unpacking_done;
12818  __pyx_L5_argtuple_error:;
12819  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12820  __pyx_L3_error:;
12821  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12822  __Pyx_RefNannyFinishContext();
12823  return NULL;
12824  __pyx_L4_argument_unpacking_done:;
12825  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12826 
12827  /* function exit code */
12828  __Pyx_RefNannyFinishContext();
12829  return __pyx_r;
12830  }
12831 
12832  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12833  PyObject *__pyx_r = NULL;
12834  __Pyx_RefNannyDeclarations
12835  PyObject *__pyx_t_1 = NULL;
12836  __Pyx_RefNannySetupContext("pow", 0);
12837  __Pyx_XDECREF(__pyx_r);
12838  __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)
12839  __Pyx_GOTREF(__pyx_t_1);
12840  __pyx_r = __pyx_t_1;
12841  __pyx_t_1 = 0;
12842  goto __pyx_L0;
12843 
12844  /* function exit code */
12845  __pyx_L1_error:;
12846  __Pyx_XDECREF(__pyx_t_1);
12847  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12848  __pyx_r = NULL;
12849  __pyx_L0:;
12850  __Pyx_XGIVEREF(__pyx_r);
12851  __Pyx_RefNannyFinishContext();
12852  return __pyx_r;
12853  }
12854 
12855  /* "PyClical.pyx":1518
12856  * return clifford(obj).pow(m)
12857  *
12858  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12859  * """
12860  * Outer product power of multivector.
12861  */
12862 
12863  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12864  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12865  PyObject *__pyx_r = NULL;
12866  __Pyx_RefNannyDeclarations
12867  PyObject *__pyx_t_1 = NULL;
12868  PyObject *__pyx_t_2 = NULL;
12869  PyObject *__pyx_t_3 = NULL;
12870  PyObject *__pyx_t_4 = NULL;
12871  __Pyx_RefNannySetupContext("outer_pow", 0);
12872 
12873  /* "PyClical.pyx":1525
12874  * 1+3{1}+3{1,2}
12875  * """
12876  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12877  *
12878  * cpdef inline complexifier(obj):
12879  */
12880  __Pyx_XDECREF(__pyx_r);
12881  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
12882  __Pyx_GOTREF(__pyx_t_2);
12883  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_outer_pow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error)
12884  __Pyx_GOTREF(__pyx_t_3);
12885  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12886  __pyx_t_2 = NULL;
12887  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12888  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12889  if (likely(__pyx_t_2)) {
12890  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12891  __Pyx_INCREF(__pyx_t_2);
12892  __Pyx_INCREF(function);
12893  __Pyx_DECREF_SET(__pyx_t_3, function);
12894  }
12895  }
12896  if (!__pyx_t_2) {
12897  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12898  __Pyx_GOTREF(__pyx_t_1);
12899  } else {
12900  #if CYTHON_FAST_PYCALL
12901  if (PyFunction_Check(__pyx_t_3)) {
12902  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_m};
12903  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12904  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12905  __Pyx_GOTREF(__pyx_t_1);
12906  } else
12907  #endif
12908  #if CYTHON_FAST_PYCCALL
12909  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
12910  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_m};
12911  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12912  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12913  __Pyx_GOTREF(__pyx_t_1);
12914  } else
12915  #endif
12916  {
12917  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
12918  __Pyx_GOTREF(__pyx_t_4);
12919  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
12920  __Pyx_INCREF(__pyx_v_m);
12921  __Pyx_GIVEREF(__pyx_v_m);
12922  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
12923  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12924  __Pyx_GOTREF(__pyx_t_1);
12925  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12926  }
12927  }
12928  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12929  __pyx_r = __pyx_t_1;
12930  __pyx_t_1 = 0;
12931  goto __pyx_L0;
12932 
12933  /* "PyClical.pyx":1518
12934  * return clifford(obj).pow(m)
12935  *
12936  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12937  * """
12938  * Outer product power of multivector.
12939  */
12940 
12941  /* function exit code */
12942  __pyx_L1_error:;
12943  __Pyx_XDECREF(__pyx_t_1);
12944  __Pyx_XDECREF(__pyx_t_2);
12945  __Pyx_XDECREF(__pyx_t_3);
12946  __Pyx_XDECREF(__pyx_t_4);
12947  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12948  __pyx_r = 0;
12949  __pyx_L0:;
12950  __Pyx_XGIVEREF(__pyx_r);
12951  __Pyx_RefNannyFinishContext();
12952  return __pyx_r;
12953  }
12954 
12955  /* Python wrapper */
12956  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12957  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 ";
12958  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12959  PyObject *__pyx_v_obj = 0;
12960  PyObject *__pyx_v_m = 0;
12961  PyObject *__pyx_r = 0;
12962  __Pyx_RefNannyDeclarations
12963  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12964  {
12965  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12966  PyObject* values[2] = {0,0};
12967  if (unlikely(__pyx_kwds)) {
12968  Py_ssize_t kw_args;
12969  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12970  switch (pos_args) {
12971  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12972  CYTHON_FALLTHROUGH;
12973  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12974  CYTHON_FALLTHROUGH;
12975  case 0: break;
12976  default: goto __pyx_L5_argtuple_error;
12977  }
12978  kw_args = PyDict_Size(__pyx_kwds);
12979  switch (pos_args) {
12980  case 0:
12981  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12982  else goto __pyx_L5_argtuple_error;
12983  CYTHON_FALLTHROUGH;
12984  case 1:
12985  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12986  else {
12987  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12988  }
12989  }
12990  if (unlikely(kw_args > 0)) {
12991  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12992  }
12993  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12994  goto __pyx_L5_argtuple_error;
12995  } else {
12996  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12997  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12998  }
12999  __pyx_v_obj = values[0];
13000  __pyx_v_m = values[1];
13001  }
13002  goto __pyx_L4_argument_unpacking_done;
13003  __pyx_L5_argtuple_error:;
13004  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
13005  __pyx_L3_error:;
13006  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13007  __Pyx_RefNannyFinishContext();
13008  return NULL;
13009  __pyx_L4_argument_unpacking_done:;
13010  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13011 
13012  /* function exit code */
13013  __Pyx_RefNannyFinishContext();
13014  return __pyx_r;
13015  }
13016 
13017  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13018  PyObject *__pyx_r = NULL;
13019  __Pyx_RefNannyDeclarations
13020  PyObject *__pyx_t_1 = NULL;
13021  __Pyx_RefNannySetupContext("outer_pow", 0);
13022  __Pyx_XDECREF(__pyx_r);
13023  __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)
13024  __Pyx_GOTREF(__pyx_t_1);
13025  __pyx_r = __pyx_t_1;
13026  __pyx_t_1 = 0;
13027  goto __pyx_L0;
13028 
13029  /* function exit code */
13030  __pyx_L1_error:;
13031  __Pyx_XDECREF(__pyx_t_1);
13032  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13033  __pyx_r = NULL;
13034  __pyx_L0:;
13035  __Pyx_XGIVEREF(__pyx_r);
13036  __Pyx_RefNannyFinishContext();
13037  return __pyx_r;
13038  }
13039 
13040  /* "PyClical.pyx":1527
13041  * return clifford(obj).outer_pow(m)
13042  *
13043  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13044  * """
13045  * Square root of -1 which commutes with all members of the frame of the given multivector.
13046  */
13047 
13048  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13049  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13050  PyObject *__pyx_r = NULL;
13051  __Pyx_RefNannyDeclarations
13052  PyObject *__pyx_t_1 = NULL;
13053  PyObject *__pyx_t_2 = NULL;
13054  __Pyx_RefNannySetupContext("complexifier", 0);
13055 
13056  /* "PyClical.pyx":1540
13057  * {-1}
13058  * """
13059  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13060  *
13061  * cpdef inline sqrt(obj, i = None):
13062  */
13063  __Pyx_XDECREF(__pyx_r);
13064  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13065  __Pyx_GOTREF(__pyx_t_1);
13066  __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)
13067  __Pyx_GOTREF(__pyx_t_2);
13068  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13069  __pyx_r = __pyx_t_2;
13070  __pyx_t_2 = 0;
13071  goto __pyx_L0;
13072 
13073  /* "PyClical.pyx":1527
13074  * return clifford(obj).outer_pow(m)
13075  *
13076  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13077  * """
13078  * Square root of -1 which commutes with all members of the frame of the given multivector.
13079  */
13080 
13081  /* function exit code */
13082  __pyx_L1_error:;
13083  __Pyx_XDECREF(__pyx_t_1);
13084  __Pyx_XDECREF(__pyx_t_2);
13085  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13086  __pyx_r = 0;
13087  __pyx_L0:;
13088  __Pyx_XGIVEREF(__pyx_r);
13089  __Pyx_RefNannyFinishContext();
13090  return __pyx_r;
13091  }
13092 
13093  /* Python wrapper */
13094  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13095  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 ";
13096  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13097  PyObject *__pyx_r = 0;
13098  __Pyx_RefNannyDeclarations
13099  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13100  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13101 
13102  /* function exit code */
13103  __Pyx_RefNannyFinishContext();
13104  return __pyx_r;
13105  }
13106 
13107  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13108  PyObject *__pyx_r = NULL;
13109  __Pyx_RefNannyDeclarations
13110  PyObject *__pyx_t_1 = NULL;
13111  __Pyx_RefNannySetupContext("complexifier", 0);
13112  __Pyx_XDECREF(__pyx_r);
13113  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13114  __Pyx_GOTREF(__pyx_t_1);
13115  __pyx_r = __pyx_t_1;
13116  __pyx_t_1 = 0;
13117  goto __pyx_L0;
13118 
13119  /* function exit code */
13120  __pyx_L1_error:;
13121  __Pyx_XDECREF(__pyx_t_1);
13122  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13123  __pyx_r = NULL;
13124  __pyx_L0:;
13125  __Pyx_XGIVEREF(__pyx_r);
13126  __Pyx_RefNannyFinishContext();
13127  return __pyx_r;
13128  }
13129 
13130  /* "PyClical.pyx":1542
13131  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13132  *
13133  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13134  * """
13135  * Square root of multivector with optional complexifier.
13136  */
13137 
13138  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13139  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) {
13140  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13141  PyObject *__pyx_r = NULL;
13142  __Pyx_RefNannyDeclarations
13143  int __pyx_t_1;
13144  int __pyx_t_2;
13145  PyObject *__pyx_t_3 = NULL;
13146  Clifford __pyx_t_4;
13147  PyObject *__pyx_t_5 = NULL;
13148  PyObject *__pyx_t_6 = NULL;
13149  PyObject *__pyx_t_7 = NULL;
13150  PyObject *__pyx_t_8 = NULL;
13151  PyObject *__pyx_t_9 = NULL;
13152  PyObject *__pyx_t_10 = NULL;
13153  PyObject *__pyx_t_11 = NULL;
13154  __Pyx_RefNannySetupContext("sqrt", 0);
13155  if (__pyx_optional_args) {
13156  if (__pyx_optional_args->__pyx_n > 0) {
13157  __pyx_v_i = __pyx_optional_args->i;
13158  }
13159  }
13160 
13161  /* "PyClical.pyx":1557
13162  * -1
13163  * """
13164  * if not (i is None): # <<<<<<<<<<<<<<
13165  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13166  * else:
13167  */
13168  __pyx_t_1 = (__pyx_v_i != Py_None);
13169  __pyx_t_2 = (__pyx_t_1 != 0);
13170  if (__pyx_t_2) {
13171 
13172  /* "PyClical.pyx":1558
13173  * """
13174  * if not (i is None):
13175  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13176  * else:
13177  * try:
13178  */
13179  __Pyx_XDECREF(__pyx_r);
13180  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13181  __Pyx_GOTREF(__pyx_t_3);
13182  try {
13183  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13184  } catch(...) {
13185  __Pyx_CppExn2PyErr();
13186  __PYX_ERR(0, 1558, __pyx_L1_error)
13187  }
13188  __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)
13189  __Pyx_GOTREF(__pyx_t_5);
13190  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13191  __pyx_r = __pyx_t_5;
13192  __pyx_t_5 = 0;
13193  goto __pyx_L0;
13194 
13195  /* "PyClical.pyx":1557
13196  * -1
13197  * """
13198  * if not (i is None): # <<<<<<<<<<<<<<
13199  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13200  * else:
13201  */
13202  }
13203 
13204  /* "PyClical.pyx":1560
13205  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13206  * else:
13207  * try: # <<<<<<<<<<<<<<
13208  * return math.sqrt(obj)
13209  * except:
13210  */
13211  /*else*/ {
13212  {
13213  __Pyx_PyThreadState_declare
13214  __Pyx_PyThreadState_assign
13215  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13216  __Pyx_XGOTREF(__pyx_t_6);
13217  __Pyx_XGOTREF(__pyx_t_7);
13218  __Pyx_XGOTREF(__pyx_t_8);
13219  /*try:*/ {
13220 
13221  /* "PyClical.pyx":1561
13222  * else:
13223  * try:
13224  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13225  * except:
13226  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13227  */
13228  __Pyx_XDECREF(__pyx_r);
13229  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13230  __Pyx_GOTREF(__pyx_t_3);
13231  __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)
13232  __Pyx_GOTREF(__pyx_t_9);
13233  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13234  __pyx_t_3 = NULL;
13235  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13236  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13237  if (likely(__pyx_t_3)) {
13238  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13239  __Pyx_INCREF(__pyx_t_3);
13240  __Pyx_INCREF(function);
13241  __Pyx_DECREF_SET(__pyx_t_9, function);
13242  }
13243  }
13244  if (!__pyx_t_3) {
13245  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13246  __Pyx_GOTREF(__pyx_t_5);
13247  } else {
13248  #if CYTHON_FAST_PYCALL
13249  if (PyFunction_Check(__pyx_t_9)) {
13250  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13251  __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)
13252  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13253  __Pyx_GOTREF(__pyx_t_5);
13254  } else
13255  #endif
13256  #if CYTHON_FAST_PYCCALL
13257  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13258  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13259  __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)
13260  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13261  __Pyx_GOTREF(__pyx_t_5);
13262  } else
13263  #endif
13264  {
13265  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L4_error)
13266  __Pyx_GOTREF(__pyx_t_10);
13267  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13268  __Pyx_INCREF(__pyx_v_obj);
13269  __Pyx_GIVEREF(__pyx_v_obj);
13270  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13271  __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)
13272  __Pyx_GOTREF(__pyx_t_5);
13273  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13274  }
13275  }
13276  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13277  __pyx_r = __pyx_t_5;
13278  __pyx_t_5 = 0;
13279  goto __pyx_L8_try_return;
13280 
13281  /* "PyClical.pyx":1560
13282  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13283  * else:
13284  * try: # <<<<<<<<<<<<<<
13285  * return math.sqrt(obj)
13286  * except:
13287  */
13288  }
13289  __pyx_L4_error:;
13290  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13291  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13292  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13293  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13294 
13295  /* "PyClical.pyx":1562
13296  * try:
13297  * return math.sqrt(obj)
13298  * except: # <<<<<<<<<<<<<<
13299  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13300  *
13301  */
13302  /*except:*/ {
13303  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13304  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13305  __Pyx_GOTREF(__pyx_t_5);
13306  __Pyx_GOTREF(__pyx_t_9);
13307  __Pyx_GOTREF(__pyx_t_10);
13308 
13309  /* "PyClical.pyx":1563
13310  * return math.sqrt(obj)
13311  * except:
13312  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13313  *
13314  * cpdef inline exp(obj):
13315  */
13316  __Pyx_XDECREF(__pyx_r);
13317  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13318  __Pyx_GOTREF(__pyx_t_3);
13319  __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)
13320  __Pyx_GOTREF(__pyx_t_11);
13321  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13322  __pyx_r = __pyx_t_11;
13323  __pyx_t_11 = 0;
13324  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13325  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13326  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13327  goto __pyx_L7_except_return;
13328  }
13329  __pyx_L6_except_error:;
13330 
13331  /* "PyClical.pyx":1560
13332  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13333  * else:
13334  * try: # <<<<<<<<<<<<<<
13335  * return math.sqrt(obj)
13336  * except:
13337  */
13338  __Pyx_XGIVEREF(__pyx_t_6);
13339  __Pyx_XGIVEREF(__pyx_t_7);
13340  __Pyx_XGIVEREF(__pyx_t_8);
13341  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13342  goto __pyx_L1_error;
13343  __pyx_L8_try_return:;
13344  __Pyx_XGIVEREF(__pyx_t_6);
13345  __Pyx_XGIVEREF(__pyx_t_7);
13346  __Pyx_XGIVEREF(__pyx_t_8);
13347  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13348  goto __pyx_L0;
13349  __pyx_L7_except_return:;
13350  __Pyx_XGIVEREF(__pyx_t_6);
13351  __Pyx_XGIVEREF(__pyx_t_7);
13352  __Pyx_XGIVEREF(__pyx_t_8);
13353  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13354  goto __pyx_L0;
13355  }
13356  }
13357 
13358  /* "PyClical.pyx":1542
13359  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13360  *
13361  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13362  * """
13363  * Square root of multivector with optional complexifier.
13364  */
13365 
13366  /* function exit code */
13367  __pyx_L1_error:;
13368  __Pyx_XDECREF(__pyx_t_3);
13369  __Pyx_XDECREF(__pyx_t_5);
13370  __Pyx_XDECREF(__pyx_t_9);
13371  __Pyx_XDECREF(__pyx_t_10);
13372  __Pyx_XDECREF(__pyx_t_11);
13373  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13374  __pyx_r = 0;
13375  __pyx_L0:;
13376  __Pyx_XGIVEREF(__pyx_r);
13377  __Pyx_RefNannyFinishContext();
13378  return __pyx_r;
13379  }
13380 
13381  /* Python wrapper */
13382  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13383  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 ";
13384  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13385  PyObject *__pyx_v_obj = 0;
13386  PyObject *__pyx_v_i = 0;
13387  PyObject *__pyx_r = 0;
13388  __Pyx_RefNannyDeclarations
13389  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13390  {
13391  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13392  PyObject* values[2] = {0,0};
13393  values[1] = ((PyObject *)Py_None);
13394  if (unlikely(__pyx_kwds)) {
13395  Py_ssize_t kw_args;
13396  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13397  switch (pos_args) {
13398  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13399  CYTHON_FALLTHROUGH;
13400  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13401  CYTHON_FALLTHROUGH;
13402  case 0: break;
13403  default: goto __pyx_L5_argtuple_error;
13404  }
13405  kw_args = PyDict_Size(__pyx_kwds);
13406  switch (pos_args) {
13407  case 0:
13408  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13409  else goto __pyx_L5_argtuple_error;
13410  CYTHON_FALLTHROUGH;
13411  case 1:
13412  if (kw_args > 0) {
13413  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13414  if (value) { values[1] = value; kw_args--; }
13415  }
13416  }
13417  if (unlikely(kw_args > 0)) {
13418  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13419  }
13420  } else {
13421  switch (PyTuple_GET_SIZE(__pyx_args)) {
13422  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13423  CYTHON_FALLTHROUGH;
13424  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13425  break;
13426  default: goto __pyx_L5_argtuple_error;
13427  }
13428  }
13429  __pyx_v_obj = values[0];
13430  __pyx_v_i = values[1];
13431  }
13432  goto __pyx_L4_argument_unpacking_done;
13433  __pyx_L5_argtuple_error:;
13434  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13435  __pyx_L3_error:;
13436  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13437  __Pyx_RefNannyFinishContext();
13438  return NULL;
13439  __pyx_L4_argument_unpacking_done:;
13440  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13441 
13442  /* function exit code */
13443  __Pyx_RefNannyFinishContext();
13444  return __pyx_r;
13445  }
13446 
13447  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13448  PyObject *__pyx_r = NULL;
13449  __Pyx_RefNannyDeclarations
13450  PyObject *__pyx_t_1 = NULL;
13451  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13452  __Pyx_RefNannySetupContext("sqrt", 0);
13453  __Pyx_XDECREF(__pyx_r);
13454  __pyx_t_2.__pyx_n = 1;
13455  __pyx_t_2.i = __pyx_v_i;
13456  __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)
13457  __Pyx_GOTREF(__pyx_t_1);
13458  __pyx_r = __pyx_t_1;
13459  __pyx_t_1 = 0;
13460  goto __pyx_L0;
13461 
13462  /* function exit code */
13463  __pyx_L1_error:;
13464  __Pyx_XDECREF(__pyx_t_1);
13465  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13466  __pyx_r = NULL;
13467  __pyx_L0:;
13468  __Pyx_XGIVEREF(__pyx_r);
13469  __Pyx_RefNannyFinishContext();
13470  return __pyx_r;
13471  }
13472 
13473  /* "PyClical.pyx":1565
13474  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13475  *
13476  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13477  * """
13478  * Exponential of multivector.
13479  */
13480 
13481  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13482  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13483  PyObject *__pyx_r = NULL;
13484  __Pyx_RefNannyDeclarations
13485  PyObject *__pyx_t_1 = NULL;
13486  PyObject *__pyx_t_2 = NULL;
13487  PyObject *__pyx_t_3 = NULL;
13488  PyObject *__pyx_t_4 = NULL;
13489  PyObject *__pyx_t_5 = NULL;
13490  PyObject *__pyx_t_6 = NULL;
13491  PyObject *__pyx_t_7 = NULL;
13492  PyObject *__pyx_t_8 = NULL;
13493  __Pyx_RefNannySetupContext("exp", 0);
13494 
13495  /* "PyClical.pyx":1574
13496  * {1,2}
13497  * """
13498  * try: # <<<<<<<<<<<<<<
13499  * return math.exp(obj)
13500  * except:
13501  */
13502  {
13503  __Pyx_PyThreadState_declare
13504  __Pyx_PyThreadState_assign
13505  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13506  __Pyx_XGOTREF(__pyx_t_1);
13507  __Pyx_XGOTREF(__pyx_t_2);
13508  __Pyx_XGOTREF(__pyx_t_3);
13509  /*try:*/ {
13510 
13511  /* "PyClical.pyx":1575
13512  * """
13513  * try:
13514  * return math.exp(obj) # <<<<<<<<<<<<<<
13515  * except:
13516  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13517  */
13518  __Pyx_XDECREF(__pyx_r);
13519  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13520  __Pyx_GOTREF(__pyx_t_5);
13521  __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)
13522  __Pyx_GOTREF(__pyx_t_6);
13523  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13524  __pyx_t_5 = NULL;
13525  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13526  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13527  if (likely(__pyx_t_5)) {
13528  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13529  __Pyx_INCREF(__pyx_t_5);
13530  __Pyx_INCREF(function);
13531  __Pyx_DECREF_SET(__pyx_t_6, function);
13532  }
13533  }
13534  if (!__pyx_t_5) {
13535  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13536  __Pyx_GOTREF(__pyx_t_4);
13537  } else {
13538  #if CYTHON_FAST_PYCALL
13539  if (PyFunction_Check(__pyx_t_6)) {
13540  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13541  __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)
13542  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13543  __Pyx_GOTREF(__pyx_t_4);
13544  } else
13545  #endif
13546  #if CYTHON_FAST_PYCCALL
13547  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13548  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13549  __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)
13550  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13551  __Pyx_GOTREF(__pyx_t_4);
13552  } else
13553  #endif
13554  {
13555  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L3_error)
13556  __Pyx_GOTREF(__pyx_t_7);
13557  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13558  __Pyx_INCREF(__pyx_v_obj);
13559  __Pyx_GIVEREF(__pyx_v_obj);
13560  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13561  __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)
13562  __Pyx_GOTREF(__pyx_t_4);
13563  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13564  }
13565  }
13566  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13567  __pyx_r = __pyx_t_4;
13568  __pyx_t_4 = 0;
13569  goto __pyx_L7_try_return;
13570 
13571  /* "PyClical.pyx":1574
13572  * {1,2}
13573  * """
13574  * try: # <<<<<<<<<<<<<<
13575  * return math.exp(obj)
13576  * except:
13577  */
13578  }
13579  __pyx_L3_error:;
13580  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13581  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13582  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13583  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13584 
13585  /* "PyClical.pyx":1576
13586  * try:
13587  * return math.exp(obj)
13588  * except: # <<<<<<<<<<<<<<
13589  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13590  *
13591  */
13592  /*except:*/ {
13593  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13594  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13595  __Pyx_GOTREF(__pyx_t_4);
13596  __Pyx_GOTREF(__pyx_t_6);
13597  __Pyx_GOTREF(__pyx_t_7);
13598 
13599  /* "PyClical.pyx":1577
13600  * return math.exp(obj)
13601  * except:
13602  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13603  *
13604  * cpdef inline log(obj,i = None):
13605  */
13606  __Pyx_XDECREF(__pyx_r);
13607  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13608  __Pyx_GOTREF(__pyx_t_5);
13609  __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)
13610  __Pyx_GOTREF(__pyx_t_8);
13611  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13612  __pyx_r = __pyx_t_8;
13613  __pyx_t_8 = 0;
13614  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13615  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13616  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13617  goto __pyx_L6_except_return;
13618  }
13619  __pyx_L5_except_error:;
13620 
13621  /* "PyClical.pyx":1574
13622  * {1,2}
13623  * """
13624  * try: # <<<<<<<<<<<<<<
13625  * return math.exp(obj)
13626  * except:
13627  */
13628  __Pyx_XGIVEREF(__pyx_t_1);
13629  __Pyx_XGIVEREF(__pyx_t_2);
13630  __Pyx_XGIVEREF(__pyx_t_3);
13631  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13632  goto __pyx_L1_error;
13633  __pyx_L7_try_return:;
13634  __Pyx_XGIVEREF(__pyx_t_1);
13635  __Pyx_XGIVEREF(__pyx_t_2);
13636  __Pyx_XGIVEREF(__pyx_t_3);
13637  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13638  goto __pyx_L0;
13639  __pyx_L6_except_return:;
13640  __Pyx_XGIVEREF(__pyx_t_1);
13641  __Pyx_XGIVEREF(__pyx_t_2);
13642  __Pyx_XGIVEREF(__pyx_t_3);
13643  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13644  goto __pyx_L0;
13645  }
13646 
13647  /* "PyClical.pyx":1565
13648  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13649  *
13650  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13651  * """
13652  * Exponential of multivector.
13653  */
13654 
13655  /* function exit code */
13656  __pyx_L1_error:;
13657  __Pyx_XDECREF(__pyx_t_4);
13658  __Pyx_XDECREF(__pyx_t_5);
13659  __Pyx_XDECREF(__pyx_t_6);
13660  __Pyx_XDECREF(__pyx_t_7);
13661  __Pyx_XDECREF(__pyx_t_8);
13662  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13663  __pyx_r = 0;
13664  __pyx_L0:;
13665  __Pyx_XGIVEREF(__pyx_r);
13666  __Pyx_RefNannyFinishContext();
13667  return __pyx_r;
13668  }
13669 
13670  /* Python wrapper */
13671  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13672  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 ";
13673  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13674  PyObject *__pyx_r = 0;
13675  __Pyx_RefNannyDeclarations
13676  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13677  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13678 
13679  /* function exit code */
13680  __Pyx_RefNannyFinishContext();
13681  return __pyx_r;
13682  }
13683 
13684  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13685  PyObject *__pyx_r = NULL;
13686  __Pyx_RefNannyDeclarations
13687  PyObject *__pyx_t_1 = NULL;
13688  __Pyx_RefNannySetupContext("exp", 0);
13689  __Pyx_XDECREF(__pyx_r);
13690  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13691  __Pyx_GOTREF(__pyx_t_1);
13692  __pyx_r = __pyx_t_1;
13693  __pyx_t_1 = 0;
13694  goto __pyx_L0;
13695 
13696  /* function exit code */
13697  __pyx_L1_error:;
13698  __Pyx_XDECREF(__pyx_t_1);
13699  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13700  __pyx_r = NULL;
13701  __pyx_L0:;
13702  __Pyx_XGIVEREF(__pyx_r);
13703  __Pyx_RefNannyFinishContext();
13704  return __pyx_r;
13705  }
13706 
13707  /* "PyClical.pyx":1579
13708  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13709  *
13710  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13711  * """
13712  * Natural logarithm of multivector with optional complexifier.
13713  */
13714 
13715  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13716  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) {
13717  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13718  PyObject *__pyx_r = NULL;
13719  __Pyx_RefNannyDeclarations
13720  int __pyx_t_1;
13721  int __pyx_t_2;
13722  PyObject *__pyx_t_3 = NULL;
13723  Clifford __pyx_t_4;
13724  PyObject *__pyx_t_5 = NULL;
13725  PyObject *__pyx_t_6 = NULL;
13726  PyObject *__pyx_t_7 = NULL;
13727  PyObject *__pyx_t_8 = NULL;
13728  PyObject *__pyx_t_9 = NULL;
13729  PyObject *__pyx_t_10 = NULL;
13730  PyObject *__pyx_t_11 = NULL;
13731  __Pyx_RefNannySetupContext("log", 0);
13732  if (__pyx_optional_args) {
13733  if (__pyx_optional_args->__pyx_n > 0) {
13734  __pyx_v_i = __pyx_optional_args->i;
13735  }
13736  }
13737 
13738  /* "PyClical.pyx":1594
13739  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13740  * """
13741  * if not (i is None): # <<<<<<<<<<<<<<
13742  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13743  * else:
13744  */
13745  __pyx_t_1 = (__pyx_v_i != Py_None);
13746  __pyx_t_2 = (__pyx_t_1 != 0);
13747  if (__pyx_t_2) {
13748 
13749  /* "PyClical.pyx":1595
13750  * """
13751  * if not (i is None):
13752  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13753  * else:
13754  * try:
13755  */
13756  __Pyx_XDECREF(__pyx_r);
13757  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13758  __Pyx_GOTREF(__pyx_t_3);
13759  try {
13760  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13761  } catch(...) {
13762  __Pyx_CppExn2PyErr();
13763  __PYX_ERR(0, 1595, __pyx_L1_error)
13764  }
13765  __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)
13766  __Pyx_GOTREF(__pyx_t_5);
13767  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13768  __pyx_r = __pyx_t_5;
13769  __pyx_t_5 = 0;
13770  goto __pyx_L0;
13771 
13772  /* "PyClical.pyx":1594
13773  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13774  * """
13775  * if not (i is None): # <<<<<<<<<<<<<<
13776  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13777  * else:
13778  */
13779  }
13780 
13781  /* "PyClical.pyx":1597
13782  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13783  * else:
13784  * try: # <<<<<<<<<<<<<<
13785  * return math.log(obj)
13786  * except:
13787  */
13788  /*else*/ {
13789  {
13790  __Pyx_PyThreadState_declare
13791  __Pyx_PyThreadState_assign
13792  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13793  __Pyx_XGOTREF(__pyx_t_6);
13794  __Pyx_XGOTREF(__pyx_t_7);
13795  __Pyx_XGOTREF(__pyx_t_8);
13796  /*try:*/ {
13797 
13798  /* "PyClical.pyx":1598
13799  * else:
13800  * try:
13801  * return math.log(obj) # <<<<<<<<<<<<<<
13802  * except:
13803  * return clifford().wrap( glucat.log(toClifford(obj)) )
13804  */
13805  __Pyx_XDECREF(__pyx_r);
13806  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13807  __Pyx_GOTREF(__pyx_t_3);
13808  __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)
13809  __Pyx_GOTREF(__pyx_t_9);
13810  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13811  __pyx_t_3 = NULL;
13812  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13813  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13814  if (likely(__pyx_t_3)) {
13815  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13816  __Pyx_INCREF(__pyx_t_3);
13817  __Pyx_INCREF(function);
13818  __Pyx_DECREF_SET(__pyx_t_9, function);
13819  }
13820  }
13821  if (!__pyx_t_3) {
13822  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13823  __Pyx_GOTREF(__pyx_t_5);
13824  } else {
13825  #if CYTHON_FAST_PYCALL
13826  if (PyFunction_Check(__pyx_t_9)) {
13827  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13828  __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)
13829  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13830  __Pyx_GOTREF(__pyx_t_5);
13831  } else
13832  #endif
13833  #if CYTHON_FAST_PYCCALL
13834  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13835  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13836  __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)
13837  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13838  __Pyx_GOTREF(__pyx_t_5);
13839  } else
13840  #endif
13841  {
13842  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1598, __pyx_L4_error)
13843  __Pyx_GOTREF(__pyx_t_10);
13844  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13845  __Pyx_INCREF(__pyx_v_obj);
13846  __Pyx_GIVEREF(__pyx_v_obj);
13847  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13848  __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)
13849  __Pyx_GOTREF(__pyx_t_5);
13850  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13851  }
13852  }
13853  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13854  __pyx_r = __pyx_t_5;
13855  __pyx_t_5 = 0;
13856  goto __pyx_L8_try_return;
13857 
13858  /* "PyClical.pyx":1597
13859  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13860  * else:
13861  * try: # <<<<<<<<<<<<<<
13862  * return math.log(obj)
13863  * except:
13864  */
13865  }
13866  __pyx_L4_error:;
13867  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13868  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13869  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13870  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13871 
13872  /* "PyClical.pyx":1599
13873  * try:
13874  * return math.log(obj)
13875  * except: # <<<<<<<<<<<<<<
13876  * return clifford().wrap( glucat.log(toClifford(obj)) )
13877  *
13878  */
13879  /*except:*/ {
13880  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13881  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13882  __Pyx_GOTREF(__pyx_t_5);
13883  __Pyx_GOTREF(__pyx_t_9);
13884  __Pyx_GOTREF(__pyx_t_10);
13885 
13886  /* "PyClical.pyx":1600
13887  * return math.log(obj)
13888  * except:
13889  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13890  *
13891  * cpdef inline cos(obj,i = None):
13892  */
13893  __Pyx_XDECREF(__pyx_r);
13894  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13895  __Pyx_GOTREF(__pyx_t_3);
13896  __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)
13897  __Pyx_GOTREF(__pyx_t_11);
13898  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13899  __pyx_r = __pyx_t_11;
13900  __pyx_t_11 = 0;
13901  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13902  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13903  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13904  goto __pyx_L7_except_return;
13905  }
13906  __pyx_L6_except_error:;
13907 
13908  /* "PyClical.pyx":1597
13909  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13910  * else:
13911  * try: # <<<<<<<<<<<<<<
13912  * return math.log(obj)
13913  * except:
13914  */
13915  __Pyx_XGIVEREF(__pyx_t_6);
13916  __Pyx_XGIVEREF(__pyx_t_7);
13917  __Pyx_XGIVEREF(__pyx_t_8);
13918  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13919  goto __pyx_L1_error;
13920  __pyx_L8_try_return:;
13921  __Pyx_XGIVEREF(__pyx_t_6);
13922  __Pyx_XGIVEREF(__pyx_t_7);
13923  __Pyx_XGIVEREF(__pyx_t_8);
13924  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13925  goto __pyx_L0;
13926  __pyx_L7_except_return:;
13927  __Pyx_XGIVEREF(__pyx_t_6);
13928  __Pyx_XGIVEREF(__pyx_t_7);
13929  __Pyx_XGIVEREF(__pyx_t_8);
13930  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13931  goto __pyx_L0;
13932  }
13933  }
13934 
13935  /* "PyClical.pyx":1579
13936  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13937  *
13938  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13939  * """
13940  * Natural logarithm of multivector with optional complexifier.
13941  */
13942 
13943  /* function exit code */
13944  __pyx_L1_error:;
13945  __Pyx_XDECREF(__pyx_t_3);
13946  __Pyx_XDECREF(__pyx_t_5);
13947  __Pyx_XDECREF(__pyx_t_9);
13948  __Pyx_XDECREF(__pyx_t_10);
13949  __Pyx_XDECREF(__pyx_t_11);
13950  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13951  __pyx_r = 0;
13952  __pyx_L0:;
13953  __Pyx_XGIVEREF(__pyx_r);
13954  __Pyx_RefNannyFinishContext();
13955  return __pyx_r;
13956  }
13957 
13958  /* Python wrapper */
13959  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13960  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 ";
13961  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13962  PyObject *__pyx_v_obj = 0;
13963  PyObject *__pyx_v_i = 0;
13964  PyObject *__pyx_r = 0;
13965  __Pyx_RefNannyDeclarations
13966  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13967  {
13968  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13969  PyObject* values[2] = {0,0};
13970  values[1] = ((PyObject *)Py_None);
13971  if (unlikely(__pyx_kwds)) {
13972  Py_ssize_t kw_args;
13973  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13974  switch (pos_args) {
13975  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13976  CYTHON_FALLTHROUGH;
13977  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13978  CYTHON_FALLTHROUGH;
13979  case 0: break;
13980  default: goto __pyx_L5_argtuple_error;
13981  }
13982  kw_args = PyDict_Size(__pyx_kwds);
13983  switch (pos_args) {
13984  case 0:
13985  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13986  else goto __pyx_L5_argtuple_error;
13987  CYTHON_FALLTHROUGH;
13988  case 1:
13989  if (kw_args > 0) {
13990  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13991  if (value) { values[1] = value; kw_args--; }
13992  }
13993  }
13994  if (unlikely(kw_args > 0)) {
13995  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13996  }
13997  } else {
13998  switch (PyTuple_GET_SIZE(__pyx_args)) {
13999  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14000  CYTHON_FALLTHROUGH;
14001  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14002  break;
14003  default: goto __pyx_L5_argtuple_error;
14004  }
14005  }
14006  __pyx_v_obj = values[0];
14007  __pyx_v_i = values[1];
14008  }
14009  goto __pyx_L4_argument_unpacking_done;
14010  __pyx_L5_argtuple_error:;
14011  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
14012  __pyx_L3_error:;
14013  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14014  __Pyx_RefNannyFinishContext();
14015  return NULL;
14016  __pyx_L4_argument_unpacking_done:;
14017  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14018 
14019  /* function exit code */
14020  __Pyx_RefNannyFinishContext();
14021  return __pyx_r;
14022  }
14023 
14024  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14025  PyObject *__pyx_r = NULL;
14026  __Pyx_RefNannyDeclarations
14027  PyObject *__pyx_t_1 = NULL;
14028  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14029  __Pyx_RefNannySetupContext("log", 0);
14030  __Pyx_XDECREF(__pyx_r);
14031  __pyx_t_2.__pyx_n = 1;
14032  __pyx_t_2.i = __pyx_v_i;
14033  __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)
14034  __Pyx_GOTREF(__pyx_t_1);
14035  __pyx_r = __pyx_t_1;
14036  __pyx_t_1 = 0;
14037  goto __pyx_L0;
14038 
14039  /* function exit code */
14040  __pyx_L1_error:;
14041  __Pyx_XDECREF(__pyx_t_1);
14042  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14043  __pyx_r = NULL;
14044  __pyx_L0:;
14045  __Pyx_XGIVEREF(__pyx_r);
14046  __Pyx_RefNannyFinishContext();
14047  return __pyx_r;
14048  }
14049 
14050  /* "PyClical.pyx":1602
14051  * return clifford().wrap( glucat.log(toClifford(obj)) )
14052  *
14053  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14054  * """
14055  * Cosine of multivector with optional complexifier.
14056  */
14057 
14058  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14059  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) {
14060  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14061  PyObject *__pyx_r = NULL;
14062  __Pyx_RefNannyDeclarations
14063  int __pyx_t_1;
14064  int __pyx_t_2;
14065  PyObject *__pyx_t_3 = NULL;
14066  Clifford __pyx_t_4;
14067  PyObject *__pyx_t_5 = NULL;
14068  PyObject *__pyx_t_6 = NULL;
14069  PyObject *__pyx_t_7 = NULL;
14070  PyObject *__pyx_t_8 = NULL;
14071  PyObject *__pyx_t_9 = NULL;
14072  PyObject *__pyx_t_10 = NULL;
14073  PyObject *__pyx_t_11 = NULL;
14074  __Pyx_RefNannySetupContext("cos", 0);
14075  if (__pyx_optional_args) {
14076  if (__pyx_optional_args->__pyx_n > 0) {
14077  __pyx_v_i = __pyx_optional_args->i;
14078  }
14079  }
14080 
14081  /* "PyClical.pyx":1611
14082  * {1,2}
14083  * """
14084  * if not (i is None): # <<<<<<<<<<<<<<
14085  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14086  * else:
14087  */
14088  __pyx_t_1 = (__pyx_v_i != Py_None);
14089  __pyx_t_2 = (__pyx_t_1 != 0);
14090  if (__pyx_t_2) {
14091 
14092  /* "PyClical.pyx":1612
14093  * """
14094  * if not (i is None):
14095  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14096  * else:
14097  * try:
14098  */
14099  __Pyx_XDECREF(__pyx_r);
14100  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
14101  __Pyx_GOTREF(__pyx_t_3);
14102  try {
14103  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14104  } catch(...) {
14105  __Pyx_CppExn2PyErr();
14106  __PYX_ERR(0, 1612, __pyx_L1_error)
14107  }
14108  __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)
14109  __Pyx_GOTREF(__pyx_t_5);
14110  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14111  __pyx_r = __pyx_t_5;
14112  __pyx_t_5 = 0;
14113  goto __pyx_L0;
14114 
14115  /* "PyClical.pyx":1611
14116  * {1,2}
14117  * """
14118  * if not (i is None): # <<<<<<<<<<<<<<
14119  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14120  * else:
14121  */
14122  }
14123 
14124  /* "PyClical.pyx":1614
14125  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14126  * else:
14127  * try: # <<<<<<<<<<<<<<
14128  * return math.cos(obj)
14129  * except:
14130  */
14131  /*else*/ {
14132  {
14133  __Pyx_PyThreadState_declare
14134  __Pyx_PyThreadState_assign
14135  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14136  __Pyx_XGOTREF(__pyx_t_6);
14137  __Pyx_XGOTREF(__pyx_t_7);
14138  __Pyx_XGOTREF(__pyx_t_8);
14139  /*try:*/ {
14140 
14141  /* "PyClical.pyx":1615
14142  * else:
14143  * try:
14144  * return math.cos(obj) # <<<<<<<<<<<<<<
14145  * except:
14146  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14147  */
14148  __Pyx_XDECREF(__pyx_r);
14149  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14150  __Pyx_GOTREF(__pyx_t_3);
14151  __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)
14152  __Pyx_GOTREF(__pyx_t_9);
14153  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14154  __pyx_t_3 = NULL;
14155  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14156  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14157  if (likely(__pyx_t_3)) {
14158  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14159  __Pyx_INCREF(__pyx_t_3);
14160  __Pyx_INCREF(function);
14161  __Pyx_DECREF_SET(__pyx_t_9, function);
14162  }
14163  }
14164  if (!__pyx_t_3) {
14165  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14166  __Pyx_GOTREF(__pyx_t_5);
14167  } else {
14168  #if CYTHON_FAST_PYCALL
14169  if (PyFunction_Check(__pyx_t_9)) {
14170  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14171  __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)
14172  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14173  __Pyx_GOTREF(__pyx_t_5);
14174  } else
14175  #endif
14176  #if CYTHON_FAST_PYCCALL
14177  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14178  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14179  __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)
14180  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14181  __Pyx_GOTREF(__pyx_t_5);
14182  } else
14183  #endif
14184  {
14185  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1615, __pyx_L4_error)
14186  __Pyx_GOTREF(__pyx_t_10);
14187  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14188  __Pyx_INCREF(__pyx_v_obj);
14189  __Pyx_GIVEREF(__pyx_v_obj);
14190  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14191  __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)
14192  __Pyx_GOTREF(__pyx_t_5);
14193  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14194  }
14195  }
14196  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14197  __pyx_r = __pyx_t_5;
14198  __pyx_t_5 = 0;
14199  goto __pyx_L8_try_return;
14200 
14201  /* "PyClical.pyx":1614
14202  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14203  * else:
14204  * try: # <<<<<<<<<<<<<<
14205  * return math.cos(obj)
14206  * except:
14207  */
14208  }
14209  __pyx_L4_error:;
14210  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14211  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14212  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14213  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14214 
14215  /* "PyClical.pyx":1616
14216  * try:
14217  * return math.cos(obj)
14218  * except: # <<<<<<<<<<<<<<
14219  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14220  *
14221  */
14222  /*except:*/ {
14223  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14224  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14225  __Pyx_GOTREF(__pyx_t_5);
14226  __Pyx_GOTREF(__pyx_t_9);
14227  __Pyx_GOTREF(__pyx_t_10);
14228 
14229  /* "PyClical.pyx":1617
14230  * return math.cos(obj)
14231  * except:
14232  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14233  *
14234  * cpdef inline acos(obj,i = None):
14235  */
14236  __Pyx_XDECREF(__pyx_r);
14237  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14238  __Pyx_GOTREF(__pyx_t_3);
14239  __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)
14240  __Pyx_GOTREF(__pyx_t_11);
14241  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14242  __pyx_r = __pyx_t_11;
14243  __pyx_t_11 = 0;
14244  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14245  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14246  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14247  goto __pyx_L7_except_return;
14248  }
14249  __pyx_L6_except_error:;
14250 
14251  /* "PyClical.pyx":1614
14252  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14253  * else:
14254  * try: # <<<<<<<<<<<<<<
14255  * return math.cos(obj)
14256  * except:
14257  */
14258  __Pyx_XGIVEREF(__pyx_t_6);
14259  __Pyx_XGIVEREF(__pyx_t_7);
14260  __Pyx_XGIVEREF(__pyx_t_8);
14261  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14262  goto __pyx_L1_error;
14263  __pyx_L8_try_return:;
14264  __Pyx_XGIVEREF(__pyx_t_6);
14265  __Pyx_XGIVEREF(__pyx_t_7);
14266  __Pyx_XGIVEREF(__pyx_t_8);
14267  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14268  goto __pyx_L0;
14269  __pyx_L7_except_return:;
14270  __Pyx_XGIVEREF(__pyx_t_6);
14271  __Pyx_XGIVEREF(__pyx_t_7);
14272  __Pyx_XGIVEREF(__pyx_t_8);
14273  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14274  goto __pyx_L0;
14275  }
14276  }
14277 
14278  /* "PyClical.pyx":1602
14279  * return clifford().wrap( glucat.log(toClifford(obj)) )
14280  *
14281  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14282  * """
14283  * Cosine of multivector with optional complexifier.
14284  */
14285 
14286  /* function exit code */
14287  __pyx_L1_error:;
14288  __Pyx_XDECREF(__pyx_t_3);
14289  __Pyx_XDECREF(__pyx_t_5);
14290  __Pyx_XDECREF(__pyx_t_9);
14291  __Pyx_XDECREF(__pyx_t_10);
14292  __Pyx_XDECREF(__pyx_t_11);
14293  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14294  __pyx_r = 0;
14295  __pyx_L0:;
14296  __Pyx_XGIVEREF(__pyx_r);
14297  __Pyx_RefNannyFinishContext();
14298  return __pyx_r;
14299  }
14300 
14301  /* Python wrapper */
14302  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14303  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 ";
14304  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14305  PyObject *__pyx_v_obj = 0;
14306  PyObject *__pyx_v_i = 0;
14307  PyObject *__pyx_r = 0;
14308  __Pyx_RefNannyDeclarations
14309  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14310  {
14311  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14312  PyObject* values[2] = {0,0};
14313  values[1] = ((PyObject *)Py_None);
14314  if (unlikely(__pyx_kwds)) {
14315  Py_ssize_t kw_args;
14316  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14317  switch (pos_args) {
14318  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14319  CYTHON_FALLTHROUGH;
14320  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14321  CYTHON_FALLTHROUGH;
14322  case 0: break;
14323  default: goto __pyx_L5_argtuple_error;
14324  }
14325  kw_args = PyDict_Size(__pyx_kwds);
14326  switch (pos_args) {
14327  case 0:
14328  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14329  else goto __pyx_L5_argtuple_error;
14330  CYTHON_FALLTHROUGH;
14331  case 1:
14332  if (kw_args > 0) {
14333  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14334  if (value) { values[1] = value; kw_args--; }
14335  }
14336  }
14337  if (unlikely(kw_args > 0)) {
14338  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14339  }
14340  } else {
14341  switch (PyTuple_GET_SIZE(__pyx_args)) {
14342  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14343  CYTHON_FALLTHROUGH;
14344  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14345  break;
14346  default: goto __pyx_L5_argtuple_error;
14347  }
14348  }
14349  __pyx_v_obj = values[0];
14350  __pyx_v_i = values[1];
14351  }
14352  goto __pyx_L4_argument_unpacking_done;
14353  __pyx_L5_argtuple_error:;
14354  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14355  __pyx_L3_error:;
14356  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14357  __Pyx_RefNannyFinishContext();
14358  return NULL;
14359  __pyx_L4_argument_unpacking_done:;
14360  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14361 
14362  /* function exit code */
14363  __Pyx_RefNannyFinishContext();
14364  return __pyx_r;
14365  }
14366 
14367  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14368  PyObject *__pyx_r = NULL;
14369  __Pyx_RefNannyDeclarations
14370  PyObject *__pyx_t_1 = NULL;
14371  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14372  __Pyx_RefNannySetupContext("cos", 0);
14373  __Pyx_XDECREF(__pyx_r);
14374  __pyx_t_2.__pyx_n = 1;
14375  __pyx_t_2.i = __pyx_v_i;
14376  __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)
14377  __Pyx_GOTREF(__pyx_t_1);
14378  __pyx_r = __pyx_t_1;
14379  __pyx_t_1 = 0;
14380  goto __pyx_L0;
14381 
14382  /* function exit code */
14383  __pyx_L1_error:;
14384  __Pyx_XDECREF(__pyx_t_1);
14385  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14386  __pyx_r = NULL;
14387  __pyx_L0:;
14388  __Pyx_XGIVEREF(__pyx_r);
14389  __Pyx_RefNannyFinishContext();
14390  return __pyx_r;
14391  }
14392 
14393  /* "PyClical.pyx":1619
14394  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14395  *
14396  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14397  * """
14398  * Inverse cosine of multivector with optional complexifier.
14399  */
14400 
14401  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14402  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) {
14403  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14404  PyObject *__pyx_r = NULL;
14405  __Pyx_RefNannyDeclarations
14406  int __pyx_t_1;
14407  int __pyx_t_2;
14408  PyObject *__pyx_t_3 = NULL;
14409  Clifford __pyx_t_4;
14410  PyObject *__pyx_t_5 = NULL;
14411  PyObject *__pyx_t_6 = NULL;
14412  PyObject *__pyx_t_7 = NULL;
14413  PyObject *__pyx_t_8 = NULL;
14414  PyObject *__pyx_t_9 = NULL;
14415  PyObject *__pyx_t_10 = NULL;
14416  PyObject *__pyx_t_11 = NULL;
14417  __Pyx_RefNannySetupContext("acos", 0);
14418  if (__pyx_optional_args) {
14419  if (__pyx_optional_args->__pyx_n > 0) {
14420  __pyx_v_i = __pyx_optional_args->i;
14421  }
14422  }
14423 
14424  /* "PyClical.pyx":1632
14425  * {1,2}
14426  * """
14427  * if not (i is None): # <<<<<<<<<<<<<<
14428  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14429  * else:
14430  */
14431  __pyx_t_1 = (__pyx_v_i != Py_None);
14432  __pyx_t_2 = (__pyx_t_1 != 0);
14433  if (__pyx_t_2) {
14434 
14435  /* "PyClical.pyx":1633
14436  * """
14437  * if not (i is None):
14438  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14439  * else:
14440  * try:
14441  */
14442  __Pyx_XDECREF(__pyx_r);
14443  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14444  __Pyx_GOTREF(__pyx_t_3);
14445  try {
14446  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14447  } catch(...) {
14448  __Pyx_CppExn2PyErr();
14449  __PYX_ERR(0, 1633, __pyx_L1_error)
14450  }
14451  __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)
14452  __Pyx_GOTREF(__pyx_t_5);
14453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14454  __pyx_r = __pyx_t_5;
14455  __pyx_t_5 = 0;
14456  goto __pyx_L0;
14457 
14458  /* "PyClical.pyx":1632
14459  * {1,2}
14460  * """
14461  * if not (i is None): # <<<<<<<<<<<<<<
14462  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14463  * else:
14464  */
14465  }
14466 
14467  /* "PyClical.pyx":1635
14468  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14469  * else:
14470  * try: # <<<<<<<<<<<<<<
14471  * return math.acos(obj)
14472  * except:
14473  */
14474  /*else*/ {
14475  {
14476  __Pyx_PyThreadState_declare
14477  __Pyx_PyThreadState_assign
14478  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14479  __Pyx_XGOTREF(__pyx_t_6);
14480  __Pyx_XGOTREF(__pyx_t_7);
14481  __Pyx_XGOTREF(__pyx_t_8);
14482  /*try:*/ {
14483 
14484  /* "PyClical.pyx":1636
14485  * else:
14486  * try:
14487  * return math.acos(obj) # <<<<<<<<<<<<<<
14488  * except:
14489  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14490  */
14491  __Pyx_XDECREF(__pyx_r);
14492  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14493  __Pyx_GOTREF(__pyx_t_3);
14494  __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)
14495  __Pyx_GOTREF(__pyx_t_9);
14496  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14497  __pyx_t_3 = NULL;
14498  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14499  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14500  if (likely(__pyx_t_3)) {
14501  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14502  __Pyx_INCREF(__pyx_t_3);
14503  __Pyx_INCREF(function);
14504  __Pyx_DECREF_SET(__pyx_t_9, function);
14505  }
14506  }
14507  if (!__pyx_t_3) {
14508  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14509  __Pyx_GOTREF(__pyx_t_5);
14510  } else {
14511  #if CYTHON_FAST_PYCALL
14512  if (PyFunction_Check(__pyx_t_9)) {
14513  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14514  __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)
14515  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14516  __Pyx_GOTREF(__pyx_t_5);
14517  } else
14518  #endif
14519  #if CYTHON_FAST_PYCCALL
14520  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14521  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14522  __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)
14523  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14524  __Pyx_GOTREF(__pyx_t_5);
14525  } else
14526  #endif
14527  {
14528  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1636, __pyx_L4_error)
14529  __Pyx_GOTREF(__pyx_t_10);
14530  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14531  __Pyx_INCREF(__pyx_v_obj);
14532  __Pyx_GIVEREF(__pyx_v_obj);
14533  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14534  __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)
14535  __Pyx_GOTREF(__pyx_t_5);
14536  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14537  }
14538  }
14539  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14540  __pyx_r = __pyx_t_5;
14541  __pyx_t_5 = 0;
14542  goto __pyx_L8_try_return;
14543 
14544  /* "PyClical.pyx":1635
14545  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14546  * else:
14547  * try: # <<<<<<<<<<<<<<
14548  * return math.acos(obj)
14549  * except:
14550  */
14551  }
14552  __pyx_L4_error:;
14553  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14554  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14555  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14556  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14557 
14558  /* "PyClical.pyx":1637
14559  * try:
14560  * return math.acos(obj)
14561  * except: # <<<<<<<<<<<<<<
14562  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14563  *
14564  */
14565  /*except:*/ {
14566  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14567  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14568  __Pyx_GOTREF(__pyx_t_5);
14569  __Pyx_GOTREF(__pyx_t_9);
14570  __Pyx_GOTREF(__pyx_t_10);
14571 
14572  /* "PyClical.pyx":1638
14573  * return math.acos(obj)
14574  * except:
14575  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14576  *
14577  * cpdef inline cosh(obj):
14578  */
14579  __Pyx_XDECREF(__pyx_r);
14580  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14581  __Pyx_GOTREF(__pyx_t_3);
14582  __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)
14583  __Pyx_GOTREF(__pyx_t_11);
14584  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14585  __pyx_r = __pyx_t_11;
14586  __pyx_t_11 = 0;
14587  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14588  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14589  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14590  goto __pyx_L7_except_return;
14591  }
14592  __pyx_L6_except_error:;
14593 
14594  /* "PyClical.pyx":1635
14595  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14596  * else:
14597  * try: # <<<<<<<<<<<<<<
14598  * return math.acos(obj)
14599  * except:
14600  */
14601  __Pyx_XGIVEREF(__pyx_t_6);
14602  __Pyx_XGIVEREF(__pyx_t_7);
14603  __Pyx_XGIVEREF(__pyx_t_8);
14604  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14605  goto __pyx_L1_error;
14606  __pyx_L8_try_return:;
14607  __Pyx_XGIVEREF(__pyx_t_6);
14608  __Pyx_XGIVEREF(__pyx_t_7);
14609  __Pyx_XGIVEREF(__pyx_t_8);
14610  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14611  goto __pyx_L0;
14612  __pyx_L7_except_return:;
14613  __Pyx_XGIVEREF(__pyx_t_6);
14614  __Pyx_XGIVEREF(__pyx_t_7);
14615  __Pyx_XGIVEREF(__pyx_t_8);
14616  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14617  goto __pyx_L0;
14618  }
14619  }
14620 
14621  /* "PyClical.pyx":1619
14622  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14623  *
14624  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14625  * """
14626  * Inverse cosine of multivector with optional complexifier.
14627  */
14628 
14629  /* function exit code */
14630  __pyx_L1_error:;
14631  __Pyx_XDECREF(__pyx_t_3);
14632  __Pyx_XDECREF(__pyx_t_5);
14633  __Pyx_XDECREF(__pyx_t_9);
14634  __Pyx_XDECREF(__pyx_t_10);
14635  __Pyx_XDECREF(__pyx_t_11);
14636  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14637  __pyx_r = 0;
14638  __pyx_L0:;
14639  __Pyx_XGIVEREF(__pyx_r);
14640  __Pyx_RefNannyFinishContext();
14641  return __pyx_r;
14642  }
14643 
14644  /* Python wrapper */
14645  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14646  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 ";
14647  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14648  PyObject *__pyx_v_obj = 0;
14649  PyObject *__pyx_v_i = 0;
14650  PyObject *__pyx_r = 0;
14651  __Pyx_RefNannyDeclarations
14652  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14653  {
14654  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14655  PyObject* values[2] = {0,0};
14656  values[1] = ((PyObject *)Py_None);
14657  if (unlikely(__pyx_kwds)) {
14658  Py_ssize_t kw_args;
14659  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14660  switch (pos_args) {
14661  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14662  CYTHON_FALLTHROUGH;
14663  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14664  CYTHON_FALLTHROUGH;
14665  case 0: break;
14666  default: goto __pyx_L5_argtuple_error;
14667  }
14668  kw_args = PyDict_Size(__pyx_kwds);
14669  switch (pos_args) {
14670  case 0:
14671  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14672  else goto __pyx_L5_argtuple_error;
14673  CYTHON_FALLTHROUGH;
14674  case 1:
14675  if (kw_args > 0) {
14676  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14677  if (value) { values[1] = value; kw_args--; }
14678  }
14679  }
14680  if (unlikely(kw_args > 0)) {
14681  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14682  }
14683  } else {
14684  switch (PyTuple_GET_SIZE(__pyx_args)) {
14685  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14686  CYTHON_FALLTHROUGH;
14687  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14688  break;
14689  default: goto __pyx_L5_argtuple_error;
14690  }
14691  }
14692  __pyx_v_obj = values[0];
14693  __pyx_v_i = values[1];
14694  }
14695  goto __pyx_L4_argument_unpacking_done;
14696  __pyx_L5_argtuple_error:;
14697  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14698  __pyx_L3_error:;
14699  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14700  __Pyx_RefNannyFinishContext();
14701  return NULL;
14702  __pyx_L4_argument_unpacking_done:;
14703  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14704 
14705  /* function exit code */
14706  __Pyx_RefNannyFinishContext();
14707  return __pyx_r;
14708  }
14709 
14710  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14711  PyObject *__pyx_r = NULL;
14712  __Pyx_RefNannyDeclarations
14713  PyObject *__pyx_t_1 = NULL;
14714  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14715  __Pyx_RefNannySetupContext("acos", 0);
14716  __Pyx_XDECREF(__pyx_r);
14717  __pyx_t_2.__pyx_n = 1;
14718  __pyx_t_2.i = __pyx_v_i;
14719  __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)
14720  __Pyx_GOTREF(__pyx_t_1);
14721  __pyx_r = __pyx_t_1;
14722  __pyx_t_1 = 0;
14723  goto __pyx_L0;
14724 
14725  /* function exit code */
14726  __pyx_L1_error:;
14727  __Pyx_XDECREF(__pyx_t_1);
14728  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14729  __pyx_r = NULL;
14730  __pyx_L0:;
14731  __Pyx_XGIVEREF(__pyx_r);
14732  __Pyx_RefNannyFinishContext();
14733  return __pyx_r;
14734  }
14735 
14736  /* "PyClical.pyx":1640
14737  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14738  *
14739  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14740  * """
14741  * Hyperbolic cosine of multivector.
14742  */
14743 
14744  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14745  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14746  PyObject *__pyx_r = NULL;
14747  __Pyx_RefNannyDeclarations
14748  PyObject *__pyx_t_1 = NULL;
14749  PyObject *__pyx_t_2 = NULL;
14750  PyObject *__pyx_t_3 = NULL;
14751  PyObject *__pyx_t_4 = NULL;
14752  PyObject *__pyx_t_5 = NULL;
14753  PyObject *__pyx_t_6 = NULL;
14754  PyObject *__pyx_t_7 = NULL;
14755  PyObject *__pyx_t_8 = NULL;
14756  __Pyx_RefNannySetupContext("cosh", 0);
14757 
14758  /* "PyClical.pyx":1651
14759  * {1,2}
14760  * """
14761  * try: # <<<<<<<<<<<<<<
14762  * return math.cosh(obj)
14763  * except:
14764  */
14765  {
14766  __Pyx_PyThreadState_declare
14767  __Pyx_PyThreadState_assign
14768  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14769  __Pyx_XGOTREF(__pyx_t_1);
14770  __Pyx_XGOTREF(__pyx_t_2);
14771  __Pyx_XGOTREF(__pyx_t_3);
14772  /*try:*/ {
14773 
14774  /* "PyClical.pyx":1652
14775  * """
14776  * try:
14777  * return math.cosh(obj) # <<<<<<<<<<<<<<
14778  * except:
14779  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14780  */
14781  __Pyx_XDECREF(__pyx_r);
14782  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14783  __Pyx_GOTREF(__pyx_t_5);
14784  __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)
14785  __Pyx_GOTREF(__pyx_t_6);
14786  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14787  __pyx_t_5 = NULL;
14788  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14789  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14790  if (likely(__pyx_t_5)) {
14791  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14792  __Pyx_INCREF(__pyx_t_5);
14793  __Pyx_INCREF(function);
14794  __Pyx_DECREF_SET(__pyx_t_6, function);
14795  }
14796  }
14797  if (!__pyx_t_5) {
14798  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14799  __Pyx_GOTREF(__pyx_t_4);
14800  } else {
14801  #if CYTHON_FAST_PYCALL
14802  if (PyFunction_Check(__pyx_t_6)) {
14803  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
14804  __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)
14805  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14806  __Pyx_GOTREF(__pyx_t_4);
14807  } else
14808  #endif
14809  #if CYTHON_FAST_PYCCALL
14810  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
14811  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
14812  __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)
14813  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14814  __Pyx_GOTREF(__pyx_t_4);
14815  } else
14816  #endif
14817  {
14818  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L3_error)
14819  __Pyx_GOTREF(__pyx_t_7);
14820  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
14821  __Pyx_INCREF(__pyx_v_obj);
14822  __Pyx_GIVEREF(__pyx_v_obj);
14823  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
14824  __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)
14825  __Pyx_GOTREF(__pyx_t_4);
14826  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14827  }
14828  }
14829  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14830  __pyx_r = __pyx_t_4;
14831  __pyx_t_4 = 0;
14832  goto __pyx_L7_try_return;
14833 
14834  /* "PyClical.pyx":1651
14835  * {1,2}
14836  * """
14837  * try: # <<<<<<<<<<<<<<
14838  * return math.cosh(obj)
14839  * except:
14840  */
14841  }
14842  __pyx_L3_error:;
14843  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14844  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14845  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14846  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14847 
14848  /* "PyClical.pyx":1653
14849  * try:
14850  * return math.cosh(obj)
14851  * except: # <<<<<<<<<<<<<<
14852  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14853  *
14854  */
14855  /*except:*/ {
14856  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14857  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14858  __Pyx_GOTREF(__pyx_t_4);
14859  __Pyx_GOTREF(__pyx_t_6);
14860  __Pyx_GOTREF(__pyx_t_7);
14861 
14862  /* "PyClical.pyx":1654
14863  * return math.cosh(obj)
14864  * except:
14865  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14866  *
14867  * cpdef inline acosh(obj,i = None):
14868  */
14869  __Pyx_XDECREF(__pyx_r);
14870  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14871  __Pyx_GOTREF(__pyx_t_5);
14872  __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)
14873  __Pyx_GOTREF(__pyx_t_8);
14874  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14875  __pyx_r = __pyx_t_8;
14876  __pyx_t_8 = 0;
14877  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14878  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14879  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14880  goto __pyx_L6_except_return;
14881  }
14882  __pyx_L5_except_error:;
14883 
14884  /* "PyClical.pyx":1651
14885  * {1,2}
14886  * """
14887  * try: # <<<<<<<<<<<<<<
14888  * return math.cosh(obj)
14889  * except:
14890  */
14891  __Pyx_XGIVEREF(__pyx_t_1);
14892  __Pyx_XGIVEREF(__pyx_t_2);
14893  __Pyx_XGIVEREF(__pyx_t_3);
14894  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14895  goto __pyx_L1_error;
14896  __pyx_L7_try_return:;
14897  __Pyx_XGIVEREF(__pyx_t_1);
14898  __Pyx_XGIVEREF(__pyx_t_2);
14899  __Pyx_XGIVEREF(__pyx_t_3);
14900  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14901  goto __pyx_L0;
14902  __pyx_L6_except_return:;
14903  __Pyx_XGIVEREF(__pyx_t_1);
14904  __Pyx_XGIVEREF(__pyx_t_2);
14905  __Pyx_XGIVEREF(__pyx_t_3);
14906  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14907  goto __pyx_L0;
14908  }
14909 
14910  /* "PyClical.pyx":1640
14911  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14912  *
14913  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14914  * """
14915  * Hyperbolic cosine of multivector.
14916  */
14917 
14918  /* function exit code */
14919  __pyx_L1_error:;
14920  __Pyx_XDECREF(__pyx_t_4);
14921  __Pyx_XDECREF(__pyx_t_5);
14922  __Pyx_XDECREF(__pyx_t_6);
14923  __Pyx_XDECREF(__pyx_t_7);
14924  __Pyx_XDECREF(__pyx_t_8);
14925  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14926  __pyx_r = 0;
14927  __pyx_L0:;
14928  __Pyx_XGIVEREF(__pyx_r);
14929  __Pyx_RefNannyFinishContext();
14930  return __pyx_r;
14931  }
14932 
14933  /* Python wrapper */
14934  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14935  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 ";
14936  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14937  PyObject *__pyx_r = 0;
14938  __Pyx_RefNannyDeclarations
14939  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14940  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14941 
14942  /* function exit code */
14943  __Pyx_RefNannyFinishContext();
14944  return __pyx_r;
14945  }
14946 
14947  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14948  PyObject *__pyx_r = NULL;
14949  __Pyx_RefNannyDeclarations
14950  PyObject *__pyx_t_1 = NULL;
14951  __Pyx_RefNannySetupContext("cosh", 0);
14952  __Pyx_XDECREF(__pyx_r);
14953  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14954  __Pyx_GOTREF(__pyx_t_1);
14955  __pyx_r = __pyx_t_1;
14956  __pyx_t_1 = 0;
14957  goto __pyx_L0;
14958 
14959  /* function exit code */
14960  __pyx_L1_error:;
14961  __Pyx_XDECREF(__pyx_t_1);
14962  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14963  __pyx_r = NULL;
14964  __pyx_L0:;
14965  __Pyx_XGIVEREF(__pyx_r);
14966  __Pyx_RefNannyFinishContext();
14967  return __pyx_r;
14968  }
14969 
14970  /* "PyClical.pyx":1656
14971  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14972  *
14973  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14974  * """
14975  * Inverse hyperbolic cosine of multivector with optional complexifier.
14976  */
14977 
14978  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14979  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) {
14980  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14981  PyObject *__pyx_r = NULL;
14982  __Pyx_RefNannyDeclarations
14983  int __pyx_t_1;
14984  int __pyx_t_2;
14985  PyObject *__pyx_t_3 = NULL;
14986  Clifford __pyx_t_4;
14987  PyObject *__pyx_t_5 = NULL;
14988  PyObject *__pyx_t_6 = NULL;
14989  PyObject *__pyx_t_7 = NULL;
14990  PyObject *__pyx_t_8 = NULL;
14991  PyObject *__pyx_t_9 = NULL;
14992  PyObject *__pyx_t_10 = NULL;
14993  PyObject *__pyx_t_11 = NULL;
14994  __Pyx_RefNannySetupContext("acosh", 0);
14995  if (__pyx_optional_args) {
14996  if (__pyx_optional_args->__pyx_n > 0) {
14997  __pyx_v_i = __pyx_optional_args->i;
14998  }
14999  }
15000 
15001  /* "PyClical.pyx":1671
15002  * {1,2}
15003  * """
15004  * if not (i is None): # <<<<<<<<<<<<<<
15005  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15006  * else:
15007  */
15008  __pyx_t_1 = (__pyx_v_i != Py_None);
15009  __pyx_t_2 = (__pyx_t_1 != 0);
15010  if (__pyx_t_2) {
15011 
15012  /* "PyClical.pyx":1672
15013  * """
15014  * if not (i is None):
15015  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15016  * else:
15017  * try:
15018  */
15019  __Pyx_XDECREF(__pyx_r);
15020  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
15021  __Pyx_GOTREF(__pyx_t_3);
15022  try {
15023  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15024  } catch(...) {
15025  __Pyx_CppExn2PyErr();
15026  __PYX_ERR(0, 1672, __pyx_L1_error)
15027  }
15028  __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)
15029  __Pyx_GOTREF(__pyx_t_5);
15030  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15031  __pyx_r = __pyx_t_5;
15032  __pyx_t_5 = 0;
15033  goto __pyx_L0;
15034 
15035  /* "PyClical.pyx":1671
15036  * {1,2}
15037  * """
15038  * if not (i is None): # <<<<<<<<<<<<<<
15039  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15040  * else:
15041  */
15042  }
15043 
15044  /* "PyClical.pyx":1674
15045  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15046  * else:
15047  * try: # <<<<<<<<<<<<<<
15048  * return math.acosh(obj)
15049  * except:
15050  */
15051  /*else*/ {
15052  {
15053  __Pyx_PyThreadState_declare
15054  __Pyx_PyThreadState_assign
15055  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15056  __Pyx_XGOTREF(__pyx_t_6);
15057  __Pyx_XGOTREF(__pyx_t_7);
15058  __Pyx_XGOTREF(__pyx_t_8);
15059  /*try:*/ {
15060 
15061  /* "PyClical.pyx":1675
15062  * else:
15063  * try:
15064  * return math.acosh(obj) # <<<<<<<<<<<<<<
15065  * except:
15066  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15067  */
15068  __Pyx_XDECREF(__pyx_r);
15069  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
15070  __Pyx_GOTREF(__pyx_t_3);
15071  __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)
15072  __Pyx_GOTREF(__pyx_t_9);
15073  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15074  __pyx_t_3 = NULL;
15075  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15076  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15077  if (likely(__pyx_t_3)) {
15078  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15079  __Pyx_INCREF(__pyx_t_3);
15080  __Pyx_INCREF(function);
15081  __Pyx_DECREF_SET(__pyx_t_9, function);
15082  }
15083  }
15084  if (!__pyx_t_3) {
15085  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15086  __Pyx_GOTREF(__pyx_t_5);
15087  } else {
15088  #if CYTHON_FAST_PYCALL
15089  if (PyFunction_Check(__pyx_t_9)) {
15090  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15091  __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)
15092  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15093  __Pyx_GOTREF(__pyx_t_5);
15094  } else
15095  #endif
15096  #if CYTHON_FAST_PYCCALL
15097  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15098  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15099  __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)
15100  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15101  __Pyx_GOTREF(__pyx_t_5);
15102  } else
15103  #endif
15104  {
15105  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1675, __pyx_L4_error)
15106  __Pyx_GOTREF(__pyx_t_10);
15107  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15108  __Pyx_INCREF(__pyx_v_obj);
15109  __Pyx_GIVEREF(__pyx_v_obj);
15110  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15111  __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)
15112  __Pyx_GOTREF(__pyx_t_5);
15113  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15114  }
15115  }
15116  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15117  __pyx_r = __pyx_t_5;
15118  __pyx_t_5 = 0;
15119  goto __pyx_L8_try_return;
15120 
15121  /* "PyClical.pyx":1674
15122  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15123  * else:
15124  * try: # <<<<<<<<<<<<<<
15125  * return math.acosh(obj)
15126  * except:
15127  */
15128  }
15129  __pyx_L4_error:;
15130  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15131  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15132  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15133  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15134 
15135  /* "PyClical.pyx":1676
15136  * try:
15137  * return math.acosh(obj)
15138  * except: # <<<<<<<<<<<<<<
15139  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15140  *
15141  */
15142  /*except:*/ {
15143  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15144  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15145  __Pyx_GOTREF(__pyx_t_5);
15146  __Pyx_GOTREF(__pyx_t_9);
15147  __Pyx_GOTREF(__pyx_t_10);
15148 
15149  /* "PyClical.pyx":1677
15150  * return math.acosh(obj)
15151  * except:
15152  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15153  *
15154  * cpdef inline sin(obj,i = None):
15155  */
15156  __Pyx_XDECREF(__pyx_r);
15157  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
15158  __Pyx_GOTREF(__pyx_t_3);
15159  __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)
15160  __Pyx_GOTREF(__pyx_t_11);
15161  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15162  __pyx_r = __pyx_t_11;
15163  __pyx_t_11 = 0;
15164  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15165  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15166  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15167  goto __pyx_L7_except_return;
15168  }
15169  __pyx_L6_except_error:;
15170 
15171  /* "PyClical.pyx":1674
15172  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15173  * else:
15174  * try: # <<<<<<<<<<<<<<
15175  * return math.acosh(obj)
15176  * except:
15177  */
15178  __Pyx_XGIVEREF(__pyx_t_6);
15179  __Pyx_XGIVEREF(__pyx_t_7);
15180  __Pyx_XGIVEREF(__pyx_t_8);
15181  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15182  goto __pyx_L1_error;
15183  __pyx_L8_try_return:;
15184  __Pyx_XGIVEREF(__pyx_t_6);
15185  __Pyx_XGIVEREF(__pyx_t_7);
15186  __Pyx_XGIVEREF(__pyx_t_8);
15187  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15188  goto __pyx_L0;
15189  __pyx_L7_except_return:;
15190  __Pyx_XGIVEREF(__pyx_t_6);
15191  __Pyx_XGIVEREF(__pyx_t_7);
15192  __Pyx_XGIVEREF(__pyx_t_8);
15193  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15194  goto __pyx_L0;
15195  }
15196  }
15197 
15198  /* "PyClical.pyx":1656
15199  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15200  *
15201  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15202  * """
15203  * Inverse hyperbolic cosine of multivector with optional complexifier.
15204  */
15205 
15206  /* function exit code */
15207  __pyx_L1_error:;
15208  __Pyx_XDECREF(__pyx_t_3);
15209  __Pyx_XDECREF(__pyx_t_5);
15210  __Pyx_XDECREF(__pyx_t_9);
15211  __Pyx_XDECREF(__pyx_t_10);
15212  __Pyx_XDECREF(__pyx_t_11);
15213  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15214  __pyx_r = 0;
15215  __pyx_L0:;
15216  __Pyx_XGIVEREF(__pyx_r);
15217  __Pyx_RefNannyFinishContext();
15218  return __pyx_r;
15219  }
15220 
15221  /* Python wrapper */
15222  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15223  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 ";
15224  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15225  PyObject *__pyx_v_obj = 0;
15226  PyObject *__pyx_v_i = 0;
15227  PyObject *__pyx_r = 0;
15228  __Pyx_RefNannyDeclarations
15229  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15230  {
15231  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15232  PyObject* values[2] = {0,0};
15233  values[1] = ((PyObject *)Py_None);
15234  if (unlikely(__pyx_kwds)) {
15235  Py_ssize_t kw_args;
15236  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15237  switch (pos_args) {
15238  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15239  CYTHON_FALLTHROUGH;
15240  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15241  CYTHON_FALLTHROUGH;
15242  case 0: break;
15243  default: goto __pyx_L5_argtuple_error;
15244  }
15245  kw_args = PyDict_Size(__pyx_kwds);
15246  switch (pos_args) {
15247  case 0:
15248  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15249  else goto __pyx_L5_argtuple_error;
15250  CYTHON_FALLTHROUGH;
15251  case 1:
15252  if (kw_args > 0) {
15253  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15254  if (value) { values[1] = value; kw_args--; }
15255  }
15256  }
15257  if (unlikely(kw_args > 0)) {
15258  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15259  }
15260  } else {
15261  switch (PyTuple_GET_SIZE(__pyx_args)) {
15262  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15263  CYTHON_FALLTHROUGH;
15264  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15265  break;
15266  default: goto __pyx_L5_argtuple_error;
15267  }
15268  }
15269  __pyx_v_obj = values[0];
15270  __pyx_v_i = values[1];
15271  }
15272  goto __pyx_L4_argument_unpacking_done;
15273  __pyx_L5_argtuple_error:;
15274  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15275  __pyx_L3_error:;
15276  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15277  __Pyx_RefNannyFinishContext();
15278  return NULL;
15279  __pyx_L4_argument_unpacking_done:;
15280  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15281 
15282  /* function exit code */
15283  __Pyx_RefNannyFinishContext();
15284  return __pyx_r;
15285  }
15286 
15287  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15288  PyObject *__pyx_r = NULL;
15289  __Pyx_RefNannyDeclarations
15290  PyObject *__pyx_t_1 = NULL;
15291  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15292  __Pyx_RefNannySetupContext("acosh", 0);
15293  __Pyx_XDECREF(__pyx_r);
15294  __pyx_t_2.__pyx_n = 1;
15295  __pyx_t_2.i = __pyx_v_i;
15296  __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)
15297  __Pyx_GOTREF(__pyx_t_1);
15298  __pyx_r = __pyx_t_1;
15299  __pyx_t_1 = 0;
15300  goto __pyx_L0;
15301 
15302  /* function exit code */
15303  __pyx_L1_error:;
15304  __Pyx_XDECREF(__pyx_t_1);
15305  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15306  __pyx_r = NULL;
15307  __pyx_L0:;
15308  __Pyx_XGIVEREF(__pyx_r);
15309  __Pyx_RefNannyFinishContext();
15310  return __pyx_r;
15311  }
15312 
15313  /* "PyClical.pyx":1679
15314  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15315  *
15316  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15317  * """
15318  * Sine of multivector with optional complexifier.
15319  */
15320 
15321  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15322  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) {
15323  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15324  PyObject *__pyx_r = NULL;
15325  __Pyx_RefNannyDeclarations
15326  int __pyx_t_1;
15327  int __pyx_t_2;
15328  PyObject *__pyx_t_3 = NULL;
15329  Clifford __pyx_t_4;
15330  PyObject *__pyx_t_5 = NULL;
15331  PyObject *__pyx_t_6 = NULL;
15332  PyObject *__pyx_t_7 = NULL;
15333  PyObject *__pyx_t_8 = NULL;
15334  PyObject *__pyx_t_9 = NULL;
15335  PyObject *__pyx_t_10 = NULL;
15336  PyObject *__pyx_t_11 = NULL;
15337  __Pyx_RefNannySetupContext("sin", 0);
15338  if (__pyx_optional_args) {
15339  if (__pyx_optional_args->__pyx_n > 0) {
15340  __pyx_v_i = __pyx_optional_args->i;
15341  }
15342  }
15343 
15344  /* "PyClical.pyx":1690
15345  * {1,2,3}
15346  * """
15347  * if not (i is None): # <<<<<<<<<<<<<<
15348  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15349  * else:
15350  */
15351  __pyx_t_1 = (__pyx_v_i != Py_None);
15352  __pyx_t_2 = (__pyx_t_1 != 0);
15353  if (__pyx_t_2) {
15354 
15355  /* "PyClical.pyx":1691
15356  * """
15357  * if not (i is None):
15358  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15359  * else:
15360  * try:
15361  */
15362  __Pyx_XDECREF(__pyx_r);
15363  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15364  __Pyx_GOTREF(__pyx_t_3);
15365  try {
15366  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15367  } catch(...) {
15368  __Pyx_CppExn2PyErr();
15369  __PYX_ERR(0, 1691, __pyx_L1_error)
15370  }
15371  __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)
15372  __Pyx_GOTREF(__pyx_t_5);
15373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15374  __pyx_r = __pyx_t_5;
15375  __pyx_t_5 = 0;
15376  goto __pyx_L0;
15377 
15378  /* "PyClical.pyx":1690
15379  * {1,2,3}
15380  * """
15381  * if not (i is None): # <<<<<<<<<<<<<<
15382  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15383  * else:
15384  */
15385  }
15386 
15387  /* "PyClical.pyx":1693
15388  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15389  * else:
15390  * try: # <<<<<<<<<<<<<<
15391  * return math.sin(obj)
15392  * except:
15393  */
15394  /*else*/ {
15395  {
15396  __Pyx_PyThreadState_declare
15397  __Pyx_PyThreadState_assign
15398  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15399  __Pyx_XGOTREF(__pyx_t_6);
15400  __Pyx_XGOTREF(__pyx_t_7);
15401  __Pyx_XGOTREF(__pyx_t_8);
15402  /*try:*/ {
15403 
15404  /* "PyClical.pyx":1694
15405  * else:
15406  * try:
15407  * return math.sin(obj) # <<<<<<<<<<<<<<
15408  * except:
15409  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15410  */
15411  __Pyx_XDECREF(__pyx_r);
15412  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15413  __Pyx_GOTREF(__pyx_t_3);
15414  __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)
15415  __Pyx_GOTREF(__pyx_t_9);
15416  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15417  __pyx_t_3 = NULL;
15418  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15419  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15420  if (likely(__pyx_t_3)) {
15421  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15422  __Pyx_INCREF(__pyx_t_3);
15423  __Pyx_INCREF(function);
15424  __Pyx_DECREF_SET(__pyx_t_9, function);
15425  }
15426  }
15427  if (!__pyx_t_3) {
15428  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15429  __Pyx_GOTREF(__pyx_t_5);
15430  } else {
15431  #if CYTHON_FAST_PYCALL
15432  if (PyFunction_Check(__pyx_t_9)) {
15433  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15434  __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)
15435  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15436  __Pyx_GOTREF(__pyx_t_5);
15437  } else
15438  #endif
15439  #if CYTHON_FAST_PYCCALL
15440  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15441  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15442  __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)
15443  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15444  __Pyx_GOTREF(__pyx_t_5);
15445  } else
15446  #endif
15447  {
15448  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1694, __pyx_L4_error)
15449  __Pyx_GOTREF(__pyx_t_10);
15450  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15451  __Pyx_INCREF(__pyx_v_obj);
15452  __Pyx_GIVEREF(__pyx_v_obj);
15453  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15454  __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)
15455  __Pyx_GOTREF(__pyx_t_5);
15456  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15457  }
15458  }
15459  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15460  __pyx_r = __pyx_t_5;
15461  __pyx_t_5 = 0;
15462  goto __pyx_L8_try_return;
15463 
15464  /* "PyClical.pyx":1693
15465  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15466  * else:
15467  * try: # <<<<<<<<<<<<<<
15468  * return math.sin(obj)
15469  * except:
15470  */
15471  }
15472  __pyx_L4_error:;
15473  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15474  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15475  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15476  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15477 
15478  /* "PyClical.pyx":1695
15479  * try:
15480  * return math.sin(obj)
15481  * except: # <<<<<<<<<<<<<<
15482  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15483  *
15484  */
15485  /*except:*/ {
15486  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15487  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15488  __Pyx_GOTREF(__pyx_t_5);
15489  __Pyx_GOTREF(__pyx_t_9);
15490  __Pyx_GOTREF(__pyx_t_10);
15491 
15492  /* "PyClical.pyx":1696
15493  * return math.sin(obj)
15494  * except:
15495  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15496  *
15497  * cpdef inline asin(obj,i = None):
15498  */
15499  __Pyx_XDECREF(__pyx_r);
15500  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15501  __Pyx_GOTREF(__pyx_t_3);
15502  __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)
15503  __Pyx_GOTREF(__pyx_t_11);
15504  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15505  __pyx_r = __pyx_t_11;
15506  __pyx_t_11 = 0;
15507  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15508  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15509  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15510  goto __pyx_L7_except_return;
15511  }
15512  __pyx_L6_except_error:;
15513 
15514  /* "PyClical.pyx":1693
15515  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15516  * else:
15517  * try: # <<<<<<<<<<<<<<
15518  * return math.sin(obj)
15519  * except:
15520  */
15521  __Pyx_XGIVEREF(__pyx_t_6);
15522  __Pyx_XGIVEREF(__pyx_t_7);
15523  __Pyx_XGIVEREF(__pyx_t_8);
15524  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15525  goto __pyx_L1_error;
15526  __pyx_L8_try_return:;
15527  __Pyx_XGIVEREF(__pyx_t_6);
15528  __Pyx_XGIVEREF(__pyx_t_7);
15529  __Pyx_XGIVEREF(__pyx_t_8);
15530  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15531  goto __pyx_L0;
15532  __pyx_L7_except_return:;
15533  __Pyx_XGIVEREF(__pyx_t_6);
15534  __Pyx_XGIVEREF(__pyx_t_7);
15535  __Pyx_XGIVEREF(__pyx_t_8);
15536  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15537  goto __pyx_L0;
15538  }
15539  }
15540 
15541  /* "PyClical.pyx":1679
15542  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15543  *
15544  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15545  * """
15546  * Sine of multivector with optional complexifier.
15547  */
15548 
15549  /* function exit code */
15550  __pyx_L1_error:;
15551  __Pyx_XDECREF(__pyx_t_3);
15552  __Pyx_XDECREF(__pyx_t_5);
15553  __Pyx_XDECREF(__pyx_t_9);
15554  __Pyx_XDECREF(__pyx_t_10);
15555  __Pyx_XDECREF(__pyx_t_11);
15556  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15557  __pyx_r = 0;
15558  __pyx_L0:;
15559  __Pyx_XGIVEREF(__pyx_r);
15560  __Pyx_RefNannyFinishContext();
15561  return __pyx_r;
15562  }
15563 
15564  /* Python wrapper */
15565  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15566  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 ";
15567  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15568  PyObject *__pyx_v_obj = 0;
15569  PyObject *__pyx_v_i = 0;
15570  PyObject *__pyx_r = 0;
15571  __Pyx_RefNannyDeclarations
15572  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15573  {
15574  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15575  PyObject* values[2] = {0,0};
15576  values[1] = ((PyObject *)Py_None);
15577  if (unlikely(__pyx_kwds)) {
15578  Py_ssize_t kw_args;
15579  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15580  switch (pos_args) {
15581  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15582  CYTHON_FALLTHROUGH;
15583  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15584  CYTHON_FALLTHROUGH;
15585  case 0: break;
15586  default: goto __pyx_L5_argtuple_error;
15587  }
15588  kw_args = PyDict_Size(__pyx_kwds);
15589  switch (pos_args) {
15590  case 0:
15591  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15592  else goto __pyx_L5_argtuple_error;
15593  CYTHON_FALLTHROUGH;
15594  case 1:
15595  if (kw_args > 0) {
15596  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15597  if (value) { values[1] = value; kw_args--; }
15598  }
15599  }
15600  if (unlikely(kw_args > 0)) {
15601  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15602  }
15603  } else {
15604  switch (PyTuple_GET_SIZE(__pyx_args)) {
15605  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15606  CYTHON_FALLTHROUGH;
15607  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15608  break;
15609  default: goto __pyx_L5_argtuple_error;
15610  }
15611  }
15612  __pyx_v_obj = values[0];
15613  __pyx_v_i = values[1];
15614  }
15615  goto __pyx_L4_argument_unpacking_done;
15616  __pyx_L5_argtuple_error:;
15617  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15618  __pyx_L3_error:;
15619  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15620  __Pyx_RefNannyFinishContext();
15621  return NULL;
15622  __pyx_L4_argument_unpacking_done:;
15623  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15624 
15625  /* function exit code */
15626  __Pyx_RefNannyFinishContext();
15627  return __pyx_r;
15628  }
15629 
15630  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15631  PyObject *__pyx_r = NULL;
15632  __Pyx_RefNannyDeclarations
15633  PyObject *__pyx_t_1 = NULL;
15634  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15635  __Pyx_RefNannySetupContext("sin", 0);
15636  __Pyx_XDECREF(__pyx_r);
15637  __pyx_t_2.__pyx_n = 1;
15638  __pyx_t_2.i = __pyx_v_i;
15639  __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)
15640  __Pyx_GOTREF(__pyx_t_1);
15641  __pyx_r = __pyx_t_1;
15642  __pyx_t_1 = 0;
15643  goto __pyx_L0;
15644 
15645  /* function exit code */
15646  __pyx_L1_error:;
15647  __Pyx_XDECREF(__pyx_t_1);
15648  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15649  __pyx_r = NULL;
15650  __pyx_L0:;
15651  __Pyx_XGIVEREF(__pyx_r);
15652  __Pyx_RefNannyFinishContext();
15653  return __pyx_r;
15654  }
15655 
15656  /* "PyClical.pyx":1698
15657  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15658  *
15659  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15660  * """
15661  * Inverse sine of multivector with optional complexifier.
15662  */
15663 
15664  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15665  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) {
15666  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15667  PyObject *__pyx_r = NULL;
15668  __Pyx_RefNannyDeclarations
15669  int __pyx_t_1;
15670  int __pyx_t_2;
15671  PyObject *__pyx_t_3 = NULL;
15672  Clifford __pyx_t_4;
15673  PyObject *__pyx_t_5 = NULL;
15674  PyObject *__pyx_t_6 = NULL;
15675  PyObject *__pyx_t_7 = NULL;
15676  PyObject *__pyx_t_8 = NULL;
15677  PyObject *__pyx_t_9 = NULL;
15678  PyObject *__pyx_t_10 = NULL;
15679  PyObject *__pyx_t_11 = NULL;
15680  __Pyx_RefNannySetupContext("asin", 0);
15681  if (__pyx_optional_args) {
15682  if (__pyx_optional_args->__pyx_n > 0) {
15683  __pyx_v_i = __pyx_optional_args->i;
15684  }
15685  }
15686 
15687  /* "PyClical.pyx":1711
15688  * {1,2,3}
15689  * """
15690  * if not (i is None): # <<<<<<<<<<<<<<
15691  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15692  * else:
15693  */
15694  __pyx_t_1 = (__pyx_v_i != Py_None);
15695  __pyx_t_2 = (__pyx_t_1 != 0);
15696  if (__pyx_t_2) {
15697 
15698  /* "PyClical.pyx":1712
15699  * """
15700  * if not (i is None):
15701  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15702  * else:
15703  * try:
15704  */
15705  __Pyx_XDECREF(__pyx_r);
15706  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15707  __Pyx_GOTREF(__pyx_t_3);
15708  try {
15709  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15710  } catch(...) {
15711  __Pyx_CppExn2PyErr();
15712  __PYX_ERR(0, 1712, __pyx_L1_error)
15713  }
15714  __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)
15715  __Pyx_GOTREF(__pyx_t_5);
15716  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15717  __pyx_r = __pyx_t_5;
15718  __pyx_t_5 = 0;
15719  goto __pyx_L0;
15720 
15721  /* "PyClical.pyx":1711
15722  * {1,2,3}
15723  * """
15724  * if not (i is None): # <<<<<<<<<<<<<<
15725  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15726  * else:
15727  */
15728  }
15729 
15730  /* "PyClical.pyx":1714
15731  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15732  * else:
15733  * try: # <<<<<<<<<<<<<<
15734  * return math.asin(obj)
15735  * except:
15736  */
15737  /*else*/ {
15738  {
15739  __Pyx_PyThreadState_declare
15740  __Pyx_PyThreadState_assign
15741  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15742  __Pyx_XGOTREF(__pyx_t_6);
15743  __Pyx_XGOTREF(__pyx_t_7);
15744  __Pyx_XGOTREF(__pyx_t_8);
15745  /*try:*/ {
15746 
15747  /* "PyClical.pyx":1715
15748  * else:
15749  * try:
15750  * return math.asin(obj) # <<<<<<<<<<<<<<
15751  * except:
15752  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15753  */
15754  __Pyx_XDECREF(__pyx_r);
15755  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15756  __Pyx_GOTREF(__pyx_t_3);
15757  __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)
15758  __Pyx_GOTREF(__pyx_t_9);
15759  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15760  __pyx_t_3 = NULL;
15761  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15762  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15763  if (likely(__pyx_t_3)) {
15764  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15765  __Pyx_INCREF(__pyx_t_3);
15766  __Pyx_INCREF(function);
15767  __Pyx_DECREF_SET(__pyx_t_9, function);
15768  }
15769  }
15770  if (!__pyx_t_3) {
15771  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15772  __Pyx_GOTREF(__pyx_t_5);
15773  } else {
15774  #if CYTHON_FAST_PYCALL
15775  if (PyFunction_Check(__pyx_t_9)) {
15776  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15777  __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)
15778  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15779  __Pyx_GOTREF(__pyx_t_5);
15780  } else
15781  #endif
15782  #if CYTHON_FAST_PYCCALL
15783  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15784  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15785  __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)
15786  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15787  __Pyx_GOTREF(__pyx_t_5);
15788  } else
15789  #endif
15790  {
15791  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L4_error)
15792  __Pyx_GOTREF(__pyx_t_10);
15793  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15794  __Pyx_INCREF(__pyx_v_obj);
15795  __Pyx_GIVEREF(__pyx_v_obj);
15796  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15797  __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)
15798  __Pyx_GOTREF(__pyx_t_5);
15799  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15800  }
15801  }
15802  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15803  __pyx_r = __pyx_t_5;
15804  __pyx_t_5 = 0;
15805  goto __pyx_L8_try_return;
15806 
15807  /* "PyClical.pyx":1714
15808  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15809  * else:
15810  * try: # <<<<<<<<<<<<<<
15811  * return math.asin(obj)
15812  * except:
15813  */
15814  }
15815  __pyx_L4_error:;
15816  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15817  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15818  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15819  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15820 
15821  /* "PyClical.pyx":1716
15822  * try:
15823  * return math.asin(obj)
15824  * except: # <<<<<<<<<<<<<<
15825  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15826  *
15827  */
15828  /*except:*/ {
15829  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15830  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15831  __Pyx_GOTREF(__pyx_t_5);
15832  __Pyx_GOTREF(__pyx_t_9);
15833  __Pyx_GOTREF(__pyx_t_10);
15834 
15835  /* "PyClical.pyx":1717
15836  * return math.asin(obj)
15837  * except:
15838  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15839  *
15840  * cpdef inline sinh(obj):
15841  */
15842  __Pyx_XDECREF(__pyx_r);
15843  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15844  __Pyx_GOTREF(__pyx_t_3);
15845  __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)
15846  __Pyx_GOTREF(__pyx_t_11);
15847  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15848  __pyx_r = __pyx_t_11;
15849  __pyx_t_11 = 0;
15850  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15851  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15852  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15853  goto __pyx_L7_except_return;
15854  }
15855  __pyx_L6_except_error:;
15856 
15857  /* "PyClical.pyx":1714
15858  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15859  * else:
15860  * try: # <<<<<<<<<<<<<<
15861  * return math.asin(obj)
15862  * except:
15863  */
15864  __Pyx_XGIVEREF(__pyx_t_6);
15865  __Pyx_XGIVEREF(__pyx_t_7);
15866  __Pyx_XGIVEREF(__pyx_t_8);
15867  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15868  goto __pyx_L1_error;
15869  __pyx_L8_try_return:;
15870  __Pyx_XGIVEREF(__pyx_t_6);
15871  __Pyx_XGIVEREF(__pyx_t_7);
15872  __Pyx_XGIVEREF(__pyx_t_8);
15873  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15874  goto __pyx_L0;
15875  __pyx_L7_except_return:;
15876  __Pyx_XGIVEREF(__pyx_t_6);
15877  __Pyx_XGIVEREF(__pyx_t_7);
15878  __Pyx_XGIVEREF(__pyx_t_8);
15879  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15880  goto __pyx_L0;
15881  }
15882  }
15883 
15884  /* "PyClical.pyx":1698
15885  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15886  *
15887  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15888  * """
15889  * Inverse sine of multivector with optional complexifier.
15890  */
15891 
15892  /* function exit code */
15893  __pyx_L1_error:;
15894  __Pyx_XDECREF(__pyx_t_3);
15895  __Pyx_XDECREF(__pyx_t_5);
15896  __Pyx_XDECREF(__pyx_t_9);
15897  __Pyx_XDECREF(__pyx_t_10);
15898  __Pyx_XDECREF(__pyx_t_11);
15899  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15900  __pyx_r = 0;
15901  __pyx_L0:;
15902  __Pyx_XGIVEREF(__pyx_r);
15903  __Pyx_RefNannyFinishContext();
15904  return __pyx_r;
15905  }
15906 
15907  /* Python wrapper */
15908  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15909  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 ";
15910  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15911  PyObject *__pyx_v_obj = 0;
15912  PyObject *__pyx_v_i = 0;
15913  PyObject *__pyx_r = 0;
15914  __Pyx_RefNannyDeclarations
15915  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15916  {
15917  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15918  PyObject* values[2] = {0,0};
15919  values[1] = ((PyObject *)Py_None);
15920  if (unlikely(__pyx_kwds)) {
15921  Py_ssize_t kw_args;
15922  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15923  switch (pos_args) {
15924  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15925  CYTHON_FALLTHROUGH;
15926  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15927  CYTHON_FALLTHROUGH;
15928  case 0: break;
15929  default: goto __pyx_L5_argtuple_error;
15930  }
15931  kw_args = PyDict_Size(__pyx_kwds);
15932  switch (pos_args) {
15933  case 0:
15934  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15935  else goto __pyx_L5_argtuple_error;
15936  CYTHON_FALLTHROUGH;
15937  case 1:
15938  if (kw_args > 0) {
15939  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15940  if (value) { values[1] = value; kw_args--; }
15941  }
15942  }
15943  if (unlikely(kw_args > 0)) {
15944  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15945  }
15946  } else {
15947  switch (PyTuple_GET_SIZE(__pyx_args)) {
15948  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15949  CYTHON_FALLTHROUGH;
15950  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15951  break;
15952  default: goto __pyx_L5_argtuple_error;
15953  }
15954  }
15955  __pyx_v_obj = values[0];
15956  __pyx_v_i = values[1];
15957  }
15958  goto __pyx_L4_argument_unpacking_done;
15959  __pyx_L5_argtuple_error:;
15960  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15961  __pyx_L3_error:;
15962  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15963  __Pyx_RefNannyFinishContext();
15964  return NULL;
15965  __pyx_L4_argument_unpacking_done:;
15966  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15967 
15968  /* function exit code */
15969  __Pyx_RefNannyFinishContext();
15970  return __pyx_r;
15971  }
15972 
15973  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15974  PyObject *__pyx_r = NULL;
15975  __Pyx_RefNannyDeclarations
15976  PyObject *__pyx_t_1 = NULL;
15977  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15978  __Pyx_RefNannySetupContext("asin", 0);
15979  __Pyx_XDECREF(__pyx_r);
15980  __pyx_t_2.__pyx_n = 1;
15981  __pyx_t_2.i = __pyx_v_i;
15982  __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)
15983  __Pyx_GOTREF(__pyx_t_1);
15984  __pyx_r = __pyx_t_1;
15985  __pyx_t_1 = 0;
15986  goto __pyx_L0;
15987 
15988  /* function exit code */
15989  __pyx_L1_error:;
15990  __Pyx_XDECREF(__pyx_t_1);
15991  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15992  __pyx_r = NULL;
15993  __pyx_L0:;
15994  __Pyx_XGIVEREF(__pyx_r);
15995  __Pyx_RefNannyFinishContext();
15996  return __pyx_r;
15997  }
15998 
15999  /* "PyClical.pyx":1719
16000  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16001  *
16002  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16003  * """
16004  * Hyperbolic sine of multivector.
16005  */
16006 
16007  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16008  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16009  PyObject *__pyx_r = NULL;
16010  __Pyx_RefNannyDeclarations
16011  PyObject *__pyx_t_1 = NULL;
16012  PyObject *__pyx_t_2 = NULL;
16013  PyObject *__pyx_t_3 = NULL;
16014  PyObject *__pyx_t_4 = NULL;
16015  PyObject *__pyx_t_5 = NULL;
16016  PyObject *__pyx_t_6 = NULL;
16017  PyObject *__pyx_t_7 = NULL;
16018  PyObject *__pyx_t_8 = NULL;
16019  __Pyx_RefNannySetupContext("sinh", 0);
16020 
16021  /* "PyClical.pyx":1728
16022  * 0.5{1,2}
16023  * """
16024  * try: # <<<<<<<<<<<<<<
16025  * return math.sinh(obj)
16026  * except:
16027  */
16028  {
16029  __Pyx_PyThreadState_declare
16030  __Pyx_PyThreadState_assign
16031  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16032  __Pyx_XGOTREF(__pyx_t_1);
16033  __Pyx_XGOTREF(__pyx_t_2);
16034  __Pyx_XGOTREF(__pyx_t_3);
16035  /*try:*/ {
16036 
16037  /* "PyClical.pyx":1729
16038  * """
16039  * try:
16040  * return math.sinh(obj) # <<<<<<<<<<<<<<
16041  * except:
16042  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16043  */
16044  __Pyx_XDECREF(__pyx_r);
16045  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
16046  __Pyx_GOTREF(__pyx_t_5);
16047  __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)
16048  __Pyx_GOTREF(__pyx_t_6);
16049  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16050  __pyx_t_5 = NULL;
16051  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16052  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16053  if (likely(__pyx_t_5)) {
16054  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16055  __Pyx_INCREF(__pyx_t_5);
16056  __Pyx_INCREF(function);
16057  __Pyx_DECREF_SET(__pyx_t_6, function);
16058  }
16059  }
16060  if (!__pyx_t_5) {
16061  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16062  __Pyx_GOTREF(__pyx_t_4);
16063  } else {
16064  #if CYTHON_FAST_PYCALL
16065  if (PyFunction_Check(__pyx_t_6)) {
16066  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16067  __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)
16068  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16069  __Pyx_GOTREF(__pyx_t_4);
16070  } else
16071  #endif
16072  #if CYTHON_FAST_PYCCALL
16073  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16074  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16075  __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)
16076  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16077  __Pyx_GOTREF(__pyx_t_4);
16078  } else
16079  #endif
16080  {
16081  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1729, __pyx_L3_error)
16082  __Pyx_GOTREF(__pyx_t_7);
16083  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16084  __Pyx_INCREF(__pyx_v_obj);
16085  __Pyx_GIVEREF(__pyx_v_obj);
16086  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16087  __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)
16088  __Pyx_GOTREF(__pyx_t_4);
16089  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16090  }
16091  }
16092  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16093  __pyx_r = __pyx_t_4;
16094  __pyx_t_4 = 0;
16095  goto __pyx_L7_try_return;
16096 
16097  /* "PyClical.pyx":1728
16098  * 0.5{1,2}
16099  * """
16100  * try: # <<<<<<<<<<<<<<
16101  * return math.sinh(obj)
16102  * except:
16103  */
16104  }
16105  __pyx_L3_error:;
16106  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16107  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16108  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16109  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16110 
16111  /* "PyClical.pyx":1730
16112  * try:
16113  * return math.sinh(obj)
16114  * except: # <<<<<<<<<<<<<<
16115  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16116  *
16117  */
16118  /*except:*/ {
16119  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16120  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16121  __Pyx_GOTREF(__pyx_t_4);
16122  __Pyx_GOTREF(__pyx_t_6);
16123  __Pyx_GOTREF(__pyx_t_7);
16124 
16125  /* "PyClical.pyx":1731
16126  * return math.sinh(obj)
16127  * except:
16128  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16129  *
16130  * cpdef inline asinh(obj,i = None):
16131  */
16132  __Pyx_XDECREF(__pyx_r);
16133  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
16134  __Pyx_GOTREF(__pyx_t_5);
16135  __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)
16136  __Pyx_GOTREF(__pyx_t_8);
16137  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16138  __pyx_r = __pyx_t_8;
16139  __pyx_t_8 = 0;
16140  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16141  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16142  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16143  goto __pyx_L6_except_return;
16144  }
16145  __pyx_L5_except_error:;
16146 
16147  /* "PyClical.pyx":1728
16148  * 0.5{1,2}
16149  * """
16150  * try: # <<<<<<<<<<<<<<
16151  * return math.sinh(obj)
16152  * except:
16153  */
16154  __Pyx_XGIVEREF(__pyx_t_1);
16155  __Pyx_XGIVEREF(__pyx_t_2);
16156  __Pyx_XGIVEREF(__pyx_t_3);
16157  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16158  goto __pyx_L1_error;
16159  __pyx_L7_try_return:;
16160  __Pyx_XGIVEREF(__pyx_t_1);
16161  __Pyx_XGIVEREF(__pyx_t_2);
16162  __Pyx_XGIVEREF(__pyx_t_3);
16163  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16164  goto __pyx_L0;
16165  __pyx_L6_except_return:;
16166  __Pyx_XGIVEREF(__pyx_t_1);
16167  __Pyx_XGIVEREF(__pyx_t_2);
16168  __Pyx_XGIVEREF(__pyx_t_3);
16169  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16170  goto __pyx_L0;
16171  }
16172 
16173  /* "PyClical.pyx":1719
16174  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16175  *
16176  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16177  * """
16178  * Hyperbolic sine of multivector.
16179  */
16180 
16181  /* function exit code */
16182  __pyx_L1_error:;
16183  __Pyx_XDECREF(__pyx_t_4);
16184  __Pyx_XDECREF(__pyx_t_5);
16185  __Pyx_XDECREF(__pyx_t_6);
16186  __Pyx_XDECREF(__pyx_t_7);
16187  __Pyx_XDECREF(__pyx_t_8);
16188  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16189  __pyx_r = 0;
16190  __pyx_L0:;
16191  __Pyx_XGIVEREF(__pyx_r);
16192  __Pyx_RefNannyFinishContext();
16193  return __pyx_r;
16194  }
16195 
16196  /* Python wrapper */
16197  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16198  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 ";
16199  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16200  PyObject *__pyx_r = 0;
16201  __Pyx_RefNannyDeclarations
16202  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16203  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16204 
16205  /* function exit code */
16206  __Pyx_RefNannyFinishContext();
16207  return __pyx_r;
16208  }
16209 
16210  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16211  PyObject *__pyx_r = NULL;
16212  __Pyx_RefNannyDeclarations
16213  PyObject *__pyx_t_1 = NULL;
16214  __Pyx_RefNannySetupContext("sinh", 0);
16215  __Pyx_XDECREF(__pyx_r);
16216  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
16217  __Pyx_GOTREF(__pyx_t_1);
16218  __pyx_r = __pyx_t_1;
16219  __pyx_t_1 = 0;
16220  goto __pyx_L0;
16221 
16222  /* function exit code */
16223  __pyx_L1_error:;
16224  __Pyx_XDECREF(__pyx_t_1);
16225  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16226  __pyx_r = NULL;
16227  __pyx_L0:;
16228  __Pyx_XGIVEREF(__pyx_r);
16229  __Pyx_RefNannyFinishContext();
16230  return __pyx_r;
16231  }
16232 
16233  /* "PyClical.pyx":1733
16234  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16235  *
16236  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16237  * """
16238  * Inverse hyperbolic sine of multivector with optional complexifier.
16239  */
16240 
16241  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16242  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) {
16243  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16244  PyObject *__pyx_r = NULL;
16245  __Pyx_RefNannyDeclarations
16246  int __pyx_t_1;
16247  int __pyx_t_2;
16248  PyObject *__pyx_t_3 = NULL;
16249  Clifford __pyx_t_4;
16250  PyObject *__pyx_t_5 = NULL;
16251  PyObject *__pyx_t_6 = NULL;
16252  PyObject *__pyx_t_7 = NULL;
16253  PyObject *__pyx_t_8 = NULL;
16254  PyObject *__pyx_t_9 = NULL;
16255  PyObject *__pyx_t_10 = NULL;
16256  PyObject *__pyx_t_11 = NULL;
16257  __Pyx_RefNannySetupContext("asinh", 0);
16258  if (__pyx_optional_args) {
16259  if (__pyx_optional_args->__pyx_n > 0) {
16260  __pyx_v_i = __pyx_optional_args->i;
16261  }
16262  }
16263 
16264  /* "PyClical.pyx":1744
16265  * {1,2}
16266  * """
16267  * if not (i is None): # <<<<<<<<<<<<<<
16268  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16269  * else:
16270  */
16271  __pyx_t_1 = (__pyx_v_i != Py_None);
16272  __pyx_t_2 = (__pyx_t_1 != 0);
16273  if (__pyx_t_2) {
16274 
16275  /* "PyClical.pyx":1745
16276  * """
16277  * if not (i is None):
16278  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16279  * else:
16280  * try:
16281  */
16282  __Pyx_XDECREF(__pyx_r);
16283  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
16284  __Pyx_GOTREF(__pyx_t_3);
16285  try {
16286  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16287  } catch(...) {
16288  __Pyx_CppExn2PyErr();
16289  __PYX_ERR(0, 1745, __pyx_L1_error)
16290  }
16291  __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)
16292  __Pyx_GOTREF(__pyx_t_5);
16293  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16294  __pyx_r = __pyx_t_5;
16295  __pyx_t_5 = 0;
16296  goto __pyx_L0;
16297 
16298  /* "PyClical.pyx":1744
16299  * {1,2}
16300  * """
16301  * if not (i is None): # <<<<<<<<<<<<<<
16302  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16303  * else:
16304  */
16305  }
16306 
16307  /* "PyClical.pyx":1747
16308  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16309  * else:
16310  * try: # <<<<<<<<<<<<<<
16311  * return math.asinh(obj)
16312  * except:
16313  */
16314  /*else*/ {
16315  {
16316  __Pyx_PyThreadState_declare
16317  __Pyx_PyThreadState_assign
16318  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16319  __Pyx_XGOTREF(__pyx_t_6);
16320  __Pyx_XGOTREF(__pyx_t_7);
16321  __Pyx_XGOTREF(__pyx_t_8);
16322  /*try:*/ {
16323 
16324  /* "PyClical.pyx":1748
16325  * else:
16326  * try:
16327  * return math.asinh(obj) # <<<<<<<<<<<<<<
16328  * except:
16329  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16330  */
16331  __Pyx_XDECREF(__pyx_r);
16332  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16333  __Pyx_GOTREF(__pyx_t_3);
16334  __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)
16335  __Pyx_GOTREF(__pyx_t_9);
16336  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16337  __pyx_t_3 = NULL;
16338  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16339  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16340  if (likely(__pyx_t_3)) {
16341  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16342  __Pyx_INCREF(__pyx_t_3);
16343  __Pyx_INCREF(function);
16344  __Pyx_DECREF_SET(__pyx_t_9, function);
16345  }
16346  }
16347  if (!__pyx_t_3) {
16348  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16349  __Pyx_GOTREF(__pyx_t_5);
16350  } else {
16351  #if CYTHON_FAST_PYCALL
16352  if (PyFunction_Check(__pyx_t_9)) {
16353  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16354  __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)
16355  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16356  __Pyx_GOTREF(__pyx_t_5);
16357  } else
16358  #endif
16359  #if CYTHON_FAST_PYCCALL
16360  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16361  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16362  __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)
16363  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16364  __Pyx_GOTREF(__pyx_t_5);
16365  } else
16366  #endif
16367  {
16368  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1748, __pyx_L4_error)
16369  __Pyx_GOTREF(__pyx_t_10);
16370  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16371  __Pyx_INCREF(__pyx_v_obj);
16372  __Pyx_GIVEREF(__pyx_v_obj);
16373  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16374  __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)
16375  __Pyx_GOTREF(__pyx_t_5);
16376  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16377  }
16378  }
16379  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16380  __pyx_r = __pyx_t_5;
16381  __pyx_t_5 = 0;
16382  goto __pyx_L8_try_return;
16383 
16384  /* "PyClical.pyx":1747
16385  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16386  * else:
16387  * try: # <<<<<<<<<<<<<<
16388  * return math.asinh(obj)
16389  * except:
16390  */
16391  }
16392  __pyx_L4_error:;
16393  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16394  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16395  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16396  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16397 
16398  /* "PyClical.pyx":1749
16399  * try:
16400  * return math.asinh(obj)
16401  * except: # <<<<<<<<<<<<<<
16402  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16403  *
16404  */
16405  /*except:*/ {
16406  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16407  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16408  __Pyx_GOTREF(__pyx_t_5);
16409  __Pyx_GOTREF(__pyx_t_9);
16410  __Pyx_GOTREF(__pyx_t_10);
16411 
16412  /* "PyClical.pyx":1750
16413  * return math.asinh(obj)
16414  * except:
16415  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16416  *
16417  * cpdef inline tan(obj,i = None):
16418  */
16419  __Pyx_XDECREF(__pyx_r);
16420  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16421  __Pyx_GOTREF(__pyx_t_3);
16422  __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)
16423  __Pyx_GOTREF(__pyx_t_11);
16424  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16425  __pyx_r = __pyx_t_11;
16426  __pyx_t_11 = 0;
16427  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16428  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16429  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16430  goto __pyx_L7_except_return;
16431  }
16432  __pyx_L6_except_error:;
16433 
16434  /* "PyClical.pyx":1747
16435  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16436  * else:
16437  * try: # <<<<<<<<<<<<<<
16438  * return math.asinh(obj)
16439  * except:
16440  */
16441  __Pyx_XGIVEREF(__pyx_t_6);
16442  __Pyx_XGIVEREF(__pyx_t_7);
16443  __Pyx_XGIVEREF(__pyx_t_8);
16444  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16445  goto __pyx_L1_error;
16446  __pyx_L8_try_return:;
16447  __Pyx_XGIVEREF(__pyx_t_6);
16448  __Pyx_XGIVEREF(__pyx_t_7);
16449  __Pyx_XGIVEREF(__pyx_t_8);
16450  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16451  goto __pyx_L0;
16452  __pyx_L7_except_return:;
16453  __Pyx_XGIVEREF(__pyx_t_6);
16454  __Pyx_XGIVEREF(__pyx_t_7);
16455  __Pyx_XGIVEREF(__pyx_t_8);
16456  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16457  goto __pyx_L0;
16458  }
16459  }
16460 
16461  /* "PyClical.pyx":1733
16462  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16463  *
16464  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16465  * """
16466  * Inverse hyperbolic sine of multivector with optional complexifier.
16467  */
16468 
16469  /* function exit code */
16470  __pyx_L1_error:;
16471  __Pyx_XDECREF(__pyx_t_3);
16472  __Pyx_XDECREF(__pyx_t_5);
16473  __Pyx_XDECREF(__pyx_t_9);
16474  __Pyx_XDECREF(__pyx_t_10);
16475  __Pyx_XDECREF(__pyx_t_11);
16476  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16477  __pyx_r = 0;
16478  __pyx_L0:;
16479  __Pyx_XGIVEREF(__pyx_r);
16480  __Pyx_RefNannyFinishContext();
16481  return __pyx_r;
16482  }
16483 
16484  /* Python wrapper */
16485  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16486  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 ";
16487  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16488  PyObject *__pyx_v_obj = 0;
16489  PyObject *__pyx_v_i = 0;
16490  PyObject *__pyx_r = 0;
16491  __Pyx_RefNannyDeclarations
16492  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16493  {
16494  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16495  PyObject* values[2] = {0,0};
16496  values[1] = ((PyObject *)Py_None);
16497  if (unlikely(__pyx_kwds)) {
16498  Py_ssize_t kw_args;
16499  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16500  switch (pos_args) {
16501  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16502  CYTHON_FALLTHROUGH;
16503  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16504  CYTHON_FALLTHROUGH;
16505  case 0: break;
16506  default: goto __pyx_L5_argtuple_error;
16507  }
16508  kw_args = PyDict_Size(__pyx_kwds);
16509  switch (pos_args) {
16510  case 0:
16511  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16512  else goto __pyx_L5_argtuple_error;
16513  CYTHON_FALLTHROUGH;
16514  case 1:
16515  if (kw_args > 0) {
16516  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16517  if (value) { values[1] = value; kw_args--; }
16518  }
16519  }
16520  if (unlikely(kw_args > 0)) {
16521  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16522  }
16523  } else {
16524  switch (PyTuple_GET_SIZE(__pyx_args)) {
16525  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16526  CYTHON_FALLTHROUGH;
16527  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16528  break;
16529  default: goto __pyx_L5_argtuple_error;
16530  }
16531  }
16532  __pyx_v_obj = values[0];
16533  __pyx_v_i = values[1];
16534  }
16535  goto __pyx_L4_argument_unpacking_done;
16536  __pyx_L5_argtuple_error:;
16537  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16538  __pyx_L3_error:;
16539  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16540  __Pyx_RefNannyFinishContext();
16541  return NULL;
16542  __pyx_L4_argument_unpacking_done:;
16543  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16544 
16545  /* function exit code */
16546  __Pyx_RefNannyFinishContext();
16547  return __pyx_r;
16548  }
16549 
16550  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16551  PyObject *__pyx_r = NULL;
16552  __Pyx_RefNannyDeclarations
16553  PyObject *__pyx_t_1 = NULL;
16554  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16555  __Pyx_RefNannySetupContext("asinh", 0);
16556  __Pyx_XDECREF(__pyx_r);
16557  __pyx_t_2.__pyx_n = 1;
16558  __pyx_t_2.i = __pyx_v_i;
16559  __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)
16560  __Pyx_GOTREF(__pyx_t_1);
16561  __pyx_r = __pyx_t_1;
16562  __pyx_t_1 = 0;
16563  goto __pyx_L0;
16564 
16565  /* function exit code */
16566  __pyx_L1_error:;
16567  __Pyx_XDECREF(__pyx_t_1);
16568  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16569  __pyx_r = NULL;
16570  __pyx_L0:;
16571  __Pyx_XGIVEREF(__pyx_r);
16572  __Pyx_RefNannyFinishContext();
16573  return __pyx_r;
16574  }
16575 
16576  /* "PyClical.pyx":1752
16577  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16578  *
16579  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16580  * """
16581  * Tangent of multivector with optional complexifier.
16582  */
16583 
16584  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16585  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) {
16586  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16587  PyObject *__pyx_r = NULL;
16588  __Pyx_RefNannyDeclarations
16589  int __pyx_t_1;
16590  int __pyx_t_2;
16591  PyObject *__pyx_t_3 = NULL;
16592  Clifford __pyx_t_4;
16593  PyObject *__pyx_t_5 = NULL;
16594  PyObject *__pyx_t_6 = NULL;
16595  PyObject *__pyx_t_7 = NULL;
16596  PyObject *__pyx_t_8 = NULL;
16597  PyObject *__pyx_t_9 = NULL;
16598  PyObject *__pyx_t_10 = NULL;
16599  PyObject *__pyx_t_11 = NULL;
16600  __Pyx_RefNannySetupContext("tan", 0);
16601  if (__pyx_optional_args) {
16602  if (__pyx_optional_args->__pyx_n > 0) {
16603  __pyx_v_i = __pyx_optional_args->i;
16604  }
16605  }
16606 
16607  /* "PyClical.pyx":1761
16608  * 0.7616{1,2}
16609  * """
16610  * if not (i is None): # <<<<<<<<<<<<<<
16611  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16612  * else:
16613  */
16614  __pyx_t_1 = (__pyx_v_i != Py_None);
16615  __pyx_t_2 = (__pyx_t_1 != 0);
16616  if (__pyx_t_2) {
16617 
16618  /* "PyClical.pyx":1762
16619  * """
16620  * if not (i is None):
16621  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16622  * else:
16623  * try:
16624  */
16625  __Pyx_XDECREF(__pyx_r);
16626  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16627  __Pyx_GOTREF(__pyx_t_3);
16628  try {
16629  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16630  } catch(...) {
16631  __Pyx_CppExn2PyErr();
16632  __PYX_ERR(0, 1762, __pyx_L1_error)
16633  }
16634  __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)
16635  __Pyx_GOTREF(__pyx_t_5);
16636  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16637  __pyx_r = __pyx_t_5;
16638  __pyx_t_5 = 0;
16639  goto __pyx_L0;
16640 
16641  /* "PyClical.pyx":1761
16642  * 0.7616{1,2}
16643  * """
16644  * if not (i is None): # <<<<<<<<<<<<<<
16645  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16646  * else:
16647  */
16648  }
16649 
16650  /* "PyClical.pyx":1764
16651  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16652  * else:
16653  * try: # <<<<<<<<<<<<<<
16654  * return math.tan(obj)
16655  * except:
16656  */
16657  /*else*/ {
16658  {
16659  __Pyx_PyThreadState_declare
16660  __Pyx_PyThreadState_assign
16661  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16662  __Pyx_XGOTREF(__pyx_t_6);
16663  __Pyx_XGOTREF(__pyx_t_7);
16664  __Pyx_XGOTREF(__pyx_t_8);
16665  /*try:*/ {
16666 
16667  /* "PyClical.pyx":1765
16668  * else:
16669  * try:
16670  * return math.tan(obj) # <<<<<<<<<<<<<<
16671  * except:
16672  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16673  */
16674  __Pyx_XDECREF(__pyx_r);
16675  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16676  __Pyx_GOTREF(__pyx_t_3);
16677  __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)
16678  __Pyx_GOTREF(__pyx_t_9);
16679  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16680  __pyx_t_3 = NULL;
16681  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16682  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16683  if (likely(__pyx_t_3)) {
16684  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16685  __Pyx_INCREF(__pyx_t_3);
16686  __Pyx_INCREF(function);
16687  __Pyx_DECREF_SET(__pyx_t_9, function);
16688  }
16689  }
16690  if (!__pyx_t_3) {
16691  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16692  __Pyx_GOTREF(__pyx_t_5);
16693  } else {
16694  #if CYTHON_FAST_PYCALL
16695  if (PyFunction_Check(__pyx_t_9)) {
16696  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16697  __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)
16698  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16699  __Pyx_GOTREF(__pyx_t_5);
16700  } else
16701  #endif
16702  #if CYTHON_FAST_PYCCALL
16703  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16704  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16705  __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)
16706  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16707  __Pyx_GOTREF(__pyx_t_5);
16708  } else
16709  #endif
16710  {
16711  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1765, __pyx_L4_error)
16712  __Pyx_GOTREF(__pyx_t_10);
16713  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16714  __Pyx_INCREF(__pyx_v_obj);
16715  __Pyx_GIVEREF(__pyx_v_obj);
16716  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16717  __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)
16718  __Pyx_GOTREF(__pyx_t_5);
16719  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16720  }
16721  }
16722  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16723  __pyx_r = __pyx_t_5;
16724  __pyx_t_5 = 0;
16725  goto __pyx_L8_try_return;
16726 
16727  /* "PyClical.pyx":1764
16728  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16729  * else:
16730  * try: # <<<<<<<<<<<<<<
16731  * return math.tan(obj)
16732  * except:
16733  */
16734  }
16735  __pyx_L4_error:;
16736  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16737  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16738  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16739  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16740 
16741  /* "PyClical.pyx":1766
16742  * try:
16743  * return math.tan(obj)
16744  * except: # <<<<<<<<<<<<<<
16745  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16746  *
16747  */
16748  /*except:*/ {
16749  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16750  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16751  __Pyx_GOTREF(__pyx_t_5);
16752  __Pyx_GOTREF(__pyx_t_9);
16753  __Pyx_GOTREF(__pyx_t_10);
16754 
16755  /* "PyClical.pyx":1767
16756  * return math.tan(obj)
16757  * except:
16758  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16759  *
16760  * cpdef inline atan(obj,i = None):
16761  */
16762  __Pyx_XDECREF(__pyx_r);
16763  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16764  __Pyx_GOTREF(__pyx_t_3);
16765  __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)
16766  __Pyx_GOTREF(__pyx_t_11);
16767  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16768  __pyx_r = __pyx_t_11;
16769  __pyx_t_11 = 0;
16770  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16771  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16772  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16773  goto __pyx_L7_except_return;
16774  }
16775  __pyx_L6_except_error:;
16776 
16777  /* "PyClical.pyx":1764
16778  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16779  * else:
16780  * try: # <<<<<<<<<<<<<<
16781  * return math.tan(obj)
16782  * except:
16783  */
16784  __Pyx_XGIVEREF(__pyx_t_6);
16785  __Pyx_XGIVEREF(__pyx_t_7);
16786  __Pyx_XGIVEREF(__pyx_t_8);
16787  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16788  goto __pyx_L1_error;
16789  __pyx_L8_try_return:;
16790  __Pyx_XGIVEREF(__pyx_t_6);
16791  __Pyx_XGIVEREF(__pyx_t_7);
16792  __Pyx_XGIVEREF(__pyx_t_8);
16793  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16794  goto __pyx_L0;
16795  __pyx_L7_except_return:;
16796  __Pyx_XGIVEREF(__pyx_t_6);
16797  __Pyx_XGIVEREF(__pyx_t_7);
16798  __Pyx_XGIVEREF(__pyx_t_8);
16799  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16800  goto __pyx_L0;
16801  }
16802  }
16803 
16804  /* "PyClical.pyx":1752
16805  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16806  *
16807  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16808  * """
16809  * Tangent of multivector with optional complexifier.
16810  */
16811 
16812  /* function exit code */
16813  __pyx_L1_error:;
16814  __Pyx_XDECREF(__pyx_t_3);
16815  __Pyx_XDECREF(__pyx_t_5);
16816  __Pyx_XDECREF(__pyx_t_9);
16817  __Pyx_XDECREF(__pyx_t_10);
16818  __Pyx_XDECREF(__pyx_t_11);
16819  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16820  __pyx_r = 0;
16821  __pyx_L0:;
16822  __Pyx_XGIVEREF(__pyx_r);
16823  __Pyx_RefNannyFinishContext();
16824  return __pyx_r;
16825  }
16826 
16827  /* Python wrapper */
16828  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16829  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 ";
16830  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16831  PyObject *__pyx_v_obj = 0;
16832  PyObject *__pyx_v_i = 0;
16833  PyObject *__pyx_r = 0;
16834  __Pyx_RefNannyDeclarations
16835  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16836  {
16837  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16838  PyObject* values[2] = {0,0};
16839  values[1] = ((PyObject *)Py_None);
16840  if (unlikely(__pyx_kwds)) {
16841  Py_ssize_t kw_args;
16842  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16843  switch (pos_args) {
16844  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16845  CYTHON_FALLTHROUGH;
16846  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16847  CYTHON_FALLTHROUGH;
16848  case 0: break;
16849  default: goto __pyx_L5_argtuple_error;
16850  }
16851  kw_args = PyDict_Size(__pyx_kwds);
16852  switch (pos_args) {
16853  case 0:
16854  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16855  else goto __pyx_L5_argtuple_error;
16856  CYTHON_FALLTHROUGH;
16857  case 1:
16858  if (kw_args > 0) {
16859  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16860  if (value) { values[1] = value; kw_args--; }
16861  }
16862  }
16863  if (unlikely(kw_args > 0)) {
16864  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16865  }
16866  } else {
16867  switch (PyTuple_GET_SIZE(__pyx_args)) {
16868  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16869  CYTHON_FALLTHROUGH;
16870  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16871  break;
16872  default: goto __pyx_L5_argtuple_error;
16873  }
16874  }
16875  __pyx_v_obj = values[0];
16876  __pyx_v_i = values[1];
16877  }
16878  goto __pyx_L4_argument_unpacking_done;
16879  __pyx_L5_argtuple_error:;
16880  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16881  __pyx_L3_error:;
16882  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16883  __Pyx_RefNannyFinishContext();
16884  return NULL;
16885  __pyx_L4_argument_unpacking_done:;
16886  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16887 
16888  /* function exit code */
16889  __Pyx_RefNannyFinishContext();
16890  return __pyx_r;
16891  }
16892 
16893  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16894  PyObject *__pyx_r = NULL;
16895  __Pyx_RefNannyDeclarations
16896  PyObject *__pyx_t_1 = NULL;
16897  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16898  __Pyx_RefNannySetupContext("tan", 0);
16899  __Pyx_XDECREF(__pyx_r);
16900  __pyx_t_2.__pyx_n = 1;
16901  __pyx_t_2.i = __pyx_v_i;
16902  __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)
16903  __Pyx_GOTREF(__pyx_t_1);
16904  __pyx_r = __pyx_t_1;
16905  __pyx_t_1 = 0;
16906  goto __pyx_L0;
16907 
16908  /* function exit code */
16909  __pyx_L1_error:;
16910  __Pyx_XDECREF(__pyx_t_1);
16911  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16912  __pyx_r = NULL;
16913  __pyx_L0:;
16914  __Pyx_XGIVEREF(__pyx_r);
16915  __Pyx_RefNannyFinishContext();
16916  return __pyx_r;
16917  }
16918 
16919  /* "PyClical.pyx":1769
16920  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16921  *
16922  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16923  * """
16924  * Inverse tangent of multivector with optional complexifier.
16925  */
16926 
16927  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16928  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) {
16929  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16930  PyObject *__pyx_r = NULL;
16931  __Pyx_RefNannyDeclarations
16932  int __pyx_t_1;
16933  int __pyx_t_2;
16934  PyObject *__pyx_t_3 = NULL;
16935  Clifford __pyx_t_4;
16936  PyObject *__pyx_t_5 = NULL;
16937  PyObject *__pyx_t_6 = NULL;
16938  PyObject *__pyx_t_7 = NULL;
16939  PyObject *__pyx_t_8 = NULL;
16940  PyObject *__pyx_t_9 = NULL;
16941  PyObject *__pyx_t_10 = NULL;
16942  PyObject *__pyx_t_11 = NULL;
16943  __Pyx_RefNannySetupContext("atan", 0);
16944  if (__pyx_optional_args) {
16945  if (__pyx_optional_args->__pyx_n > 0) {
16946  __pyx_v_i = __pyx_optional_args->i;
16947  }
16948  }
16949 
16950  /* "PyClical.pyx":1778
16951  * {1}
16952  * """
16953  * if not (i is None): # <<<<<<<<<<<<<<
16954  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16955  * else:
16956  */
16957  __pyx_t_1 = (__pyx_v_i != Py_None);
16958  __pyx_t_2 = (__pyx_t_1 != 0);
16959  if (__pyx_t_2) {
16960 
16961  /* "PyClical.pyx":1779
16962  * """
16963  * if not (i is None):
16964  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16965  * else:
16966  * try:
16967  */
16968  __Pyx_XDECREF(__pyx_r);
16969  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16970  __Pyx_GOTREF(__pyx_t_3);
16971  try {
16972  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16973  } catch(...) {
16974  __Pyx_CppExn2PyErr();
16975  __PYX_ERR(0, 1779, __pyx_L1_error)
16976  }
16977  __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)
16978  __Pyx_GOTREF(__pyx_t_5);
16979  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16980  __pyx_r = __pyx_t_5;
16981  __pyx_t_5 = 0;
16982  goto __pyx_L0;
16983 
16984  /* "PyClical.pyx":1778
16985  * {1}
16986  * """
16987  * if not (i is None): # <<<<<<<<<<<<<<
16988  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16989  * else:
16990  */
16991  }
16992 
16993  /* "PyClical.pyx":1781
16994  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16995  * else:
16996  * try: # <<<<<<<<<<<<<<
16997  * return math.atan(obj)
16998  * except:
16999  */
17000  /*else*/ {
17001  {
17002  __Pyx_PyThreadState_declare
17003  __Pyx_PyThreadState_assign
17004  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17005  __Pyx_XGOTREF(__pyx_t_6);
17006  __Pyx_XGOTREF(__pyx_t_7);
17007  __Pyx_XGOTREF(__pyx_t_8);
17008  /*try:*/ {
17009 
17010  /* "PyClical.pyx":1782
17011  * else:
17012  * try:
17013  * return math.atan(obj) # <<<<<<<<<<<<<<
17014  * except:
17015  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17016  */
17017  __Pyx_XDECREF(__pyx_r);
17018  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
17019  __Pyx_GOTREF(__pyx_t_3);
17020  __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)
17021  __Pyx_GOTREF(__pyx_t_9);
17022  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17023  __pyx_t_3 = NULL;
17024  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17025  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17026  if (likely(__pyx_t_3)) {
17027  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17028  __Pyx_INCREF(__pyx_t_3);
17029  __Pyx_INCREF(function);
17030  __Pyx_DECREF_SET(__pyx_t_9, function);
17031  }
17032  }
17033  if (!__pyx_t_3) {
17034  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17035  __Pyx_GOTREF(__pyx_t_5);
17036  } else {
17037  #if CYTHON_FAST_PYCALL
17038  if (PyFunction_Check(__pyx_t_9)) {
17039  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17040  __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)
17041  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17042  __Pyx_GOTREF(__pyx_t_5);
17043  } else
17044  #endif
17045  #if CYTHON_FAST_PYCCALL
17046  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17047  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17048  __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)
17049  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17050  __Pyx_GOTREF(__pyx_t_5);
17051  } else
17052  #endif
17053  {
17054  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L4_error)
17055  __Pyx_GOTREF(__pyx_t_10);
17056  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17057  __Pyx_INCREF(__pyx_v_obj);
17058  __Pyx_GIVEREF(__pyx_v_obj);
17059  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17060  __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)
17061  __Pyx_GOTREF(__pyx_t_5);
17062  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17063  }
17064  }
17065  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17066  __pyx_r = __pyx_t_5;
17067  __pyx_t_5 = 0;
17068  goto __pyx_L8_try_return;
17069 
17070  /* "PyClical.pyx":1781
17071  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17072  * else:
17073  * try: # <<<<<<<<<<<<<<
17074  * return math.atan(obj)
17075  * except:
17076  */
17077  }
17078  __pyx_L4_error:;
17079  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17080  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17081  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17082  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17083 
17084  /* "PyClical.pyx":1783
17085  * try:
17086  * return math.atan(obj)
17087  * except: # <<<<<<<<<<<<<<
17088  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17089  *
17090  */
17091  /*except:*/ {
17092  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17093  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17094  __Pyx_GOTREF(__pyx_t_5);
17095  __Pyx_GOTREF(__pyx_t_9);
17096  __Pyx_GOTREF(__pyx_t_10);
17097 
17098  /* "PyClical.pyx":1784
17099  * return math.atan(obj)
17100  * except:
17101  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17102  *
17103  * cpdef inline tanh(obj):
17104  */
17105  __Pyx_XDECREF(__pyx_r);
17106  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
17107  __Pyx_GOTREF(__pyx_t_3);
17108  __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)
17109  __Pyx_GOTREF(__pyx_t_11);
17110  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17111  __pyx_r = __pyx_t_11;
17112  __pyx_t_11 = 0;
17113  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17114  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17115  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17116  goto __pyx_L7_except_return;
17117  }
17118  __pyx_L6_except_error:;
17119 
17120  /* "PyClical.pyx":1781
17121  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17122  * else:
17123  * try: # <<<<<<<<<<<<<<
17124  * return math.atan(obj)
17125  * except:
17126  */
17127  __Pyx_XGIVEREF(__pyx_t_6);
17128  __Pyx_XGIVEREF(__pyx_t_7);
17129  __Pyx_XGIVEREF(__pyx_t_8);
17130  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17131  goto __pyx_L1_error;
17132  __pyx_L8_try_return:;
17133  __Pyx_XGIVEREF(__pyx_t_6);
17134  __Pyx_XGIVEREF(__pyx_t_7);
17135  __Pyx_XGIVEREF(__pyx_t_8);
17136  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17137  goto __pyx_L0;
17138  __pyx_L7_except_return:;
17139  __Pyx_XGIVEREF(__pyx_t_6);
17140  __Pyx_XGIVEREF(__pyx_t_7);
17141  __Pyx_XGIVEREF(__pyx_t_8);
17142  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17143  goto __pyx_L0;
17144  }
17145  }
17146 
17147  /* "PyClical.pyx":1769
17148  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17149  *
17150  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17151  * """
17152  * Inverse tangent of multivector with optional complexifier.
17153  */
17154 
17155  /* function exit code */
17156  __pyx_L1_error:;
17157  __Pyx_XDECREF(__pyx_t_3);
17158  __Pyx_XDECREF(__pyx_t_5);
17159  __Pyx_XDECREF(__pyx_t_9);
17160  __Pyx_XDECREF(__pyx_t_10);
17161  __Pyx_XDECREF(__pyx_t_11);
17162  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17163  __pyx_r = 0;
17164  __pyx_L0:;
17165  __Pyx_XGIVEREF(__pyx_r);
17166  __Pyx_RefNannyFinishContext();
17167  return __pyx_r;
17168  }
17169 
17170  /* Python wrapper */
17171  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17172  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 ";
17173  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17174  PyObject *__pyx_v_obj = 0;
17175  PyObject *__pyx_v_i = 0;
17176  PyObject *__pyx_r = 0;
17177  __Pyx_RefNannyDeclarations
17178  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17179  {
17180  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17181  PyObject* values[2] = {0,0};
17182  values[1] = ((PyObject *)Py_None);
17183  if (unlikely(__pyx_kwds)) {
17184  Py_ssize_t kw_args;
17185  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17186  switch (pos_args) {
17187  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17188  CYTHON_FALLTHROUGH;
17189  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17190  CYTHON_FALLTHROUGH;
17191  case 0: break;
17192  default: goto __pyx_L5_argtuple_error;
17193  }
17194  kw_args = PyDict_Size(__pyx_kwds);
17195  switch (pos_args) {
17196  case 0:
17197  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17198  else goto __pyx_L5_argtuple_error;
17199  CYTHON_FALLTHROUGH;
17200  case 1:
17201  if (kw_args > 0) {
17202  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17203  if (value) { values[1] = value; kw_args--; }
17204  }
17205  }
17206  if (unlikely(kw_args > 0)) {
17207  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
17208  }
17209  } else {
17210  switch (PyTuple_GET_SIZE(__pyx_args)) {
17211  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17212  CYTHON_FALLTHROUGH;
17213  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17214  break;
17215  default: goto __pyx_L5_argtuple_error;
17216  }
17217  }
17218  __pyx_v_obj = values[0];
17219  __pyx_v_i = values[1];
17220  }
17221  goto __pyx_L4_argument_unpacking_done;
17222  __pyx_L5_argtuple_error:;
17223  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
17224  __pyx_L3_error:;
17225  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17226  __Pyx_RefNannyFinishContext();
17227  return NULL;
17228  __pyx_L4_argument_unpacking_done:;
17229  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17230 
17231  /* function exit code */
17232  __Pyx_RefNannyFinishContext();
17233  return __pyx_r;
17234  }
17235 
17236  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17237  PyObject *__pyx_r = NULL;
17238  __Pyx_RefNannyDeclarations
17239  PyObject *__pyx_t_1 = NULL;
17240  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17241  __Pyx_RefNannySetupContext("atan", 0);
17242  __Pyx_XDECREF(__pyx_r);
17243  __pyx_t_2.__pyx_n = 1;
17244  __pyx_t_2.i = __pyx_v_i;
17245  __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)
17246  __Pyx_GOTREF(__pyx_t_1);
17247  __pyx_r = __pyx_t_1;
17248  __pyx_t_1 = 0;
17249  goto __pyx_L0;
17250 
17251  /* function exit code */
17252  __pyx_L1_error:;
17253  __Pyx_XDECREF(__pyx_t_1);
17254  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17255  __pyx_r = NULL;
17256  __pyx_L0:;
17257  __Pyx_XGIVEREF(__pyx_r);
17258  __Pyx_RefNannyFinishContext();
17259  return __pyx_r;
17260  }
17261 
17262  /* "PyClical.pyx":1786
17263  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17264  *
17265  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17266  * """
17267  * Hyperbolic tangent of multivector.
17268  */
17269 
17270  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17271  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17272  PyObject *__pyx_r = NULL;
17273  __Pyx_RefNannyDeclarations
17274  PyObject *__pyx_t_1 = NULL;
17275  PyObject *__pyx_t_2 = NULL;
17276  PyObject *__pyx_t_3 = NULL;
17277  PyObject *__pyx_t_4 = NULL;
17278  PyObject *__pyx_t_5 = NULL;
17279  PyObject *__pyx_t_6 = NULL;
17280  PyObject *__pyx_t_7 = NULL;
17281  PyObject *__pyx_t_8 = NULL;
17282  __Pyx_RefNannySetupContext("tanh", 0);
17283 
17284  /* "PyClical.pyx":1793
17285  * {1,2}
17286  * """
17287  * try: # <<<<<<<<<<<<<<
17288  * return math.tanh(obj)
17289  * except:
17290  */
17291  {
17292  __Pyx_PyThreadState_declare
17293  __Pyx_PyThreadState_assign
17294  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17295  __Pyx_XGOTREF(__pyx_t_1);
17296  __Pyx_XGOTREF(__pyx_t_2);
17297  __Pyx_XGOTREF(__pyx_t_3);
17298  /*try:*/ {
17299 
17300  /* "PyClical.pyx":1794
17301  * """
17302  * try:
17303  * return math.tanh(obj) # <<<<<<<<<<<<<<
17304  * except:
17305  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17306  */
17307  __Pyx_XDECREF(__pyx_r);
17308  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
17309  __Pyx_GOTREF(__pyx_t_5);
17310  __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)
17311  __Pyx_GOTREF(__pyx_t_6);
17312  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17313  __pyx_t_5 = NULL;
17314  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17315  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17316  if (likely(__pyx_t_5)) {
17317  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17318  __Pyx_INCREF(__pyx_t_5);
17319  __Pyx_INCREF(function);
17320  __Pyx_DECREF_SET(__pyx_t_6, function);
17321  }
17322  }
17323  if (!__pyx_t_5) {
17324  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17325  __Pyx_GOTREF(__pyx_t_4);
17326  } else {
17327  #if CYTHON_FAST_PYCALL
17328  if (PyFunction_Check(__pyx_t_6)) {
17329  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17330  __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)
17331  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17332  __Pyx_GOTREF(__pyx_t_4);
17333  } else
17334  #endif
17335  #if CYTHON_FAST_PYCCALL
17336  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17337  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17338  __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)
17339  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17340  __Pyx_GOTREF(__pyx_t_4);
17341  } else
17342  #endif
17343  {
17344  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1794, __pyx_L3_error)
17345  __Pyx_GOTREF(__pyx_t_7);
17346  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
17347  __Pyx_INCREF(__pyx_v_obj);
17348  __Pyx_GIVEREF(__pyx_v_obj);
17349  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
17350  __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)
17351  __Pyx_GOTREF(__pyx_t_4);
17352  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17353  }
17354  }
17355  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17356  __pyx_r = __pyx_t_4;
17357  __pyx_t_4 = 0;
17358  goto __pyx_L7_try_return;
17359 
17360  /* "PyClical.pyx":1793
17361  * {1,2}
17362  * """
17363  * try: # <<<<<<<<<<<<<<
17364  * return math.tanh(obj)
17365  * except:
17366  */
17367  }
17368  __pyx_L3_error:;
17369  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17370  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17371  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17372  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17373 
17374  /* "PyClical.pyx":1795
17375  * try:
17376  * return math.tanh(obj)
17377  * except: # <<<<<<<<<<<<<<
17378  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17379  *
17380  */
17381  /*except:*/ {
17382  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17383  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17384  __Pyx_GOTREF(__pyx_t_4);
17385  __Pyx_GOTREF(__pyx_t_6);
17386  __Pyx_GOTREF(__pyx_t_7);
17387 
17388  /* "PyClical.pyx":1796
17389  * return math.tanh(obj)
17390  * except:
17391  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17392  *
17393  * cpdef inline atanh(obj,i = None):
17394  */
17395  __Pyx_XDECREF(__pyx_r);
17396  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
17397  __Pyx_GOTREF(__pyx_t_5);
17398  __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)
17399  __Pyx_GOTREF(__pyx_t_8);
17400  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17401  __pyx_r = __pyx_t_8;
17402  __pyx_t_8 = 0;
17403  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17404  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17405  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17406  goto __pyx_L6_except_return;
17407  }
17408  __pyx_L5_except_error:;
17409 
17410  /* "PyClical.pyx":1793
17411  * {1,2}
17412  * """
17413  * try: # <<<<<<<<<<<<<<
17414  * return math.tanh(obj)
17415  * except:
17416  */
17417  __Pyx_XGIVEREF(__pyx_t_1);
17418  __Pyx_XGIVEREF(__pyx_t_2);
17419  __Pyx_XGIVEREF(__pyx_t_3);
17420  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17421  goto __pyx_L1_error;
17422  __pyx_L7_try_return:;
17423  __Pyx_XGIVEREF(__pyx_t_1);
17424  __Pyx_XGIVEREF(__pyx_t_2);
17425  __Pyx_XGIVEREF(__pyx_t_3);
17426  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17427  goto __pyx_L0;
17428  __pyx_L6_except_return:;
17429  __Pyx_XGIVEREF(__pyx_t_1);
17430  __Pyx_XGIVEREF(__pyx_t_2);
17431  __Pyx_XGIVEREF(__pyx_t_3);
17432  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17433  goto __pyx_L0;
17434  }
17435 
17436  /* "PyClical.pyx":1786
17437  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17438  *
17439  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17440  * """
17441  * Hyperbolic tangent of multivector.
17442  */
17443 
17444  /* function exit code */
17445  __pyx_L1_error:;
17446  __Pyx_XDECREF(__pyx_t_4);
17447  __Pyx_XDECREF(__pyx_t_5);
17448  __Pyx_XDECREF(__pyx_t_6);
17449  __Pyx_XDECREF(__pyx_t_7);
17450  __Pyx_XDECREF(__pyx_t_8);
17451  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17452  __pyx_r = 0;
17453  __pyx_L0:;
17454  __Pyx_XGIVEREF(__pyx_r);
17455  __Pyx_RefNannyFinishContext();
17456  return __pyx_r;
17457  }
17458 
17459  /* Python wrapper */
17460  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17461  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 ";
17462  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17463  PyObject *__pyx_r = 0;
17464  __Pyx_RefNannyDeclarations
17465  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17466  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17467 
17468  /* function exit code */
17469  __Pyx_RefNannyFinishContext();
17470  return __pyx_r;
17471  }
17472 
17473  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17474  PyObject *__pyx_r = NULL;
17475  __Pyx_RefNannyDeclarations
17476  PyObject *__pyx_t_1 = NULL;
17477  __Pyx_RefNannySetupContext("tanh", 0);
17478  __Pyx_XDECREF(__pyx_r);
17479  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17480  __Pyx_GOTREF(__pyx_t_1);
17481  __pyx_r = __pyx_t_1;
17482  __pyx_t_1 = 0;
17483  goto __pyx_L0;
17484 
17485  /* function exit code */
17486  __pyx_L1_error:;
17487  __Pyx_XDECREF(__pyx_t_1);
17488  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17489  __pyx_r = NULL;
17490  __pyx_L0:;
17491  __Pyx_XGIVEREF(__pyx_r);
17492  __Pyx_RefNannyFinishContext();
17493  return __pyx_r;
17494  }
17495 
17496  /* "PyClical.pyx":1798
17497  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17498  *
17499  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17500  * """
17501  * Inverse hyperbolic tangent of multivector with optional complexifier.
17502  */
17503 
17504  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17505  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) {
17506  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17507  PyObject *__pyx_r = NULL;
17508  __Pyx_RefNannyDeclarations
17509  int __pyx_t_1;
17510  int __pyx_t_2;
17511  PyObject *__pyx_t_3 = NULL;
17512  Clifford __pyx_t_4;
17513  PyObject *__pyx_t_5 = NULL;
17514  PyObject *__pyx_t_6 = NULL;
17515  PyObject *__pyx_t_7 = NULL;
17516  PyObject *__pyx_t_8 = NULL;
17517  PyObject *__pyx_t_9 = NULL;
17518  PyObject *__pyx_t_10 = NULL;
17519  PyObject *__pyx_t_11 = NULL;
17520  __Pyx_RefNannySetupContext("atanh", 0);
17521  if (__pyx_optional_args) {
17522  if (__pyx_optional_args->__pyx_n > 0) {
17523  __pyx_v_i = __pyx_optional_args->i;
17524  }
17525  }
17526 
17527  /* "PyClical.pyx":1807
17528  * {1,2}
17529  * """
17530  * if not (i is None): # <<<<<<<<<<<<<<
17531  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17532  * else:
17533  */
17534  __pyx_t_1 = (__pyx_v_i != Py_None);
17535  __pyx_t_2 = (__pyx_t_1 != 0);
17536  if (__pyx_t_2) {
17537 
17538  /* "PyClical.pyx":1808
17539  * """
17540  * if not (i is None):
17541  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17542  * else:
17543  * try:
17544  */
17545  __Pyx_XDECREF(__pyx_r);
17546  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17547  __Pyx_GOTREF(__pyx_t_3);
17548  try {
17549  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17550  } catch(...) {
17551  __Pyx_CppExn2PyErr();
17552  __PYX_ERR(0, 1808, __pyx_L1_error)
17553  }
17554  __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)
17555  __Pyx_GOTREF(__pyx_t_5);
17556  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17557  __pyx_r = __pyx_t_5;
17558  __pyx_t_5 = 0;
17559  goto __pyx_L0;
17560 
17561  /* "PyClical.pyx":1807
17562  * {1,2}
17563  * """
17564  * if not (i is None): # <<<<<<<<<<<<<<
17565  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17566  * else:
17567  */
17568  }
17569 
17570  /* "PyClical.pyx":1810
17571  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17572  * else:
17573  * try: # <<<<<<<<<<<<<<
17574  * return math.atanh(obj)
17575  * except:
17576  */
17577  /*else*/ {
17578  {
17579  __Pyx_PyThreadState_declare
17580  __Pyx_PyThreadState_assign
17581  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17582  __Pyx_XGOTREF(__pyx_t_6);
17583  __Pyx_XGOTREF(__pyx_t_7);
17584  __Pyx_XGOTREF(__pyx_t_8);
17585  /*try:*/ {
17586 
17587  /* "PyClical.pyx":1811
17588  * else:
17589  * try:
17590  * return math.atanh(obj) # <<<<<<<<<<<<<<
17591  * except:
17592  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17593  */
17594  __Pyx_XDECREF(__pyx_r);
17595  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17596  __Pyx_GOTREF(__pyx_t_3);
17597  __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)
17598  __Pyx_GOTREF(__pyx_t_9);
17599  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17600  __pyx_t_3 = NULL;
17601  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17602  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17603  if (likely(__pyx_t_3)) {
17604  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17605  __Pyx_INCREF(__pyx_t_3);
17606  __Pyx_INCREF(function);
17607  __Pyx_DECREF_SET(__pyx_t_9, function);
17608  }
17609  }
17610  if (!__pyx_t_3) {
17611  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17612  __Pyx_GOTREF(__pyx_t_5);
17613  } else {
17614  #if CYTHON_FAST_PYCALL
17615  if (PyFunction_Check(__pyx_t_9)) {
17616  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17617  __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)
17618  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17619  __Pyx_GOTREF(__pyx_t_5);
17620  } else
17621  #endif
17622  #if CYTHON_FAST_PYCCALL
17623  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17624  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17625  __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)
17626  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17627  __Pyx_GOTREF(__pyx_t_5);
17628  } else
17629  #endif
17630  {
17631  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1811, __pyx_L4_error)
17632  __Pyx_GOTREF(__pyx_t_10);
17633  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17634  __Pyx_INCREF(__pyx_v_obj);
17635  __Pyx_GIVEREF(__pyx_v_obj);
17636  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17637  __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)
17638  __Pyx_GOTREF(__pyx_t_5);
17639  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17640  }
17641  }
17642  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17643  __pyx_r = __pyx_t_5;
17644  __pyx_t_5 = 0;
17645  goto __pyx_L8_try_return;
17646 
17647  /* "PyClical.pyx":1810
17648  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17649  * else:
17650  * try: # <<<<<<<<<<<<<<
17651  * return math.atanh(obj)
17652  * except:
17653  */
17654  }
17655  __pyx_L4_error:;
17656  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17657  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17658  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17659  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17660 
17661  /* "PyClical.pyx":1812
17662  * try:
17663  * return math.atanh(obj)
17664  * except: # <<<<<<<<<<<<<<
17665  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17666  *
17667  */
17668  /*except:*/ {
17669  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17670  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17671  __Pyx_GOTREF(__pyx_t_5);
17672  __Pyx_GOTREF(__pyx_t_9);
17673  __Pyx_GOTREF(__pyx_t_10);
17674 
17675  /* "PyClical.pyx":1813
17676  * return math.atanh(obj)
17677  * except:
17678  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17679  *
17680  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17681  */
17682  __Pyx_XDECREF(__pyx_r);
17683  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17684  __Pyx_GOTREF(__pyx_t_3);
17685  __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)
17686  __Pyx_GOTREF(__pyx_t_11);
17687  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17688  __pyx_r = __pyx_t_11;
17689  __pyx_t_11 = 0;
17690  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17691  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17692  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17693  goto __pyx_L7_except_return;
17694  }
17695  __pyx_L6_except_error:;
17696 
17697  /* "PyClical.pyx":1810
17698  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17699  * else:
17700  * try: # <<<<<<<<<<<<<<
17701  * return math.atanh(obj)
17702  * except:
17703  */
17704  __Pyx_XGIVEREF(__pyx_t_6);
17705  __Pyx_XGIVEREF(__pyx_t_7);
17706  __Pyx_XGIVEREF(__pyx_t_8);
17707  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17708  goto __pyx_L1_error;
17709  __pyx_L8_try_return:;
17710  __Pyx_XGIVEREF(__pyx_t_6);
17711  __Pyx_XGIVEREF(__pyx_t_7);
17712  __Pyx_XGIVEREF(__pyx_t_8);
17713  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17714  goto __pyx_L0;
17715  __pyx_L7_except_return:;
17716  __Pyx_XGIVEREF(__pyx_t_6);
17717  __Pyx_XGIVEREF(__pyx_t_7);
17718  __Pyx_XGIVEREF(__pyx_t_8);
17719  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17720  goto __pyx_L0;
17721  }
17722  }
17723 
17724  /* "PyClical.pyx":1798
17725  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17726  *
17727  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17728  * """
17729  * Inverse hyperbolic tangent of multivector with optional complexifier.
17730  */
17731 
17732  /* function exit code */
17733  __pyx_L1_error:;
17734  __Pyx_XDECREF(__pyx_t_3);
17735  __Pyx_XDECREF(__pyx_t_5);
17736  __Pyx_XDECREF(__pyx_t_9);
17737  __Pyx_XDECREF(__pyx_t_10);
17738  __Pyx_XDECREF(__pyx_t_11);
17739  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17740  __pyx_r = 0;
17741  __pyx_L0:;
17742  __Pyx_XGIVEREF(__pyx_r);
17743  __Pyx_RefNannyFinishContext();
17744  return __pyx_r;
17745  }
17746 
17747  /* Python wrapper */
17748  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17749  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 ";
17750  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17751  PyObject *__pyx_v_obj = 0;
17752  PyObject *__pyx_v_i = 0;
17753  PyObject *__pyx_r = 0;
17754  __Pyx_RefNannyDeclarations
17755  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17756  {
17757  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17758  PyObject* values[2] = {0,0};
17759  values[1] = ((PyObject *)Py_None);
17760  if (unlikely(__pyx_kwds)) {
17761  Py_ssize_t kw_args;
17762  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17763  switch (pos_args) {
17764  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17765  CYTHON_FALLTHROUGH;
17766  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17767  CYTHON_FALLTHROUGH;
17768  case 0: break;
17769  default: goto __pyx_L5_argtuple_error;
17770  }
17771  kw_args = PyDict_Size(__pyx_kwds);
17772  switch (pos_args) {
17773  case 0:
17774  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17775  else goto __pyx_L5_argtuple_error;
17776  CYTHON_FALLTHROUGH;
17777  case 1:
17778  if (kw_args > 0) {
17779  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17780  if (value) { values[1] = value; kw_args--; }
17781  }
17782  }
17783  if (unlikely(kw_args > 0)) {
17784  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17785  }
17786  } else {
17787  switch (PyTuple_GET_SIZE(__pyx_args)) {
17788  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17789  CYTHON_FALLTHROUGH;
17790  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17791  break;
17792  default: goto __pyx_L5_argtuple_error;
17793  }
17794  }
17795  __pyx_v_obj = values[0];
17796  __pyx_v_i = values[1];
17797  }
17798  goto __pyx_L4_argument_unpacking_done;
17799  __pyx_L5_argtuple_error:;
17800  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17801  __pyx_L3_error:;
17802  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17803  __Pyx_RefNannyFinishContext();
17804  return NULL;
17805  __pyx_L4_argument_unpacking_done:;
17806  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17807 
17808  /* function exit code */
17809  __Pyx_RefNannyFinishContext();
17810  return __pyx_r;
17811  }
17812 
17813  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17814  PyObject *__pyx_r = NULL;
17815  __Pyx_RefNannyDeclarations
17816  PyObject *__pyx_t_1 = NULL;
17817  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17818  __Pyx_RefNannySetupContext("atanh", 0);
17819  __Pyx_XDECREF(__pyx_r);
17820  __pyx_t_2.__pyx_n = 1;
17821  __pyx_t_2.i = __pyx_v_i;
17822  __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)
17823  __Pyx_GOTREF(__pyx_t_1);
17824  __pyx_r = __pyx_t_1;
17825  __pyx_t_1 = 0;
17826  goto __pyx_L0;
17827 
17828  /* function exit code */
17829  __pyx_L1_error:;
17830  __Pyx_XDECREF(__pyx_t_1);
17831  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17832  __pyx_r = NULL;
17833  __pyx_L0:;
17834  __Pyx_XGIVEREF(__pyx_r);
17835  __Pyx_RefNannyFinishContext();
17836  return __pyx_r;
17837  }
17838 
17839  /* "PyClical.pyx":1815
17840  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17841  *
17842  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17843  * """
17844  * Random multivector within a frame.
17845  */
17846 
17847  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17848  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) {
17849  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17850  PyObject *__pyx_r = NULL;
17851  __Pyx_RefNannyDeclarations
17852  PyObject *__pyx_t_1 = NULL;
17853  PyObject *__pyx_t_2 = NULL;
17854  scalar_t __pyx_t_3;
17855  PyObject *__pyx_t_4 = NULL;
17856  __Pyx_RefNannySetupContext("random_clifford", 0);
17857  if (__pyx_optional_args) {
17858  if (__pyx_optional_args->__pyx_n > 0) {
17859  __pyx_v_fill = __pyx_optional_args->fill;
17860  }
17861  }
17862 
17863  /* "PyClical.pyx":1822
17864  * {-3,-1,2}
17865  * """
17866  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17867  *
17868  * cpdef inline cga3(obj):
17869  */
17870  __Pyx_XDECREF(__pyx_r);
17871  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17872  __Pyx_GOTREF(__pyx_t_1);
17873  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17874  __Pyx_GOTREF(__pyx_t_2);
17875  __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)
17876  __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)
17877  __Pyx_GOTREF(__pyx_t_4);
17878  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17879  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17880  __pyx_r = __pyx_t_4;
17881  __pyx_t_4 = 0;
17882  goto __pyx_L0;
17883 
17884  /* "PyClical.pyx":1815
17885  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17886  *
17887  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17888  * """
17889  * Random multivector within a frame.
17890  */
17891 
17892  /* function exit code */
17893  __pyx_L1_error:;
17894  __Pyx_XDECREF(__pyx_t_1);
17895  __Pyx_XDECREF(__pyx_t_2);
17896  __Pyx_XDECREF(__pyx_t_4);
17897  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17898  __pyx_r = 0;
17899  __pyx_L0:;
17900  __Pyx_XGIVEREF(__pyx_r);
17901  __Pyx_RefNannyFinishContext();
17902  return __pyx_r;
17903  }
17904 
17905  /* Python wrapper */
17906  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17907  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 ";
17908  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17909  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17910  PyObject *__pyx_v_fill = 0;
17911  PyObject *__pyx_r = 0;
17912  __Pyx_RefNannyDeclarations
17913  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17914  {
17915  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17916  PyObject* values[2] = {0,0};
17917  values[1] = ((PyObject *)__pyx_float_1_0);
17918  if (unlikely(__pyx_kwds)) {
17919  Py_ssize_t kw_args;
17920  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17921  switch (pos_args) {
17922  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17923  CYTHON_FALLTHROUGH;
17924  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17925  CYTHON_FALLTHROUGH;
17926  case 0: break;
17927  default: goto __pyx_L5_argtuple_error;
17928  }
17929  kw_args = PyDict_Size(__pyx_kwds);
17930  switch (pos_args) {
17931  case 0:
17932  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17933  else goto __pyx_L5_argtuple_error;
17934  CYTHON_FALLTHROUGH;
17935  case 1:
17936  if (kw_args > 0) {
17937  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17938  if (value) { values[1] = value; kw_args--; }
17939  }
17940  }
17941  if (unlikely(kw_args > 0)) {
17942  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17943  }
17944  } else {
17945  switch (PyTuple_GET_SIZE(__pyx_args)) {
17946  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17947  CYTHON_FALLTHROUGH;
17948  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17949  break;
17950  default: goto __pyx_L5_argtuple_error;
17951  }
17952  }
17953  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17954  __pyx_v_fill = values[1];
17955  }
17956  goto __pyx_L4_argument_unpacking_done;
17957  __pyx_L5_argtuple_error:;
17958  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17959  __pyx_L3_error:;
17960  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17961  __Pyx_RefNannyFinishContext();
17962  return NULL;
17963  __pyx_L4_argument_unpacking_done:;
17964  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17965  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17966 
17967  /* function exit code */
17968  goto __pyx_L0;
17969  __pyx_L1_error:;
17970  __pyx_r = NULL;
17971  __pyx_L0:;
17972  __Pyx_RefNannyFinishContext();
17973  return __pyx_r;
17974  }
17975 
17976  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) {
17977  PyObject *__pyx_r = NULL;
17978  __Pyx_RefNannyDeclarations
17979  PyObject *__pyx_t_1 = NULL;
17980  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17981  __Pyx_RefNannySetupContext("random_clifford", 0);
17982  __Pyx_XDECREF(__pyx_r);
17983  __pyx_t_2.__pyx_n = 1;
17984  __pyx_t_2.fill = __pyx_v_fill;
17985  __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)
17986  __Pyx_GOTREF(__pyx_t_1);
17987  __pyx_r = __pyx_t_1;
17988  __pyx_t_1 = 0;
17989  goto __pyx_L0;
17990 
17991  /* function exit code */
17992  __pyx_L1_error:;
17993  __Pyx_XDECREF(__pyx_t_1);
17994  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17995  __pyx_r = NULL;
17996  __pyx_L0:;
17997  __Pyx_XGIVEREF(__pyx_r);
17998  __Pyx_RefNannyFinishContext();
17999  return __pyx_r;
18000  }
18001 
18002  /* "PyClical.pyx":1824
18003  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18004  *
18005  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18006  * """
18007  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18008  */
18009 
18010  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18011  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18012  PyObject *__pyx_r = NULL;
18013  __Pyx_RefNannyDeclarations
18014  PyObject *__pyx_t_1 = NULL;
18015  PyObject *__pyx_t_2 = NULL;
18016  __Pyx_RefNannySetupContext("cga3", 0);
18017 
18018  /* "PyClical.pyx":1831
18019  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18020  * """
18021  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18022  *
18023  * cpdef inline cga3std(obj):
18024  */
18025  __Pyx_XDECREF(__pyx_r);
18026  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
18027  __Pyx_GOTREF(__pyx_t_1);
18028  __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)
18029  __Pyx_GOTREF(__pyx_t_2);
18030  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18031  __pyx_r = __pyx_t_2;
18032  __pyx_t_2 = 0;
18033  goto __pyx_L0;
18034 
18035  /* "PyClical.pyx":1824
18036  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18037  *
18038  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18039  * """
18040  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18041  */
18042 
18043  /* function exit code */
18044  __pyx_L1_error:;
18045  __Pyx_XDECREF(__pyx_t_1);
18046  __Pyx_XDECREF(__pyx_t_2);
18047  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18048  __pyx_r = 0;
18049  __pyx_L0:;
18050  __Pyx_XGIVEREF(__pyx_r);
18051  __Pyx_RefNannyFinishContext();
18052  return __pyx_r;
18053  }
18054 
18055  /* Python wrapper */
18056  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18057  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 ";
18058  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18059  PyObject *__pyx_r = 0;
18060  __Pyx_RefNannyDeclarations
18061  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18062  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18063 
18064  /* function exit code */
18065  __Pyx_RefNannyFinishContext();
18066  return __pyx_r;
18067  }
18068 
18069  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18070  PyObject *__pyx_r = NULL;
18071  __Pyx_RefNannyDeclarations
18072  PyObject *__pyx_t_1 = NULL;
18073  __Pyx_RefNannySetupContext("cga3", 0);
18074  __Pyx_XDECREF(__pyx_r);
18075  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
18076  __Pyx_GOTREF(__pyx_t_1);
18077  __pyx_r = __pyx_t_1;
18078  __pyx_t_1 = 0;
18079  goto __pyx_L0;
18080 
18081  /* function exit code */
18082  __pyx_L1_error:;
18083  __Pyx_XDECREF(__pyx_t_1);
18084  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18085  __pyx_r = NULL;
18086  __pyx_L0:;
18087  __Pyx_XGIVEREF(__pyx_r);
18088  __Pyx_RefNannyFinishContext();
18089  return __pyx_r;
18090  }
18091 
18092  /* "PyClical.pyx":1833
18093  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18094  *
18095  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18096  * """
18097  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18098  */
18099 
18100  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18101  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18102  PyObject *__pyx_r = NULL;
18103  __Pyx_RefNannyDeclarations
18104  PyObject *__pyx_t_1 = NULL;
18105  PyObject *__pyx_t_2 = NULL;
18106  __Pyx_RefNannySetupContext("cga3std", 0);
18107 
18108  /* "PyClical.pyx":1842
18109  * 0
18110  * """
18111  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18112  *
18113  * cpdef inline agc3(obj):
18114  */
18115  __Pyx_XDECREF(__pyx_r);
18116  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
18117  __Pyx_GOTREF(__pyx_t_1);
18118  __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)
18119  __Pyx_GOTREF(__pyx_t_2);
18120  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18121  __pyx_r = __pyx_t_2;
18122  __pyx_t_2 = 0;
18123  goto __pyx_L0;
18124 
18125  /* "PyClical.pyx":1833
18126  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18127  *
18128  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18129  * """
18130  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18131  */
18132 
18133  /* function exit code */
18134  __pyx_L1_error:;
18135  __Pyx_XDECREF(__pyx_t_1);
18136  __Pyx_XDECREF(__pyx_t_2);
18137  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18138  __pyx_r = 0;
18139  __pyx_L0:;
18140  __Pyx_XGIVEREF(__pyx_r);
18141  __Pyx_RefNannyFinishContext();
18142  return __pyx_r;
18143  }
18144 
18145  /* Python wrapper */
18146  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18147  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 ";
18148  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18149  PyObject *__pyx_r = 0;
18150  __Pyx_RefNannyDeclarations
18151  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18152  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18153 
18154  /* function exit code */
18155  __Pyx_RefNannyFinishContext();
18156  return __pyx_r;
18157  }
18158 
18159  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18160  PyObject *__pyx_r = NULL;
18161  __Pyx_RefNannyDeclarations
18162  PyObject *__pyx_t_1 = NULL;
18163  __Pyx_RefNannySetupContext("cga3std", 0);
18164  __Pyx_XDECREF(__pyx_r);
18165  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
18166  __Pyx_GOTREF(__pyx_t_1);
18167  __pyx_r = __pyx_t_1;
18168  __pyx_t_1 = 0;
18169  goto __pyx_L0;
18170 
18171  /* function exit code */
18172  __pyx_L1_error:;
18173  __Pyx_XDECREF(__pyx_t_1);
18174  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18175  __pyx_r = NULL;
18176  __pyx_L0:;
18177  __Pyx_XGIVEREF(__pyx_r);
18178  __Pyx_RefNannyFinishContext();
18179  return __pyx_r;
18180  }
18181 
18182  /* "PyClical.pyx":1844
18183  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18184  *
18185  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18186  * """
18187  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18188  */
18189 
18190  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18191  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18192  PyObject *__pyx_r = NULL;
18193  __Pyx_RefNannyDeclarations
18194  PyObject *__pyx_t_1 = NULL;
18195  PyObject *__pyx_t_2 = NULL;
18196  __Pyx_RefNannySetupContext("agc3", 0);
18197 
18198  /* "PyClical.pyx":1853
18199  * 0
18200  * """
18201  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18202  *
18203  * # Some abbreviations.
18204  */
18205  __Pyx_XDECREF(__pyx_r);
18206  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
18207  __Pyx_GOTREF(__pyx_t_1);
18208  __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)
18209  __Pyx_GOTREF(__pyx_t_2);
18210  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18211  __pyx_r = __pyx_t_2;
18212  __pyx_t_2 = 0;
18213  goto __pyx_L0;
18214 
18215  /* "PyClical.pyx":1844
18216  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18217  *
18218  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18219  * """
18220  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18221  */
18222 
18223  /* function exit code */
18224  __pyx_L1_error:;
18225  __Pyx_XDECREF(__pyx_t_1);
18226  __Pyx_XDECREF(__pyx_t_2);
18227  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18228  __pyx_r = 0;
18229  __pyx_L0:;
18230  __Pyx_XGIVEREF(__pyx_r);
18231  __Pyx_RefNannyFinishContext();
18232  return __pyx_r;
18233  }
18234 
18235  /* Python wrapper */
18236  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18237  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 ";
18238  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18239  PyObject *__pyx_r = 0;
18240  __Pyx_RefNannyDeclarations
18241  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18242  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18243 
18244  /* function exit code */
18245  __Pyx_RefNannyFinishContext();
18246  return __pyx_r;
18247  }
18248 
18249  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18250  PyObject *__pyx_r = NULL;
18251  __Pyx_RefNannyDeclarations
18252  PyObject *__pyx_t_1 = NULL;
18253  __Pyx_RefNannySetupContext("agc3", 0);
18254  __Pyx_XDECREF(__pyx_r);
18255  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
18256  __Pyx_GOTREF(__pyx_t_1);
18257  __pyx_r = __pyx_t_1;
18258  __pyx_t_1 = 0;
18259  goto __pyx_L0;
18260 
18261  /* function exit code */
18262  __pyx_L1_error:;
18263  __Pyx_XDECREF(__pyx_t_1);
18264  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18265  __pyx_r = NULL;
18266  __pyx_L0:;
18267  __Pyx_XGIVEREF(__pyx_r);
18268  __Pyx_RefNannyFinishContext();
18269  return __pyx_r;
18270  }
18271 
18272  /* "PyClical.pyx":1887
18273  * """
18274  *
18275  * def e(obj): # <<<<<<<<<<<<<<
18276  * """
18277  * Abbreviation for clifford(index_set(obj)).
18278  */
18279 
18280  /* Python wrapper */
18281  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18282  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 ";
18283  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18284  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18285  PyObject *__pyx_r = 0;
18286  __Pyx_RefNannyDeclarations
18287  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18288  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18289 
18290  /* function exit code */
18291  __Pyx_RefNannyFinishContext();
18292  return __pyx_r;
18293  }
18294 
18295  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18296  PyObject *__pyx_r = NULL;
18297  __Pyx_RefNannyDeclarations
18298  PyObject *__pyx_t_1 = NULL;
18299  PyObject *__pyx_t_2 = NULL;
18300  __Pyx_RefNannySetupContext("e", 0);
18301 
18302  /* "PyClical.pyx":1898
18303  * 1
18304  * """
18305  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18306  *
18307  * def istpq(p, q):
18308  */
18309  __Pyx_XDECREF(__pyx_r);
18310  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1898, __pyx_L1_error)
18311  __Pyx_GOTREF(__pyx_t_1);
18312  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L1_error)
18313  __Pyx_GOTREF(__pyx_t_2);
18314  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18315  __pyx_r = __pyx_t_2;
18316  __pyx_t_2 = 0;
18317  goto __pyx_L0;
18318 
18319  /* "PyClical.pyx":1887
18320  * """
18321  *
18322  * def e(obj): # <<<<<<<<<<<<<<
18323  * """
18324  * Abbreviation for clifford(index_set(obj)).
18325  */
18326 
18327  /* function exit code */
18328  __pyx_L1_error:;
18329  __Pyx_XDECREF(__pyx_t_1);
18330  __Pyx_XDECREF(__pyx_t_2);
18331  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18332  __pyx_r = NULL;
18333  __pyx_L0:;
18334  __Pyx_XGIVEREF(__pyx_r);
18335  __Pyx_RefNannyFinishContext();
18336  return __pyx_r;
18337  }
18338 
18339  /* "PyClical.pyx":1900
18340  * return clifford(index_set(obj))
18341  *
18342  * def istpq(p, q): # <<<<<<<<<<<<<<
18343  * """
18344  * Abbreviation for index_set({-q,...p}).
18345  */
18346 
18347  /* Python wrapper */
18348  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18349  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 ";
18350  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18351  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18352  PyObject *__pyx_v_p = 0;
18353  PyObject *__pyx_v_q = 0;
18354  PyObject *__pyx_r = 0;
18355  __Pyx_RefNannyDeclarations
18356  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18357  {
18358  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18359  PyObject* values[2] = {0,0};
18360  if (unlikely(__pyx_kwds)) {
18361  Py_ssize_t kw_args;
18362  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18363  switch (pos_args) {
18364  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18365  CYTHON_FALLTHROUGH;
18366  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18367  CYTHON_FALLTHROUGH;
18368  case 0: break;
18369  default: goto __pyx_L5_argtuple_error;
18370  }
18371  kw_args = PyDict_Size(__pyx_kwds);
18372  switch (pos_args) {
18373  case 0:
18374  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18375  else goto __pyx_L5_argtuple_error;
18376  CYTHON_FALLTHROUGH;
18377  case 1:
18378  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18379  else {
18380  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
18381  }
18382  }
18383  if (unlikely(kw_args > 0)) {
18384  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
18385  }
18386  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18387  goto __pyx_L5_argtuple_error;
18388  } else {
18389  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18390  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18391  }
18392  __pyx_v_p = values[0];
18393  __pyx_v_q = values[1];
18394  }
18395  goto __pyx_L4_argument_unpacking_done;
18396  __pyx_L5_argtuple_error:;
18397  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
18398  __pyx_L3_error:;
18399  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18400  __Pyx_RefNannyFinishContext();
18401  return NULL;
18402  __pyx_L4_argument_unpacking_done:;
18403  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18404 
18405  /* function exit code */
18406  __Pyx_RefNannyFinishContext();
18407  return __pyx_r;
18408  }
18409 
18410  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18411  PyObject *__pyx_r = NULL;
18412  __Pyx_RefNannyDeclarations
18413  PyObject *__pyx_t_1 = NULL;
18414  PyObject *__pyx_t_2 = NULL;
18415  PyObject *__pyx_t_3 = NULL;
18416  __Pyx_RefNannySetupContext("istpq", 0);
18417 
18418  /* "PyClical.pyx":1907
18419  * {-3,-2,-1,1,2}
18420  * """
18421  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18422  *
18423  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18424  */
18425  __Pyx_XDECREF(__pyx_r);
18426  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
18427  __Pyx_GOTREF(__pyx_t_1);
18428  __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)
18429  __Pyx_GOTREF(__pyx_t_2);
18430  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18431  __Pyx_GOTREF(__pyx_t_3);
18432  __Pyx_GIVEREF(__pyx_t_1);
18433  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18434  __Pyx_GIVEREF(__pyx_t_2);
18435  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18436  __pyx_t_1 = 0;
18437  __pyx_t_2 = 0;
18438  __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)
18439  __Pyx_GOTREF(__pyx_t_2);
18440  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18441  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18442  __Pyx_GOTREF(__pyx_t_3);
18443  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18444  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_8PyClical_index_set), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18445  __Pyx_GOTREF(__pyx_t_2);
18446  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18447  __pyx_r = __pyx_t_2;
18448  __pyx_t_2 = 0;
18449  goto __pyx_L0;
18450 
18451  /* "PyClical.pyx":1900
18452  * return clifford(index_set(obj))
18453  *
18454  * def istpq(p, q): # <<<<<<<<<<<<<<
18455  * """
18456  * Abbreviation for index_set({-q,...p}).
18457  */
18458 
18459  /* function exit code */
18460  __pyx_L1_error:;
18461  __Pyx_XDECREF(__pyx_t_1);
18462  __Pyx_XDECREF(__pyx_t_2);
18463  __Pyx_XDECREF(__pyx_t_3);
18464  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18465  __pyx_r = NULL;
18466  __pyx_L0:;
18467  __Pyx_XGIVEREF(__pyx_r);
18468  __Pyx_RefNannyFinishContext();
18469  return __pyx_r;
18470  }
18471 
18472  /* "PyClical.pyx":1913
18473  *
18474  * # Doctest interface.
18475  * def _test(): # <<<<<<<<<<<<<<
18476  * import PyClical, doctest
18477  * return doctest.testmod(PyClical)
18478  */
18479 
18480  /* Python wrapper */
18481  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18482  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18483  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18484  PyObject *__pyx_r = 0;
18485  __Pyx_RefNannyDeclarations
18486  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18487  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18488 
18489  /* function exit code */
18490  __Pyx_RefNannyFinishContext();
18491  return __pyx_r;
18492  }
18493 
18494  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18495  PyObject *__pyx_v_PyClical = NULL;
18496  PyObject *__pyx_v_doctest = NULL;
18497  PyObject *__pyx_r = NULL;
18498  __Pyx_RefNannyDeclarations
18499  PyObject *__pyx_t_1 = NULL;
18500  PyObject *__pyx_t_2 = NULL;
18501  PyObject *__pyx_t_3 = NULL;
18502  PyObject *__pyx_t_4 = NULL;
18503  __Pyx_RefNannySetupContext("_test", 0);
18504 
18505  /* "PyClical.pyx":1914
18506  * # Doctest interface.
18507  * def _test():
18508  * import PyClical, doctest # <<<<<<<<<<<<<<
18509  * return doctest.testmod(PyClical)
18510  *
18511  */
18512  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18513  __Pyx_GOTREF(__pyx_t_1);
18514  __pyx_v_PyClical = __pyx_t_1;
18515  __pyx_t_1 = 0;
18516  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18517  __Pyx_GOTREF(__pyx_t_1);
18518  __pyx_v_doctest = __pyx_t_1;
18519  __pyx_t_1 = 0;
18520 
18521  /* "PyClical.pyx":1915
18522  * def _test():
18523  * import PyClical, doctest
18524  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18525  *
18526  * if __name__ == "__main__":
18527  */
18528  __Pyx_XDECREF(__pyx_r);
18529  __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)
18530  __Pyx_GOTREF(__pyx_t_2);
18531  __pyx_t_3 = NULL;
18532  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18533  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18534  if (likely(__pyx_t_3)) {
18535  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18536  __Pyx_INCREF(__pyx_t_3);
18537  __Pyx_INCREF(function);
18538  __Pyx_DECREF_SET(__pyx_t_2, function);
18539  }
18540  }
18541  if (!__pyx_t_3) {
18542  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18543  __Pyx_GOTREF(__pyx_t_1);
18544  } else {
18545  #if CYTHON_FAST_PYCALL
18546  if (PyFunction_Check(__pyx_t_2)) {
18547  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18548  __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)
18549  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18550  __Pyx_GOTREF(__pyx_t_1);
18551  } else
18552  #endif
18553  #if CYTHON_FAST_PYCCALL
18554  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18555  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18556  __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)
18557  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18558  __Pyx_GOTREF(__pyx_t_1);
18559  } else
18560  #endif
18561  {
18562  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
18563  __Pyx_GOTREF(__pyx_t_4);
18564  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18565  __Pyx_INCREF(__pyx_v_PyClical);
18566  __Pyx_GIVEREF(__pyx_v_PyClical);
18567  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18568  __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)
18569  __Pyx_GOTREF(__pyx_t_1);
18570  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18571  }
18572  }
18573  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18574  __pyx_r = __pyx_t_1;
18575  __pyx_t_1 = 0;
18576  goto __pyx_L0;
18577 
18578  /* "PyClical.pyx":1913
18579  *
18580  * # Doctest interface.
18581  * def _test(): # <<<<<<<<<<<<<<
18582  * import PyClical, doctest
18583  * return doctest.testmod(PyClical)
18584  */
18585 
18586  /* function exit code */
18587  __pyx_L1_error:;
18588  __Pyx_XDECREF(__pyx_t_1);
18589  __Pyx_XDECREF(__pyx_t_2);
18590  __Pyx_XDECREF(__pyx_t_3);
18591  __Pyx_XDECREF(__pyx_t_4);
18592  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18593  __pyx_r = NULL;
18594  __pyx_L0:;
18595  __Pyx_XDECREF(__pyx_v_PyClical);
18596  __Pyx_XDECREF(__pyx_v_doctest);
18597  __Pyx_XGIVEREF(__pyx_r);
18598  __Pyx_RefNannyFinishContext();
18599  return __pyx_r;
18600  }
18601  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18602 
18603  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18604  struct __pyx_obj_8PyClical_index_set *p;
18605  PyObject *o;
18606  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18607  o = (*t->tp_alloc)(t, 0);
18608  } else {
18609  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18610  }
18611  if (unlikely(!o)) return 0;
18612  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18613  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18614  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18615  return o;
18616  bad:
18617  Py_DECREF(o); o = 0;
18618  return NULL;
18619  }
18620 
18621  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18622  #if CYTHON_USE_TP_FINALIZE
18623  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))) {
18624  if (PyObject_CallFinalizerFromDealloc(o)) return;
18625  }
18626  #endif
18627  {
18628  PyObject *etype, *eval, *etb;
18629  PyErr_Fetch(&etype, &eval, &etb);
18630  ++Py_REFCNT(o);
18631  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18632  --Py_REFCNT(o);
18633  PyErr_Restore(etype, eval, etb);
18634  }
18635  (*Py_TYPE(o)->tp_free)(o);
18636  }
18637  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18638  PyObject *r;
18639  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18640  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18641  Py_DECREF(x);
18642  return r;
18643  }
18644 
18645  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18646  if (v) {
18647  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18648  }
18649  else {
18650  PyErr_Format(PyExc_NotImplementedError,
18651  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18652  return -1;
18653  }
18654  }
18655 
18656  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18657  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18658  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18659  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18660  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18661  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18662  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18663  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18664  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18665  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18666  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18667  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18668  {0, 0, 0, 0}
18669  };
18670 
18671  static PyNumberMethods __pyx_tp_as_number_index_set = {
18672  0, /*nb_add*/
18673  0, /*nb_subtract*/
18674  0, /*nb_multiply*/
18675  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18676  0, /*nb_divide*/
18677  #endif
18678  0, /*nb_remainder*/
18679  0, /*nb_divmod*/
18680  0, /*nb_power*/
18681  0, /*nb_negative*/
18682  0, /*nb_positive*/
18683  0, /*nb_absolute*/
18684  0, /*nb_nonzero*/
18685  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18686  0, /*nb_lshift*/
18687  0, /*nb_rshift*/
18688  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18689  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18690  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18691  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18692  0, /*nb_coerce*/
18693  #endif
18694  0, /*nb_int*/
18695  #if PY_MAJOR_VERSION < 3
18696  0, /*nb_long*/
18697  #else
18698  0, /*reserved*/
18699  #endif
18700  0, /*nb_float*/
18701  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18702  0, /*nb_oct*/
18703  #endif
18704  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18705  0, /*nb_hex*/
18706  #endif
18707  0, /*nb_inplace_add*/
18708  0, /*nb_inplace_subtract*/
18709  0, /*nb_inplace_multiply*/
18710  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18711  0, /*nb_inplace_divide*/
18712  #endif
18713  0, /*nb_inplace_remainder*/
18714  0, /*nb_inplace_power*/
18715  0, /*nb_inplace_lshift*/
18716  0, /*nb_inplace_rshift*/
18717  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18718  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18719  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18720  0, /*nb_floor_divide*/
18721  0, /*nb_true_divide*/
18722  0, /*nb_inplace_floor_divide*/
18723  0, /*nb_inplace_true_divide*/
18724  0, /*nb_index*/
18725  #if PY_VERSION_HEX >= 0x03050000
18726  0, /*nb_matrix_multiply*/
18727  #endif
18728  #if PY_VERSION_HEX >= 0x03050000
18729  0, /*nb_inplace_matrix_multiply*/
18730  #endif
18731  };
18732 
18733  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18734  0, /*sq_length*/
18735  0, /*sq_concat*/
18736  0, /*sq_repeat*/
18737  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18738  0, /*sq_slice*/
18739  0, /*sq_ass_item*/
18740  0, /*sq_ass_slice*/
18741  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18742  0, /*sq_inplace_concat*/
18743  0, /*sq_inplace_repeat*/
18744  };
18745 
18746  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18747  0, /*mp_length*/
18748  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18749  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18750  };
18751 
18752  static PyTypeObject __pyx_type_8PyClical_index_set = {
18753  PyVarObject_HEAD_INIT(0, 0)
18754  "PyClical.index_set", /*tp_name*/
18755  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18756  0, /*tp_itemsize*/
18757  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18758  0, /*tp_print*/
18759  0, /*tp_getattr*/
18760  0, /*tp_setattr*/
18761  #if PY_MAJOR_VERSION < 3
18762  0, /*tp_compare*/
18763  #endif
18764  #if PY_MAJOR_VERSION >= 3
18765  0, /*tp_as_async*/
18766  #endif
18767  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18768  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18769  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18770  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18771  0, /*tp_hash*/
18772  0, /*tp_call*/
18773  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18774  0, /*tp_getattro*/
18775  0, /*tp_setattro*/
18776  0, /*tp_as_buffer*/
18777  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18778  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18779  0, /*tp_traverse*/
18780  0, /*tp_clear*/
18781  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18782  0, /*tp_weaklistoffset*/
18783  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18784  0, /*tp_iternext*/
18785  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18786  0, /*tp_members*/
18787  0, /*tp_getset*/
18788  0, /*tp_base*/
18789  0, /*tp_dict*/
18790  0, /*tp_descr_get*/
18791  0, /*tp_descr_set*/
18792  0, /*tp_dictoffset*/
18793  0, /*tp_init*/
18794  0, /*tp_alloc*/
18795  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18796  0, /*tp_free*/
18797  0, /*tp_is_gc*/
18798  0, /*tp_bases*/
18799  0, /*tp_mro*/
18800  0, /*tp_cache*/
18801  0, /*tp_subclasses*/
18802  0, /*tp_weaklist*/
18803  0, /*tp_del*/
18804  0, /*tp_version_tag*/
18805  #if PY_VERSION_HEX >= 0x030400a1
18806  0, /*tp_finalize*/
18807  #endif
18808  };
18809  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18810 
18811  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18812  struct __pyx_obj_8PyClical_clifford *p;
18813  PyObject *o;
18814  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18815  o = (*t->tp_alloc)(t, 0);
18816  } else {
18817  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18818  }
18819  if (unlikely(!o)) return 0;
18820  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18821  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18822  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18823  return o;
18824  bad:
18825  Py_DECREF(o); o = 0;
18826  return NULL;
18827  }
18828 
18829  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18830  #if CYTHON_USE_TP_FINALIZE
18831  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))) {
18832  if (PyObject_CallFinalizerFromDealloc(o)) return;
18833  }
18834  #endif
18835  {
18836  PyObject *etype, *eval, *etb;
18837  PyErr_Fetch(&etype, &eval, &etb);
18838  ++Py_REFCNT(o);
18839  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18840  --Py_REFCNT(o);
18841  PyErr_Restore(etype, eval, etb);
18842  }
18843  (*Py_TYPE(o)->tp_free)(o);
18844  }
18845  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18846  PyObject *r;
18847  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18848  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18849  Py_DECREF(x);
18850  return r;
18851  }
18852 
18853  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18854  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18855  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18856  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18857  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18858  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18859  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18860  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18861  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18862  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18863  {"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18864  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18865  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18866  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18867  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18868  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18869  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18870  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18871  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18872  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18873  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18874  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18875  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18876  {0, 0, 0, 0}
18877  };
18878 
18879  static PyNumberMethods __pyx_tp_as_number_clifford = {
18880  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18881  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18882  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18883  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18884  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18885  #endif
18886  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18887  0, /*nb_divmod*/
18888  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18889  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18890  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18891  0, /*nb_absolute*/
18892  0, /*nb_nonzero*/
18893  0, /*nb_invert*/
18894  0, /*nb_lshift*/
18895  0, /*nb_rshift*/
18896  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18897  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18898  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18899  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18900  0, /*nb_coerce*/
18901  #endif
18902  0, /*nb_int*/
18903  #if PY_MAJOR_VERSION < 3
18904  0, /*nb_long*/
18905  #else
18906  0, /*reserved*/
18907  #endif
18908  0, /*nb_float*/
18909  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18910  0, /*nb_oct*/
18911  #endif
18912  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18913  0, /*nb_hex*/
18914  #endif
18915  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18916  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18917  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18918  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18919  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18920  #endif
18921  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18922  0, /*nb_inplace_power*/
18923  0, /*nb_inplace_lshift*/
18924  0, /*nb_inplace_rshift*/
18925  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18926  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18927  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18928  0, /*nb_floor_divide*/
18929  0, /*nb_true_divide*/
18930  0, /*nb_inplace_floor_divide*/
18931  0, /*nb_inplace_true_divide*/
18932  0, /*nb_index*/
18933  #if PY_VERSION_HEX >= 0x03050000
18934  0, /*nb_matrix_multiply*/
18935  #endif
18936  #if PY_VERSION_HEX >= 0x03050000
18937  0, /*nb_inplace_matrix_multiply*/
18938  #endif
18939  };
18940 
18941  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18942  0, /*sq_length*/
18943  0, /*sq_concat*/
18944  0, /*sq_repeat*/
18945  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18946  0, /*sq_slice*/
18947  0, /*sq_ass_item*/
18948  0, /*sq_ass_slice*/
18949  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18950  0, /*sq_inplace_concat*/
18951  0, /*sq_inplace_repeat*/
18952  };
18953 
18954  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18955  0, /*mp_length*/
18956  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18957  0, /*mp_ass_subscript*/
18958  };
18959 
18960  static PyTypeObject __pyx_type_8PyClical_clifford = {
18961  PyVarObject_HEAD_INIT(0, 0)
18962  "PyClical.clifford", /*tp_name*/
18963  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18964  0, /*tp_itemsize*/
18965  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18966  0, /*tp_print*/
18967  0, /*tp_getattr*/
18968  0, /*tp_setattr*/
18969  #if PY_MAJOR_VERSION < 3
18970  0, /*tp_compare*/
18971  #endif
18972  #if PY_MAJOR_VERSION >= 3
18973  0, /*tp_as_async*/
18974  #endif
18975  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18976  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18977  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18978  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18979  0, /*tp_hash*/
18980  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18981  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18982  0, /*tp_getattro*/
18983  0, /*tp_setattro*/
18984  0, /*tp_as_buffer*/
18985  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18986  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18987  0, /*tp_traverse*/
18988  0, /*tp_clear*/
18989  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18990  0, /*tp_weaklistoffset*/
18991  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18992  0, /*tp_iternext*/
18993  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18994  0, /*tp_members*/
18995  0, /*tp_getset*/
18996  0, /*tp_base*/
18997  0, /*tp_dict*/
18998  0, /*tp_descr_get*/
18999  0, /*tp_descr_set*/
19000  0, /*tp_dictoffset*/
19001  0, /*tp_init*/
19002  0, /*tp_alloc*/
19003  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19004  0, /*tp_free*/
19005  0, /*tp_is_gc*/
19006  0, /*tp_bases*/
19007  0, /*tp_mro*/
19008  0, /*tp_cache*/
19009  0, /*tp_subclasses*/
19010  0, /*tp_weaklist*/
19011  0, /*tp_del*/
19012  0, /*tp_version_tag*/
19013  #if PY_VERSION_HEX >= 0x030400a1
19014  0, /*tp_finalize*/
19015  #endif
19016  };
19017 
19018  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19019  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19020 
19021  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19022  PyObject *o;
19023  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__)))) {
19024  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19025  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19026  (void) PyObject_INIT(o, t);
19027  PyObject_GC_Track(o);
19028  } else {
19029  o = (*t->tp_alloc)(t, 0);
19030  if (unlikely(!o)) return 0;
19031  }
19032  return o;
19033  }
19034 
19035  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19036  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19037  PyObject_GC_UnTrack(o);
19038  Py_CLEAR(p->__pyx_v_idx);
19039  Py_CLEAR(p->__pyx_v_self);
19040  Py_CLEAR(p->__pyx_t_0);
19041  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__)))) {
19042  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19043  } else {
19044  (*Py_TYPE(o)->tp_free)(o);
19045  }
19046  }
19047 
19048  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19049  int e;
19050  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19051  if (p->__pyx_v_idx) {
19052  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19053  }
19054  if (p->__pyx_v_self) {
19055  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19056  }
19057  if (p->__pyx_t_0) {
19058  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19059  }
19060  return 0;
19061  }
19062 
19063  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19064  PyVarObject_HEAD_INIT(0, 0)
19065  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19066  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19067  0, /*tp_itemsize*/
19068  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19069  0, /*tp_print*/
19070  0, /*tp_getattr*/
19071  0, /*tp_setattr*/
19072  #if PY_MAJOR_VERSION < 3
19073  0, /*tp_compare*/
19074  #endif
19075  #if PY_MAJOR_VERSION >= 3
19076  0, /*tp_as_async*/
19077  #endif
19078  0, /*tp_repr*/
19079  0, /*tp_as_number*/
19080  0, /*tp_as_sequence*/
19081  0, /*tp_as_mapping*/
19082  0, /*tp_hash*/
19083  0, /*tp_call*/
19084  0, /*tp_str*/
19085  0, /*tp_getattro*/
19086  0, /*tp_setattro*/
19087  0, /*tp_as_buffer*/
19088  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19089  0, /*tp_doc*/
19090  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19091  0, /*tp_clear*/
19092  0, /*tp_richcompare*/
19093  0, /*tp_weaklistoffset*/
19094  0, /*tp_iter*/
19095  0, /*tp_iternext*/
19096  0, /*tp_methods*/
19097  0, /*tp_members*/
19098  0, /*tp_getset*/
19099  0, /*tp_base*/
19100  0, /*tp_dict*/
19101  0, /*tp_descr_get*/
19102  0, /*tp_descr_set*/
19103  0, /*tp_dictoffset*/
19104  0, /*tp_init*/
19105  0, /*tp_alloc*/
19106  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19107  0, /*tp_free*/
19108  0, /*tp_is_gc*/
19109  0, /*tp_bases*/
19110  0, /*tp_mro*/
19111  0, /*tp_cache*/
19112  0, /*tp_subclasses*/
19113  0, /*tp_weaklist*/
19114  0, /*tp_del*/
19115  0, /*tp_version_tag*/
19116  #if PY_VERSION_HEX >= 0x030400a1
19117  0, /*tp_finalize*/
19118  #endif
19119  };
19120 
19121  static PyMethodDef __pyx_methods[] = {
19122  {"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19123  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19124  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19125  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19126  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19127  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19128  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19129  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19130  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19131  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19132  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19133  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19134  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19135  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19136  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19137  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19138  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19139  {"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19140  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19141  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19142  {"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19143  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19144  {"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19145  {"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19146  {"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19147  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19148  {"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19149  {"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19150  {"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19151  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19152  {"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19153  {"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19154  {"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19155  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19156  {"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19157  {"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19158  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19159  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19160  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19161  {0, 0, 0, 0}
19162  };
19163 
19164  #if PY_MAJOR_VERSION >= 3
19165  #if CYTHON_PEP489_MULTI_PHASE_INIT
19166  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19167  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19168  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19169  {Py_mod_create, (void*)__pyx_pymod_create},
19170  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19171  {0, NULL}
19172  };
19173  #endif
19174 
19175  static struct PyModuleDef __pyx_moduledef = {
19176  PyModuleDef_HEAD_INIT,
19177  "PyClical",
19178  0, /* m_doc */
19179  #if CYTHON_PEP489_MULTI_PHASE_INIT
19180  0, /* m_size */
19181  #else
19182  -1, /* m_size */
19183  #endif
19184  __pyx_methods /* m_methods */,
19185  #if CYTHON_PEP489_MULTI_PHASE_INIT
19186  __pyx_moduledef_slots, /* m_slots */
19187  #else
19188  NULL, /* m_reload */
19189  #endif
19190  NULL, /* m_traverse */
19191  NULL, /* m_clear */
19192  NULL /* m_free */
19193  };
19194  #endif
19195 
19196 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19197  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
19198  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
19199  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19200  {&__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},
19201  {&__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},
19202  {&__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},
19203  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
19204  {&__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},
19205  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
19206  {&__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},
19207  {&__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},
19208  {&__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},
19209  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19210  {&__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},
19211  {&__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},
19212  {&__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},
19213  {&__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},
19214  {&__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},
19215  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19216  {&__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},
19217  {&__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},
19218  {&__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},
19219  {&__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},
19220  {&__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},
19221  {&__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},
19222  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19223  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19224  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19225  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19226  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19227  {&__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},
19228  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19229  {&__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},
19230  {&__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},
19231  {&__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},
19232  {&__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},
19233  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19234  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19235  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19236  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19237  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19238  {&__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},
19239  {&__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},
19240  {&__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},
19241  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19242  {&__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},
19243  {&__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},
19244  {&__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},
19245  {&__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},
19246  {&__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},
19247  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19248  {&__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},
19249  {&__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},
19250  {&__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},
19251  {&__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},
19252  {&__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},
19253  {&__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},
19254  {&__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},
19255  {&__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},
19256  {&__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},
19257  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19258  {&__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},
19259  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19260  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
19261  {&__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},
19262  {&__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},
19263  {&__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},
19264  {&__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},
19265  {&__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},
19266  {&__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},
19267  {&__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},
19268  {&__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},
19269  {&__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},
19270  {&__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},
19271  {&__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},
19272  {&__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},
19273  {&__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},
19274  {&__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},
19275  {&__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},
19276  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19277  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19278  {&__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},
19279  {&__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},
19280  {&__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},
19281  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19282  {&__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},
19283  {&__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},
19284  {&__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},
19285  {&__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},
19286  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19287  {&__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},
19288  {&__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},
19289  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19290  {&__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},
19291  {&__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},
19292  {&__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},
19293  {&__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},
19294  {&__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},
19295  {&__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},
19296  {&__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},
19297  {&__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},
19298  {&__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},
19299  {&__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},
19300  {&__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},
19301  {&__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},
19302  {&__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},
19303  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19304  {&__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},
19305  {&__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},
19306  {&__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},
19307  {&__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},
19308  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19309  {&__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},
19310  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19311  {&__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},
19312  {&__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},
19313  {&__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},
19314  {&__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},
19315  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19316  {&__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},
19317  {&__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},
19318  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19319  {&__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},
19320  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
19321  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
19322  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
19323  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
19324  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
19325  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
19326  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
19327  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19328  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
19329  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19330  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
19331  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
19332  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19333  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
19334  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19335  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
19336  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19337  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
19338  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19339  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
19340  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19341  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
19342  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
19343  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
19344  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19345  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
19346  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
19347  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
19348  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
19349  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
19350  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
19351  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
19352  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
19353  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
19354  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
19355  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
19356  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
19357  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
19358  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
19359  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
19360  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
19361  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
19362  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
19363  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
19364  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
19365  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
19366  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
19367  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
19368  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
19369  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
19370  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
19371  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
19372  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
19373  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
19374  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
19375  {&__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},
19376  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
19377  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
19378  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
19379  {&__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},
19380  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
19381  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
19382  {&__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},
19383  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
19384  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
19385  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
19386  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
19387  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
19388  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
19389  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
19390  {&__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},
19391  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19392  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
19393  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
19394  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
19395  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
19396  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
19397  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
19398  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
19399  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
19400  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19401  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19402  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19403  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19404  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
19405  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19406  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
19407  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19408  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
19409  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19410  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
19411  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
19412  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
19413  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19414  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
19415  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
19416  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19417  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19418  {&__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},
19419  {&__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},
19420  {&__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},
19421  {&__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},
19422  {&__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},
19423  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19424  {&__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},
19425  {&__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},
19426  {&__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},
19427  {&__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},
19428  {&__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},
19429  {&__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},
19430  {&__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},
19431  {&__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},
19432  {&__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},
19433  {&__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},
19434  {&__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},
19435  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19436  {&__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},
19437  {&__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},
19438  {&__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},
19439  {&__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},
19440  {&__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},
19441  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19442  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19443  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19444  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19445  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19446  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19447  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19448  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19449  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19450  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19451  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19452  {&__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},
19453  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19454  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19455  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19456  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19457  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19458  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19459  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19460  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19461  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19462  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19463  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19464  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19465  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19466  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19467  {&__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},
19468  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19469  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19470  {&__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},
19471  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19472  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19473  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19474  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19475  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19476  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19477  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19478  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19479  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19480  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19481  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19482  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19483  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19484  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19485  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19486  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19487  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19488  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19489  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19490  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19491  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19492  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19493  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19494  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19495  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19496  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19497  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19498  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19499  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19500  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19501  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19502  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19503  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19504  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19505  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19506  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19507  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19508  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19509  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19510  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19511  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19512  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19513  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19514  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19515  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19516  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19517  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19518  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19519  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19520  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19521  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19522  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19523  {0, 0, 0, 0, 0, 0, 0}
19524 };
19525 static int __Pyx_InitCachedBuiltins(void) {
19526  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19527  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19528  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19529  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19530  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19531  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19532  #if PY_MAJOR_VERSION >= 3
19533  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19534  #else
19535  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19536  #endif
19537  return 0;
19538  __pyx_L1_error:;
19539  return -1;
19540 }
19541 
19542 static int __Pyx_InitCachedConstants(void) {
19543  __Pyx_RefNannyDeclarations
19544  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19545 
19546  /* "(tree fragment)":2
19547  * def __reduce_cython__(self):
19548  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19549  * def __setstate_cython__(self, __pyx_state):
19550  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19551  */
19552  __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)
19553  __Pyx_GOTREF(__pyx_tuple__3);
19554  __Pyx_GIVEREF(__pyx_tuple__3);
19555 
19556  /* "(tree fragment)":4
19557  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19558  * def __setstate_cython__(self, __pyx_state):
19559  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19560  */
19561  __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)
19562  __Pyx_GOTREF(__pyx_tuple__4);
19563  __Pyx_GIVEREF(__pyx_tuple__4);
19564 
19565  /* "PyClical.pyx":635
19566  * TypeError: Not applicable.
19567  * """
19568  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19569  *
19570  * def __iter__(self):
19571  */
19572  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19573  __Pyx_GOTREF(__pyx_tuple__10);
19574  __Pyx_GIVEREF(__pyx_tuple__10);
19575 
19576  /* "PyClical.pyx":646
19577  * TypeError: Not applicable.
19578  * """
19579  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19580  *
19581  * def reframe(self, ixt):
19582  */
19583  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 646, __pyx_L1_error)
19584  __Pyx_GOTREF(__pyx_tuple__11);
19585  __Pyx_GIVEREF(__pyx_tuple__11);
19586 
19587  /* "(tree fragment)":2
19588  * def __reduce_cython__(self):
19589  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19590  * def __setstate_cython__(self, __pyx_state):
19591  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19592  */
19593  __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)
19594  __Pyx_GOTREF(__pyx_tuple__12);
19595  __Pyx_GIVEREF(__pyx_tuple__12);
19596 
19597  /* "(tree fragment)":4
19598  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19599  * def __setstate_cython__(self, __pyx_state):
19600  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19601  */
19602  __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)
19603  __Pyx_GOTREF(__pyx_tuple__13);
19604  __Pyx_GIVEREF(__pyx_tuple__13);
19605 
19606  /* "PyClical.pyx":404
19607  * return index_set_to_str( self.unwrap() ).c_str()
19608  *
19609  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19610  * """
19611  * Tests for functions that Doctest cannot see.
19612  */
19613  __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)
19614 
19615  /* "PyClical.pyx":1243
19616  * return clifford_to_str( self.unwrap() ).c_str()
19617  *
19618  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19619  * """
19620  * Tests for functions that Doctest cannot see.
19621  */
19622  __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)
19623 
19624  /* "PyClical.pyx":1856
19625  *
19626  * # Some abbreviations.
19627  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19628  * pi = tau / 2.0
19629  *
19630  */
19631  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1856, __pyx_L1_error)
19632  __Pyx_GOTREF(__pyx_tuple__16);
19633  __Pyx_GIVEREF(__pyx_tuple__16);
19634 
19635  /* "PyClical.pyx":1887
19636  * """
19637  *
19638  * def e(obj): # <<<<<<<<<<<<<<
19639  * """
19640  * Abbreviation for clifford(index_set(obj)).
19641  */
19642  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19643  __Pyx_GOTREF(__pyx_tuple__17);
19644  __Pyx_GIVEREF(__pyx_tuple__17);
19645  __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)
19646 
19647  /* "PyClical.pyx":1900
19648  * return clifford(index_set(obj))
19649  *
19650  * def istpq(p, q): # <<<<<<<<<<<<<<
19651  * """
19652  * Abbreviation for index_set({-q,...p}).
19653  */
19654  __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)
19655  __Pyx_GOTREF(__pyx_tuple__19);
19656  __Pyx_GIVEREF(__pyx_tuple__19);
19657  __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)
19658 
19659  /* "PyClical.pyx":1909
19660  * return index_set(set(range(-q,p+1)))
19661  *
19662  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19663  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19664  *
19665  */
19666  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19667  __Pyx_GOTREF(__pyx_tuple__21);
19668  __Pyx_GIVEREF(__pyx_tuple__21);
19669  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1909, __pyx_L1_error)
19670  __Pyx_GOTREF(__pyx_tuple__22);
19671  __Pyx_GIVEREF(__pyx_tuple__22);
19672 
19673  /* "PyClical.pyx":1910
19674  *
19675  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19676  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19677  *
19678  * # Doctest interface.
19679  */
19680  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1910, __pyx_L1_error)
19681  __Pyx_GOTREF(__pyx_tuple__23);
19682  __Pyx_GIVEREF(__pyx_tuple__23);
19683  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1910, __pyx_L1_error)
19684  __Pyx_GOTREF(__pyx_tuple__24);
19685  __Pyx_GIVEREF(__pyx_tuple__24);
19686 
19687  /* "PyClical.pyx":1913
19688  *
19689  * # Doctest interface.
19690  * def _test(): # <<<<<<<<<<<<<<
19691  * import PyClical, doctest
19692  * return doctest.testmod(PyClical)
19693  */
19694  __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)
19695  __Pyx_GOTREF(__pyx_tuple__25);
19696  __Pyx_GIVEREF(__pyx_tuple__25);
19697  __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)
19698  __Pyx_RefNannyFinishContext();
19699  return 0;
19700  __pyx_L1_error:;
19701  __Pyx_RefNannyFinishContext();
19702  return -1;
19703 }
19704 
19705 static int __Pyx_InitGlobals(void) {
19706  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19707  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19708  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19709  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19710  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19711  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19712  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19713  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19714  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19715  return 0;
19716  __pyx_L1_error:;
19717  return -1;
19718 }
19719 
19720 static int __Pyx_modinit_global_init_code(void); /*proto*/
19721 static int __Pyx_modinit_variable_export_code(void); /*proto*/
19722 static int __Pyx_modinit_function_export_code(void); /*proto*/
19723 static int __Pyx_modinit_type_init_code(void); /*proto*/
19724 static int __Pyx_modinit_type_import_code(void); /*proto*/
19725 static int __Pyx_modinit_variable_import_code(void); /*proto*/
19726 static int __Pyx_modinit_function_import_code(void); /*proto*/
19727 
19728 static int __Pyx_modinit_global_init_code(void) {
19729  __Pyx_RefNannyDeclarations
19730  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19731  /*--- Global init code ---*/
19732  __Pyx_RefNannyFinishContext();
19733  return 0;
19734 }
19735 
19736 static int __Pyx_modinit_variable_export_code(void) {
19737  __Pyx_RefNannyDeclarations
19738  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19739  /*--- Variable export code ---*/
19740  __Pyx_RefNannyFinishContext();
19741  return 0;
19742 }
19743 
19744 static int __Pyx_modinit_function_export_code(void) {
19745  __Pyx_RefNannyDeclarations
19746  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19747  /*--- Function export code ---*/
19748  __Pyx_RefNannyFinishContext();
19749  return 0;
19750 }
19751 
19752 static int __Pyx_modinit_type_init_code(void) {
19753  __Pyx_RefNannyDeclarations
19754  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19755  /*--- Type init code ---*/
19756  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19757  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19758  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19759  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19760  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19761  __pyx_type_8PyClical_index_set.tp_print = 0;
19762  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_index_set.tp_dictoffset && __pyx_type_8PyClical_index_set.tp_getattro == PyObject_GenericGetAttr)) {
19763  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19764  }
19765  #if CYTHON_COMPILING_IN_CPYTHON
19766  {
19767  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19768  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19769  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19770  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19771  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19772  }
19773  }
19774  #endif
19775  #if CYTHON_COMPILING_IN_CPYTHON
19776  {
19777  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19778  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19779  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19780  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19781  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19782  }
19783  }
19784  #endif
19785  #if CYTHON_COMPILING_IN_CPYTHON
19786  {
19787  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19788  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19789  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19790  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19791  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19792  }
19793  }
19794  #endif
19795  #if CYTHON_COMPILING_IN_CPYTHON
19796  {
19797  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19798  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19799  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19800  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19801  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19802  }
19803  }
19804  #endif
19805  #if CYTHON_COMPILING_IN_CPYTHON
19806  {
19807  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19808  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19809  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19810  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19811  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19812  }
19813  }
19814  #endif
19815  #if CYTHON_COMPILING_IN_CPYTHON
19816  {
19817  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19818  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19819  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19820  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19821  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19822  }
19823  }
19824  #endif
19825  #if CYTHON_COMPILING_IN_CPYTHON
19826  {
19827  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19828  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19829  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19830  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19831  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19832  }
19833  }
19834  #endif
19835  #if CYTHON_COMPILING_IN_CPYTHON
19836  {
19837  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19838  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19839  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19840  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19841  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19842  }
19843  }
19844  #endif
19845  #if CYTHON_COMPILING_IN_CPYTHON
19846  {
19847  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19848  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19849  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19850  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19851  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19852  }
19853  }
19854  #endif
19855  #if CYTHON_COMPILING_IN_CPYTHON
19856  {
19857  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19858  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19859  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19860  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19861  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19862  }
19863  }
19864  #endif
19865  #if CYTHON_COMPILING_IN_CPYTHON
19866  {
19867  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19868  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19869  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19870  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19871  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19872  }
19873  }
19874  #endif
19875  #if CYTHON_COMPILING_IN_CPYTHON
19876  {
19877  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19878  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19879  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19880  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19881  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19882  }
19883  }
19884  #endif
19885  #if CYTHON_COMPILING_IN_CPYTHON
19886  {
19887  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19888  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19889  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19890  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19891  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19892  }
19893  }
19894  #endif
19895  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19896  if (PyObject_SetAttrString(__pyx_m, "index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19897  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19898  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19899  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19900  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19901  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19902  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19903  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19904  __pyx_type_8PyClical_clifford.tp_print = 0;
19905  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19906  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19907  }
19908  #if CYTHON_COMPILING_IN_CPYTHON
19909  {
19910  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19911  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19912  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19913  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19914  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19915  }
19916  }
19917  #endif
19918  #if CYTHON_COMPILING_IN_CPYTHON
19919  {
19920  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19921  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19922  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19923  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19924  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19925  }
19926  }
19927  #endif
19928  #if CYTHON_COMPILING_IN_CPYTHON
19929  {
19930  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19931  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19932  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19933  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19934  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19935  }
19936  }
19937  #endif
19938  #if CYTHON_COMPILING_IN_CPYTHON
19939  {
19940  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19941  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19942  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19943  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19944  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19945  }
19946  }
19947  #endif
19948  #if CYTHON_COMPILING_IN_CPYTHON
19949  {
19950  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19951  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19952  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19953  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19954  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19955  }
19956  }
19957  #endif
19958  #if CYTHON_COMPILING_IN_CPYTHON
19959  {
19960  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19961  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19962  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19963  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19964  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19965  }
19966  }
19967  #endif
19968  #if CYTHON_COMPILING_IN_CPYTHON
19969  {
19970  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19971  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19972  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19973  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19974  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19975  }
19976  }
19977  #endif
19978  #if CYTHON_COMPILING_IN_CPYTHON
19979  {
19980  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19981  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19982  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19983  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19984  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19985  }
19986  }
19987  #endif
19988  #if CYTHON_COMPILING_IN_CPYTHON
19989  {
19990  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19991  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19992  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19993  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19994  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19995  }
19996  }
19997  #endif
19998  #if CYTHON_COMPILING_IN_CPYTHON
19999  {
20000  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20001  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20002  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20003  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20004  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20005  }
20006  }
20007  #endif
20008  #if CYTHON_COMPILING_IN_CPYTHON
20009  {
20010  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20011  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20012  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20013  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20014  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20015  }
20016  }
20017  #endif
20018  #if CYTHON_COMPILING_IN_CPYTHON
20019  {
20020  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20021  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20022  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20023  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20024  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20025  }
20026  }
20027  #endif
20028  #if CYTHON_COMPILING_IN_CPYTHON
20029  {
20030  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20031  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20032  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20033  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20034  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20035  }
20036  }
20037  #endif
20038  #if CYTHON_COMPILING_IN_CPYTHON
20039  {
20040  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20041  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20042  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20043  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20044  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20045  }
20046  }
20047  #endif
20048  #if CYTHON_COMPILING_IN_CPYTHON
20049  {
20050  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20051  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20052  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20053  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20054  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20055  }
20056  }
20057  #endif
20058  #if CYTHON_COMPILING_IN_CPYTHON
20059  {
20060  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20061  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20062  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20063  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20064  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20065  }
20066  }
20067  #endif
20068  #if CYTHON_COMPILING_IN_CPYTHON
20069  {
20070  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20071  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20072  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20073  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20074  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20075  }
20076  }
20077  #endif
20078  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20079  #if CYTHON_COMPILING_IN_CPYTHON
20080  {
20081  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20082  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20083  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20084  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
20085  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
20086  }
20087  }
20088  #endif
20089  #endif
20090  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20091  #if CYTHON_COMPILING_IN_CPYTHON
20092  {
20093  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20094  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20095  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20096  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20097  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20098  }
20099  }
20100  #endif
20101  #endif
20102  #if CYTHON_COMPILING_IN_CPYTHON
20103  {
20104  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20105  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20106  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20107  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20108  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20109  }
20110  }
20111  #endif
20112  #if CYTHON_COMPILING_IN_CPYTHON
20113  {
20114  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20115  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20116  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20117  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20118  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20119  }
20120  }
20121  #endif
20122  #if CYTHON_COMPILING_IN_CPYTHON
20123  {
20124  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20125  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20126  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20127  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20128  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20129  }
20130  }
20131  #endif
20132  #if CYTHON_COMPILING_IN_CPYTHON
20133  {
20134  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20135  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20136  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20137  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20138  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20139  }
20140  }
20141  #endif
20142  #if CYTHON_COMPILING_IN_CPYTHON
20143  {
20144  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20145  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20146  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20147  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20148  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20149  }
20150  }
20151  #endif
20152  #if CYTHON_COMPILING_IN_CPYTHON
20153  {
20154  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20155  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20156  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20157  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20158  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20159  }
20160  }
20161  #endif
20162  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20163  if (PyObject_SetAttrString(__pyx_m, "clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20164  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20165  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20166  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
20167  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20168  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical___pyx_scope_struct____iter__.tp_dictoffset && __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro == PyObject_GenericGetAttr)) {
20169  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
20170  }
20171  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20172  __Pyx_RefNannyFinishContext();
20173  return 0;
20174  __pyx_L1_error:;
20175  __Pyx_RefNannyFinishContext();
20176  return -1;
20177 }
20178 
20179 static int __Pyx_modinit_type_import_code(void) {
20180  __Pyx_RefNannyDeclarations
20181  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
20182  /*--- Type import code ---*/
20183  __Pyx_RefNannyFinishContext();
20184  return 0;
20185 }
20186 
20187 static int __Pyx_modinit_variable_import_code(void) {
20188  __Pyx_RefNannyDeclarations
20189  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
20190  /*--- Variable import code ---*/
20191  __Pyx_RefNannyFinishContext();
20192  return 0;
20193 }
20194 
20195 static int __Pyx_modinit_function_import_code(void) {
20196  __Pyx_RefNannyDeclarations
20197  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
20198  /*--- Function import code ---*/
20199  __Pyx_RefNannyFinishContext();
20200  return 0;
20201 }
20202 
20203 
20204 #if PY_MAJOR_VERSION < 3
20205 #ifdef CYTHON_NO_PYINIT_EXPORT
20206 #define __Pyx_PyMODINIT_FUNC void
20207 #else
20208 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20209 #endif
20210 #else
20211 #ifdef CYTHON_NO_PYINIT_EXPORT
20212 #define __Pyx_PyMODINIT_FUNC PyObject *
20213 #else
20214 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20215 #endif
20216 #endif
20217 #ifndef CYTHON_SMALL_CODE
20218 #if defined(__clang__)
20219  #define CYTHON_SMALL_CODE
20220 #elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
20221  #define CYTHON_SMALL_CODE __attribute__((optimize("Os")))
20222 #else
20223  #define CYTHON_SMALL_CODE
20224 #endif
20225 #endif
20226 
20227 
20228 #if PY_MAJOR_VERSION < 3
20229 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
20230 __Pyx_PyMODINIT_FUNC initPyClical(void)
20231 #else
20232 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
20233 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
20234 #if CYTHON_PEP489_MULTI_PHASE_INIT
20235 {
20236  return PyModuleDef_Init(&__pyx_moduledef);
20237 }
20238 static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
20239  PyObject *value = PyObject_GetAttrString(spec, from_name);
20240  int result = 0;
20241  if (likely(value)) {
20242  result = PyDict_SetItemString(moddict, to_name, value);
20243  Py_DECREF(value);
20244  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
20245  PyErr_Clear();
20246  } else {
20247  result = -1;
20248  }
20249  return result;
20250 }
20251 static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
20252  PyObject *module = NULL, *moddict, *modname;
20253  if (__pyx_m)
20254  return __Pyx_NewRef(__pyx_m);
20255  modname = PyObject_GetAttrString(spec, "name");
20256  if (unlikely(!modname)) goto bad;
20257  module = PyModule_NewObject(modname);
20258  Py_DECREF(modname);
20259  if (unlikely(!module)) goto bad;
20260  moddict = PyModule_GetDict(module);
20261  if (unlikely(!moddict)) goto bad;
20262  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
20263  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
20264  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
20265  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
20266  return module;
20267 bad:
20268  Py_XDECREF(module);
20269  return NULL;
20270 }
20271 
20272 
20273 static int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20274 #endif
20275 #endif
20276 {
20277  PyObject *__pyx_t_1 = NULL;
20278  PyObject *__pyx_t_2 = NULL;
20279  PyObject *__pyx_t_3 = NULL;
20280  int __pyx_t_4;
20281  __Pyx_RefNannyDeclarations
20282  #if CYTHON_PEP489_MULTI_PHASE_INIT
20283  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
20284  #elif PY_MAJOR_VERSION >= 3
20285  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
20286  #endif
20287  #if CYTHON_REFNANNY
20288 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20289 if (!__Pyx_RefNanny) {
20290  PyErr_Clear();
20291  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20292  if (!__Pyx_RefNanny)
20293  Py_FatalError("failed to import 'refnanny' module");
20294 }
20295 #endif
20296  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20297  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20298  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20299  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20300  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20301  #ifdef __Pyx_CyFunction_USED
20302  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20303  #endif
20304  #ifdef __Pyx_FusedFunction_USED
20305  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20306  #endif
20307  #ifdef __Pyx_Coroutine_USED
20308  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20309  #endif
20310  #ifdef __Pyx_Generator_USED
20311  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20312  #endif
20313  #ifdef __Pyx_AsyncGen_USED
20314  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20315  #endif
20316  #ifdef __Pyx_StopAsyncIteration_USED
20317  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20318  #endif
20319  /*--- Library function declarations ---*/
20320  /*--- Threads initialization code ---*/
20321  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20322  #ifdef WITH_THREAD /* Python build with threading support? */
20323  PyEval_InitThreads();
20324  #endif
20325  #endif
20326  /*--- Module creation code ---*/
20327  #if CYTHON_PEP489_MULTI_PHASE_INIT
20328  __pyx_m = __pyx_pyinit_module;
20329  Py_INCREF(__pyx_m);
20330  #else
20331  #if PY_MAJOR_VERSION < 3
20332  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20333  #else
20334  __pyx_m = PyModule_Create(&__pyx_moduledef);
20335  #endif
20336  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20337  #endif
20338  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20339  Py_INCREF(__pyx_d);
20340  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20341  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20342  #if CYTHON_COMPILING_IN_PYPY
20343  Py_INCREF(__pyx_b);
20344  #endif
20345  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20346  /*--- Initialize various global constants etc. ---*/
20347  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20348  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20349  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20350  #endif
20351  if (__pyx_module_is_main_PyClical) {
20352  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20353  }
20354  #if PY_MAJOR_VERSION >= 3
20355  {
20356  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20357  if (!PyDict_GetItemString(modules, "PyClical")) {
20358  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
20359  }
20360  }
20361  #endif
20362  /*--- Builtin init code ---*/
20363  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20364  /*--- Constants init code ---*/
20365  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20366  /*--- Global type/function init code ---*/
20367  (void)__Pyx_modinit_global_init_code();
20368  (void)__Pyx_modinit_variable_export_code();
20369  (void)__Pyx_modinit_function_export_code();
20370  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
20371  (void)__Pyx_modinit_type_import_code();
20372  (void)__Pyx_modinit_variable_import_code();
20373  (void)__Pyx_modinit_function_import_code();
20374  /*--- Execution code ---*/
20375  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20376  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20377  #endif
20378 
20379  /* "PyClical.pyx":28
20380  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
20381  *
20382  * import math # <<<<<<<<<<<<<<
20383  * import numbers
20384  * import collections
20385  */
20386  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
20387  __Pyx_GOTREF(__pyx_t_1);
20388  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
20389  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20390 
20391  /* "PyClical.pyx":29
20392  *
20393  * import math
20394  * import numbers # <<<<<<<<<<<<<<
20395  * import collections
20396  *
20397  */
20398  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
20399  __Pyx_GOTREF(__pyx_t_1);
20400  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
20401  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20402 
20403  /* "PyClical.pyx":30
20404  * import math
20405  * import numbers
20406  * import collections # <<<<<<<<<<<<<<
20407  *
20408  * __version__ = "0.8.2"
20409  */
20410  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
20411  __Pyx_GOTREF(__pyx_t_1);
20412  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
20413  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20414 
20415  /* "PyClical.pyx":32
20416  * import collections
20417  *
20418  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
20419  *
20420  * from PyClical cimport *
20421  */
20422  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
20423 
20424  /* "PyClical.pyx":404
20425  * return index_set_to_str( self.unwrap() ).c_str()
20426  *
20427  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20428  * """
20429  * Tests for functions that Doctest cannot see.
20430  */
20431  __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)
20432  __Pyx_GOTREF(__pyx_t_1);
20433  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
20434  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20435 
20436  /* "PyClical.pyx":1243
20437  * return clifford_to_str( self.unwrap() ).c_str()
20438  *
20439  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20440  * """
20441  * Tests for functions that Doctest cannot see.
20442  */
20443  __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)
20444  __Pyx_GOTREF(__pyx_t_1);
20445  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20446  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20447 
20448  /* "PyClical.pyx":1856
20449  *
20450  * # Some abbreviations.
20451  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20452  * pi = tau / 2.0
20453  *
20454  */
20455  __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)
20456  __Pyx_GOTREF(__pyx_t_1);
20457  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20458  __Pyx_GOTREF(__pyx_t_2);
20459  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20460  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20461  __Pyx_GOTREF(__pyx_t_1);
20462  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20463  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20464  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20465 
20466  /* "PyClical.pyx":1857
20467  * # Some abbreviations.
20468  * tau = atan(clifford(1.0)) * 8.0
20469  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20470  *
20471  * cl = clifford
20472  */
20473  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20474  __Pyx_GOTREF(__pyx_t_1);
20475  __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)
20476  __Pyx_GOTREF(__pyx_t_2);
20477  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20478  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20479  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20480 
20481  /* "PyClical.pyx":1859
20482  * pi = tau / 2.0
20483  *
20484  * cl = clifford # <<<<<<<<<<<<<<
20485  * """
20486  * Abbreviation for clifford.
20487  */
20488  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20489 
20490  /* "PyClical.pyx":1879
20491  * """
20492  *
20493  * ist = index_set # <<<<<<<<<<<<<<
20494  * """
20495  * Abbreviation for index_set.
20496  */
20497  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20498 
20499  /* "PyClical.pyx":1887
20500  * """
20501  *
20502  * def e(obj): # <<<<<<<<<<<<<<
20503  * """
20504  * Abbreviation for clifford(index_set(obj)).
20505  */
20506  __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)
20507  __Pyx_GOTREF(__pyx_t_2);
20508  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20509  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20510 
20511  /* "PyClical.pyx":1900
20512  * return clifford(index_set(obj))
20513  *
20514  * def istpq(p, q): # <<<<<<<<<<<<<<
20515  * """
20516  * Abbreviation for index_set({-q,...p}).
20517  */
20518  __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)
20519  __Pyx_GOTREF(__pyx_t_2);
20520  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20521  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20522 
20523  /* "PyClical.pyx":1909
20524  * return index_set(set(range(-q,p+1)))
20525  *
20526  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20527  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20528  *
20529  */
20530  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20531  __Pyx_GOTREF(__pyx_t_2);
20532  __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)
20533  __Pyx_GOTREF(__pyx_t_1);
20534  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20535  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20536  __Pyx_GOTREF(__pyx_t_2);
20537  __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)
20538  __Pyx_GOTREF(__pyx_t_3);
20539  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20540  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20541  __Pyx_GOTREF(__pyx_t_2);
20542  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20543  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20544  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20545  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20546 
20547  /* "PyClical.pyx":1910
20548  *
20549  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20550  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20551  *
20552  * # Doctest interface.
20553  */
20554  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20555  __Pyx_GOTREF(__pyx_t_2);
20556  __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)
20557  __Pyx_GOTREF(__pyx_t_3);
20558  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20559  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20560  __Pyx_GOTREF(__pyx_t_2);
20561  __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)
20562  __Pyx_GOTREF(__pyx_t_1);
20563  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20564  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20565  __Pyx_GOTREF(__pyx_t_2);
20566  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20568  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20569  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20570 
20571  /* "PyClical.pyx":1913
20572  *
20573  * # Doctest interface.
20574  * def _test(): # <<<<<<<<<<<<<<
20575  * import PyClical, doctest
20576  * return doctest.testmod(PyClical)
20577  */
20578  __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)
20579  __Pyx_GOTREF(__pyx_t_2);
20580  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20581  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20582 
20583  /* "PyClical.pyx":1917
20584  * return doctest.testmod(PyClical)
20585  *
20586  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20587  * _test()
20588  */
20589  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20590  __Pyx_GOTREF(__pyx_t_2);
20591  __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)
20592  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20593  if (__pyx_t_4) {
20594 
20595  /* "PyClical.pyx":1918
20596  *
20597  * if __name__ == "__main__":
20598  * _test() # <<<<<<<<<<<<<<
20599  */
20600  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20601  __Pyx_GOTREF(__pyx_t_2);
20602  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20603  __Pyx_GOTREF(__pyx_t_1);
20604  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20605  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20606 
20607  /* "PyClical.pyx":1917
20608  * return doctest.testmod(PyClical)
20609  *
20610  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20611  * _test()
20612  */
20613  }
20614 
20615  /* "PyClical.pyx":1
20616  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20617  * # distutils: language = c++
20618  * #
20619  */
20620  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20621  __Pyx_GOTREF(__pyx_t_1);
20622  if (PyDict_SetItem(__pyx_t_1, __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)
20623  if (PyDict_SetItem(__pyx_t_1, __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)
20624  if (PyDict_SetItem(__pyx_t_1, __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)
20625  if (PyDict_SetItem(__pyx_t_1, __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)
20626  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___invert___line_238, __pyx_kp_u_Set_complement_not_print_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20627  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___xor___line_247, __pyx_kp_u_Symmetric_set_difference_exclus) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20628  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___ixor___line_258, __pyx_kp_u_Symmetric_set_difference_exclus_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20629  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___and___line_269, __pyx_kp_u_Set_intersection_and_print_inde) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20630  if (PyDict_SetItem(__pyx_t_1, __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)
20631  if (PyDict_SetItem(__pyx_t_1, __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)
20632  if (PyDict_SetItem(__pyx_t_1, __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)
20633  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set_count_line_313, __pyx_kp_u_Cardinality_Number_of_indices_i) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20634  if (PyDict_SetItem(__pyx_t_1, __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)
20635  if (PyDict_SetItem(__pyx_t_1, __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)
20636  if (PyDict_SetItem(__pyx_t_1, __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)
20637  if (PyDict_SetItem(__pyx_t_1, __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)
20638  if (PyDict_SetItem(__pyx_t_1, __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)
20639  if (PyDict_SetItem(__pyx_t_1, __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)
20640  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___repr___line_382, __pyx_kp_u_The_official_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20641  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_index_set___str___line_393, __pyx_kp_u_The_informal_string_representat) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20642  if (PyDict_SetItem(__pyx_t_1, __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)
20643  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_compare_line_490, __pyx_kp_u_lexicographic_compare_eg_3_4_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20644  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_min_neg_line_502, __pyx_kp_u_Minimum_negative_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20645  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_max_pos_line_511, __pyx_kp_u_Maximum_positive_index_or_0_if) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20646  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_copy_line_554, __pyx_kp_u_Copy_this_clifford_object_x_cli) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20647  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___iter___line_637, __pyx_kp_u_Not_applicable_for_a_in_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20648  if (PyDict_SetItem(__pyx_t_1, __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)
20649  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___getitem___line_706, __pyx_kp_u_Subscripting_map_from_index_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20650  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___neg___line_721, __pyx_kp_u_Unary_print_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20651  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___pos___line_730, __pyx_kp_u_Unary_print_clifford_1_1_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20652  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___add___line_739, __pyx_kp_u_Geometric_sum_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20653  if (PyDict_SetItem(__pyx_t_1, __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)
20654  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___sub___line_759, __pyx_kp_u_Geometric_difference_print_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20655  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___isub___line_770, __pyx_kp_u_Geometric_difference_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20656  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___mul___line_779, __pyx_kp_u_Geometric_product_print_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20657  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___imul___line_792, __pyx_kp_u_Geometric_product_x_clifford_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20658  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___mod___line_805, __pyx_kp_u_Contraction_print_clifford_1_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20659  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___imod___line_820, __pyx_kp_u_Contraction_x_clifford_1_x_clif) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20660  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___and___line_835, __pyx_kp_u_Inner_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20661  if (PyDict_SetItem(__pyx_t_1, __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)
20662  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___xor___line_865, __pyx_kp_u_Outer_product_print_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20663  if (PyDict_SetItem(__pyx_t_1, __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)
20664  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___div___line_895, __pyx_kp_u_Geometric_quotient_print_cliffo) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20665  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___idiv___line_910, __pyx_kp_u_Geometric_quotient_x_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20666  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_inv_line_925, __pyx_kp_u_Geometric_multiplicative_invers) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20667  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___or___line_938, __pyx_kp_u_Transform_left_hand_side_using) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20668  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___ior___line_949, __pyx_kp_u_Transform_left_hand_side_using_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20669  if (PyDict_SetItem(__pyx_t_1, __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)
20670  if (PyDict_SetItem(__pyx_t_1, __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)
20671  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_outer_pow_line_1003, __pyx_kp_u_Outer_product_power_x_clifford) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20672  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___call___line_1019, __pyx_kp_u_Pure_grade_vector_part_print_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20673  if (PyDict_SetItem(__pyx_t_1, __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)
20674  if (PyDict_SetItem(__pyx_t_1, __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)
20675  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_even_line_1060, __pyx_kp_u_Even_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20676  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_odd_line_1069, __pyx_kp_u_Odd_part_of_multivector_sum_of) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20677  if (PyDict_SetItem(__pyx_t_1, __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)
20678  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_involute_line_1106, __pyx_kp_u_Main_involution_each_i_is_repla) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20679  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_reverse_line_1122, __pyx_kp_u_Reversion_eg_clifford_1_cliffor) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20680  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_conj_line_1137, __pyx_kp_u_Conjugation_reverse_o_involute) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20681  if (PyDict_SetItem(__pyx_t_1, __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)
20682  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_norm_line_1163, __pyx_kp_u_Norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20683  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_abs_line_1174, __pyx_kp_u_Absolute_value_square_root_of_n) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20684  if (PyDict_SetItem(__pyx_t_1, __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)
20685  if (PyDict_SetItem(__pyx_t_1, __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)
20686  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_isnan_line_1205, __pyx_kp_u_Check_if_a_multivector_contains) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20687  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford_frame_line_1214, __pyx_kp_u_Subalgebra_generated_by_all_gen) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20688  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___repr___line_1225, __pyx_kp_u_The_official_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20689  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_clifford___str___line_1234, __pyx_kp_u_The_informal_string_representat_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20690  if (PyDict_SetItem(__pyx_t_1, __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)
20691  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_inv_line_1329, __pyx_kp_u_Geometric_multiplicative_invers_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20692  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_scalar_line_1344, __pyx_kp_u_Scalar_part_scalar_clifford_1_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20693  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_real_line_1355, __pyx_kp_u_Real_part_synonym_for_scalar_pa) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20694  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_imag_line_1366, __pyx_kp_u_Imaginary_part_deprecated_alway) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20695  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_pure_line_1377, __pyx_kp_u_Pure_part_print_pure_clifford_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20696  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_even_line_1388, __pyx_kp_u_Even_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20697  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_odd_line_1397, __pyx_kp_u_Odd_part_of_multivector_sum_of_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20698  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_involute_line_1406, __pyx_kp_u_Main_involution_each_i_is_repla_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20699  if (PyDict_SetItem(__pyx_t_1, __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)
20700  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_conj_line_1436, __pyx_kp_u_Conjugation_reverse_o_involute_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20701  if (PyDict_SetItem(__pyx_t_1, __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)
20702  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_norm_line_1462, __pyx_kp_u_norm_sum_of_squares_of_coordina) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20703  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_abs_line_1473, __pyx_kp_u_Absolute_value_of_multivector_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20704  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_max_abs_line_1482, __pyx_kp_u_Maximum_absolute_value_of_coord) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20705  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_pow_line_1494, __pyx_kp_u_Integer_power_of_multivector_ob) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20706  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_outer_pow_line_1518, __pyx_kp_u_Outer_product_power_of_multivec) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20707  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_complexifier_line_1527, __pyx_kp_u_Square_root_of_1_which_commutes) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20708  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_sqrt_line_1542, __pyx_kp_u_Square_root_of_multivector_with) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20709  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_exp_line_1565, __pyx_kp_u_Exponential_of_multivector_x_cl) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20710  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_log_line_1579, __pyx_kp_u_Natural_logarithm_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20711  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cos_line_1602, __pyx_kp_u_Cosine_of_multivector_with_opti) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20712  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_acos_line_1619, __pyx_kp_u_Inverse_cosine_of_multivector_w) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20713  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cosh_line_1640, __pyx_kp_u_Hyperbolic_cosine_of_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20714  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_acosh_line_1656, __pyx_kp_u_Inverse_hyperbolic_cosine_of_mu) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20715  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_sin_line_1679, __pyx_kp_u_Sine_of_multivector_with_option) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20716  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_asin_line_1698, __pyx_kp_u_Inverse_sine_of_multivector_wit) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20717  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_sinh_line_1719, __pyx_kp_u_Hyperbolic_sine_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20718  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_asinh_line_1733, __pyx_kp_u_Inverse_hyperbolic_sine_of_mult) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20719  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_tan_line_1752, __pyx_kp_u_Tangent_of_multivector_with_opt) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20720  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_atan_line_1769, __pyx_kp_u_Inverse_tangent_of_multivector) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20721  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_tanh_line_1786, __pyx_kp_u_Hyperbolic_tangent_of_multivect) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20722  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_atanh_line_1798, __pyx_kp_u_Inverse_hyperbolic_tangent_of_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20723  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_random_clifford_line_1815, __pyx_kp_u_Random_multivector_within_a_fra) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20724  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cga3_line_1824, __pyx_kp_u_Convert_Euclidean_3D_multivecto) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20725  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_cga3std_line_1833, __pyx_kp_u_Convert_CGA3_null_vector_to_sta) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20726  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_agc3_line_1844, __pyx_kp_u_Convert_CGA3_null_vector_to_Euc) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20727  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_e_line_1887, __pyx_kp_u_Abbreviation_for_clifford_index) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20728  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_istpq_line_1900, __pyx_kp_u_Abbreviation_for_index_set_q_p) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20729  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20730  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20731 
20732  /*--- Wrapped vars code ---*/
20733 
20734  goto __pyx_L0;
20735  __pyx_L1_error:;
20736  __Pyx_XDECREF(__pyx_t_1);
20737  __Pyx_XDECREF(__pyx_t_2);
20738  __Pyx_XDECREF(__pyx_t_3);
20739  if (__pyx_m) {
20740  if (__pyx_d) {
20741  __Pyx_AddTraceback("init PyClical", 0, __pyx_lineno, __pyx_filename);
20742  }
20743  Py_DECREF(__pyx_m); __pyx_m = 0;
20744  } else if (!PyErr_Occurred()) {
20745  PyErr_SetString(PyExc_ImportError, "init PyClical");
20746  }
20747  __pyx_L0:;
20748  __Pyx_RefNannyFinishContext();
20749  #if CYTHON_PEP489_MULTI_PHASE_INIT
20750  return (__pyx_m != NULL) ? 0 : -1;
20751  #elif PY_MAJOR_VERSION >= 3
20752  return __pyx_m;
20753  #else
20754  return;
20755  #endif
20756 }
20757 
20758 /* --- Runtime support code --- */
20759 /* Refnanny */
20760 #if CYTHON_REFNANNY
20761 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20762  PyObject *m = NULL, *p = NULL;
20763  void *r = NULL;
20764  m = PyImport_ImportModule((char *)modname);
20765  if (!m) goto end;
20766  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
20767  if (!p) goto end;
20768  r = PyLong_AsVoidPtr(p);
20769 end:
20770  Py_XDECREF(p);
20771  Py_XDECREF(m);
20772  return (__Pyx_RefNannyAPIStruct *)r;
20773 }
20774 #endif
20775 
20776 /* PyObjectGetAttrStr */
20777 #if CYTHON_USE_TYPE_SLOTS
20778 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20779  PyTypeObject* tp = Py_TYPE(obj);
20780  if (likely(tp->tp_getattro))
20781  return tp->tp_getattro(obj, attr_name);
20782 #if PY_MAJOR_VERSION < 3
20783  if (likely(tp->tp_getattr))
20784  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20785 #endif
20786  return PyObject_GetAttr(obj, attr_name);
20787 }
20788 #endif
20789 
20790 /* GetBuiltinName */
20791 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20792  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20793  if (unlikely(!result)) {
20794  PyErr_Format(PyExc_NameError,
20795 #if PY_MAJOR_VERSION >= 3
20796  "name '%U' is not defined", name);
20797 #else
20798  "name '%.200s' is not defined", PyString_AS_STRING(name));
20799 #endif
20800  }
20801  return result;
20802 }
20803 
20804 /* PyCFunctionFastCall */
20805 #if CYTHON_FAST_PYCCALL
20806 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20807  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20808  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20809  PyObject *self = PyCFunction_GET_SELF(func);
20810  int flags = PyCFunction_GET_FLAGS(func);
20811  assert(PyCFunction_Check(func));
20812  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
20813  assert(nargs >= 0);
20814  assert(nargs == 0 || args != NULL);
20815  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20816  because it may clear it (directly or indirectly) and so the
20817  caller loses its exception */
20818  assert(!PyErr_Occurred());
20819  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20820  return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
20821  } else {
20822  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
20823  }
20824 }
20825 #endif
20826 
20827 /* PyFunctionFastCall */
20828 #if CYTHON_FAST_PYCALL
20829 #include "frameobject.h"
20830 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20831  PyObject *globals) {
20832  PyFrameObject *f;
20833  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20834  PyObject **fastlocals;
20835  Py_ssize_t i;
20836  PyObject *result;
20837  assert(globals != NULL);
20838  /* XXX Perhaps we should create a specialized
20839  PyFrame_New() that doesn't take locals, but does
20840  take builtins without sanity checking them.
20841  */
20842  assert(tstate != NULL);
20843  f = PyFrame_New(tstate, co, globals, NULL);
20844  if (f == NULL) {
20845  return NULL;
20846  }
20847  fastlocals = f->f_localsplus;
20848  for (i = 0; i < na; i++) {
20849  Py_INCREF(*args);
20850  fastlocals[i] = *args++;
20851  }
20852  result = PyEval_EvalFrameEx(f,0);
20853  ++tstate->recursion_depth;
20854  Py_DECREF(f);
20855  --tstate->recursion_depth;
20856  return result;
20857 }
20858 #if 1 || PY_VERSION_HEX < 0x030600B1
20859 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
20860  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20861  PyObject *globals = PyFunction_GET_GLOBALS(func);
20862  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20863  PyObject *closure;
20864 #if PY_MAJOR_VERSION >= 3
20865  PyObject *kwdefs;
20866 #endif
20867  PyObject *kwtuple, **k;
20868  PyObject **d;
20869  Py_ssize_t nd;
20870  Py_ssize_t nk;
20871  PyObject *result;
20872  assert(kwargs == NULL || PyDict_Check(kwargs));
20873  nk = kwargs ? PyDict_Size(kwargs) : 0;
20874  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20875  return NULL;
20876  }
20877  if (
20878 #if PY_MAJOR_VERSION >= 3
20879  co->co_kwonlyargcount == 0 &&
20880 #endif
20881  likely(kwargs == NULL || nk == 0) &&
20882  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20883  if (argdefs == NULL && co->co_argcount == nargs) {
20884  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20885  goto done;
20886  }
20887  else if (nargs == 0 && argdefs != NULL
20888  && co->co_argcount == Py_SIZE(argdefs)) {
20889  /* function called with no arguments, but all parameters have
20890  a default value: use default values as arguments .*/
20891  args = &PyTuple_GET_ITEM(argdefs, 0);
20892  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20893  goto done;
20894  }
20895  }
20896  if (kwargs != NULL) {
20897  Py_ssize_t pos, i;
20898  kwtuple = PyTuple_New(2 * nk);
20899  if (kwtuple == NULL) {
20900  result = NULL;
20901  goto done;
20902  }
20903  k = &PyTuple_GET_ITEM(kwtuple, 0);
20904  pos = i = 0;
20905  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20906  Py_INCREF(k[i]);
20907  Py_INCREF(k[i+1]);
20908  i += 2;
20909  }
20910  nk = i / 2;
20911  }
20912  else {
20913  kwtuple = NULL;
20914  k = NULL;
20915  }
20916  closure = PyFunction_GET_CLOSURE(func);
20917 #if PY_MAJOR_VERSION >= 3
20918  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20919 #endif
20920  if (argdefs != NULL) {
20921  d = &PyTuple_GET_ITEM(argdefs, 0);
20922  nd = Py_SIZE(argdefs);
20923  }
20924  else {
20925  d = NULL;
20926  nd = 0;
20927  }
20928 #if PY_MAJOR_VERSION >= 3
20929  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20930  args, nargs,
20931  k, (int)nk,
20932  d, (int)nd, kwdefs, closure);
20933 #else
20934  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20935  args, nargs,
20936  k, (int)nk,
20937  d, (int)nd, closure);
20938 #endif
20939  Py_XDECREF(kwtuple);
20940 done:
20941  Py_LeaveRecursiveCall();
20942  return result;
20943 }
20944 #endif
20945 #endif
20946 
20947 /* PyObjectCall */
20948 #if CYTHON_COMPILING_IN_CPYTHON
20949 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20950  PyObject *result;
20951  ternaryfunc call = func->ob_type->tp_call;
20952  if (unlikely(!call))
20953  return PyObject_Call(func, arg, kw);
20954  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20955  return NULL;
20956  result = (*call)(func, arg, kw);
20957  Py_LeaveRecursiveCall();
20958  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20959  PyErr_SetString(
20960  PyExc_SystemError,
20961  "NULL result without error in PyObject_Call");
20962  }
20963  return result;
20964 }
20965 #endif
20966 
20967 /* PyObjectCallMethO */
20968 #if CYTHON_COMPILING_IN_CPYTHON
20969 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20970  PyObject *self, *result;
20971  PyCFunction cfunc;
20972  cfunc = PyCFunction_GET_FUNCTION(func);
20973  self = PyCFunction_GET_SELF(func);
20974  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20975  return NULL;
20976  result = cfunc(self, arg);
20977  Py_LeaveRecursiveCall();
20978  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20979  PyErr_SetString(
20980  PyExc_SystemError,
20981  "NULL result without error in PyObject_Call");
20982  }
20983  return result;
20984 }
20985 #endif
20986 
20987 /* PyObjectCallOneArg */
20988 #if CYTHON_COMPILING_IN_CPYTHON
20989 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20990  PyObject *result;
20991  PyObject *args = PyTuple_New(1);
20992  if (unlikely(!args)) return NULL;
20993  Py_INCREF(arg);
20994  PyTuple_SET_ITEM(args, 0, arg);
20995  result = __Pyx_PyObject_Call(func, args, NULL);
20996  Py_DECREF(args);
20997  return result;
20998 }
20999 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21000 #if CYTHON_FAST_PYCALL
21001  if (PyFunction_Check(func)) {
21002  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21003  }
21004 #endif
21005  if (likely(PyCFunction_Check(func))) {
21006  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21007  return __Pyx_PyObject_CallMethO(func, arg);
21008 #if CYTHON_FAST_PYCCALL
21009  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21010  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21011 #endif
21012  }
21013  }
21014  return __Pyx__PyObject_CallOneArg(func, arg);
21015 }
21016 #else
21017 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21018  PyObject *result;
21019  PyObject *args = PyTuple_Pack(1, arg);
21020  if (unlikely(!args)) return NULL;
21021  result = __Pyx_PyObject_Call(func, args, NULL);
21022  Py_DECREF(args);
21023  return result;
21024 }
21025 #endif
21026 
21027 /* PyErrFetchRestore */
21028 #if CYTHON_FAST_THREAD_STATE
21029 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21030  PyObject *tmp_type, *tmp_value, *tmp_tb;
21031  tmp_type = tstate->curexc_type;
21032  tmp_value = tstate->curexc_value;
21033  tmp_tb = tstate->curexc_traceback;
21034  tstate->curexc_type = type;
21035  tstate->curexc_value = value;
21036  tstate->curexc_traceback = tb;
21037  Py_XDECREF(tmp_type);
21038  Py_XDECREF(tmp_value);
21039  Py_XDECREF(tmp_tb);
21040 }
21041 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21042  *type = tstate->curexc_type;
21043  *value = tstate->curexc_value;
21044  *tb = tstate->curexc_traceback;
21045  tstate->curexc_type = 0;
21046  tstate->curexc_value = 0;
21047  tstate->curexc_traceback = 0;
21048 }
21049 #endif
21050 
21051 /* WriteUnraisableException */
21052 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
21053  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
21054  int full_traceback, CYTHON_UNUSED int nogil) {
21055  PyObject *old_exc, *old_val, *old_tb;
21056  PyObject *ctx;
21057  __Pyx_PyThreadState_declare
21058 #ifdef WITH_THREAD
21059  PyGILState_STATE state;
21060  if (nogil)
21061  state = PyGILState_Ensure();
21062 #ifdef _MSC_VER
21063  else state = (PyGILState_STATE)-1;
21064 #endif
21065 #endif
21066  __Pyx_PyThreadState_assign
21067  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
21068  if (full_traceback) {
21069  Py_XINCREF(old_exc);
21070  Py_XINCREF(old_val);
21071  Py_XINCREF(old_tb);
21072  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21073  PyErr_PrintEx(1);
21074  }
21075  #if PY_MAJOR_VERSION < 3
21076  ctx = PyString_FromString(name);
21077  #else
21078  ctx = PyUnicode_FromString(name);
21079  #endif
21080  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21081  if (!ctx) {
21082  PyErr_WriteUnraisable(Py_None);
21083  } else {
21084  PyErr_WriteUnraisable(ctx);
21085  Py_DECREF(ctx);
21086  }
21087 #ifdef WITH_THREAD
21088  if (nogil)
21089  PyGILState_Release(state);
21090 #endif
21091 }
21092 
21093 /* PyObjectCallNoArg */
21094 #if CYTHON_COMPILING_IN_CPYTHON
21095 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21096 #if CYTHON_FAST_PYCALL
21097  if (PyFunction_Check(func)) {
21098  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21099  }
21100 #endif
21101 #ifdef __Pyx_CyFunction_USED
21102  if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
21103 #else
21104  if (likely(PyCFunction_Check(func))) {
21105 #endif
21106  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21107  return __Pyx_PyObject_CallMethO(func, NULL);
21108  }
21109  }
21110  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21111 }
21112 #endif
21113 
21114 /* RaiseDoubleKeywords */
21115  static void __Pyx_RaiseDoubleKeywordsError(
21116  const char* func_name,
21117  PyObject* kw_name)
21118 {
21119  PyErr_Format(PyExc_TypeError,
21120  #if PY_MAJOR_VERSION >= 3
21121  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21122  #else
21123  "%s() got multiple values for keyword argument '%s'", func_name,
21124  PyString_AsString(kw_name));
21125  #endif
21126 }
21127 
21128 /* ParseKeywords */
21129  static int __Pyx_ParseOptionalKeywords(
21130  PyObject *kwds,
21131  PyObject **argnames[],
21132  PyObject *kwds2,
21133  PyObject *values[],
21134  Py_ssize_t num_pos_args,
21135  const char* function_name)
21136 {
21137  PyObject *key = 0, *value = 0;
21138  Py_ssize_t pos = 0;
21139  PyObject*** name;
21140  PyObject*** first_kw_arg = argnames + num_pos_args;
21141  while (PyDict_Next(kwds, &pos, &key, &value)) {
21142  name = first_kw_arg;
21143  while (*name && (**name != key)) name++;
21144  if (*name) {
21145  values[name-argnames] = value;
21146  continue;
21147  }
21148  name = first_kw_arg;
21149  #if PY_MAJOR_VERSION < 3
21150  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
21151  while (*name) {
21152  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21153  && _PyString_Eq(**name, key)) {
21154  values[name-argnames] = value;
21155  break;
21156  }
21157  name++;
21158  }
21159  if (*name) continue;
21160  else {
21161  PyObject*** argname = argnames;
21162  while (argname != first_kw_arg) {
21163  if ((**argname == key) || (
21164  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21165  && _PyString_Eq(**argname, key))) {
21166  goto arg_passed_twice;
21167  }
21168  argname++;
21169  }
21170  }
21171  } else
21172  #endif
21173  if (likely(PyUnicode_Check(key))) {
21174  while (*name) {
21175  int cmp = (**name == key) ? 0 :
21176  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21177  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
21178  #endif
21179  PyUnicode_Compare(**name, key);
21180  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21181  if (cmp == 0) {
21182  values[name-argnames] = value;
21183  break;
21184  }
21185  name++;
21186  }
21187  if (*name) continue;
21188  else {
21189  PyObject*** argname = argnames;
21190  while (argname != first_kw_arg) {
21191  int cmp = (**argname == key) ? 0 :
21192  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21193  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
21194  #endif
21195  PyUnicode_Compare(**argname, key);
21196  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21197  if (cmp == 0) goto arg_passed_twice;
21198  argname++;
21199  }
21200  }
21201  } else
21202  goto invalid_keyword_type;
21203  if (kwds2) {
21204  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21205  } else {
21206  goto invalid_keyword;
21207  }
21208  }
21209  return 0;
21210 arg_passed_twice:
21211  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21212  goto bad;
21213 invalid_keyword_type:
21214  PyErr_Format(PyExc_TypeError,
21215  "%.200s() keywords must be strings", function_name);
21216  goto bad;
21217 invalid_keyword:
21218  PyErr_Format(PyExc_TypeError,
21219  #if PY_MAJOR_VERSION < 3
21220  "%.200s() got an unexpected keyword argument '%.200s'",
21221  function_name, PyString_AsString(key));
21222  #else
21223  "%s() got an unexpected keyword argument '%U'",
21224  function_name, key);
21225  #endif
21226 bad:
21227  return -1;
21228 }
21229 
21230 /* RaiseArgTupleInvalid */
21231  static void __Pyx_RaiseArgtupleInvalid(
21232  const char* func_name,
21233  int exact,
21234  Py_ssize_t num_min,
21235  Py_ssize_t num_max,
21236  Py_ssize_t num_found)
21237 {
21238  Py_ssize_t num_expected;
21239  const char *more_or_less;
21240  if (num_found < num_min) {
21241  num_expected = num_min;
21242  more_or_less = "at least";
21243  } else {
21244  num_expected = num_max;
21245  more_or_less = "at most";
21246  }
21247  if (exact) {
21248  more_or_less = "exactly";
21249  }
21250  PyErr_Format(PyExc_TypeError,
21251  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21252  func_name, more_or_less, num_expected,
21253  (num_expected == 1) ? "" : "s", num_found);
21254 }
21255 
21256 /* GetModuleGlobalName */
21257  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
21258  PyObject *result;
21259 #if !CYTHON_AVOID_BORROWED_REFS
21260 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
21261  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
21262  if (likely(result)) {
21263  Py_INCREF(result);
21264  } else if (unlikely(PyErr_Occurred())) {
21265  result = NULL;
21266  } else {
21267 #else
21268  result = PyDict_GetItem(__pyx_d, name);
21269  if (likely(result)) {
21270  Py_INCREF(result);
21271  } else {
21272 #endif
21273 #else
21274  result = PyObject_GetItem(__pyx_d, name);
21275  if (!result) {
21276  PyErr_Clear();
21277 #endif
21278  result = __Pyx_GetBuiltinName(name);
21279  }
21280  return result;
21281 }
21282 
21283 /* SaveResetException */
21284  #if CYTHON_FAST_THREAD_STATE
21285 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21286  #if PY_VERSION_HEX >= 0x030700A2
21287  *type = tstate->exc_state.exc_type;
21288  *value = tstate->exc_state.exc_value;
21289  *tb = tstate->exc_state.exc_traceback;
21290  #else
21291  *type = tstate->exc_type;
21292  *value = tstate->exc_value;
21293  *tb = tstate->exc_traceback;
21294  #endif
21295  Py_XINCREF(*type);
21296  Py_XINCREF(*value);
21297  Py_XINCREF(*tb);
21298 }
21299 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21300  PyObject *tmp_type, *tmp_value, *tmp_tb;
21301  #if PY_VERSION_HEX >= 0x030700A2
21302  tmp_type = tstate->exc_state.exc_type;
21303  tmp_value = tstate->exc_state.exc_value;
21304  tmp_tb = tstate->exc_state.exc_traceback;
21305  tstate->exc_state.exc_type = type;
21306  tstate->exc_state.exc_value = value;
21307  tstate->exc_state.exc_traceback = tb;
21308  #else
21309  tmp_type = tstate->exc_type;
21310  tmp_value = tstate->exc_value;
21311  tmp_tb = tstate->exc_traceback;
21312  tstate->exc_type = type;
21313  tstate->exc_value = value;
21314  tstate->exc_traceback = tb;
21315  #endif
21316  Py_XDECREF(tmp_type);
21317  Py_XDECREF(tmp_value);
21318  Py_XDECREF(tmp_tb);
21319 }
21320 #endif
21321 
21322 /* PyErrExceptionMatches */
21323  #if CYTHON_FAST_THREAD_STATE
21324 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21325  Py_ssize_t i, n;
21326  n = PyTuple_GET_SIZE(tuple);
21327 #if PY_MAJOR_VERSION >= 3
21328  for (i=0; i<n; i++) {
21329  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21330  }
21331 #endif
21332  for (i=0; i<n; i++) {
21333  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21334  }
21335  return 0;
21336 }
21337 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21338  PyObject *exc_type = tstate->curexc_type;
21339  if (exc_type == err) return 1;
21340  if (unlikely(!exc_type)) return 0;
21341  if (unlikely(PyTuple_Check(err)))
21342  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21343  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21344 }
21345 #endif
21346 
21347 /* GetException */
21348  #if CYTHON_FAST_THREAD_STATE
21349 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21350 #else
21351 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
21352 #endif
21353  PyObject *local_type, *local_value, *local_tb;
21354 #if CYTHON_FAST_THREAD_STATE
21355  PyObject *tmp_type, *tmp_value, *tmp_tb;
21356  local_type = tstate->curexc_type;
21357  local_value = tstate->curexc_value;
21358  local_tb = tstate->curexc_traceback;
21359  tstate->curexc_type = 0;
21360  tstate->curexc_value = 0;
21361  tstate->curexc_traceback = 0;
21362 #else
21363  PyErr_Fetch(&local_type, &local_value, &local_tb);
21364 #endif
21365  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21366 #if CYTHON_FAST_THREAD_STATE
21367  if (unlikely(tstate->curexc_type))
21368 #else
21369  if (unlikely(PyErr_Occurred()))
21370 #endif
21371  goto bad;
21372  #if PY_MAJOR_VERSION >= 3
21373  if (local_tb) {
21374  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21375  goto bad;
21376  }
21377  #endif
21378  Py_XINCREF(local_tb);
21379  Py_XINCREF(local_type);
21380  Py_XINCREF(local_value);
21381  *type = local_type;
21382  *value = local_value;
21383  *tb = local_tb;
21384 #if CYTHON_FAST_THREAD_STATE
21385  #if PY_VERSION_HEX >= 0x030700A2
21386  tmp_type = tstate->exc_state.exc_type;
21387  tmp_value = tstate->exc_state.exc_value;
21388  tmp_tb = tstate->exc_state.exc_traceback;
21389  tstate->exc_state.exc_type = local_type;
21390  tstate->exc_state.exc_value = local_value;
21391  tstate->exc_state.exc_traceback = local_tb;
21392  #else
21393  tmp_type = tstate->exc_type;
21394  tmp_value = tstate->exc_value;
21395  tmp_tb = tstate->exc_traceback;
21396  tstate->exc_type = local_type;
21397  tstate->exc_value = local_value;
21398  tstate->exc_traceback = local_tb;
21399  #endif
21400  Py_XDECREF(tmp_type);
21401  Py_XDECREF(tmp_value);
21402  Py_XDECREF(tmp_tb);
21403 #else
21404  PyErr_SetExcInfo(local_type, local_value, local_tb);
21405 #endif
21406  return 0;
21407 bad:
21408  *type = 0;
21409  *value = 0;
21410  *tb = 0;
21411  Py_XDECREF(local_type);
21412  Py_XDECREF(local_value);
21413  Py_XDECREF(local_tb);
21414  return -1;
21415 }
21416 
21417 /* RaiseException */
21418  #if PY_MAJOR_VERSION < 3
21419 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21420  CYTHON_UNUSED PyObject *cause) {
21421  __Pyx_PyThreadState_declare
21422  Py_XINCREF(type);
21423  if (!value || value == Py_None)
21424  value = NULL;
21425  else
21426  Py_INCREF(value);
21427  if (!tb || tb == Py_None)
21428  tb = NULL;
21429  else {
21430  Py_INCREF(tb);
21431  if (!PyTraceBack_Check(tb)) {
21432  PyErr_SetString(PyExc_TypeError,
21433  "raise: arg 3 must be a traceback or None");
21434  goto raise_error;
21435  }
21436  }
21437  if (PyType_Check(type)) {
21438 #if CYTHON_COMPILING_IN_PYPY
21439  if (!value) {
21440  Py_INCREF(Py_None);
21441  value = Py_None;
21442  }
21443 #endif
21444  PyErr_NormalizeException(&type, &value, &tb);
21445  } else {
21446  if (value) {
21447  PyErr_SetString(PyExc_TypeError,
21448  "instance exception may not have a separate value");
21449  goto raise_error;
21450  }
21451  value = type;
21452  type = (PyObject*) Py_TYPE(type);
21453  Py_INCREF(type);
21454  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21455  PyErr_SetString(PyExc_TypeError,
21456  "raise: exception class must be a subclass of BaseException");
21457  goto raise_error;
21458  }
21459  }
21460  __Pyx_PyThreadState_assign
21461  __Pyx_ErrRestore(type, value, tb);
21462  return;
21463 raise_error:
21464  Py_XDECREF(value);
21465  Py_XDECREF(type);
21466  Py_XDECREF(tb);
21467  return;
21468 }
21469 #else
21470 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21471  PyObject* owned_instance = NULL;
21472  if (tb == Py_None) {
21473  tb = 0;
21474  } else if (tb && !PyTraceBack_Check(tb)) {
21475  PyErr_SetString(PyExc_TypeError,
21476  "raise: arg 3 must be a traceback or None");
21477  goto bad;
21478  }
21479  if (value == Py_None)
21480  value = 0;
21481  if (PyExceptionInstance_Check(type)) {
21482  if (value) {
21483  PyErr_SetString(PyExc_TypeError,
21484  "instance exception may not have a separate value");
21485  goto bad;
21486  }
21487  value = type;
21488  type = (PyObject*) Py_TYPE(value);
21489  } else if (PyExceptionClass_Check(type)) {
21490  PyObject *instance_class = NULL;
21491  if (value && PyExceptionInstance_Check(value)) {
21492  instance_class = (PyObject*) Py_TYPE(value);
21493  if (instance_class != type) {
21494  int is_subclass = PyObject_IsSubclass(instance_class, type);
21495  if (!is_subclass) {
21496  instance_class = NULL;
21497  } else if (unlikely(is_subclass == -1)) {
21498  goto bad;
21499  } else {
21500  type = instance_class;
21501  }
21502  }
21503  }
21504  if (!instance_class) {
21505  PyObject *args;
21506  if (!value)
21507  args = PyTuple_New(0);
21508  else if (PyTuple_Check(value)) {
21509  Py_INCREF(value);
21510  args = value;
21511  } else
21512  args = PyTuple_Pack(1, value);
21513  if (!args)
21514  goto bad;
21515  owned_instance = PyObject_Call(type, args, NULL);
21516  Py_DECREF(args);
21517  if (!owned_instance)
21518  goto bad;
21519  value = owned_instance;
21520  if (!PyExceptionInstance_Check(value)) {
21521  PyErr_Format(PyExc_TypeError,
21522  "calling %R should have returned an instance of "
21523  "BaseException, not %R",
21524  type, Py_TYPE(value));
21525  goto bad;
21526  }
21527  }
21528  } else {
21529  PyErr_SetString(PyExc_TypeError,
21530  "raise: exception class must be a subclass of BaseException");
21531  goto bad;
21532  }
21533  if (cause) {
21534  PyObject *fixed_cause;
21535  if (cause == Py_None) {
21536  fixed_cause = NULL;
21537  } else if (PyExceptionClass_Check(cause)) {
21538  fixed_cause = PyObject_CallObject(cause, NULL);
21539  if (fixed_cause == NULL)
21540  goto bad;
21541  } else if (PyExceptionInstance_Check(cause)) {
21542  fixed_cause = cause;
21543  Py_INCREF(fixed_cause);
21544  } else {
21545  PyErr_SetString(PyExc_TypeError,
21546  "exception causes must derive from "
21547  "BaseException");
21548  goto bad;
21549  }
21550  PyException_SetCause(value, fixed_cause);
21551  }
21552  PyErr_SetObject(type, value);
21553  if (tb) {
21554 #if CYTHON_COMPILING_IN_PYPY
21555  PyObject *tmp_type, *tmp_value, *tmp_tb;
21556  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21557  Py_INCREF(tb);
21558  PyErr_Restore(tmp_type, tmp_value, tb);
21559  Py_XDECREF(tmp_tb);
21560 #else
21561  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21562  PyObject* tmp_tb = tstate->curexc_traceback;
21563  if (tb != tmp_tb) {
21564  Py_INCREF(tb);
21565  tstate->curexc_traceback = tb;
21566  Py_XDECREF(tmp_tb);
21567  }
21568 #endif
21569  }
21570 bad:
21571  Py_XDECREF(owned_instance);
21572  return;
21573 }
21574 #endif
21575 
21576 /* PyIntBinop */
21577  #if !CYTHON_COMPILING_IN_PYPY
21578 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
21579  #if PY_MAJOR_VERSION < 3
21580  if (likely(PyInt_CheckExact(op1))) {
21581  const long b = intval;
21582  long x;
21583  long a = PyInt_AS_LONG(op1);
21584  x = (long)((unsigned long)a + b);
21585  if (likely((x^a) >= 0 || (x^b) >= 0))
21586  return PyInt_FromLong(x);
21587  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21588  }
21589  #endif
21590  #if CYTHON_USE_PYLONG_INTERNALS
21591  if (likely(PyLong_CheckExact(op1))) {
21592  const long b = intval;
21593  long a, x;
21594 #ifdef HAVE_LONG_LONG
21595  const PY_LONG_LONG llb = intval;
21596  PY_LONG_LONG lla, llx;
21597 #endif
21598  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21599  const Py_ssize_t size = Py_SIZE(op1);
21600  if (likely(__Pyx_sst_abs(size) <= 1)) {
21601  a = likely(size) ? digits[0] : 0;
21602  if (size == -1) a = -a;
21603  } else {
21604  switch (size) {
21605  case -2:
21606  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21607  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21608  break;
21609 #ifdef HAVE_LONG_LONG
21610  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21611  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21612  goto long_long;
21613 #endif
21614  }
21615  CYTHON_FALLTHROUGH;
21616  case 2:
21617  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21618  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21619  break;
21620 #ifdef HAVE_LONG_LONG
21621  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21622  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21623  goto long_long;
21624 #endif
21625  }
21626  CYTHON_FALLTHROUGH;
21627  case -3:
21628  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21629  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21630  break;
21631 #ifdef HAVE_LONG_LONG
21632  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21633  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]));
21634  goto long_long;
21635 #endif
21636  }
21637  CYTHON_FALLTHROUGH;
21638  case 3:
21639  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21640  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21641  break;
21642 #ifdef HAVE_LONG_LONG
21643  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21644  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]));
21645  goto long_long;
21646 #endif
21647  }
21648  CYTHON_FALLTHROUGH;
21649  case -4:
21650  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21651  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21652  break;
21653 #ifdef HAVE_LONG_LONG
21654  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21655  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]));
21656  goto long_long;
21657 #endif
21658  }
21659  CYTHON_FALLTHROUGH;
21660  case 4:
21661  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21662  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21663  break;
21664 #ifdef HAVE_LONG_LONG
21665  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21666  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]));
21667  goto long_long;
21668 #endif
21669  }
21670  CYTHON_FALLTHROUGH;
21671  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21672  }
21673  }
21674  x = a + b;
21675  return PyLong_FromLong(x);
21676 #ifdef HAVE_LONG_LONG
21677  long_long:
21678  llx = lla + llb;
21679  return PyLong_FromLongLong(llx);
21680 #endif
21681 
21682 
21683  }
21684  #endif
21685  if (PyFloat_CheckExact(op1)) {
21686  const long b = intval;
21687  double a = PyFloat_AS_DOUBLE(op1);
21688  double result;
21689  PyFPE_START_PROTECT("add", return NULL)
21690  result = ((double)a) + (double)b;
21691  PyFPE_END_PROTECT(result)
21692  return PyFloat_FromDouble(result);
21693  }
21694  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21695 }
21696 #endif
21697 
21698 /* SetItemInt */
21699  static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21700  int r;
21701  if (!j) return -1;
21702  r = PyObject_SetItem(o, j, v);
21703  Py_DECREF(j);
21704  return r;
21705 }
21706 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21707  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21708 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21709  if (is_list || PyList_CheckExact(o)) {
21710  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21711  if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
21712  PyObject* old = PyList_GET_ITEM(o, n);
21713  Py_INCREF(v);
21714  PyList_SET_ITEM(o, n, v);
21715  Py_DECREF(old);
21716  return 1;
21717  }
21718  } else {
21719  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21720  if (likely(m && m->sq_ass_item)) {
21721  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21722  Py_ssize_t l = m->sq_length(o);
21723  if (likely(l >= 0)) {
21724  i += l;
21725  } else {
21726  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21727  return -1;
21728  PyErr_Clear();
21729  }
21730  }
21731  return m->sq_ass_item(o, i, v);
21732  }
21733  }
21734 #else
21735 #if CYTHON_COMPILING_IN_PYPY
21736  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
21737 #else
21738  if (is_list || PySequence_Check(o)) {
21739 #endif
21740  return PySequence_SetItem(o, i, v);
21741  }
21742 #endif
21743  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21744 }
21745 
21746 /* ArgTypeTest */
21747  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21748 {
21749  if (unlikely(!type)) {
21750  PyErr_SetString(PyExc_SystemError, "Missing type object");
21751  return 0;
21752  }
21753  else if (exact) {
21754  #if PY_MAJOR_VERSION == 2
21755  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21756  #endif
21757  }
21758  else {
21759  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21760  }
21761  PyErr_Format(PyExc_TypeError,
21762  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21763  name, type->tp_name, Py_TYPE(obj)->tp_name);
21764  return 0;
21765 }
21766 
21767 /* Import */
21768  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21769  PyObject *empty_list = 0;
21770  PyObject *module = 0;
21771  PyObject *global_dict = 0;
21772  PyObject *empty_dict = 0;
21773  PyObject *list;
21774  #if PY_MAJOR_VERSION < 3
21775  PyObject *py_import;
21776  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21777  if (!py_import)
21778  goto bad;
21779  #endif
21780  if (from_list)
21781  list = from_list;
21782  else {
21783  empty_list = PyList_New(0);
21784  if (!empty_list)
21785  goto bad;
21786  list = empty_list;
21787  }
21788  global_dict = PyModule_GetDict(__pyx_m);
21789  if (!global_dict)
21790  goto bad;
21791  empty_dict = PyDict_New();
21792  if (!empty_dict)
21793  goto bad;
21794  {
21795  #if PY_MAJOR_VERSION >= 3
21796  if (level == -1) {
21797  if (strchr(__Pyx_MODULE_NAME, '.')) {
21798  module = PyImport_ImportModuleLevelObject(
21799  name, global_dict, empty_dict, list, 1);
21800  if (!module) {
21801  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21802  goto bad;
21803  PyErr_Clear();
21804  }
21805  }
21806  level = 0;
21807  }
21808  #endif
21809  if (!module) {
21810  #if PY_MAJOR_VERSION < 3
21811  PyObject *py_level = PyInt_FromLong(level);
21812  if (!py_level)
21813  goto bad;
21814  module = PyObject_CallFunctionObjArgs(py_import,
21815  name, global_dict, empty_dict, list, py_level, NULL);
21816  Py_DECREF(py_level);
21817  #else
21818  module = PyImport_ImportModuleLevelObject(
21819  name, global_dict, empty_dict, list, level);
21820  #endif
21821  }
21822  }
21823 bad:
21824  #if PY_MAJOR_VERSION < 3
21825  Py_XDECREF(py_import);
21826  #endif
21827  Py_XDECREF(empty_list);
21828  Py_XDECREF(empty_dict);
21829  return module;
21830 }
21831 
21832 /* PyObject_GenericGetAttrNoDict */
21833  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21834 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21835  PyErr_Format(PyExc_AttributeError,
21836 #if PY_MAJOR_VERSION >= 3
21837  "'%.50s' object has no attribute '%U'",
21838  tp->tp_name, attr_name);
21839 #else
21840  "'%.50s' object has no attribute '%.400s'",
21841  tp->tp_name, PyString_AS_STRING(attr_name));
21842 #endif
21843  return NULL;
21844 }
21845 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21846  PyObject *descr;
21847  PyTypeObject *tp = Py_TYPE(obj);
21848  if (unlikely(!PyString_Check(attr_name))) {
21849  return PyObject_GenericGetAttr(obj, attr_name);
21850  }
21851  assert(!tp->tp_dictoffset);
21852  descr = _PyType_Lookup(tp, attr_name);
21853  if (unlikely(!descr)) {
21854  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21855  }
21856  Py_INCREF(descr);
21857  #if PY_MAJOR_VERSION < 3
21858  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21859  #endif
21860  {
21861  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21862  if (unlikely(f)) {
21863  PyObject *res = f(descr, obj, (PyObject *)tp);
21864  Py_DECREF(descr);
21865  return res;
21866  }
21867  }
21868  return descr;
21869 }
21870 #endif
21871 
21872 /* PyObject_GenericGetAttr */
21873  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21874 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21875  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21876  return PyObject_GenericGetAttr(obj, attr_name);
21877  }
21878  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21879 }
21880 #endif
21881 
21882 /* SetVTable */
21883  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21884 #if PY_VERSION_HEX >= 0x02070000
21885  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21886 #else
21887  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21888 #endif
21889  if (!ob)
21890  goto bad;
21891  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21892  goto bad;
21893  Py_DECREF(ob);
21894  return 0;
21895 bad:
21896  Py_XDECREF(ob);
21897  return -1;
21898 }
21899 
21900 /* SetupReduce */
21901  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21902  int ret;
21903  PyObject *name_attr;
21904  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21905  if (likely(name_attr)) {
21906  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21907  } else {
21908  ret = -1;
21909  }
21910  if (unlikely(ret < 0)) {
21911  PyErr_Clear();
21912  ret = 0;
21913  }
21914  Py_XDECREF(name_attr);
21915  return ret;
21916 }
21917 static int __Pyx_setup_reduce(PyObject* type_obj) {
21918  int ret = 0;
21919  PyObject *object_reduce = NULL;
21920  PyObject *object_reduce_ex = NULL;
21921  PyObject *reduce = NULL;
21922  PyObject *reduce_ex = NULL;
21923  PyObject *reduce_cython = NULL;
21924  PyObject *setstate = NULL;
21925  PyObject *setstate_cython = NULL;
21926 #if CYTHON_USE_PYTYPE_LOOKUP
21927  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21928 #else
21929  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21930 #endif
21931 #if CYTHON_USE_PYTYPE_LOOKUP
21932  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21933 #else
21934  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21935 #endif
21936  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21937  if (reduce_ex == object_reduce_ex) {
21938 #if CYTHON_USE_PYTYPE_LOOKUP
21939  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21940 #else
21941  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21942 #endif
21943  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21944  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21945  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21946  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21947  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21948  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21949  if (!setstate) PyErr_Clear();
21950  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21951  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21952  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21953  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21954  }
21955  PyType_Modified((PyTypeObject*)type_obj);
21956  }
21957  }
21958  goto GOOD;
21959 BAD:
21960  if (!PyErr_Occurred())
21961  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21962  ret = -1;
21963 GOOD:
21964 #if !CYTHON_USE_PYTYPE_LOOKUP
21965  Py_XDECREF(object_reduce);
21966  Py_XDECREF(object_reduce_ex);
21967 #endif
21968  Py_XDECREF(reduce);
21969  Py_XDECREF(reduce_ex);
21970  Py_XDECREF(reduce_cython);
21971  Py_XDECREF(setstate);
21972  Py_XDECREF(setstate_cython);
21973  return ret;
21974 }
21975 
21976 /* PyFloatBinop */
21977  #if !CYTHON_COMPILING_IN_PYPY
21978 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
21979  const double b = floatval;
21980  double a, result;
21981  if (likely(PyFloat_CheckExact(op1))) {
21982  a = PyFloat_AS_DOUBLE(op1);
21983  } else
21984  #if PY_MAJOR_VERSION < 3
21985  if (likely(PyInt_CheckExact(op1))) {
21986  a = (double) PyInt_AS_LONG(op1);
21987  } else
21988  #endif
21989  if (likely(PyLong_CheckExact(op1))) {
21990  #if CYTHON_USE_PYLONG_INTERNALS
21991  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21992  const Py_ssize_t size = Py_SIZE(op1);
21993  switch (size) {
21994  case 0: a = 0.0; break;
21995  case -1: a = -(double) digits[0]; break;
21996  case 1: a = (double) digits[0]; break;
21997  case -2:
21998  case 2:
21999  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
22000  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22001  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22002  if (size == -2)
22003  a = -a;
22004  break;
22005  }
22006  }
22007  CYTHON_FALLTHROUGH;
22008  case -3:
22009  case 3:
22010  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
22011  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22012  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22013  if (size == -3)
22014  a = -a;
22015  break;
22016  }
22017  }
22018  CYTHON_FALLTHROUGH;
22019  case -4:
22020  case 4:
22021  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
22022  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22023  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22024  if (size == -4)
22025  a = -a;
22026  break;
22027  }
22028  }
22029  CYTHON_FALLTHROUGH;
22030  default:
22031  #else
22032  {
22033  #endif
22034  a = PyLong_AsDouble(op1);
22035  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
22036  }
22037  } else {
22038  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
22039  }
22040  PyFPE_START_PROTECT("divide", return NULL)
22041  result = a / b;
22042  PyFPE_END_PROTECT(result)
22043  return PyFloat_FromDouble(result);
22044 }
22045 #endif
22046 
22047 /* BytesEquals */
22048  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22049 #if CYTHON_COMPILING_IN_PYPY
22050  return PyObject_RichCompareBool(s1, s2, equals);
22051 #else
22052  if (s1 == s2) {
22053  return (equals == Py_EQ);
22054  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22055  const char *ps1, *ps2;
22056  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22057  if (length != PyBytes_GET_SIZE(s2))
22058  return (equals == Py_NE);
22059  ps1 = PyBytes_AS_STRING(s1);
22060  ps2 = PyBytes_AS_STRING(s2);
22061  if (ps1[0] != ps2[0]) {
22062  return (equals == Py_NE);
22063  } else if (length == 1) {
22064  return (equals == Py_EQ);
22065  } else {
22066  int result;
22067 #if CYTHON_USE_UNICODE_INTERNALS
22068  Py_hash_t hash1, hash2;
22069  hash1 = ((PyBytesObject*)s1)->ob_shash;
22070  hash2 = ((PyBytesObject*)s2)->ob_shash;
22071  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22072  return (equals == Py_NE);
22073  }
22074 #endif
22075  result = memcmp(ps1, ps2, (size_t)length);
22076  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22077  }
22078  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22079  return (equals == Py_NE);
22080  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22081  return (equals == Py_NE);
22082  } else {
22083  int result;
22084  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22085  if (!py_result)
22086  return -1;
22087  result = __Pyx_PyObject_IsTrue(py_result);
22088  Py_DECREF(py_result);
22089  return result;
22090  }
22091 #endif
22092 }
22093 
22094 /* UnicodeEquals */
22095  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22096 #if CYTHON_COMPILING_IN_PYPY
22097  return PyObject_RichCompareBool(s1, s2, equals);
22098 #else
22099 #if PY_MAJOR_VERSION < 3
22100  PyObject* owned_ref = NULL;
22101 #endif
22102  int s1_is_unicode, s2_is_unicode;
22103  if (s1 == s2) {
22104  goto return_eq;
22105  }
22106  s1_is_unicode = PyUnicode_CheckExact(s1);
22107  s2_is_unicode = PyUnicode_CheckExact(s2);
22108 #if PY_MAJOR_VERSION < 3
22109  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22110  owned_ref = PyUnicode_FromObject(s2);
22111  if (unlikely(!owned_ref))
22112  return -1;
22113  s2 = owned_ref;
22114  s2_is_unicode = 1;
22115  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22116  owned_ref = PyUnicode_FromObject(s1);
22117  if (unlikely(!owned_ref))
22118  return -1;
22119  s1 = owned_ref;
22120  s1_is_unicode = 1;
22121  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22122  return __Pyx_PyBytes_Equals(s1, s2, equals);
22123  }
22124 #endif
22125  if (s1_is_unicode & s2_is_unicode) {
22126  Py_ssize_t length;
22127  int kind;
22128  void *data1, *data2;
22129  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22130  return -1;
22131  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22132  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22133  goto return_ne;
22134  }
22135 #if CYTHON_USE_UNICODE_INTERNALS
22136  {
22137  Py_hash_t hash1, hash2;
22138  #if CYTHON_PEP393_ENABLED
22139  hash1 = ((PyASCIIObject*)s1)->hash;
22140  hash2 = ((PyASCIIObject*)s2)->hash;
22141  #else
22142  hash1 = ((PyUnicodeObject*)s1)->hash;
22143  hash2 = ((PyUnicodeObject*)s2)->hash;
22144  #endif
22145  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22146  goto return_ne;
22147  }
22148  }
22149 #endif
22150  kind = __Pyx_PyUnicode_KIND(s1);
22151  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22152  goto return_ne;
22153  }
22154  data1 = __Pyx_PyUnicode_DATA(s1);
22155  data2 = __Pyx_PyUnicode_DATA(s2);
22156  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22157  goto return_ne;
22158  } else if (length == 1) {
22159  goto return_eq;
22160  } else {
22161  int result = memcmp(data1, data2, (size_t)(length * kind));
22162  #if PY_MAJOR_VERSION < 3
22163  Py_XDECREF(owned_ref);
22164  #endif
22165  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22166  }
22167  } else if ((s1 == Py_None) & s2_is_unicode) {
22168  goto return_ne;
22169  } else if ((s2 == Py_None) & s1_is_unicode) {
22170  goto return_ne;
22171  } else {
22172  int result;
22173  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22174  if (!py_result)
22175  return -1;
22176  result = __Pyx_PyObject_IsTrue(py_result);
22177  Py_DECREF(py_result);
22178  return result;
22179  }
22180 return_eq:
22181  #if PY_MAJOR_VERSION < 3
22182  Py_XDECREF(owned_ref);
22183  #endif
22184  return (equals == Py_EQ);
22185 return_ne:
22186  #if PY_MAJOR_VERSION < 3
22187  Py_XDECREF(owned_ref);
22188  #endif
22189  return (equals == Py_NE);
22190 #endif
22191 }
22192 
22193 /* CLineInTraceback */
22194  #ifndef CYTHON_CLINE_IN_TRACEBACK
22195 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
22196  PyObject *use_cline;
22197  PyObject *ptype, *pvalue, *ptraceback;
22198 #if CYTHON_COMPILING_IN_CPYTHON
22199  PyObject **cython_runtime_dict;
22200 #endif
22201  if (unlikely(!__pyx_cython_runtime)) {
22202  return c_line;
22203  }
22204  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22205 #if CYTHON_COMPILING_IN_CPYTHON
22206  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22207  if (likely(cython_runtime_dict)) {
22208  use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
22209  } else
22210 #endif
22211  {
22212  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22213  if (use_cline_obj) {
22214  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22215  Py_DECREF(use_cline_obj);
22216  } else {
22217  PyErr_Clear();
22218  use_cline = NULL;
22219  }
22220  }
22221  if (!use_cline) {
22222  c_line = 0;
22223  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22224  }
22225  else if (PyObject_Not(use_cline) != 0) {
22226  c_line = 0;
22227  }
22228  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22229  return c_line;
22230 }
22231 #endif
22232 
22233 /* CodeObjectCache */
22234  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22235  int start = 0, mid = 0, end = count - 1;
22236  if (end >= 0 && code_line > entries[end].code_line) {
22237  return count;
22238  }
22239  while (start < end) {
22240  mid = start + (end - start) / 2;
22241  if (code_line < entries[mid].code_line) {
22242  end = mid;
22243  } else if (code_line > entries[mid].code_line) {
22244  start = mid + 1;
22245  } else {
22246  return mid;
22247  }
22248  }
22249  if (code_line <= entries[mid].code_line) {
22250  return mid;
22251  } else {
22252  return mid + 1;
22253  }
22254 }
22255 static PyCodeObject *__pyx_find_code_object(int code_line) {
22256  PyCodeObject* code_object;
22257  int pos;
22258  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
22259  return NULL;
22260  }
22261  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22262  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
22263  return NULL;
22264  }
22265  code_object = __pyx_code_cache.entries[pos].code_object;
22266  Py_INCREF(code_object);
22267  return code_object;
22268 }
22269 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22270  int pos, i;
22271  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22272  if (unlikely(!code_line)) {
22273  return;
22274  }
22275  if (unlikely(!entries)) {
22276  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22277  if (likely(entries)) {
22278  __pyx_code_cache.entries = entries;
22279  __pyx_code_cache.max_count = 64;
22280  __pyx_code_cache.count = 1;
22281  entries[0].code_line = code_line;
22282  entries[0].code_object = code_object;
22283  Py_INCREF(code_object);
22284  }
22285  return;
22286  }
22287  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22288  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
22289  PyCodeObject* tmp = entries[pos].code_object;
22290  entries[pos].code_object = code_object;
22291  Py_DECREF(tmp);
22292  return;
22293  }
22294  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22295  int new_max = __pyx_code_cache.max_count + 64;
22296  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22297  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22298  if (unlikely(!entries)) {
22299  return;
22300  }
22301  __pyx_code_cache.entries = entries;
22302  __pyx_code_cache.max_count = new_max;
22303  }
22304  for (i=__pyx_code_cache.count; i>pos; i--) {
22305  entries[i] = entries[i-1];
22306  }
22307  entries[pos].code_line = code_line;
22308  entries[pos].code_object = code_object;
22309  __pyx_code_cache.count++;
22310  Py_INCREF(code_object);
22311 }
22312 
22313 /* AddTraceback */
22314  #include "compile.h"
22315 #include "frameobject.h"
22316 #include "traceback.h"
22317 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22318  const char *funcname, int c_line,
22319  int py_line, const char *filename) {
22320  PyCodeObject *py_code = 0;
22321  PyObject *py_srcfile = 0;
22322  PyObject *py_funcname = 0;
22323  #if PY_MAJOR_VERSION < 3
22324  py_srcfile = PyString_FromString(filename);
22325  #else
22326  py_srcfile = PyUnicode_FromString(filename);
22327  #endif
22328  if (!py_srcfile) goto bad;
22329  if (c_line) {
22330  #if PY_MAJOR_VERSION < 3
22331  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22332  #else
22333  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22334  #endif
22335  }
22336  else {
22337  #if PY_MAJOR_VERSION < 3
22338  py_funcname = PyString_FromString(funcname);
22339  #else
22340  py_funcname = PyUnicode_FromString(funcname);
22341  #endif
22342  }
22343  if (!py_funcname) goto bad;
22344  py_code = __Pyx_PyCode_New(
22345  0,
22346  0,
22347  0,
22348  0,
22349  0,
22350  __pyx_empty_bytes, /*PyObject *code,*/
22351  __pyx_empty_tuple, /*PyObject *consts,*/
22352  __pyx_empty_tuple, /*PyObject *names,*/
22353  __pyx_empty_tuple, /*PyObject *varnames,*/
22354  __pyx_empty_tuple, /*PyObject *freevars,*/
22355  __pyx_empty_tuple, /*PyObject *cellvars,*/
22356  py_srcfile, /*PyObject *filename,*/
22357  py_funcname, /*PyObject *name,*/
22358  py_line,
22359  __pyx_empty_bytes /*PyObject *lnotab*/
22360  );
22361  Py_DECREF(py_srcfile);
22362  Py_DECREF(py_funcname);
22363  return py_code;
22364 bad:
22365  Py_XDECREF(py_srcfile);
22366  Py_XDECREF(py_funcname);
22367  return NULL;
22368 }
22369 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22370  int py_line, const char *filename) {
22371  PyCodeObject *py_code = 0;
22372  PyFrameObject *py_frame = 0;
22373  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22374  if (c_line) {
22375  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22376  }
22377  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22378  if (!py_code) {
22379  py_code = __Pyx_CreateCodeObjectForTraceback(
22380  funcname, c_line, py_line, filename);
22381  if (!py_code) goto bad;
22382  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22383  }
22384  py_frame = PyFrame_New(
22385  tstate, /*PyThreadState *tstate,*/
22386  py_code, /*PyCodeObject *code,*/
22387  __pyx_d, /*PyObject *globals,*/
22388  0 /*PyObject *locals*/
22389  );
22390  if (!py_frame) goto bad;
22391  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22392  PyTraceBack_Here(py_frame);
22393 bad:
22394  Py_XDECREF(py_code);
22395  Py_XDECREF(py_frame);
22396 }
22397 
22398 /* CIntFromPyVerify */
22399  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22400  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22401 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22402  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22403 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22404  {\
22405  func_type value = func_value;\
22406  if (sizeof(target_type) < sizeof(func_type)) {\
22407  if (unlikely(value != (func_type) (target_type) value)) {\
22408  func_type zero = 0;\
22409  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22410  return (target_type) -1;\
22411  if (is_unsigned && unlikely(value < zero))\
22412  goto raise_neg_overflow;\
22413  else\
22414  goto raise_overflow;\
22415  }\
22416  }\
22417  return (target_type) value;\
22418  }
22419 
22420 /* CIntToPy */
22421  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22422  const int neg_one = (int) -1, const_zero = (int) 0;
22423  const int is_unsigned = neg_one > const_zero;
22424  if (is_unsigned) {
22425  if (sizeof(int) < sizeof(long)) {
22426  return PyInt_FromLong((long) value);
22427  } else if (sizeof(int) <= sizeof(unsigned long)) {
22428  return PyLong_FromUnsignedLong((unsigned long) value);
22429 #ifdef HAVE_LONG_LONG
22430  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22431  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22432 #endif
22433  }
22434  } else {
22435  if (sizeof(int) <= sizeof(long)) {
22436  return PyInt_FromLong((long) value);
22437 #ifdef HAVE_LONG_LONG
22438  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22439  return PyLong_FromLongLong((PY_LONG_LONG) value);
22440 #endif
22441  }
22442  }
22443  {
22444  int one = 1; int little = (int)*(unsigned char *)&one;
22445  unsigned char *bytes = (unsigned char *)&value;
22446  return _PyLong_FromByteArray(bytes, sizeof(int),
22447  little, !is_unsigned);
22448  }
22449 }
22450 
22451 /* CIntFromPy */
22452  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22453  const int neg_one = (int) -1, const_zero = (int) 0;
22454  const int is_unsigned = neg_one > const_zero;
22455 #if PY_MAJOR_VERSION < 3
22456  if (likely(PyInt_Check(x))) {
22457  if (sizeof(int) < sizeof(long)) {
22458  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22459  } else {
22460  long val = PyInt_AS_LONG(x);
22461  if (is_unsigned && unlikely(val < 0)) {
22462  goto raise_neg_overflow;
22463  }
22464  return (int) val;
22465  }
22466  } else
22467 #endif
22468  if (likely(PyLong_Check(x))) {
22469  if (is_unsigned) {
22470 #if CYTHON_USE_PYLONG_INTERNALS
22471  const digit* digits = ((PyLongObject*)x)->ob_digit;
22472  switch (Py_SIZE(x)) {
22473  case 0: return (int) 0;
22474  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22475  case 2:
22476  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22477  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22478  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22479  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22480  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22481  }
22482  }
22483  break;
22484  case 3:
22485  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22486  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22487  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22488  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22489  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22490  }
22491  }
22492  break;
22493  case 4:
22494  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22495  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22496  __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])))
22497  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22498  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22499  }
22500  }
22501  break;
22502  }
22503 #endif
22504 #if CYTHON_COMPILING_IN_CPYTHON
22505  if (unlikely(Py_SIZE(x) < 0)) {
22506  goto raise_neg_overflow;
22507  }
22508 #else
22509  {
22510  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22511  if (unlikely(result < 0))
22512  return (int) -1;
22513  if (unlikely(result == 1))
22514  goto raise_neg_overflow;
22515  }
22516 #endif
22517  if (sizeof(int) <= sizeof(unsigned long)) {
22518  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22519 #ifdef HAVE_LONG_LONG
22520  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22521  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22522 #endif
22523  }
22524  } else {
22525 #if CYTHON_USE_PYLONG_INTERNALS
22526  const digit* digits = ((PyLongObject*)x)->ob_digit;
22527  switch (Py_SIZE(x)) {
22528  case 0: return (int) 0;
22529  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22530  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22531  case -2:
22532  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22533  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22534  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22535  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22536  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22537  }
22538  }
22539  break;
22540  case 2:
22541  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22542  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22543  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22544  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22545  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22546  }
22547  }
22548  break;
22549  case -3:
22550  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22551  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22552  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22553  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22554  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22555  }
22556  }
22557  break;
22558  case 3:
22559  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22560  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22561  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22562  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22563  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22564  }
22565  }
22566  break;
22567  case -4:
22568  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22569  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22570  __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])))
22571  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22572  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22573  }
22574  }
22575  break;
22576  case 4:
22577  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22578  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22579  __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])))
22580  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22581  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22582  }
22583  }
22584  break;
22585  }
22586 #endif
22587  if (sizeof(int) <= sizeof(long)) {
22588  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22589 #ifdef HAVE_LONG_LONG
22590  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22591  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22592 #endif
22593  }
22594  }
22595  {
22596 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22597  PyErr_SetString(PyExc_RuntimeError,
22598  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22599 #else
22600  int val;
22601  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22602  #if PY_MAJOR_VERSION < 3
22603  if (likely(v) && !PyLong_Check(v)) {
22604  PyObject *tmp = v;
22605  v = PyNumber_Long(tmp);
22606  Py_DECREF(tmp);
22607  }
22608  #endif
22609  if (likely(v)) {
22610  int one = 1; int is_little = (int)*(unsigned char *)&one;
22611  unsigned char *bytes = (unsigned char *)&val;
22612  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22613  bytes, sizeof(val),
22614  is_little, !is_unsigned);
22615  Py_DECREF(v);
22616  if (likely(!ret))
22617  return val;
22618  }
22619 #endif
22620  return (int) -1;
22621  }
22622  } else {
22623  int val;
22624  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22625  if (!tmp) return (int) -1;
22626  val = __Pyx_PyInt_As_int(tmp);
22627  Py_DECREF(tmp);
22628  return val;
22629  }
22630 raise_overflow:
22631  PyErr_SetString(PyExc_OverflowError,
22632  "value too large to convert to int");
22633  return (int) -1;
22634 raise_neg_overflow:
22635  PyErr_SetString(PyExc_OverflowError,
22636  "can't convert negative value to int");
22637  return (int) -1;
22638 }
22639 
22640 /* CIntToPy */
22641  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22642  const long neg_one = (long) -1, const_zero = (long) 0;
22643  const int is_unsigned = neg_one > const_zero;
22644  if (is_unsigned) {
22645  if (sizeof(long) < sizeof(long)) {
22646  return PyInt_FromLong((long) value);
22647  } else if (sizeof(long) <= sizeof(unsigned long)) {
22648  return PyLong_FromUnsignedLong((unsigned long) value);
22649 #ifdef HAVE_LONG_LONG
22650  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22651  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22652 #endif
22653  }
22654  } else {
22655  if (sizeof(long) <= sizeof(long)) {
22656  return PyInt_FromLong((long) value);
22657 #ifdef HAVE_LONG_LONG
22658  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22659  return PyLong_FromLongLong((PY_LONG_LONG) value);
22660 #endif
22661  }
22662  }
22663  {
22664  int one = 1; int little = (int)*(unsigned char *)&one;
22665  unsigned char *bytes = (unsigned char *)&value;
22666  return _PyLong_FromByteArray(bytes, sizeof(long),
22667  little, !is_unsigned);
22668  }
22669 }
22670 
22671 /* CIntFromPy */
22672  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22673  const long neg_one = (long) -1, const_zero = (long) 0;
22674  const int is_unsigned = neg_one > const_zero;
22675 #if PY_MAJOR_VERSION < 3
22676  if (likely(PyInt_Check(x))) {
22677  if (sizeof(long) < sizeof(long)) {
22678  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22679  } else {
22680  long val = PyInt_AS_LONG(x);
22681  if (is_unsigned && unlikely(val < 0)) {
22682  goto raise_neg_overflow;
22683  }
22684  return (long) val;
22685  }
22686  } else
22687 #endif
22688  if (likely(PyLong_Check(x))) {
22689  if (is_unsigned) {
22690 #if CYTHON_USE_PYLONG_INTERNALS
22691  const digit* digits = ((PyLongObject*)x)->ob_digit;
22692  switch (Py_SIZE(x)) {
22693  case 0: return (long) 0;
22694  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22695  case 2:
22696  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22697  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22698  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22699  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22700  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22701  }
22702  }
22703  break;
22704  case 3:
22705  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22706  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22707  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22708  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22709  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22710  }
22711  }
22712  break;
22713  case 4:
22714  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22715  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22716  __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])))
22717  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22718  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22719  }
22720  }
22721  break;
22722  }
22723 #endif
22724 #if CYTHON_COMPILING_IN_CPYTHON
22725  if (unlikely(Py_SIZE(x) < 0)) {
22726  goto raise_neg_overflow;
22727  }
22728 #else
22729  {
22730  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22731  if (unlikely(result < 0))
22732  return (long) -1;
22733  if (unlikely(result == 1))
22734  goto raise_neg_overflow;
22735  }
22736 #endif
22737  if (sizeof(long) <= sizeof(unsigned long)) {
22738  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22739 #ifdef HAVE_LONG_LONG
22740  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22741  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22742 #endif
22743  }
22744  } else {
22745 #if CYTHON_USE_PYLONG_INTERNALS
22746  const digit* digits = ((PyLongObject*)x)->ob_digit;
22747  switch (Py_SIZE(x)) {
22748  case 0: return (long) 0;
22749  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22750  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22751  case -2:
22752  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22753  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22754  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22755  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22756  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22757  }
22758  }
22759  break;
22760  case 2:
22761  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22762  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22763  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22764  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22765  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22766  }
22767  }
22768  break;
22769  case -3:
22770  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22771  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22772  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22773  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22774  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22775  }
22776  }
22777  break;
22778  case 3:
22779  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22780  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22781  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22782  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22783  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22784  }
22785  }
22786  break;
22787  case -4:
22788  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22789  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22790  __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])))
22791  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22792  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22793  }
22794  }
22795  break;
22796  case 4:
22797  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22798  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22799  __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])))
22800  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22801  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22802  }
22803  }
22804  break;
22805  }
22806 #endif
22807  if (sizeof(long) <= sizeof(long)) {
22808  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22809 #ifdef HAVE_LONG_LONG
22810  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22811  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22812 #endif
22813  }
22814  }
22815  {
22816 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22817  PyErr_SetString(PyExc_RuntimeError,
22818  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22819 #else
22820  long val;
22821  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22822  #if PY_MAJOR_VERSION < 3
22823  if (likely(v) && !PyLong_Check(v)) {
22824  PyObject *tmp = v;
22825  v = PyNumber_Long(tmp);
22826  Py_DECREF(tmp);
22827  }
22828  #endif
22829  if (likely(v)) {
22830  int one = 1; int is_little = (int)*(unsigned char *)&one;
22831  unsigned char *bytes = (unsigned char *)&val;
22832  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22833  bytes, sizeof(val),
22834  is_little, !is_unsigned);
22835  Py_DECREF(v);
22836  if (likely(!ret))
22837  return val;
22838  }
22839 #endif
22840  return (long) -1;
22841  }
22842  } else {
22843  long val;
22844  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22845  if (!tmp) return (long) -1;
22846  val = __Pyx_PyInt_As_long(tmp);
22847  Py_DECREF(tmp);
22848  return val;
22849  }
22850 raise_overflow:
22851  PyErr_SetString(PyExc_OverflowError,
22852  "value too large to convert to long");
22853  return (long) -1;
22854 raise_neg_overflow:
22855  PyErr_SetString(PyExc_OverflowError,
22856  "can't convert negative value to long");
22857  return (long) -1;
22858 }
22859 
22860 /* FastTypeChecks */
22861  #if CYTHON_COMPILING_IN_CPYTHON
22862 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22863  while (a) {
22864  a = a->tp_base;
22865  if (a == b)
22866  return 1;
22867  }
22868  return b == &PyBaseObject_Type;
22869 }
22870 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22871  PyObject *mro;
22872  if (a == b) return 1;
22873  mro = a->tp_mro;
22874  if (likely(mro)) {
22875  Py_ssize_t i, n;
22876  n = PyTuple_GET_SIZE(mro);
22877  for (i = 0; i < n; i++) {
22878  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22879  return 1;
22880  }
22881  return 0;
22882  }
22883  return __Pyx_InBases(a, b);
22884 }
22885 #if PY_MAJOR_VERSION == 2
22886 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22887  PyObject *exception, *value, *tb;
22888  int res;
22889  __Pyx_PyThreadState_declare
22890  __Pyx_PyThreadState_assign
22891  __Pyx_ErrFetch(&exception, &value, &tb);
22892  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22893  if (unlikely(res == -1)) {
22894  PyErr_WriteUnraisable(err);
22895  res = 0;
22896  }
22897  if (!res) {
22898  res = PyObject_IsSubclass(err, exc_type2);
22899  if (unlikely(res == -1)) {
22900  PyErr_WriteUnraisable(err);
22901  res = 0;
22902  }
22903  }
22904  __Pyx_ErrRestore(exception, value, tb);
22905  return res;
22906 }
22907 #else
22908 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22909  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22910  if (!res) {
22911  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22912  }
22913  return res;
22914 }
22915 #endif
22916 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22917  if (likely(err == exc_type)) return 1;
22918  if (likely(PyExceptionClass_Check(err))) {
22919  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22920  }
22921  return PyErr_GivenExceptionMatches(err, exc_type);
22922 }
22923 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22924  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22925  if (likely(PyExceptionClass_Check(err))) {
22926  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22927  }
22928  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22929 }
22930 #endif
22931 
22932 /* FetchCommonType */
22933  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22934  PyObject* fake_module;
22935  PyTypeObject* cached_type = NULL;
22936  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22937  if (!fake_module) return NULL;
22938  Py_INCREF(fake_module);
22939  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22940  if (cached_type) {
22941  if (!PyType_Check((PyObject*)cached_type)) {
22942  PyErr_Format(PyExc_TypeError,
22943  "Shared Cython type %.200s is not a type object",
22944  type->tp_name);
22945  goto bad;
22946  }
22947  if (cached_type->tp_basicsize != type->tp_basicsize) {
22948  PyErr_Format(PyExc_TypeError,
22949  "Shared Cython type %.200s has the wrong size, try recompiling",
22950  type->tp_name);
22951  goto bad;
22952  }
22953  } else {
22954  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22955  PyErr_Clear();
22956  if (PyType_Ready(type) < 0) goto bad;
22957  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22958  goto bad;
22959  Py_INCREF(type);
22960  cached_type = type;
22961  }
22962 done:
22963  Py_DECREF(fake_module);
22964  return cached_type;
22965 bad:
22966  Py_XDECREF(cached_type);
22967  cached_type = NULL;
22968  goto done;
22969 }
22970 
22971 /* SwapException */
22972  #if CYTHON_FAST_THREAD_STATE
22973 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22974  PyObject *tmp_type, *tmp_value, *tmp_tb;
22975  #if PY_VERSION_HEX >= 0x030700A2
22976  tmp_type = tstate->exc_state.exc_type;
22977  tmp_value = tstate->exc_state.exc_value;
22978  tmp_tb = tstate->exc_state.exc_traceback;
22979  tstate->exc_state.exc_type = *type;
22980  tstate->exc_state.exc_value = *value;
22981  tstate->exc_state.exc_traceback = *tb;
22982  #else
22983  tmp_type = tstate->exc_type;
22984  tmp_value = tstate->exc_value;
22985  tmp_tb = tstate->exc_traceback;
22986  tstate->exc_type = *type;
22987  tstate->exc_value = *value;
22988  tstate->exc_traceback = *tb;
22989  #endif
22990  *type = tmp_type;
22991  *value = tmp_value;
22992  *tb = tmp_tb;
22993 }
22994 #else
22995 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22996  PyObject *tmp_type, *tmp_value, *tmp_tb;
22997  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22998  PyErr_SetExcInfo(*type, *value, *tb);
22999  *type = tmp_type;
23000  *value = tmp_value;
23001  *tb = tmp_tb;
23002 }
23003 #endif
23004 
23005 /* PyObjectCallMethod1 */
23006  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23007  PyObject *result = NULL;
23008 #if CYTHON_UNPACK_METHODS
23009  if (likely(PyMethod_Check(method))) {
23010  PyObject *self = PyMethod_GET_SELF(method);
23011  if (likely(self)) {
23012  PyObject *args;
23013  PyObject *function = PyMethod_GET_FUNCTION(method);
23014  #if CYTHON_FAST_PYCALL
23015  if (PyFunction_Check(function)) {
23016  PyObject *args[2] = {self, arg};
23017  result = __Pyx_PyFunction_FastCall(function, args, 2);
23018  goto done;
23019  }
23020  #endif
23021  #if CYTHON_FAST_PYCCALL
23022  if (__Pyx_PyFastCFunction_Check(function)) {
23023  PyObject *args[2] = {self, arg};
23024  result = __Pyx_PyCFunction_FastCall(function, args, 2);
23025  goto done;
23026  }
23027  #endif
23028  args = PyTuple_New(2);
23029  if (unlikely(!args)) goto done;
23030  Py_INCREF(self);
23031  PyTuple_SET_ITEM(args, 0, self);
23032  Py_INCREF(arg);
23033  PyTuple_SET_ITEM(args, 1, arg);
23034  Py_INCREF(function);
23035  result = __Pyx_PyObject_Call(function, args, NULL);
23036  Py_DECREF(args);
23037  Py_DECREF(function);
23038  return result;
23039  }
23040  }
23041 #endif
23042  result = __Pyx_PyObject_CallOneArg(method, arg);
23043  goto done;
23044 done:
23045  return result;
23046 }
23047 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23048  PyObject *method, *result;
23049  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
23050  if (unlikely(!method)) return NULL;
23051  result = __Pyx__PyObject_CallMethod1(method, arg);
23052  Py_DECREF(method);
23053  return result;
23054 }
23055 
23056 /* CoroutineBase */
23057  #include <structmember.h>
23058 #include <frameobject.h>
23059 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23060 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23061  PyObject *et, *ev, *tb;
23062  PyObject *value = NULL;
23063  __Pyx_ErrFetch(&et, &ev, &tb);
23064  if (!et) {
23065  Py_XDECREF(tb);
23066  Py_XDECREF(ev);
23067  Py_INCREF(Py_None);
23068  *pvalue = Py_None;
23069  return 0;
23070  }
23071  if (likely(et == PyExc_StopIteration)) {
23072  if (!ev) {
23073  Py_INCREF(Py_None);
23074  value = Py_None;
23075  }
23076 #if PY_VERSION_HEX >= 0x030300A0
23077  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23078  value = ((PyStopIterationObject *)ev)->value;
23079  Py_INCREF(value);
23080  Py_DECREF(ev);
23081  }
23082 #endif
23083  else if (unlikely(PyTuple_Check(ev))) {
23084  if (PyTuple_GET_SIZE(ev) >= 1) {
23085 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23086  value = PyTuple_GET_ITEM(ev, 0);
23087  Py_INCREF(value);
23088 #else
23089  value = PySequence_ITEM(ev, 0);
23090 #endif
23091  } else {
23092  Py_INCREF(Py_None);
23093  value = Py_None;
23094  }
23095  Py_DECREF(ev);
23096  }
23097  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23098  value = ev;
23099  }
23100  if (likely(value)) {
23101  Py_XDECREF(tb);
23102  Py_DECREF(et);
23103  *pvalue = value;
23104  return 0;
23105  }
23106  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23107  __Pyx_ErrRestore(et, ev, tb);
23108  return -1;
23109  }
23110  PyErr_NormalizeException(&et, &ev, &tb);
23111  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23112  __Pyx_ErrRestore(et, ev, tb);
23113  return -1;
23114  }
23115  Py_XDECREF(tb);
23116  Py_DECREF(et);
23117 #if PY_VERSION_HEX >= 0x030300A0
23118  value = ((PyStopIterationObject *)ev)->value;
23119  Py_INCREF(value);
23120  Py_DECREF(ev);
23121 #else
23122  {
23123  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23124  Py_DECREF(ev);
23125  if (likely(args)) {
23126  value = PySequence_GetItem(args, 0);
23127  Py_DECREF(args);
23128  }
23129  if (unlikely(!value)) {
23130  __Pyx_ErrRestore(NULL, NULL, NULL);
23131  Py_INCREF(Py_None);
23132  value = Py_None;
23133  }
23134  }
23135 #endif
23136  *pvalue = value;
23137  return 0;
23138 }
23139 static CYTHON_INLINE
23140 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
23141  PyObject *exc_type = self->exc_type;
23142  PyObject *exc_value = self->exc_value;
23143  PyObject *exc_traceback = self->exc_traceback;
23144  self->exc_type = NULL;
23145  self->exc_value = NULL;
23146  self->exc_traceback = NULL;
23147  Py_XDECREF(exc_type);
23148  Py_XDECREF(exc_value);
23149  Py_XDECREF(exc_traceback);
23150 }
23151 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23152 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23153  const char *msg;
23154  if (0) {
23155  #ifdef __Pyx_Coroutine_USED
23156  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
23157  msg = "coroutine already executing";
23158  #endif
23159  #ifdef __Pyx_AsyncGen_USED
23160  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
23161  msg = "async generator already executing";
23162  #endif
23163  } else {
23164  msg = "generator already executing";
23165  }
23166  PyErr_SetString(PyExc_ValueError, msg);
23167 }
23168 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
23169 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
23170  const char *msg;
23171  if (0) {
23172  #ifdef __Pyx_Coroutine_USED
23173  } else if (__Pyx_Coroutine_Check(gen)) {
23174  msg = "can't send non-None value to a just-started coroutine";
23175  #endif
23176  #ifdef __Pyx_AsyncGen_USED
23177  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
23178  msg = "can't send non-None value to a just-started async generator";
23179  #endif
23180  } else {
23181  msg = "can't send non-None value to a just-started generator";
23182  }
23183  PyErr_SetString(PyExc_TypeError, msg);
23184 }
23185 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
23186 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
23187  #ifdef __Pyx_Coroutine_USED
23188  if (!closing && __Pyx_Coroutine_Check(gen)) {
23189  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
23190  } else
23191  #endif
23192  if (value) {
23193  #ifdef __Pyx_AsyncGen_USED
23194  if (__Pyx_AsyncGen_CheckExact(gen))
23195  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
23196  else
23197  #endif
23198  PyErr_SetNone(PyExc_StopIteration);
23199  }
23200 }
23201 static
23202 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
23203  __Pyx_PyThreadState_declare
23204  PyThreadState *tstate;
23205  PyObject *retval;
23206  assert(!self->is_running);
23207  if (unlikely(self->resume_label == 0)) {
23208  if (unlikely(value && value != Py_None)) {
23209  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
23210  }
23211  }
23212  if (unlikely(self->resume_label == -1)) {
23213  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
23214  }
23215 #if CYTHON_FAST_THREAD_STATE
23216  __Pyx_PyThreadState_assign
23217  tstate = __pyx_tstate;
23218 #else
23219  tstate = __Pyx_PyThreadState_Current;
23220 #endif
23221  if (self->exc_type) {
23222 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23223 #else
23224  if (self->exc_traceback) {
23225  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23226  PyFrameObject *f = tb->tb_frame;
23227  Py_XINCREF(tstate->frame);
23228  assert(f->f_back == NULL);
23229  f->f_back = tstate->frame;
23230  }
23231 #endif
23232  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
23233  &self->exc_traceback);
23234  } else {
23235  __Pyx_Coroutine_ExceptionClear(self);
23236  __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
23237  }
23238  self->is_running = 1;
23239  retval = self->body((PyObject *) self, tstate, value);
23240  self->is_running = 0;
23241  return retval;
23242 }
23243 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
23244  if (likely(self->exc_traceback)) {
23245 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23246 #else
23247  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23248  PyFrameObject *f = tb->tb_frame;
23249  Py_CLEAR(f->f_back);
23250 #endif
23251  }
23252 }
23253 static CYTHON_INLINE
23254 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23255  if (unlikely(!retval)) {
23256  __Pyx_PyThreadState_declare
23257  __Pyx_PyThreadState_assign
23258  if (!__Pyx_PyErr_Occurred()) {
23259  PyObject *exc = PyExc_StopIteration;
23260  #ifdef __Pyx_AsyncGen_USED
23261  if (__Pyx_AsyncGen_CheckExact(gen))
23262  exc = __Pyx_PyExc_StopAsyncIteration;
23263  #endif
23264  __Pyx_PyErr_SetNone(exc);
23265  }
23266  }
23267  return retval;
23268 }
23269 static CYTHON_INLINE
23270 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23271  PyObject *ret;
23272  PyObject *val = NULL;
23273  __Pyx_Coroutine_Undelegate(gen);
23274  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23275  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23276  Py_XDECREF(val);
23277  return ret;
23278 }
23279 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23280  PyObject *retval;
23281  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23282  PyObject *yf = gen->yieldfrom;
23283  if (unlikely(gen->is_running))
23284  return __Pyx_Coroutine_AlreadyRunningError(gen);
23285  if (yf) {
23286  PyObject *ret;
23287  gen->is_running = 1;
23288  #ifdef __Pyx_Generator_USED
23289  if (__Pyx_Generator_CheckExact(yf)) {
23290  ret = __Pyx_Coroutine_Send(yf, value);
23291  } else
23292  #endif
23293  #ifdef __Pyx_Coroutine_USED
23294  if (__Pyx_Coroutine_Check(yf)) {
23295  ret = __Pyx_Coroutine_Send(yf, value);
23296  } else
23297  #endif
23298  #ifdef __Pyx_AsyncGen_USED
23299  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23300  ret = __Pyx_async_gen_asend_send(yf, value);
23301  } else
23302  #endif
23303  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23304  if (PyGen_CheckExact(yf)) {
23305  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23306  } else
23307  #endif
23308  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23309  if (PyCoro_CheckExact(yf)) {
23310  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23311  } else
23312  #endif
23313  {
23314  if (value == Py_None)
23315  ret = Py_TYPE(yf)->tp_iternext(yf);
23316  else
23317  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23318  }
23319  gen->is_running = 0;
23320  if (likely(ret)) {
23321  return ret;
23322  }
23323  retval = __Pyx_Coroutine_FinishDelegation(gen);
23324  } else {
23325  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23326  }
23327  return __Pyx_Coroutine_MethodReturn(self, retval);
23328 }
23329 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23330  PyObject *retval = NULL;
23331  int err = 0;
23332  #ifdef __Pyx_Generator_USED
23333  if (__Pyx_Generator_CheckExact(yf)) {
23334  retval = __Pyx_Coroutine_Close(yf);
23335  if (!retval)
23336  return -1;
23337  } else
23338  #endif
23339  #ifdef __Pyx_Coroutine_USED
23340  if (__Pyx_Coroutine_Check(yf)) {
23341  retval = __Pyx_Coroutine_Close(yf);
23342  if (!retval)
23343  return -1;
23344  } else
23345  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23346  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
23347  if (!retval)
23348  return -1;
23349  } else
23350  #endif
23351  #ifdef __Pyx_AsyncGen_USED
23352  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23353  retval = __Pyx_async_gen_asend_close(yf, NULL);
23354  } else
23355  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23356  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23357  } else
23358  #endif
23359  {
23360  PyObject *meth;
23361  gen->is_running = 1;
23362  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23363  if (unlikely(!meth)) {
23364  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23365  PyErr_WriteUnraisable(yf);
23366  }
23367  PyErr_Clear();
23368  } else {
23369  retval = PyObject_CallFunction(meth, NULL);
23370  Py_DECREF(meth);
23371  if (!retval)
23372  err = -1;
23373  }
23374  gen->is_running = 0;
23375  }
23376  Py_XDECREF(retval);
23377  return err;
23378 }
23379 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23380  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23381  PyObject *yf = gen->yieldfrom;
23382  if (unlikely(gen->is_running))
23383  return __Pyx_Coroutine_AlreadyRunningError(gen);
23384  if (yf) {
23385  PyObject *ret;
23386  gen->is_running = 1;
23387  #ifdef __Pyx_Generator_USED
23388  if (__Pyx_Generator_CheckExact(yf)) {
23389  ret = __Pyx_Generator_Next(yf);
23390  } else
23391  #endif
23392  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23393  if (PyGen_CheckExact(yf)) {
23394  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23395  } else
23396  #endif
23397  #ifdef __Pyx_Coroutine_USED
23398  if (__Pyx_Coroutine_Check(yf)) {
23399  ret = __Pyx_Coroutine_Send(yf, Py_None);
23400  } else
23401  #endif
23402  ret = Py_TYPE(yf)->tp_iternext(yf);
23403  gen->is_running = 0;
23404  if (likely(ret)) {
23405  return ret;
23406  }
23407  return __Pyx_Coroutine_FinishDelegation(gen);
23408  }
23409  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23410 }
23411 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23412  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23413  PyObject *retval, *raised_exception;
23414  PyObject *yf = gen->yieldfrom;
23415  int err = 0;
23416  if (unlikely(gen->is_running))
23417  return __Pyx_Coroutine_AlreadyRunningError(gen);
23418  if (yf) {
23419  Py_INCREF(yf);
23420  err = __Pyx_Coroutine_CloseIter(gen, yf);
23421  __Pyx_Coroutine_Undelegate(gen);
23422  Py_DECREF(yf);
23423  }
23424  if (err == 0)
23425  PyErr_SetNone(PyExc_GeneratorExit);
23426  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23427  if (unlikely(retval)) {
23428  const char *msg;
23429  Py_DECREF(retval);
23430  if ((0)) {
23431  #ifdef __Pyx_Coroutine_USED
23432  } else if (__Pyx_Coroutine_Check(self)) {
23433  msg = "coroutine ignored GeneratorExit";
23434  #endif
23435  #ifdef __Pyx_AsyncGen_USED
23436  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23437 #if PY_VERSION_HEX < 0x03060000
23438  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23439 #else
23440  msg = "async generator ignored GeneratorExit";
23441 #endif
23442  #endif
23443  } else {
23444  msg = "generator ignored GeneratorExit";
23445  }
23446  PyErr_SetString(PyExc_RuntimeError, msg);
23447  return NULL;
23448  }
23449  raised_exception = PyErr_Occurred();
23450  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23451  if (raised_exception) PyErr_Clear();
23452  Py_INCREF(Py_None);
23453  return Py_None;
23454  }
23455  return NULL;
23456 }
23457 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23458  PyObject *args, int close_on_genexit) {
23459  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23460  PyObject *yf = gen->yieldfrom;
23461  if (unlikely(gen->is_running))
23462  return __Pyx_Coroutine_AlreadyRunningError(gen);
23463  if (yf) {
23464  PyObject *ret;
23465  Py_INCREF(yf);
23466  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23467  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23468  Py_DECREF(yf);
23469  __Pyx_Coroutine_Undelegate(gen);
23470  if (err < 0)
23471  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23472  goto throw_here;
23473  }
23474  gen->is_running = 1;
23475  if (0
23476  #ifdef __Pyx_Generator_USED
23477  || __Pyx_Generator_CheckExact(yf)
23478  #endif
23479  #ifdef __Pyx_Coroutine_USED
23480  || __Pyx_Coroutine_Check(yf)
23481  #endif
23482  ) {
23483  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23484  #ifdef __Pyx_Coroutine_USED
23485  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23486  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23487  #endif
23488  } else {
23489  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23490  if (unlikely(!meth)) {
23491  Py_DECREF(yf);
23492  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23493  gen->is_running = 0;
23494  return NULL;
23495  }
23496  PyErr_Clear();
23497  __Pyx_Coroutine_Undelegate(gen);
23498  gen->is_running = 0;
23499  goto throw_here;
23500  }
23501  if (likely(args)) {
23502  ret = PyObject_CallObject(meth, args);
23503  } else {
23504  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23505  }
23506  Py_DECREF(meth);
23507  }
23508  gen->is_running = 0;
23509  Py_DECREF(yf);
23510  if (!ret) {
23511  ret = __Pyx_Coroutine_FinishDelegation(gen);
23512  }
23513  return __Pyx_Coroutine_MethodReturn(self, ret);
23514  }
23515 throw_here:
23516  __Pyx_Raise(typ, val, tb, NULL);
23517  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23518 }
23519 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23520  PyObject *typ;
23521  PyObject *val = NULL;
23522  PyObject *tb = NULL;
23523  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23524  return NULL;
23525  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23526 }
23527 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23528  Py_VISIT(gen->closure);
23529  Py_VISIT(gen->classobj);
23530  Py_VISIT(gen->yieldfrom);
23531  Py_VISIT(gen->exc_type);
23532  Py_VISIT(gen->exc_value);
23533  Py_VISIT(gen->exc_traceback);
23534  return 0;
23535 }
23536 static int __Pyx_Coroutine_clear(PyObject *self) {
23537  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23538  Py_CLEAR(gen->closure);
23539  Py_CLEAR(gen->classobj);
23540  Py_CLEAR(gen->yieldfrom);
23541  Py_CLEAR(gen->exc_type);
23542  Py_CLEAR(gen->exc_value);
23543  Py_CLEAR(gen->exc_traceback);
23544 #ifdef __Pyx_AsyncGen_USED
23545  if (__Pyx_AsyncGen_CheckExact(self)) {
23546  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23547  }
23548 #endif
23549  Py_CLEAR(gen->gi_code);
23550  Py_CLEAR(gen->gi_name);
23551  Py_CLEAR(gen->gi_qualname);
23552  Py_CLEAR(gen->gi_modulename);
23553  return 0;
23554 }
23555 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23556  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23557  PyObject_GC_UnTrack(gen);
23558  if (gen->gi_weakreflist != NULL)
23559  PyObject_ClearWeakRefs(self);
23560  if (gen->resume_label >= 0) {
23561  PyObject_GC_Track(self);
23562 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23563  if (PyObject_CallFinalizerFromDealloc(self))
23564 #else
23565  Py_TYPE(gen)->tp_del(self);
23566  if (self->ob_refcnt > 0)
23567 #endif
23568  {
23569  return;
23570  }
23571  PyObject_GC_UnTrack(self);
23572  }
23573 #ifdef __Pyx_AsyncGen_USED
23574  if (__Pyx_AsyncGen_CheckExact(self)) {
23575  /* We have to handle this case for asynchronous generators
23576  right here, because this code has to be between UNTRACK
23577  and GC_Del. */
23578  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23579  }
23580 #endif
23581  __Pyx_Coroutine_clear(self);
23582  PyObject_GC_Del(gen);
23583 }
23584 static void __Pyx_Coroutine_del(PyObject *self) {
23585  PyObject *error_type, *error_value, *error_traceback;
23586  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23587  __Pyx_PyThreadState_declare
23588  if (gen->resume_label < 0) {
23589  return;
23590  }
23591 #if !CYTHON_USE_TP_FINALIZE
23592  assert(self->ob_refcnt == 0);
23593  self->ob_refcnt = 1;
23594 #endif
23595  __Pyx_PyThreadState_assign
23596  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23597 #ifdef __Pyx_AsyncGen_USED
23598  if (__Pyx_AsyncGen_CheckExact(self)) {
23599  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23600  PyObject *finalizer = agen->ag_finalizer;
23601  if (finalizer && !agen->ag_closed) {
23602  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23603  if (unlikely(!res)) {
23604  PyErr_WriteUnraisable(self);
23605  } else {
23606  Py_DECREF(res);
23607  }
23608  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23609  return;
23610  }
23611  }
23612 #endif
23613  if (unlikely(gen->resume_label == 0 && !error_value)) {
23614 #ifdef __Pyx_Coroutine_USED
23615 #ifdef __Pyx_Generator_USED
23616  if (!__Pyx_Generator_CheckExact(self))
23617 #endif
23618  {
23619  PyObject_GC_UnTrack(self);
23620 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23621  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23622  PyErr_WriteUnraisable(self);
23623 #else
23624  {PyObject *msg;
23625  char *cmsg;
23626  #if CYTHON_COMPILING_IN_PYPY
23627  msg = NULL;
23628  cmsg = (char*) "coroutine was never awaited";
23629  #else
23630  char *cname;
23631  PyObject *qualname;
23632  qualname = gen->gi_qualname;
23633  cname = PyString_AS_STRING(qualname);
23634  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23635  if (unlikely(!msg)) {
23636  PyErr_Clear();
23637  cmsg = (char*) "coroutine was never awaited";
23638  } else {
23639  cmsg = PyString_AS_STRING(msg);
23640  }
23641  #endif
23642  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23643  PyErr_WriteUnraisable(self);
23644  Py_XDECREF(msg);}
23645 #endif
23646  PyObject_GC_Track(self);
23647  }
23648 #endif
23649  } else {
23650  PyObject *res = __Pyx_Coroutine_Close(self);
23651  if (unlikely(!res)) {
23652  if (PyErr_Occurred())
23653  PyErr_WriteUnraisable(self);
23654  } else {
23655  Py_DECREF(res);
23656  }
23657  }
23658  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23659 #if !CYTHON_USE_TP_FINALIZE
23660  assert(self->ob_refcnt > 0);
23661  if (--self->ob_refcnt == 0) {
23662  return;
23663  }
23664  {
23665  Py_ssize_t refcnt = self->ob_refcnt;
23666  _Py_NewReference(self);
23667  self->ob_refcnt = refcnt;
23668  }
23669 #if CYTHON_COMPILING_IN_CPYTHON
23670  assert(PyType_IS_GC(self->ob_type) &&
23671  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23672  _Py_DEC_REFTOTAL;
23673 #endif
23674 #ifdef COUNT_ALLOCS
23675  --Py_TYPE(self)->tp_frees;
23676  --Py_TYPE(self)->tp_allocs;
23677 #endif
23678 #endif
23679 }
23680 static PyObject *
23681 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
23682 {
23683  PyObject *name = self->gi_name;
23684  if (unlikely(!name)) name = Py_None;
23685  Py_INCREF(name);
23686  return name;
23687 }
23688 static int
23689 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
23690 {
23691  PyObject *tmp;
23692 #if PY_MAJOR_VERSION >= 3
23693  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23694 #else
23695  if (unlikely(value == NULL || !PyString_Check(value))) {
23696 #endif
23697  PyErr_SetString(PyExc_TypeError,
23698  "__name__ must be set to a string object");
23699  return -1;
23700  }
23701  tmp = self->gi_name;
23702  Py_INCREF(value);
23703  self->gi_name = value;
23704  Py_XDECREF(tmp);
23705  return 0;
23706 }
23707 static PyObject *
23708 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
23709 {
23710  PyObject *name = self->gi_qualname;
23711  if (unlikely(!name)) name = Py_None;
23712  Py_INCREF(name);
23713  return name;
23714 }
23715 static int
23716 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
23717 {
23718  PyObject *tmp;
23719 #if PY_MAJOR_VERSION >= 3
23720  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23721 #else
23722  if (unlikely(value == NULL || !PyString_Check(value))) {
23723 #endif
23724  PyErr_SetString(PyExc_TypeError,
23725  "__qualname__ must be set to a string object");
23726  return -1;
23727  }
23728  tmp = self->gi_qualname;
23729  Py_INCREF(value);
23730  self->gi_qualname = value;
23731  Py_XDECREF(tmp);
23732  return 0;
23733 }
23734 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23735  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23736  PyObject *name, PyObject *qualname, PyObject *module_name) {
23737  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23738  if (unlikely(!gen))
23739  return NULL;
23740  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23741 }
23742 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23743  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23744  PyObject *name, PyObject *qualname, PyObject *module_name) {
23745  gen->body = body;
23746  gen->closure = closure;
23747  Py_XINCREF(closure);
23748  gen->is_running = 0;
23749  gen->resume_label = 0;
23750  gen->classobj = NULL;
23751  gen->yieldfrom = NULL;
23752  gen->exc_type = NULL;
23753  gen->exc_value = NULL;
23754  gen->exc_traceback = NULL;
23755  gen->gi_weakreflist = NULL;
23756  Py_XINCREF(qualname);
23757  gen->gi_qualname = qualname;
23758  Py_XINCREF(name);
23759  gen->gi_name = name;
23760  Py_XINCREF(module_name);
23761  gen->gi_modulename = module_name;
23762  Py_XINCREF(code);
23763  gen->gi_code = code;
23764  PyObject_GC_Track(gen);
23765  return gen;
23766 }
23767 
23768 /* PatchModuleWithCoroutine */
23769  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23770 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23771  int result;
23772  PyObject *globals, *result_obj;
23773  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23774  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23775  #ifdef __Pyx_Coroutine_USED
23776  (PyObject*)__pyx_CoroutineType);
23777  #else
23778  Py_None);
23779  #endif
23780  if (unlikely(result < 0)) goto ignore;
23781  result = PyDict_SetItemString(globals, "_cython_generator_type",
23782  #ifdef __Pyx_Generator_USED
23783  (PyObject*)__pyx_GeneratorType);
23784  #else
23785  Py_None);
23786  #endif
23787  if (unlikely(result < 0)) goto ignore;
23788  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23789  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23790  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23791  if (unlikely(!result_obj)) goto ignore;
23792  Py_DECREF(result_obj);
23793  Py_DECREF(globals);
23794  return module;
23795 ignore:
23796  Py_XDECREF(globals);
23797  PyErr_WriteUnraisable(module);
23798  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23799  Py_DECREF(module);
23800  module = NULL;
23801  }
23802 #else
23803  py_code++;
23804 #endif
23805  return module;
23806 }
23807 
23808 /* PatchGeneratorABC */
23809  #ifndef CYTHON_REGISTER_ABCS
23810 #define CYTHON_REGISTER_ABCS 1
23811 #endif
23812 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23813 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23814 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23815  module = __Pyx_Coroutine_patch_module(
23816  module, ""
23817 "if _cython_generator_type is not None:\n"
23818 " try: Generator = _module.Generator\n"
23819 " except AttributeError: pass\n"
23820 " else: Generator.register(_cython_generator_type)\n"
23821 "if _cython_coroutine_type is not None:\n"
23822 " try: Coroutine = _module.Coroutine\n"
23823 " except AttributeError: pass\n"
23824 " else: Coroutine.register(_cython_coroutine_type)\n"
23825  );
23826  return module;
23827 }
23828 #endif
23829 static int __Pyx_patch_abc(void) {
23830 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23831  static int abc_patched = 0;
23832  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23833  PyObject *module;
23834  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23835  if (!module) {
23836  PyErr_WriteUnraisable(NULL);
23837  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23838  ((PY_MAJOR_VERSION >= 3) ?
23839  "Cython module failed to register with collections.abc module" :
23840  "Cython module failed to register with collections module"), 1) < 0)) {
23841  return -1;
23842  }
23843  } else {
23844  module = __Pyx_patch_abc_module(module);
23845  abc_patched = 1;
23846  if (unlikely(!module))
23847  return -1;
23848  Py_DECREF(module);
23849  }
23850  module = PyImport_ImportModule("backports_abc");
23851  if (module) {
23852  module = __Pyx_patch_abc_module(module);
23853  Py_XDECREF(module);
23854  }
23855  if (!module) {
23856  PyErr_Clear();
23857  }
23858  }
23859 #else
23860  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23861 #endif
23862  return 0;
23863 }
23864 
23865 /* Generator */
23866  static PyMethodDef __pyx_Generator_methods[] = {
23867  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23868  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23869  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23870  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23871  {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
23872  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23873  {0, 0, 0, 0}
23874 };
23875 static PyMemberDef __pyx_Generator_memberlist[] = {
23876  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23877  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23878  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23879  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23880  {0, 0, 0, 0, 0}
23881 };
23882 static PyGetSetDef __pyx_Generator_getsets[] = {
23883  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23884  (char*) PyDoc_STR("name of the generator"), 0},
23885  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23886  (char*) PyDoc_STR("qualified name of the generator"), 0},
23887  {0, 0, 0, 0, 0}
23888 };
23889 static PyTypeObject __pyx_GeneratorType_type = {
23890  PyVarObject_HEAD_INIT(0, 0)
23891  "generator",
23892  sizeof(__pyx_CoroutineObject),
23893  0,
23894  (destructor) __Pyx_Coroutine_dealloc,
23895  0,
23896  0,
23897  0,
23898  0,
23899  0,
23900  0,
23901  0,
23902  0,
23903  0,
23904  0,
23905  0,
23906  0,
23907  0,
23908  0,
23909  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23910  0,
23911  (traverseproc) __Pyx_Coroutine_traverse,
23912  0,
23913  0,
23914  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23915  0,
23916  (iternextfunc) __Pyx_Generator_Next,
23917  __pyx_Generator_methods,
23918  __pyx_Generator_memberlist,
23919  __pyx_Generator_getsets,
23920  0,
23921  0,
23922  0,
23923  0,
23924  0,
23925  0,
23926  0,
23927  0,
23928  0,
23929  0,
23930  0,
23931  0,
23932  0,
23933  0,
23934  0,
23935 #if CYTHON_USE_TP_FINALIZE
23936  0,
23937 #else
23938  __Pyx_Coroutine_del,
23939 #endif
23940  0,
23941 #if CYTHON_USE_TP_FINALIZE
23942  __Pyx_Coroutine_del,
23943 #elif PY_VERSION_HEX >= 0x030400a1
23944  0,
23945 #endif
23946 };
23947 static int __pyx_Generator_init(void) {
23948  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23949  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23950  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23951  if (unlikely(!__pyx_GeneratorType)) {
23952  return -1;
23953  }
23954  return 0;
23955 }
23956 
23957 /* CheckBinaryVersion */
23958  static int __Pyx_check_binary_version(void) {
23959  char ctversion[4], rtversion[4];
23960  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23961  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23962  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23963  char message[200];
23964  PyOS_snprintf(message, sizeof(message),
23965  "compiletime version %s of module '%.100s' "
23966  "does not match runtime version %s",
23967  ctversion, __Pyx_MODULE_NAME, rtversion);
23968  return PyErr_WarnEx(NULL, message, 1);
23969  }
23970  return 0;
23971 }
23972 
23973 /* InitStrings */
23974  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23975  while (t->p) {
23976  #if PY_MAJOR_VERSION < 3
23977  if (t->is_unicode) {
23978  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23979  } else if (t->intern) {
23980  *t->p = PyString_InternFromString(t->s);
23981  } else {
23982  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23983  }
23984  #else
23985  if (t->is_unicode | t->is_str) {
23986  if (t->intern) {
23987  *t->p = PyUnicode_InternFromString(t->s);
23988  } else if (t->encoding) {
23989  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23990  } else {
23991  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23992  }
23993  } else {
23994  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23995  }
23996  #endif
23997  if (!*t->p)
23998  return -1;
23999  if (PyObject_Hash(*t->p) == -1)
24000  return -1;
24001  ++t;
24002  }
24003  return 0;
24004 }
24005 
24006 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24007  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24008 }
24009 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24010  Py_ssize_t ignore;
24011  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24012 }
24013 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24014 #if !CYTHON_PEP393_ENABLED
24015 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24016  char* defenc_c;
24017  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24018  if (!defenc) return NULL;
24019  defenc_c = PyBytes_AS_STRING(defenc);
24020 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24021  {
24022  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24023  char* c;
24024  for (c = defenc_c; c < end; c++) {
24025  if ((unsigned char) (*c) >= 128) {
24026  PyUnicode_AsASCIIString(o);
24027  return NULL;
24028  }
24029  }
24030  }
24031 #endif
24032  *length = PyBytes_GET_SIZE(defenc);
24033  return defenc_c;
24034 }
24035 #else
24036 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24037  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24038 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24039  if (likely(PyUnicode_IS_ASCII(o))) {
24040  *length = PyUnicode_GET_LENGTH(o);
24041  return PyUnicode_AsUTF8(o);
24042  } else {
24043  PyUnicode_AsASCIIString(o);
24044  return NULL;
24045  }
24046 #else
24047  return PyUnicode_AsUTF8AndSize(o, length);
24048 #endif
24049 }
24050 #endif
24051 #endif
24052 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24053 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24054  if (
24055 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24056  __Pyx_sys_getdefaultencoding_not_ascii &&
24057 #endif
24058  PyUnicode_Check(o)) {
24059  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24060  } else
24061 #endif
24062 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24063  if (PyByteArray_Check(o)) {
24064  *length = PyByteArray_GET_SIZE(o);
24065  return PyByteArray_AS_STRING(o);
24066  } else
24067 #endif
24068  {
24069  char* result;
24070  int r = PyBytes_AsStringAndSize(o, &result, length);
24071  if (unlikely(r < 0)) {
24072  return NULL;
24073  } else {
24074  return result;
24075  }
24076  }
24077 }
24078 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24079  int is_true = x == Py_True;
24080  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24081  else return PyObject_IsTrue(x);
24082 }
24083 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24084 #if PY_MAJOR_VERSION >= 3
24085  if (PyLong_Check(result)) {
24086  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24087  "__int__ returned non-int (type %.200s). "
24088  "The ability to return an instance of a strict subclass of int "
24089  "is deprecated, and may be removed in a future version of Python.",
24090  Py_TYPE(result)->tp_name)) {
24091  Py_DECREF(result);
24092  return NULL;
24093  }
24094  return result;
24095  }
24096 #endif
24097  PyErr_Format(PyExc_TypeError,
24098  "__%.4s__ returned non-%.4s (type %.200s)",
24099  type_name, type_name, Py_TYPE(result)->tp_name);
24100  Py_DECREF(result);
24101  return NULL;
24102 }
24103 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24104 #if CYTHON_USE_TYPE_SLOTS
24105  PyNumberMethods *m;
24106 #endif
24107  const char *name = NULL;
24108  PyObject *res = NULL;
24109 #if PY_MAJOR_VERSION < 3
24110  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24111 #else
24112  if (likely(PyLong_Check(x)))
24113 #endif
24114  return __Pyx_NewRef(x);
24115 #if CYTHON_USE_TYPE_SLOTS
24116  m = Py_TYPE(x)->tp_as_number;
24117  #if PY_MAJOR_VERSION < 3
24118  if (m && m->nb_int) {
24119  name = "int";
24120  res = m->nb_int(x);
24121  }
24122  else if (m && m->nb_long) {
24123  name = "long";
24124  res = m->nb_long(x);
24125  }
24126  #else
24127  if (likely(m && m->nb_int)) {
24128  name = "int";
24129  res = m->nb_int(x);
24130  }
24131  #endif
24132 #else
24133  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24134  res = PyNumber_Int(x);
24135  }
24136 #endif
24137  if (likely(res)) {
24138 #if PY_MAJOR_VERSION < 3
24139  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24140 #else
24141  if (unlikely(!PyLong_CheckExact(res))) {
24142 #endif
24143  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24144  }
24145  }
24146  else if (!PyErr_Occurred()) {
24147  PyErr_SetString(PyExc_TypeError,
24148  "an integer is required");
24149  }
24150  return res;
24151 }
24152 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24153  Py_ssize_t ival;
24154  PyObject *x;
24155 #if PY_MAJOR_VERSION < 3
24156  if (likely(PyInt_CheckExact(b))) {
24157  if (sizeof(Py_ssize_t) >= sizeof(long))
24158  return PyInt_AS_LONG(b);
24159  else
24160  return PyInt_AsSsize_t(x);
24161  }
24162 #endif
24163  if (likely(PyLong_CheckExact(b))) {
24164  #if CYTHON_USE_PYLONG_INTERNALS
24165  const digit* digits = ((PyLongObject*)b)->ob_digit;
24166  const Py_ssize_t size = Py_SIZE(b);
24167  if (likely(__Pyx_sst_abs(size) <= 1)) {
24168  ival = likely(size) ? digits[0] : 0;
24169  if (size == -1) ival = -ival;
24170  return ival;
24171  } else {
24172  switch (size) {
24173  case 2:
24174  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24175  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24176  }
24177  break;
24178  case -2:
24179  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24180  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24181  }
24182  break;
24183  case 3:
24184  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24185  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24186  }
24187  break;
24188  case -3:
24189  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24190  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24191  }
24192  break;
24193  case 4:
24194  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24195  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]));
24196  }
24197  break;
24198  case -4:
24199  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24200  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]));
24201  }
24202  break;
24203  }
24204  }
24205  #endif
24206  return PyLong_AsSsize_t(b);
24207  }
24208  x = PyNumber_Index(b);
24209  if (!x) return -1;
24210  ival = PyInt_AsSsize_t(x);
24211  Py_DECREF(x);
24212  return ival;
24213 }
24214 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24215  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24216 }
24217 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24218  return PyInt_FromSize_t(ival);
24219 }
24220 
24221 
24222 #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