glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.14 */
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_29_14"
65 #define CYTHON_HEX_VERSION 0x001D0EF0
66 #define CYTHON_FUTURE_DIVISION 0
67 #include <stddef.h>
68 #ifndef offsetof
69  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
70 #endif
71 #if !defined(WIN32) && !defined(MS_WINDOWS)
72  #ifndef __stdcall
73  #define __stdcall
74  #endif
75  #ifndef __cdecl
76  #define __cdecl
77  #endif
78  #ifndef __fastcall
79  #define __fastcall
80  #endif
81 #endif
82 #ifndef DL_IMPORT
83  #define DL_IMPORT(t) t
84 #endif
85 #ifndef DL_EXPORT
86  #define DL_EXPORT(t) t
87 #endif
88 #define __PYX_COMMA ,
89 #ifndef HAVE_LONG_LONG
90  #if PY_VERSION_HEX >= 0x02070000
91  #define HAVE_LONG_LONG
92  #endif
93 #endif
94 #ifndef PY_LONG_LONG
95  #define PY_LONG_LONG LONG_LONG
96 #endif
97 #ifndef Py_HUGE_VAL
98  #define Py_HUGE_VAL HUGE_VAL
99 #endif
100 #ifdef PYPY_VERSION
101  #define CYTHON_COMPILING_IN_PYPY 1
102  #define CYTHON_COMPILING_IN_PYSTON 0
103  #define CYTHON_COMPILING_IN_CPYTHON 0
104  #undef CYTHON_USE_TYPE_SLOTS
105  #define CYTHON_USE_TYPE_SLOTS 0
106  #undef CYTHON_USE_PYTYPE_LOOKUP
107  #define CYTHON_USE_PYTYPE_LOOKUP 0
108  #if PY_VERSION_HEX < 0x03050000
109  #undef CYTHON_USE_ASYNC_SLOTS
110  #define CYTHON_USE_ASYNC_SLOTS 0
111  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
112  #define CYTHON_USE_ASYNC_SLOTS 1
113  #endif
114  #undef CYTHON_USE_PYLIST_INTERNALS
115  #define CYTHON_USE_PYLIST_INTERNALS 0
116  #undef CYTHON_USE_UNICODE_INTERNALS
117  #define CYTHON_USE_UNICODE_INTERNALS 0
118  #undef CYTHON_USE_UNICODE_WRITER
119  #define CYTHON_USE_UNICODE_WRITER 0
120  #undef CYTHON_USE_PYLONG_INTERNALS
121  #define CYTHON_USE_PYLONG_INTERNALS 0
122  #undef CYTHON_AVOID_BORROWED_REFS
123  #define CYTHON_AVOID_BORROWED_REFS 1
124  #undef CYTHON_ASSUME_SAFE_MACROS
125  #define CYTHON_ASSUME_SAFE_MACROS 0
126  #undef CYTHON_UNPACK_METHODS
127  #define CYTHON_UNPACK_METHODS 0
128  #undef CYTHON_FAST_THREAD_STATE
129  #define CYTHON_FAST_THREAD_STATE 0
130  #undef CYTHON_FAST_PYCALL
131  #define CYTHON_FAST_PYCALL 0
132  #undef CYTHON_PEP489_MULTI_PHASE_INIT
133  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
134  #undef CYTHON_USE_TP_FINALIZE
135  #define CYTHON_USE_TP_FINALIZE 0
136  #undef CYTHON_USE_DICT_VERSIONS
137  #define CYTHON_USE_DICT_VERSIONS 0
138  #undef CYTHON_USE_EXC_INFO_STACK
139  #define CYTHON_USE_EXC_INFO_STACK 0
140 #elif defined(PYSTON_VERSION)
141  #define CYTHON_COMPILING_IN_PYPY 0
142  #define CYTHON_COMPILING_IN_PYSTON 1
143  #define CYTHON_COMPILING_IN_CPYTHON 0
144  #ifndef CYTHON_USE_TYPE_SLOTS
145  #define CYTHON_USE_TYPE_SLOTS 1
146  #endif
147  #undef CYTHON_USE_PYTYPE_LOOKUP
148  #define CYTHON_USE_PYTYPE_LOOKUP 0
149  #undef CYTHON_USE_ASYNC_SLOTS
150  #define CYTHON_USE_ASYNC_SLOTS 0
151  #undef CYTHON_USE_PYLIST_INTERNALS
152  #define CYTHON_USE_PYLIST_INTERNALS 0
153  #ifndef CYTHON_USE_UNICODE_INTERNALS
154  #define CYTHON_USE_UNICODE_INTERNALS 1
155  #endif
156  #undef CYTHON_USE_UNICODE_WRITER
157  #define CYTHON_USE_UNICODE_WRITER 0
158  #undef CYTHON_USE_PYLONG_INTERNALS
159  #define CYTHON_USE_PYLONG_INTERNALS 0
160  #ifndef CYTHON_AVOID_BORROWED_REFS
161  #define CYTHON_AVOID_BORROWED_REFS 0
162  #endif
163  #ifndef CYTHON_ASSUME_SAFE_MACROS
164  #define CYTHON_ASSUME_SAFE_MACROS 1
165  #endif
166  #ifndef CYTHON_UNPACK_METHODS
167  #define CYTHON_UNPACK_METHODS 1
168  #endif
169  #undef CYTHON_FAST_THREAD_STATE
170  #define CYTHON_FAST_THREAD_STATE 0
171  #undef CYTHON_FAST_PYCALL
172  #define CYTHON_FAST_PYCALL 0
173  #undef CYTHON_PEP489_MULTI_PHASE_INIT
174  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
175  #undef CYTHON_USE_TP_FINALIZE
176  #define CYTHON_USE_TP_FINALIZE 0
177  #undef CYTHON_USE_DICT_VERSIONS
178  #define CYTHON_USE_DICT_VERSIONS 0
179  #undef CYTHON_USE_EXC_INFO_STACK
180  #define CYTHON_USE_EXC_INFO_STACK 0
181 #else
182  #define CYTHON_COMPILING_IN_PYPY 0
183  #define CYTHON_COMPILING_IN_PYSTON 0
184  #define CYTHON_COMPILING_IN_CPYTHON 1
185  #ifndef CYTHON_USE_TYPE_SLOTS
186  #define CYTHON_USE_TYPE_SLOTS 1
187  #endif
188  #if PY_VERSION_HEX < 0x02070000
189  #undef CYTHON_USE_PYTYPE_LOOKUP
190  #define CYTHON_USE_PYTYPE_LOOKUP 0
191  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
192  #define CYTHON_USE_PYTYPE_LOOKUP 1
193  #endif
194  #if PY_MAJOR_VERSION < 3
195  #undef CYTHON_USE_ASYNC_SLOTS
196  #define CYTHON_USE_ASYNC_SLOTS 0
197  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
198  #define CYTHON_USE_ASYNC_SLOTS 1
199  #endif
200  #if PY_VERSION_HEX < 0x02070000
201  #undef CYTHON_USE_PYLONG_INTERNALS
202  #define CYTHON_USE_PYLONG_INTERNALS 0
203  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
204  #define CYTHON_USE_PYLONG_INTERNALS 1
205  #endif
206  #ifndef CYTHON_USE_PYLIST_INTERNALS
207  #define CYTHON_USE_PYLIST_INTERNALS 1
208  #endif
209  #ifndef CYTHON_USE_UNICODE_INTERNALS
210  #define CYTHON_USE_UNICODE_INTERNALS 1
211  #endif
212  #if PY_VERSION_HEX < 0x030300F0
213  #undef CYTHON_USE_UNICODE_WRITER
214  #define CYTHON_USE_UNICODE_WRITER 0
215  #elif !defined(CYTHON_USE_UNICODE_WRITER)
216  #define CYTHON_USE_UNICODE_WRITER 1
217  #endif
218  #ifndef CYTHON_AVOID_BORROWED_REFS
219  #define CYTHON_AVOID_BORROWED_REFS 0
220  #endif
221  #ifndef CYTHON_ASSUME_SAFE_MACROS
222  #define CYTHON_ASSUME_SAFE_MACROS 1
223  #endif
224  #ifndef CYTHON_UNPACK_METHODS
225  #define CYTHON_UNPACK_METHODS 1
226  #endif
227  #ifndef CYTHON_FAST_THREAD_STATE
228  #define CYTHON_FAST_THREAD_STATE 1
229  #endif
230  #ifndef CYTHON_FAST_PYCALL
231  #define CYTHON_FAST_PYCALL 1
232  #endif
233  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
234  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
235  #endif
236  #ifndef CYTHON_USE_TP_FINALIZE
237  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
238  #endif
239  #ifndef CYTHON_USE_DICT_VERSIONS
240  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
241  #endif
242  #ifndef CYTHON_USE_EXC_INFO_STACK
243  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
244  #endif
245 #endif
246 #if !defined(CYTHON_FAST_PYCCALL)
247 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
248 #endif
249 #if CYTHON_USE_PYLONG_INTERNALS
250  #include "longintrepr.h"
251  #undef SHIFT
252  #undef BASE
253  #undef MASK
254  #ifdef SIZEOF_VOID_P
255  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
256  #endif
257 #endif
258 #ifndef __has_attribute
259  #define __has_attribute(x) 0
260 #endif
261 #ifndef __has_cpp_attribute
262  #define __has_cpp_attribute(x) 0
263 #endif
264 #ifndef CYTHON_RESTRICT
265  #if defined(__GNUC__)
266  #define CYTHON_RESTRICT __restrict__
267  #elif defined(_MSC_VER) && _MSC_VER >= 1400
268  #define CYTHON_RESTRICT __restrict
269  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
270  #define CYTHON_RESTRICT restrict
271  #else
272  #define CYTHON_RESTRICT
273  #endif
274 #endif
275 #ifndef CYTHON_UNUSED
276 # if defined(__GNUC__)
277 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
278 # define CYTHON_UNUSED __attribute__ ((__unused__))
279 # else
280 # define CYTHON_UNUSED
281 # endif
282 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
283 # define CYTHON_UNUSED __attribute__ ((__unused__))
284 # else
285 # define CYTHON_UNUSED
286 # endif
287 #endif
288 #ifndef CYTHON_MAYBE_UNUSED_VAR
289 # if defined(__cplusplus)
290  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
291 # else
292 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
293 # endif
294 #endif
295 #ifndef CYTHON_NCP_UNUSED
296 # if CYTHON_COMPILING_IN_CPYTHON
297 # define CYTHON_NCP_UNUSED
298 # else
299 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
300 # endif
301 #endif
302 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
303 #ifdef _MSC_VER
304  #ifndef _MSC_STDINT_H_
305  #if _MSC_VER < 1300
306  typedef unsigned char uint8_t;
307  typedef unsigned int uint32_t;
308  #else
309  typedef unsigned __int8 uint8_t;
310  typedef unsigned __int32 uint32_t;
311  #endif
312  #endif
313 #else
314  #include <stdint.h>
315 #endif
316 #ifndef CYTHON_FALLTHROUGH
317  #if defined(__cplusplus) && __cplusplus >= 201103L
318  #if __has_cpp_attribute(fallthrough)
319  #define CYTHON_FALLTHROUGH [[fallthrough]]
320  #elif __has_cpp_attribute(clang::fallthrough)
321  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
322  #elif __has_cpp_attribute(gnu::fallthrough)
323  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
324  #endif
325  #endif
326  #ifndef CYTHON_FALLTHROUGH
327  #if __has_attribute(fallthrough)
328  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
329  #else
330  #define CYTHON_FALLTHROUGH
331  #endif
332  #endif
333  #if defined(__clang__ ) && defined(__apple_build_version__)
334  #if __apple_build_version__ < 7000000
335  #undef CYTHON_FALLTHROUGH
336  #define CYTHON_FALLTHROUGH
337  #endif
338  #endif
339 #endif
340 
341 #ifndef __cplusplus
342  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
343 #endif
344 #ifndef CYTHON_INLINE
345  #if defined(__clang__)
346  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
347  #else
348  #define CYTHON_INLINE inline
349  #endif
350 #endif
351 template<typename T>
352 void __Pyx_call_destructor(T& x) {
353  x.~T();
354 }
355 template<typename T>
356 class __Pyx_FakeReference {
357  public:
358  __Pyx_FakeReference() : ptr(NULL) { }
359  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
360  T *operator->() { return ptr; }
361  T *operator&() { return ptr; }
362  operator T&() { return *ptr; }
363  template<typename U> bool operator ==(U other) { return *ptr == other; }
364  template<typename U> bool operator !=(U other) { return *ptr != other; }
365  private:
366  T *ptr;
367 };
368 
369 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
370  #define Py_OptimizeFlag 0
371 #endif
372 #define __PYX_BUILD_PY_SSIZE_T "n"
373 #define CYTHON_FORMAT_SSIZE_T "z"
374 #if PY_MAJOR_VERSION < 3
375  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
376  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
377  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
378  #define __Pyx_DefaultClassType PyClass_Type
379 #else
380  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
381 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
382  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
383  PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
384 #else
385  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
386  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
387 #endif
388  #define __Pyx_DefaultClassType PyType_Type
389 #endif
390 #ifndef Py_TPFLAGS_CHECKTYPES
391  #define Py_TPFLAGS_CHECKTYPES 0
392 #endif
393 #ifndef Py_TPFLAGS_HAVE_INDEX
394  #define Py_TPFLAGS_HAVE_INDEX 0
395 #endif
396 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
397  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
398 #endif
399 #ifndef Py_TPFLAGS_HAVE_FINALIZE
400  #define Py_TPFLAGS_HAVE_FINALIZE 0
401 #endif
402 #ifndef METH_STACKLESS
403  #define METH_STACKLESS 0
404 #endif
405 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
406  #ifndef METH_FASTCALL
407  #define METH_FASTCALL 0x80
408  #endif
409  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
410  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
411  Py_ssize_t nargs, PyObject *kwnames);
412 #else
413  #define __Pyx_PyCFunctionFast _PyCFunctionFast
414  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
415 #endif
416 #if CYTHON_FAST_PYCCALL
417 #define __Pyx_PyFastCFunction_Check(func)\
418  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
419 #else
420 #define __Pyx_PyFastCFunction_Check(func) 0
421 #endif
422 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
423  #define PyObject_Malloc(s) PyMem_Malloc(s)
424  #define PyObject_Free(p) PyMem_Free(p)
425  #define PyObject_Realloc(p) PyMem_Realloc(p)
426 #endif
427 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
428  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
429  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
430  #define PyMem_RawFree(p) PyMem_Free(p)
431 #endif
432 #if CYTHON_COMPILING_IN_PYSTON
433  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
434  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
435 #else
436  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
437  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
438 #endif
439 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
440  #define __Pyx_PyThreadState_Current PyThreadState_GET()
441 #elif PY_VERSION_HEX >= 0x03060000
442  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
443 #elif PY_VERSION_HEX >= 0x03000000
444  #define __Pyx_PyThreadState_Current PyThreadState_GET()
445 #else
446  #define __Pyx_PyThreadState_Current _PyThreadState_Current
447 #endif
448 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
449 #include "pythread.h"
450 #define Py_tss_NEEDS_INIT 0
451 typedef int Py_tss_t;
452 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
453  *key = PyThread_create_key();
454  return 0;
455 }
456 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
457  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
458  *key = Py_tss_NEEDS_INIT;
459  return key;
460 }
461 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
462  PyObject_Free(key);
463 }
464 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
465  return *key != Py_tss_NEEDS_INIT;
466 }
467 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
468  PyThread_delete_key(*key);
469  *key = Py_tss_NEEDS_INIT;
470 }
471 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
472  return PyThread_set_key_value(*key, value);
473 }
474 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
475  return PyThread_get_key_value(*key);
476 }
477 #endif
478 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
479 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
480 #else
481 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
482 #endif
483 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
484  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
485  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
486 #else
487  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
488  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
489 #endif
490 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
491 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
492 #else
493 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
494 #endif
495 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
496  #define CYTHON_PEP393_ENABLED 1
497  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
498  0 : _PyUnicode_Ready((PyObject *)(op)))
499  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
500  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
501  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
502  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
503  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
504  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
505  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
506  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
507 #else
508  #define CYTHON_PEP393_ENABLED 0
509  #define PyUnicode_1BYTE_KIND 1
510  #define PyUnicode_2BYTE_KIND 2
511  #define PyUnicode_4BYTE_KIND 4
512  #define __Pyx_PyUnicode_READY(op) (0)
513  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
514  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
515  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
516  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
517  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
518  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
519  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
520  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
521 #endif
522 #if CYTHON_COMPILING_IN_PYPY
523  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
524  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
525 #else
526  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
527  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
528  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
529 #endif
530 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
531  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
532 #endif
533 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
534  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
535 #endif
536 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
537  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
538 #endif
539 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
540 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
541 #if PY_MAJOR_VERSION >= 3
542  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
543 #else
544  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
545 #endif
546 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
547  #define PyObject_ASCII(o) PyObject_Repr(o)
548 #endif
549 #if PY_MAJOR_VERSION >= 3
550  #define PyBaseString_Type PyUnicode_Type
551  #define PyStringObject PyUnicodeObject
552  #define PyString_Type PyUnicode_Type
553  #define PyString_Check PyUnicode_Check
554  #define PyString_CheckExact PyUnicode_CheckExact
555  #define PyObject_Unicode PyObject_Str
556 #endif
557 #if PY_MAJOR_VERSION >= 3
558  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
559  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
560 #else
561  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
562  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
563 #endif
564 #ifndef PySet_CheckExact
565  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
566 #endif
567 #if CYTHON_ASSUME_SAFE_MACROS
568  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
569 #else
570  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
571 #endif
572 #if PY_MAJOR_VERSION >= 3
573  #define PyIntObject PyLongObject
574  #define PyInt_Type PyLong_Type
575  #define PyInt_Check(op) PyLong_Check(op)
576  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
577  #define PyInt_FromString PyLong_FromString
578  #define PyInt_FromUnicode PyLong_FromUnicode
579  #define PyInt_FromLong PyLong_FromLong
580  #define PyInt_FromSize_t PyLong_FromSize_t
581  #define PyInt_FromSsize_t PyLong_FromSsize_t
582  #define PyInt_AsLong PyLong_AsLong
583  #define PyInt_AS_LONG PyLong_AS_LONG
584  #define PyInt_AsSsize_t PyLong_AsSsize_t
585  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
586  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
587  #define PyNumber_Int PyNumber_Long
588 #endif
589 #if PY_MAJOR_VERSION >= 3
590  #define PyBoolObject PyLongObject
591 #endif
592 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
593  #ifndef PyUnicode_InternFromString
594  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
595  #endif
596 #endif
597 #if PY_VERSION_HEX < 0x030200A4
598  typedef long Py_hash_t;
599  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
600  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
601 #else
602  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
603  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
604 #endif
605 #if PY_MAJOR_VERSION >= 3
606  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
607 #else
608  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
609 #endif
610 #if CYTHON_USE_ASYNC_SLOTS
611  #if PY_VERSION_HEX >= 0x030500B1
612  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
613  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
614  #else
615  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
616  #endif
617 #else
618  #define __Pyx_PyType_AsAsync(obj) NULL
619 #endif
620 #ifndef __Pyx_PyAsyncMethodsStruct
621  typedef struct {
622  unaryfunc am_await;
623  unaryfunc am_aiter;
624  unaryfunc am_anext;
625  } __Pyx_PyAsyncMethodsStruct;
626 #endif
627 
628 #if defined(WIN32) || defined(MS_WINDOWS)
629  #define _USE_MATH_DEFINES
630 #endif
631 #include <math.h>
632 #ifdef NAN
633 #define __PYX_NAN() ((float) NAN)
634 #else
635 static CYTHON_INLINE float __PYX_NAN() {
636  float value;
637  memset(&value, 0xFF, sizeof(value));
638  return value;
639 }
640 #endif
641 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
642 #define __Pyx_truncl trunc
643 #else
644 #define __Pyx_truncl truncl
645 #endif
646 
647 
648 #define __PYX_ERR(f_index, lineno, Ln_error) \
649 { \
650  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
651 }
652 
653 #ifndef __PYX_EXTERN_C
654  #ifdef __cplusplus
655  #define __PYX_EXTERN_C extern "C"
656  #else
657  #define __PYX_EXTERN_C extern
658  #endif
659 #endif
660 
661 #define __PYX_HAVE__PyClical
662 #define __PYX_HAVE_API__PyClical
663 /* Early includes */
664 #include "ios"
665 #include "new"
666 #include "stdexcept"
667 #include "typeinfo"
668 #include <vector>
669 #include "PyClical.h"
670 #ifdef _OPENMP
671 #include <omp.h>
672 #endif /* _OPENMP */
673 
674 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
675 #define CYTHON_WITHOUT_ASSERTIONS
676 #endif
677 
678 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
679  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
680 
681 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
682 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
683 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
684 #define __PYX_DEFAULT_STRING_ENCODING ""
685 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
686 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
687 #define __Pyx_uchar_cast(c) ((unsigned char)c)
688 #define __Pyx_long_cast(x) ((long)x)
689 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
690  (sizeof(type) < sizeof(Py_ssize_t)) ||\
691  (sizeof(type) > sizeof(Py_ssize_t) &&\
692  likely(v < (type)PY_SSIZE_T_MAX ||\
693  v == (type)PY_SSIZE_T_MAX) &&\
694  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
695  v == (type)PY_SSIZE_T_MIN))) ||\
696  (sizeof(type) == sizeof(Py_ssize_t) &&\
697  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
698  v == (type)PY_SSIZE_T_MAX))) )
699 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
700  return (size_t) i < (size_t) limit;
701 }
702 #if defined (__cplusplus) && __cplusplus >= 201103L
703  #include <cstdlib>
704  #define __Pyx_sst_abs(value) std::abs(value)
705 #elif SIZEOF_INT >= SIZEOF_SIZE_T
706  #define __Pyx_sst_abs(value) abs(value)
707 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
708  #define __Pyx_sst_abs(value) labs(value)
709 #elif defined (_MSC_VER)
710  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
711 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
712  #define __Pyx_sst_abs(value) llabs(value)
713 #elif defined (__GNUC__)
714  #define __Pyx_sst_abs(value) __builtin_llabs(value)
715 #else
716  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
717 #endif
718 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
719 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
720 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
721 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
722 #define __Pyx_PyBytes_FromString PyBytes_FromString
723 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
724 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
725 #if PY_MAJOR_VERSION < 3
726  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
727  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
728 #else
729  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
730  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
731 #endif
732 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
733 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
734 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
735 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
736 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
737 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
738 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
739 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
740 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
741 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
742 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
743 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
744 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
745 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
746 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
747 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
748 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
749  const Py_UNICODE *u_end = u;
750  while (*u_end++) ;
751  return (size_t)(u_end - u - 1);
752 }
753 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
754 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
755 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
756 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
757 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
758 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
759 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
760 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
761 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
762 #define __Pyx_PySequence_Tuple(obj)\
763  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
764 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
765 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
766 #if CYTHON_ASSUME_SAFE_MACROS
767 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
768 #else
769 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
770 #endif
771 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
772 #if PY_MAJOR_VERSION >= 3
773 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
774 #else
775 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
776 #endif
777 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
778 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
779 static int __Pyx_sys_getdefaultencoding_not_ascii;
780 static int __Pyx_init_sys_getdefaultencoding_params(void) {
781  PyObject* sys;
782  PyObject* default_encoding = NULL;
783  PyObject* ascii_chars_u = NULL;
784  PyObject* ascii_chars_b = NULL;
785  const char* default_encoding_c;
786  sys = PyImport_ImportModule("sys");
787  if (!sys) goto bad;
788  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
789  Py_DECREF(sys);
790  if (!default_encoding) goto bad;
791  default_encoding_c = PyBytes_AsString(default_encoding);
792  if (!default_encoding_c) goto bad;
793  if (strcmp(default_encoding_c, "ascii") == 0) {
794  __Pyx_sys_getdefaultencoding_not_ascii = 0;
795  } else {
796  char ascii_chars[128];
797  int c;
798  for (c = 0; c < 128; c++) {
799  ascii_chars[c] = c;
800  }
801  __Pyx_sys_getdefaultencoding_not_ascii = 1;
802  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
803  if (!ascii_chars_u) goto bad;
804  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
805  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
806  PyErr_Format(
807  PyExc_ValueError,
808  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
809  default_encoding_c);
810  goto bad;
811  }
812  Py_DECREF(ascii_chars_u);
813  Py_DECREF(ascii_chars_b);
814  }
815  Py_DECREF(default_encoding);
816  return 0;
817 bad:
818  Py_XDECREF(default_encoding);
819  Py_XDECREF(ascii_chars_u);
820  Py_XDECREF(ascii_chars_b);
821  return -1;
822 }
823 #endif
824 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
825 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
826 #else
827 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
828 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
829 static char* __PYX_DEFAULT_STRING_ENCODING;
830 static int __Pyx_init_sys_getdefaultencoding_params(void) {
831  PyObject* sys;
832  PyObject* default_encoding = NULL;
833  char* default_encoding_c;
834  sys = PyImport_ImportModule("sys");
835  if (!sys) goto bad;
836  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
837  Py_DECREF(sys);
838  if (!default_encoding) goto bad;
839  default_encoding_c = PyBytes_AsString(default_encoding);
840  if (!default_encoding_c) goto bad;
841  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
842  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
843  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
844  Py_DECREF(default_encoding);
845  return 0;
846 bad:
847  Py_XDECREF(default_encoding);
848  return -1;
849 }
850 #endif
851 #endif
852 
853 
854 /* Test for GCC > 2.95 */
855 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
856  #define likely(x) __builtin_expect(!!(x), 1)
857  #define unlikely(x) __builtin_expect(!!(x), 0)
858 #else /* !__GNUC__ or GCC < 2.95 */
859  #define likely(x) (x)
860  #define unlikely(x) (x)
861 #endif /* __GNUC__ */
862 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
863 
864 static PyObject *__pyx_m = NULL;
865 static PyObject *__pyx_d;
866 static PyObject *__pyx_b;
867 static PyObject *__pyx_cython_runtime = NULL;
868 static PyObject *__pyx_empty_tuple;
869 static PyObject *__pyx_empty_bytes;
870 static PyObject *__pyx_empty_unicode;
871 static int __pyx_lineno;
872 static int __pyx_clineno = 0;
873 static const char * __pyx_cfilenm= __FILE__;
874 static const char *__pyx_filename;
875 
876 
877 static const char *__pyx_f[] = {
878  "PyClical.pyx",
879  "stringsource",
880 };
881 
882 /*--- Type declarations ---*/
883 struct __pyx_obj_8PyClical_index_set;
884 struct __pyx_obj_8PyClical_clifford;
885 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
886 struct __pyx_opt_args_8PyClical_sqrt;
887 struct __pyx_opt_args_8PyClical_log;
888 struct __pyx_opt_args_8PyClical_cos;
889 struct __pyx_opt_args_8PyClical_acos;
890 struct __pyx_opt_args_8PyClical_acosh;
891 struct __pyx_opt_args_8PyClical_sin;
892 struct __pyx_opt_args_8PyClical_asin;
893 struct __pyx_opt_args_8PyClical_asinh;
894 struct __pyx_opt_args_8PyClical_tan;
895 struct __pyx_opt_args_8PyClical_atan;
896 struct __pyx_opt_args_8PyClical_atanh;
897 struct __pyx_opt_args_8PyClical_random_clifford;
898 
899 /* "PyClical.pyx":1542
900  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
901  *
902  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
903  * """
904  * Square root of multivector with optional complexifier.
905  */
906 struct __pyx_opt_args_8PyClical_sqrt {
907  int __pyx_n;
908  PyObject *i;
909 };
910 
911 /* "PyClical.pyx":1579
912  * return clifford().wrap( glucat.exp(toClifford(obj)) )
913  *
914  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
915  * """
916  * Natural logarithm of multivector with optional complexifier.
917  */
918 struct __pyx_opt_args_8PyClical_log {
919  int __pyx_n;
920  PyObject *i;
921 };
922 
923 /* "PyClical.pyx":1602
924  * return clifford().wrap( glucat.log(toClifford(obj)) )
925  *
926  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
927  * """
928  * Cosine of multivector with optional complexifier.
929  */
930 struct __pyx_opt_args_8PyClical_cos {
931  int __pyx_n;
932  PyObject *i;
933 };
934 
935 /* "PyClical.pyx":1619
936  * return clifford().wrap( glucat.cos(toClifford(obj)) )
937  *
938  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
939  * """
940  * Inverse cosine of multivector with optional complexifier.
941  */
942 struct __pyx_opt_args_8PyClical_acos {
943  int __pyx_n;
944  PyObject *i;
945 };
946 
947 /* "PyClical.pyx":1656
948  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
949  *
950  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
951  * """
952  * Inverse hyperbolic cosine of multivector with optional complexifier.
953  */
954 struct __pyx_opt_args_8PyClical_acosh {
955  int __pyx_n;
956  PyObject *i;
957 };
958 
959 /* "PyClical.pyx":1679
960  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
961  *
962  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
963  * """
964  * Sine of multivector with optional complexifier.
965  */
966 struct __pyx_opt_args_8PyClical_sin {
967  int __pyx_n;
968  PyObject *i;
969 };
970 
971 /* "PyClical.pyx":1698
972  * return clifford().wrap( glucat.sin(toClifford(obj)) )
973  *
974  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
975  * """
976  * Inverse sine of multivector with optional complexifier.
977  */
978 struct __pyx_opt_args_8PyClical_asin {
979  int __pyx_n;
980  PyObject *i;
981 };
982 
983 /* "PyClical.pyx":1733
984  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
985  *
986  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
987  * """
988  * Inverse hyperbolic sine of multivector with optional complexifier.
989  */
990 struct __pyx_opt_args_8PyClical_asinh {
991  int __pyx_n;
992  PyObject *i;
993 };
994 
995 /* "PyClical.pyx":1752
996  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
997  *
998  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
999  * """
1000  * Tangent of multivector with optional complexifier.
1001  */
1002 struct __pyx_opt_args_8PyClical_tan {
1003  int __pyx_n;
1004  PyObject *i;
1005 };
1006 
1007 /* "PyClical.pyx":1769
1008  * return clifford().wrap( glucat.tan(toClifford(obj)) )
1009  *
1010  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
1011  * """
1012  * Inverse tangent of multivector with optional complexifier.
1013  */
1014 struct __pyx_opt_args_8PyClical_atan {
1015  int __pyx_n;
1016  PyObject *i;
1017 };
1018 
1019 /* "PyClical.pyx":1798
1020  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
1021  *
1022  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
1023  * """
1024  * Inverse hyperbolic tangent of multivector with optional complexifier.
1025  */
1026 struct __pyx_opt_args_8PyClical_atanh {
1027  int __pyx_n;
1028  PyObject *i;
1029 };
1030 
1031 /* "PyClical.pyx":1815
1032  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
1033  *
1034  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
1035  * """
1036  * Random multivector within a frame.
1037  */
1038 struct __pyx_opt_args_8PyClical_random_clifford {
1039  int __pyx_n;
1040  PyObject *fill;
1041 };
1042 
1043 /* "PyClical.pyx":37
1044  *
1045  * # Forward reference
1046  * cdef class index_set # <<<<<<<<<<<<<<
1047  *
1048  * cdef inline IndexSet toIndexSet(obj):
1049  */
1050 struct __pyx_obj_8PyClical_index_set {
1051  PyObject_HEAD
1052  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1053  IndexSet *instance;
1054 };
1055 
1056 
1057 /* "PyClical.pyx":530
1058  *
1059  * # Forward reference.
1060  * cdef class clifford # <<<<<<<<<<<<<<
1061  *
1062  * cdef inline Clifford toClifford(obj):
1063  */
1064 struct __pyx_obj_8PyClical_clifford {
1065  PyObject_HEAD
1066  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1067  Clifford *instance;
1068 };
1069 
1070 
1071 /* "PyClical.pyx":227
1072  * return self.instance.getitem(idx)
1073  *
1074  * def __iter__(self): # <<<<<<<<<<<<<<
1075  * """
1076  * Iterate over the indices of an index_set.
1077  */
1078 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1079  PyObject_HEAD
1080  PyObject *__pyx_v_idx;
1081  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1082  PyObject *__pyx_t_0;
1083  Py_ssize_t __pyx_t_1;
1084  PyObject *(*__pyx_t_2)(PyObject *);
1085 };
1086 
1087 
1088 
1089 /* "PyClical.pyx":45
1090  * return index_set(obj).instance[0]
1091  *
1092  * cdef class index_set: # <<<<<<<<<<<<<<
1093  * """
1094  * Python class index_set wraps C++ class IndexSet.
1095  */
1096 
1097 struct __pyx_vtabstruct_8PyClical_index_set {
1098  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1099  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1100  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1101 };
1102 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1103 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1104 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1105 
1106 
1107 /* "PyClical.pyx":535
1108  * return clifford(obj).instance[0]
1109  *
1110  * cdef class clifford: # <<<<<<<<<<<<<<
1111  * """
1112  * Python class clifford wraps C++ class Clifford.
1113  */
1114 
1115 struct __pyx_vtabstruct_8PyClical_clifford {
1116  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1117  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1118  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1119 };
1120 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1121 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1122 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1123 
1124 /* --- Runtime support code (head) --- */
1125 /* Refnanny.proto */
1126 #ifndef CYTHON_REFNANNY
1127  #define CYTHON_REFNANNY 0
1128 #endif
1129 #if CYTHON_REFNANNY
1130  typedef struct {
1131  void (*INCREF)(void*, PyObject*, int);
1132  void (*DECREF)(void*, PyObject*, int);
1133  void (*GOTREF)(void*, PyObject*, int);
1134  void (*GIVEREF)(void*, PyObject*, int);
1135  void* (*SetupContext)(const char*, int, const char*);
1136  void (*FinishContext)(void**);
1137  } __Pyx_RefNannyAPIStruct;
1138  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1139  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1140  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1141 #ifdef WITH_THREAD
1142  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1143  if (acquire_gil) {\
1144  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1145  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1146  PyGILState_Release(__pyx_gilstate_save);\
1147  } else {\
1148  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1149  }
1150 #else
1151  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1152  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1153 #endif
1154  #define __Pyx_RefNannyFinishContext()\
1155  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1156  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1157  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1158  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1159  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1160  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1161  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1162  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1163  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1164 #else
1165  #define __Pyx_RefNannyDeclarations
1166  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1167  #define __Pyx_RefNannyFinishContext()
1168  #define __Pyx_INCREF(r) Py_INCREF(r)
1169  #define __Pyx_DECREF(r) Py_DECREF(r)
1170  #define __Pyx_GOTREF(r)
1171  #define __Pyx_GIVEREF(r)
1172  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1173  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1174  #define __Pyx_XGOTREF(r)
1175  #define __Pyx_XGIVEREF(r)
1176 #endif
1177 #define __Pyx_XDECREF_SET(r, v) do {\
1178  PyObject *tmp = (PyObject *) r;\
1179  r = v; __Pyx_XDECREF(tmp);\
1180  } while (0)
1181 #define __Pyx_DECREF_SET(r, v) do {\
1182  PyObject *tmp = (PyObject *) r;\
1183  r = v; __Pyx_DECREF(tmp);\
1184  } while (0)
1185 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1186 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1187 
1188 /* PyObjectGetAttrStr.proto */
1189 #if CYTHON_USE_TYPE_SLOTS
1190 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1191 #else
1192 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1193 #endif
1194 
1195 /* GetBuiltinName.proto */
1196 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1197 
1198 /* PyCFunctionFastCall.proto */
1199 #if CYTHON_FAST_PYCCALL
1200 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1201 #else
1202 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1203 #endif
1204 
1205 /* PyFunctionFastCall.proto */
1206 #if CYTHON_FAST_PYCALL
1207 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1208  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1209 #if 1 || PY_VERSION_HEX < 0x030600B1
1210 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1211 #else
1212 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1213 #endif
1214 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1215  (sizeof(char [1 - 2*!(cond)]) - 1)
1216 #ifndef Py_MEMBER_SIZE
1217 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1218 #endif
1219  static size_t __pyx_pyframe_localsplus_offset = 0;
1220  #include "frameobject.h"
1221  #define __Pxy_PyFrame_Initialize_Offsets()\
1222  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1223  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1224  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1225  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1226 #endif
1227 
1228 /* PyObjectCall.proto */
1229 #if CYTHON_COMPILING_IN_CPYTHON
1230 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1231 #else
1232 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1233 #endif
1234 
1235 /* PyObjectCallMethO.proto */
1236 #if CYTHON_COMPILING_IN_CPYTHON
1237 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1238 #endif
1239 
1240 /* PyObjectCallOneArg.proto */
1241 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1242 
1243 /* PyThreadStateGet.proto */
1244 #if CYTHON_FAST_THREAD_STATE
1245 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1246 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1247 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1248 #else
1249 #define __Pyx_PyThreadState_declare
1250 #define __Pyx_PyThreadState_assign
1251 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1252 #endif
1253 
1254 /* PyErrFetchRestore.proto */
1255 #if CYTHON_FAST_THREAD_STATE
1256 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1257 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1258 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1259 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1260 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1261 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1262 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1263 #if CYTHON_COMPILING_IN_CPYTHON
1264 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1265 #else
1266 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1267 #endif
1268 #else
1269 #define __Pyx_PyErr_Clear() PyErr_Clear()
1270 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1271 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1272 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1273 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1274 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1275 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1276 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1277 #endif
1278 
1279 /* WriteUnraisableException.proto */
1280 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1281  int lineno, const char *filename,
1282  int full_traceback, int nogil);
1283 
1284 /* PyDictVersioning.proto */
1285 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
1286 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
1287 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
1288 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
1289  (version_var) = __PYX_GET_DICT_VERSION(dict);\
1290  (cache_var) = (value);
1291 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
1292  static PY_UINT64_T __pyx_dict_version = 0;\
1293  static PyObject *__pyx_dict_cached_value = NULL;\
1294  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
1295  (VAR) = __pyx_dict_cached_value;\
1296  } else {\
1297  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
1298  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
1299  }\
1300 }
1301 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
1302 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
1303 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
1304 #else
1305 #define __PYX_GET_DICT_VERSION(dict) (0)
1306 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
1307 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
1308 #endif
1309 
1310 /* PyObjectCallNoArg.proto */
1311 #if CYTHON_COMPILING_IN_CPYTHON
1312 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1313 #else
1314 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1315 #endif
1316 
1317 /* RaiseDoubleKeywords.proto */
1318 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1319 
1320 /* ParseKeywords.proto */
1321 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1322  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1323  const char* function_name);
1324 
1325 /* RaiseArgTupleInvalid.proto */
1326 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1327  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1328 
1329 /* GetModuleGlobalName.proto */
1330 #if CYTHON_USE_DICT_VERSIONS
1331 #define __Pyx_GetModuleGlobalName(var, name) {\
1332  static PY_UINT64_T __pyx_dict_version = 0;\
1333  static PyObject *__pyx_dict_cached_value = NULL;\
1334  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1335  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1336  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1337 }
1338 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1339  PY_UINT64_T __pyx_dict_version;\
1340  PyObject *__pyx_dict_cached_value;\
1341  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1342 }
1343 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1344 #else
1345 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1346 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1347 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1348 #endif
1349 
1350 /* GetTopmostException.proto */
1351 #if CYTHON_USE_EXC_INFO_STACK
1352 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1353 #endif
1354 
1355 /* SaveResetException.proto */
1356 #if CYTHON_FAST_THREAD_STATE
1357 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1358 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1359 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1360 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1361 #else
1362 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1363 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1364 #endif
1365 
1366 /* PyErrExceptionMatches.proto */
1367 #if CYTHON_FAST_THREAD_STATE
1368 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1369 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1370 #else
1371 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1372 #endif
1373 
1374 /* GetException.proto */
1375 #if CYTHON_FAST_THREAD_STATE
1376 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1377 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1378 #else
1379 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1380 #endif
1381 
1382 /* RaiseException.proto */
1383 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1384 
1385 /* PyIntBinop.proto */
1386 #if !CYTHON_COMPILING_IN_PYPY
1387 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
1388 #else
1389 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
1390  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1391 #endif
1392 
1393 /* PySequenceContains.proto */
1394 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1395  int result = PySequence_Contains(seq, item);
1396  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1397 }
1398 
1399 /* SetItemInt.proto */
1400 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1401  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1402  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1403  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1404  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1405 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1406 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1407  int is_list, int wraparound, int boundscheck);
1408 
1409 /* PyObjectCall2Args.proto */
1410 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1411 
1412 /* ArgTypeTest.proto */
1413 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1414  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1415  __Pyx__ArgTypeTest(obj, type, name, exact))
1416 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1417 
1418 /* Import.proto */
1419 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1420 
1421 /* IncludeStringH.proto */
1422 #include <string.h>
1423 
1424 /* PyObject_GenericGetAttrNoDict.proto */
1425 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1426 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1427 #else
1428 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1429 #endif
1430 
1431 /* PyObject_GenericGetAttr.proto */
1432 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1433 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1434 #else
1435 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1436 #endif
1437 
1438 /* SetVTable.proto */
1439 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1440 
1441 /* SetupReduce.proto */
1442 static int __Pyx_setup_reduce(PyObject* type_obj);
1443 
1444 /* PyFloatBinop.proto */
1445 #if !CYTHON_COMPILING_IN_PYPY
1446 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
1447 #else
1448 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
1449  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1450  #endif
1451 
1452 /* BytesEquals.proto */
1453 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1454 
1455 /* UnicodeEquals.proto */
1456 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1457 
1458 /* StrEquals.proto */
1459 #if PY_MAJOR_VERSION >= 3
1460 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1461 #else
1462 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1463 #endif
1464 
1465 /* CLineInTraceback.proto */
1466 #ifdef CYTHON_CLINE_IN_TRACEBACK
1467 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1468 #else
1469 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1470 #endif
1471 
1472 /* CodeObjectCache.proto */
1473 typedef struct {
1474  PyCodeObject* code_object;
1475  int code_line;
1476 } __Pyx_CodeObjectCacheEntry;
1477 struct __Pyx_CodeObjectCache {
1478  int count;
1479  int max_count;
1480  __Pyx_CodeObjectCacheEntry* entries;
1481 };
1482 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1483 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1484 static PyCodeObject *__pyx_find_code_object(int code_line);
1485 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1486 
1487 /* AddTraceback.proto */
1488 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1489  int py_line, const char *filename);
1490 
1491 /* CppExceptionConversion.proto */
1492 #ifndef __Pyx_CppExn2PyErr
1493 #include <new>
1494 #include <typeinfo>
1495 #include <stdexcept>
1496 #include <ios>
1497 static void __Pyx_CppExn2PyErr() {
1498  try {
1499  if (PyErr_Occurred())
1500  ; // let the latest Python exn pass through and ignore the current one
1501  else
1502  throw;
1503  } catch (const std::bad_alloc& exn) {
1504  PyErr_SetString(PyExc_MemoryError, exn.what());
1505  } catch (const std::bad_cast& exn) {
1506  PyErr_SetString(PyExc_TypeError, exn.what());
1507  } catch (const std::bad_typeid& exn) {
1508  PyErr_SetString(PyExc_TypeError, exn.what());
1509  } catch (const std::domain_error& exn) {
1510  PyErr_SetString(PyExc_ValueError, exn.what());
1511  } catch (const std::invalid_argument& exn) {
1512  PyErr_SetString(PyExc_ValueError, exn.what());
1513  } catch (const std::ios_base::failure& exn) {
1514  PyErr_SetString(PyExc_IOError, exn.what());
1515  } catch (const std::out_of_range& exn) {
1516  PyErr_SetString(PyExc_IndexError, exn.what());
1517  } catch (const std::overflow_error& exn) {
1518  PyErr_SetString(PyExc_OverflowError, exn.what());
1519  } catch (const std::range_error& exn) {
1520  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1521  } catch (const std::underflow_error& exn) {
1522  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1523  } catch (const std::exception& exn) {
1524  PyErr_SetString(PyExc_RuntimeError, exn.what());
1525  }
1526  catch (...)
1527  {
1528  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1529  }
1530 }
1531 #endif
1532 
1533 /* CIntToPy.proto */
1534 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1535 
1536 /* CIntFromPy.proto */
1537 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1538 
1539 /* CIntToPy.proto */
1540 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1541 
1542 /* CIntFromPy.proto */
1543 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1544 
1545 /* FastTypeChecks.proto */
1546 #if CYTHON_COMPILING_IN_CPYTHON
1547 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1548 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1549 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1550 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1551 #else
1552 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1553 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1554 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1555 #endif
1556 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1557 
1558 /* FetchCommonType.proto */
1559 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1560 
1561 /* SwapException.proto */
1562 #if CYTHON_FAST_THREAD_STATE
1563 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1564 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1565 #else
1566 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1567 #endif
1568 
1569 /* PyObjectGetMethod.proto */
1570 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
1571 
1572 /* PyObjectCallMethod1.proto */
1573 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1574 
1575 /* CoroutineBase.proto */
1576 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1577 #if CYTHON_USE_EXC_INFO_STACK
1578 #define __Pyx_ExcInfoStruct _PyErr_StackItem
1579 #else
1580 typedef struct {
1581  PyObject *exc_type;
1582  PyObject *exc_value;
1583  PyObject *exc_traceback;
1584 } __Pyx_ExcInfoStruct;
1585 #endif
1586 typedef struct {
1587  PyObject_HEAD
1588  __pyx_coroutine_body_t body;
1589  PyObject *closure;
1590  __Pyx_ExcInfoStruct gi_exc_state;
1591  PyObject *gi_weakreflist;
1592  PyObject *classobj;
1593  PyObject *yieldfrom;
1594  PyObject *gi_name;
1595  PyObject *gi_qualname;
1596  PyObject *gi_modulename;
1597  PyObject *gi_code;
1598  int resume_label;
1599  char is_running;
1600 } __pyx_CoroutineObject;
1601 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1602  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1603  PyObject *name, PyObject *qualname, PyObject *module_name);
1604 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1605  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1606  PyObject *name, PyObject *qualname, PyObject *module_name);
1607 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
1608 static int __Pyx_Coroutine_clear(PyObject *self);
1609 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1610 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1611 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1612 #if CYTHON_USE_EXC_INFO_STACK
1613 #define __Pyx_Coroutine_SwapException(self)
1614 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
1615 #else
1616 #define __Pyx_Coroutine_SwapException(self) {\
1617  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
1618  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
1619  }
1620 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1621  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
1622  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
1623  }
1624 #endif
1625 #if CYTHON_FAST_THREAD_STATE
1626 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1627  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1628 #else
1629 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1630  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1631 #endif
1632 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1633 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
1634 
1635 /* PatchModuleWithCoroutine.proto */
1636 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1637 
1638 /* PatchGeneratorABC.proto */
1639 static int __Pyx_patch_abc(void);
1640 
1641 /* Generator.proto */
1642 #define __Pyx_Generator_USED
1643 static PyTypeObject *__pyx_GeneratorType = 0;
1644 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1645 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1646  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1647 static PyObject *__Pyx_Generator_Next(PyObject *self);
1648 static int __pyx_Generator_init(void);
1649 
1650 /* CheckBinaryVersion.proto */
1651 static int __Pyx_check_binary_version(void);
1652 
1653 /* InitStrings.proto */
1654 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1655 
1656 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1657 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1658 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1659 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1660 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1661 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1662 
1663 /* Module declarations from 'libcpp.vector' */
1664 
1665 /* Module declarations from 'glucat' */
1666 
1667 /* Module declarations from 'PyClical' */
1668 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1669 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1670 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1671 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1672 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1673 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1674 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1675 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1676 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1677 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1678 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1679 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1680 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1681 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1682 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1683 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1684 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1685 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1686 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1687 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1688 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1689 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1690 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1691 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1692 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1693 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1694 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1695 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1696 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1697 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1698 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1699 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1700 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1701 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1702 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1703 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1704 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1705 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1706 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1707 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1708 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1709 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*/
1710 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1711 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1712 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1713 #define __Pyx_MODULE_NAME "PyClical"
1714 extern int __pyx_module_is_main_PyClical;
1715 int __pyx_module_is_main_PyClical = 0;
1716 
1717 /* Implementation of 'PyClical' */
1718 static PyObject *__pyx_builtin_IndexError;
1719 static PyObject *__pyx_builtin_RuntimeError;
1720 static PyObject *__pyx_builtin_TypeError;
1721 static PyObject *__pyx_builtin_ValueError;
1722 static PyObject *__pyx_builtin_NotImplemented;
1723 static PyObject *__pyx_builtin_range;
1724 static PyObject *__pyx_builtin_xrange;
1725 static const char __pyx_k_[] = ".";
1726 static const char __pyx_k_e[] = "e";
1727 static const char __pyx_k_i[] = "i";
1728 static const char __pyx_k_m[] = "m";
1729 static const char __pyx_k_p[] = "p";
1730 static const char __pyx_k_q[] = "q";
1731 static const char __pyx_k__2[] = " ";
1732 static const char __pyx_k__5[] = ":";
1733 static const char __pyx_k__6[] = "\n\t";
1734 static const char __pyx_k__7[] = " (";
1735 static const char __pyx_k__8[] = ", ";
1736 static const char __pyx_k__9[] = ").";
1737 static const char __pyx_k_cl[] = "cl";
1738 static const char __pyx_k_pi[] = "pi";
1739 static const char __pyx_k_cos[] = "cos";
1740 static const char __pyx_k_exp[] = "exp";
1741 static const char __pyx_k_frm[] = "frm";
1742 static const char __pyx_k_inv[] = "inv";
1743 static const char __pyx_k_ist[] = "ist";
1744 static const char __pyx_k_ixt[] = "ixt";
1745 static const char __pyx_k_lhs[] = "lhs";
1746 static const char __pyx_k_log[] = "log";
1747 static const char __pyx_k_max[] = "max";
1748 static const char __pyx_k_min[] = "min";
1749 static const char __pyx_k_obj[] = "obj";
1750 static const char __pyx_k_odd[] = "odd";
1751 static const char __pyx_k_pow[] = "pow";
1752 static const char __pyx_k_rhs[] = "rhs";
1753 static const char __pyx_k_sin[] = "sin";
1754 static const char __pyx_k_tan[] = "tan";
1755 static const char __pyx_k_tau[] = "tau";
1756 static const char __pyx_k_Real[] = "Real";
1757 static const char __pyx_k_acos[] = "acos";
1758 static const char __pyx_k_args[] = "args";
1759 static const char __pyx_k_asin[] = "asin";
1760 static const char __pyx_k_atan[] = "atan";
1761 static const char __pyx_k_conj[] = "conj";
1762 static const char __pyx_k_copy[] = "copy";
1763 static const char __pyx_k_cosh[] = "cosh";
1764 static const char __pyx_k_even[] = "even";
1765 static const char __pyx_k_fill[] = "fill";
1766 static const char __pyx_k_from[] = " from ";
1767 static const char __pyx_k_iter[] = "__iter__";
1768 static const char __pyx_k_main[] = "__main__";
1769 static const char __pyx_k_math[] = "math";
1770 static const char __pyx_k_name[] = "__name__";
1771 static const char __pyx_k_norm[] = "norm";
1772 static const char __pyx_k_pure[] = "pure";
1773 static const char __pyx_k_quad[] = "quad";
1774 static const char __pyx_k_send[] = "send";
1775 static const char __pyx_k_sinh[] = "sinh";
1776 static const char __pyx_k_sqrt[] = "sqrt";
1777 static const char __pyx_k_tanh[] = "tanh";
1778 static const char __pyx_k_test[] = "_test";
1779 static const char __pyx_k_0_8_2[] = "0.8.2";
1780 static const char __pyx_k_acosh[] = "acosh";
1781 static const char __pyx_k_asinh[] = "asinh";
1782 static const char __pyx_k_atanh[] = "atanh";
1783 static const char __pyx_k_close[] = "close";
1784 static const char __pyx_k_grade[] = "grade";
1785 static const char __pyx_k_istpq[] = "istpq";
1786 static const char __pyx_k_nbar3[] = "nbar3";
1787 static const char __pyx_k_ninf3[] = "ninf3";
1788 static const char __pyx_k_other[] = "other";
1789 static const char __pyx_k_range[] = "range";
1790 static const char __pyx_k_throw[] = "throw";
1791 static const char __pyx_k_using[] = " using (";
1792 static const char __pyx_k_value[] = " value ";
1793 static const char __pyx_k_import[] = "__import__";
1794 static const char __pyx_k_reduce[] = "__reduce__";
1795 static const char __pyx_k_scalar[] = "scalar";
1796 static const char __pyx_k_test_2[] = "__test__";
1797 static const char __pyx_k_xrange[] = "xrange";
1798 static const char __pyx_k_doctest[] = "doctest";
1799 static const char __pyx_k_invalid[] = " invalid ";
1800 static const char __pyx_k_numbers[] = "numbers";
1801 static const char __pyx_k_reverse[] = "reverse";
1802 static const char __pyx_k_testmod[] = "testmod";
1803 static const char __pyx_k_version[] = "__version__";
1804 static const char __pyx_k_Integral[] = "Integral";
1805 static const char __pyx_k_PyClical[] = "PyClical";
1806 static const char __pyx_k_Sequence[] = "Sequence";
1807 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1808 static const char __pyx_k_clifford[] = "clifford";
1809 static const char __pyx_k_getstate[] = "__getstate__";
1810 static const char __pyx_k_involute[] = "involute";
1811 static const char __pyx_k_setstate[] = "__setstate__";
1812 static const char __pyx_k_to_frame[] = " to frame ";
1813 static const char __pyx_k_TypeError[] = "TypeError";
1814 static const char __pyx_k_index_set[] = "index_set";
1815 static const char __pyx_k_outer_pow[] = "outer_pow";
1816 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1817 static const char __pyx_k_IndexError[] = "IndexError";
1818 static const char __pyx_k_ValueError[] = "ValueError";
1819 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1820 static const char __pyx_k_collections[] = "collections";
1821 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1822 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1823 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1824 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1825 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1826 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1827 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1828 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1829 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1830 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1831 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1832 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1833 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1834 static const char __pyx_k_using_invalid[] = " using invalid ";
1835 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1836 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1837 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1838 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1839 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1840 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1841 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1842 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1843 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1844 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1845 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1846 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1847 static const char __pyx_k_invalid_string[] = " invalid string ";
1848 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1849 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1850 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1851 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1852 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1853 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1854 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1855 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1856 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1857 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1858 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1859 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1860 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1861 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1862 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1863 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1864 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1865 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1866 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1867 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1868 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1869 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1870 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1871 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1872 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1873 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1874 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1875 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1876 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1877 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1878 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1879 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1880 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1881 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1882 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1883 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1884 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1885 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1886 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1887 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1888 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1889 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1890 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1891 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1892 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1893 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1894 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1895 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1896 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1897 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1898 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1899 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1900 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1901 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1902 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1903 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1904 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1905 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1906 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1907 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1908 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1909 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1910 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1911 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1912 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1913 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1914 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1915 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1916 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1917 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1918 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1919 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1920 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1921 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1922 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1923 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1924 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1925 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1926 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1927 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1928 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1929 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1930 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1931 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1932 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1933 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1934 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1935 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1936 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1937 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 ";
1938 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 ";
1939 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 ";
1940 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 ";
1941 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 ";
1942 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 ";
1943 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 ";
1944 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 ";
1945 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 ";
1946 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 ";
1947 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 ";
1948 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 ";
1949 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 ";
1950 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 ";
1951 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 ";
1952 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 ";
1953 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 ";
1954 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 ";
1955 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 ";
1956 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 ";
1957 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 ";
1958 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1959 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1960 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1961 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 ";
1962 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 ";
1963 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 ";
1964 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 ";
1965 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 ";
1966 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 ";
1967 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 ";
1968 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 ";
1969 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 ";
1970 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 ";
1971 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 ";
1972 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 ";
1973 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 ";
1974 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 ";
1975 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 ";
1976 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 ";
1977 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 ";
1978 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 ";
1979 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 ";
1980 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 ";
1981 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 ";
1982 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 ";
1983 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 ";
1984 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 ";
1985 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 ";
1986 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 ";
1987 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 ";
1988 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 ";
1989 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 ";
1990 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 ";
1991 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 ";
1992 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 ";
1993 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 ";
1994 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 ";
1995 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 ";
1996 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 ";
1997 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 ";
1998 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 ";
1999 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 ";
2000 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 ";
2001 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 ";
2002 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 ";
2003 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 ";
2004 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 ";
2005 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 ";
2006 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 ";
2007 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 ";
2008 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 ";
2009 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 ";
2010 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 ";
2011 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 ";
2012 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 ";
2013 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 ";
2014 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 ";
2015 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 ";
2016 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 ";
2017 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 ";
2018 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 ";
2019 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 ";
2020 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 ";
2021 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 ";
2022 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 ";
2023 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 ";
2024 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 ";
2025 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 ";
2026 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 ";
2027 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 ";
2028 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 ";
2029  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 ";
2030  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 ";
2031  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
2032  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 ";
2033  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
2034  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 ";
2035  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
2036  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
2037  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 ";
2038  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 ";
2039  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 ";
2040  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 ";
2041  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 ";
2042  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
2043  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
2044  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
2045  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2046  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 ";
2047  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 ";
2048  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 ";
2049  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 ";
2050  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 ";
2051  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 ";
2052  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 ";
2053  static PyObject *__pyx_kp_s_;
2054  static PyObject *__pyx_kp_s_0_8_2;
2055  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
2056  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
2057  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
2058  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
2059  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
2060  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
2061  static PyObject *__pyx_kp_s_Cannot_reframe;
2062  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
2063  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
2064  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
2065  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
2066  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
2067  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
2068  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
2069  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
2070  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
2071  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
2072  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
2073  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
2074  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
2075  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
2076  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
2077  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
2078  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
2079  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
2080  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
2081  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
2082  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
2083  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
2084  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
2085  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
2086  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
2087  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
2088  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
2089  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
2090  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
2091  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
2092  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
2093  static PyObject *__pyx_n_s_IndexError;
2094  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
2095  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
2096  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
2097  static PyObject *__pyx_n_s_Integral;
2098  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
2099  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
2100  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
2101  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
2102  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
2103  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
2104  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
2105  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
2106  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
2107  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
2108  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
2109  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
2110  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
2111  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
2112  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
2113  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
2114  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
2115  static PyObject *__pyx_n_s_NotImplemented;
2116  static PyObject *__pyx_kp_s_Not_applicable;
2117  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
2118  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2119  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2120  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2121  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2122  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2123  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2124  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2125  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2126  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2127  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2128  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2129  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2130  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2131  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2132  static PyObject *__pyx_n_s_PyClical;
2133  static PyObject *__pyx_kp_s_PyClical_pyx;
2134  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2135  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2136  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2137  static PyObject *__pyx_n_s_Real;
2138  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2139  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2140  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2141  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2142  static PyObject *__pyx_n_s_RuntimeError;
2143  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2144  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2145  static PyObject *__pyx_n_s_Sequence;
2146  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2147  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2148  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2149  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2150  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2151  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2152  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2153  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2154  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2155  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2156  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2157  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2158  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2159  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2160  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2161  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2162  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2163  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2164  static PyObject *__pyx_kp_u_The_informal_string_representat;
2165  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2166  static PyObject *__pyx_kp_u_The_official_string_representat;
2167  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2168  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2169  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2170  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2171  static PyObject *__pyx_n_s_TypeError;
2172  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2173  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2174  static PyObject *__pyx_n_s_ValueError;
2175  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2176  static PyObject *__pyx_kp_s__2;
2177  static PyObject *__pyx_kp_s__5;
2178  static PyObject *__pyx_kp_s__6;
2179  static PyObject *__pyx_kp_s__7;
2180  static PyObject *__pyx_kp_s__8;
2181  static PyObject *__pyx_kp_s__9;
2182  static PyObject *__pyx_kp_u_abs_line_1473;
2183  static PyObject *__pyx_n_s_acos;
2184  static PyObject *__pyx_kp_u_acos_line_1619;
2185  static PyObject *__pyx_n_s_acosh;
2186  static PyObject *__pyx_kp_u_acosh_line_1656;
2187  static PyObject *__pyx_kp_u_agc3_line_1844;
2188  static PyObject *__pyx_n_s_args;
2189  static PyObject *__pyx_kp_s_as_frame;
2190  static PyObject *__pyx_n_s_asin;
2191  static PyObject *__pyx_kp_u_asin_line_1698;
2192  static PyObject *__pyx_n_s_asinh;
2193  static PyObject *__pyx_kp_u_asinh_line_1733;
2194  static PyObject *__pyx_n_s_atan;
2195  static PyObject *__pyx_kp_u_atan_line_1769;
2196  static PyObject *__pyx_n_s_atanh;
2197  static PyObject *__pyx_kp_u_atanh_line_1798;
2198  static PyObject *__pyx_kp_u_cga3_line_1824;
2199  static PyObject *__pyx_kp_u_cga3std_line_1833;
2200  static PyObject *__pyx_n_s_cl;
2201  static PyObject *__pyx_n_s_clifford;
2202  static PyObject *__pyx_kp_u_clifford___add___line_739;
2203  static PyObject *__pyx_kp_u_clifford___and___line_835;
2204  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2205  static PyObject *__pyx_kp_u_clifford___div___line_895;
2206  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2207  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2208  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2209  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2210  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2211  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2212  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2213  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2214  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2215  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2216  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2217  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2218  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2219  static PyObject *__pyx_kp_u_clifford___or___line_938;
2220  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2221  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2222  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2223  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2224  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2225  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2226  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2227  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2228  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2229  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2230  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2231  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2232  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2233  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2234  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2235  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2236  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2237  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2238  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2239  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2240  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2241  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2242  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2243  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2244  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2245  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2246  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2247  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2248  static PyObject *__pyx_n_s_cline_in_traceback;
2249  static PyObject *__pyx_n_s_close;
2250  static PyObject *__pyx_n_s_collections;
2251  static PyObject *__pyx_kp_u_compare_line_490;
2252  static PyObject *__pyx_kp_u_complexifier_line_1527;
2253  static PyObject *__pyx_n_s_conj;
2254  static PyObject *__pyx_kp_u_conj_line_1436;
2255  static PyObject *__pyx_n_s_copy;
2256  static PyObject *__pyx_n_s_cos;
2257  static PyObject *__pyx_kp_u_cos_line_1602;
2258  static PyObject *__pyx_n_s_cosh;
2259  static PyObject *__pyx_kp_u_cosh_line_1640;
2260  static PyObject *__pyx_n_s_doctest;
2261  static PyObject *__pyx_n_s_e;
2262  static PyObject *__pyx_kp_u_e_line_1887;
2263  static PyObject *__pyx_n_s_even;
2264  static PyObject *__pyx_kp_u_even_line_1388;
2265  static PyObject *__pyx_n_s_exp;
2266  static PyObject *__pyx_kp_u_exp_line_1565;
2267  static PyObject *__pyx_n_s_fill;
2268  static PyObject *__pyx_n_s_frm;
2269  static PyObject *__pyx_kp_s_from;
2270  static PyObject *__pyx_n_s_getstate;
2271  static PyObject *__pyx_n_s_grade;
2272  static PyObject *__pyx_n_s_i;
2273  static PyObject *__pyx_kp_u_imag_line_1366;
2274  static PyObject *__pyx_n_s_import;
2275  static PyObject *__pyx_n_s_index_set;
2276  static PyObject *__pyx_kp_u_index_set___and___line_269;
2277  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2278  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2279  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2280  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2281  static PyObject *__pyx_n_s_index_set___iter;
2282  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2283  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2284  static PyObject *__pyx_kp_u_index_set___or___line_291;
2285  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2286  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2287  static PyObject *__pyx_kp_u_index_set___str___line_393;
2288  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2289  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2290  static PyObject *__pyx_kp_u_index_set_count_line_313;
2291  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2292  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2293  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2294  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2295  static PyObject *__pyx_kp_u_index_set_max_line_349;
2296  static PyObject *__pyx_kp_u_index_set_min_line_340;
2297  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2298  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2299  static PyObject *__pyx_n_s_inv;
2300  static PyObject *__pyx_kp_u_inv_line_1329;
2301  static PyObject *__pyx_kp_s_invalid;
2302  static PyObject *__pyx_kp_s_invalid_string;
2303  static PyObject *__pyx_n_s_involute;
2304  static PyObject *__pyx_kp_u_involute_line_1406;
2305  static PyObject *__pyx_n_s_ist;
2306  static PyObject *__pyx_n_s_istpq;
2307  static PyObject *__pyx_kp_u_istpq_line_1900;
2308  static PyObject *__pyx_n_s_iter;
2309  static PyObject *__pyx_n_s_ixt;
2310  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2311  static PyObject *__pyx_n_s_lhs;
2312  static PyObject *__pyx_n_s_log;
2313  static PyObject *__pyx_kp_u_log_line_1579;
2314  static PyObject *__pyx_n_s_m;
2315  static PyObject *__pyx_n_s_main;
2316  static PyObject *__pyx_n_s_math;
2317  static PyObject *__pyx_n_s_max;
2318  static PyObject *__pyx_kp_u_max_abs_line_1482;
2319  static PyObject *__pyx_kp_u_max_pos_line_511;
2320  static PyObject *__pyx_n_s_min;
2321  static PyObject *__pyx_kp_u_min_neg_line_502;
2322  static PyObject *__pyx_n_s_name;
2323  static PyObject *__pyx_n_s_nbar3;
2324  static PyObject *__pyx_n_s_ninf3;
2325  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2326  static PyObject *__pyx_n_s_norm;
2327  static PyObject *__pyx_kp_u_norm_line_1462;
2328  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2329  static PyObject *__pyx_n_s_numbers;
2330  static PyObject *__pyx_n_s_obj;
2331  static PyObject *__pyx_n_s_odd;
2332  static PyObject *__pyx_kp_u_odd_line_1397;
2333  static PyObject *__pyx_n_s_other;
2334  static PyObject *__pyx_n_s_outer_pow;
2335  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2336  static PyObject *__pyx_n_s_p;
2337  static PyObject *__pyx_n_s_pi;
2338  static PyObject *__pyx_n_s_pow;
2339  static PyObject *__pyx_kp_u_pow_line_1494;
2340  static PyObject *__pyx_n_s_pure;
2341  static PyObject *__pyx_kp_u_pure_line_1377;
2342  static PyObject *__pyx_n_s_pyx_vtable;
2343  static PyObject *__pyx_n_s_q;
2344  static PyObject *__pyx_n_s_quad;
2345  static PyObject *__pyx_kp_u_quad_line_1451;
2346  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2347  static PyObject *__pyx_n_s_range;
2348  static PyObject *__pyx_kp_u_real_line_1355;
2349  static PyObject *__pyx_n_s_reduce;
2350  static PyObject *__pyx_n_s_reduce_cython;
2351  static PyObject *__pyx_n_s_reduce_ex;
2352  static PyObject *__pyx_n_s_reverse;
2353  static PyObject *__pyx_kp_u_reverse_line_1421;
2354  static PyObject *__pyx_n_s_rhs;
2355  static PyObject *__pyx_n_s_scalar;
2356  static PyObject *__pyx_kp_u_scalar_line_1344;
2357  static PyObject *__pyx_n_s_send;
2358  static PyObject *__pyx_n_s_setstate;
2359  static PyObject *__pyx_n_s_setstate_cython;
2360  static PyObject *__pyx_n_s_sin;
2361  static PyObject *__pyx_kp_u_sin_line_1679;
2362  static PyObject *__pyx_n_s_sinh;
2363  static PyObject *__pyx_kp_u_sinh_line_1719;
2364  static PyObject *__pyx_n_s_sqrt;
2365  static PyObject *__pyx_kp_u_sqrt_line_1542;
2366  static PyObject *__pyx_n_s_tan;
2367  static PyObject *__pyx_kp_u_tan_line_1752;
2368  static PyObject *__pyx_n_s_tanh;
2369  static PyObject *__pyx_kp_u_tanh_line_1786;
2370  static PyObject *__pyx_n_s_tau;
2371  static PyObject *__pyx_n_s_test;
2372  static PyObject *__pyx_n_s_test_2;
2373  static PyObject *__pyx_n_s_testmod;
2374  static PyObject *__pyx_n_s_throw;
2375  static PyObject *__pyx_kp_s_to_frame;
2376  static PyObject *__pyx_kp_s_using;
2377  static PyObject *__pyx_kp_s_using_invalid;
2378  static PyObject *__pyx_kp_s_value;
2379  static PyObject *__pyx_n_s_version;
2380  static PyObject *__pyx_n_s_xrange;
2381 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2382 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2383 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2384 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 */
2385 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 */
2386 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2387 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2388 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2389 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2390 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2391 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2392 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2393 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2394 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2395 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2396 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2397 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2398 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2399 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2400 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2401 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2402 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2403 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2404 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2405 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2406 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2407 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 */
2408 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2409 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2410 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2411 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2412 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2413 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 */
2414 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2415 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 */
2416 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2417 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2418 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 */
2419 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2420 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2421 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2422 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2423 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2424 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2425 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2426 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2427 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2428 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2429 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2430 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2431 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2432 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2433 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2434 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2435 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2436 #endif
2437 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2438 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2439 #endif
2440 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2441 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2442 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2443 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2444 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2445 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2446 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2447 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2448 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2449 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2450 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2451 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2452 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2453 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2454 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2455 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2456 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2457 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2458 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2459 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2460 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2461 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2462 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2463 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2464 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2465 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 */
2466 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2467 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2468 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2469 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2470 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2471 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2472 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2473 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2474 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2475 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2476 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2477 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2478 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2479 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2480 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2481 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2482 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2483 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2484 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2485 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2486 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2487 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2488 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2489 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2490 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2491 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2492 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2493 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2494 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2495 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2496 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2497 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2498 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2499 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 */
2500 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2501 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2502 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2503 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2504 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2505 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2506 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2507 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2508 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2509 static PyObject *__pyx_float_0_0;
2510 static PyObject *__pyx_float_1_0;
2511 static PyObject *__pyx_float_2_0;
2512 static PyObject *__pyx_float_8_0;
2513 static PyObject *__pyx_int_0;
2514 static PyObject *__pyx_int_1;
2515 static PyObject *__pyx_int_4;
2516 static PyObject *__pyx_int_neg_1;
2517 static PyObject *__pyx_tuple__3;
2518 static PyObject *__pyx_tuple__4;
2519 static PyObject *__pyx_tuple__10;
2520 static PyObject *__pyx_tuple__11;
2521 static PyObject *__pyx_tuple__12;
2522 static PyObject *__pyx_tuple__15;
2523 static PyObject *__pyx_tuple__16;
2524 static PyObject *__pyx_tuple__18;
2525 static PyObject *__pyx_tuple__20;
2526 static PyObject *__pyx_tuple__21;
2527 static PyObject *__pyx_tuple__22;
2528 static PyObject *__pyx_codeobj__13;
2529 static PyObject *__pyx_codeobj__14;
2530 static PyObject *__pyx_codeobj__17;
2531 static PyObject *__pyx_codeobj__19;
2532 static PyObject *__pyx_codeobj__23;
2533 /* Late includes */
2534 
2535 /* "PyClical.pyx":39
2536  * cdef class index_set
2537  *
2538  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2539  * """
2540  * Return the C++ IndexSet instance wrapped by index_set(obj).
2541  */
2542 
2543 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2544  IndexSet __pyx_r;
2545  __Pyx_RefNannyDeclarations
2546  PyObject *__pyx_t_1 = NULL;
2547  __Pyx_RefNannySetupContext("toIndexSet", 0);
2548 
2549  /* "PyClical.pyx":43
2550  * Return the C++ IndexSet instance wrapped by index_set(obj).
2551  * """
2552  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2553  *
2554  * cdef class index_set:
2555  */
2556  __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)
2557  __Pyx_GOTREF(__pyx_t_1);
2558  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2559  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2560  goto __pyx_L0;
2561 
2562  /* "PyClical.pyx":39
2563  * cdef class index_set
2564  *
2565  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2566  * """
2567  * Return the C++ IndexSet instance wrapped by index_set(obj).
2568  */
2569 
2570  /* function exit code */
2571  __pyx_L1_error:;
2572  __Pyx_XDECREF(__pyx_t_1);
2573  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2574  __Pyx_pretend_to_initialize(&__pyx_r);
2575  __pyx_L0:;
2576  __Pyx_RefNannyFinishContext();
2577  return __pyx_r;
2578 }
2579 
2580 /* "PyClical.pyx":51
2581  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2582  *
2583  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2584  * """
2585  * Wrap an instance of the C++ class IndexSet.
2586  */
2587 
2588 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2589  PyObject *__pyx_r = NULL;
2590  __Pyx_RefNannyDeclarations
2591  __Pyx_RefNannySetupContext("wrap", 0);
2592 
2593  /* "PyClical.pyx":55
2594  * Wrap an instance of the C++ class IndexSet.
2595  * """
2596  * self.instance[0] = other # <<<<<<<<<<<<<<
2597  * return self
2598  *
2599  */
2600  (__pyx_v_self->instance[0]) = __pyx_v_other;
2601 
2602  /* "PyClical.pyx":56
2603  * """
2604  * self.instance[0] = other
2605  * return self # <<<<<<<<<<<<<<
2606  *
2607  * cdef inline IndexSet unwrap(index_set self):
2608  */
2609  __Pyx_XDECREF(__pyx_r);
2610  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2611  __pyx_r = ((PyObject *)__pyx_v_self);
2612  goto __pyx_L0;
2613 
2614  /* "PyClical.pyx":51
2615  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2616  *
2617  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2618  * """
2619  * Wrap an instance of the C++ class IndexSet.
2620  */
2621 
2622  /* function exit code */
2623  __pyx_L0:;
2624  __Pyx_XGIVEREF(__pyx_r);
2625  __Pyx_RefNannyFinishContext();
2626  return __pyx_r;
2627 }
2628 
2629 /* "PyClical.pyx":58
2630  * return self
2631  *
2632  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2633  * """
2634  * Return the wrapped C++ IndexSet instance.
2635  */
2636 
2637 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2638  IndexSet __pyx_r;
2639  __Pyx_RefNannyDeclarations
2640  __Pyx_RefNannySetupContext("unwrap", 0);
2641 
2642  /* "PyClical.pyx":62
2643  * Return the wrapped C++ IndexSet instance.
2644  * """
2645  * return self.instance[0] # <<<<<<<<<<<<<<
2646  *
2647  * cpdef copy(index_set self):
2648  */
2649  __pyx_r = (__pyx_v_self->instance[0]);
2650  goto __pyx_L0;
2651 
2652  /* "PyClical.pyx":58
2653  * return self
2654  *
2655  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2656  * """
2657  * Return the wrapped C++ IndexSet instance.
2658  */
2659 
2660  /* function exit code */
2661  __pyx_L0:;
2662  __Pyx_RefNannyFinishContext();
2663  return __pyx_r;
2664 }
2665 
2666 /* "PyClical.pyx":64
2667  * return self.instance[0]
2668  *
2669  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2670  * """
2671  * Copy this index_set object.
2672  */
2673 
2674 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2675 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2676  PyObject *__pyx_r = NULL;
2677  __Pyx_RefNannyDeclarations
2678  PyObject *__pyx_t_1 = NULL;
2679  PyObject *__pyx_t_2 = NULL;
2680  PyObject *__pyx_t_3 = NULL;
2681  PyObject *__pyx_t_4 = NULL;
2682  __Pyx_RefNannySetupContext("copy", 0);
2683  /* Check if called by wrapper */
2684  if (unlikely(__pyx_skip_dispatch)) ;
2685  /* Check if overridden in Python */
2686  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
2687  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2688  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2689  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
2690  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2691  #endif
2692  __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)
2693  __Pyx_GOTREF(__pyx_t_1);
2694  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_9index_set_1copy)) {
2695  __Pyx_XDECREF(__pyx_r);
2696  __Pyx_INCREF(__pyx_t_1);
2697  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2698  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2699  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2700  if (likely(__pyx_t_4)) {
2701  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2702  __Pyx_INCREF(__pyx_t_4);
2703  __Pyx_INCREF(function);
2704  __Pyx_DECREF_SET(__pyx_t_3, function);
2705  }
2706  }
2707  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
2708  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2709  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2710  __Pyx_GOTREF(__pyx_t_2);
2711  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2712  __pyx_r = __pyx_t_2;
2713  __pyx_t_2 = 0;
2714  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2715  goto __pyx_L0;
2716  }
2717  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2718  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
2719  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
2720  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
2721  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
2722  }
2723  #endif
2724  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2725  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2726  }
2727  #endif
2728  }
2729 
2730  /* "PyClical.pyx":71
2731  * {1}
2732  * """
2733  * return index_set(self) # <<<<<<<<<<<<<<
2734  *
2735  * def __cinit__(self, other = 0):
2736  */
2737  __Pyx_XDECREF(__pyx_r);
2738  __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)
2739  __Pyx_GOTREF(__pyx_t_1);
2740  __pyx_r = __pyx_t_1;
2741  __pyx_t_1 = 0;
2742  goto __pyx_L0;
2743 
2744  /* "PyClical.pyx":64
2745  * return self.instance[0]
2746  *
2747  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2748  * """
2749  * Copy this index_set object.
2750  */
2751 
2752  /* function exit code */
2753  __pyx_L1_error:;
2754  __Pyx_XDECREF(__pyx_t_1);
2755  __Pyx_XDECREF(__pyx_t_2);
2756  __Pyx_XDECREF(__pyx_t_3);
2757  __Pyx_XDECREF(__pyx_t_4);
2758  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2759  __pyx_r = 0;
2760  __pyx_L0:;
2761  __Pyx_XGIVEREF(__pyx_r);
2762  __Pyx_RefNannyFinishContext();
2763  return __pyx_r;
2764 }
2765 
2766 /* Python wrapper */
2767 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2768 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 ";
2769 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2770  PyObject *__pyx_r = 0;
2771  __Pyx_RefNannyDeclarations
2772  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2773  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2774 
2775  /* function exit code */
2776  __Pyx_RefNannyFinishContext();
2777  return __pyx_r;
2778 }
2779 
2780 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2781  PyObject *__pyx_r = NULL;
2782  __Pyx_RefNannyDeclarations
2783  PyObject *__pyx_t_1 = NULL;
2784  __Pyx_RefNannySetupContext("copy", 0);
2785  __Pyx_XDECREF(__pyx_r);
2786  __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)
2787  __Pyx_GOTREF(__pyx_t_1);
2788  __pyx_r = __pyx_t_1;
2789  __pyx_t_1 = 0;
2790  goto __pyx_L0;
2791 
2792  /* function exit code */
2793  __pyx_L1_error:;
2794  __Pyx_XDECREF(__pyx_t_1);
2795  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2796  __pyx_r = NULL;
2797  __pyx_L0:;
2798  __Pyx_XGIVEREF(__pyx_r);
2799  __Pyx_RefNannyFinishContext();
2800  return __pyx_r;
2801 }
2802 
2803 /* "PyClical.pyx":73
2804  * return index_set(self)
2805  *
2806  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2807  * """
2808  * Construct an object of type index_set.
2809  */
2810 
2811 /* Python wrapper */
2812 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2813 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2814  PyObject *__pyx_v_other = 0;
2815  int __pyx_r;
2816  __Pyx_RefNannyDeclarations
2817  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2818  {
2819  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2820  PyObject* values[1] = {0};
2821  values[0] = ((PyObject *)__pyx_int_0);
2822  if (unlikely(__pyx_kwds)) {
2823  Py_ssize_t kw_args;
2824  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2825  switch (pos_args) {
2826  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2827  CYTHON_FALLTHROUGH;
2828  case 0: break;
2829  default: goto __pyx_L5_argtuple_error;
2830  }
2831  kw_args = PyDict_Size(__pyx_kwds);
2832  switch (pos_args) {
2833  case 0:
2834  if (kw_args > 0) {
2835  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2836  if (value) { values[0] = value; kw_args--; }
2837  }
2838  }
2839  if (unlikely(kw_args > 0)) {
2840  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2841  }
2842  } else {
2843  switch (PyTuple_GET_SIZE(__pyx_args)) {
2844  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2845  CYTHON_FALLTHROUGH;
2846  case 0: break;
2847  default: goto __pyx_L5_argtuple_error;
2848  }
2849  }
2850  __pyx_v_other = values[0];
2851  }
2852  goto __pyx_L4_argument_unpacking_done;
2853  __pyx_L5_argtuple_error:;
2854  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2855  __pyx_L3_error:;
2856  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2857  __Pyx_RefNannyFinishContext();
2858  return -1;
2859  __pyx_L4_argument_unpacking_done:;
2860  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2861 
2862  /* function exit code */
2863  __Pyx_RefNannyFinishContext();
2864  return __pyx_r;
2865 }
2866 
2867 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2868  PyObject *__pyx_v_error_msg_prefix = NULL;
2869  PyObject *__pyx_v_idx = NULL;
2870  int __pyx_r;
2871  __Pyx_RefNannyDeclarations
2872  int __pyx_t_1;
2873  int __pyx_t_2;
2874  IndexSet *__pyx_t_3;
2875  PyObject *__pyx_t_4 = NULL;
2876  PyObject *__pyx_t_5 = NULL;
2877  int __pyx_t_6;
2878  int __pyx_t_7;
2879  PyObject *__pyx_t_8 = NULL;
2880  PyObject *__pyx_t_9 = NULL;
2881  PyObject *__pyx_t_10 = NULL;
2882  Py_ssize_t __pyx_t_11;
2883  PyObject *(*__pyx_t_12)(PyObject *);
2884  PyObject *__pyx_t_13 = NULL;
2885  PyObject *__pyx_t_14 = NULL;
2886  PyObject *__pyx_t_15 = NULL;
2887  PyObject *__pyx_t_16 = NULL;
2888  char *__pyx_t_17;
2889  __Pyx_RefNannySetupContext("__cinit__", 0);
2890 
2891  /* "PyClical.pyx":92
2892  * {}
2893  * """
2894  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2895  * if isinstance(other, index_set):
2896  * self.instance = new IndexSet((<index_set>other).unwrap())
2897  */
2898  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2899  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2900 
2901  /* "PyClical.pyx":93
2902  * """
2903  * error_msg_prefix = "Cannot initialize index_set object from"
2904  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2905  * self.instance = new IndexSet((<index_set>other).unwrap())
2906  * elif isinstance(other, numbers.Integral):
2907  */
2908  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2909  __pyx_t_2 = (__pyx_t_1 != 0);
2910  if (__pyx_t_2) {
2911 
2912  /* "PyClical.pyx":94
2913  * error_msg_prefix = "Cannot initialize index_set object from"
2914  * if isinstance(other, index_set):
2915  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2916  * elif isinstance(other, numbers.Integral):
2917  * self.instance = new IndexSet(<int>other)
2918  */
2919  try {
2920  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2921  } catch(...) {
2922  __Pyx_CppExn2PyErr();
2923  __PYX_ERR(0, 94, __pyx_L1_error)
2924  }
2925  __pyx_v_self->instance = __pyx_t_3;
2926 
2927  /* "PyClical.pyx":93
2928  * """
2929  * error_msg_prefix = "Cannot initialize index_set object from"
2930  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2931  * self.instance = new IndexSet((<index_set>other).unwrap())
2932  * elif isinstance(other, numbers.Integral):
2933  */
2934  goto __pyx_L3;
2935  }
2936 
2937  /* "PyClical.pyx":95
2938  * if isinstance(other, index_set):
2939  * self.instance = new IndexSet((<index_set>other).unwrap())
2940  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2941  * self.instance = new IndexSet(<int>other)
2942  * elif isinstance(other, (set, frozenset)):
2943  */
2944  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2945  __Pyx_GOTREF(__pyx_t_4);
2946  __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)
2947  __Pyx_GOTREF(__pyx_t_5);
2948  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2949  __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)
2950  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2951  __pyx_t_1 = (__pyx_t_2 != 0);
2952  if (__pyx_t_1) {
2953 
2954  /* "PyClical.pyx":96
2955  * self.instance = new IndexSet((<index_set>other).unwrap())
2956  * elif isinstance(other, numbers.Integral):
2957  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2958  * elif isinstance(other, (set, frozenset)):
2959  * try:
2960  */
2961  __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)
2962  try {
2963  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2964  } catch(...) {
2965  __Pyx_CppExn2PyErr();
2966  __PYX_ERR(0, 96, __pyx_L1_error)
2967  }
2968  __pyx_v_self->instance = __pyx_t_3;
2969 
2970  /* "PyClical.pyx":95
2971  * if isinstance(other, index_set):
2972  * self.instance = new IndexSet((<index_set>other).unwrap())
2973  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2974  * self.instance = new IndexSet(<int>other)
2975  * elif isinstance(other, (set, frozenset)):
2976  */
2977  goto __pyx_L3;
2978  }
2979 
2980  /* "PyClical.pyx":97
2981  * elif isinstance(other, numbers.Integral):
2982  * self.instance = new IndexSet(<int>other)
2983  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2984  * try:
2985  * self.instance = new IndexSet()
2986  */
2987  __pyx_t_2 = PySet_Check(__pyx_v_other);
2988  __pyx_t_7 = (__pyx_t_2 != 0);
2989  if (!__pyx_t_7) {
2990  } else {
2991  __pyx_t_1 = __pyx_t_7;
2992  goto __pyx_L4_bool_binop_done;
2993  }
2994  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2995  __pyx_t_2 = (__pyx_t_7 != 0);
2996  __pyx_t_1 = __pyx_t_2;
2997  __pyx_L4_bool_binop_done:;
2998  __pyx_t_2 = (__pyx_t_1 != 0);
2999  if (__pyx_t_2) {
3000 
3001  /* "PyClical.pyx":98
3002  * self.instance = new IndexSet(<int>other)
3003  * elif isinstance(other, (set, frozenset)):
3004  * try: # <<<<<<<<<<<<<<
3005  * self.instance = new IndexSet()
3006  * for idx in other:
3007  */
3008  {
3009  __Pyx_PyThreadState_declare
3010  __Pyx_PyThreadState_assign
3011  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
3012  __Pyx_XGOTREF(__pyx_t_8);
3013  __Pyx_XGOTREF(__pyx_t_9);
3014  __Pyx_XGOTREF(__pyx_t_10);
3015  /*try:*/ {
3016 
3017  /* "PyClical.pyx":99
3018  * elif isinstance(other, (set, frozenset)):
3019  * try:
3020  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
3021  * for idx in other:
3022  * self[idx] = True
3023  */
3024  __pyx_t_3 = new IndexSet();
3025  __pyx_v_self->instance = __pyx_t_3;
3026 
3027  /* "PyClical.pyx":100
3028  * try:
3029  * self.instance = new IndexSet()
3030  * for idx in other: # <<<<<<<<<<<<<<
3031  * self[idx] = True
3032  * except IndexError:
3033  */
3034  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
3035  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
3036  __pyx_t_12 = NULL;
3037  } else {
3038  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
3039  __Pyx_GOTREF(__pyx_t_5);
3040  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
3041  }
3042  for (;;) {
3043  if (likely(!__pyx_t_12)) {
3044  if (likely(PyList_CheckExact(__pyx_t_5))) {
3045  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
3046  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3047  __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)
3048  #else
3049  __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)
3050  __Pyx_GOTREF(__pyx_t_4);
3051  #endif
3052  } else {
3053  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
3054  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3055  __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)
3056  #else
3057  __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)
3058  __Pyx_GOTREF(__pyx_t_4);
3059  #endif
3060  }
3061  } else {
3062  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
3063  if (unlikely(!__pyx_t_4)) {
3064  PyObject* exc_type = PyErr_Occurred();
3065  if (exc_type) {
3066  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3067  else __PYX_ERR(0, 100, __pyx_L6_error)
3068  }
3069  break;
3070  }
3071  __Pyx_GOTREF(__pyx_t_4);
3072  }
3073  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
3074  __pyx_t_4 = 0;
3075 
3076  /* "PyClical.pyx":101
3077  * self.instance = new IndexSet()
3078  * for idx in other:
3079  * self[idx] = True # <<<<<<<<<<<<<<
3080  * except IndexError:
3081  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3082  */
3083  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
3084 
3085  /* "PyClical.pyx":100
3086  * try:
3087  * self.instance = new IndexSet()
3088  * for idx in other: # <<<<<<<<<<<<<<
3089  * self[idx] = True
3090  * except IndexError:
3091  */
3092  }
3093  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3094 
3095  /* "PyClical.pyx":98
3096  * self.instance = new IndexSet(<int>other)
3097  * elif isinstance(other, (set, frozenset)):
3098  * try: # <<<<<<<<<<<<<<
3099  * self.instance = new IndexSet()
3100  * for idx in other:
3101  */
3102  }
3103  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3104  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3105  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3106  goto __pyx_L11_try_end;
3107  __pyx_L6_error:;
3108  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3109  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3110 
3111  /* "PyClical.pyx":102
3112  * for idx in other:
3113  * self[idx] = True
3114  * except IndexError: # <<<<<<<<<<<<<<
3115  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3116  * except (RuntimeError, TypeError):
3117  */
3118  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
3119  if (__pyx_t_6) {
3120  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3121  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
3122  __Pyx_GOTREF(__pyx_t_5);
3123  __Pyx_GOTREF(__pyx_t_4);
3124  __Pyx_GOTREF(__pyx_t_13);
3125 
3126  /* "PyClical.pyx":103
3127  * self[idx] = True
3128  * except IndexError:
3129  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3130  * except (RuntimeError, TypeError):
3131  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3132  */
3133  __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)
3134  __Pyx_GOTREF(__pyx_t_14);
3135  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3136  __Pyx_GOTREF(__pyx_t_15);
3137  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3138  __Pyx_GOTREF(__pyx_t_16);
3139  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3140  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3141  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3142  __Pyx_GOTREF(__pyx_t_15);
3143  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3144  __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)
3145  __Pyx_GOTREF(__pyx_t_16);
3146  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3147  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3148  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3149  __PYX_ERR(0, 103, __pyx_L8_except_error)
3150  }
3151 
3152  /* "PyClical.pyx":104
3153  * except IndexError:
3154  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3155  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3156  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3157  * elif isinstance(other, str):
3158  */
3159  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3160  if (__pyx_t_6) {
3161  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3162  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3163  __Pyx_GOTREF(__pyx_t_13);
3164  __Pyx_GOTREF(__pyx_t_4);
3165  __Pyx_GOTREF(__pyx_t_5);
3166 
3167  /* "PyClical.pyx":105
3168  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3169  * except (RuntimeError, TypeError):
3170  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3171  * elif isinstance(other, str):
3172  * try:
3173  */
3174  __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)
3175  __Pyx_GOTREF(__pyx_t_16);
3176  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3177  __Pyx_GOTREF(__pyx_t_15);
3178  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3179  __Pyx_GOTREF(__pyx_t_14);
3180  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3181  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3182  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3183  __Pyx_GOTREF(__pyx_t_15);
3184  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3185  __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)
3186  __Pyx_GOTREF(__pyx_t_14);
3187  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3188  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3189  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3190  __PYX_ERR(0, 105, __pyx_L8_except_error)
3191  }
3192  goto __pyx_L8_except_error;
3193  __pyx_L8_except_error:;
3194 
3195  /* "PyClical.pyx":98
3196  * self.instance = new IndexSet(<int>other)
3197  * elif isinstance(other, (set, frozenset)):
3198  * try: # <<<<<<<<<<<<<<
3199  * self.instance = new IndexSet()
3200  * for idx in other:
3201  */
3202  __Pyx_XGIVEREF(__pyx_t_8);
3203  __Pyx_XGIVEREF(__pyx_t_9);
3204  __Pyx_XGIVEREF(__pyx_t_10);
3205  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3206  goto __pyx_L1_error;
3207  __pyx_L11_try_end:;
3208  }
3209 
3210  /* "PyClical.pyx":97
3211  * elif isinstance(other, numbers.Integral):
3212  * self.instance = new IndexSet(<int>other)
3213  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3214  * try:
3215  * self.instance = new IndexSet()
3216  */
3217  goto __pyx_L3;
3218  }
3219 
3220  /* "PyClical.pyx":106
3221  * except (RuntimeError, TypeError):
3222  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3223  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3224  * try:
3225  * self.instance = new IndexSet(<char *>other)
3226  */
3227  __pyx_t_2 = PyString_Check(__pyx_v_other);
3228  __pyx_t_1 = (__pyx_t_2 != 0);
3229  if (likely(__pyx_t_1)) {
3230 
3231  /* "PyClical.pyx":107
3232  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3233  * elif isinstance(other, str):
3234  * try: # <<<<<<<<<<<<<<
3235  * self.instance = new IndexSet(<char *>other)
3236  * except RuntimeError:
3237  */
3238  {
3239  __Pyx_PyThreadState_declare
3240  __Pyx_PyThreadState_assign
3241  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3242  __Pyx_XGOTREF(__pyx_t_10);
3243  __Pyx_XGOTREF(__pyx_t_9);
3244  __Pyx_XGOTREF(__pyx_t_8);
3245  /*try:*/ {
3246 
3247  /* "PyClical.pyx":108
3248  * elif isinstance(other, str):
3249  * try:
3250  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3251  * except RuntimeError:
3252  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3253  */
3254  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3255  try {
3256  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3257  } catch(...) {
3258  __Pyx_CppExn2PyErr();
3259  __PYX_ERR(0, 108, __pyx_L18_error)
3260  }
3261  __pyx_v_self->instance = __pyx_t_3;
3262 
3263  /* "PyClical.pyx":107
3264  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3265  * elif isinstance(other, str):
3266  * try: # <<<<<<<<<<<<<<
3267  * self.instance = new IndexSet(<char *>other)
3268  * except RuntimeError:
3269  */
3270  }
3271  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3272  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3273  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3274  goto __pyx_L23_try_end;
3275  __pyx_L18_error:;
3276  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3277  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3278  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3279  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3280  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3281  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3282 
3283  /* "PyClical.pyx":109
3284  * try:
3285  * self.instance = new IndexSet(<char *>other)
3286  * except RuntimeError: # <<<<<<<<<<<<<<
3287  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3288  * else:
3289  */
3290  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3291  if (__pyx_t_6) {
3292  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3293  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3294  __Pyx_GOTREF(__pyx_t_5);
3295  __Pyx_GOTREF(__pyx_t_4);
3296  __Pyx_GOTREF(__pyx_t_13);
3297 
3298  /* "PyClical.pyx":110
3299  * self.instance = new IndexSet(<char *>other)
3300  * except RuntimeError:
3301  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3302  * else:
3303  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3304  */
3305  __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)
3306  __Pyx_GOTREF(__pyx_t_14);
3307  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3308  __Pyx_GOTREF(__pyx_t_15);
3309  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3310  __Pyx_GOTREF(__pyx_t_16);
3311  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3312  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3313  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3314  __Pyx_GOTREF(__pyx_t_15);
3315  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3316  __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)
3317  __Pyx_GOTREF(__pyx_t_16);
3318  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3319  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3320  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3321  __PYX_ERR(0, 110, __pyx_L20_except_error)
3322  }
3323  goto __pyx_L20_except_error;
3324  __pyx_L20_except_error:;
3325 
3326  /* "PyClical.pyx":107
3327  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3328  * elif isinstance(other, str):
3329  * try: # <<<<<<<<<<<<<<
3330  * self.instance = new IndexSet(<char *>other)
3331  * except RuntimeError:
3332  */
3333  __Pyx_XGIVEREF(__pyx_t_10);
3334  __Pyx_XGIVEREF(__pyx_t_9);
3335  __Pyx_XGIVEREF(__pyx_t_8);
3336  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3337  goto __pyx_L1_error;
3338  __pyx_L23_try_end:;
3339  }
3340 
3341  /* "PyClical.pyx":106
3342  * except (RuntimeError, TypeError):
3343  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3344  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3345  * try:
3346  * self.instance = new IndexSet(<char *>other)
3347  */
3348  goto __pyx_L3;
3349  }
3350 
3351  /* "PyClical.pyx":112
3352  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3353  * else:
3354  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3355  *
3356  * def __dealloc__(self):
3357  */
3358  /*else*/ {
3359  __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)
3360  __Pyx_GOTREF(__pyx_t_13);
3361  __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)
3362  __Pyx_GOTREF(__pyx_t_4);
3363  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3364  __Pyx_GOTREF(__pyx_t_5);
3365  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3366  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3367  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3368  __Pyx_GOTREF(__pyx_t_4);
3369  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3370  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3371  __Pyx_GOTREF(__pyx_t_5);
3372  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3373  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3374  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3375  __PYX_ERR(0, 112, __pyx_L1_error)
3376  }
3377  __pyx_L3:;
3378 
3379  /* "PyClical.pyx":73
3380  * return index_set(self)
3381  *
3382  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3383  * """
3384  * Construct an object of type index_set.
3385  */
3386 
3387  /* function exit code */
3388  __pyx_r = 0;
3389  goto __pyx_L0;
3390  __pyx_L1_error:;
3391  __Pyx_XDECREF(__pyx_t_4);
3392  __Pyx_XDECREF(__pyx_t_5);
3393  __Pyx_XDECREF(__pyx_t_13);
3394  __Pyx_XDECREF(__pyx_t_14);
3395  __Pyx_XDECREF(__pyx_t_15);
3396  __Pyx_XDECREF(__pyx_t_16);
3397  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3398  __pyx_r = -1;
3399  __pyx_L0:;
3400  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3401  __Pyx_XDECREF(__pyx_v_idx);
3402  __Pyx_RefNannyFinishContext();
3403  return __pyx_r;
3404 }
3405 
3406 /* "PyClical.pyx":114
3407  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3408  *
3409  * def __dealloc__(self): # <<<<<<<<<<<<<<
3410  * """
3411  * Clean up by deallocating the instance of C++ class IndexSet.
3412  */
3413 
3414 /* Python wrapper */
3415 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3416 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3417  __Pyx_RefNannyDeclarations
3418  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3419  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3420 
3421  /* function exit code */
3422  __Pyx_RefNannyFinishContext();
3423 }
3424 
3425 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3426  __Pyx_RefNannyDeclarations
3427  __Pyx_RefNannySetupContext("__dealloc__", 0);
3428 
3429  /* "PyClical.pyx":118
3430  * Clean up by deallocating the instance of C++ class IndexSet.
3431  * """
3432  * del self.instance # <<<<<<<<<<<<<<
3433  *
3434  * def __richcmp__(lhs, rhs, int op):
3435  */
3436  delete __pyx_v_self->instance;
3437 
3438  /* "PyClical.pyx":114
3439  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3440  *
3441  * def __dealloc__(self): # <<<<<<<<<<<<<<
3442  * """
3443  * Clean up by deallocating the instance of C++ class IndexSet.
3444  */
3445 
3446  /* function exit code */
3447  __Pyx_RefNannyFinishContext();
3448 }
3449 
3450 /* "PyClical.pyx":120
3451  * del self.instance
3452  *
3453  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3454  * """
3455  * Compare two objects of class index_set.
3456  */
3457 
3458 /* Python wrapper */
3459 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3460 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3461  PyObject *__pyx_r = 0;
3462  __Pyx_RefNannyDeclarations
3463  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3464  __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));
3465 
3466  /* function exit code */
3467  __Pyx_RefNannyFinishContext();
3468  return __pyx_r;
3469 }
3470 
3471 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) {
3472  PyObject *__pyx_v_eq = NULL;
3473  PyObject *__pyx_v_lt = NULL;
3474  PyObject *__pyx_r = NULL;
3475  __Pyx_RefNannyDeclarations
3476  int __pyx_t_1;
3477  int __pyx_t_2;
3478  int __pyx_t_3;
3479  PyObject *__pyx_t_4 = NULL;
3480  __Pyx_RefNannySetupContext("__richcmp__", 0);
3481 
3482  /* "PyClical.pyx":141
3483  * False
3484  * """
3485  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3486  * eq = bool(lhs is rhs)
3487  * if op == 2: # ==
3488  */
3489  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3490  __pyx_t_3 = (__pyx_t_2 != 0);
3491  if (!__pyx_t_3) {
3492  } else {
3493  __pyx_t_1 = __pyx_t_3;
3494  goto __pyx_L4_bool_binop_done;
3495  }
3496  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3497  __pyx_t_2 = (__pyx_t_3 != 0);
3498  __pyx_t_1 = __pyx_t_2;
3499  __pyx_L4_bool_binop_done:;
3500  if (__pyx_t_1) {
3501 
3502  /* "PyClical.pyx":142
3503  * """
3504  * if (lhs is None) or (rhs is None):
3505  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3506  * if op == 2: # ==
3507  * return eq
3508  */
3509  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3510  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3511  __Pyx_GOTREF(__pyx_t_4);
3512  __pyx_v_eq = __pyx_t_4;
3513  __pyx_t_4 = 0;
3514 
3515  /* "PyClical.pyx":143
3516  * if (lhs is None) or (rhs is None):
3517  * eq = bool(lhs is rhs)
3518  * if op == 2: # == # <<<<<<<<<<<<<<
3519  * return eq
3520  * elif op == 3: # !=
3521  */
3522  switch (__pyx_v_op) {
3523  case 2:
3524 
3525  /* "PyClical.pyx":144
3526  * eq = bool(lhs is rhs)
3527  * if op == 2: # ==
3528  * return eq # <<<<<<<<<<<<<<
3529  * elif op == 3: # !=
3530  * return not eq
3531  */
3532  __Pyx_XDECREF(__pyx_r);
3533  __Pyx_INCREF(__pyx_v_eq);
3534  __pyx_r = __pyx_v_eq;
3535  goto __pyx_L0;
3536 
3537  /* "PyClical.pyx":143
3538  * if (lhs is None) or (rhs is None):
3539  * eq = bool(lhs is rhs)
3540  * if op == 2: # == # <<<<<<<<<<<<<<
3541  * return eq
3542  * elif op == 3: # !=
3543  */
3544  break;
3545  case 3:
3546 
3547  /* "PyClical.pyx":146
3548  * return eq
3549  * elif op == 3: # !=
3550  * return not eq # <<<<<<<<<<<<<<
3551  * else:
3552  * if op == 0: # <
3553  */
3554  __Pyx_XDECREF(__pyx_r);
3555  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3556  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3557  __Pyx_GOTREF(__pyx_t_4);
3558  __pyx_r = __pyx_t_4;
3559  __pyx_t_4 = 0;
3560  goto __pyx_L0;
3561 
3562  /* "PyClical.pyx":145
3563  * if op == 2: # ==
3564  * return eq
3565  * elif op == 3: # != # <<<<<<<<<<<<<<
3566  * return not eq
3567  * else:
3568  */
3569  break;
3570  default:
3571 
3572  /* "PyClical.pyx":148
3573  * return not eq
3574  * else:
3575  * if op == 0: # < # <<<<<<<<<<<<<<
3576  * return False
3577  * elif op == 1: # <=
3578  */
3579  switch (__pyx_v_op) {
3580  case 0:
3581 
3582  /* "PyClical.pyx":149
3583  * else:
3584  * if op == 0: # <
3585  * return False # <<<<<<<<<<<<<<
3586  * elif op == 1: # <=
3587  * return eq
3588  */
3589  __Pyx_XDECREF(__pyx_r);
3590  __Pyx_INCREF(Py_False);
3591  __pyx_r = Py_False;
3592  goto __pyx_L0;
3593 
3594  /* "PyClical.pyx":148
3595  * return not eq
3596  * else:
3597  * if op == 0: # < # <<<<<<<<<<<<<<
3598  * return False
3599  * elif op == 1: # <=
3600  */
3601  break;
3602  case 1:
3603 
3604  /* "PyClical.pyx":151
3605  * return False
3606  * elif op == 1: # <=
3607  * return eq # <<<<<<<<<<<<<<
3608  * elif op == 4: # >
3609  * return False
3610  */
3611  __Pyx_XDECREF(__pyx_r);
3612  __Pyx_INCREF(__pyx_v_eq);
3613  __pyx_r = __pyx_v_eq;
3614  goto __pyx_L0;
3615 
3616  /* "PyClical.pyx":150
3617  * if op == 0: # <
3618  * return False
3619  * elif op == 1: # <= # <<<<<<<<<<<<<<
3620  * return eq
3621  * elif op == 4: # >
3622  */
3623  break;
3624  case 4:
3625 
3626  /* "PyClical.pyx":153
3627  * return eq
3628  * elif op == 4: # >
3629  * return False # <<<<<<<<<<<<<<
3630  * elif op == 5: # >=
3631  * return eq
3632  */
3633  __Pyx_XDECREF(__pyx_r);
3634  __Pyx_INCREF(Py_False);
3635  __pyx_r = Py_False;
3636  goto __pyx_L0;
3637 
3638  /* "PyClical.pyx":152
3639  * elif op == 1: # <=
3640  * return eq
3641  * elif op == 4: # > # <<<<<<<<<<<<<<
3642  * return False
3643  * elif op == 5: # >=
3644  */
3645  break;
3646  case 5:
3647 
3648  /* "PyClical.pyx":155
3649  * return False
3650  * elif op == 5: # >=
3651  * return eq # <<<<<<<<<<<<<<
3652  * else:
3653  * return NotImplemented
3654  */
3655  __Pyx_XDECREF(__pyx_r);
3656  __Pyx_INCREF(__pyx_v_eq);
3657  __pyx_r = __pyx_v_eq;
3658  goto __pyx_L0;
3659 
3660  /* "PyClical.pyx":154
3661  * elif op == 4: # >
3662  * return False
3663  * elif op == 5: # >= # <<<<<<<<<<<<<<
3664  * return eq
3665  * else:
3666  */
3667  break;
3668  default:
3669 
3670  /* "PyClical.pyx":157
3671  * return eq
3672  * else:
3673  * return NotImplemented # <<<<<<<<<<<<<<
3674  * else:
3675  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3676  */
3677  __Pyx_XDECREF(__pyx_r);
3678  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3679  __pyx_r = __pyx_builtin_NotImplemented;
3680  goto __pyx_L0;
3681  break;
3682  }
3683  break;
3684  }
3685 
3686  /* "PyClical.pyx":141
3687  * False
3688  * """
3689  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3690  * eq = bool(lhs is rhs)
3691  * if op == 2: # ==
3692  */
3693  }
3694 
3695  /* "PyClical.pyx":159
3696  * return NotImplemented
3697  * else:
3698  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3699  * if op == 2: # ==
3700  * return eq
3701  */
3702  /*else*/ {
3703  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3704  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3705  __Pyx_GOTREF(__pyx_t_4);
3706  __pyx_v_eq = __pyx_t_4;
3707  __pyx_t_4 = 0;
3708 
3709  /* "PyClical.pyx":160
3710  * else:
3711  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3712  * if op == 2: # == # <<<<<<<<<<<<<<
3713  * return eq
3714  * elif op == 3: # !=
3715  */
3716  switch (__pyx_v_op) {
3717  case 2:
3718 
3719  /* "PyClical.pyx":161
3720  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3721  * if op == 2: # ==
3722  * return eq # <<<<<<<<<<<<<<
3723  * elif op == 3: # !=
3724  * return not eq
3725  */
3726  __Pyx_XDECREF(__pyx_r);
3727  __Pyx_INCREF(__pyx_v_eq);
3728  __pyx_r = __pyx_v_eq;
3729  goto __pyx_L0;
3730 
3731  /* "PyClical.pyx":160
3732  * else:
3733  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3734  * if op == 2: # == # <<<<<<<<<<<<<<
3735  * return eq
3736  * elif op == 3: # !=
3737  */
3738  break;
3739  case 3:
3740 
3741  /* "PyClical.pyx":163
3742  * return eq
3743  * elif op == 3: # !=
3744  * return not eq # <<<<<<<<<<<<<<
3745  * else:
3746  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3747  */
3748  __Pyx_XDECREF(__pyx_r);
3749  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3750  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3751  __Pyx_GOTREF(__pyx_t_4);
3752  __pyx_r = __pyx_t_4;
3753  __pyx_t_4 = 0;
3754  goto __pyx_L0;
3755 
3756  /* "PyClical.pyx":162
3757  * if op == 2: # ==
3758  * return eq
3759  * elif op == 3: # != # <<<<<<<<<<<<<<
3760  * return not eq
3761  * else:
3762  */
3763  break;
3764  default:
3765 
3766  /* "PyClical.pyx":165
3767  * return not eq
3768  * else:
3769  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3770  * if op == 0: # <
3771  * return lt
3772  */
3773  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3774  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3775  __Pyx_GOTREF(__pyx_t_4);
3776  __pyx_v_lt = __pyx_t_4;
3777  __pyx_t_4 = 0;
3778 
3779  /* "PyClical.pyx":166
3780  * else:
3781  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3782  * if op == 0: # < # <<<<<<<<<<<<<<
3783  * return lt
3784  * elif op == 1: # <=
3785  */
3786  switch (__pyx_v_op) {
3787  case 0:
3788 
3789  /* "PyClical.pyx":167
3790  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3791  * if op == 0: # <
3792  * return lt # <<<<<<<<<<<<<<
3793  * elif op == 1: # <=
3794  * return lt or eq
3795  */
3796  __Pyx_XDECREF(__pyx_r);
3797  __Pyx_INCREF(__pyx_v_lt);
3798  __pyx_r = __pyx_v_lt;
3799  goto __pyx_L0;
3800 
3801  /* "PyClical.pyx":166
3802  * else:
3803  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3804  * if op == 0: # < # <<<<<<<<<<<<<<
3805  * return lt
3806  * elif op == 1: # <=
3807  */
3808  break;
3809  case 1:
3810 
3811  /* "PyClical.pyx":169
3812  * return lt
3813  * elif op == 1: # <=
3814  * return lt or eq # <<<<<<<<<<<<<<
3815  * elif op == 4: # >
3816  * return not (lt or eq)
3817  */
3818  __Pyx_XDECREF(__pyx_r);
3819  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3820  if (!__pyx_t_1) {
3821  } else {
3822  __Pyx_INCREF(__pyx_v_lt);
3823  __pyx_t_4 = __pyx_v_lt;
3824  goto __pyx_L6_bool_binop_done;
3825  }
3826  __Pyx_INCREF(__pyx_v_eq);
3827  __pyx_t_4 = __pyx_v_eq;
3828  __pyx_L6_bool_binop_done:;
3829  __pyx_r = __pyx_t_4;
3830  __pyx_t_4 = 0;
3831  goto __pyx_L0;
3832 
3833  /* "PyClical.pyx":168
3834  * if op == 0: # <
3835  * return lt
3836  * elif op == 1: # <= # <<<<<<<<<<<<<<
3837  * return lt or eq
3838  * elif op == 4: # >
3839  */
3840  break;
3841  case 4:
3842 
3843  /* "PyClical.pyx":171
3844  * return lt or eq
3845  * elif op == 4: # >
3846  * return not (lt or eq) # <<<<<<<<<<<<<<
3847  * elif op == 5: # >=
3848  * return not lt
3849  */
3850  __Pyx_XDECREF(__pyx_r);
3851  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3852  if (!__pyx_t_2) {
3853  } else {
3854  __pyx_t_1 = __pyx_t_2;
3855  goto __pyx_L8_bool_binop_done;
3856  }
3857  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3858  __pyx_t_1 = __pyx_t_2;
3859  __pyx_L8_bool_binop_done:;
3860  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3861  __Pyx_GOTREF(__pyx_t_4);
3862  __pyx_r = __pyx_t_4;
3863  __pyx_t_4 = 0;
3864  goto __pyx_L0;
3865 
3866  /* "PyClical.pyx":170
3867  * elif op == 1: # <=
3868  * return lt or eq
3869  * elif op == 4: # > # <<<<<<<<<<<<<<
3870  * return not (lt or eq)
3871  * elif op == 5: # >=
3872  */
3873  break;
3874  case 5:
3875 
3876  /* "PyClical.pyx":173
3877  * return not (lt or eq)
3878  * elif op == 5: # >=
3879  * return not lt # <<<<<<<<<<<<<<
3880  * else:
3881  * return NotImplemented
3882  */
3883  __Pyx_XDECREF(__pyx_r);
3884  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3885  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3886  __Pyx_GOTREF(__pyx_t_4);
3887  __pyx_r = __pyx_t_4;
3888  __pyx_t_4 = 0;
3889  goto __pyx_L0;
3890 
3891  /* "PyClical.pyx":172
3892  * elif op == 4: # >
3893  * return not (lt or eq)
3894  * elif op == 5: # >= # <<<<<<<<<<<<<<
3895  * return not lt
3896  * else:
3897  */
3898  break;
3899  default:
3900 
3901  /* "PyClical.pyx":175
3902  * return not lt
3903  * else:
3904  * return NotImplemented # <<<<<<<<<<<<<<
3905  *
3906  * def __setitem__(self, idx, val):
3907  */
3908  __Pyx_XDECREF(__pyx_r);
3909  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3910  __pyx_r = __pyx_builtin_NotImplemented;
3911  goto __pyx_L0;
3912  break;
3913  }
3914  break;
3915  }
3916  }
3917 
3918  /* "PyClical.pyx":120
3919  * del self.instance
3920  *
3921  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3922  * """
3923  * Compare two objects of class index_set.
3924  */
3925 
3926  /* function exit code */
3927  __pyx_L1_error:;
3928  __Pyx_XDECREF(__pyx_t_4);
3929  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3930  __pyx_r = NULL;
3931  __pyx_L0:;
3932  __Pyx_XDECREF(__pyx_v_eq);
3933  __Pyx_XDECREF(__pyx_v_lt);
3934  __Pyx_XGIVEREF(__pyx_r);
3935  __Pyx_RefNannyFinishContext();
3936  return __pyx_r;
3937 }
3938 
3939 /* "PyClical.pyx":177
3940  * return NotImplemented
3941  *
3942  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3943  * """
3944  * Set the value of an index_set object at index idx to value val.
3945  */
3946 
3947 /* Python wrapper */
3948 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3949 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 ";
3950 #if CYTHON_COMPILING_IN_CPYTHON
3951 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3952 #endif
3953 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3954  int __pyx_r;
3955  __Pyx_RefNannyDeclarations
3956  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3957  __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));
3958 
3959  /* function exit code */
3960  __Pyx_RefNannyFinishContext();
3961  return __pyx_r;
3962 }
3963 
3964 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) {
3965  int __pyx_r;
3966  __Pyx_RefNannyDeclarations
3967  int __pyx_t_1;
3968  int __pyx_t_2;
3969  __Pyx_RefNannySetupContext("__setitem__", 0);
3970 
3971  /* "PyClical.pyx":186
3972  * {2}
3973  * """
3974  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3975  * return
3976  *
3977  */
3978  __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)
3979  __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)
3980  try {
3981  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3982  } catch(...) {
3983  __Pyx_CppExn2PyErr();
3984  __PYX_ERR(0, 186, __pyx_L1_error)
3985  }
3986 
3987  /* "PyClical.pyx":187
3988  * """
3989  * self.instance.set(idx, val)
3990  * return # <<<<<<<<<<<<<<
3991  *
3992  * def __getitem__(self, idx):
3993  */
3994  __pyx_r = 0;
3995  goto __pyx_L0;
3996 
3997  /* "PyClical.pyx":177
3998  * return NotImplemented
3999  *
4000  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
4001  * """
4002  * Set the value of an index_set object at index idx to value val.
4003  */
4004 
4005  /* function exit code */
4006  __pyx_L1_error:;
4007  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4008  __pyx_r = -1;
4009  __pyx_L0:;
4010  __Pyx_RefNannyFinishContext();
4011  return __pyx_r;
4012 }
4013 
4014 /* "PyClical.pyx":189
4015  * return
4016  *
4017  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4018  * """
4019  * Get the value of an index_set object at an index.
4020  */
4021 
4022 /* Python wrapper */
4023 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4024 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 ";
4025 #if CYTHON_COMPILING_IN_CPYTHON
4026 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
4027 #endif
4028 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4029  PyObject *__pyx_r = 0;
4030  __Pyx_RefNannyDeclarations
4031  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
4032  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4033 
4034  /* function exit code */
4035  __Pyx_RefNannyFinishContext();
4036  return __pyx_r;
4037 }
4038 
4039 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4040  PyObject *__pyx_r = NULL;
4041  __Pyx_RefNannyDeclarations
4042  int __pyx_t_1;
4043  PyObject *__pyx_t_2 = NULL;
4044  __Pyx_RefNannySetupContext("__getitem__", 0);
4045 
4046  /* "PyClical.pyx":206
4047  * False
4048  * """
4049  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4050  *
4051  * def __contains__(self, idx):
4052  */
4053  __Pyx_XDECREF(__pyx_r);
4054  __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)
4055  __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)
4056  __Pyx_GOTREF(__pyx_t_2);
4057  __pyx_r = __pyx_t_2;
4058  __pyx_t_2 = 0;
4059  goto __pyx_L0;
4060 
4061  /* "PyClical.pyx":189
4062  * return
4063  *
4064  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
4065  * """
4066  * Get the value of an index_set object at an index.
4067  */
4068 
4069  /* function exit code */
4070  __pyx_L1_error:;
4071  __Pyx_XDECREF(__pyx_t_2);
4072  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4073  __pyx_r = NULL;
4074  __pyx_L0:;
4075  __Pyx_XGIVEREF(__pyx_r);
4076  __Pyx_RefNannyFinishContext();
4077  return __pyx_r;
4078 }
4079 
4080 /* "PyClical.pyx":208
4081  * return self.instance.getitem(idx)
4082  *
4083  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4084  * """
4085  * Check that an index_set object contains the index idx: idx in self.
4086  */
4087 
4088 /* Python wrapper */
4089 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4090 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 ";
4091 #if CYTHON_COMPILING_IN_CPYTHON
4092 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4093 #endif
4094 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4095  int __pyx_r;
4096  __Pyx_RefNannyDeclarations
4097  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4098  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
4099 
4100  /* function exit code */
4101  __Pyx_RefNannyFinishContext();
4102  return __pyx_r;
4103 }
4104 
4105 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4106  int __pyx_r;
4107  __Pyx_RefNannyDeclarations
4108  int __pyx_t_1;
4109  __Pyx_RefNannySetupContext("__contains__", 0);
4110 
4111  /* "PyClical.pyx":225
4112  * False
4113  * """
4114  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4115  *
4116  * def __iter__(self):
4117  */
4118  __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)
4119  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4120  goto __pyx_L0;
4121 
4122  /* "PyClical.pyx":208
4123  * return self.instance.getitem(idx)
4124  *
4125  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4126  * """
4127  * Check that an index_set object contains the index idx: idx in self.
4128  */
4129 
4130  /* function exit code */
4131  __pyx_L1_error:;
4132  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4133  __pyx_r = -1;
4134  __pyx_L0:;
4135  __Pyx_RefNannyFinishContext();
4136  return __pyx_r;
4137 }
4138 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4139 
4140 /* "PyClical.pyx":227
4141  * return self.instance.getitem(idx)
4142  *
4143  * def __iter__(self): # <<<<<<<<<<<<<<
4144  * """
4145  * Iterate over the indices of an index_set.
4146  */
4147 
4148 /* Python wrapper */
4149 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4150 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 ";
4151 #if CYTHON_COMPILING_IN_CPYTHON
4152 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4153 #endif
4154 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4155  PyObject *__pyx_r = 0;
4156  __Pyx_RefNannyDeclarations
4157  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4158  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4159 
4160  /* function exit code */
4161  __Pyx_RefNannyFinishContext();
4162  return __pyx_r;
4163 }
4164 
4165 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4166  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4167  PyObject *__pyx_r = NULL;
4168  __Pyx_RefNannyDeclarations
4169  __Pyx_RefNannySetupContext("__iter__", 0);
4170  __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);
4171  if (unlikely(!__pyx_cur_scope)) {
4172  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4173  __Pyx_INCREF(Py_None);
4174  __PYX_ERR(0, 227, __pyx_L1_error)
4175  } else {
4176  __Pyx_GOTREF(__pyx_cur_scope);
4177  }
4178  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4179  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4180  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4181  {
4182  __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)
4183  __Pyx_DECREF(__pyx_cur_scope);
4184  __Pyx_RefNannyFinishContext();
4185  return (PyObject *) gen;
4186  }
4187 
4188  /* function exit code */
4189  __pyx_L1_error:;
4190  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4191  __pyx_r = NULL;
4192  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4193  __Pyx_XGIVEREF(__pyx_r);
4194  __Pyx_RefNannyFinishContext();
4195  return __pyx_r;
4196 }
4197 
4198 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4199 {
4200  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4201  PyObject *__pyx_r = NULL;
4202  PyObject *__pyx_t_1 = NULL;
4203  PyObject *__pyx_t_2 = NULL;
4204  PyObject *__pyx_t_3 = NULL;
4205  PyObject *__pyx_t_4 = NULL;
4206  Py_ssize_t __pyx_t_5;
4207  PyObject *(*__pyx_t_6)(PyObject *);
4208  int __pyx_t_7;
4209  int __pyx_t_8;
4210  __Pyx_RefNannyDeclarations
4211  __Pyx_RefNannySetupContext("__iter__", 0);
4212  switch (__pyx_generator->resume_label) {
4213  case 0: goto __pyx_L3_first_run;
4214  case 1: goto __pyx_L7_resume_from_yield;
4215  default: /* CPython raises the right error here */
4216  __Pyx_RefNannyFinishContext();
4217  return NULL;
4218  }
4219  __pyx_L3_first_run:;
4220  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4221 
4222  /* "PyClical.pyx":234
4223  * -3 4 7
4224  * """
4225  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4226  * if idx in self:
4227  * yield idx
4228  */
4229  __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)
4230  __Pyx_GOTREF(__pyx_t_2);
4231  __pyx_t_3 = NULL;
4232  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4233  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4234  if (likely(__pyx_t_3)) {
4235  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4236  __Pyx_INCREF(__pyx_t_3);
4237  __Pyx_INCREF(function);
4238  __Pyx_DECREF_SET(__pyx_t_2, function);
4239  }
4240  }
4241  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
4242  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4243  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4244  __Pyx_GOTREF(__pyx_t_1);
4245  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4246  __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)
4247  __Pyx_GOTREF(__pyx_t_3);
4248  __pyx_t_4 = NULL;
4249  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4250  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4251  if (likely(__pyx_t_4)) {
4252  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4253  __Pyx_INCREF(__pyx_t_4);
4254  __Pyx_INCREF(function);
4255  __Pyx_DECREF_SET(__pyx_t_3, function);
4256  }
4257  }
4258  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
4259  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4260  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4261  __Pyx_GOTREF(__pyx_t_2);
4262  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4263  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4264  __Pyx_GOTREF(__pyx_t_3);
4265  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4266  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4267  __Pyx_GOTREF(__pyx_t_2);
4268  __Pyx_GIVEREF(__pyx_t_1);
4269  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4270  __Pyx_GIVEREF(__pyx_t_3);
4271  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4272  __pyx_t_1 = 0;
4273  __pyx_t_3 = 0;
4274  __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)
4275  __Pyx_GOTREF(__pyx_t_3);
4276  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4277  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4278  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4279  __pyx_t_6 = NULL;
4280  } else {
4281  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4282  __Pyx_GOTREF(__pyx_t_2);
4283  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4284  }
4285  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4286  for (;;) {
4287  if (likely(!__pyx_t_6)) {
4288  if (likely(PyList_CheckExact(__pyx_t_2))) {
4289  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4290  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4291  __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)
4292  #else
4293  __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)
4294  __Pyx_GOTREF(__pyx_t_3);
4295  #endif
4296  } else {
4297  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4298  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4299  __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)
4300  #else
4301  __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)
4302  __Pyx_GOTREF(__pyx_t_3);
4303  #endif
4304  }
4305  } else {
4306  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4307  if (unlikely(!__pyx_t_3)) {
4308  PyObject* exc_type = PyErr_Occurred();
4309  if (exc_type) {
4310  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4311  else __PYX_ERR(0, 234, __pyx_L1_error)
4312  }
4313  break;
4314  }
4315  __Pyx_GOTREF(__pyx_t_3);
4316  }
4317  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4318  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4319  __Pyx_GIVEREF(__pyx_t_3);
4320  __pyx_t_3 = 0;
4321 
4322  /* "PyClical.pyx":235
4323  * """
4324  * for idx in range(self.min(), self.max()+1):
4325  * if idx in self: # <<<<<<<<<<<<<<
4326  * yield idx
4327  *
4328  */
4329  __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)
4330  __pyx_t_8 = (__pyx_t_7 != 0);
4331  if (__pyx_t_8) {
4332 
4333  /* "PyClical.pyx":236
4334  * for idx in range(self.min(), self.max()+1):
4335  * if idx in self:
4336  * yield idx # <<<<<<<<<<<<<<
4337  *
4338  * def __invert__(self):
4339  */
4340  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4341  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4342  __Pyx_XGIVEREF(__pyx_t_2);
4343  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4344  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4345  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4346  __Pyx_XGIVEREF(__pyx_r);
4347  __Pyx_RefNannyFinishContext();
4348  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4349  /* return from generator, yielding value */
4350  __pyx_generator->resume_label = 1;
4351  return __pyx_r;
4352  __pyx_L7_resume_from_yield:;
4353  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4354  __pyx_cur_scope->__pyx_t_0 = 0;
4355  __Pyx_XGOTREF(__pyx_t_2);
4356  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4357  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4358  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4359 
4360  /* "PyClical.pyx":235
4361  * """
4362  * for idx in range(self.min(), self.max()+1):
4363  * if idx in self: # <<<<<<<<<<<<<<
4364  * yield idx
4365  *
4366  */
4367  }
4368 
4369  /* "PyClical.pyx":234
4370  * -3 4 7
4371  * """
4372  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4373  * if idx in self:
4374  * yield idx
4375  */
4376  }
4377  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4378  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4379 
4380  /* "PyClical.pyx":227
4381  * return self.instance.getitem(idx)
4382  *
4383  * def __iter__(self): # <<<<<<<<<<<<<<
4384  * """
4385  * Iterate over the indices of an index_set.
4386  */
4387 
4388  /* function exit code */
4389  PyErr_SetNone(PyExc_StopIteration);
4390  goto __pyx_L0;
4391  __pyx_L1_error:;
4392  __Pyx_XDECREF(__pyx_t_1);
4393  __Pyx_XDECREF(__pyx_t_2);
4394  __Pyx_XDECREF(__pyx_t_3);
4395  __Pyx_XDECREF(__pyx_t_4);
4396  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4397  __pyx_L0:;
4398  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4399  #if !CYTHON_USE_EXC_INFO_STACK
4400  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4401  #endif
4402  __pyx_generator->resume_label = -1;
4403  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4404  __Pyx_RefNannyFinishContext();
4405  return __pyx_r;
4406 }
4407 
4408 /* "PyClical.pyx":238
4409  * yield idx
4410  *
4411  * def __invert__(self): # <<<<<<<<<<<<<<
4412  * """
4413  * Set complement: not.
4414  */
4415 
4416 /* Python wrapper */
4417 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4418 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 ";
4419 #if CYTHON_COMPILING_IN_CPYTHON
4420 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4421 #endif
4422 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4423  PyObject *__pyx_r = 0;
4424  __Pyx_RefNannyDeclarations
4425  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4426  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4427 
4428  /* function exit code */
4429  __Pyx_RefNannyFinishContext();
4430  return __pyx_r;
4431 }
4432 
4433 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4434  PyObject *__pyx_r = NULL;
4435  __Pyx_RefNannyDeclarations
4436  PyObject *__pyx_t_1 = NULL;
4437  PyObject *__pyx_t_2 = NULL;
4438  __Pyx_RefNannySetupContext("__invert__", 0);
4439 
4440  /* "PyClical.pyx":245
4441  * {-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}
4442  * """
4443  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4444  *
4445  * def __xor__(lhs, rhs):
4446  */
4447  __Pyx_XDECREF(__pyx_r);
4448  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4449  __Pyx_GOTREF(__pyx_t_1);
4450  __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)
4451  __Pyx_GOTREF(__pyx_t_2);
4452  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4453  __pyx_r = __pyx_t_2;
4454  __pyx_t_2 = 0;
4455  goto __pyx_L0;
4456 
4457  /* "PyClical.pyx":238
4458  * yield idx
4459  *
4460  * def __invert__(self): # <<<<<<<<<<<<<<
4461  * """
4462  * Set complement: not.
4463  */
4464 
4465  /* function exit code */
4466  __pyx_L1_error:;
4467  __Pyx_XDECREF(__pyx_t_1);
4468  __Pyx_XDECREF(__pyx_t_2);
4469  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4470  __pyx_r = NULL;
4471  __pyx_L0:;
4472  __Pyx_XGIVEREF(__pyx_r);
4473  __Pyx_RefNannyFinishContext();
4474  return __pyx_r;
4475 }
4476 
4477 /* "PyClical.pyx":247
4478  * return index_set().wrap( self.instance.invert() )
4479  *
4480  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4481  * """
4482  * Symmetric set difference: exclusive or.
4483  */
4484 
4485 /* Python wrapper */
4486 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4487 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 ";
4488 #if CYTHON_COMPILING_IN_CPYTHON
4489 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4490 #endif
4491 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4492  PyObject *__pyx_r = 0;
4493  __Pyx_RefNannyDeclarations
4494  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4495  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4496 
4497  /* function exit code */
4498  __Pyx_RefNannyFinishContext();
4499  return __pyx_r;
4500 }
4501 
4502 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4503  PyObject *__pyx_r = NULL;
4504  __Pyx_RefNannyDeclarations
4505  PyObject *__pyx_t_1 = NULL;
4506  PyObject *__pyx_t_2 = NULL;
4507  __Pyx_RefNannySetupContext("__xor__", 0);
4508 
4509  /* "PyClical.pyx":256
4510  * {1}
4511  * """
4512  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4513  *
4514  * def __ixor__(self, rhs):
4515  */
4516  __Pyx_XDECREF(__pyx_r);
4517  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4518  __Pyx_GOTREF(__pyx_t_1);
4519  __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)
4520  __Pyx_GOTREF(__pyx_t_2);
4521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4522  __pyx_r = __pyx_t_2;
4523  __pyx_t_2 = 0;
4524  goto __pyx_L0;
4525 
4526  /* "PyClical.pyx":247
4527  * return index_set().wrap( self.instance.invert() )
4528  *
4529  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4530  * """
4531  * Symmetric set difference: exclusive or.
4532  */
4533 
4534  /* function exit code */
4535  __pyx_L1_error:;
4536  __Pyx_XDECREF(__pyx_t_1);
4537  __Pyx_XDECREF(__pyx_t_2);
4538  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4539  __pyx_r = NULL;
4540  __pyx_L0:;
4541  __Pyx_XGIVEREF(__pyx_r);
4542  __Pyx_RefNannyFinishContext();
4543  return __pyx_r;
4544 }
4545 
4546 /* "PyClical.pyx":258
4547  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4548  *
4549  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4550  * """
4551  * Symmetric set difference: exclusive or.
4552  */
4553 
4554 /* Python wrapper */
4555 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4556 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 ";
4557 #if CYTHON_COMPILING_IN_CPYTHON
4558 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4559 #endif
4560 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4561  PyObject *__pyx_r = 0;
4562  __Pyx_RefNannyDeclarations
4563  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4564  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4565 
4566  /* function exit code */
4567  __Pyx_RefNannyFinishContext();
4568  return __pyx_r;
4569 }
4570 
4571 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4572  PyObject *__pyx_r = NULL;
4573  __Pyx_RefNannyDeclarations
4574  PyObject *__pyx_t_1 = NULL;
4575  __Pyx_RefNannySetupContext("__ixor__", 0);
4576 
4577  /* "PyClical.pyx":267
4578  * {1}
4579  * """
4580  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4581  *
4582  * def __and__(lhs, rhs):
4583  */
4584  __Pyx_XDECREF(__pyx_r);
4585  __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)
4586  __Pyx_GOTREF(__pyx_t_1);
4587  __pyx_r = __pyx_t_1;
4588  __pyx_t_1 = 0;
4589  goto __pyx_L0;
4590 
4591  /* "PyClical.pyx":258
4592  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4593  *
4594  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4595  * """
4596  * Symmetric set difference: exclusive or.
4597  */
4598 
4599  /* function exit code */
4600  __pyx_L1_error:;
4601  __Pyx_XDECREF(__pyx_t_1);
4602  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4603  __pyx_r = NULL;
4604  __pyx_L0:;
4605  __Pyx_XGIVEREF(__pyx_r);
4606  __Pyx_RefNannyFinishContext();
4607  return __pyx_r;
4608 }
4609 
4610 /* "PyClical.pyx":269
4611  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4612  *
4613  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4614  * """
4615  * Set intersection: and.
4616  */
4617 
4618 /* Python wrapper */
4619 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4620 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 ";
4621 #if CYTHON_COMPILING_IN_CPYTHON
4622 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4623 #endif
4624 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4625  PyObject *__pyx_r = 0;
4626  __Pyx_RefNannyDeclarations
4627  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4628  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4629 
4630  /* function exit code */
4631  __Pyx_RefNannyFinishContext();
4632  return __pyx_r;
4633 }
4634 
4635 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4636  PyObject *__pyx_r = NULL;
4637  __Pyx_RefNannyDeclarations
4638  PyObject *__pyx_t_1 = NULL;
4639  PyObject *__pyx_t_2 = NULL;
4640  __Pyx_RefNannySetupContext("__and__", 0);
4641 
4642  /* "PyClical.pyx":278
4643  * {2}
4644  * """
4645  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4646  *
4647  * def __iand__(self, rhs):
4648  */
4649  __Pyx_XDECREF(__pyx_r);
4650  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4651  __Pyx_GOTREF(__pyx_t_1);
4652  __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)
4653  __Pyx_GOTREF(__pyx_t_2);
4654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4655  __pyx_r = __pyx_t_2;
4656  __pyx_t_2 = 0;
4657  goto __pyx_L0;
4658 
4659  /* "PyClical.pyx":269
4660  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4661  *
4662  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4663  * """
4664  * Set intersection: and.
4665  */
4666 
4667  /* function exit code */
4668  __pyx_L1_error:;
4669  __Pyx_XDECREF(__pyx_t_1);
4670  __Pyx_XDECREF(__pyx_t_2);
4671  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4672  __pyx_r = NULL;
4673  __pyx_L0:;
4674  __Pyx_XGIVEREF(__pyx_r);
4675  __Pyx_RefNannyFinishContext();
4676  return __pyx_r;
4677 }
4678 
4679 /* "PyClical.pyx":280
4680  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4681  *
4682  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4683  * """
4684  * Set intersection: and.
4685  */
4686 
4687 /* Python wrapper */
4688 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4689 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 ";
4690 #if CYTHON_COMPILING_IN_CPYTHON
4691 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4692 #endif
4693 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4694  PyObject *__pyx_r = 0;
4695  __Pyx_RefNannyDeclarations
4696  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4697  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4698 
4699  /* function exit code */
4700  __Pyx_RefNannyFinishContext();
4701  return __pyx_r;
4702 }
4703 
4704 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4705  PyObject *__pyx_r = NULL;
4706  __Pyx_RefNannyDeclarations
4707  PyObject *__pyx_t_1 = NULL;
4708  __Pyx_RefNannySetupContext("__iand__", 0);
4709 
4710  /* "PyClical.pyx":289
4711  * {2}
4712  * """
4713  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4714  *
4715  * def __or__(lhs, rhs):
4716  */
4717  __Pyx_XDECREF(__pyx_r);
4718  __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)
4719  __Pyx_GOTREF(__pyx_t_1);
4720  __pyx_r = __pyx_t_1;
4721  __pyx_t_1 = 0;
4722  goto __pyx_L0;
4723 
4724  /* "PyClical.pyx":280
4725  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4726  *
4727  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4728  * """
4729  * Set intersection: and.
4730  */
4731 
4732  /* function exit code */
4733  __pyx_L1_error:;
4734  __Pyx_XDECREF(__pyx_t_1);
4735  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4736  __pyx_r = NULL;
4737  __pyx_L0:;
4738  __Pyx_XGIVEREF(__pyx_r);
4739  __Pyx_RefNannyFinishContext();
4740  return __pyx_r;
4741 }
4742 
4743 /* "PyClical.pyx":291
4744  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4745  *
4746  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4747  * """
4748  * Set union: or.
4749  */
4750 
4751 /* Python wrapper */
4752 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4753 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 ";
4754 #if CYTHON_COMPILING_IN_CPYTHON
4755 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4756 #endif
4757 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4758  PyObject *__pyx_r = 0;
4759  __Pyx_RefNannyDeclarations
4760  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4761  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4762 
4763  /* function exit code */
4764  __Pyx_RefNannyFinishContext();
4765  return __pyx_r;
4766 }
4767 
4768 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4769  PyObject *__pyx_r = NULL;
4770  __Pyx_RefNannyDeclarations
4771  PyObject *__pyx_t_1 = NULL;
4772  PyObject *__pyx_t_2 = NULL;
4773  __Pyx_RefNannySetupContext("__or__", 0);
4774 
4775  /* "PyClical.pyx":300
4776  * {1,2}
4777  * """
4778  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4779  *
4780  * def __ior__(self, rhs):
4781  */
4782  __Pyx_XDECREF(__pyx_r);
4783  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4784  __Pyx_GOTREF(__pyx_t_1);
4785  __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)
4786  __Pyx_GOTREF(__pyx_t_2);
4787  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4788  __pyx_r = __pyx_t_2;
4789  __pyx_t_2 = 0;
4790  goto __pyx_L0;
4791 
4792  /* "PyClical.pyx":291
4793  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4794  *
4795  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4796  * """
4797  * Set union: or.
4798  */
4799 
4800  /* function exit code */
4801  __pyx_L1_error:;
4802  __Pyx_XDECREF(__pyx_t_1);
4803  __Pyx_XDECREF(__pyx_t_2);
4804  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4805  __pyx_r = NULL;
4806  __pyx_L0:;
4807  __Pyx_XGIVEREF(__pyx_r);
4808  __Pyx_RefNannyFinishContext();
4809  return __pyx_r;
4810 }
4811 
4812 /* "PyClical.pyx":302
4813  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4814  *
4815  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4816  * """
4817  * Set union: or.
4818  */
4819 
4820 /* Python wrapper */
4821 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4822 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 ";
4823 #if CYTHON_COMPILING_IN_CPYTHON
4824 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4825 #endif
4826 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4827  PyObject *__pyx_r = 0;
4828  __Pyx_RefNannyDeclarations
4829  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4830  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4831 
4832  /* function exit code */
4833  __Pyx_RefNannyFinishContext();
4834  return __pyx_r;
4835 }
4836 
4837 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4838  PyObject *__pyx_r = NULL;
4839  __Pyx_RefNannyDeclarations
4840  PyObject *__pyx_t_1 = NULL;
4841  __Pyx_RefNannySetupContext("__ior__", 0);
4842 
4843  /* "PyClical.pyx":311
4844  * {1,2}
4845  * """
4846  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4847  *
4848  * def count(self):
4849  */
4850  __Pyx_XDECREF(__pyx_r);
4851  __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)
4852  __Pyx_GOTREF(__pyx_t_1);
4853  __pyx_r = __pyx_t_1;
4854  __pyx_t_1 = 0;
4855  goto __pyx_L0;
4856 
4857  /* "PyClical.pyx":302
4858  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4859  *
4860  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4861  * """
4862  * Set union: or.
4863  */
4864 
4865  /* function exit code */
4866  __pyx_L1_error:;
4867  __Pyx_XDECREF(__pyx_t_1);
4868  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4869  __pyx_r = NULL;
4870  __pyx_L0:;
4871  __Pyx_XGIVEREF(__pyx_r);
4872  __Pyx_RefNannyFinishContext();
4873  return __pyx_r;
4874 }
4875 
4876 /* "PyClical.pyx":313
4877  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4878  *
4879  * def count(self): # <<<<<<<<<<<<<<
4880  * """
4881  * Cardinality: Number of indices included in set.
4882  */
4883 
4884 /* Python wrapper */
4885 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4886 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 ";
4887 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4888  PyObject *__pyx_r = 0;
4889  __Pyx_RefNannyDeclarations
4890  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4891  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4892 
4893  /* function exit code */
4894  __Pyx_RefNannyFinishContext();
4895  return __pyx_r;
4896 }
4897 
4898 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4899  PyObject *__pyx_r = NULL;
4900  __Pyx_RefNannyDeclarations
4901  PyObject *__pyx_t_1 = NULL;
4902  __Pyx_RefNannySetupContext("count", 0);
4903 
4904  /* "PyClical.pyx":320
4905  * 3
4906  * """
4907  * return self.instance.count() # <<<<<<<<<<<<<<
4908  *
4909  * def count_neg(self):
4910  */
4911  __Pyx_XDECREF(__pyx_r);
4912  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4913  __Pyx_GOTREF(__pyx_t_1);
4914  __pyx_r = __pyx_t_1;
4915  __pyx_t_1 = 0;
4916  goto __pyx_L0;
4917 
4918  /* "PyClical.pyx":313
4919  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4920  *
4921  * def count(self): # <<<<<<<<<<<<<<
4922  * """
4923  * Cardinality: Number of indices included in set.
4924  */
4925 
4926  /* function exit code */
4927  __pyx_L1_error:;
4928  __Pyx_XDECREF(__pyx_t_1);
4929  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4930  __pyx_r = NULL;
4931  __pyx_L0:;
4932  __Pyx_XGIVEREF(__pyx_r);
4933  __Pyx_RefNannyFinishContext();
4934  return __pyx_r;
4935 }
4936 
4937 /* "PyClical.pyx":322
4938  * return self.instance.count()
4939  *
4940  * def count_neg(self): # <<<<<<<<<<<<<<
4941  * """
4942  * Number of negative indices included in set.
4943  */
4944 
4945 /* Python wrapper */
4946 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4947 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 ";
4948 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4949  PyObject *__pyx_r = 0;
4950  __Pyx_RefNannyDeclarations
4951  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4952  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4953 
4954  /* function exit code */
4955  __Pyx_RefNannyFinishContext();
4956  return __pyx_r;
4957 }
4958 
4959 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4960  PyObject *__pyx_r = NULL;
4961  __Pyx_RefNannyDeclarations
4962  PyObject *__pyx_t_1 = NULL;
4963  __Pyx_RefNannySetupContext("count_neg", 0);
4964 
4965  /* "PyClical.pyx":329
4966  * 1
4967  * """
4968  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4969  *
4970  * def count_pos(self):
4971  */
4972  __Pyx_XDECREF(__pyx_r);
4973  __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)
4974  __Pyx_GOTREF(__pyx_t_1);
4975  __pyx_r = __pyx_t_1;
4976  __pyx_t_1 = 0;
4977  goto __pyx_L0;
4978 
4979  /* "PyClical.pyx":322
4980  * return self.instance.count()
4981  *
4982  * def count_neg(self): # <<<<<<<<<<<<<<
4983  * """
4984  * Number of negative indices included in set.
4985  */
4986 
4987  /* function exit code */
4988  __pyx_L1_error:;
4989  __Pyx_XDECREF(__pyx_t_1);
4990  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4991  __pyx_r = NULL;
4992  __pyx_L0:;
4993  __Pyx_XGIVEREF(__pyx_r);
4994  __Pyx_RefNannyFinishContext();
4995  return __pyx_r;
4996 }
4997 
4998 /* "PyClical.pyx":331
4999  * return self.instance.count_neg()
5000  *
5001  * def count_pos(self): # <<<<<<<<<<<<<<
5002  * """
5003  * Number of positive indices included in set.
5004  */
5005 
5006 /* Python wrapper */
5007 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5008 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 ";
5009 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5010  PyObject *__pyx_r = 0;
5011  __Pyx_RefNannyDeclarations
5012  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
5013  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5014 
5015  /* function exit code */
5016  __Pyx_RefNannyFinishContext();
5017  return __pyx_r;
5018 }
5019 
5020 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5021  PyObject *__pyx_r = NULL;
5022  __Pyx_RefNannyDeclarations
5023  PyObject *__pyx_t_1 = NULL;
5024  __Pyx_RefNannySetupContext("count_pos", 0);
5025 
5026  /* "PyClical.pyx":338
5027  * 2
5028  * """
5029  * return self.instance.count_pos() # <<<<<<<<<<<<<<
5030  *
5031  * def min(self):
5032  */
5033  __Pyx_XDECREF(__pyx_r);
5034  __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)
5035  __Pyx_GOTREF(__pyx_t_1);
5036  __pyx_r = __pyx_t_1;
5037  __pyx_t_1 = 0;
5038  goto __pyx_L0;
5039 
5040  /* "PyClical.pyx":331
5041  * return self.instance.count_neg()
5042  *
5043  * def count_pos(self): # <<<<<<<<<<<<<<
5044  * """
5045  * Number of positive indices included in set.
5046  */
5047 
5048  /* function exit code */
5049  __pyx_L1_error:;
5050  __Pyx_XDECREF(__pyx_t_1);
5051  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5052  __pyx_r = NULL;
5053  __pyx_L0:;
5054  __Pyx_XGIVEREF(__pyx_r);
5055  __Pyx_RefNannyFinishContext();
5056  return __pyx_r;
5057 }
5058 
5059 /* "PyClical.pyx":340
5060  * return self.instance.count_pos()
5061  *
5062  * def min(self): # <<<<<<<<<<<<<<
5063  * """
5064  * Minimum member.
5065  */
5066 
5067 /* Python wrapper */
5068 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5069 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5070 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5071  PyObject *__pyx_r = 0;
5072  __Pyx_RefNannyDeclarations
5073  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5074  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5075 
5076  /* function exit code */
5077  __Pyx_RefNannyFinishContext();
5078  return __pyx_r;
5079 }
5080 
5081 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5082  PyObject *__pyx_r = NULL;
5083  __Pyx_RefNannyDeclarations
5084  PyObject *__pyx_t_1 = NULL;
5085  __Pyx_RefNannySetupContext("min", 0);
5086 
5087  /* "PyClical.pyx":347
5088  * -1
5089  * """
5090  * return self.instance.min() # <<<<<<<<<<<<<<
5091  *
5092  * def max(self):
5093  */
5094  __Pyx_XDECREF(__pyx_r);
5095  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5096  __Pyx_GOTREF(__pyx_t_1);
5097  __pyx_r = __pyx_t_1;
5098  __pyx_t_1 = 0;
5099  goto __pyx_L0;
5100 
5101  /* "PyClical.pyx":340
5102  * return self.instance.count_pos()
5103  *
5104  * def min(self): # <<<<<<<<<<<<<<
5105  * """
5106  * Minimum member.
5107  */
5108 
5109  /* function exit code */
5110  __pyx_L1_error:;
5111  __Pyx_XDECREF(__pyx_t_1);
5112  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5113  __pyx_r = NULL;
5114  __pyx_L0:;
5115  __Pyx_XGIVEREF(__pyx_r);
5116  __Pyx_RefNannyFinishContext();
5117  return __pyx_r;
5118 }
5119 
5120 /* "PyClical.pyx":349
5121  * return self.instance.min()
5122  *
5123  * def max(self): # <<<<<<<<<<<<<<
5124  * """
5125  * Maximum member.
5126  */
5127 
5128 /* Python wrapper */
5129 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5130 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5131 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5132  PyObject *__pyx_r = 0;
5133  __Pyx_RefNannyDeclarations
5134  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5135  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5136 
5137  /* function exit code */
5138  __Pyx_RefNannyFinishContext();
5139  return __pyx_r;
5140 }
5141 
5142 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5143  PyObject *__pyx_r = NULL;
5144  __Pyx_RefNannyDeclarations
5145  PyObject *__pyx_t_1 = NULL;
5146  __Pyx_RefNannySetupContext("max", 0);
5147 
5148  /* "PyClical.pyx":356
5149  * 2
5150  * """
5151  * return self.instance.max() # <<<<<<<<<<<<<<
5152  *
5153  * def hash_fn(self):
5154  */
5155  __Pyx_XDECREF(__pyx_r);
5156  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5157  __Pyx_GOTREF(__pyx_t_1);
5158  __pyx_r = __pyx_t_1;
5159  __pyx_t_1 = 0;
5160  goto __pyx_L0;
5161 
5162  /* "PyClical.pyx":349
5163  * return self.instance.min()
5164  *
5165  * def max(self): # <<<<<<<<<<<<<<
5166  * """
5167  * Maximum member.
5168  */
5169 
5170  /* function exit code */
5171  __pyx_L1_error:;
5172  __Pyx_XDECREF(__pyx_t_1);
5173  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5174  __pyx_r = NULL;
5175  __pyx_L0:;
5176  __Pyx_XGIVEREF(__pyx_r);
5177  __Pyx_RefNannyFinishContext();
5178  return __pyx_r;
5179 }
5180 
5181 /* "PyClical.pyx":358
5182  * return self.instance.max()
5183  *
5184  * def hash_fn(self): # <<<<<<<<<<<<<<
5185  * """
5186  * Hash function.
5187  */
5188 
5189 /* Python wrapper */
5190 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5191 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5192 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5193  PyObject *__pyx_r = 0;
5194  __Pyx_RefNannyDeclarations
5195  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5196  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5197 
5198  /* function exit code */
5199  __Pyx_RefNannyFinishContext();
5200  return __pyx_r;
5201 }
5202 
5203 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5204  PyObject *__pyx_r = NULL;
5205  __Pyx_RefNannyDeclarations
5206  PyObject *__pyx_t_1 = NULL;
5207  __Pyx_RefNannySetupContext("hash_fn", 0);
5208 
5209  /* "PyClical.pyx":362
5210  * Hash function.
5211  * """
5212  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5213  *
5214  * def sign_of_mult(self, rhs):
5215  */
5216  __Pyx_XDECREF(__pyx_r);
5217  __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)
5218  __Pyx_GOTREF(__pyx_t_1);
5219  __pyx_r = __pyx_t_1;
5220  __pyx_t_1 = 0;
5221  goto __pyx_L0;
5222 
5223  /* "PyClical.pyx":358
5224  * return self.instance.max()
5225  *
5226  * def hash_fn(self): # <<<<<<<<<<<<<<
5227  * """
5228  * Hash function.
5229  */
5230 
5231  /* function exit code */
5232  __pyx_L1_error:;
5233  __Pyx_XDECREF(__pyx_t_1);
5234  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5235  __pyx_r = NULL;
5236  __pyx_L0:;
5237  __Pyx_XGIVEREF(__pyx_r);
5238  __Pyx_RefNannyFinishContext();
5239  return __pyx_r;
5240 }
5241 
5242 /* "PyClical.pyx":364
5243  * return self.instance.hash_fn()
5244  *
5245  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5246  * """
5247  * Sign of geometric product of two Clifford basis elements.
5248  */
5249 
5250 /* Python wrapper */
5251 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5252 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 ";
5253 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5254  PyObject *__pyx_r = 0;
5255  __Pyx_RefNannyDeclarations
5256  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5257  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5258 
5259  /* function exit code */
5260  __Pyx_RefNannyFinishContext();
5261  return __pyx_r;
5262 }
5263 
5264 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5265  PyObject *__pyx_r = NULL;
5266  __Pyx_RefNannyDeclarations
5267  PyObject *__pyx_t_1 = NULL;
5268  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5269 
5270  /* "PyClical.pyx":371
5271  * 1
5272  * """
5273  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5274  *
5275  * def sign_of_square(self):
5276  */
5277  __Pyx_XDECREF(__pyx_r);
5278  __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)
5279  __Pyx_GOTREF(__pyx_t_1);
5280  __pyx_r = __pyx_t_1;
5281  __pyx_t_1 = 0;
5282  goto __pyx_L0;
5283 
5284  /* "PyClical.pyx":364
5285  * return self.instance.hash_fn()
5286  *
5287  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5288  * """
5289  * Sign of geometric product of two Clifford basis elements.
5290  */
5291 
5292  /* function exit code */
5293  __pyx_L1_error:;
5294  __Pyx_XDECREF(__pyx_t_1);
5295  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5296  __pyx_r = NULL;
5297  __pyx_L0:;
5298  __Pyx_XGIVEREF(__pyx_r);
5299  __Pyx_RefNannyFinishContext();
5300  return __pyx_r;
5301 }
5302 
5303 /* "PyClical.pyx":373
5304  * return self.instance.sign_of_mult(toIndexSet(rhs))
5305  *
5306  * def sign_of_square(self): # <<<<<<<<<<<<<<
5307  * """
5308  * Sign of geometric square of a Clifford basis element.
5309  */
5310 
5311 /* Python wrapper */
5312 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5313 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 ";
5314 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5315  PyObject *__pyx_r = 0;
5316  __Pyx_RefNannyDeclarations
5317  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5318  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5319 
5320  /* function exit code */
5321  __Pyx_RefNannyFinishContext();
5322  return __pyx_r;
5323 }
5324 
5325 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5326  PyObject *__pyx_r = NULL;
5327  __Pyx_RefNannyDeclarations
5328  PyObject *__pyx_t_1 = NULL;
5329  __Pyx_RefNannySetupContext("sign_of_square", 0);
5330 
5331  /* "PyClical.pyx":380
5332  * -1
5333  * """
5334  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5335  *
5336  * def __repr__(self):
5337  */
5338  __Pyx_XDECREF(__pyx_r);
5339  __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)
5340  __Pyx_GOTREF(__pyx_t_1);
5341  __pyx_r = __pyx_t_1;
5342  __pyx_t_1 = 0;
5343  goto __pyx_L0;
5344 
5345  /* "PyClical.pyx":373
5346  * return self.instance.sign_of_mult(toIndexSet(rhs))
5347  *
5348  * def sign_of_square(self): # <<<<<<<<<<<<<<
5349  * """
5350  * Sign of geometric square of a Clifford basis element.
5351  */
5352 
5353  /* function exit code */
5354  __pyx_L1_error:;
5355  __Pyx_XDECREF(__pyx_t_1);
5356  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5357  __pyx_r = NULL;
5358  __pyx_L0:;
5359  __Pyx_XGIVEREF(__pyx_r);
5360  __Pyx_RefNannyFinishContext();
5361  return __pyx_r;
5362 }
5363 
5364 /* "PyClical.pyx":382
5365  * return self.instance.sign_of_square()
5366  *
5367  * def __repr__(self): # <<<<<<<<<<<<<<
5368  * """
5369  * The official string representation of self.
5370  */
5371 
5372 /* Python wrapper */
5373 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5374 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 ";
5375 #if CYTHON_COMPILING_IN_CPYTHON
5376 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5377 #endif
5378 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5379  PyObject *__pyx_r = 0;
5380  __Pyx_RefNannyDeclarations
5381  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5382  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5383 
5384  /* function exit code */
5385  __Pyx_RefNannyFinishContext();
5386  return __pyx_r;
5387 }
5388 
5389 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5390  PyObject *__pyx_r = NULL;
5391  __Pyx_RefNannyDeclarations
5392  PyObject *__pyx_t_1 = NULL;
5393  __Pyx_RefNannySetupContext("__repr__", 0);
5394 
5395  /* "PyClical.pyx":391
5396  * 'index_set({1,2})'
5397  * """
5398  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5399  *
5400  * def __str__(self):
5401  */
5402  __Pyx_XDECREF(__pyx_r);
5403  __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)
5404  __Pyx_GOTREF(__pyx_t_1);
5405  __pyx_r = __pyx_t_1;
5406  __pyx_t_1 = 0;
5407  goto __pyx_L0;
5408 
5409  /* "PyClical.pyx":382
5410  * return self.instance.sign_of_square()
5411  *
5412  * def __repr__(self): # <<<<<<<<<<<<<<
5413  * """
5414  * The official string representation of self.
5415  */
5416 
5417  /* function exit code */
5418  __pyx_L1_error:;
5419  __Pyx_XDECREF(__pyx_t_1);
5420  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5421  __pyx_r = NULL;
5422  __pyx_L0:;
5423  __Pyx_XGIVEREF(__pyx_r);
5424  __Pyx_RefNannyFinishContext();
5425  return __pyx_r;
5426 }
5427 
5428 /* "PyClical.pyx":393
5429  * return index_set_to_repr( self.unwrap() ).c_str()
5430  *
5431  * def __str__(self): # <<<<<<<<<<<<<<
5432  * """
5433  * The informal string representation of self.
5434  */
5435 
5436 /* Python wrapper */
5437 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5438 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 ";
5439 #if CYTHON_COMPILING_IN_CPYTHON
5440 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5441 #endif
5442 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5443  PyObject *__pyx_r = 0;
5444  __Pyx_RefNannyDeclarations
5445  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5446  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5447 
5448  /* function exit code */
5449  __Pyx_RefNannyFinishContext();
5450  return __pyx_r;
5451 }
5452 
5453 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5454  PyObject *__pyx_r = NULL;
5455  __Pyx_RefNannyDeclarations
5456  PyObject *__pyx_t_1 = NULL;
5457  __Pyx_RefNannySetupContext("__str__", 0);
5458 
5459  /* "PyClical.pyx":402
5460  * '{1,2}'
5461  * """
5462  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5463  *
5464  * def index_set_hidden_doctests():
5465  */
5466  __Pyx_XDECREF(__pyx_r);
5467  __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)
5468  __Pyx_GOTREF(__pyx_t_1);
5469  __pyx_r = __pyx_t_1;
5470  __pyx_t_1 = 0;
5471  goto __pyx_L0;
5472 
5473  /* "PyClical.pyx":393
5474  * return index_set_to_repr( self.unwrap() ).c_str()
5475  *
5476  * def __str__(self): # <<<<<<<<<<<<<<
5477  * """
5478  * The informal string representation of self.
5479  */
5480 
5481  /* function exit code */
5482  __pyx_L1_error:;
5483  __Pyx_XDECREF(__pyx_t_1);
5484  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5485  __pyx_r = NULL;
5486  __pyx_L0:;
5487  __Pyx_XGIVEREF(__pyx_r);
5488  __Pyx_RefNannyFinishContext();
5489  return __pyx_r;
5490 }
5491 
5492 /* "(tree fragment)":1
5493  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5494  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5495  * def __setstate_cython__(self, __pyx_state):
5496  */
5497 
5498 /* Python wrapper */
5499 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5500 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5501  PyObject *__pyx_r = 0;
5502  __Pyx_RefNannyDeclarations
5503  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5504  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5505 
5506  /* function exit code */
5507  __Pyx_RefNannyFinishContext();
5508  return __pyx_r;
5509 }
5510 
5511 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5512  PyObject *__pyx_r = NULL;
5513  __Pyx_RefNannyDeclarations
5514  PyObject *__pyx_t_1 = NULL;
5515  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5516 
5517  /* "(tree fragment)":2
5518  * def __reduce_cython__(self):
5519  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5520  * def __setstate_cython__(self, __pyx_state):
5521  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5522  */
5523  __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)
5524  __Pyx_GOTREF(__pyx_t_1);
5525  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5526  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5527  __PYX_ERR(1, 2, __pyx_L1_error)
5528 
5529  /* "(tree fragment)":1
5530  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5531  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5532  * def __setstate_cython__(self, __pyx_state):
5533  */
5534 
5535  /* function exit code */
5536  __pyx_L1_error:;
5537  __Pyx_XDECREF(__pyx_t_1);
5538  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5539  __pyx_r = NULL;
5540  __Pyx_XGIVEREF(__pyx_r);
5541  __Pyx_RefNannyFinishContext();
5542  return __pyx_r;
5543 }
5544 
5545 /* "(tree fragment)":3
5546  * def __reduce_cython__(self):
5547  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5548  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5549  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5550  */
5551 
5552 /* Python wrapper */
5553 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5554 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5555  PyObject *__pyx_r = 0;
5556  __Pyx_RefNannyDeclarations
5557  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5558  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5559 
5560  /* function exit code */
5561  __Pyx_RefNannyFinishContext();
5562  return __pyx_r;
5563 }
5564 
5565 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) {
5566  PyObject *__pyx_r = NULL;
5567  __Pyx_RefNannyDeclarations
5568  PyObject *__pyx_t_1 = NULL;
5569  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5570 
5571  /* "(tree fragment)":4
5572  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5573  * def __setstate_cython__(self, __pyx_state):
5574  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5575  */
5576  __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)
5577  __Pyx_GOTREF(__pyx_t_1);
5578  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5579  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5580  __PYX_ERR(1, 4, __pyx_L1_error)
5581 
5582  /* "(tree fragment)":3
5583  * def __reduce_cython__(self):
5584  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5585  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5586  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5587  */
5588 
5589  /* function exit code */
5590  __pyx_L1_error:;
5591  __Pyx_XDECREF(__pyx_t_1);
5592  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5593  __pyx_r = NULL;
5594  __Pyx_XGIVEREF(__pyx_r);
5595  __Pyx_RefNannyFinishContext();
5596  return __pyx_r;
5597 }
5598 
5599 /* "PyClical.pyx":404
5600  * return index_set_to_str( self.unwrap() ).c_str()
5601  *
5602  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5603  * """
5604  * Tests for functions that Doctest cannot see.
5605  */
5606 
5607 /* Python wrapper */
5608 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5609 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 ";
5610  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};
5611  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5612  PyObject *__pyx_r = 0;
5613  __Pyx_RefNannyDeclarations
5614  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5615  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5616 
5617  /* function exit code */
5618  __Pyx_RefNannyFinishContext();
5619  return __pyx_r;
5620  }
5621 
5622  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5623  PyObject *__pyx_r = NULL;
5624  __Pyx_RefNannyDeclarations
5625  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5626 
5627  /* "PyClical.pyx":488
5628  * False
5629  * """
5630  * return # <<<<<<<<<<<<<<
5631  *
5632  * cpdef inline compare(lhs,rhs):
5633  */
5634  __Pyx_XDECREF(__pyx_r);
5635  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5636  goto __pyx_L0;
5637 
5638  /* "PyClical.pyx":404
5639  * return index_set_to_str( self.unwrap() ).c_str()
5640  *
5641  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5642  * """
5643  * Tests for functions that Doctest cannot see.
5644  */
5645 
5646  /* function exit code */
5647  __pyx_L0:;
5648  __Pyx_XGIVEREF(__pyx_r);
5649  __Pyx_RefNannyFinishContext();
5650  return __pyx_r;
5651  }
5652 
5653  /* "PyClical.pyx":490
5654  * return
5655  *
5656  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5657  * """
5658  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5659  */
5660 
5661  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5662  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5663  PyObject *__pyx_r = NULL;
5664  __Pyx_RefNannyDeclarations
5665  PyObject *__pyx_t_1 = NULL;
5666  __Pyx_RefNannySetupContext("compare", 0);
5667 
5668  /* "PyClical.pyx":500
5669  * 1
5670  * """
5671  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5672  *
5673  * cpdef inline min_neg(obj):
5674  */
5675  __Pyx_XDECREF(__pyx_r);
5676  __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)
5677  __Pyx_GOTREF(__pyx_t_1);
5678  __pyx_r = __pyx_t_1;
5679  __pyx_t_1 = 0;
5680  goto __pyx_L0;
5681 
5682  /* "PyClical.pyx":490
5683  * return
5684  *
5685  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5686  * """
5687  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5688  */
5689 
5690  /* function exit code */
5691  __pyx_L1_error:;
5692  __Pyx_XDECREF(__pyx_t_1);
5693  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5694  __pyx_r = 0;
5695  __pyx_L0:;
5696  __Pyx_XGIVEREF(__pyx_r);
5697  __Pyx_RefNannyFinishContext();
5698  return __pyx_r;
5699  }
5700 
5701  /* Python wrapper */
5702  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5703  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 ";
5704  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5705  PyObject *__pyx_v_lhs = 0;
5706  PyObject *__pyx_v_rhs = 0;
5707  PyObject *__pyx_r = 0;
5708  __Pyx_RefNannyDeclarations
5709  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5710  {
5711  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5712  PyObject* values[2] = {0,0};
5713  if (unlikely(__pyx_kwds)) {
5714  Py_ssize_t kw_args;
5715  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5716  switch (pos_args) {
5717  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5718  CYTHON_FALLTHROUGH;
5719  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5720  CYTHON_FALLTHROUGH;
5721  case 0: break;
5722  default: goto __pyx_L5_argtuple_error;
5723  }
5724  kw_args = PyDict_Size(__pyx_kwds);
5725  switch (pos_args) {
5726  case 0:
5727  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5728  else goto __pyx_L5_argtuple_error;
5729  CYTHON_FALLTHROUGH;
5730  case 1:
5731  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5732  else {
5733  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5734  }
5735  }
5736  if (unlikely(kw_args > 0)) {
5737  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5738  }
5739  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5740  goto __pyx_L5_argtuple_error;
5741  } else {
5742  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5743  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5744  }
5745  __pyx_v_lhs = values[0];
5746  __pyx_v_rhs = values[1];
5747  }
5748  goto __pyx_L4_argument_unpacking_done;
5749  __pyx_L5_argtuple_error:;
5750  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5751  __pyx_L3_error:;
5752  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5753  __Pyx_RefNannyFinishContext();
5754  return NULL;
5755  __pyx_L4_argument_unpacking_done:;
5756  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5757 
5758  /* function exit code */
5759  __Pyx_RefNannyFinishContext();
5760  return __pyx_r;
5761  }
5762 
5763  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5764  PyObject *__pyx_r = NULL;
5765  __Pyx_RefNannyDeclarations
5766  PyObject *__pyx_t_1 = NULL;
5767  __Pyx_RefNannySetupContext("compare", 0);
5768  __Pyx_XDECREF(__pyx_r);
5769  __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)
5770  __Pyx_GOTREF(__pyx_t_1);
5771  __pyx_r = __pyx_t_1;
5772  __pyx_t_1 = 0;
5773  goto __pyx_L0;
5774 
5775  /* function exit code */
5776  __pyx_L1_error:;
5777  __Pyx_XDECREF(__pyx_t_1);
5778  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5779  __pyx_r = NULL;
5780  __pyx_L0:;
5781  __Pyx_XGIVEREF(__pyx_r);
5782  __Pyx_RefNannyFinishContext();
5783  return __pyx_r;
5784  }
5785 
5786  /* "PyClical.pyx":502
5787  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5788  *
5789  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5790  * """
5791  * Minimum negative index, or 0 if none.
5792  */
5793 
5794  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5795  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5796  PyObject *__pyx_r = NULL;
5797  __Pyx_RefNannyDeclarations
5798  PyObject *__pyx_t_1 = NULL;
5799  __Pyx_RefNannySetupContext("min_neg", 0);
5800 
5801  /* "PyClical.pyx":509
5802  * 0
5803  * """
5804  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5805  *
5806  * cpdef inline max_pos(obj):
5807  */
5808  __Pyx_XDECREF(__pyx_r);
5809  __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)
5810  __Pyx_GOTREF(__pyx_t_1);
5811  __pyx_r = __pyx_t_1;
5812  __pyx_t_1 = 0;
5813  goto __pyx_L0;
5814 
5815  /* "PyClical.pyx":502
5816  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5817  *
5818  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5819  * """
5820  * Minimum negative index, or 0 if none.
5821  */
5822 
5823  /* function exit code */
5824  __pyx_L1_error:;
5825  __Pyx_XDECREF(__pyx_t_1);
5826  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5827  __pyx_r = 0;
5828  __pyx_L0:;
5829  __Pyx_XGIVEREF(__pyx_r);
5830  __Pyx_RefNannyFinishContext();
5831  return __pyx_r;
5832  }
5833 
5834  /* Python wrapper */
5835  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5836  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 ";
5837  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5838  PyObject *__pyx_r = 0;
5839  __Pyx_RefNannyDeclarations
5840  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5841  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5842 
5843  /* function exit code */
5844  __Pyx_RefNannyFinishContext();
5845  return __pyx_r;
5846  }
5847 
5848  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5849  PyObject *__pyx_r = NULL;
5850  __Pyx_RefNannyDeclarations
5851  PyObject *__pyx_t_1 = NULL;
5852  __Pyx_RefNannySetupContext("min_neg", 0);
5853  __Pyx_XDECREF(__pyx_r);
5854  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5855  __Pyx_GOTREF(__pyx_t_1);
5856  __pyx_r = __pyx_t_1;
5857  __pyx_t_1 = 0;
5858  goto __pyx_L0;
5859 
5860  /* function exit code */
5861  __pyx_L1_error:;
5862  __Pyx_XDECREF(__pyx_t_1);
5863  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5864  __pyx_r = NULL;
5865  __pyx_L0:;
5866  __Pyx_XGIVEREF(__pyx_r);
5867  __Pyx_RefNannyFinishContext();
5868  return __pyx_r;
5869  }
5870 
5871  /* "PyClical.pyx":511
5872  * return glucat.min_neg( toIndexSet(obj) )
5873  *
5874  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5875  * """
5876  * Maximum positive index, or 0 if none.
5877  */
5878 
5879  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5880  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5881  PyObject *__pyx_r = NULL;
5882  __Pyx_RefNannyDeclarations
5883  PyObject *__pyx_t_1 = NULL;
5884  __Pyx_RefNannySetupContext("max_pos", 0);
5885 
5886  /* "PyClical.pyx":518
5887  * 2
5888  * """
5889  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5890  *
5891  * cdef inline vector[scalar_t] list_to_vector(lst):
5892  */
5893  __Pyx_XDECREF(__pyx_r);
5894  __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)
5895  __Pyx_GOTREF(__pyx_t_1);
5896  __pyx_r = __pyx_t_1;
5897  __pyx_t_1 = 0;
5898  goto __pyx_L0;
5899 
5900  /* "PyClical.pyx":511
5901  * return glucat.min_neg( toIndexSet(obj) )
5902  *
5903  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5904  * """
5905  * Maximum positive index, or 0 if none.
5906  */
5907 
5908  /* function exit code */
5909  __pyx_L1_error:;
5910  __Pyx_XDECREF(__pyx_t_1);
5911  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5912  __pyx_r = 0;
5913  __pyx_L0:;
5914  __Pyx_XGIVEREF(__pyx_r);
5915  __Pyx_RefNannyFinishContext();
5916  return __pyx_r;
5917  }
5918 
5919  /* Python wrapper */
5920  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5921  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 ";
5922  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5923  PyObject *__pyx_r = 0;
5924  __Pyx_RefNannyDeclarations
5925  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5926  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5927 
5928  /* function exit code */
5929  __Pyx_RefNannyFinishContext();
5930  return __pyx_r;
5931  }
5932 
5933  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5934  PyObject *__pyx_r = NULL;
5935  __Pyx_RefNannyDeclarations
5936  PyObject *__pyx_t_1 = NULL;
5937  __Pyx_RefNannySetupContext("max_pos", 0);
5938  __Pyx_XDECREF(__pyx_r);
5939  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5940  __Pyx_GOTREF(__pyx_t_1);
5941  __pyx_r = __pyx_t_1;
5942  __pyx_t_1 = 0;
5943  goto __pyx_L0;
5944 
5945  /* function exit code */
5946  __pyx_L1_error:;
5947  __Pyx_XDECREF(__pyx_t_1);
5948  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5949  __pyx_r = NULL;
5950  __pyx_L0:;
5951  __Pyx_XGIVEREF(__pyx_r);
5952  __Pyx_RefNannyFinishContext();
5953  return __pyx_r;
5954  }
5955 
5956  /* "PyClical.pyx":520
5957  * return glucat.max_pos( toIndexSet(obj) )
5958  *
5959  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5960  * """
5961  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5962  */
5963 
5964  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5965  std::vector<scalar_t> __pyx_v_v;
5966  PyObject *__pyx_v_s = NULL;
5967  std::vector<scalar_t> __pyx_r;
5968  __Pyx_RefNannyDeclarations
5969  PyObject *__pyx_t_1 = NULL;
5970  Py_ssize_t __pyx_t_2;
5971  PyObject *(*__pyx_t_3)(PyObject *);
5972  PyObject *__pyx_t_4 = NULL;
5973  scalar_t __pyx_t_5;
5974  __Pyx_RefNannySetupContext("list_to_vector", 0);
5975 
5976  /* "PyClical.pyx":525
5977  * """
5978  * cdef vector[scalar_t] v
5979  * for s in lst: # <<<<<<<<<<<<<<
5980  * v.push_back(<scalar_t>s)
5981  * return v
5982  */
5983  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5984  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5985  __pyx_t_3 = NULL;
5986  } else {
5987  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5988  __Pyx_GOTREF(__pyx_t_1);
5989  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5990  }
5991  for (;;) {
5992  if (likely(!__pyx_t_3)) {
5993  if (likely(PyList_CheckExact(__pyx_t_1))) {
5994  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5995  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5996  __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)
5997  #else
5998  __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)
5999  __Pyx_GOTREF(__pyx_t_4);
6000  #endif
6001  } else {
6002  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
6003  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
6004  __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)
6005  #else
6006  __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)
6007  __Pyx_GOTREF(__pyx_t_4);
6008  #endif
6009  }
6010  } else {
6011  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
6012  if (unlikely(!__pyx_t_4)) {
6013  PyObject* exc_type = PyErr_Occurred();
6014  if (exc_type) {
6015  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
6016  else __PYX_ERR(0, 525, __pyx_L1_error)
6017  }
6018  break;
6019  }
6020  __Pyx_GOTREF(__pyx_t_4);
6021  }
6022  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
6023  __pyx_t_4 = 0;
6024 
6025  /* "PyClical.pyx":526
6026  * cdef vector[scalar_t] v
6027  * for s in lst:
6028  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
6029  * return v
6030  *
6031  */
6032  __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)
6033  try {
6034  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
6035  } catch(...) {
6036  __Pyx_CppExn2PyErr();
6037  __PYX_ERR(0, 526, __pyx_L1_error)
6038  }
6039 
6040  /* "PyClical.pyx":525
6041  * """
6042  * cdef vector[scalar_t] v
6043  * for s in lst: # <<<<<<<<<<<<<<
6044  * v.push_back(<scalar_t>s)
6045  * return v
6046  */
6047  }
6048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6049 
6050  /* "PyClical.pyx":527
6051  * for s in lst:
6052  * v.push_back(<scalar_t>s)
6053  * return v # <<<<<<<<<<<<<<
6054  *
6055  * # Forward reference.
6056  */
6057  __pyx_r = __pyx_v_v;
6058  goto __pyx_L0;
6059 
6060  /* "PyClical.pyx":520
6061  * return glucat.max_pos( toIndexSet(obj) )
6062  *
6063  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6064  * """
6065  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6066  */
6067 
6068  /* function exit code */
6069  __pyx_L1_error:;
6070  __Pyx_XDECREF(__pyx_t_1);
6071  __Pyx_XDECREF(__pyx_t_4);
6072  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6073  __Pyx_pretend_to_initialize(&__pyx_r);
6074  __pyx_L0:;
6075  __Pyx_XDECREF(__pyx_v_s);
6076  __Pyx_RefNannyFinishContext();
6077  return __pyx_r;
6078  }
6079 
6080  /* "PyClical.pyx":532
6081  * cdef class clifford
6082  *
6083  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6084  * return clifford(obj).instance[0]
6085  *
6086  */
6087 
6088  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6089  Clifford __pyx_r;
6090  __Pyx_RefNannyDeclarations
6091  PyObject *__pyx_t_1 = NULL;
6092  __Pyx_RefNannySetupContext("toClifford", 0);
6093 
6094  /* "PyClical.pyx":533
6095  *
6096  * cdef inline Clifford toClifford(obj):
6097  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6098  *
6099  * cdef class clifford:
6100  */
6101  __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)
6102  __Pyx_GOTREF(__pyx_t_1);
6103  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6104  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6105  goto __pyx_L0;
6106 
6107  /* "PyClical.pyx":532
6108  * cdef class clifford
6109  *
6110  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6111  * return clifford(obj).instance[0]
6112  *
6113  */
6114 
6115  /* function exit code */
6116  __pyx_L1_error:;
6117  __Pyx_XDECREF(__pyx_t_1);
6118  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6119  __Pyx_pretend_to_initialize(&__pyx_r);
6120  __pyx_L0:;
6121  __Pyx_RefNannyFinishContext();
6122  return __pyx_r;
6123  }
6124 
6125  /* "PyClical.pyx":541
6126  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6127  *
6128  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6129  * """
6130  * Wrap an instance of the C++ class Clifford.
6131  */
6132 
6133  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6134  PyObject *__pyx_r = NULL;
6135  __Pyx_RefNannyDeclarations
6136  __Pyx_RefNannySetupContext("wrap", 0);
6137 
6138  /* "PyClical.pyx":545
6139  * Wrap an instance of the C++ class Clifford.
6140  * """
6141  * self.instance[0] = other # <<<<<<<<<<<<<<
6142  * return self
6143  *
6144  */
6145  (__pyx_v_self->instance[0]) = __pyx_v_other;
6146 
6147  /* "PyClical.pyx":546
6148  * """
6149  * self.instance[0] = other
6150  * return self # <<<<<<<<<<<<<<
6151  *
6152  * cdef inline Clifford unwrap(clifford self):
6153  */
6154  __Pyx_XDECREF(__pyx_r);
6155  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6156  __pyx_r = ((PyObject *)__pyx_v_self);
6157  goto __pyx_L0;
6158 
6159  /* "PyClical.pyx":541
6160  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6161  *
6162  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6163  * """
6164  * Wrap an instance of the C++ class Clifford.
6165  */
6166 
6167  /* function exit code */
6168  __pyx_L0:;
6169  __Pyx_XGIVEREF(__pyx_r);
6170  __Pyx_RefNannyFinishContext();
6171  return __pyx_r;
6172  }
6173 
6174  /* "PyClical.pyx":548
6175  * return self
6176  *
6177  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6178  * """
6179  * Return the wrapped C++ Clifford instance.
6180  */
6181 
6182  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6183  Clifford __pyx_r;
6184  __Pyx_RefNannyDeclarations
6185  __Pyx_RefNannySetupContext("unwrap", 0);
6186 
6187  /* "PyClical.pyx":552
6188  * Return the wrapped C++ Clifford instance.
6189  * """
6190  * return self.instance[0] # <<<<<<<<<<<<<<
6191  *
6192  * cpdef copy(clifford self):
6193  */
6194  __pyx_r = (__pyx_v_self->instance[0]);
6195  goto __pyx_L0;
6196 
6197  /* "PyClical.pyx":548
6198  * return self
6199  *
6200  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6201  * """
6202  * Return the wrapped C++ Clifford instance.
6203  */
6204 
6205  /* function exit code */
6206  __pyx_L0:;
6207  __Pyx_RefNannyFinishContext();
6208  return __pyx_r;
6209  }
6210 
6211  /* "PyClical.pyx":554
6212  * return self.instance[0]
6213  *
6214  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6215  * """
6216  * Copy this clifford object.
6217  */
6218 
6219  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6220  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6221  PyObject *__pyx_r = NULL;
6222  __Pyx_RefNannyDeclarations
6223  PyObject *__pyx_t_1 = NULL;
6224  PyObject *__pyx_t_2 = NULL;
6225  PyObject *__pyx_t_3 = NULL;
6226  PyObject *__pyx_t_4 = NULL;
6227  __Pyx_RefNannySetupContext("copy", 0);
6228  /* Check if called by wrapper */
6229  if (unlikely(__pyx_skip_dispatch)) ;
6230  /* Check if overridden in Python */
6231  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
6232  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6233  static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6234  if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
6235  PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6236  #endif
6237  __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)
6238  __Pyx_GOTREF(__pyx_t_1);
6239  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_8PyClical_8clifford_1copy)) {
6240  __Pyx_XDECREF(__pyx_r);
6241  __Pyx_INCREF(__pyx_t_1);
6242  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6243  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6244  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6245  if (likely(__pyx_t_4)) {
6246  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6247  __Pyx_INCREF(__pyx_t_4);
6248  __Pyx_INCREF(function);
6249  __Pyx_DECREF_SET(__pyx_t_3, function);
6250  }
6251  }
6252  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
6253  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6254  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6255  __Pyx_GOTREF(__pyx_t_2);
6256  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6257  __pyx_r = __pyx_t_2;
6258  __pyx_t_2 = 0;
6259  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6260  goto __pyx_L0;
6261  }
6262  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6263  __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
6264  __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
6265  if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
6266  __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
6267  }
6268  #endif
6269  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6270  #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
6271  }
6272  #endif
6273  }
6274 
6275  /* "PyClical.pyx":561
6276  * {2}
6277  * """
6278  * return clifford(self) # <<<<<<<<<<<<<<
6279  *
6280  * def __cinit__(self, other = 0, ixt = None):
6281  */
6282  __Pyx_XDECREF(__pyx_r);
6283  __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)
6284  __Pyx_GOTREF(__pyx_t_1);
6285  __pyx_r = __pyx_t_1;
6286  __pyx_t_1 = 0;
6287  goto __pyx_L0;
6288 
6289  /* "PyClical.pyx":554
6290  * return self.instance[0]
6291  *
6292  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6293  * """
6294  * Copy this clifford object.
6295  */
6296 
6297  /* function exit code */
6298  __pyx_L1_error:;
6299  __Pyx_XDECREF(__pyx_t_1);
6300  __Pyx_XDECREF(__pyx_t_2);
6301  __Pyx_XDECREF(__pyx_t_3);
6302  __Pyx_XDECREF(__pyx_t_4);
6303  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6304  __pyx_r = 0;
6305  __pyx_L0:;
6306  __Pyx_XGIVEREF(__pyx_r);
6307  __Pyx_RefNannyFinishContext();
6308  return __pyx_r;
6309  }
6310 
6311  /* Python wrapper */
6312  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6313  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 ";
6314  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6315  PyObject *__pyx_r = 0;
6316  __Pyx_RefNannyDeclarations
6317  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6318  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6319 
6320  /* function exit code */
6321  __Pyx_RefNannyFinishContext();
6322  return __pyx_r;
6323  }
6324 
6325  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6326  PyObject *__pyx_r = NULL;
6327  __Pyx_RefNannyDeclarations
6328  PyObject *__pyx_t_1 = NULL;
6329  __Pyx_RefNannySetupContext("copy", 0);
6330  __Pyx_XDECREF(__pyx_r);
6331  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6332  __Pyx_GOTREF(__pyx_t_1);
6333  __pyx_r = __pyx_t_1;
6334  __pyx_t_1 = 0;
6335  goto __pyx_L0;
6336 
6337  /* function exit code */
6338  __pyx_L1_error:;
6339  __Pyx_XDECREF(__pyx_t_1);
6340  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6341  __pyx_r = NULL;
6342  __pyx_L0:;
6343  __Pyx_XGIVEREF(__pyx_r);
6344  __Pyx_RefNannyFinishContext();
6345  return __pyx_r;
6346  }
6347 
6348  /* "PyClical.pyx":563
6349  * return clifford(self)
6350  *
6351  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6352  * """
6353  * Construct an object of type clifford.
6354  */
6355 
6356  /* Python wrapper */
6357  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6358  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6359  PyObject *__pyx_v_other = 0;
6360  PyObject *__pyx_v_ixt = 0;
6361  int __pyx_r;
6362  __Pyx_RefNannyDeclarations
6363  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6364  {
6365  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6366  PyObject* values[2] = {0,0};
6367  values[0] = ((PyObject *)__pyx_int_0);
6368  values[1] = ((PyObject *)Py_None);
6369  if (unlikely(__pyx_kwds)) {
6370  Py_ssize_t kw_args;
6371  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6372  switch (pos_args) {
6373  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6374  CYTHON_FALLTHROUGH;
6375  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6376  CYTHON_FALLTHROUGH;
6377  case 0: break;
6378  default: goto __pyx_L5_argtuple_error;
6379  }
6380  kw_args = PyDict_Size(__pyx_kwds);
6381  switch (pos_args) {
6382  case 0:
6383  if (kw_args > 0) {
6384  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6385  if (value) { values[0] = value; kw_args--; }
6386  }
6387  CYTHON_FALLTHROUGH;
6388  case 1:
6389  if (kw_args > 0) {
6390  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6391  if (value) { values[1] = value; kw_args--; }
6392  }
6393  }
6394  if (unlikely(kw_args > 0)) {
6395  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6396  }
6397  } else {
6398  switch (PyTuple_GET_SIZE(__pyx_args)) {
6399  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6400  CYTHON_FALLTHROUGH;
6401  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6402  CYTHON_FALLTHROUGH;
6403  case 0: break;
6404  default: goto __pyx_L5_argtuple_error;
6405  }
6406  }
6407  __pyx_v_other = values[0];
6408  __pyx_v_ixt = values[1];
6409  }
6410  goto __pyx_L4_argument_unpacking_done;
6411  __pyx_L5_argtuple_error:;
6412  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6413  __pyx_L3_error:;
6414  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6415  __Pyx_RefNannyFinishContext();
6416  return -1;
6417  __pyx_L4_argument_unpacking_done:;
6418  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6419 
6420  /* function exit code */
6421  __Pyx_RefNannyFinishContext();
6422  return __pyx_r;
6423  }
6424 
6425  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6426  PyObject *__pyx_v_error_msg_prefix = NULL;
6427  PyObject *__pyx_v_err = NULL;
6428  int __pyx_r;
6429  __Pyx_RefNannyDeclarations
6430  int __pyx_t_1;
6431  int __pyx_t_2;
6432  PyObject *__pyx_t_3 = NULL;
6433  PyObject *__pyx_t_4 = NULL;
6434  PyObject *__pyx_t_5 = NULL;
6435  Clifford *__pyx_t_6;
6436  PyObject *__pyx_t_7 = NULL;
6437  PyObject *__pyx_t_8 = NULL;
6438  scalar_t __pyx_t_9;
6439  PyObject *__pyx_t_10 = NULL;
6440  PyObject *__pyx_t_11 = NULL;
6441  PyObject *__pyx_t_12 = NULL;
6442  char *__pyx_t_13;
6443  int __pyx_t_14;
6444  PyObject *__pyx_t_15 = NULL;
6445  PyObject *__pyx_t_16 = NULL;
6446  PyObject *__pyx_t_17 = NULL;
6447  PyObject *__pyx_t_18 = NULL;
6448  __Pyx_RefNannySetupContext("__cinit__", 0);
6449 
6450  /* "PyClical.pyx":588
6451  * 2{1}+3{2}
6452  * """
6453  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6454  * if ixt is None:
6455  * try:
6456  */
6457  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6458  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6459 
6460  /* "PyClical.pyx":589
6461  * """
6462  * error_msg_prefix = "Cannot initialize clifford object from"
6463  * if ixt is None: # <<<<<<<<<<<<<<
6464  * try:
6465  * if isinstance(other, clifford):
6466  */
6467  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6468  __pyx_t_2 = (__pyx_t_1 != 0);
6469  if (__pyx_t_2) {
6470 
6471  /* "PyClical.pyx":590
6472  * error_msg_prefix = "Cannot initialize clifford object from"
6473  * if ixt is None:
6474  * try: # <<<<<<<<<<<<<<
6475  * if isinstance(other, clifford):
6476  * self.instance = new Clifford((<clifford>other).unwrap())
6477  */
6478  {
6479  __Pyx_PyThreadState_declare
6480  __Pyx_PyThreadState_assign
6481  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6482  __Pyx_XGOTREF(__pyx_t_3);
6483  __Pyx_XGOTREF(__pyx_t_4);
6484  __Pyx_XGOTREF(__pyx_t_5);
6485  /*try:*/ {
6486 
6487  /* "PyClical.pyx":591
6488  * if ixt is None:
6489  * try:
6490  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6491  * self.instance = new Clifford((<clifford>other).unwrap())
6492  * elif isinstance(other, index_set):
6493  */
6494  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6495  __pyx_t_1 = (__pyx_t_2 != 0);
6496  if (__pyx_t_1) {
6497 
6498  /* "PyClical.pyx":592
6499  * try:
6500  * if isinstance(other, clifford):
6501  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6502  * elif isinstance(other, index_set):
6503  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6504  */
6505  try {
6506  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6507  } catch(...) {
6508  __Pyx_CppExn2PyErr();
6509  __PYX_ERR(0, 592, __pyx_L4_error)
6510  }
6511  __pyx_v_self->instance = __pyx_t_6;
6512 
6513  /* "PyClical.pyx":591
6514  * if ixt is None:
6515  * try:
6516  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6517  * self.instance = new Clifford((<clifford>other).unwrap())
6518  * elif isinstance(other, index_set):
6519  */
6520  goto __pyx_L10;
6521  }
6522 
6523  /* "PyClical.pyx":593
6524  * if isinstance(other, clifford):
6525  * self.instance = new Clifford((<clifford>other).unwrap())
6526  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6527  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6528  * elif isinstance(other, numbers.Real):
6529  */
6530  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6531  __pyx_t_2 = (__pyx_t_1 != 0);
6532  if (__pyx_t_2) {
6533 
6534  /* "PyClical.pyx":594
6535  * self.instance = new Clifford((<clifford>other).unwrap())
6536  * elif isinstance(other, index_set):
6537  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6538  * elif isinstance(other, numbers.Real):
6539  * self.instance = new Clifford(<scalar_t>other)
6540  */
6541  try {
6542  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6543  } catch(...) {
6544  __Pyx_CppExn2PyErr();
6545  __PYX_ERR(0, 594, __pyx_L4_error)
6546  }
6547  __pyx_v_self->instance = __pyx_t_6;
6548 
6549  /* "PyClical.pyx":593
6550  * if isinstance(other, clifford):
6551  * self.instance = new Clifford((<clifford>other).unwrap())
6552  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6553  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6554  * elif isinstance(other, numbers.Real):
6555  */
6556  goto __pyx_L10;
6557  }
6558 
6559  /* "PyClical.pyx":595
6560  * elif isinstance(other, index_set):
6561  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6562  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6563  * self.instance = new Clifford(<scalar_t>other)
6564  * elif isinstance(other, str):
6565  */
6566  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6567  __Pyx_GOTREF(__pyx_t_7);
6568  __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)
6569  __Pyx_GOTREF(__pyx_t_8);
6570  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6571  __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)
6572  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6573  __pyx_t_1 = (__pyx_t_2 != 0);
6574  if (__pyx_t_1) {
6575 
6576  /* "PyClical.pyx":596
6577  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6578  * elif isinstance(other, numbers.Real):
6579  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6580  * elif isinstance(other, str):
6581  * try:
6582  */
6583  __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)
6584  try {
6585  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6586  } catch(...) {
6587  __Pyx_CppExn2PyErr();
6588  __PYX_ERR(0, 596, __pyx_L4_error)
6589  }
6590  __pyx_v_self->instance = __pyx_t_6;
6591 
6592  /* "PyClical.pyx":595
6593  * elif isinstance(other, index_set):
6594  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6595  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6596  * self.instance = new Clifford(<scalar_t>other)
6597  * elif isinstance(other, str):
6598  */
6599  goto __pyx_L10;
6600  }
6601 
6602  /* "PyClical.pyx":597
6603  * elif isinstance(other, numbers.Real):
6604  * self.instance = new Clifford(<scalar_t>other)
6605  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6606  * try:
6607  * self.instance = new Clifford(<char *>other)
6608  */
6609  __pyx_t_1 = PyString_Check(__pyx_v_other);
6610  __pyx_t_2 = (__pyx_t_1 != 0);
6611  if (likely(__pyx_t_2)) {
6612 
6613  /* "PyClical.pyx":598
6614  * self.instance = new Clifford(<scalar_t>other)
6615  * elif isinstance(other, str):
6616  * try: # <<<<<<<<<<<<<<
6617  * self.instance = new Clifford(<char *>other)
6618  * except RuntimeError:
6619  */
6620  {
6621  __Pyx_PyThreadState_declare
6622  __Pyx_PyThreadState_assign
6623  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6624  __Pyx_XGOTREF(__pyx_t_10);
6625  __Pyx_XGOTREF(__pyx_t_11);
6626  __Pyx_XGOTREF(__pyx_t_12);
6627  /*try:*/ {
6628 
6629  /* "PyClical.pyx":599
6630  * elif isinstance(other, str):
6631  * try:
6632  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6633  * except RuntimeError:
6634  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6635  */
6636  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6637  try {
6638  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6639  } catch(...) {
6640  __Pyx_CppExn2PyErr();
6641  __PYX_ERR(0, 599, __pyx_L11_error)
6642  }
6643  __pyx_v_self->instance = __pyx_t_6;
6644 
6645  /* "PyClical.pyx":598
6646  * self.instance = new Clifford(<scalar_t>other)
6647  * elif isinstance(other, str):
6648  * try: # <<<<<<<<<<<<<<
6649  * self.instance = new Clifford(<char *>other)
6650  * except RuntimeError:
6651  */
6652  }
6653  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6654  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6655  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6656  goto __pyx_L16_try_end;
6657  __pyx_L11_error:;
6658  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6659  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6660 
6661  /* "PyClical.pyx":600
6662  * try:
6663  * self.instance = new Clifford(<char *>other)
6664  * except RuntimeError: # <<<<<<<<<<<<<<
6665  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6666  * else:
6667  */
6668  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6669  if (__pyx_t_14) {
6670  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6671  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6672  __Pyx_GOTREF(__pyx_t_8);
6673  __Pyx_GOTREF(__pyx_t_7);
6674  __Pyx_GOTREF(__pyx_t_15);
6675 
6676  /* "PyClical.pyx":601
6677  * self.instance = new Clifford(<char *>other)
6678  * except RuntimeError:
6679  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6680  * else:
6681  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6682  */
6683  __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)
6684  __Pyx_GOTREF(__pyx_t_16);
6685  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6686  __Pyx_GOTREF(__pyx_t_17);
6687  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6688  __Pyx_GOTREF(__pyx_t_18);
6689  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6690  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6691  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6692  __Pyx_GOTREF(__pyx_t_17);
6693  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6694  __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)
6695  __Pyx_GOTREF(__pyx_t_18);
6696  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6697  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6698  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6699  __PYX_ERR(0, 601, __pyx_L13_except_error)
6700  }
6701  goto __pyx_L13_except_error;
6702  __pyx_L13_except_error:;
6703 
6704  /* "PyClical.pyx":598
6705  * self.instance = new Clifford(<scalar_t>other)
6706  * elif isinstance(other, str):
6707  * try: # <<<<<<<<<<<<<<
6708  * self.instance = new Clifford(<char *>other)
6709  * except RuntimeError:
6710  */
6711  __Pyx_XGIVEREF(__pyx_t_10);
6712  __Pyx_XGIVEREF(__pyx_t_11);
6713  __Pyx_XGIVEREF(__pyx_t_12);
6714  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6715  goto __pyx_L4_error;
6716  __pyx_L16_try_end:;
6717  }
6718 
6719  /* "PyClical.pyx":597
6720  * elif isinstance(other, numbers.Real):
6721  * self.instance = new Clifford(<scalar_t>other)
6722  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6723  * try:
6724  * self.instance = new Clifford(<char *>other)
6725  */
6726  goto __pyx_L10;
6727  }
6728 
6729  /* "PyClical.pyx":603
6730  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6731  * else:
6732  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6733  * except RuntimeError as err:
6734  * raise ValueError(error_msg_prefix + " " + str(type(other))
6735  */
6736  /*else*/ {
6737  __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)
6738  __Pyx_GOTREF(__pyx_t_15);
6739  __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)
6740  __Pyx_GOTREF(__pyx_t_7);
6741  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6742  __Pyx_GOTREF(__pyx_t_8);
6743  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6744  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6745  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6746  __Pyx_GOTREF(__pyx_t_7);
6747  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6748  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6749  __Pyx_GOTREF(__pyx_t_8);
6750  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6751  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6752  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6753  __PYX_ERR(0, 603, __pyx_L4_error)
6754  }
6755  __pyx_L10:;
6756 
6757  /* "PyClical.pyx":590
6758  * error_msg_prefix = "Cannot initialize clifford object from"
6759  * if ixt is None:
6760  * try: # <<<<<<<<<<<<<<
6761  * if isinstance(other, clifford):
6762  * self.instance = new Clifford((<clifford>other).unwrap())
6763  */
6764  }
6765  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6766  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6767  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6768  goto __pyx_L9_try_end;
6769  __pyx_L4_error:;
6770  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6771  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6772  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6773  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6774  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6775  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6776 
6777  /* "PyClical.pyx":604
6778  * else:
6779  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6780  * except RuntimeError as err: # <<<<<<<<<<<<<<
6781  * raise ValueError(error_msg_prefix + " " + str(type(other))
6782  * + " value " + repr(other) + ":"
6783  */
6784  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6785  if (__pyx_t_14) {
6786  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6787  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6788  __Pyx_GOTREF(__pyx_t_8);
6789  __Pyx_GOTREF(__pyx_t_7);
6790  __Pyx_GOTREF(__pyx_t_15);
6791  __Pyx_INCREF(__pyx_t_7);
6792  __pyx_v_err = __pyx_t_7;
6793 
6794  /* "PyClical.pyx":605
6795  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6796  * except RuntimeError as err:
6797  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6798  * + " value " + repr(other) + ":"
6799  * + "\n\t" + str(err))
6800  */
6801  __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)
6802  __Pyx_GOTREF(__pyx_t_18);
6803  __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)
6804  __Pyx_GOTREF(__pyx_t_17);
6805  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6806  __Pyx_GOTREF(__pyx_t_16);
6807  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6808  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6809 
6810  /* "PyClical.pyx":606
6811  * except RuntimeError as err:
6812  * raise ValueError(error_msg_prefix + " " + str(type(other))
6813  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6814  * + "\n\t" + str(err))
6815  * elif isinstance(ixt, index_set):
6816  */
6817  __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)
6818  __Pyx_GOTREF(__pyx_t_17);
6819  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6820  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6821  __Pyx_GOTREF(__pyx_t_16);
6822  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6823  __Pyx_GOTREF(__pyx_t_18);
6824  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6825  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6826  __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)
6827  __Pyx_GOTREF(__pyx_t_16);
6828  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6829 
6830  /* "PyClical.pyx":607
6831  * raise ValueError(error_msg_prefix + " " + str(type(other))
6832  * + " value " + repr(other) + ":"
6833  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6834  * elif isinstance(ixt, index_set):
6835  * if isinstance(other, numbers.Real):
6836  */
6837  __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)
6838  __Pyx_GOTREF(__pyx_t_18);
6839  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6840  __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)
6841  __Pyx_GOTREF(__pyx_t_16);
6842  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6843  __Pyx_GOTREF(__pyx_t_17);
6844  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6845  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6846 
6847  /* "PyClical.pyx":605
6848  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6849  * except RuntimeError as err:
6850  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6851  * + " value " + repr(other) + ":"
6852  * + "\n\t" + str(err))
6853  */
6854  __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)
6855  __Pyx_GOTREF(__pyx_t_16);
6856  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6857  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6858  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6859  __PYX_ERR(0, 605, __pyx_L6_except_error)
6860  }
6861  goto __pyx_L6_except_error;
6862  __pyx_L6_except_error:;
6863 
6864  /* "PyClical.pyx":590
6865  * error_msg_prefix = "Cannot initialize clifford object from"
6866  * if ixt is None:
6867  * try: # <<<<<<<<<<<<<<
6868  * if isinstance(other, clifford):
6869  * self.instance = new Clifford((<clifford>other).unwrap())
6870  */
6871  __Pyx_XGIVEREF(__pyx_t_3);
6872  __Pyx_XGIVEREF(__pyx_t_4);
6873  __Pyx_XGIVEREF(__pyx_t_5);
6874  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6875  goto __pyx_L1_error;
6876  __pyx_L9_try_end:;
6877  }
6878 
6879  /* "PyClical.pyx":589
6880  * """
6881  * error_msg_prefix = "Cannot initialize clifford object from"
6882  * if ixt is None: # <<<<<<<<<<<<<<
6883  * try:
6884  * if isinstance(other, clifford):
6885  */
6886  goto __pyx_L3;
6887  }
6888 
6889  /* "PyClical.pyx":608
6890  * + " value " + repr(other) + ":"
6891  * + "\n\t" + str(err))
6892  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6893  * if isinstance(other, numbers.Real):
6894  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6895  */
6896  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6897  __pyx_t_1 = (__pyx_t_2 != 0);
6898  if (likely(__pyx_t_1)) {
6899 
6900  /* "PyClical.pyx":609
6901  * + "\n\t" + str(err))
6902  * elif isinstance(ixt, index_set):
6903  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6904  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6905  * elif isinstance(other, collections.Sequence):
6906  */
6907  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6908  __Pyx_GOTREF(__pyx_t_15);
6909  __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)
6910  __Pyx_GOTREF(__pyx_t_7);
6911  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6912  __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)
6913  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6914  __pyx_t_2 = (__pyx_t_1 != 0);
6915  if (__pyx_t_2) {
6916 
6917  /* "PyClical.pyx":610
6918  * elif isinstance(ixt, index_set):
6919  * if isinstance(other, numbers.Real):
6920  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6921  * elif isinstance(other, collections.Sequence):
6922  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6923  */
6924  __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)
6925  try {
6926  __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));
6927  } catch(...) {
6928  __Pyx_CppExn2PyErr();
6929  __PYX_ERR(0, 610, __pyx_L1_error)
6930  }
6931  __pyx_v_self->instance = __pyx_t_6;
6932 
6933  /* "PyClical.pyx":609
6934  * + "\n\t" + str(err))
6935  * elif isinstance(ixt, index_set):
6936  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6937  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6938  * elif isinstance(other, collections.Sequence):
6939  */
6940  goto __pyx_L21;
6941  }
6942 
6943  /* "PyClical.pyx":611
6944  * if isinstance(other, numbers.Real):
6945  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6946  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6947  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6948  * else:
6949  */
6950  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6951  __Pyx_GOTREF(__pyx_t_7);
6952  __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)
6953  __Pyx_GOTREF(__pyx_t_15);
6954  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6955  __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)
6956  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6957  __pyx_t_1 = (__pyx_t_2 != 0);
6958  if (likely(__pyx_t_1)) {
6959 
6960  /* "PyClical.pyx":612
6961  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6962  * elif isinstance(other, collections.Sequence):
6963  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6964  * else:
6965  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6966  */
6967  try {
6968  __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)));
6969  } catch(...) {
6970  __Pyx_CppExn2PyErr();
6971  __PYX_ERR(0, 612, __pyx_L1_error)
6972  }
6973  __pyx_v_self->instance = __pyx_t_6;
6974 
6975  /* "PyClical.pyx":611
6976  * if isinstance(other, numbers.Real):
6977  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6978  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6979  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6980  * else:
6981  */
6982  goto __pyx_L21;
6983  }
6984 
6985  /* "PyClical.pyx":614
6986  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6987  * else:
6988  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6989  * + ", " + repr(ixt) + ").")
6990  * else:
6991  */
6992  /*else*/ {
6993  __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)
6994  __Pyx_GOTREF(__pyx_t_15);
6995  __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)
6996  __Pyx_GOTREF(__pyx_t_7);
6997  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6998  __Pyx_GOTREF(__pyx_t_8);
6999  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7000  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7001 
7002  /* "PyClical.pyx":615
7003  * else:
7004  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7005  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
7006  * else:
7007  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7008  */
7009  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
7010  __Pyx_GOTREF(__pyx_t_7);
7011  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7012  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7013  __Pyx_GOTREF(__pyx_t_8);
7014  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
7015  __Pyx_GOTREF(__pyx_t_15);
7016  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7017  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7018  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
7019  __Pyx_GOTREF(__pyx_t_8);
7020  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7021 
7022  /* "PyClical.pyx":614
7023  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
7024  * else:
7025  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7026  * + ", " + repr(ixt) + ").")
7027  * else:
7028  */
7029  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
7030  __Pyx_GOTREF(__pyx_t_15);
7031  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7032  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7033  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7034  __PYX_ERR(0, 614, __pyx_L1_error)
7035  }
7036  __pyx_L21:;
7037 
7038  /* "PyClical.pyx":608
7039  * + " value " + repr(other) + ":"
7040  * + "\n\t" + str(err))
7041  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7042  * if isinstance(other, numbers.Real):
7043  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
7044  */
7045  goto __pyx_L3;
7046  }
7047 
7048  /* "PyClical.pyx":617
7049  * + ", " + repr(ixt) + ").")
7050  * else:
7051  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7052  * + ", " + str(type(ixt)) + ").")
7053  *
7054  */
7055  /*else*/ {
7056  __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)
7057  __Pyx_GOTREF(__pyx_t_15);
7058  __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)
7059  __Pyx_GOTREF(__pyx_t_8);
7060  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
7061  __Pyx_GOTREF(__pyx_t_7);
7062  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7063  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7064 
7065  /* "PyClical.pyx":618
7066  * else:
7067  * raise TypeError(error_msg_prefix + " (" + str(type(other))
7068  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7069  *
7070  * def __dealloc__(self):
7071  */
7072  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
7073  __Pyx_GOTREF(__pyx_t_8);
7074  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7075  __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)
7076  __Pyx_GOTREF(__pyx_t_7);
7077  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7078  __Pyx_GOTREF(__pyx_t_15);
7079  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7080  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7081  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7082  __Pyx_GOTREF(__pyx_t_7);
7083  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7084 
7085  /* "PyClical.pyx":617
7086  * + ", " + repr(ixt) + ").")
7087  * else:
7088  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7089  * + ", " + str(type(ixt)) + ").")
7090  *
7091  */
7092  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7093  __Pyx_GOTREF(__pyx_t_15);
7094  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7095  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7096  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7097  __PYX_ERR(0, 617, __pyx_L1_error)
7098  }
7099  __pyx_L3:;
7100 
7101  /* "PyClical.pyx":563
7102  * return clifford(self)
7103  *
7104  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7105  * """
7106  * Construct an object of type clifford.
7107  */
7108 
7109  /* function exit code */
7110  __pyx_r = 0;
7111  goto __pyx_L0;
7112  __pyx_L1_error:;
7113  __Pyx_XDECREF(__pyx_t_7);
7114  __Pyx_XDECREF(__pyx_t_8);
7115  __Pyx_XDECREF(__pyx_t_15);
7116  __Pyx_XDECREF(__pyx_t_16);
7117  __Pyx_XDECREF(__pyx_t_17);
7118  __Pyx_XDECREF(__pyx_t_18);
7119  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7120  __pyx_r = -1;
7121  __pyx_L0:;
7122  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7123  __Pyx_XDECREF(__pyx_v_err);
7124  __Pyx_RefNannyFinishContext();
7125  return __pyx_r;
7126  }
7127 
7128  /* "PyClical.pyx":620
7129  * + ", " + str(type(ixt)) + ").")
7130  *
7131  * def __dealloc__(self): # <<<<<<<<<<<<<<
7132  * """
7133  * Clean up by deallocating the instance of C++ class Clifford.
7134  */
7135 
7136  /* Python wrapper */
7137  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7138  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7139  __Pyx_RefNannyDeclarations
7140  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7141  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7142 
7143  /* function exit code */
7144  __Pyx_RefNannyFinishContext();
7145  }
7146 
7147  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7148  __Pyx_RefNannyDeclarations
7149  __Pyx_RefNannySetupContext("__dealloc__", 0);
7150 
7151  /* "PyClical.pyx":624
7152  * Clean up by deallocating the instance of C++ class Clifford.
7153  * """
7154  * del self.instance # <<<<<<<<<<<<<<
7155  *
7156  * def __contains__(self, x):
7157  */
7158  delete __pyx_v_self->instance;
7159 
7160  /* "PyClical.pyx":620
7161  * + ", " + str(type(ixt)) + ").")
7162  *
7163  * def __dealloc__(self): # <<<<<<<<<<<<<<
7164  * """
7165  * Clean up by deallocating the instance of C++ class Clifford.
7166  */
7167 
7168  /* function exit code */
7169  __Pyx_RefNannyFinishContext();
7170  }
7171 
7172  /* "PyClical.pyx":626
7173  * del self.instance
7174  *
7175  * def __contains__(self, x): # <<<<<<<<<<<<<<
7176  * """
7177  * Not applicable.
7178  */
7179 
7180  /* Python wrapper */
7181  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7182  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 ";
7183  #if CYTHON_COMPILING_IN_CPYTHON
7184  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7185  #endif
7186  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7187  int __pyx_r;
7188  __Pyx_RefNannyDeclarations
7189  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7190  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7191 
7192  /* function exit code */
7193  __Pyx_RefNannyFinishContext();
7194  return __pyx_r;
7195  }
7196 
7197  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7198  int __pyx_r;
7199  __Pyx_RefNannyDeclarations
7200  PyObject *__pyx_t_1 = NULL;
7201  __Pyx_RefNannySetupContext("__contains__", 0);
7202 
7203  /* "PyClical.pyx":635
7204  * TypeError: Not applicable.
7205  * """
7206  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7207  *
7208  * def __iter__(self):
7209  */
7210  __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)
7211  __Pyx_GOTREF(__pyx_t_1);
7212  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7213  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7214  __PYX_ERR(0, 635, __pyx_L1_error)
7215 
7216  /* "PyClical.pyx":626
7217  * del self.instance
7218  *
7219  * def __contains__(self, x): # <<<<<<<<<<<<<<
7220  * """
7221  * Not applicable.
7222  */
7223 
7224  /* function exit code */
7225  __pyx_L1_error:;
7226  __Pyx_XDECREF(__pyx_t_1);
7227  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7228  __pyx_r = -1;
7229  __Pyx_RefNannyFinishContext();
7230  return __pyx_r;
7231  }
7232 
7233  /* "PyClical.pyx":637
7234  * raise TypeError("Not applicable.")
7235  *
7236  * def __iter__(self): # <<<<<<<<<<<<<<
7237  * """
7238  * Not applicable.
7239  */
7240 
7241  /* Python wrapper */
7242  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7243  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 ";
7244  #if CYTHON_COMPILING_IN_CPYTHON
7245  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7246  #endif
7247  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7248  PyObject *__pyx_r = 0;
7249  __Pyx_RefNannyDeclarations
7250  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7251  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7252 
7253  /* function exit code */
7254  __Pyx_RefNannyFinishContext();
7255  return __pyx_r;
7256  }
7257 
7258  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7259  PyObject *__pyx_r = NULL;
7260  __Pyx_RefNannyDeclarations
7261  PyObject *__pyx_t_1 = NULL;
7262  __Pyx_RefNannySetupContext("__iter__", 0);
7263 
7264  /* "PyClical.pyx":646
7265  * TypeError: Not applicable.
7266  * """
7267  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7268  *
7269  * def reframe(self, ixt):
7270  */
7271  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
7272  __Pyx_GOTREF(__pyx_t_1);
7273  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7274  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7275  __PYX_ERR(0, 646, __pyx_L1_error)
7276 
7277  /* "PyClical.pyx":637
7278  * raise TypeError("Not applicable.")
7279  *
7280  * def __iter__(self): # <<<<<<<<<<<<<<
7281  * """
7282  * Not applicable.
7283  */
7284 
7285  /* function exit code */
7286  __pyx_L1_error:;
7287  __Pyx_XDECREF(__pyx_t_1);
7288  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7289  __pyx_r = NULL;
7290  __Pyx_XGIVEREF(__pyx_r);
7291  __Pyx_RefNannyFinishContext();
7292  return __pyx_r;
7293  }
7294 
7295  /* "PyClical.pyx":648
7296  * raise TypeError("Not applicable.")
7297  *
7298  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7299  * """
7300  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7301  */
7302 
7303  /* Python wrapper */
7304  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7305  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 ";
7306  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7307  PyObject *__pyx_r = 0;
7308  __Pyx_RefNannyDeclarations
7309  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7310  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7311 
7312  /* function exit code */
7313  __Pyx_RefNannyFinishContext();
7314  return __pyx_r;
7315  }
7316 
7317  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7318  PyObject *__pyx_v_error_msg_prefix = NULL;
7319  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7320  PyObject *__pyx_v_err = NULL;
7321  PyObject *__pyx_r = NULL;
7322  __Pyx_RefNannyDeclarations
7323  int __pyx_t_1;
7324  int __pyx_t_2;
7325  PyObject *__pyx_t_3 = NULL;
7326  PyObject *__pyx_t_4 = NULL;
7327  PyObject *__pyx_t_5 = NULL;
7328  PyObject *__pyx_t_6 = NULL;
7329  Clifford *__pyx_t_7;
7330  int __pyx_t_8;
7331  PyObject *__pyx_t_9 = NULL;
7332  PyObject *__pyx_t_10 = NULL;
7333  PyObject *__pyx_t_11 = NULL;
7334  PyObject *__pyx_t_12 = NULL;
7335  PyObject *__pyx_t_13 = NULL;
7336  __Pyx_RefNannySetupContext("reframe", 0);
7337 
7338  /* "PyClical.pyx":658
7339  * True
7340  * """
7341  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7342  * if isinstance(ixt, index_set):
7343  * try:
7344  */
7345  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7346  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7347 
7348  /* "PyClical.pyx":659
7349  * """
7350  * error_msg_prefix = "Cannot reframe"
7351  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7352  * try:
7353  * result = clifford()
7354  */
7355  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7356  __pyx_t_2 = (__pyx_t_1 != 0);
7357  if (likely(__pyx_t_2)) {
7358 
7359  /* "PyClical.pyx":660
7360  * error_msg_prefix = "Cannot reframe"
7361  * if isinstance(ixt, index_set):
7362  * try: # <<<<<<<<<<<<<<
7363  * result = clifford()
7364  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7365  */
7366  {
7367  __Pyx_PyThreadState_declare
7368  __Pyx_PyThreadState_assign
7369  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7370  __Pyx_XGOTREF(__pyx_t_3);
7371  __Pyx_XGOTREF(__pyx_t_4);
7372  __Pyx_XGOTREF(__pyx_t_5);
7373  /*try:*/ {
7374 
7375  /* "PyClical.pyx":661
7376  * if isinstance(ixt, index_set):
7377  * try:
7378  * result = clifford() # <<<<<<<<<<<<<<
7379  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7380  * except RuntimeError as err:
7381  */
7382  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7383  __Pyx_GOTREF(__pyx_t_6);
7384  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7385  __pyx_t_6 = 0;
7386 
7387  /* "PyClical.pyx":662
7388  * try:
7389  * result = clifford()
7390  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7391  * except RuntimeError as err:
7392  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7393  */
7394  try {
7395  __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)));
7396  } catch(...) {
7397  __Pyx_CppExn2PyErr();
7398  __PYX_ERR(0, 662, __pyx_L4_error)
7399  }
7400  __pyx_v_result->instance = __pyx_t_7;
7401 
7402  /* "PyClical.pyx":660
7403  * error_msg_prefix = "Cannot reframe"
7404  * if isinstance(ixt, index_set):
7405  * try: # <<<<<<<<<<<<<<
7406  * result = clifford()
7407  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7408  */
7409  }
7410  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7411  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7412  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7413  goto __pyx_L9_try_end;
7414  __pyx_L4_error:;
7415  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7416 
7417  /* "PyClical.pyx":663
7418  * result = clifford()
7419  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7420  * except RuntimeError as err: # <<<<<<<<<<<<<<
7421  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7422  * + str(ixt) + ":"
7423  */
7424  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7425  if (__pyx_t_8) {
7426  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7427  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7428  __Pyx_GOTREF(__pyx_t_6);
7429  __Pyx_GOTREF(__pyx_t_9);
7430  __Pyx_GOTREF(__pyx_t_10);
7431  __Pyx_INCREF(__pyx_t_9);
7432  __pyx_v_err = __pyx_t_9;
7433 
7434  /* "PyClical.pyx":664
7435  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7436  * except RuntimeError as err:
7437  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7438  * + str(ixt) + ":"
7439  * + "\n\t" + str(err))
7440  */
7441  __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)
7442  __Pyx_GOTREF(__pyx_t_11);
7443  __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)
7444  __Pyx_GOTREF(__pyx_t_12);
7445  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7446  __Pyx_GOTREF(__pyx_t_13);
7447  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7448  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7449  __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)
7450  __Pyx_GOTREF(__pyx_t_12);
7451  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7452 
7453  /* "PyClical.pyx":665
7454  * except RuntimeError as err:
7455  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7456  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7457  * + "\n\t" + str(err))
7458  * else:
7459  */
7460  __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)
7461  __Pyx_GOTREF(__pyx_t_13);
7462  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7463  __Pyx_GOTREF(__pyx_t_11);
7464  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7465  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7466  __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)
7467  __Pyx_GOTREF(__pyx_t_13);
7468  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7469 
7470  /* "PyClical.pyx":666
7471  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7472  * + str(ixt) + ":"
7473  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7474  * else:
7475  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7476  */
7477  __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)
7478  __Pyx_GOTREF(__pyx_t_11);
7479  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7480  __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)
7481  __Pyx_GOTREF(__pyx_t_13);
7482  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7483  __Pyx_GOTREF(__pyx_t_12);
7484  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7485  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7486 
7487  /* "PyClical.pyx":664
7488  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7489  * except RuntimeError as err:
7490  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7491  * + str(ixt) + ":"
7492  * + "\n\t" + str(err))
7493  */
7494  __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)
7495  __Pyx_GOTREF(__pyx_t_13);
7496  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7497  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7498  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7499  __PYX_ERR(0, 664, __pyx_L6_except_error)
7500  }
7501  goto __pyx_L6_except_error;
7502  __pyx_L6_except_error:;
7503 
7504  /* "PyClical.pyx":660
7505  * error_msg_prefix = "Cannot reframe"
7506  * if isinstance(ixt, index_set):
7507  * try: # <<<<<<<<<<<<<<
7508  * result = clifford()
7509  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7510  */
7511  __Pyx_XGIVEREF(__pyx_t_3);
7512  __Pyx_XGIVEREF(__pyx_t_4);
7513  __Pyx_XGIVEREF(__pyx_t_5);
7514  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7515  goto __pyx_L1_error;
7516  __pyx_L9_try_end:;
7517  }
7518 
7519  /* "PyClical.pyx":659
7520  * """
7521  * error_msg_prefix = "Cannot reframe"
7522  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7523  * try:
7524  * result = clifford()
7525  */
7526  goto __pyx_L3;
7527  }
7528 
7529  /* "PyClical.pyx":668
7530  * + "\n\t" + str(err))
7531  * else:
7532  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7533  * return result
7534  *
7535  */
7536  /*else*/ {
7537  __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)
7538  __Pyx_GOTREF(__pyx_t_10);
7539  __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)
7540  __Pyx_GOTREF(__pyx_t_9);
7541  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7542  __Pyx_GOTREF(__pyx_t_6);
7543  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7544  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7545  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7546  __Pyx_GOTREF(__pyx_t_9);
7547  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7548  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7549  __Pyx_GOTREF(__pyx_t_6);
7550  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7551  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7552  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7553  __PYX_ERR(0, 668, __pyx_L1_error)
7554  }
7555  __pyx_L3:;
7556 
7557  /* "PyClical.pyx":669
7558  * else:
7559  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7560  * return result # <<<<<<<<<<<<<<
7561  *
7562  * def __richcmp__(lhs, rhs, int op):
7563  */
7564  __Pyx_XDECREF(__pyx_r);
7565  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7566  __pyx_r = ((PyObject *)__pyx_v_result);
7567  goto __pyx_L0;
7568 
7569  /* "PyClical.pyx":648
7570  * raise TypeError("Not applicable.")
7571  *
7572  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7573  * """
7574  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7575  */
7576 
7577  /* function exit code */
7578  __pyx_L1_error:;
7579  __Pyx_XDECREF(__pyx_t_6);
7580  __Pyx_XDECREF(__pyx_t_9);
7581  __Pyx_XDECREF(__pyx_t_10);
7582  __Pyx_XDECREF(__pyx_t_11);
7583  __Pyx_XDECREF(__pyx_t_12);
7584  __Pyx_XDECREF(__pyx_t_13);
7585  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7586  __pyx_r = NULL;
7587  __pyx_L0:;
7588  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7589  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7590  __Pyx_XDECREF(__pyx_v_err);
7591  __Pyx_XGIVEREF(__pyx_r);
7592  __Pyx_RefNannyFinishContext();
7593  return __pyx_r;
7594  }
7595 
7596  /* "PyClical.pyx":671
7597  * return result
7598  *
7599  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7600  * """
7601  * Compare objects of type clifford.
7602  */
7603 
7604  /* Python wrapper */
7605  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7606  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7607  PyObject *__pyx_r = 0;
7608  __Pyx_RefNannyDeclarations
7609  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7610  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7611 
7612  /* function exit code */
7613  __Pyx_RefNannyFinishContext();
7614  return __pyx_r;
7615  }
7616 
7617  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7618  PyObject *__pyx_r = NULL;
7619  __Pyx_RefNannyDeclarations
7620  int __pyx_t_1;
7621  int __pyx_t_2;
7622  int __pyx_t_3;
7623  PyObject *__pyx_t_4 = NULL;
7624  PyObject *__pyx_t_5 = NULL;
7625  PyObject *__pyx_t_6 = NULL;
7626  __Pyx_RefNannySetupContext("__richcmp__", 0);
7627 
7628  /* "PyClical.pyx":690
7629  * True
7630  * """
7631  * if op == 2: # == # <<<<<<<<<<<<<<
7632  * if (lhs is None) or (rhs is None):
7633  * return bool(lhs is rhs)
7634  */
7635  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7636  if (__pyx_t_1) {
7637 
7638  /* "PyClical.pyx":691
7639  * """
7640  * if op == 2: # ==
7641  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7642  * return bool(lhs is rhs)
7643  * else:
7644  */
7645  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7646  __pyx_t_3 = (__pyx_t_2 != 0);
7647  if (!__pyx_t_3) {
7648  } else {
7649  __pyx_t_1 = __pyx_t_3;
7650  goto __pyx_L5_bool_binop_done;
7651  }
7652  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7653  __pyx_t_2 = (__pyx_t_3 != 0);
7654  __pyx_t_1 = __pyx_t_2;
7655  __pyx_L5_bool_binop_done:;
7656  if (__pyx_t_1) {
7657 
7658  /* "PyClical.pyx":692
7659  * if op == 2: # ==
7660  * if (lhs is None) or (rhs is None):
7661  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7662  * else:
7663  * return bool( toClifford(lhs) == toClifford(rhs) )
7664  */
7665  __Pyx_XDECREF(__pyx_r);
7666  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7667  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7668  __Pyx_GOTREF(__pyx_t_4);
7669  __pyx_r = __pyx_t_4;
7670  __pyx_t_4 = 0;
7671  goto __pyx_L0;
7672 
7673  /* "PyClical.pyx":691
7674  * """
7675  * if op == 2: # ==
7676  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7677  * return bool(lhs is rhs)
7678  * else:
7679  */
7680  }
7681 
7682  /* "PyClical.pyx":694
7683  * return bool(lhs is rhs)
7684  * else:
7685  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7686  * elif op == 3: # !=
7687  * if (lhs is None) or (rhs is None):
7688  */
7689  /*else*/ {
7690  __Pyx_XDECREF(__pyx_r);
7691  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7692  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7693  __Pyx_GOTREF(__pyx_t_4);
7694  __pyx_r = __pyx_t_4;
7695  __pyx_t_4 = 0;
7696  goto __pyx_L0;
7697  }
7698 
7699  /* "PyClical.pyx":690
7700  * True
7701  * """
7702  * if op == 2: # == # <<<<<<<<<<<<<<
7703  * if (lhs is None) or (rhs is None):
7704  * return bool(lhs is rhs)
7705  */
7706  }
7707 
7708  /* "PyClical.pyx":695
7709  * else:
7710  * return bool( toClifford(lhs) == toClifford(rhs) )
7711  * elif op == 3: # != # <<<<<<<<<<<<<<
7712  * if (lhs is None) or (rhs is None):
7713  * return not bool(lhs is rhs)
7714  */
7715  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7716  if (__pyx_t_1) {
7717 
7718  /* "PyClical.pyx":696
7719  * return bool( toClifford(lhs) == toClifford(rhs) )
7720  * elif op == 3: # !=
7721  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7722  * return not bool(lhs is rhs)
7723  * else:
7724  */
7725  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7726  __pyx_t_3 = (__pyx_t_2 != 0);
7727  if (!__pyx_t_3) {
7728  } else {
7729  __pyx_t_1 = __pyx_t_3;
7730  goto __pyx_L8_bool_binop_done;
7731  }
7732  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7733  __pyx_t_2 = (__pyx_t_3 != 0);
7734  __pyx_t_1 = __pyx_t_2;
7735  __pyx_L8_bool_binop_done:;
7736  if (__pyx_t_1) {
7737 
7738  /* "PyClical.pyx":697
7739  * elif op == 3: # !=
7740  * if (lhs is None) or (rhs is None):
7741  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7742  * else:
7743  * return bool( toClifford(lhs) != toClifford(rhs) )
7744  */
7745  __Pyx_XDECREF(__pyx_r);
7746  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7747  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7748  __Pyx_GOTREF(__pyx_t_4);
7749  __pyx_r = __pyx_t_4;
7750  __pyx_t_4 = 0;
7751  goto __pyx_L0;
7752 
7753  /* "PyClical.pyx":696
7754  * return bool( toClifford(lhs) == toClifford(rhs) )
7755  * elif op == 3: # !=
7756  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7757  * return not bool(lhs is rhs)
7758  * else:
7759  */
7760  }
7761 
7762  /* "PyClical.pyx":699
7763  * return not bool(lhs is rhs)
7764  * else:
7765  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7766  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7767  * raise TypeError("This comparison operator is not implemented for "
7768  */
7769  /*else*/ {
7770  __Pyx_XDECREF(__pyx_r);
7771  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7772  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7773  __Pyx_GOTREF(__pyx_t_4);
7774  __pyx_r = __pyx_t_4;
7775  __pyx_t_4 = 0;
7776  goto __pyx_L0;
7777  }
7778 
7779  /* "PyClical.pyx":695
7780  * else:
7781  * return bool( toClifford(lhs) == toClifford(rhs) )
7782  * elif op == 3: # != # <<<<<<<<<<<<<<
7783  * if (lhs is None) or (rhs is None):
7784  * return not bool(lhs is rhs)
7785  */
7786  }
7787 
7788  /* "PyClical.pyx":700
7789  * else:
7790  * return bool( toClifford(lhs) != toClifford(rhs) )
7791  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7792  * raise TypeError("This comparison operator is not implemented for "
7793  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7794  */
7795  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7796  __pyx_t_3 = (__pyx_t_2 != 0);
7797  if (!__pyx_t_3) {
7798  } else {
7799  __pyx_t_1 = __pyx_t_3;
7800  goto __pyx_L10_bool_binop_done;
7801  }
7802  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7803  __pyx_t_2 = (__pyx_t_3 != 0);
7804  __pyx_t_1 = __pyx_t_2;
7805  __pyx_L10_bool_binop_done:;
7806  if (unlikely(__pyx_t_1)) {
7807 
7808  /* "PyClical.pyx":702
7809  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7810  * raise TypeError("This comparison operator is not implemented for "
7811  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7812  * else:
7813  * return NotImplemented
7814  */
7815  __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)
7816  __Pyx_GOTREF(__pyx_t_4);
7817  __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)
7818  __Pyx_GOTREF(__pyx_t_5);
7819  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7820  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7821  __Pyx_GOTREF(__pyx_t_4);
7822  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7823  __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)
7824  __Pyx_GOTREF(__pyx_t_5);
7825  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7826  __Pyx_GOTREF(__pyx_t_6);
7827  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7828  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7829  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7830  __Pyx_GOTREF(__pyx_t_5);
7831  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7832 
7833  /* "PyClical.pyx":701
7834  * return bool( toClifford(lhs) != toClifford(rhs) )
7835  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7836  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7837  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7838  * else:
7839  */
7840  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7841  __Pyx_GOTREF(__pyx_t_6);
7842  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7843  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7844  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7845  __PYX_ERR(0, 701, __pyx_L1_error)
7846 
7847  /* "PyClical.pyx":700
7848  * else:
7849  * return bool( toClifford(lhs) != toClifford(rhs) )
7850  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7851  * raise TypeError("This comparison operator is not implemented for "
7852  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7853  */
7854  }
7855 
7856  /* "PyClical.pyx":704
7857  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7858  * else:
7859  * return NotImplemented # <<<<<<<<<<<<<<
7860  *
7861  * def __getitem__(self, ixt):
7862  */
7863  /*else*/ {
7864  __Pyx_XDECREF(__pyx_r);
7865  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7866  __pyx_r = __pyx_builtin_NotImplemented;
7867  goto __pyx_L0;
7868  }
7869 
7870  /* "PyClical.pyx":671
7871  * return result
7872  *
7873  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7874  * """
7875  * Compare objects of type clifford.
7876  */
7877 
7878  /* function exit code */
7879  __pyx_L1_error:;
7880  __Pyx_XDECREF(__pyx_t_4);
7881  __Pyx_XDECREF(__pyx_t_5);
7882  __Pyx_XDECREF(__pyx_t_6);
7883  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7884  __pyx_r = NULL;
7885  __pyx_L0:;
7886  __Pyx_XGIVEREF(__pyx_r);
7887  __Pyx_RefNannyFinishContext();
7888  return __pyx_r;
7889  }
7890 
7891  /* "PyClical.pyx":706
7892  * return NotImplemented
7893  *
7894  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7895  * """
7896  * Subscripting: map from index set to scalar coordinate.
7897  */
7898 
7899  /* Python wrapper */
7900  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7901  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 ";
7902  #if CYTHON_COMPILING_IN_CPYTHON
7903  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7904  #endif
7905  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7906  PyObject *__pyx_r = 0;
7907  __Pyx_RefNannyDeclarations
7908  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7909  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7910 
7911  /* function exit code */
7912  __Pyx_RefNannyFinishContext();
7913  return __pyx_r;
7914  }
7915 
7916  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7917  PyObject *__pyx_r = NULL;
7918  __Pyx_RefNannyDeclarations
7919  PyObject *__pyx_t_1 = NULL;
7920  __Pyx_RefNannySetupContext("__getitem__", 0);
7921 
7922  /* "PyClical.pyx":719
7923  * 2.0
7924  * """
7925  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7926  *
7927  * def __neg__(self):
7928  */
7929  __Pyx_XDECREF(__pyx_r);
7930  __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)
7931  __Pyx_GOTREF(__pyx_t_1);
7932  __pyx_r = __pyx_t_1;
7933  __pyx_t_1 = 0;
7934  goto __pyx_L0;
7935 
7936  /* "PyClical.pyx":706
7937  * return NotImplemented
7938  *
7939  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7940  * """
7941  * Subscripting: map from index set to scalar coordinate.
7942  */
7943 
7944  /* function exit code */
7945  __pyx_L1_error:;
7946  __Pyx_XDECREF(__pyx_t_1);
7947  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7948  __pyx_r = NULL;
7949  __pyx_L0:;
7950  __Pyx_XGIVEREF(__pyx_r);
7951  __Pyx_RefNannyFinishContext();
7952  return __pyx_r;
7953  }
7954 
7955  /* "PyClical.pyx":721
7956  * return self.instance.getitem(toIndexSet(ixt))
7957  *
7958  * def __neg__(self): # <<<<<<<<<<<<<<
7959  * """
7960  * Unary -.
7961  */
7962 
7963  /* Python wrapper */
7964  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7965  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7966  #if CYTHON_COMPILING_IN_CPYTHON
7967  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7968  #endif
7969  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7970  PyObject *__pyx_r = 0;
7971  __Pyx_RefNannyDeclarations
7972  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7973  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7974 
7975  /* function exit code */
7976  __Pyx_RefNannyFinishContext();
7977  return __pyx_r;
7978  }
7979 
7980  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7981  PyObject *__pyx_r = NULL;
7982  __Pyx_RefNannyDeclarations
7983  PyObject *__pyx_t_1 = NULL;
7984  PyObject *__pyx_t_2 = NULL;
7985  __Pyx_RefNannySetupContext("__neg__", 0);
7986 
7987  /* "PyClical.pyx":728
7988  * -{1}
7989  * """
7990  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7991  *
7992  * def __pos__(self):
7993  */
7994  __Pyx_XDECREF(__pyx_r);
7995  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7996  __Pyx_GOTREF(__pyx_t_1);
7997  __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)
7998  __Pyx_GOTREF(__pyx_t_2);
7999  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8000  __pyx_r = __pyx_t_2;
8001  __pyx_t_2 = 0;
8002  goto __pyx_L0;
8003 
8004  /* "PyClical.pyx":721
8005  * return self.instance.getitem(toIndexSet(ixt))
8006  *
8007  * def __neg__(self): # <<<<<<<<<<<<<<
8008  * """
8009  * Unary -.
8010  */
8011 
8012  /* function exit code */
8013  __pyx_L1_error:;
8014  __Pyx_XDECREF(__pyx_t_1);
8015  __Pyx_XDECREF(__pyx_t_2);
8016  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8017  __pyx_r = NULL;
8018  __pyx_L0:;
8019  __Pyx_XGIVEREF(__pyx_r);
8020  __Pyx_RefNannyFinishContext();
8021  return __pyx_r;
8022  }
8023 
8024  /* "PyClical.pyx":730
8025  * return clifford().wrap( self.instance.neg() )
8026  *
8027  * def __pos__(self): # <<<<<<<<<<<<<<
8028  * """
8029  * Unary +.
8030  */
8031 
8032  /* Python wrapper */
8033  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
8034  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
8035  #if CYTHON_COMPILING_IN_CPYTHON
8036  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
8037  #endif
8038  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
8039  PyObject *__pyx_r = 0;
8040  __Pyx_RefNannyDeclarations
8041  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
8042  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8043 
8044  /* function exit code */
8045  __Pyx_RefNannyFinishContext();
8046  return __pyx_r;
8047  }
8048 
8049  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8050  PyObject *__pyx_r = NULL;
8051  __Pyx_RefNannyDeclarations
8052  PyObject *__pyx_t_1 = NULL;
8053  __Pyx_RefNannySetupContext("__pos__", 0);
8054 
8055  /* "PyClical.pyx":737
8056  * {1}
8057  * """
8058  * return clifford(self) # <<<<<<<<<<<<<<
8059  *
8060  * def __add__(lhs, rhs):
8061  */
8062  __Pyx_XDECREF(__pyx_r);
8063  __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)
8064  __Pyx_GOTREF(__pyx_t_1);
8065  __pyx_r = __pyx_t_1;
8066  __pyx_t_1 = 0;
8067  goto __pyx_L0;
8068 
8069  /* "PyClical.pyx":730
8070  * return clifford().wrap( self.instance.neg() )
8071  *
8072  * def __pos__(self): # <<<<<<<<<<<<<<
8073  * """
8074  * Unary +.
8075  */
8076 
8077  /* function exit code */
8078  __pyx_L1_error:;
8079  __Pyx_XDECREF(__pyx_t_1);
8080  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8081  __pyx_r = NULL;
8082  __pyx_L0:;
8083  __Pyx_XGIVEREF(__pyx_r);
8084  __Pyx_RefNannyFinishContext();
8085  return __pyx_r;
8086  }
8087 
8088  /* "PyClical.pyx":739
8089  * return clifford(self)
8090  *
8091  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8092  * """
8093  * Geometric sum.
8094  */
8095 
8096  /* Python wrapper */
8097  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8098  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 ";
8099  #if CYTHON_COMPILING_IN_CPYTHON
8100  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8101  #endif
8102  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8103  PyObject *__pyx_r = 0;
8104  __Pyx_RefNannyDeclarations
8105  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8106  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8107 
8108  /* function exit code */
8109  __Pyx_RefNannyFinishContext();
8110  return __pyx_r;
8111  }
8112 
8113  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8114  PyObject *__pyx_r = NULL;
8115  __Pyx_RefNannyDeclarations
8116  PyObject *__pyx_t_1 = NULL;
8117  PyObject *__pyx_t_2 = NULL;
8118  __Pyx_RefNannySetupContext("__add__", 0);
8119 
8120  /* "PyClical.pyx":748
8121  * {1}+{2}
8122  * """
8123  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8124  *
8125  * def __iadd__(self, rhs):
8126  */
8127  __Pyx_XDECREF(__pyx_r);
8128  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8129  __Pyx_GOTREF(__pyx_t_1);
8130  __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)
8131  __Pyx_GOTREF(__pyx_t_2);
8132  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8133  __pyx_r = __pyx_t_2;
8134  __pyx_t_2 = 0;
8135  goto __pyx_L0;
8136 
8137  /* "PyClical.pyx":739
8138  * return clifford(self)
8139  *
8140  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8141  * """
8142  * Geometric sum.
8143  */
8144 
8145  /* function exit code */
8146  __pyx_L1_error:;
8147  __Pyx_XDECREF(__pyx_t_1);
8148  __Pyx_XDECREF(__pyx_t_2);
8149  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8150  __pyx_r = NULL;
8151  __pyx_L0:;
8152  __Pyx_XGIVEREF(__pyx_r);
8153  __Pyx_RefNannyFinishContext();
8154  return __pyx_r;
8155  }
8156 
8157  /* "PyClical.pyx":750
8158  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8159  *
8160  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8161  * """
8162  * Geometric sum.
8163  */
8164 
8165  /* Python wrapper */
8166  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8167  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 ";
8168  #if CYTHON_COMPILING_IN_CPYTHON
8169  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8170  #endif
8171  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8172  PyObject *__pyx_r = 0;
8173  __Pyx_RefNannyDeclarations
8174  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8175  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8176 
8177  /* function exit code */
8178  __Pyx_RefNannyFinishContext();
8179  return __pyx_r;
8180  }
8181 
8182  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8183  PyObject *__pyx_r = NULL;
8184  __Pyx_RefNannyDeclarations
8185  PyObject *__pyx_t_1 = NULL;
8186  __Pyx_RefNannySetupContext("__iadd__", 0);
8187 
8188  /* "PyClical.pyx":757
8189  * 1+{2}
8190  * """
8191  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8192  *
8193  * def __sub__(lhs, rhs):
8194  */
8195  __Pyx_XDECREF(__pyx_r);
8196  __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)
8197  __Pyx_GOTREF(__pyx_t_1);
8198  __pyx_r = __pyx_t_1;
8199  __pyx_t_1 = 0;
8200  goto __pyx_L0;
8201 
8202  /* "PyClical.pyx":750
8203  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8204  *
8205  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8206  * """
8207  * Geometric sum.
8208  */
8209 
8210  /* function exit code */
8211  __pyx_L1_error:;
8212  __Pyx_XDECREF(__pyx_t_1);
8213  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8214  __pyx_r = NULL;
8215  __pyx_L0:;
8216  __Pyx_XGIVEREF(__pyx_r);
8217  __Pyx_RefNannyFinishContext();
8218  return __pyx_r;
8219  }
8220 
8221  /* "PyClical.pyx":759
8222  * return self.wrap( self.unwrap() + toClifford(rhs) )
8223  *
8224  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8225  * """
8226  * Geometric difference.
8227  */
8228 
8229  /* Python wrapper */
8230  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8231  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 ";
8232  #if CYTHON_COMPILING_IN_CPYTHON
8233  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8234  #endif
8235  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8236  PyObject *__pyx_r = 0;
8237  __Pyx_RefNannyDeclarations
8238  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8239  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8240 
8241  /* function exit code */
8242  __Pyx_RefNannyFinishContext();
8243  return __pyx_r;
8244  }
8245 
8246  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8247  PyObject *__pyx_r = NULL;
8248  __Pyx_RefNannyDeclarations
8249  PyObject *__pyx_t_1 = NULL;
8250  PyObject *__pyx_t_2 = NULL;
8251  __Pyx_RefNannySetupContext("__sub__", 0);
8252 
8253  /* "PyClical.pyx":768
8254  * {1}-{2}
8255  * """
8256  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8257  *
8258  * def __isub__(self, rhs):
8259  */
8260  __Pyx_XDECREF(__pyx_r);
8261  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8262  __Pyx_GOTREF(__pyx_t_1);
8263  __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)
8264  __Pyx_GOTREF(__pyx_t_2);
8265  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8266  __pyx_r = __pyx_t_2;
8267  __pyx_t_2 = 0;
8268  goto __pyx_L0;
8269 
8270  /* "PyClical.pyx":759
8271  * return self.wrap( self.unwrap() + toClifford(rhs) )
8272  *
8273  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8274  * """
8275  * Geometric difference.
8276  */
8277 
8278  /* function exit code */
8279  __pyx_L1_error:;
8280  __Pyx_XDECREF(__pyx_t_1);
8281  __Pyx_XDECREF(__pyx_t_2);
8282  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8283  __pyx_r = NULL;
8284  __pyx_L0:;
8285  __Pyx_XGIVEREF(__pyx_r);
8286  __Pyx_RefNannyFinishContext();
8287  return __pyx_r;
8288  }
8289 
8290  /* "PyClical.pyx":770
8291  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8292  *
8293  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8294  * """
8295  * Geometric difference.
8296  */
8297 
8298  /* Python wrapper */
8299  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8300  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 ";
8301  #if CYTHON_COMPILING_IN_CPYTHON
8302  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8303  #endif
8304  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8305  PyObject *__pyx_r = 0;
8306  __Pyx_RefNannyDeclarations
8307  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8308  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8309 
8310  /* function exit code */
8311  __Pyx_RefNannyFinishContext();
8312  return __pyx_r;
8313  }
8314 
8315  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8316  PyObject *__pyx_r = NULL;
8317  __Pyx_RefNannyDeclarations
8318  PyObject *__pyx_t_1 = NULL;
8319  __Pyx_RefNannySetupContext("__isub__", 0);
8320 
8321  /* "PyClical.pyx":777
8322  * 1-{2}
8323  * """
8324  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8325  *
8326  * def __mul__(lhs, rhs):
8327  */
8328  __Pyx_XDECREF(__pyx_r);
8329  __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)
8330  __Pyx_GOTREF(__pyx_t_1);
8331  __pyx_r = __pyx_t_1;
8332  __pyx_t_1 = 0;
8333  goto __pyx_L0;
8334 
8335  /* "PyClical.pyx":770
8336  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8337  *
8338  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8339  * """
8340  * Geometric difference.
8341  */
8342 
8343  /* function exit code */
8344  __pyx_L1_error:;
8345  __Pyx_XDECREF(__pyx_t_1);
8346  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8347  __pyx_r = NULL;
8348  __pyx_L0:;
8349  __Pyx_XGIVEREF(__pyx_r);
8350  __Pyx_RefNannyFinishContext();
8351  return __pyx_r;
8352  }
8353 
8354  /* "PyClical.pyx":779
8355  * return self.wrap( self.unwrap() - toClifford(rhs) )
8356  *
8357  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8358  * """
8359  * Geometric product.
8360  */
8361 
8362  /* Python wrapper */
8363  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8364  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 ";
8365  #if CYTHON_COMPILING_IN_CPYTHON
8366  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8367  #endif
8368  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8369  PyObject *__pyx_r = 0;
8370  __Pyx_RefNannyDeclarations
8371  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8372  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8373 
8374  /* function exit code */
8375  __Pyx_RefNannyFinishContext();
8376  return __pyx_r;
8377  }
8378 
8379  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8380  PyObject *__pyx_r = NULL;
8381  __Pyx_RefNannyDeclarations
8382  PyObject *__pyx_t_1 = NULL;
8383  PyObject *__pyx_t_2 = NULL;
8384  __Pyx_RefNannySetupContext("__mul__", 0);
8385 
8386  /* "PyClical.pyx":790
8387  * {2}
8388  * """
8389  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8390  *
8391  * def __imul__(self, rhs):
8392  */
8393  __Pyx_XDECREF(__pyx_r);
8394  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8395  __Pyx_GOTREF(__pyx_t_1);
8396  __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)
8397  __Pyx_GOTREF(__pyx_t_2);
8398  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8399  __pyx_r = __pyx_t_2;
8400  __pyx_t_2 = 0;
8401  goto __pyx_L0;
8402 
8403  /* "PyClical.pyx":779
8404  * return self.wrap( self.unwrap() - toClifford(rhs) )
8405  *
8406  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8407  * """
8408  * Geometric product.
8409  */
8410 
8411  /* function exit code */
8412  __pyx_L1_error:;
8413  __Pyx_XDECREF(__pyx_t_1);
8414  __Pyx_XDECREF(__pyx_t_2);
8415  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8416  __pyx_r = NULL;
8417  __pyx_L0:;
8418  __Pyx_XGIVEREF(__pyx_r);
8419  __Pyx_RefNannyFinishContext();
8420  return __pyx_r;
8421  }
8422 
8423  /* "PyClical.pyx":792
8424  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8425  *
8426  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8427  * """
8428  * Geometric product.
8429  */
8430 
8431  /* Python wrapper */
8432  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8433  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 ";
8434  #if CYTHON_COMPILING_IN_CPYTHON
8435  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8436  #endif
8437  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8438  PyObject *__pyx_r = 0;
8439  __Pyx_RefNannyDeclarations
8440  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8441  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8442 
8443  /* function exit code */
8444  __Pyx_RefNannyFinishContext();
8445  return __pyx_r;
8446  }
8447 
8448  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8449  PyObject *__pyx_r = NULL;
8450  __Pyx_RefNannyDeclarations
8451  PyObject *__pyx_t_1 = NULL;
8452  __Pyx_RefNannySetupContext("__imul__", 0);
8453 
8454  /* "PyClical.pyx":803
8455  * {2}
8456  * """
8457  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8458  *
8459  * def __mod__(lhs, rhs):
8460  */
8461  __Pyx_XDECREF(__pyx_r);
8462  __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)
8463  __Pyx_GOTREF(__pyx_t_1);
8464  __pyx_r = __pyx_t_1;
8465  __pyx_t_1 = 0;
8466  goto __pyx_L0;
8467 
8468  /* "PyClical.pyx":792
8469  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8470  *
8471  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8472  * """
8473  * Geometric product.
8474  */
8475 
8476  /* function exit code */
8477  __pyx_L1_error:;
8478  __Pyx_XDECREF(__pyx_t_1);
8479  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8480  __pyx_r = NULL;
8481  __pyx_L0:;
8482  __Pyx_XGIVEREF(__pyx_r);
8483  __Pyx_RefNannyFinishContext();
8484  return __pyx_r;
8485  }
8486 
8487  /* "PyClical.pyx":805
8488  * return self.wrap( self.unwrap() * toClifford(rhs) )
8489  *
8490  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8491  * """
8492  * Contraction.
8493  */
8494 
8495  /* Python wrapper */
8496  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8497  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 ";
8498  #if CYTHON_COMPILING_IN_CPYTHON
8499  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8500  #endif
8501  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8502  PyObject *__pyx_r = 0;
8503  __Pyx_RefNannyDeclarations
8504  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8505  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8506 
8507  /* function exit code */
8508  __Pyx_RefNannyFinishContext();
8509  return __pyx_r;
8510  }
8511 
8512  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8513  PyObject *__pyx_r = NULL;
8514  __Pyx_RefNannyDeclarations
8515  PyObject *__pyx_t_1 = NULL;
8516  PyObject *__pyx_t_2 = NULL;
8517  __Pyx_RefNannySetupContext("__mod__", 0);
8518 
8519  /* "PyClical.pyx":818
8520  * {2}
8521  * """
8522  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8523  *
8524  * def __imod__(self, rhs):
8525  */
8526  __Pyx_XDECREF(__pyx_r);
8527  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8528  __Pyx_GOTREF(__pyx_t_1);
8529  __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)
8530  __Pyx_GOTREF(__pyx_t_2);
8531  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8532  __pyx_r = __pyx_t_2;
8533  __pyx_t_2 = 0;
8534  goto __pyx_L0;
8535 
8536  /* "PyClical.pyx":805
8537  * return self.wrap( self.unwrap() * toClifford(rhs) )
8538  *
8539  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8540  * """
8541  * Contraction.
8542  */
8543 
8544  /* function exit code */
8545  __pyx_L1_error:;
8546  __Pyx_XDECREF(__pyx_t_1);
8547  __Pyx_XDECREF(__pyx_t_2);
8548  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8549  __pyx_r = NULL;
8550  __pyx_L0:;
8551  __Pyx_XGIVEREF(__pyx_r);
8552  __Pyx_RefNannyFinishContext();
8553  return __pyx_r;
8554  }
8555 
8556  /* "PyClical.pyx":820
8557  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8558  *
8559  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8560  * """
8561  * Contraction.
8562  */
8563 
8564  /* Python wrapper */
8565  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8566  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 ";
8567  #if CYTHON_COMPILING_IN_CPYTHON
8568  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8569  #endif
8570  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8571  PyObject *__pyx_r = 0;
8572  __Pyx_RefNannyDeclarations
8573  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8574  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8575 
8576  /* function exit code */
8577  __Pyx_RefNannyFinishContext();
8578  return __pyx_r;
8579  }
8580 
8581  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8582  PyObject *__pyx_r = NULL;
8583  __Pyx_RefNannyDeclarations
8584  PyObject *__pyx_t_1 = NULL;
8585  __Pyx_RefNannySetupContext("__imod__", 0);
8586 
8587  /* "PyClical.pyx":833
8588  * {2}
8589  * """
8590  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8591  *
8592  * def __and__(lhs, rhs):
8593  */
8594  __Pyx_XDECREF(__pyx_r);
8595  __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)
8596  __Pyx_GOTREF(__pyx_t_1);
8597  __pyx_r = __pyx_t_1;
8598  __pyx_t_1 = 0;
8599  goto __pyx_L0;
8600 
8601  /* "PyClical.pyx":820
8602  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8603  *
8604  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8605  * """
8606  * Contraction.
8607  */
8608 
8609  /* function exit code */
8610  __pyx_L1_error:;
8611  __Pyx_XDECREF(__pyx_t_1);
8612  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8613  __pyx_r = NULL;
8614  __pyx_L0:;
8615  __Pyx_XGIVEREF(__pyx_r);
8616  __Pyx_RefNannyFinishContext();
8617  return __pyx_r;
8618  }
8619 
8620  /* "PyClical.pyx":835
8621  * return self.wrap( self.unwrap() % toClifford(rhs) )
8622  *
8623  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8624  * """
8625  * Inner product.
8626  */
8627 
8628  /* Python wrapper */
8629  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8630  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 ";
8631  #if CYTHON_COMPILING_IN_CPYTHON
8632  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8633  #endif
8634  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8635  PyObject *__pyx_r = 0;
8636  __Pyx_RefNannyDeclarations
8637  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8638  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8639 
8640  /* function exit code */
8641  __Pyx_RefNannyFinishContext();
8642  return __pyx_r;
8643  }
8644 
8645  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8646  PyObject *__pyx_r = NULL;
8647  __Pyx_RefNannyDeclarations
8648  PyObject *__pyx_t_1 = NULL;
8649  PyObject *__pyx_t_2 = NULL;
8650  __Pyx_RefNannySetupContext("__and__", 0);
8651 
8652  /* "PyClical.pyx":848
8653  * {2}
8654  * """
8655  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8656  *
8657  * def __iand__(self, rhs):
8658  */
8659  __Pyx_XDECREF(__pyx_r);
8660  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8661  __Pyx_GOTREF(__pyx_t_1);
8662  __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)
8663  __Pyx_GOTREF(__pyx_t_2);
8664  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8665  __pyx_r = __pyx_t_2;
8666  __pyx_t_2 = 0;
8667  goto __pyx_L0;
8668 
8669  /* "PyClical.pyx":835
8670  * return self.wrap( self.unwrap() % toClifford(rhs) )
8671  *
8672  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8673  * """
8674  * Inner product.
8675  */
8676 
8677  /* function exit code */
8678  __pyx_L1_error:;
8679  __Pyx_XDECREF(__pyx_t_1);
8680  __Pyx_XDECREF(__pyx_t_2);
8681  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8682  __pyx_r = NULL;
8683  __pyx_L0:;
8684  __Pyx_XGIVEREF(__pyx_r);
8685  __Pyx_RefNannyFinishContext();
8686  return __pyx_r;
8687  }
8688 
8689  /* "PyClical.pyx":850
8690  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8691  *
8692  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8693  * """
8694  * Inner product.
8695  */
8696 
8697  /* Python wrapper */
8698  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8699  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 ";
8700  #if CYTHON_COMPILING_IN_CPYTHON
8701  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8702  #endif
8703  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8704  PyObject *__pyx_r = 0;
8705  __Pyx_RefNannyDeclarations
8706  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8707  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8708 
8709  /* function exit code */
8710  __Pyx_RefNannyFinishContext();
8711  return __pyx_r;
8712  }
8713 
8714  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8715  PyObject *__pyx_r = NULL;
8716  __Pyx_RefNannyDeclarations
8717  PyObject *__pyx_t_1 = NULL;
8718  __Pyx_RefNannySetupContext("__iand__", 0);
8719 
8720  /* "PyClical.pyx":863
8721  * {2}
8722  * """
8723  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8724  *
8725  * def __xor__(lhs, rhs):
8726  */
8727  __Pyx_XDECREF(__pyx_r);
8728  __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)
8729  __Pyx_GOTREF(__pyx_t_1);
8730  __pyx_r = __pyx_t_1;
8731  __pyx_t_1 = 0;
8732  goto __pyx_L0;
8733 
8734  /* "PyClical.pyx":850
8735  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8736  *
8737  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8738  * """
8739  * Inner product.
8740  */
8741 
8742  /* function exit code */
8743  __pyx_L1_error:;
8744  __Pyx_XDECREF(__pyx_t_1);
8745  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8746  __pyx_r = NULL;
8747  __pyx_L0:;
8748  __Pyx_XGIVEREF(__pyx_r);
8749  __Pyx_RefNannyFinishContext();
8750  return __pyx_r;
8751  }
8752 
8753  /* "PyClical.pyx":865
8754  * return self.wrap( self.unwrap() & toClifford(rhs) )
8755  *
8756  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8757  * """
8758  * Outer product.
8759  */
8760 
8761  /* Python wrapper */
8762  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8763  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 ";
8764  #if CYTHON_COMPILING_IN_CPYTHON
8765  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8766  #endif
8767  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8768  PyObject *__pyx_r = 0;
8769  __Pyx_RefNannyDeclarations
8770  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8771  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8772 
8773  /* function exit code */
8774  __Pyx_RefNannyFinishContext();
8775  return __pyx_r;
8776  }
8777 
8778  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8779  PyObject *__pyx_r = NULL;
8780  __Pyx_RefNannyDeclarations
8781  PyObject *__pyx_t_1 = NULL;
8782  PyObject *__pyx_t_2 = NULL;
8783  __Pyx_RefNannySetupContext("__xor__", 0);
8784 
8785  /* "PyClical.pyx":878
8786  * 0
8787  * """
8788  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8789  *
8790  * def __ixor__(self, rhs):
8791  */
8792  __Pyx_XDECREF(__pyx_r);
8793  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8794  __Pyx_GOTREF(__pyx_t_1);
8795  __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)
8796  __Pyx_GOTREF(__pyx_t_2);
8797  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8798  __pyx_r = __pyx_t_2;
8799  __pyx_t_2 = 0;
8800  goto __pyx_L0;
8801 
8802  /* "PyClical.pyx":865
8803  * return self.wrap( self.unwrap() & toClifford(rhs) )
8804  *
8805  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8806  * """
8807  * Outer product.
8808  */
8809 
8810  /* function exit code */
8811  __pyx_L1_error:;
8812  __Pyx_XDECREF(__pyx_t_1);
8813  __Pyx_XDECREF(__pyx_t_2);
8814  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8815  __pyx_r = NULL;
8816  __pyx_L0:;
8817  __Pyx_XGIVEREF(__pyx_r);
8818  __Pyx_RefNannyFinishContext();
8819  return __pyx_r;
8820  }
8821 
8822  /* "PyClical.pyx":880
8823  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8824  *
8825  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8826  * """
8827  * Outer product.
8828  */
8829 
8830  /* Python wrapper */
8831  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8832  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 ";
8833  #if CYTHON_COMPILING_IN_CPYTHON
8834  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8835  #endif
8836  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8837  PyObject *__pyx_r = 0;
8838  __Pyx_RefNannyDeclarations
8839  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8840  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8841 
8842  /* function exit code */
8843  __Pyx_RefNannyFinishContext();
8844  return __pyx_r;
8845  }
8846 
8847  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8848  PyObject *__pyx_r = NULL;
8849  __Pyx_RefNannyDeclarations
8850  PyObject *__pyx_t_1 = NULL;
8851  __Pyx_RefNannySetupContext("__ixor__", 0);
8852 
8853  /* "PyClical.pyx":893
8854  * 0
8855  * """
8856  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8857  *
8858  * def __div__(lhs, rhs):
8859  */
8860  __Pyx_XDECREF(__pyx_r);
8861  __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)
8862  __Pyx_GOTREF(__pyx_t_1);
8863  __pyx_r = __pyx_t_1;
8864  __pyx_t_1 = 0;
8865  goto __pyx_L0;
8866 
8867  /* "PyClical.pyx":880
8868  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8869  *
8870  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8871  * """
8872  * Outer product.
8873  */
8874 
8875  /* function exit code */
8876  __pyx_L1_error:;
8877  __Pyx_XDECREF(__pyx_t_1);
8878  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __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 
8886  /* "PyClical.pyx":895
8887  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8888  *
8889  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8890  * """
8891  * Geometric quotient.
8892  */
8893 
8894  /* Python wrapper */
8895  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8896  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8897  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 ";
8898  #if CYTHON_COMPILING_IN_CPYTHON
8899  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8900  #endif
8901  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8902  PyObject *__pyx_r = 0;
8903  __Pyx_RefNannyDeclarations
8904  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8905  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8906 
8907  /* function exit code */
8908  __Pyx_RefNannyFinishContext();
8909  return __pyx_r;
8910  }
8911  #endif
8913  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8914  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8915  PyObject *__pyx_r = NULL;
8916  __Pyx_RefNannyDeclarations
8917  PyObject *__pyx_t_1 = NULL;
8918  PyObject *__pyx_t_2 = NULL;
8919  __Pyx_RefNannySetupContext("__div__", 0);
8920 
8921  /* "PyClical.pyx":908
8922  * -{2}
8923  * """
8924  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8925  *
8926  * def __idiv__(self, rhs):
8927  */
8928  __Pyx_XDECREF(__pyx_r);
8929  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8930  __Pyx_GOTREF(__pyx_t_1);
8931  __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)
8932  __Pyx_GOTREF(__pyx_t_2);
8933  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8934  __pyx_r = __pyx_t_2;
8935  __pyx_t_2 = 0;
8936  goto __pyx_L0;
8937 
8938  /* "PyClical.pyx":895
8939  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8940  *
8941  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8942  * """
8943  * Geometric quotient.
8944  */
8945 
8946  /* function exit code */
8947  __pyx_L1_error:;
8948  __Pyx_XDECREF(__pyx_t_1);
8949  __Pyx_XDECREF(__pyx_t_2);
8950  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8951  __pyx_r = NULL;
8952  __pyx_L0:;
8953  __Pyx_XGIVEREF(__pyx_r);
8954  __Pyx_RefNannyFinishContext();
8955  return __pyx_r;
8956  }
8957  #endif
8959  /* "PyClical.pyx":910
8960  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8961  *
8962  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8963  * """
8964  * Geometric quotient.
8965  */
8966 
8967  /* Python wrapper */
8968  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8969  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8970  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 ";
8971  #if CYTHON_COMPILING_IN_CPYTHON
8972  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8973  #endif
8974  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8975  PyObject *__pyx_r = 0;
8976  __Pyx_RefNannyDeclarations
8977  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8978  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8979 
8980  /* function exit code */
8981  __Pyx_RefNannyFinishContext();
8982  return __pyx_r;
8983  }
8984  #endif
8986  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8987  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8988  PyObject *__pyx_r = NULL;
8989  __Pyx_RefNannyDeclarations
8990  PyObject *__pyx_t_1 = NULL;
8991  __Pyx_RefNannySetupContext("__idiv__", 0);
8992 
8993  /* "PyClical.pyx":923
8994  * -{2}
8995  * """
8996  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8997  *
8998  * def inv(self):
8999  */
9000  __Pyx_XDECREF(__pyx_r);
9001  __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)
9002  __Pyx_GOTREF(__pyx_t_1);
9003  __pyx_r = __pyx_t_1;
9004  __pyx_t_1 = 0;
9005  goto __pyx_L0;
9006 
9007  /* "PyClical.pyx":910
9008  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
9009  *
9010  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
9011  * """
9012  * Geometric quotient.
9013  */
9014 
9015  /* function exit code */
9016  __pyx_L1_error:;
9017  __Pyx_XDECREF(__pyx_t_1);
9018  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9019  __pyx_r = NULL;
9020  __pyx_L0:;
9021  __Pyx_XGIVEREF(__pyx_r);
9022  __Pyx_RefNannyFinishContext();
9023  return __pyx_r;
9024  }
9025  #endif
9027  /* "PyClical.pyx":925
9028  * return self.wrap( self.unwrap() / toClifford(rhs) )
9029  *
9030  * def inv(self): # <<<<<<<<<<<<<<
9031  * """
9032  * Geometric multiplicative inverse.
9033  */
9034 
9035  /* Python wrapper */
9036  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9037  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 ";
9038  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9039  PyObject *__pyx_r = 0;
9040  __Pyx_RefNannyDeclarations
9041  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
9042  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9043 
9044  /* function exit code */
9045  __Pyx_RefNannyFinishContext();
9046  return __pyx_r;
9047  }
9048 
9049  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9050  PyObject *__pyx_r = NULL;
9051  __Pyx_RefNannyDeclarations
9052  PyObject *__pyx_t_1 = NULL;
9053  PyObject *__pyx_t_2 = NULL;
9054  __Pyx_RefNannySetupContext("inv", 0);
9055 
9056  /* "PyClical.pyx":936
9057  * -{1,2}
9058  * """
9059  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
9060  *
9061  * def __or__(lhs, rhs):
9062  */
9063  __Pyx_XDECREF(__pyx_r);
9064  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
9065  __Pyx_GOTREF(__pyx_t_1);
9066  __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)
9067  __Pyx_GOTREF(__pyx_t_2);
9068  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9069  __pyx_r = __pyx_t_2;
9070  __pyx_t_2 = 0;
9071  goto __pyx_L0;
9072 
9073  /* "PyClical.pyx":925
9074  * return self.wrap( self.unwrap() / toClifford(rhs) )
9075  *
9076  * def inv(self): # <<<<<<<<<<<<<<
9077  * """
9078  * Geometric multiplicative inverse.
9079  */
9080 
9081  /* function exit code */
9082  __pyx_L1_error:;
9083  __Pyx_XDECREF(__pyx_t_1);
9084  __Pyx_XDECREF(__pyx_t_2);
9085  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9086  __pyx_r = NULL;
9087  __pyx_L0:;
9088  __Pyx_XGIVEREF(__pyx_r);
9089  __Pyx_RefNannyFinishContext();
9090  return __pyx_r;
9091  }
9092 
9093  /* "PyClical.pyx":938
9094  * return clifford().wrap( self.instance.inv() )
9095  *
9096  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9097  * """
9098  * Transform left hand side, using right hand side as a transformation.
9099  */
9100 
9101  /* Python wrapper */
9102  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9103  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 ";
9104  #if CYTHON_COMPILING_IN_CPYTHON
9105  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9106  #endif
9107  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9108  PyObject *__pyx_r = 0;
9109  __Pyx_RefNannyDeclarations
9110  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9111  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9112 
9113  /* function exit code */
9114  __Pyx_RefNannyFinishContext();
9115  return __pyx_r;
9116  }
9117 
9118  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9119  PyObject *__pyx_r = NULL;
9120  __Pyx_RefNannyDeclarations
9121  PyObject *__pyx_t_1 = NULL;
9122  PyObject *__pyx_t_2 = NULL;
9123  __Pyx_RefNannySetupContext("__or__", 0);
9124 
9125  /* "PyClical.pyx":947
9126  * -{1}
9127  * """
9128  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9129  *
9130  * def __ior__(self, rhs):
9131  */
9132  __Pyx_XDECREF(__pyx_r);
9133  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9134  __Pyx_GOTREF(__pyx_t_1);
9135  __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)
9136  __Pyx_GOTREF(__pyx_t_2);
9137  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9138  __pyx_r = __pyx_t_2;
9139  __pyx_t_2 = 0;
9140  goto __pyx_L0;
9141 
9142  /* "PyClical.pyx":938
9143  * return clifford().wrap( self.instance.inv() )
9144  *
9145  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9146  * """
9147  * Transform left hand side, using right hand side as a transformation.
9148  */
9149 
9150  /* function exit code */
9151  __pyx_L1_error:;
9152  __Pyx_XDECREF(__pyx_t_1);
9153  __Pyx_XDECREF(__pyx_t_2);
9154  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9155  __pyx_r = NULL;
9156  __pyx_L0:;
9157  __Pyx_XGIVEREF(__pyx_r);
9158  __Pyx_RefNannyFinishContext();
9159  return __pyx_r;
9160  }
9161 
9162  /* "PyClical.pyx":949
9163  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9164  *
9165  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9166  * """
9167  * Transform left hand side, using right hand side as a transformation.
9168  */
9169 
9170  /* Python wrapper */
9171  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9172  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 ";
9173  #if CYTHON_COMPILING_IN_CPYTHON
9174  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9175  #endif
9176  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9177  PyObject *__pyx_r = 0;
9178  __Pyx_RefNannyDeclarations
9179  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9180  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9181 
9182  /* function exit code */
9183  __Pyx_RefNannyFinishContext();
9184  return __pyx_r;
9185  }
9186 
9187  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9188  PyObject *__pyx_r = NULL;
9189  __Pyx_RefNannyDeclarations
9190  PyObject *__pyx_t_1 = NULL;
9191  __Pyx_RefNannySetupContext("__ior__", 0);
9192 
9193  /* "PyClical.pyx":958
9194  * -{1}
9195  * """
9196  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9197  *
9198  * def __pow__(self, m, dummy):
9199  */
9200  __Pyx_XDECREF(__pyx_r);
9201  __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)
9202  __Pyx_GOTREF(__pyx_t_1);
9203  __pyx_r = __pyx_t_1;
9204  __pyx_t_1 = 0;
9205  goto __pyx_L0;
9206 
9207  /* "PyClical.pyx":949
9208  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9209  *
9210  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9211  * """
9212  * Transform left hand side, using right hand side as a transformation.
9213  */
9214 
9215  /* function exit code */
9216  __pyx_L1_error:;
9217  __Pyx_XDECREF(__pyx_t_1);
9218  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9219  __pyx_r = NULL;
9220  __pyx_L0:;
9221  __Pyx_XGIVEREF(__pyx_r);
9222  __Pyx_RefNannyFinishContext();
9223  return __pyx_r;
9224  }
9225 
9226  /* "PyClical.pyx":960
9227  * return self.wrap( self.unwrap() | toClifford(rhs) )
9228  *
9229  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9230  * """
9231  * Power: self to the m.
9232  */
9233 
9234  /* Python wrapper */
9235  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9236  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 ";
9237  #if CYTHON_COMPILING_IN_CPYTHON
9238  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9239  #endif
9240  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9241  PyObject *__pyx_r = 0;
9242  __Pyx_RefNannyDeclarations
9243  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9244  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9245 
9246  /* function exit code */
9247  __Pyx_RefNannyFinishContext();
9248  return __pyx_r;
9249  }
9250 
9251  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9252  PyObject *__pyx_r = NULL;
9253  __Pyx_RefNannyDeclarations
9254  PyObject *__pyx_t_1 = NULL;
9255  __Pyx_RefNannySetupContext("__pow__", 0);
9256 
9257  /* "PyClical.pyx":977
9258  * 1
9259  * """
9260  * return pow(self, m) # <<<<<<<<<<<<<<
9261  *
9262  * def pow(self, m):
9263  */
9264  __Pyx_XDECREF(__pyx_r);
9265  __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)
9266  __Pyx_GOTREF(__pyx_t_1);
9267  __pyx_r = __pyx_t_1;
9268  __pyx_t_1 = 0;
9269  goto __pyx_L0;
9270 
9271  /* "PyClical.pyx":960
9272  * return self.wrap( self.unwrap() | toClifford(rhs) )
9273  *
9274  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9275  * """
9276  * Power: self to the m.
9277  */
9278 
9279  /* function exit code */
9280  __pyx_L1_error:;
9281  __Pyx_XDECREF(__pyx_t_1);
9282  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9283  __pyx_r = NULL;
9284  __pyx_L0:;
9285  __Pyx_XGIVEREF(__pyx_r);
9286  __Pyx_RefNannyFinishContext();
9287  return __pyx_r;
9288  }
9289 
9290  /* "PyClical.pyx":979
9291  * return pow(self, m)
9292  *
9293  * def pow(self, m): # <<<<<<<<<<<<<<
9294  * """
9295  * Power: self to the m.
9296  */
9297 
9298  /* Python wrapper */
9299  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9300  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 ";
9301  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9302  PyObject *__pyx_r = 0;
9303  __Pyx_RefNannyDeclarations
9304  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9305  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9306 
9307  /* function exit code */
9308  __Pyx_RefNannyFinishContext();
9309  return __pyx_r;
9310  }
9311 
9312  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9313  PyObject *__pyx_r = NULL;
9314  __Pyx_RefNannyDeclarations
9315  PyObject *__pyx_t_1 = NULL;
9316  PyObject *__pyx_t_2 = NULL;
9317  int __pyx_t_3;
9318  int __pyx_t_4;
9319  int __pyx_t_5;
9320  __Pyx_RefNannySetupContext("pow", 0);
9321 
9322  /* "PyClical.pyx":998
9323  * 1
9324  * """
9325  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9326  * return clifford().wrap( self.instance.pow(m) )
9327  * else:
9328  */
9329  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9330  __Pyx_GOTREF(__pyx_t_1);
9331  __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)
9332  __Pyx_GOTREF(__pyx_t_2);
9333  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9334  __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)
9335  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9336  __pyx_t_4 = (__pyx_t_3 != 0);
9337  if (__pyx_t_4) {
9338 
9339  /* "PyClical.pyx":999
9340  * """
9341  * if isinstance(m, numbers.Integral):
9342  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9343  * else:
9344  * return exp(m * log(self))
9345  */
9346  __Pyx_XDECREF(__pyx_r);
9347  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9348  __Pyx_GOTREF(__pyx_t_2);
9349  __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)
9350  __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)
9351  __Pyx_GOTREF(__pyx_t_1);
9352  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9353  __pyx_r = __pyx_t_1;
9354  __pyx_t_1 = 0;
9355  goto __pyx_L0;
9356 
9357  /* "PyClical.pyx":998
9358  * 1
9359  * """
9360  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9361  * return clifford().wrap( self.instance.pow(m) )
9362  * else:
9363  */
9364  }
9365 
9366  /* "PyClical.pyx":1001
9367  * return clifford().wrap( self.instance.pow(m) )
9368  * else:
9369  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9370  *
9371  * def outer_pow(self, m):
9372  */
9373  /*else*/ {
9374  __Pyx_XDECREF(__pyx_r);
9375  __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)
9376  __Pyx_GOTREF(__pyx_t_1);
9377  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9378  __Pyx_GOTREF(__pyx_t_2);
9379  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9380  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9381  __Pyx_GOTREF(__pyx_t_1);
9382  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9383  __pyx_r = __pyx_t_1;
9384  __pyx_t_1 = 0;
9385  goto __pyx_L0;
9386  }
9387 
9388  /* "PyClical.pyx":979
9389  * return pow(self, m)
9390  *
9391  * def pow(self, m): # <<<<<<<<<<<<<<
9392  * """
9393  * Power: self to the m.
9394  */
9395 
9396  /* function exit code */
9397  __pyx_L1_error:;
9398  __Pyx_XDECREF(__pyx_t_1);
9399  __Pyx_XDECREF(__pyx_t_2);
9400  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9401  __pyx_r = NULL;
9402  __pyx_L0:;
9403  __Pyx_XGIVEREF(__pyx_r);
9404  __Pyx_RefNannyFinishContext();
9405  return __pyx_r;
9406  }
9407 
9408  /* "PyClical.pyx":1003
9409  * return exp(m * log(self))
9410  *
9411  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9412  * """
9413  * Outer product power.
9414  */
9415 
9416  /* Python wrapper */
9417  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9418  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 ";
9419  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9420  PyObject *__pyx_r = 0;
9421  __Pyx_RefNannyDeclarations
9422  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9423  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9424 
9425  /* function exit code */
9426  __Pyx_RefNannyFinishContext();
9427  return __pyx_r;
9428  }
9429 
9430  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9431  PyObject *__pyx_r = NULL;
9432  __Pyx_RefNannyDeclarations
9433  PyObject *__pyx_t_1 = NULL;
9434  int __pyx_t_2;
9435  PyObject *__pyx_t_3 = NULL;
9436  __Pyx_RefNannySetupContext("outer_pow", 0);
9437 
9438  /* "PyClical.pyx":1017
9439  *
9440  * """
9441  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9442  *
9443  * def __call__(self, grade):
9444  */
9445  __Pyx_XDECREF(__pyx_r);
9446  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9447  __Pyx_GOTREF(__pyx_t_1);
9448  __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)
9449  __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)
9450  __Pyx_GOTREF(__pyx_t_3);
9451  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9452  __pyx_r = __pyx_t_3;
9453  __pyx_t_3 = 0;
9454  goto __pyx_L0;
9455 
9456  /* "PyClical.pyx":1003
9457  * return exp(m * log(self))
9458  *
9459  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9460  * """
9461  * Outer product power.
9462  */
9463 
9464  /* function exit code */
9465  __pyx_L1_error:;
9466  __Pyx_XDECREF(__pyx_t_1);
9467  __Pyx_XDECREF(__pyx_t_3);
9468  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9469  __pyx_r = NULL;
9470  __pyx_L0:;
9471  __Pyx_XGIVEREF(__pyx_r);
9472  __Pyx_RefNannyFinishContext();
9473  return __pyx_r;
9474  }
9475 
9476  /* "PyClical.pyx":1019
9477  * return clifford().wrap( self.instance.outer_pow(m) )
9478  *
9479  * def __call__(self, grade): # <<<<<<<<<<<<<<
9480  * """
9481  * Pure grade-vector part.
9482  */
9483 
9484  /* Python wrapper */
9485  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9486  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 ";
9487  #if CYTHON_COMPILING_IN_CPYTHON
9488  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9489  #endif
9490  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9491  PyObject *__pyx_v_grade = 0;
9492  PyObject *__pyx_r = 0;
9493  __Pyx_RefNannyDeclarations
9494  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9495  {
9496  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9497  PyObject* values[1] = {0};
9498  if (unlikely(__pyx_kwds)) {
9499  Py_ssize_t kw_args;
9500  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9501  switch (pos_args) {
9502  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9503  CYTHON_FALLTHROUGH;
9504  case 0: break;
9505  default: goto __pyx_L5_argtuple_error;
9506  }
9507  kw_args = PyDict_Size(__pyx_kwds);
9508  switch (pos_args) {
9509  case 0:
9510  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9511  else goto __pyx_L5_argtuple_error;
9512  }
9513  if (unlikely(kw_args > 0)) {
9514  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9515  }
9516  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9517  goto __pyx_L5_argtuple_error;
9518  } else {
9519  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9520  }
9521  __pyx_v_grade = values[0];
9522  }
9523  goto __pyx_L4_argument_unpacking_done;
9524  __pyx_L5_argtuple_error:;
9525  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9526  __pyx_L3_error:;
9527  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9528  __Pyx_RefNannyFinishContext();
9529  return NULL;
9530  __pyx_L4_argument_unpacking_done:;
9531  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9532 
9533  /* function exit code */
9534  __Pyx_RefNannyFinishContext();
9535  return __pyx_r;
9536  }
9537 
9538  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9539  PyObject *__pyx_r = NULL;
9540  __Pyx_RefNannyDeclarations
9541  PyObject *__pyx_t_1 = NULL;
9542  int __pyx_t_2;
9543  PyObject *__pyx_t_3 = NULL;
9544  __Pyx_RefNannySetupContext("__call__", 0);
9545 
9546  /* "PyClical.pyx":1036
9547  * 0
9548  * """
9549  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9550  *
9551  * def scalar(self):
9552  */
9553  __Pyx_XDECREF(__pyx_r);
9554  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9555  __Pyx_GOTREF(__pyx_t_1);
9556  __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)
9557  __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)
9558  __Pyx_GOTREF(__pyx_t_3);
9559  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9560  __pyx_r = __pyx_t_3;
9561  __pyx_t_3 = 0;
9562  goto __pyx_L0;
9563 
9564  /* "PyClical.pyx":1019
9565  * return clifford().wrap( self.instance.outer_pow(m) )
9566  *
9567  * def __call__(self, grade): # <<<<<<<<<<<<<<
9568  * """
9569  * Pure grade-vector part.
9570  */
9571 
9572  /* function exit code */
9573  __pyx_L1_error:;
9574  __Pyx_XDECREF(__pyx_t_1);
9575  __Pyx_XDECREF(__pyx_t_3);
9576  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9577  __pyx_r = NULL;
9578  __pyx_L0:;
9579  __Pyx_XGIVEREF(__pyx_r);
9580  __Pyx_RefNannyFinishContext();
9581  return __pyx_r;
9582  }
9583 
9584  /* "PyClical.pyx":1038
9585  * return clifford().wrap( self.instance.call(grade) )
9586  *
9587  * def scalar(self): # <<<<<<<<<<<<<<
9588  * """
9589  * Scalar part.
9590  */
9591 
9592  /* Python wrapper */
9593  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9594  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 ";
9595  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9596  PyObject *__pyx_r = 0;
9597  __Pyx_RefNannyDeclarations
9598  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9599  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9600 
9601  /* function exit code */
9602  __Pyx_RefNannyFinishContext();
9603  return __pyx_r;
9604  }
9605 
9606  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9607  PyObject *__pyx_r = NULL;
9608  __Pyx_RefNannyDeclarations
9609  PyObject *__pyx_t_1 = NULL;
9610  __Pyx_RefNannySetupContext("scalar", 0);
9611 
9612  /* "PyClical.pyx":1047
9613  * 0.0
9614  * """
9615  * return self.instance.scalar() # <<<<<<<<<<<<<<
9616  *
9617  * def pure(self):
9618  */
9619  __Pyx_XDECREF(__pyx_r);
9620  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9621  __Pyx_GOTREF(__pyx_t_1);
9622  __pyx_r = __pyx_t_1;
9623  __pyx_t_1 = 0;
9624  goto __pyx_L0;
9625 
9626  /* "PyClical.pyx":1038
9627  * return clifford().wrap( self.instance.call(grade) )
9628  *
9629  * def scalar(self): # <<<<<<<<<<<<<<
9630  * """
9631  * Scalar part.
9632  */
9633 
9634  /* function exit code */
9635  __pyx_L1_error:;
9636  __Pyx_XDECREF(__pyx_t_1);
9637  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9638  __pyx_r = NULL;
9639  __pyx_L0:;
9640  __Pyx_XGIVEREF(__pyx_r);
9641  __Pyx_RefNannyFinishContext();
9642  return __pyx_r;
9643  }
9644 
9645  /* "PyClical.pyx":1049
9646  * return self.instance.scalar()
9647  *
9648  * def pure(self): # <<<<<<<<<<<<<<
9649  * """
9650  * Pure part.
9651  */
9652 
9653  /* Python wrapper */
9654  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9655  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 ";
9656  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9657  PyObject *__pyx_r = 0;
9658  __Pyx_RefNannyDeclarations
9659  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9660  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9661 
9662  /* function exit code */
9663  __Pyx_RefNannyFinishContext();
9664  return __pyx_r;
9665  }
9666 
9667  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9668  PyObject *__pyx_r = NULL;
9669  __Pyx_RefNannyDeclarations
9670  PyObject *__pyx_t_1 = NULL;
9671  PyObject *__pyx_t_2 = NULL;
9672  __Pyx_RefNannySetupContext("pure", 0);
9673 
9674  /* "PyClical.pyx":1058
9675  * {1,2}
9676  * """
9677  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9678  *
9679  * def even(self):
9680  */
9681  __Pyx_XDECREF(__pyx_r);
9682  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9683  __Pyx_GOTREF(__pyx_t_1);
9684  __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)
9685  __Pyx_GOTREF(__pyx_t_2);
9686  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9687  __pyx_r = __pyx_t_2;
9688  __pyx_t_2 = 0;
9689  goto __pyx_L0;
9690 
9691  /* "PyClical.pyx":1049
9692  * return self.instance.scalar()
9693  *
9694  * def pure(self): # <<<<<<<<<<<<<<
9695  * """
9696  * Pure part.
9697  */
9698 
9699  /* function exit code */
9700  __pyx_L1_error:;
9701  __Pyx_XDECREF(__pyx_t_1);
9702  __Pyx_XDECREF(__pyx_t_2);
9703  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9704  __pyx_r = NULL;
9705  __pyx_L0:;
9706  __Pyx_XGIVEREF(__pyx_r);
9707  __Pyx_RefNannyFinishContext();
9708  return __pyx_r;
9709  }
9710 
9711  /* "PyClical.pyx":1060
9712  * return clifford().wrap( self.instance.pure() )
9713  *
9714  * def even(self): # <<<<<<<<<<<<<<
9715  * """
9716  * Even part of multivector, sum of even grade terms.
9717  */
9718 
9719  /* Python wrapper */
9720  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9721  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 ";
9722  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9723  PyObject *__pyx_r = 0;
9724  __Pyx_RefNannyDeclarations
9725  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9726  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9727 
9728  /* function exit code */
9729  __Pyx_RefNannyFinishContext();
9730  return __pyx_r;
9731  }
9732 
9733  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9734  PyObject *__pyx_r = NULL;
9735  __Pyx_RefNannyDeclarations
9736  PyObject *__pyx_t_1 = NULL;
9737  PyObject *__pyx_t_2 = NULL;
9738  __Pyx_RefNannySetupContext("even", 0);
9739 
9740  /* "PyClical.pyx":1067
9741  * 1+{1,2}
9742  * """
9743  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9744  *
9745  * def odd(self):
9746  */
9747  __Pyx_XDECREF(__pyx_r);
9748  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9749  __Pyx_GOTREF(__pyx_t_1);
9750  __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)
9751  __Pyx_GOTREF(__pyx_t_2);
9752  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9753  __pyx_r = __pyx_t_2;
9754  __pyx_t_2 = 0;
9755  goto __pyx_L0;
9756 
9757  /* "PyClical.pyx":1060
9758  * return clifford().wrap( self.instance.pure() )
9759  *
9760  * def even(self): # <<<<<<<<<<<<<<
9761  * """
9762  * Even part of multivector, sum of even grade terms.
9763  */
9764 
9765  /* function exit code */
9766  __pyx_L1_error:;
9767  __Pyx_XDECREF(__pyx_t_1);
9768  __Pyx_XDECREF(__pyx_t_2);
9769  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9770  __pyx_r = NULL;
9771  __pyx_L0:;
9772  __Pyx_XGIVEREF(__pyx_r);
9773  __Pyx_RefNannyFinishContext();
9774  return __pyx_r;
9775  }
9776 
9777  /* "PyClical.pyx":1069
9778  * return clifford().wrap( self.instance.even() )
9779  *
9780  * def odd(self): # <<<<<<<<<<<<<<
9781  * """
9782  * Odd part of multivector, sum of odd grade terms.
9783  */
9784 
9785  /* Python wrapper */
9786  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9787  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 ";
9788  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9789  PyObject *__pyx_r = 0;
9790  __Pyx_RefNannyDeclarations
9791  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9792  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9793 
9794  /* function exit code */
9795  __Pyx_RefNannyFinishContext();
9796  return __pyx_r;
9797  }
9798 
9799  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9800  PyObject *__pyx_r = NULL;
9801  __Pyx_RefNannyDeclarations
9802  PyObject *__pyx_t_1 = NULL;
9803  PyObject *__pyx_t_2 = NULL;
9804  __Pyx_RefNannySetupContext("odd", 0);
9805 
9806  /* "PyClical.pyx":1076
9807  * {1}
9808  * """
9809  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9810  *
9811  * def vector_part(self, frm = None):
9812  */
9813  __Pyx_XDECREF(__pyx_r);
9814  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9815  __Pyx_GOTREF(__pyx_t_1);
9816  __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)
9817  __Pyx_GOTREF(__pyx_t_2);
9818  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9819  __pyx_r = __pyx_t_2;
9820  __pyx_t_2 = 0;
9821  goto __pyx_L0;
9822 
9823  /* "PyClical.pyx":1069
9824  * return clifford().wrap( self.instance.even() )
9825  *
9826  * def odd(self): # <<<<<<<<<<<<<<
9827  * """
9828  * Odd part of multivector, sum of odd grade terms.
9829  */
9830 
9831  /* function exit code */
9832  __pyx_L1_error:;
9833  __Pyx_XDECREF(__pyx_t_1);
9834  __Pyx_XDECREF(__pyx_t_2);
9835  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9836  __pyx_r = NULL;
9837  __pyx_L0:;
9838  __Pyx_XGIVEREF(__pyx_r);
9839  __Pyx_RefNannyFinishContext();
9840  return __pyx_r;
9841  }
9842 
9843  /* "PyClical.pyx":1078
9844  * return clifford().wrap( self.instance.odd() )
9845  *
9846  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9847  * """
9848  * Vector part of multivector, as a Python list, with respect to frm.
9849  */
9850 
9851  /* Python wrapper */
9852  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9853  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 ";
9854  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9855  PyObject *__pyx_v_frm = 0;
9856  PyObject *__pyx_r = 0;
9857  __Pyx_RefNannyDeclarations
9858  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9859  {
9860  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9861  PyObject* values[1] = {0};
9862  values[0] = ((PyObject *)Py_None);
9863  if (unlikely(__pyx_kwds)) {
9864  Py_ssize_t kw_args;
9865  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9866  switch (pos_args) {
9867  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9868  CYTHON_FALLTHROUGH;
9869  case 0: break;
9870  default: goto __pyx_L5_argtuple_error;
9871  }
9872  kw_args = PyDict_Size(__pyx_kwds);
9873  switch (pos_args) {
9874  case 0:
9875  if (kw_args > 0) {
9876  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9877  if (value) { values[0] = value; kw_args--; }
9878  }
9879  }
9880  if (unlikely(kw_args > 0)) {
9881  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9882  }
9883  } else {
9884  switch (PyTuple_GET_SIZE(__pyx_args)) {
9885  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9886  CYTHON_FALLTHROUGH;
9887  case 0: break;
9888  default: goto __pyx_L5_argtuple_error;
9889  }
9890  }
9891  __pyx_v_frm = values[0];
9892  }
9893  goto __pyx_L4_argument_unpacking_done;
9894  __pyx_L5_argtuple_error:;
9895  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9896  __pyx_L3_error:;
9897  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9898  __Pyx_RefNannyFinishContext();
9899  return NULL;
9900  __pyx_L4_argument_unpacking_done:;
9901  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9902 
9903  /* function exit code */
9904  __Pyx_RefNannyFinishContext();
9905  return __pyx_r;
9906  }
9907 
9908  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9909  PyObject *__pyx_v_error_msg_prefix = NULL;
9910  std::vector<scalar_t> __pyx_v_vec;
9911  int __pyx_v_n;
9912  int __pyx_v_i;
9913  PyObject *__pyx_v_lst = NULL;
9914  PyObject *__pyx_v_err = NULL;
9915  PyObject *__pyx_r = NULL;
9916  __Pyx_RefNannyDeclarations
9917  PyObject *__pyx_t_1 = NULL;
9918  PyObject *__pyx_t_2 = NULL;
9919  PyObject *__pyx_t_3 = NULL;
9920  int __pyx_t_4;
9921  int __pyx_t_5;
9922  std::vector<scalar_t> __pyx_t_6;
9923  PyObject *__pyx_t_7 = NULL;
9924  int __pyx_t_8;
9925  int __pyx_t_9;
9926  int __pyx_t_10;
9927  PyObject *__pyx_t_11 = NULL;
9928  PyObject *__pyx_t_12 = NULL;
9929  PyObject *__pyx_t_13 = NULL;
9930  PyObject *__pyx_t_14 = NULL;
9931  PyObject *__pyx_t_15 = NULL;
9932  __Pyx_RefNannySetupContext("vector_part", 0);
9933 
9934  /* "PyClical.pyx":1087
9935  * [0.0, 2.0, 3.0]
9936  * """
9937  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9938  * cdef vector[scalar_t] vec
9939  * cdef int n
9940  */
9941  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9942  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9943 
9944  /* "PyClical.pyx":1091
9945  * cdef int n
9946  * cdef int i
9947  * try: # <<<<<<<<<<<<<<
9948  * if frm is None:
9949  * vec = self.instance.vector_part()
9950  */
9951  {
9952  __Pyx_PyThreadState_declare
9953  __Pyx_PyThreadState_assign
9954  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9955  __Pyx_XGOTREF(__pyx_t_1);
9956  __Pyx_XGOTREF(__pyx_t_2);
9957  __Pyx_XGOTREF(__pyx_t_3);
9958  /*try:*/ {
9959 
9960  /* "PyClical.pyx":1092
9961  * cdef int i
9962  * try:
9963  * if frm is None: # <<<<<<<<<<<<<<
9964  * vec = self.instance.vector_part()
9965  * else:
9966  */
9967  __pyx_t_4 = (__pyx_v_frm == Py_None);
9968  __pyx_t_5 = (__pyx_t_4 != 0);
9969  if (__pyx_t_5) {
9970 
9971  /* "PyClical.pyx":1093
9972  * try:
9973  * if frm is None:
9974  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9975  * else:
9976  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9977  */
9978  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9979  __pyx_v_vec = __pyx_t_6;
9980 
9981  /* "PyClical.pyx":1092
9982  * cdef int i
9983  * try:
9984  * if frm is None: # <<<<<<<<<<<<<<
9985  * vec = self.instance.vector_part()
9986  * else:
9987  */
9988  goto __pyx_L9;
9989  }
9990 
9991  /* "PyClical.pyx":1095
9992  * vec = self.instance.vector_part()
9993  * else:
9994  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9995  * n = vec.size()
9996  * lst = [0.0]*n
9997  */
9998  /*else*/ {
9999  try {
10000  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
10001  } catch(...) {
10002  __Pyx_CppExn2PyErr();
10003  __PYX_ERR(0, 1095, __pyx_L3_error)
10004  }
10005  __pyx_v_vec = __pyx_t_6;
10006  }
10007  __pyx_L9:;
10008 
10009  /* "PyClical.pyx":1096
10010  * else:
10011  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10012  * n = vec.size() # <<<<<<<<<<<<<<
10013  * lst = [0.0]*n
10014  * for i in xrange(n):
10015  */
10016  __pyx_v_n = __pyx_v_vec.size();
10017 
10018  /* "PyClical.pyx":1097
10019  * vec = self.instance.vector_part((<index_set>frm).unwrap())
10020  * n = vec.size()
10021  * lst = [0.0]*n # <<<<<<<<<<<<<<
10022  * for i in xrange(n):
10023  * lst[i] = vec[i]
10024  */
10025  __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)
10026  __Pyx_GOTREF(__pyx_t_7);
10027  { Py_ssize_t __pyx_temp;
10028  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
10029  __Pyx_INCREF(__pyx_float_0_0);
10030  __Pyx_GIVEREF(__pyx_float_0_0);
10031  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
10032  }
10033  }
10034  __pyx_v_lst = ((PyObject*)__pyx_t_7);
10035  __pyx_t_7 = 0;
10036 
10037  /* "PyClical.pyx":1098
10038  * n = vec.size()
10039  * lst = [0.0]*n
10040  * for i in xrange(n): # <<<<<<<<<<<<<<
10041  * lst[i] = vec[i]
10042  * return lst
10043  */
10044  __pyx_t_8 = __pyx_v_n;
10045  __pyx_t_9 = __pyx_t_8;
10046  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
10047  __pyx_v_i = __pyx_t_10;
10048 
10049  /* "PyClical.pyx":1099
10050  * lst = [0.0]*n
10051  * for i in xrange(n):
10052  * lst[i] = vec[i] # <<<<<<<<<<<<<<
10053  * return lst
10054  * except RuntimeError as err:
10055  */
10056  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
10057  __Pyx_GOTREF(__pyx_t_7);
10058  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)
10059  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10060  }
10061 
10062  /* "PyClical.pyx":1100
10063  * for i in xrange(n):
10064  * lst[i] = vec[i]
10065  * return lst # <<<<<<<<<<<<<<
10066  * except RuntimeError as err:
10067  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10068  */
10069  __Pyx_XDECREF(__pyx_r);
10070  __Pyx_INCREF(__pyx_v_lst);
10071  __pyx_r = __pyx_v_lst;
10072  goto __pyx_L7_try_return;
10073 
10074  /* "PyClical.pyx":1091
10075  * cdef int n
10076  * cdef int i
10077  * try: # <<<<<<<<<<<<<<
10078  * if frm is None:
10079  * vec = self.instance.vector_part()
10080  */
10081  }
10082  __pyx_L3_error:;
10083  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10084 
10085  /* "PyClical.pyx":1101
10086  * lst[i] = vec[i]
10087  * return lst
10088  * except RuntimeError as err: # <<<<<<<<<<<<<<
10089  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10090  * + repr(frm) + " as frame:\n\t"
10091  */
10092  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10093  if (__pyx_t_8) {
10094  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10095  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10096  __Pyx_GOTREF(__pyx_t_7);
10097  __Pyx_GOTREF(__pyx_t_11);
10098  __Pyx_GOTREF(__pyx_t_12);
10099  __Pyx_INCREF(__pyx_t_11);
10100  __pyx_v_err = __pyx_t_11;
10101 
10102  /* "PyClical.pyx":1102
10103  * return lst
10104  * except RuntimeError as err:
10105  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10106  * + repr(frm) + " as frame:\n\t"
10107  * + str(err))
10108  */
10109  __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)
10110  __Pyx_GOTREF(__pyx_t_13);
10111  __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)
10112  __Pyx_GOTREF(__pyx_t_14);
10113  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10114  __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)
10115  __Pyx_GOTREF(__pyx_t_13);
10116  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10117 
10118  /* "PyClical.pyx":1103
10119  * except RuntimeError as err:
10120  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10121  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10122  * + str(err))
10123  *
10124  */
10125  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10126  __Pyx_GOTREF(__pyx_t_14);
10127  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10128  __Pyx_GOTREF(__pyx_t_15);
10129  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10130  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10131  __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)
10132  __Pyx_GOTREF(__pyx_t_14);
10133  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10134 
10135  /* "PyClical.pyx":1104
10136  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10137  * + repr(frm) + " as frame:\n\t"
10138  * + str(err)) # <<<<<<<<<<<<<<
10139  *
10140  * def involute(self):
10141  */
10142  __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)
10143  __Pyx_GOTREF(__pyx_t_15);
10144  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10145  __Pyx_GOTREF(__pyx_t_13);
10146  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10147  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10148 
10149  /* "PyClical.pyx":1102
10150  * return lst
10151  * except RuntimeError as err:
10152  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10153  * + repr(frm) + " as frame:\n\t"
10154  * + str(err))
10155  */
10156  __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)
10157  __Pyx_GOTREF(__pyx_t_15);
10158  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10159  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10160  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10161  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10162  }
10163  goto __pyx_L5_except_error;
10164  __pyx_L5_except_error:;
10165 
10166  /* "PyClical.pyx":1091
10167  * cdef int n
10168  * cdef int i
10169  * try: # <<<<<<<<<<<<<<
10170  * if frm is None:
10171  * vec = self.instance.vector_part()
10172  */
10173  __Pyx_XGIVEREF(__pyx_t_1);
10174  __Pyx_XGIVEREF(__pyx_t_2);
10175  __Pyx_XGIVEREF(__pyx_t_3);
10176  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10177  goto __pyx_L1_error;
10178  __pyx_L7_try_return:;
10179  __Pyx_XGIVEREF(__pyx_t_1);
10180  __Pyx_XGIVEREF(__pyx_t_2);
10181  __Pyx_XGIVEREF(__pyx_t_3);
10182  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10183  goto __pyx_L0;
10184  }
10185 
10186  /* "PyClical.pyx":1078
10187  * return clifford().wrap( self.instance.odd() )
10188  *
10189  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10190  * """
10191  * Vector part of multivector, as a Python list, with respect to frm.
10192  */
10193 
10194  /* function exit code */
10195  __pyx_L1_error:;
10196  __Pyx_XDECREF(__pyx_t_7);
10197  __Pyx_XDECREF(__pyx_t_11);
10198  __Pyx_XDECREF(__pyx_t_12);
10199  __Pyx_XDECREF(__pyx_t_13);
10200  __Pyx_XDECREF(__pyx_t_14);
10201  __Pyx_XDECREF(__pyx_t_15);
10202  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10203  __pyx_r = NULL;
10204  __pyx_L0:;
10205  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10206  __Pyx_XDECREF(__pyx_v_lst);
10207  __Pyx_XDECREF(__pyx_v_err);
10208  __Pyx_XGIVEREF(__pyx_r);
10209  __Pyx_RefNannyFinishContext();
10210  return __pyx_r;
10211  }
10212 
10213  /* "PyClical.pyx":1106
10214  * + str(err))
10215  *
10216  * def involute(self): # <<<<<<<<<<<<<<
10217  * """
10218  * Main involution, each {i} is replaced by -{i} in each term,
10219  */
10220 
10221  /* Python wrapper */
10222  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10223  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 ";
10224  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10225  PyObject *__pyx_r = 0;
10226  __Pyx_RefNannyDeclarations
10227  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10228  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10229 
10230  /* function exit code */
10231  __Pyx_RefNannyFinishContext();
10232  return __pyx_r;
10233  }
10234 
10235  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10236  PyObject *__pyx_r = NULL;
10237  __Pyx_RefNannyDeclarations
10238  PyObject *__pyx_t_1 = NULL;
10239  PyObject *__pyx_t_2 = NULL;
10240  __Pyx_RefNannySetupContext("involute", 0);
10241 
10242  /* "PyClical.pyx":1120
10243  * 1-{1}+{1,2}
10244  * """
10245  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10246  *
10247  * def reverse(self):
10248  */
10249  __Pyx_XDECREF(__pyx_r);
10250  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10251  __Pyx_GOTREF(__pyx_t_1);
10252  __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)
10253  __Pyx_GOTREF(__pyx_t_2);
10254  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10255  __pyx_r = __pyx_t_2;
10256  __pyx_t_2 = 0;
10257  goto __pyx_L0;
10258 
10259  /* "PyClical.pyx":1106
10260  * + str(err))
10261  *
10262  * def involute(self): # <<<<<<<<<<<<<<
10263  * """
10264  * Main involution, each {i} is replaced by -{i} in each term,
10265  */
10266 
10267  /* function exit code */
10268  __pyx_L1_error:;
10269  __Pyx_XDECREF(__pyx_t_1);
10270  __Pyx_XDECREF(__pyx_t_2);
10271  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10272  __pyx_r = NULL;
10273  __pyx_L0:;
10274  __Pyx_XGIVEREF(__pyx_r);
10275  __Pyx_RefNannyFinishContext();
10276  return __pyx_r;
10277  }
10278 
10279  /* "PyClical.pyx":1122
10280  * return clifford().wrap( self.instance.involute() )
10281  *
10282  * def reverse(self): # <<<<<<<<<<<<<<
10283  * """
10284  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10285  */
10286 
10287  /* Python wrapper */
10288  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10289  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 ";
10290  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10291  PyObject *__pyx_r = 0;
10292  __Pyx_RefNannyDeclarations
10293  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10294  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10295 
10296  /* function exit code */
10297  __Pyx_RefNannyFinishContext();
10298  return __pyx_r;
10299  }
10300 
10301  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10302  PyObject *__pyx_r = NULL;
10303  __Pyx_RefNannyDeclarations
10304  PyObject *__pyx_t_1 = NULL;
10305  PyObject *__pyx_t_2 = NULL;
10306  __Pyx_RefNannySetupContext("reverse", 0);
10307 
10308  /* "PyClical.pyx":1135
10309  * 1+{1}-{1,2}
10310  * """
10311  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10312  *
10313  * def conj(self):
10314  */
10315  __Pyx_XDECREF(__pyx_r);
10316  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10317  __Pyx_GOTREF(__pyx_t_1);
10318  __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)
10319  __Pyx_GOTREF(__pyx_t_2);
10320  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10321  __pyx_r = __pyx_t_2;
10322  __pyx_t_2 = 0;
10323  goto __pyx_L0;
10324 
10325  /* "PyClical.pyx":1122
10326  * return clifford().wrap( self.instance.involute() )
10327  *
10328  * def reverse(self): # <<<<<<<<<<<<<<
10329  * """
10330  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10331  */
10332 
10333  /* function exit code */
10334  __pyx_L1_error:;
10335  __Pyx_XDECREF(__pyx_t_1);
10336  __Pyx_XDECREF(__pyx_t_2);
10337  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10338  __pyx_r = NULL;
10339  __pyx_L0:;
10340  __Pyx_XGIVEREF(__pyx_r);
10341  __Pyx_RefNannyFinishContext();
10342  return __pyx_r;
10343  }
10344 
10345  /* "PyClical.pyx":1137
10346  * return clifford().wrap( self.instance.reverse() )
10347  *
10348  * def conj(self): # <<<<<<<<<<<<<<
10349  * """
10350  * Conjugation, reverse o involute == involute o reverse.
10351  */
10352 
10353  /* Python wrapper */
10354  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10355  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 ";
10356  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10357  PyObject *__pyx_r = 0;
10358  __Pyx_RefNannyDeclarations
10359  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10360  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10361 
10362  /* function exit code */
10363  __Pyx_RefNannyFinishContext();
10364  return __pyx_r;
10365  }
10366 
10367  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10368  PyObject *__pyx_r = NULL;
10369  __Pyx_RefNannyDeclarations
10370  PyObject *__pyx_t_1 = NULL;
10371  PyObject *__pyx_t_2 = NULL;
10372  __Pyx_RefNannySetupContext("conj", 0);
10373 
10374  /* "PyClical.pyx":1150
10375  * 1-{1}-{1,2}
10376  * """
10377  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10378  *
10379  * def quad(self):
10380  */
10381  __Pyx_XDECREF(__pyx_r);
10382  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10383  __Pyx_GOTREF(__pyx_t_1);
10384  __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)
10385  __Pyx_GOTREF(__pyx_t_2);
10386  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10387  __pyx_r = __pyx_t_2;
10388  __pyx_t_2 = 0;
10389  goto __pyx_L0;
10390 
10391  /* "PyClical.pyx":1137
10392  * return clifford().wrap( self.instance.reverse() )
10393  *
10394  * def conj(self): # <<<<<<<<<<<<<<
10395  * """
10396  * Conjugation, reverse o involute == involute o reverse.
10397  */
10398 
10399  /* function exit code */
10400  __pyx_L1_error:;
10401  __Pyx_XDECREF(__pyx_t_1);
10402  __Pyx_XDECREF(__pyx_t_2);
10403  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10404  __pyx_r = NULL;
10405  __pyx_L0:;
10406  __Pyx_XGIVEREF(__pyx_r);
10407  __Pyx_RefNannyFinishContext();
10408  return __pyx_r;
10409  }
10410 
10411  /* "PyClical.pyx":1152
10412  * return clifford().wrap( self.instance.conj() )
10413  *
10414  * def quad(self): # <<<<<<<<<<<<<<
10415  * """
10416  * Quadratic form == (rev(x)*x)(0).
10417  */
10418 
10419  /* Python wrapper */
10420  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10421  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 ";
10422  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10423  PyObject *__pyx_r = 0;
10424  __Pyx_RefNannyDeclarations
10425  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10426  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10427 
10428  /* function exit code */
10429  __Pyx_RefNannyFinishContext();
10430  return __pyx_r;
10431  }
10432 
10433  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10434  PyObject *__pyx_r = NULL;
10435  __Pyx_RefNannyDeclarations
10436  PyObject *__pyx_t_1 = NULL;
10437  __Pyx_RefNannySetupContext("quad", 0);
10438 
10439  /* "PyClical.pyx":1161
10440  * 2.0
10441  * """
10442  * return self.instance.quad() # <<<<<<<<<<<<<<
10443  *
10444  * def norm(self):
10445  */
10446  __Pyx_XDECREF(__pyx_r);
10447  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10448  __Pyx_GOTREF(__pyx_t_1);
10449  __pyx_r = __pyx_t_1;
10450  __pyx_t_1 = 0;
10451  goto __pyx_L0;
10452 
10453  /* "PyClical.pyx":1152
10454  * return clifford().wrap( self.instance.conj() )
10455  *
10456  * def quad(self): # <<<<<<<<<<<<<<
10457  * """
10458  * Quadratic form == (rev(x)*x)(0).
10459  */
10460 
10461  /* function exit code */
10462  __pyx_L1_error:;
10463  __Pyx_XDECREF(__pyx_t_1);
10464  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10465  __pyx_r = NULL;
10466  __pyx_L0:;
10467  __Pyx_XGIVEREF(__pyx_r);
10468  __Pyx_RefNannyFinishContext();
10469  return __pyx_r;
10470  }
10471 
10472  /* "PyClical.pyx":1163
10473  * return self.instance.quad()
10474  *
10475  * def norm(self): # <<<<<<<<<<<<<<
10476  * """
10477  * Norm == sum of squares of coordinates.
10478  */
10479 
10480  /* Python wrapper */
10481  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10482  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 ";
10483  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10484  PyObject *__pyx_r = 0;
10485  __Pyx_RefNannyDeclarations
10486  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10487  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10488 
10489  /* function exit code */
10490  __Pyx_RefNannyFinishContext();
10491  return __pyx_r;
10492  }
10493 
10494  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10495  PyObject *__pyx_r = NULL;
10496  __Pyx_RefNannyDeclarations
10497  PyObject *__pyx_t_1 = NULL;
10498  __Pyx_RefNannySetupContext("norm", 0);
10499 
10500  /* "PyClical.pyx":1172
10501  * 4.0
10502  * """
10503  * return self.instance.norm() # <<<<<<<<<<<<<<
10504  *
10505  * def abs(self):
10506  */
10507  __Pyx_XDECREF(__pyx_r);
10508  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10509  __Pyx_GOTREF(__pyx_t_1);
10510  __pyx_r = __pyx_t_1;
10511  __pyx_t_1 = 0;
10512  goto __pyx_L0;
10513 
10514  /* "PyClical.pyx":1163
10515  * return self.instance.quad()
10516  *
10517  * def norm(self): # <<<<<<<<<<<<<<
10518  * """
10519  * Norm == sum of squares of coordinates.
10520  */
10521 
10522  /* function exit code */
10523  __pyx_L1_error:;
10524  __Pyx_XDECREF(__pyx_t_1);
10525  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10526  __pyx_r = NULL;
10527  __pyx_L0:;
10528  __Pyx_XGIVEREF(__pyx_r);
10529  __Pyx_RefNannyFinishContext();
10530  return __pyx_r;
10531  }
10532 
10533  /* "PyClical.pyx":1174
10534  * return self.instance.norm()
10535  *
10536  * def abs(self): # <<<<<<<<<<<<<<
10537  * """
10538  * Absolute value: square root of norm.
10539  */
10540 
10541  /* Python wrapper */
10542  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10543  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 ";
10544  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10545  PyObject *__pyx_r = 0;
10546  __Pyx_RefNannyDeclarations
10547  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10548  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10549 
10550  /* function exit code */
10551  __Pyx_RefNannyFinishContext();
10552  return __pyx_r;
10553  }
10554 
10555  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10556  PyObject *__pyx_r = NULL;
10557  __Pyx_RefNannyDeclarations
10558  PyObject *__pyx_t_1 = NULL;
10559  __Pyx_RefNannySetupContext("abs", 0);
10560 
10561  /* "PyClical.pyx":1181
10562  * 2.0
10563  * """
10564  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10565  *
10566  * def max_abs(self):
10567  */
10568  __Pyx_XDECREF(__pyx_r);
10569  __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)
10570  __Pyx_GOTREF(__pyx_t_1);
10571  __pyx_r = __pyx_t_1;
10572  __pyx_t_1 = 0;
10573  goto __pyx_L0;
10574 
10575  /* "PyClical.pyx":1174
10576  * return self.instance.norm()
10577  *
10578  * def abs(self): # <<<<<<<<<<<<<<
10579  * """
10580  * Absolute value: square root of norm.
10581  */
10582 
10583  /* function exit code */
10584  __pyx_L1_error:;
10585  __Pyx_XDECREF(__pyx_t_1);
10586  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10587  __pyx_r = NULL;
10588  __pyx_L0:;
10589  __Pyx_XGIVEREF(__pyx_r);
10590  __Pyx_RefNannyFinishContext();
10591  return __pyx_r;
10592  }
10593 
10594  /* "PyClical.pyx":1183
10595  * return glucat.abs( self.unwrap() )
10596  *
10597  * def max_abs(self): # <<<<<<<<<<<<<<
10598  * """
10599  * Maximum of absolute values of components of multivector: multivector infinity norm.
10600  */
10601 
10602  /* Python wrapper */
10603  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10604  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 ";
10605  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10606  PyObject *__pyx_r = 0;
10607  __Pyx_RefNannyDeclarations
10608  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10609  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10610 
10611  /* function exit code */
10612  __Pyx_RefNannyFinishContext();
10613  return __pyx_r;
10614  }
10615 
10616  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10617  PyObject *__pyx_r = NULL;
10618  __Pyx_RefNannyDeclarations
10619  PyObject *__pyx_t_1 = NULL;
10620  __Pyx_RefNannySetupContext("max_abs", 0);
10621 
10622  /* "PyClical.pyx":1192
10623  * 3.0
10624  * """
10625  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10626  *
10627  * def truncated(self, limit):
10628  */
10629  __Pyx_XDECREF(__pyx_r);
10630  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10631  __Pyx_GOTREF(__pyx_t_1);
10632  __pyx_r = __pyx_t_1;
10633  __pyx_t_1 = 0;
10634  goto __pyx_L0;
10635 
10636  /* "PyClical.pyx":1183
10637  * return glucat.abs( self.unwrap() )
10638  *
10639  * def max_abs(self): # <<<<<<<<<<<<<<
10640  * """
10641  * Maximum of absolute values of components of multivector: multivector infinity norm.
10642  */
10643 
10644  /* function exit code */
10645  __pyx_L1_error:;
10646  __Pyx_XDECREF(__pyx_t_1);
10647  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10648  __pyx_r = NULL;
10649  __pyx_L0:;
10650  __Pyx_XGIVEREF(__pyx_r);
10651  __Pyx_RefNannyFinishContext();
10652  return __pyx_r;
10653  }
10654 
10655  /* "PyClical.pyx":1194
10656  * return self.instance.max_abs()
10657  *
10658  * def truncated(self, limit): # <<<<<<<<<<<<<<
10659  * """
10660  * Remove all terms of self with relative size smaller than limit.
10661  */
10662 
10663  /* Python wrapper */
10664  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10665  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 ";
10666  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10667  PyObject *__pyx_r = 0;
10668  __Pyx_RefNannyDeclarations
10669  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10670  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10671 
10672  /* function exit code */
10673  __Pyx_RefNannyFinishContext();
10674  return __pyx_r;
10675  }
10676 
10677  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10678  PyObject *__pyx_r = NULL;
10679  __Pyx_RefNannyDeclarations
10680  PyObject *__pyx_t_1 = NULL;
10681  scalar_t __pyx_t_2;
10682  PyObject *__pyx_t_3 = NULL;
10683  __Pyx_RefNannySetupContext("truncated", 0);
10684 
10685  /* "PyClical.pyx":1203
10686  * clifford("10000+{1}")
10687  * """
10688  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10689  *
10690  * def isnan(self):
10691  */
10692  __Pyx_XDECREF(__pyx_r);
10693  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10694  __Pyx_GOTREF(__pyx_t_1);
10695  __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)
10696  __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)
10697  __Pyx_GOTREF(__pyx_t_3);
10698  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10699  __pyx_r = __pyx_t_3;
10700  __pyx_t_3 = 0;
10701  goto __pyx_L0;
10702 
10703  /* "PyClical.pyx":1194
10704  * return self.instance.max_abs()
10705  *
10706  * def truncated(self, limit): # <<<<<<<<<<<<<<
10707  * """
10708  * Remove all terms of self with relative size smaller than limit.
10709  */
10710 
10711  /* function exit code */
10712  __pyx_L1_error:;
10713  __Pyx_XDECREF(__pyx_t_1);
10714  __Pyx_XDECREF(__pyx_t_3);
10715  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10716  __pyx_r = NULL;
10717  __pyx_L0:;
10718  __Pyx_XGIVEREF(__pyx_r);
10719  __Pyx_RefNannyFinishContext();
10720  return __pyx_r;
10721  }
10722 
10723  /* "PyClical.pyx":1205
10724  * return clifford().wrap( self.instance.truncated(limit) )
10725  *
10726  * def isnan(self): # <<<<<<<<<<<<<<
10727  * """
10728  * Check if a multivector contains any IEEE NaN values.
10729  */
10730 
10731  /* Python wrapper */
10732  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10733  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10734  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10735  PyObject *__pyx_r = 0;
10736  __Pyx_RefNannyDeclarations
10737  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10738  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10739 
10740  /* function exit code */
10741  __Pyx_RefNannyFinishContext();
10742  return __pyx_r;
10743  }
10744 
10745  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10746  PyObject *__pyx_r = NULL;
10747  __Pyx_RefNannyDeclarations
10748  PyObject *__pyx_t_1 = NULL;
10749  __Pyx_RefNannySetupContext("isnan", 0);
10750 
10751  /* "PyClical.pyx":1212
10752  * False
10753  * """
10754  * return self.instance.isnan() # <<<<<<<<<<<<<<
10755  *
10756  * def frame(self):
10757  */
10758  __Pyx_XDECREF(__pyx_r);
10759  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10760  __Pyx_GOTREF(__pyx_t_1);
10761  __pyx_r = __pyx_t_1;
10762  __pyx_t_1 = 0;
10763  goto __pyx_L0;
10764 
10765  /* "PyClical.pyx":1205
10766  * return clifford().wrap( self.instance.truncated(limit) )
10767  *
10768  * def isnan(self): # <<<<<<<<<<<<<<
10769  * """
10770  * Check if a multivector contains any IEEE NaN values.
10771  */
10772 
10773  /* function exit code */
10774  __pyx_L1_error:;
10775  __Pyx_XDECREF(__pyx_t_1);
10776  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10777  __pyx_r = NULL;
10778  __pyx_L0:;
10779  __Pyx_XGIVEREF(__pyx_r);
10780  __Pyx_RefNannyFinishContext();
10781  return __pyx_r;
10782  }
10783 
10784  /* "PyClical.pyx":1214
10785  * return self.instance.isnan()
10786  *
10787  * def frame(self): # <<<<<<<<<<<<<<
10788  * """
10789  * Subalgebra generated by all generators of terms of given multivector.
10790  */
10791 
10792  /* Python wrapper */
10793  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10794  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 ";
10795  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10796  PyObject *__pyx_r = 0;
10797  __Pyx_RefNannyDeclarations
10798  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10799  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10800 
10801  /* function exit code */
10802  __Pyx_RefNannyFinishContext();
10803  return __pyx_r;
10804  }
10805 
10806  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10807  PyObject *__pyx_r = NULL;
10808  __Pyx_RefNannyDeclarations
10809  PyObject *__pyx_t_1 = NULL;
10810  PyObject *__pyx_t_2 = NULL;
10811  __Pyx_RefNannySetupContext("frame", 0);
10812 
10813  /* "PyClical.pyx":1223
10814  * <type 'PyClical.index_set'>
10815  * """
10816  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10817  *
10818  * def __repr__(self):
10819  */
10820  __Pyx_XDECREF(__pyx_r);
10821  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10822  __Pyx_GOTREF(__pyx_t_1);
10823  __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)
10824  __Pyx_GOTREF(__pyx_t_2);
10825  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10826  __pyx_r = __pyx_t_2;
10827  __pyx_t_2 = 0;
10828  goto __pyx_L0;
10829 
10830  /* "PyClical.pyx":1214
10831  * return self.instance.isnan()
10832  *
10833  * def frame(self): # <<<<<<<<<<<<<<
10834  * """
10835  * Subalgebra generated by all generators of terms of given multivector.
10836  */
10837 
10838  /* function exit code */
10839  __pyx_L1_error:;
10840  __Pyx_XDECREF(__pyx_t_1);
10841  __Pyx_XDECREF(__pyx_t_2);
10842  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10843  __pyx_r = NULL;
10844  __pyx_L0:;
10845  __Pyx_XGIVEREF(__pyx_r);
10846  __Pyx_RefNannyFinishContext();
10847  return __pyx_r;
10848  }
10849 
10850  /* "PyClical.pyx":1225
10851  * return index_set().wrap( self.instance.frame() )
10852  *
10853  * def __repr__(self): # <<<<<<<<<<<<<<
10854  * """
10855  * The official string representation of self.
10856  */
10857 
10858  /* Python wrapper */
10859  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10860  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 ";
10861  #if CYTHON_COMPILING_IN_CPYTHON
10862  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10863  #endif
10864  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10865  PyObject *__pyx_r = 0;
10866  __Pyx_RefNannyDeclarations
10867  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10868  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10869 
10870  /* function exit code */
10871  __Pyx_RefNannyFinishContext();
10872  return __pyx_r;
10873  }
10874 
10875  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10876  PyObject *__pyx_r = NULL;
10877  __Pyx_RefNannyDeclarations
10878  PyObject *__pyx_t_1 = NULL;
10879  __Pyx_RefNannySetupContext("__repr__", 0);
10880 
10881  /* "PyClical.pyx":1232
10882  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10883  * """
10884  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10885  *
10886  * def __str__(self):
10887  */
10888  __Pyx_XDECREF(__pyx_r);
10889  __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)
10890  __Pyx_GOTREF(__pyx_t_1);
10891  __pyx_r = __pyx_t_1;
10892  __pyx_t_1 = 0;
10893  goto __pyx_L0;
10894 
10895  /* "PyClical.pyx":1225
10896  * return index_set().wrap( self.instance.frame() )
10897  *
10898  * def __repr__(self): # <<<<<<<<<<<<<<
10899  * """
10900  * The official string representation of self.
10901  */
10902 
10903  /* function exit code */
10904  __pyx_L1_error:;
10905  __Pyx_XDECREF(__pyx_t_1);
10906  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10907  __pyx_r = NULL;
10908  __pyx_L0:;
10909  __Pyx_XGIVEREF(__pyx_r);
10910  __Pyx_RefNannyFinishContext();
10911  return __pyx_r;
10912  }
10913 
10914  /* "PyClical.pyx":1234
10915  * return clifford_to_repr( self.unwrap() ).c_str()
10916  *
10917  * def __str__(self): # <<<<<<<<<<<<<<
10918  * """
10919  * The informal string representation of self.
10920  */
10921 
10922  /* Python wrapper */
10923  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10924  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 ";
10925  #if CYTHON_COMPILING_IN_CPYTHON
10926  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10927  #endif
10928  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10929  PyObject *__pyx_r = 0;
10930  __Pyx_RefNannyDeclarations
10931  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10932  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10933 
10934  /* function exit code */
10935  __Pyx_RefNannyFinishContext();
10936  return __pyx_r;
10937  }
10938 
10939  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10940  PyObject *__pyx_r = NULL;
10941  __Pyx_RefNannyDeclarations
10942  PyObject *__pyx_t_1 = NULL;
10943  __Pyx_RefNannySetupContext("__str__", 0);
10944 
10945  /* "PyClical.pyx":1241
10946  * '1+3{-1}+2{1,2}+4{-2,7}'
10947  * """
10948  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10949  *
10950  * def clifford_hidden_doctests():
10951  */
10952  __Pyx_XDECREF(__pyx_r);
10953  __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)
10954  __Pyx_GOTREF(__pyx_t_1);
10955  __pyx_r = __pyx_t_1;
10956  __pyx_t_1 = 0;
10957  goto __pyx_L0;
10958 
10959  /* "PyClical.pyx":1234
10960  * return clifford_to_repr( self.unwrap() ).c_str()
10961  *
10962  * def __str__(self): # <<<<<<<<<<<<<<
10963  * """
10964  * The informal string representation of self.
10965  */
10966 
10967  /* function exit code */
10968  __pyx_L1_error:;
10969  __Pyx_XDECREF(__pyx_t_1);
10970  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10971  __pyx_r = NULL;
10972  __pyx_L0:;
10973  __Pyx_XGIVEREF(__pyx_r);
10974  __Pyx_RefNannyFinishContext();
10975  return __pyx_r;
10976  }
10977 
10978  /* "(tree fragment)":1
10979  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10980  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10981  * def __setstate_cython__(self, __pyx_state):
10982  */
10983 
10984  /* Python wrapper */
10985  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10986  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10987  PyObject *__pyx_r = 0;
10988  __Pyx_RefNannyDeclarations
10989  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10990  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10991 
10992  /* function exit code */
10993  __Pyx_RefNannyFinishContext();
10994  return __pyx_r;
10995  }
10996 
10997  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10998  PyObject *__pyx_r = NULL;
10999  __Pyx_RefNannyDeclarations
11000  PyObject *__pyx_t_1 = NULL;
11001  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
11002 
11003  /* "(tree fragment)":2
11004  * def __reduce_cython__(self):
11005  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11006  * def __setstate_cython__(self, __pyx_state):
11007  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11008  */
11009  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
11010  __Pyx_GOTREF(__pyx_t_1);
11011  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11012  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11013  __PYX_ERR(1, 2, __pyx_L1_error)
11014 
11015  /* "(tree fragment)":1
11016  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
11017  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11018  * def __setstate_cython__(self, __pyx_state):
11019  */
11020 
11021  /* function exit code */
11022  __pyx_L1_error:;
11023  __Pyx_XDECREF(__pyx_t_1);
11024  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11025  __pyx_r = NULL;
11026  __Pyx_XGIVEREF(__pyx_r);
11027  __Pyx_RefNannyFinishContext();
11028  return __pyx_r;
11029  }
11030 
11031  /* "(tree fragment)":3
11032  * def __reduce_cython__(self):
11033  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11034  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11035  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11036  */
11037 
11038  /* Python wrapper */
11039  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
11040  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
11041  PyObject *__pyx_r = 0;
11042  __Pyx_RefNannyDeclarations
11043  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
11044  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
11045 
11046  /* function exit code */
11047  __Pyx_RefNannyFinishContext();
11048  return __pyx_r;
11049  }
11050 
11051  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) {
11052  PyObject *__pyx_r = NULL;
11053  __Pyx_RefNannyDeclarations
11054  PyObject *__pyx_t_1 = NULL;
11055  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
11056 
11057  /* "(tree fragment)":4
11058  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11059  * def __setstate_cython__(self, __pyx_state):
11060  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
11061  */
11062  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
11063  __Pyx_GOTREF(__pyx_t_1);
11064  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
11065  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11066  __PYX_ERR(1, 4, __pyx_L1_error)
11067 
11068  /* "(tree fragment)":3
11069  * def __reduce_cython__(self):
11070  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11071  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
11072  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
11073  */
11074 
11075  /* function exit code */
11076  __pyx_L1_error:;
11077  __Pyx_XDECREF(__pyx_t_1);
11078  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11079  __pyx_r = NULL;
11080  __Pyx_XGIVEREF(__pyx_r);
11081  __Pyx_RefNannyFinishContext();
11082  return __pyx_r;
11083  }
11084 
11085  /* "PyClical.pyx":1243
11086  * return clifford_to_str( self.unwrap() ).c_str()
11087  *
11088  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11089  * """
11090  * Tests for functions that Doctest cannot see.
11091  */
11092 
11093  /* Python wrapper */
11094  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11095  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 ";
11096  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};
11097  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11098  PyObject *__pyx_r = 0;
11099  __Pyx_RefNannyDeclarations
11100  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11101  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11102 
11103  /* function exit code */
11104  __Pyx_RefNannyFinishContext();
11105  return __pyx_r;
11106  }
11107 
11108  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11109  PyObject *__pyx_r = NULL;
11110  __Pyx_RefNannyDeclarations
11111  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11112 
11113  /* "PyClical.pyx":1327
11114  * True
11115  * """
11116  * return # <<<<<<<<<<<<<<
11117  *
11118  * cpdef inline inv(obj):
11119  */
11120  __Pyx_XDECREF(__pyx_r);
11121  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11122  goto __pyx_L0;
11123 
11124  /* "PyClical.pyx":1243
11125  * return clifford_to_str( self.unwrap() ).c_str()
11126  *
11127  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11128  * """
11129  * Tests for functions that Doctest cannot see.
11130  */
11131 
11132  /* function exit code */
11133  __pyx_L0:;
11134  __Pyx_XGIVEREF(__pyx_r);
11135  __Pyx_RefNannyFinishContext();
11136  return __pyx_r;
11137  }
11138 
11139  /* "PyClical.pyx":1329
11140  * return
11141  *
11142  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11143  * """
11144  * Geometric multiplicative inverse.
11145  */
11146 
11147  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11148  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11149  PyObject *__pyx_r = NULL;
11150  __Pyx_RefNannyDeclarations
11151  PyObject *__pyx_t_1 = NULL;
11152  PyObject *__pyx_t_2 = NULL;
11153  PyObject *__pyx_t_3 = NULL;
11154  __Pyx_RefNannySetupContext("inv", 0);
11155 
11156  /* "PyClical.pyx":1342
11157  * nan
11158  * """
11159  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11160  *
11161  * cpdef inline scalar(obj):
11162  */
11163  __Pyx_XDECREF(__pyx_r);
11164  __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)
11165  __Pyx_GOTREF(__pyx_t_2);
11166  __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)
11167  __Pyx_GOTREF(__pyx_t_3);
11168  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11169  __pyx_t_2 = NULL;
11170  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11171  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11172  if (likely(__pyx_t_2)) {
11173  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11174  __Pyx_INCREF(__pyx_t_2);
11175  __Pyx_INCREF(function);
11176  __Pyx_DECREF_SET(__pyx_t_3, function);
11177  }
11178  }
11179  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11180  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11181  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11182  __Pyx_GOTREF(__pyx_t_1);
11183  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11184  __pyx_r = __pyx_t_1;
11185  __pyx_t_1 = 0;
11186  goto __pyx_L0;
11187 
11188  /* "PyClical.pyx":1329
11189  * return
11190  *
11191  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11192  * """
11193  * Geometric multiplicative inverse.
11194  */
11195 
11196  /* function exit code */
11197  __pyx_L1_error:;
11198  __Pyx_XDECREF(__pyx_t_1);
11199  __Pyx_XDECREF(__pyx_t_2);
11200  __Pyx_XDECREF(__pyx_t_3);
11201  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11202  __pyx_r = 0;
11203  __pyx_L0:;
11204  __Pyx_XGIVEREF(__pyx_r);
11205  __Pyx_RefNannyFinishContext();
11206  return __pyx_r;
11207  }
11208 
11209  /* Python wrapper */
11210  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11211  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 ";
11212  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11213  PyObject *__pyx_r = 0;
11214  __Pyx_RefNannyDeclarations
11215  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11216  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11217 
11218  /* function exit code */
11219  __Pyx_RefNannyFinishContext();
11220  return __pyx_r;
11221  }
11222 
11223  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11224  PyObject *__pyx_r = NULL;
11225  __Pyx_RefNannyDeclarations
11226  PyObject *__pyx_t_1 = NULL;
11227  __Pyx_RefNannySetupContext("inv", 0);
11228  __Pyx_XDECREF(__pyx_r);
11229  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11230  __Pyx_GOTREF(__pyx_t_1);
11231  __pyx_r = __pyx_t_1;
11232  __pyx_t_1 = 0;
11233  goto __pyx_L0;
11234 
11235  /* function exit code */
11236  __pyx_L1_error:;
11237  __Pyx_XDECREF(__pyx_t_1);
11238  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11239  __pyx_r = NULL;
11240  __pyx_L0:;
11241  __Pyx_XGIVEREF(__pyx_r);
11242  __Pyx_RefNannyFinishContext();
11243  return __pyx_r;
11244  }
11245 
11246  /* "PyClical.pyx":1344
11247  * return clifford(obj).inv()
11248  *
11249  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11250  * """
11251  * Scalar part.
11252  */
11253 
11254  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11255  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11256  PyObject *__pyx_r = NULL;
11257  __Pyx_RefNannyDeclarations
11258  PyObject *__pyx_t_1 = NULL;
11259  PyObject *__pyx_t_2 = NULL;
11260  PyObject *__pyx_t_3 = NULL;
11261  __Pyx_RefNannySetupContext("scalar", 0);
11262 
11263  /* "PyClical.pyx":1353
11264  * 0.0
11265  * """
11266  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11267  *
11268  * cpdef inline real(obj):
11269  */
11270  __Pyx_XDECREF(__pyx_r);
11271  __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)
11272  __Pyx_GOTREF(__pyx_t_2);
11273  __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)
11274  __Pyx_GOTREF(__pyx_t_3);
11275  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11276  __pyx_t_2 = NULL;
11277  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11278  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11279  if (likely(__pyx_t_2)) {
11280  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11281  __Pyx_INCREF(__pyx_t_2);
11282  __Pyx_INCREF(function);
11283  __Pyx_DECREF_SET(__pyx_t_3, function);
11284  }
11285  }
11286  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11287  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11288  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11289  __Pyx_GOTREF(__pyx_t_1);
11290  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11291  __pyx_r = __pyx_t_1;
11292  __pyx_t_1 = 0;
11293  goto __pyx_L0;
11294 
11295  /* "PyClical.pyx":1344
11296  * return clifford(obj).inv()
11297  *
11298  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11299  * """
11300  * Scalar part.
11301  */
11302 
11303  /* function exit code */
11304  __pyx_L1_error:;
11305  __Pyx_XDECREF(__pyx_t_1);
11306  __Pyx_XDECREF(__pyx_t_2);
11307  __Pyx_XDECREF(__pyx_t_3);
11308  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11309  __pyx_r = 0;
11310  __pyx_L0:;
11311  __Pyx_XGIVEREF(__pyx_r);
11312  __Pyx_RefNannyFinishContext();
11313  return __pyx_r;
11314  }
11315 
11316  /* Python wrapper */
11317  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11318  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 ";
11319  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11320  PyObject *__pyx_r = 0;
11321  __Pyx_RefNannyDeclarations
11322  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11323  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11324 
11325  /* function exit code */
11326  __Pyx_RefNannyFinishContext();
11327  return __pyx_r;
11328  }
11329 
11330  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11331  PyObject *__pyx_r = NULL;
11332  __Pyx_RefNannyDeclarations
11333  PyObject *__pyx_t_1 = NULL;
11334  __Pyx_RefNannySetupContext("scalar", 0);
11335  __Pyx_XDECREF(__pyx_r);
11336  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11337  __Pyx_GOTREF(__pyx_t_1);
11338  __pyx_r = __pyx_t_1;
11339  __pyx_t_1 = 0;
11340  goto __pyx_L0;
11341 
11342  /* function exit code */
11343  __pyx_L1_error:;
11344  __Pyx_XDECREF(__pyx_t_1);
11345  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11346  __pyx_r = NULL;
11347  __pyx_L0:;
11348  __Pyx_XGIVEREF(__pyx_r);
11349  __Pyx_RefNannyFinishContext();
11350  return __pyx_r;
11351  }
11352 
11353  /* "PyClical.pyx":1355
11354  * return clifford(obj).scalar()
11355  *
11356  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11357  * """
11358  * Real part: synonym for scalar part.
11359  */
11360 
11361  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11362  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11363  PyObject *__pyx_r = NULL;
11364  __Pyx_RefNannyDeclarations
11365  PyObject *__pyx_t_1 = NULL;
11366  PyObject *__pyx_t_2 = NULL;
11367  PyObject *__pyx_t_3 = NULL;
11368  __Pyx_RefNannySetupContext("real", 0);
11369 
11370  /* "PyClical.pyx":1364
11371  * 0.0
11372  * """
11373  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11374  *
11375  * cpdef inline imag(obj):
11376  */
11377  __Pyx_XDECREF(__pyx_r);
11378  __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)
11379  __Pyx_GOTREF(__pyx_t_2);
11380  __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)
11381  __Pyx_GOTREF(__pyx_t_3);
11382  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11383  __pyx_t_2 = NULL;
11384  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11385  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11386  if (likely(__pyx_t_2)) {
11387  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11388  __Pyx_INCREF(__pyx_t_2);
11389  __Pyx_INCREF(function);
11390  __Pyx_DECREF_SET(__pyx_t_3, function);
11391  }
11392  }
11393  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11394  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11395  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11396  __Pyx_GOTREF(__pyx_t_1);
11397  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11398  __pyx_r = __pyx_t_1;
11399  __pyx_t_1 = 0;
11400  goto __pyx_L0;
11401 
11402  /* "PyClical.pyx":1355
11403  * return clifford(obj).scalar()
11404  *
11405  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11406  * """
11407  * Real part: synonym for scalar part.
11408  */
11409 
11410  /* function exit code */
11411  __pyx_L1_error:;
11412  __Pyx_XDECREF(__pyx_t_1);
11413  __Pyx_XDECREF(__pyx_t_2);
11414  __Pyx_XDECREF(__pyx_t_3);
11415  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11416  __pyx_r = 0;
11417  __pyx_L0:;
11418  __Pyx_XGIVEREF(__pyx_r);
11419  __Pyx_RefNannyFinishContext();
11420  return __pyx_r;
11421  }
11422 
11423  /* Python wrapper */
11424  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11425  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 ";
11426  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11427  PyObject *__pyx_r = 0;
11428  __Pyx_RefNannyDeclarations
11429  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11430  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11431 
11432  /* function exit code */
11433  __Pyx_RefNannyFinishContext();
11434  return __pyx_r;
11435  }
11436 
11437  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11438  PyObject *__pyx_r = NULL;
11439  __Pyx_RefNannyDeclarations
11440  PyObject *__pyx_t_1 = NULL;
11441  __Pyx_RefNannySetupContext("real", 0);
11442  __Pyx_XDECREF(__pyx_r);
11443  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11444  __Pyx_GOTREF(__pyx_t_1);
11445  __pyx_r = __pyx_t_1;
11446  __pyx_t_1 = 0;
11447  goto __pyx_L0;
11448 
11449  /* function exit code */
11450  __pyx_L1_error:;
11451  __Pyx_XDECREF(__pyx_t_1);
11452  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11453  __pyx_r = NULL;
11454  __pyx_L0:;
11455  __Pyx_XGIVEREF(__pyx_r);
11456  __Pyx_RefNannyFinishContext();
11457  return __pyx_r;
11458  }
11459 
11460  /* "PyClical.pyx":1366
11461  * return clifford(obj).scalar()
11462  *
11463  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11464  * """
11465  * Imaginary part: deprecated (always 0).
11466  */
11467 
11468  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11469  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11470  PyObject *__pyx_r = NULL;
11471  __Pyx_RefNannyDeclarations
11472  __Pyx_RefNannySetupContext("imag", 0);
11473 
11474  /* "PyClical.pyx":1375
11475  * 0.0
11476  * """
11477  * return 0.0 # <<<<<<<<<<<<<<
11478  *
11479  * cpdef inline pure(obj):
11480  */
11481  __Pyx_XDECREF(__pyx_r);
11482  __Pyx_INCREF(__pyx_float_0_0);
11483  __pyx_r = __pyx_float_0_0;
11484  goto __pyx_L0;
11485 
11486  /* "PyClical.pyx":1366
11487  * return clifford(obj).scalar()
11488  *
11489  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11490  * """
11491  * Imaginary part: deprecated (always 0).
11492  */
11493 
11494  /* function exit code */
11495  __pyx_L0:;
11496  __Pyx_XGIVEREF(__pyx_r);
11497  __Pyx_RefNannyFinishContext();
11498  return __pyx_r;
11499  }
11500 
11501  /* Python wrapper */
11502  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11503  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 ";
11504  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11505  PyObject *__pyx_r = 0;
11506  __Pyx_RefNannyDeclarations
11507  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11508  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11509 
11510  /* function exit code */
11511  __Pyx_RefNannyFinishContext();
11512  return __pyx_r;
11513  }
11514 
11515  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11516  PyObject *__pyx_r = NULL;
11517  __Pyx_RefNannyDeclarations
11518  PyObject *__pyx_t_1 = NULL;
11519  __Pyx_RefNannySetupContext("imag", 0);
11520  __Pyx_XDECREF(__pyx_r);
11521  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11522  __Pyx_GOTREF(__pyx_t_1);
11523  __pyx_r = __pyx_t_1;
11524  __pyx_t_1 = 0;
11525  goto __pyx_L0;
11526 
11527  /* function exit code */
11528  __pyx_L1_error:;
11529  __Pyx_XDECREF(__pyx_t_1);
11530  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11531  __pyx_r = NULL;
11532  __pyx_L0:;
11533  __Pyx_XGIVEREF(__pyx_r);
11534  __Pyx_RefNannyFinishContext();
11535  return __pyx_r;
11536  }
11537 
11538  /* "PyClical.pyx":1377
11539  * return 0.0
11540  *
11541  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11542  * """
11543  * Pure part
11544  */
11545 
11546  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11547  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11548  PyObject *__pyx_r = NULL;
11549  __Pyx_RefNannyDeclarations
11550  PyObject *__pyx_t_1 = NULL;
11551  PyObject *__pyx_t_2 = NULL;
11552  PyObject *__pyx_t_3 = NULL;
11553  __Pyx_RefNannySetupContext("pure", 0);
11554 
11555  /* "PyClical.pyx":1386
11556  * {1,2}
11557  * """
11558  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11559  *
11560  * cpdef inline even(obj):
11561  */
11562  __Pyx_XDECREF(__pyx_r);
11563  __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)
11564  __Pyx_GOTREF(__pyx_t_2);
11565  __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)
11566  __Pyx_GOTREF(__pyx_t_3);
11567  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11568  __pyx_t_2 = NULL;
11569  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11570  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11571  if (likely(__pyx_t_2)) {
11572  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11573  __Pyx_INCREF(__pyx_t_2);
11574  __Pyx_INCREF(function);
11575  __Pyx_DECREF_SET(__pyx_t_3, function);
11576  }
11577  }
11578  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11579  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11580  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11581  __Pyx_GOTREF(__pyx_t_1);
11582  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11583  __pyx_r = __pyx_t_1;
11584  __pyx_t_1 = 0;
11585  goto __pyx_L0;
11586 
11587  /* "PyClical.pyx":1377
11588  * return 0.0
11589  *
11590  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11591  * """
11592  * Pure part
11593  */
11594 
11595  /* function exit code */
11596  __pyx_L1_error:;
11597  __Pyx_XDECREF(__pyx_t_1);
11598  __Pyx_XDECREF(__pyx_t_2);
11599  __Pyx_XDECREF(__pyx_t_3);
11600  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11601  __pyx_r = 0;
11602  __pyx_L0:;
11603  __Pyx_XGIVEREF(__pyx_r);
11604  __Pyx_RefNannyFinishContext();
11605  return __pyx_r;
11606  }
11607 
11608  /* Python wrapper */
11609  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11610  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 ";
11611  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11612  PyObject *__pyx_r = 0;
11613  __Pyx_RefNannyDeclarations
11614  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11615  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11616 
11617  /* function exit code */
11618  __Pyx_RefNannyFinishContext();
11619  return __pyx_r;
11620  }
11621 
11622  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11623  PyObject *__pyx_r = NULL;
11624  __Pyx_RefNannyDeclarations
11625  PyObject *__pyx_t_1 = NULL;
11626  __Pyx_RefNannySetupContext("pure", 0);
11627  __Pyx_XDECREF(__pyx_r);
11628  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11629  __Pyx_GOTREF(__pyx_t_1);
11630  __pyx_r = __pyx_t_1;
11631  __pyx_t_1 = 0;
11632  goto __pyx_L0;
11633 
11634  /* function exit code */
11635  __pyx_L1_error:;
11636  __Pyx_XDECREF(__pyx_t_1);
11637  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11638  __pyx_r = NULL;
11639  __pyx_L0:;
11640  __Pyx_XGIVEREF(__pyx_r);
11641  __Pyx_RefNannyFinishContext();
11642  return __pyx_r;
11643  }
11644 
11645  /* "PyClical.pyx":1388
11646  * return clifford(obj).pure()
11647  *
11648  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11649  * """
11650  * Even part of multivector, sum of even grade terms.
11651  */
11652 
11653  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11654  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11655  PyObject *__pyx_r = NULL;
11656  __Pyx_RefNannyDeclarations
11657  PyObject *__pyx_t_1 = NULL;
11658  PyObject *__pyx_t_2 = NULL;
11659  PyObject *__pyx_t_3 = NULL;
11660  __Pyx_RefNannySetupContext("even", 0);
11661 
11662  /* "PyClical.pyx":1395
11663  * 1+{1,2}
11664  * """
11665  * return clifford(obj).even() # <<<<<<<<<<<<<<
11666  *
11667  * cpdef inline odd(obj):
11668  */
11669  __Pyx_XDECREF(__pyx_r);
11670  __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)
11671  __Pyx_GOTREF(__pyx_t_2);
11672  __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)
11673  __Pyx_GOTREF(__pyx_t_3);
11674  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11675  __pyx_t_2 = NULL;
11676  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11677  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11678  if (likely(__pyx_t_2)) {
11679  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11680  __Pyx_INCREF(__pyx_t_2);
11681  __Pyx_INCREF(function);
11682  __Pyx_DECREF_SET(__pyx_t_3, function);
11683  }
11684  }
11685  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11686  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11687  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11688  __Pyx_GOTREF(__pyx_t_1);
11689  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11690  __pyx_r = __pyx_t_1;
11691  __pyx_t_1 = 0;
11692  goto __pyx_L0;
11693 
11694  /* "PyClical.pyx":1388
11695  * return clifford(obj).pure()
11696  *
11697  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11698  * """
11699  * Even part of multivector, sum of even grade terms.
11700  */
11701 
11702  /* function exit code */
11703  __pyx_L1_error:;
11704  __Pyx_XDECREF(__pyx_t_1);
11705  __Pyx_XDECREF(__pyx_t_2);
11706  __Pyx_XDECREF(__pyx_t_3);
11707  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11708  __pyx_r = 0;
11709  __pyx_L0:;
11710  __Pyx_XGIVEREF(__pyx_r);
11711  __Pyx_RefNannyFinishContext();
11712  return __pyx_r;
11713  }
11714 
11715  /* Python wrapper */
11716  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11717  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 ";
11718  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11719  PyObject *__pyx_r = 0;
11720  __Pyx_RefNannyDeclarations
11721  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11722  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11723 
11724  /* function exit code */
11725  __Pyx_RefNannyFinishContext();
11726  return __pyx_r;
11727  }
11728 
11729  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11730  PyObject *__pyx_r = NULL;
11731  __Pyx_RefNannyDeclarations
11732  PyObject *__pyx_t_1 = NULL;
11733  __Pyx_RefNannySetupContext("even", 0);
11734  __Pyx_XDECREF(__pyx_r);
11735  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11736  __Pyx_GOTREF(__pyx_t_1);
11737  __pyx_r = __pyx_t_1;
11738  __pyx_t_1 = 0;
11739  goto __pyx_L0;
11740 
11741  /* function exit code */
11742  __pyx_L1_error:;
11743  __Pyx_XDECREF(__pyx_t_1);
11744  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11745  __pyx_r = NULL;
11746  __pyx_L0:;
11747  __Pyx_XGIVEREF(__pyx_r);
11748  __Pyx_RefNannyFinishContext();
11749  return __pyx_r;
11750  }
11751 
11752  /* "PyClical.pyx":1397
11753  * return clifford(obj).even()
11754  *
11755  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11756  * """
11757  * Odd part of multivector, sum of odd grade terms.
11758  */
11759 
11760  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11761  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11762  PyObject *__pyx_r = NULL;
11763  __Pyx_RefNannyDeclarations
11764  PyObject *__pyx_t_1 = NULL;
11765  PyObject *__pyx_t_2 = NULL;
11766  PyObject *__pyx_t_3 = NULL;
11767  __Pyx_RefNannySetupContext("odd", 0);
11768 
11769  /* "PyClical.pyx":1404
11770  * {1}
11771  * """
11772  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11773  *
11774  * cpdef inline involute(obj):
11775  */
11776  __Pyx_XDECREF(__pyx_r);
11777  __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)
11778  __Pyx_GOTREF(__pyx_t_2);
11779  __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)
11780  __Pyx_GOTREF(__pyx_t_3);
11781  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11782  __pyx_t_2 = NULL;
11783  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11784  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11785  if (likely(__pyx_t_2)) {
11786  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11787  __Pyx_INCREF(__pyx_t_2);
11788  __Pyx_INCREF(function);
11789  __Pyx_DECREF_SET(__pyx_t_3, function);
11790  }
11791  }
11792  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11793  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11794  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11795  __Pyx_GOTREF(__pyx_t_1);
11796  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11797  __pyx_r = __pyx_t_1;
11798  __pyx_t_1 = 0;
11799  goto __pyx_L0;
11800 
11801  /* "PyClical.pyx":1397
11802  * return clifford(obj).even()
11803  *
11804  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11805  * """
11806  * Odd part of multivector, sum of odd grade terms.
11807  */
11808 
11809  /* function exit code */
11810  __pyx_L1_error:;
11811  __Pyx_XDECREF(__pyx_t_1);
11812  __Pyx_XDECREF(__pyx_t_2);
11813  __Pyx_XDECREF(__pyx_t_3);
11814  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11815  __pyx_r = 0;
11816  __pyx_L0:;
11817  __Pyx_XGIVEREF(__pyx_r);
11818  __Pyx_RefNannyFinishContext();
11819  return __pyx_r;
11820  }
11821 
11822  /* Python wrapper */
11823  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11824  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 ";
11825  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11826  PyObject *__pyx_r = 0;
11827  __Pyx_RefNannyDeclarations
11828  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11829  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11830 
11831  /* function exit code */
11832  __Pyx_RefNannyFinishContext();
11833  return __pyx_r;
11834  }
11835 
11836  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11837  PyObject *__pyx_r = NULL;
11838  __Pyx_RefNannyDeclarations
11839  PyObject *__pyx_t_1 = NULL;
11840  __Pyx_RefNannySetupContext("odd", 0);
11841  __Pyx_XDECREF(__pyx_r);
11842  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11843  __Pyx_GOTREF(__pyx_t_1);
11844  __pyx_r = __pyx_t_1;
11845  __pyx_t_1 = 0;
11846  goto __pyx_L0;
11847 
11848  /* function exit code */
11849  __pyx_L1_error:;
11850  __Pyx_XDECREF(__pyx_t_1);
11851  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11852  __pyx_r = NULL;
11853  __pyx_L0:;
11854  __Pyx_XGIVEREF(__pyx_r);
11855  __Pyx_RefNannyFinishContext();
11856  return __pyx_r;
11857  }
11858 
11859  /* "PyClical.pyx":1406
11860  * return clifford(obj).odd()
11861  *
11862  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11863  * """
11864  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11865  */
11866 
11867  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11868  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11869  PyObject *__pyx_r = NULL;
11870  __Pyx_RefNannyDeclarations
11871  PyObject *__pyx_t_1 = NULL;
11872  PyObject *__pyx_t_2 = NULL;
11873  PyObject *__pyx_t_3 = NULL;
11874  __Pyx_RefNannySetupContext("involute", 0);
11875 
11876  /* "PyClical.pyx":1419
11877  * 1-{1}+{1,2}
11878  * """
11879  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11880  *
11881  * cpdef inline reverse(obj):
11882  */
11883  __Pyx_XDECREF(__pyx_r);
11884  __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)
11885  __Pyx_GOTREF(__pyx_t_2);
11886  __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)
11887  __Pyx_GOTREF(__pyx_t_3);
11888  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11889  __pyx_t_2 = NULL;
11890  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11891  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11892  if (likely(__pyx_t_2)) {
11893  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11894  __Pyx_INCREF(__pyx_t_2);
11895  __Pyx_INCREF(function);
11896  __Pyx_DECREF_SET(__pyx_t_3, function);
11897  }
11898  }
11899  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
11900  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11901  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11902  __Pyx_GOTREF(__pyx_t_1);
11903  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11904  __pyx_r = __pyx_t_1;
11905  __pyx_t_1 = 0;
11906  goto __pyx_L0;
11907 
11908  /* "PyClical.pyx":1406
11909  * return clifford(obj).odd()
11910  *
11911  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11912  * """
11913  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11914  */
11915 
11916  /* function exit code */
11917  __pyx_L1_error:;
11918  __Pyx_XDECREF(__pyx_t_1);
11919  __Pyx_XDECREF(__pyx_t_2);
11920  __Pyx_XDECREF(__pyx_t_3);
11921  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11922  __pyx_r = 0;
11923  __pyx_L0:;
11924  __Pyx_XGIVEREF(__pyx_r);
11925  __Pyx_RefNannyFinishContext();
11926  return __pyx_r;
11927  }
11928 
11929  /* Python wrapper */
11930  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11931  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 ";
11932  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11933  PyObject *__pyx_r = 0;
11934  __Pyx_RefNannyDeclarations
11935  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11936  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11937 
11938  /* function exit code */
11939  __Pyx_RefNannyFinishContext();
11940  return __pyx_r;
11941  }
11942 
11943  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11944  PyObject *__pyx_r = NULL;
11945  __Pyx_RefNannyDeclarations
11946  PyObject *__pyx_t_1 = NULL;
11947  __Pyx_RefNannySetupContext("involute", 0);
11948  __Pyx_XDECREF(__pyx_r);
11949  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11950  __Pyx_GOTREF(__pyx_t_1);
11951  __pyx_r = __pyx_t_1;
11952  __pyx_t_1 = 0;
11953  goto __pyx_L0;
11954 
11955  /* function exit code */
11956  __pyx_L1_error:;
11957  __Pyx_XDECREF(__pyx_t_1);
11958  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11959  __pyx_r = NULL;
11960  __pyx_L0:;
11961  __Pyx_XGIVEREF(__pyx_r);
11962  __Pyx_RefNannyFinishContext();
11963  return __pyx_r;
11964  }
11965 
11966  /* "PyClical.pyx":1421
11967  * return clifford(obj).involute()
11968  *
11969  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11970  * """
11971  * Reversion, eg. {1}*{2} -> {2}*{1}
11972  */
11973 
11974  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11975  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11976  PyObject *__pyx_r = NULL;
11977  __Pyx_RefNannyDeclarations
11978  PyObject *__pyx_t_1 = NULL;
11979  PyObject *__pyx_t_2 = NULL;
11980  PyObject *__pyx_t_3 = NULL;
11981  __Pyx_RefNannySetupContext("reverse", 0);
11982 
11983  /* "PyClical.pyx":1434
11984  * 1+{1}-{1,2}
11985  * """
11986  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11987  *
11988  * cpdef inline conj(obj):
11989  */
11990  __Pyx_XDECREF(__pyx_r);
11991  __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)
11992  __Pyx_GOTREF(__pyx_t_2);
11993  __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)
11994  __Pyx_GOTREF(__pyx_t_3);
11995  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11996  __pyx_t_2 = NULL;
11997  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11998  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11999  if (likely(__pyx_t_2)) {
12000  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12001  __Pyx_INCREF(__pyx_t_2);
12002  __Pyx_INCREF(function);
12003  __Pyx_DECREF_SET(__pyx_t_3, function);
12004  }
12005  }
12006  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12007  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12008  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
12009  __Pyx_GOTREF(__pyx_t_1);
12010  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12011  __pyx_r = __pyx_t_1;
12012  __pyx_t_1 = 0;
12013  goto __pyx_L0;
12014 
12015  /* "PyClical.pyx":1421
12016  * return clifford(obj).involute()
12017  *
12018  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
12019  * """
12020  * Reversion, eg. {1}*{2} -> {2}*{1}
12021  */
12022 
12023  /* function exit code */
12024  __pyx_L1_error:;
12025  __Pyx_XDECREF(__pyx_t_1);
12026  __Pyx_XDECREF(__pyx_t_2);
12027  __Pyx_XDECREF(__pyx_t_3);
12028  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12029  __pyx_r = 0;
12030  __pyx_L0:;
12031  __Pyx_XGIVEREF(__pyx_r);
12032  __Pyx_RefNannyFinishContext();
12033  return __pyx_r;
12034  }
12035 
12036  /* Python wrapper */
12037  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12038  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 ";
12039  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12040  PyObject *__pyx_r = 0;
12041  __Pyx_RefNannyDeclarations
12042  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
12043  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
12044 
12045  /* function exit code */
12046  __Pyx_RefNannyFinishContext();
12047  return __pyx_r;
12048  }
12049 
12050  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12051  PyObject *__pyx_r = NULL;
12052  __Pyx_RefNannyDeclarations
12053  PyObject *__pyx_t_1 = NULL;
12054  __Pyx_RefNannySetupContext("reverse", 0);
12055  __Pyx_XDECREF(__pyx_r);
12056  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12057  __Pyx_GOTREF(__pyx_t_1);
12058  __pyx_r = __pyx_t_1;
12059  __pyx_t_1 = 0;
12060  goto __pyx_L0;
12061 
12062  /* function exit code */
12063  __pyx_L1_error:;
12064  __Pyx_XDECREF(__pyx_t_1);
12065  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12066  __pyx_r = NULL;
12067  __pyx_L0:;
12068  __Pyx_XGIVEREF(__pyx_r);
12069  __Pyx_RefNannyFinishContext();
12070  return __pyx_r;
12071  }
12072 
12073  /* "PyClical.pyx":1436
12074  * return clifford(obj).reverse()
12075  *
12076  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12077  * """
12078  * Conjugation, reverse o involute == involute o reverse.
12079  */
12080 
12081  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12082  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12083  PyObject *__pyx_r = NULL;
12084  __Pyx_RefNannyDeclarations
12085  PyObject *__pyx_t_1 = NULL;
12086  PyObject *__pyx_t_2 = NULL;
12087  PyObject *__pyx_t_3 = NULL;
12088  __Pyx_RefNannySetupContext("conj", 0);
12089 
12090  /* "PyClical.pyx":1449
12091  * 1-{1}-{1,2}
12092  * """
12093  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12094  *
12095  * cpdef inline quad(obj):
12096  */
12097  __Pyx_XDECREF(__pyx_r);
12098  __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)
12099  __Pyx_GOTREF(__pyx_t_2);
12100  __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)
12101  __Pyx_GOTREF(__pyx_t_3);
12102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12103  __pyx_t_2 = NULL;
12104  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12105  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12106  if (likely(__pyx_t_2)) {
12107  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12108  __Pyx_INCREF(__pyx_t_2);
12109  __Pyx_INCREF(function);
12110  __Pyx_DECREF_SET(__pyx_t_3, function);
12111  }
12112  }
12113  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12114  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12115  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12116  __Pyx_GOTREF(__pyx_t_1);
12117  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12118  __pyx_r = __pyx_t_1;
12119  __pyx_t_1 = 0;
12120  goto __pyx_L0;
12121 
12122  /* "PyClical.pyx":1436
12123  * return clifford(obj).reverse()
12124  *
12125  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12126  * """
12127  * Conjugation, reverse o involute == involute o reverse.
12128  */
12129 
12130  /* function exit code */
12131  __pyx_L1_error:;
12132  __Pyx_XDECREF(__pyx_t_1);
12133  __Pyx_XDECREF(__pyx_t_2);
12134  __Pyx_XDECREF(__pyx_t_3);
12135  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12136  __pyx_r = 0;
12137  __pyx_L0:;
12138  __Pyx_XGIVEREF(__pyx_r);
12139  __Pyx_RefNannyFinishContext();
12140  return __pyx_r;
12141  }
12142 
12143  /* Python wrapper */
12144  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12145  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 ";
12146  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12147  PyObject *__pyx_r = 0;
12148  __Pyx_RefNannyDeclarations
12149  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12150  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12151 
12152  /* function exit code */
12153  __Pyx_RefNannyFinishContext();
12154  return __pyx_r;
12155  }
12156 
12157  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12158  PyObject *__pyx_r = NULL;
12159  __Pyx_RefNannyDeclarations
12160  PyObject *__pyx_t_1 = NULL;
12161  __Pyx_RefNannySetupContext("conj", 0);
12162  __Pyx_XDECREF(__pyx_r);
12163  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12164  __Pyx_GOTREF(__pyx_t_1);
12165  __pyx_r = __pyx_t_1;
12166  __pyx_t_1 = 0;
12167  goto __pyx_L0;
12168 
12169  /* function exit code */
12170  __pyx_L1_error:;
12171  __Pyx_XDECREF(__pyx_t_1);
12172  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12173  __pyx_r = NULL;
12174  __pyx_L0:;
12175  __Pyx_XGIVEREF(__pyx_r);
12176  __Pyx_RefNannyFinishContext();
12177  return __pyx_r;
12178  }
12179 
12180  /* "PyClical.pyx":1451
12181  * return clifford(obj).conj()
12182  *
12183  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12184  * """
12185  * Quadratic form == (rev(x)*x)(0).
12186  */
12187 
12188  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12189  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12190  PyObject *__pyx_r = NULL;
12191  __Pyx_RefNannyDeclarations
12192  PyObject *__pyx_t_1 = NULL;
12193  PyObject *__pyx_t_2 = NULL;
12194  PyObject *__pyx_t_3 = NULL;
12195  __Pyx_RefNannySetupContext("quad", 0);
12196 
12197  /* "PyClical.pyx":1460
12198  * 2.0
12199  * """
12200  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12201  *
12202  * cpdef inline norm(obj):
12203  */
12204  __Pyx_XDECREF(__pyx_r);
12205  __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)
12206  __Pyx_GOTREF(__pyx_t_2);
12207  __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)
12208  __Pyx_GOTREF(__pyx_t_3);
12209  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12210  __pyx_t_2 = NULL;
12211  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12212  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12213  if (likely(__pyx_t_2)) {
12214  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12215  __Pyx_INCREF(__pyx_t_2);
12216  __Pyx_INCREF(function);
12217  __Pyx_DECREF_SET(__pyx_t_3, function);
12218  }
12219  }
12220  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12221  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12222  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12223  __Pyx_GOTREF(__pyx_t_1);
12224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12225  __pyx_r = __pyx_t_1;
12226  __pyx_t_1 = 0;
12227  goto __pyx_L0;
12228 
12229  /* "PyClical.pyx":1451
12230  * return clifford(obj).conj()
12231  *
12232  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12233  * """
12234  * Quadratic form == (rev(x)*x)(0).
12235  */
12236 
12237  /* function exit code */
12238  __pyx_L1_error:;
12239  __Pyx_XDECREF(__pyx_t_1);
12240  __Pyx_XDECREF(__pyx_t_2);
12241  __Pyx_XDECREF(__pyx_t_3);
12242  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12243  __pyx_r = 0;
12244  __pyx_L0:;
12245  __Pyx_XGIVEREF(__pyx_r);
12246  __Pyx_RefNannyFinishContext();
12247  return __pyx_r;
12248  }
12249 
12250  /* Python wrapper */
12251  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12252  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 ";
12253  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12254  PyObject *__pyx_r = 0;
12255  __Pyx_RefNannyDeclarations
12256  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12257  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12258 
12259  /* function exit code */
12260  __Pyx_RefNannyFinishContext();
12261  return __pyx_r;
12262  }
12263 
12264  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12265  PyObject *__pyx_r = NULL;
12266  __Pyx_RefNannyDeclarations
12267  PyObject *__pyx_t_1 = NULL;
12268  __Pyx_RefNannySetupContext("quad", 0);
12269  __Pyx_XDECREF(__pyx_r);
12270  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12271  __Pyx_GOTREF(__pyx_t_1);
12272  __pyx_r = __pyx_t_1;
12273  __pyx_t_1 = 0;
12274  goto __pyx_L0;
12275 
12276  /* function exit code */
12277  __pyx_L1_error:;
12278  __Pyx_XDECREF(__pyx_t_1);
12279  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12280  __pyx_r = NULL;
12281  __pyx_L0:;
12282  __Pyx_XGIVEREF(__pyx_r);
12283  __Pyx_RefNannyFinishContext();
12284  return __pyx_r;
12285  }
12286 
12287  /* "PyClical.pyx":1462
12288  * return clifford(obj).quad()
12289  *
12290  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12291  * """
12292  * norm == sum of squares of coordinates.
12293  */
12294 
12295  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12296  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12297  PyObject *__pyx_r = NULL;
12298  __Pyx_RefNannyDeclarations
12299  PyObject *__pyx_t_1 = NULL;
12300  PyObject *__pyx_t_2 = NULL;
12301  PyObject *__pyx_t_3 = NULL;
12302  __Pyx_RefNannySetupContext("norm", 0);
12303 
12304  /* "PyClical.pyx":1471
12305  * 4.0
12306  * """
12307  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12308  *
12309  * cpdef inline abs(obj):
12310  */
12311  __Pyx_XDECREF(__pyx_r);
12312  __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)
12313  __Pyx_GOTREF(__pyx_t_2);
12314  __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)
12315  __Pyx_GOTREF(__pyx_t_3);
12316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12317  __pyx_t_2 = NULL;
12318  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12319  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12320  if (likely(__pyx_t_2)) {
12321  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12322  __Pyx_INCREF(__pyx_t_2);
12323  __Pyx_INCREF(function);
12324  __Pyx_DECREF_SET(__pyx_t_3, function);
12325  }
12326  }
12327  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12328  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12329  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12330  __Pyx_GOTREF(__pyx_t_1);
12331  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12332  __pyx_r = __pyx_t_1;
12333  __pyx_t_1 = 0;
12334  goto __pyx_L0;
12335 
12336  /* "PyClical.pyx":1462
12337  * return clifford(obj).quad()
12338  *
12339  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12340  * """
12341  * norm == sum of squares of coordinates.
12342  */
12343 
12344  /* function exit code */
12345  __pyx_L1_error:;
12346  __Pyx_XDECREF(__pyx_t_1);
12347  __Pyx_XDECREF(__pyx_t_2);
12348  __Pyx_XDECREF(__pyx_t_3);
12349  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12350  __pyx_r = 0;
12351  __pyx_L0:;
12352  __Pyx_XGIVEREF(__pyx_r);
12353  __Pyx_RefNannyFinishContext();
12354  return __pyx_r;
12355  }
12356 
12357  /* Python wrapper */
12358  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12359  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 ";
12360  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12361  PyObject *__pyx_r = 0;
12362  __Pyx_RefNannyDeclarations
12363  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12364  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12365 
12366  /* function exit code */
12367  __Pyx_RefNannyFinishContext();
12368  return __pyx_r;
12369  }
12370 
12371  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12372  PyObject *__pyx_r = NULL;
12373  __Pyx_RefNannyDeclarations
12374  PyObject *__pyx_t_1 = NULL;
12375  __Pyx_RefNannySetupContext("norm", 0);
12376  __Pyx_XDECREF(__pyx_r);
12377  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12378  __Pyx_GOTREF(__pyx_t_1);
12379  __pyx_r = __pyx_t_1;
12380  __pyx_t_1 = 0;
12381  goto __pyx_L0;
12382 
12383  /* function exit code */
12384  __pyx_L1_error:;
12385  __Pyx_XDECREF(__pyx_t_1);
12386  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12387  __pyx_r = NULL;
12388  __pyx_L0:;
12389  __Pyx_XGIVEREF(__pyx_r);
12390  __Pyx_RefNannyFinishContext();
12391  return __pyx_r;
12392  }
12393 
12394  /* "PyClical.pyx":1473
12395  * return clifford(obj).norm()
12396  *
12397  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12398  * """
12399  * Absolute value of multivector: multivector 2-norm.
12400  */
12401 
12402  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12403  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12404  PyObject *__pyx_r = NULL;
12405  __Pyx_RefNannyDeclarations
12406  PyObject *__pyx_t_1 = NULL;
12407  __Pyx_RefNannySetupContext("abs", 0);
12408 
12409  /* "PyClical.pyx":1480
12410  * 2.0
12411  * """
12412  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12413  *
12414  * cpdef inline max_abs(obj):
12415  */
12416  __Pyx_XDECREF(__pyx_r);
12417  __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)
12418  __Pyx_GOTREF(__pyx_t_1);
12419  __pyx_r = __pyx_t_1;
12420  __pyx_t_1 = 0;
12421  goto __pyx_L0;
12422 
12423  /* "PyClical.pyx":1473
12424  * return clifford(obj).norm()
12425  *
12426  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12427  * """
12428  * Absolute value of multivector: multivector 2-norm.
12429  */
12430 
12431  /* function exit code */
12432  __pyx_L1_error:;
12433  __Pyx_XDECREF(__pyx_t_1);
12434  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12435  __pyx_r = 0;
12436  __pyx_L0:;
12437  __Pyx_XGIVEREF(__pyx_r);
12438  __Pyx_RefNannyFinishContext();
12439  return __pyx_r;
12440  }
12441 
12442  /* Python wrapper */
12443  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12444  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 ";
12445  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12446  PyObject *__pyx_r = 0;
12447  __Pyx_RefNannyDeclarations
12448  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12449  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12450 
12451  /* function exit code */
12452  __Pyx_RefNannyFinishContext();
12453  return __pyx_r;
12454  }
12455 
12456  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12457  PyObject *__pyx_r = NULL;
12458  __Pyx_RefNannyDeclarations
12459  PyObject *__pyx_t_1 = NULL;
12460  __Pyx_RefNannySetupContext("abs", 0);
12461  __Pyx_XDECREF(__pyx_r);
12462  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12463  __Pyx_GOTREF(__pyx_t_1);
12464  __pyx_r = __pyx_t_1;
12465  __pyx_t_1 = 0;
12466  goto __pyx_L0;
12467 
12468  /* function exit code */
12469  __pyx_L1_error:;
12470  __Pyx_XDECREF(__pyx_t_1);
12471  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12472  __pyx_r = NULL;
12473  __pyx_L0:;
12474  __Pyx_XGIVEREF(__pyx_r);
12475  __Pyx_RefNannyFinishContext();
12476  return __pyx_r;
12477  }
12478 
12479  /* "PyClical.pyx":1482
12480  * return glucat.abs(toClifford(obj))
12481  *
12482  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12483  * """
12484  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12485  */
12486 
12487  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12488  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12489  PyObject *__pyx_r = NULL;
12490  __Pyx_RefNannyDeclarations
12491  PyObject *__pyx_t_1 = NULL;
12492  __Pyx_RefNannySetupContext("max_abs", 0);
12493 
12494  /* "PyClical.pyx":1492
12495  *
12496  * """
12497  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12498  *
12499  * cpdef inline pow(obj, m):
12500  */
12501  __Pyx_XDECREF(__pyx_r);
12502  __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)
12503  __Pyx_GOTREF(__pyx_t_1);
12504  __pyx_r = __pyx_t_1;
12505  __pyx_t_1 = 0;
12506  goto __pyx_L0;
12507 
12508  /* "PyClical.pyx":1482
12509  * return glucat.abs(toClifford(obj))
12510  *
12511  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12512  * """
12513  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12514  */
12515 
12516  /* function exit code */
12517  __pyx_L1_error:;
12518  __Pyx_XDECREF(__pyx_t_1);
12519  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12520  __pyx_r = 0;
12521  __pyx_L0:;
12522  __Pyx_XGIVEREF(__pyx_r);
12523  __Pyx_RefNannyFinishContext();
12524  return __pyx_r;
12525  }
12526 
12527  /* Python wrapper */
12528  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12529  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 ";
12530  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12531  PyObject *__pyx_r = 0;
12532  __Pyx_RefNannyDeclarations
12533  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12534  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12535 
12536  /* function exit code */
12537  __Pyx_RefNannyFinishContext();
12538  return __pyx_r;
12539  }
12540 
12541  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12542  PyObject *__pyx_r = NULL;
12543  __Pyx_RefNannyDeclarations
12544  PyObject *__pyx_t_1 = NULL;
12545  __Pyx_RefNannySetupContext("max_abs", 0);
12546  __Pyx_XDECREF(__pyx_r);
12547  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12548  __Pyx_GOTREF(__pyx_t_1);
12549  __pyx_r = __pyx_t_1;
12550  __pyx_t_1 = 0;
12551  goto __pyx_L0;
12552 
12553  /* function exit code */
12554  __pyx_L1_error:;
12555  __Pyx_XDECREF(__pyx_t_1);
12556  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12557  __pyx_r = NULL;
12558  __pyx_L0:;
12559  __Pyx_XGIVEREF(__pyx_r);
12560  __Pyx_RefNannyFinishContext();
12561  return __pyx_r;
12562  }
12563 
12564  /* "PyClical.pyx":1494
12565  * return glucat.max_abs(toClifford(obj))
12566  *
12567  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12568  * """
12569  * Integer power of multivector: obj to the m.
12570  */
12571 
12572  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12573  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12574  PyObject *__pyx_r = NULL;
12575  __Pyx_RefNannyDeclarations
12576  PyObject *__pyx_t_1 = NULL;
12577  PyObject *__pyx_t_2 = NULL;
12578  PyObject *__pyx_t_3 = NULL;
12579  PyObject *__pyx_t_4 = NULL;
12580  PyObject *__pyx_t_5 = NULL;
12581  PyObject *__pyx_t_6 = NULL;
12582  int __pyx_t_7;
12583  PyObject *__pyx_t_8 = NULL;
12584  PyObject *__pyx_t_9 = NULL;
12585  PyObject *__pyx_t_10 = NULL;
12586  __Pyx_RefNannySetupContext("pow", 0);
12587 
12588  /* "PyClical.pyx":1513
12589  * 1
12590  * """
12591  * try: # <<<<<<<<<<<<<<
12592  * math.pow(obj, m)
12593  * except:
12594  */
12595  {
12596  __Pyx_PyThreadState_declare
12597  __Pyx_PyThreadState_assign
12598  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12599  __Pyx_XGOTREF(__pyx_t_1);
12600  __Pyx_XGOTREF(__pyx_t_2);
12601  __Pyx_XGOTREF(__pyx_t_3);
12602  /*try:*/ {
12603 
12604  /* "PyClical.pyx":1514
12605  * """
12606  * try:
12607  * math.pow(obj, m) # <<<<<<<<<<<<<<
12608  * except:
12609  * return clifford(obj).pow(m)
12610  */
12611  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12612  __Pyx_GOTREF(__pyx_t_5);
12613  __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)
12614  __Pyx_GOTREF(__pyx_t_6);
12615  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12616  __pyx_t_5 = NULL;
12617  __pyx_t_7 = 0;
12618  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12619  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12620  if (likely(__pyx_t_5)) {
12621  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12622  __Pyx_INCREF(__pyx_t_5);
12623  __Pyx_INCREF(function);
12624  __Pyx_DECREF_SET(__pyx_t_6, function);
12625  __pyx_t_7 = 1;
12626  }
12627  }
12628  #if CYTHON_FAST_PYCALL
12629  if (PyFunction_Check(__pyx_t_6)) {
12630  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12631  __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)
12632  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12633  __Pyx_GOTREF(__pyx_t_4);
12634  } else
12635  #endif
12636  #if CYTHON_FAST_PYCCALL
12637  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12638  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12639  __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)
12640  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12641  __Pyx_GOTREF(__pyx_t_4);
12642  } else
12643  #endif
12644  {
12645  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12646  __Pyx_GOTREF(__pyx_t_8);
12647  if (__pyx_t_5) {
12648  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12649  }
12650  __Pyx_INCREF(__pyx_v_obj);
12651  __Pyx_GIVEREF(__pyx_v_obj);
12652  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12653  __Pyx_INCREF(__pyx_v_m);
12654  __Pyx_GIVEREF(__pyx_v_m);
12655  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12656  __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)
12657  __Pyx_GOTREF(__pyx_t_4);
12658  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12659  }
12660  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12661  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12662 
12663  /* "PyClical.pyx":1513
12664  * 1
12665  * """
12666  * try: # <<<<<<<<<<<<<<
12667  * math.pow(obj, m)
12668  * except:
12669  */
12670  }
12671  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12672  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12673  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12674  goto __pyx_L8_try_end;
12675  __pyx_L3_error:;
12676  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12677  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12678  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12679  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12680 
12681  /* "PyClical.pyx":1515
12682  * try:
12683  * math.pow(obj, m)
12684  * except: # <<<<<<<<<<<<<<
12685  * return clifford(obj).pow(m)
12686  *
12687  */
12688  /*except:*/ {
12689  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12690  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12691  __Pyx_GOTREF(__pyx_t_4);
12692  __Pyx_GOTREF(__pyx_t_6);
12693  __Pyx_GOTREF(__pyx_t_8);
12694 
12695  /* "PyClical.pyx":1516
12696  * math.pow(obj, m)
12697  * except:
12698  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12699  *
12700  * cpdef inline outer_pow(obj, m):
12701  */
12702  __Pyx_XDECREF(__pyx_r);
12703  __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)
12704  __Pyx_GOTREF(__pyx_t_9);
12705  __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)
12706  __Pyx_GOTREF(__pyx_t_10);
12707  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12708  __pyx_t_9 = NULL;
12709  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12710  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12711  if (likely(__pyx_t_9)) {
12712  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12713  __Pyx_INCREF(__pyx_t_9);
12714  __Pyx_INCREF(function);
12715  __Pyx_DECREF_SET(__pyx_t_10, function);
12716  }
12717  }
12718  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_v_m) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_m);
12719  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12720  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12721  __Pyx_GOTREF(__pyx_t_5);
12722  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12723  __pyx_r = __pyx_t_5;
12724  __pyx_t_5 = 0;
12725  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12726  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12727  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12728  goto __pyx_L6_except_return;
12729  }
12730  __pyx_L5_except_error:;
12731 
12732  /* "PyClical.pyx":1513
12733  * 1
12734  * """
12735  * try: # <<<<<<<<<<<<<<
12736  * math.pow(obj, m)
12737  * except:
12738  */
12739  __Pyx_XGIVEREF(__pyx_t_1);
12740  __Pyx_XGIVEREF(__pyx_t_2);
12741  __Pyx_XGIVEREF(__pyx_t_3);
12742  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12743  goto __pyx_L1_error;
12744  __pyx_L6_except_return:;
12745  __Pyx_XGIVEREF(__pyx_t_1);
12746  __Pyx_XGIVEREF(__pyx_t_2);
12747  __Pyx_XGIVEREF(__pyx_t_3);
12748  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12749  goto __pyx_L0;
12750  __pyx_L8_try_end:;
12751  }
12752 
12753  /* "PyClical.pyx":1494
12754  * return glucat.max_abs(toClifford(obj))
12755  *
12756  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12757  * """
12758  * Integer power of multivector: obj to the m.
12759  */
12760 
12761  /* function exit code */
12762  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12763  goto __pyx_L0;
12764  __pyx_L1_error:;
12765  __Pyx_XDECREF(__pyx_t_4);
12766  __Pyx_XDECREF(__pyx_t_5);
12767  __Pyx_XDECREF(__pyx_t_6);
12768  __Pyx_XDECREF(__pyx_t_8);
12769  __Pyx_XDECREF(__pyx_t_9);
12770  __Pyx_XDECREF(__pyx_t_10);
12771  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12772  __pyx_r = 0;
12773  __pyx_L0:;
12774  __Pyx_XGIVEREF(__pyx_r);
12775  __Pyx_RefNannyFinishContext();
12776  return __pyx_r;
12777  }
12778 
12779  /* Python wrapper */
12780  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12781  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 ";
12782  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12783  PyObject *__pyx_v_obj = 0;
12784  PyObject *__pyx_v_m = 0;
12785  PyObject *__pyx_r = 0;
12786  __Pyx_RefNannyDeclarations
12787  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12788  {
12789  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12790  PyObject* values[2] = {0,0};
12791  if (unlikely(__pyx_kwds)) {
12792  Py_ssize_t kw_args;
12793  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12794  switch (pos_args) {
12795  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12796  CYTHON_FALLTHROUGH;
12797  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12798  CYTHON_FALLTHROUGH;
12799  case 0: break;
12800  default: goto __pyx_L5_argtuple_error;
12801  }
12802  kw_args = PyDict_Size(__pyx_kwds);
12803  switch (pos_args) {
12804  case 0:
12805  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12806  else goto __pyx_L5_argtuple_error;
12807  CYTHON_FALLTHROUGH;
12808  case 1:
12809  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12810  else {
12811  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12812  }
12813  }
12814  if (unlikely(kw_args > 0)) {
12815  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12816  }
12817  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12818  goto __pyx_L5_argtuple_error;
12819  } else {
12820  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12821  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12822  }
12823  __pyx_v_obj = values[0];
12824  __pyx_v_m = values[1];
12825  }
12826  goto __pyx_L4_argument_unpacking_done;
12827  __pyx_L5_argtuple_error:;
12828  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12829  __pyx_L3_error:;
12830  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12831  __Pyx_RefNannyFinishContext();
12832  return NULL;
12833  __pyx_L4_argument_unpacking_done:;
12834  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12835 
12836  /* function exit code */
12837  __Pyx_RefNannyFinishContext();
12838  return __pyx_r;
12839  }
12840 
12841  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12842  PyObject *__pyx_r = NULL;
12843  __Pyx_RefNannyDeclarations
12844  PyObject *__pyx_t_1 = NULL;
12845  __Pyx_RefNannySetupContext("pow", 0);
12846  __Pyx_XDECREF(__pyx_r);
12847  __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)
12848  __Pyx_GOTREF(__pyx_t_1);
12849  __pyx_r = __pyx_t_1;
12850  __pyx_t_1 = 0;
12851  goto __pyx_L0;
12852 
12853  /* function exit code */
12854  __pyx_L1_error:;
12855  __Pyx_XDECREF(__pyx_t_1);
12856  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12857  __pyx_r = NULL;
12858  __pyx_L0:;
12859  __Pyx_XGIVEREF(__pyx_r);
12860  __Pyx_RefNannyFinishContext();
12861  return __pyx_r;
12862  }
12863 
12864  /* "PyClical.pyx":1518
12865  * return clifford(obj).pow(m)
12866  *
12867  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12868  * """
12869  * Outer product power of multivector.
12870  */
12871 
12872  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12873  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12874  PyObject *__pyx_r = NULL;
12875  __Pyx_RefNannyDeclarations
12876  PyObject *__pyx_t_1 = NULL;
12877  PyObject *__pyx_t_2 = NULL;
12878  PyObject *__pyx_t_3 = NULL;
12879  __Pyx_RefNannySetupContext("outer_pow", 0);
12880 
12881  /* "PyClical.pyx":1525
12882  * 1+3{1}+3{1,2}
12883  * """
12884  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12885  *
12886  * cpdef inline complexifier(obj):
12887  */
12888  __Pyx_XDECREF(__pyx_r);
12889  __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)
12890  __Pyx_GOTREF(__pyx_t_2);
12891  __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)
12892  __Pyx_GOTREF(__pyx_t_3);
12893  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12894  __pyx_t_2 = NULL;
12895  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12896  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12897  if (likely(__pyx_t_2)) {
12898  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12899  __Pyx_INCREF(__pyx_t_2);
12900  __Pyx_INCREF(function);
12901  __Pyx_DECREF_SET(__pyx_t_3, function);
12902  }
12903  }
12904  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_m) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_m);
12905  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12906  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12907  __Pyx_GOTREF(__pyx_t_1);
12908  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12909  __pyx_r = __pyx_t_1;
12910  __pyx_t_1 = 0;
12911  goto __pyx_L0;
12912 
12913  /* "PyClical.pyx":1518
12914  * return clifford(obj).pow(m)
12915  *
12916  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12917  * """
12918  * Outer product power of multivector.
12919  */
12920 
12921  /* function exit code */
12922  __pyx_L1_error:;
12923  __Pyx_XDECREF(__pyx_t_1);
12924  __Pyx_XDECREF(__pyx_t_2);
12925  __Pyx_XDECREF(__pyx_t_3);
12926  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12927  __pyx_r = 0;
12928  __pyx_L0:;
12929  __Pyx_XGIVEREF(__pyx_r);
12930  __Pyx_RefNannyFinishContext();
12931  return __pyx_r;
12932  }
12933 
12934  /* Python wrapper */
12935  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12936  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 ";
12937  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12938  PyObject *__pyx_v_obj = 0;
12939  PyObject *__pyx_v_m = 0;
12940  PyObject *__pyx_r = 0;
12941  __Pyx_RefNannyDeclarations
12942  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12943  {
12944  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12945  PyObject* values[2] = {0,0};
12946  if (unlikely(__pyx_kwds)) {
12947  Py_ssize_t kw_args;
12948  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12949  switch (pos_args) {
12950  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12951  CYTHON_FALLTHROUGH;
12952  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12953  CYTHON_FALLTHROUGH;
12954  case 0: break;
12955  default: goto __pyx_L5_argtuple_error;
12956  }
12957  kw_args = PyDict_Size(__pyx_kwds);
12958  switch (pos_args) {
12959  case 0:
12960  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12961  else goto __pyx_L5_argtuple_error;
12962  CYTHON_FALLTHROUGH;
12963  case 1:
12964  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12965  else {
12966  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12967  }
12968  }
12969  if (unlikely(kw_args > 0)) {
12970  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12971  }
12972  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12973  goto __pyx_L5_argtuple_error;
12974  } else {
12975  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12976  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12977  }
12978  __pyx_v_obj = values[0];
12979  __pyx_v_m = values[1];
12980  }
12981  goto __pyx_L4_argument_unpacking_done;
12982  __pyx_L5_argtuple_error:;
12983  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
12984  __pyx_L3_error:;
12985  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12986  __Pyx_RefNannyFinishContext();
12987  return NULL;
12988  __pyx_L4_argument_unpacking_done:;
12989  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12990 
12991  /* function exit code */
12992  __Pyx_RefNannyFinishContext();
12993  return __pyx_r;
12994  }
12995 
12996  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12997  PyObject *__pyx_r = NULL;
12998  __Pyx_RefNannyDeclarations
12999  PyObject *__pyx_t_1 = NULL;
13000  __Pyx_RefNannySetupContext("outer_pow", 0);
13001  __Pyx_XDECREF(__pyx_r);
13002  __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)
13003  __Pyx_GOTREF(__pyx_t_1);
13004  __pyx_r = __pyx_t_1;
13005  __pyx_t_1 = 0;
13006  goto __pyx_L0;
13007 
13008  /* function exit code */
13009  __pyx_L1_error:;
13010  __Pyx_XDECREF(__pyx_t_1);
13011  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13012  __pyx_r = NULL;
13013  __pyx_L0:;
13014  __Pyx_XGIVEREF(__pyx_r);
13015  __Pyx_RefNannyFinishContext();
13016  return __pyx_r;
13017  }
13018 
13019  /* "PyClical.pyx":1527
13020  * return clifford(obj).outer_pow(m)
13021  *
13022  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13023  * """
13024  * Square root of -1 which commutes with all members of the frame of the given multivector.
13025  */
13026 
13027  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13028  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13029  PyObject *__pyx_r = NULL;
13030  __Pyx_RefNannyDeclarations
13031  PyObject *__pyx_t_1 = NULL;
13032  PyObject *__pyx_t_2 = NULL;
13033  __Pyx_RefNannySetupContext("complexifier", 0);
13034 
13035  /* "PyClical.pyx":1540
13036  * {-1}
13037  * """
13038  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13039  *
13040  * cpdef inline sqrt(obj, i = None):
13041  */
13042  __Pyx_XDECREF(__pyx_r);
13043  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13044  __Pyx_GOTREF(__pyx_t_1);
13045  __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)
13046  __Pyx_GOTREF(__pyx_t_2);
13047  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13048  __pyx_r = __pyx_t_2;
13049  __pyx_t_2 = 0;
13050  goto __pyx_L0;
13051 
13052  /* "PyClical.pyx":1527
13053  * return clifford(obj).outer_pow(m)
13054  *
13055  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13056  * """
13057  * Square root of -1 which commutes with all members of the frame of the given multivector.
13058  */
13059 
13060  /* function exit code */
13061  __pyx_L1_error:;
13062  __Pyx_XDECREF(__pyx_t_1);
13063  __Pyx_XDECREF(__pyx_t_2);
13064  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13065  __pyx_r = 0;
13066  __pyx_L0:;
13067  __Pyx_XGIVEREF(__pyx_r);
13068  __Pyx_RefNannyFinishContext();
13069  return __pyx_r;
13070  }
13071 
13072  /* Python wrapper */
13073  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13074  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 ";
13075  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13076  PyObject *__pyx_r = 0;
13077  __Pyx_RefNannyDeclarations
13078  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13079  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13080 
13081  /* function exit code */
13082  __Pyx_RefNannyFinishContext();
13083  return __pyx_r;
13084  }
13085 
13086  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13087  PyObject *__pyx_r = NULL;
13088  __Pyx_RefNannyDeclarations
13089  PyObject *__pyx_t_1 = NULL;
13090  __Pyx_RefNannySetupContext("complexifier", 0);
13091  __Pyx_XDECREF(__pyx_r);
13092  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13093  __Pyx_GOTREF(__pyx_t_1);
13094  __pyx_r = __pyx_t_1;
13095  __pyx_t_1 = 0;
13096  goto __pyx_L0;
13097 
13098  /* function exit code */
13099  __pyx_L1_error:;
13100  __Pyx_XDECREF(__pyx_t_1);
13101  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13102  __pyx_r = NULL;
13103  __pyx_L0:;
13104  __Pyx_XGIVEREF(__pyx_r);
13105  __Pyx_RefNannyFinishContext();
13106  return __pyx_r;
13107  }
13108 
13109  /* "PyClical.pyx":1542
13110  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13111  *
13112  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13113  * """
13114  * Square root of multivector with optional complexifier.
13115  */
13116 
13117  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13118  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) {
13119  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13120  PyObject *__pyx_r = NULL;
13121  __Pyx_RefNannyDeclarations
13122  int __pyx_t_1;
13123  int __pyx_t_2;
13124  PyObject *__pyx_t_3 = NULL;
13125  Clifford __pyx_t_4;
13126  PyObject *__pyx_t_5 = NULL;
13127  PyObject *__pyx_t_6 = NULL;
13128  PyObject *__pyx_t_7 = NULL;
13129  PyObject *__pyx_t_8 = NULL;
13130  PyObject *__pyx_t_9 = NULL;
13131  PyObject *__pyx_t_10 = NULL;
13132  PyObject *__pyx_t_11 = NULL;
13133  __Pyx_RefNannySetupContext("sqrt", 0);
13134  if (__pyx_optional_args) {
13135  if (__pyx_optional_args->__pyx_n > 0) {
13136  __pyx_v_i = __pyx_optional_args->i;
13137  }
13138  }
13139 
13140  /* "PyClical.pyx":1557
13141  * -1
13142  * """
13143  * if not (i is None): # <<<<<<<<<<<<<<
13144  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13145  * else:
13146  */
13147  __pyx_t_1 = (__pyx_v_i != Py_None);
13148  __pyx_t_2 = (__pyx_t_1 != 0);
13149  if (__pyx_t_2) {
13150 
13151  /* "PyClical.pyx":1558
13152  * """
13153  * if not (i is None):
13154  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13155  * else:
13156  * try:
13157  */
13158  __Pyx_XDECREF(__pyx_r);
13159  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13160  __Pyx_GOTREF(__pyx_t_3);
13161  try {
13162  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13163  } catch(...) {
13164  __Pyx_CppExn2PyErr();
13165  __PYX_ERR(0, 1558, __pyx_L1_error)
13166  }
13167  __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)
13168  __Pyx_GOTREF(__pyx_t_5);
13169  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13170  __pyx_r = __pyx_t_5;
13171  __pyx_t_5 = 0;
13172  goto __pyx_L0;
13173 
13174  /* "PyClical.pyx":1557
13175  * -1
13176  * """
13177  * if not (i is None): # <<<<<<<<<<<<<<
13178  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13179  * else:
13180  */
13181  }
13182 
13183  /* "PyClical.pyx":1560
13184  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13185  * else:
13186  * try: # <<<<<<<<<<<<<<
13187  * return math.sqrt(obj)
13188  * except:
13189  */
13190  /*else*/ {
13191  {
13192  __Pyx_PyThreadState_declare
13193  __Pyx_PyThreadState_assign
13194  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13195  __Pyx_XGOTREF(__pyx_t_6);
13196  __Pyx_XGOTREF(__pyx_t_7);
13197  __Pyx_XGOTREF(__pyx_t_8);
13198  /*try:*/ {
13199 
13200  /* "PyClical.pyx":1561
13201  * else:
13202  * try:
13203  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13204  * except:
13205  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13206  */
13207  __Pyx_XDECREF(__pyx_r);
13208  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13209  __Pyx_GOTREF(__pyx_t_3);
13210  __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)
13211  __Pyx_GOTREF(__pyx_t_9);
13212  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13213  __pyx_t_3 = NULL;
13214  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13215  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13216  if (likely(__pyx_t_3)) {
13217  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13218  __Pyx_INCREF(__pyx_t_3);
13219  __Pyx_INCREF(function);
13220  __Pyx_DECREF_SET(__pyx_t_9, function);
13221  }
13222  }
13223  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
13224  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13225  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13226  __Pyx_GOTREF(__pyx_t_5);
13227  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13228  __pyx_r = __pyx_t_5;
13229  __pyx_t_5 = 0;
13230  goto __pyx_L8_try_return;
13231 
13232  /* "PyClical.pyx":1560
13233  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13234  * else:
13235  * try: # <<<<<<<<<<<<<<
13236  * return math.sqrt(obj)
13237  * except:
13238  */
13239  }
13240  __pyx_L4_error:;
13241  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13242  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13243  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13244 
13245  /* "PyClical.pyx":1562
13246  * try:
13247  * return math.sqrt(obj)
13248  * except: # <<<<<<<<<<<<<<
13249  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13250  *
13251  */
13252  /*except:*/ {
13253  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13254  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13255  __Pyx_GOTREF(__pyx_t_5);
13256  __Pyx_GOTREF(__pyx_t_9);
13257  __Pyx_GOTREF(__pyx_t_3);
13258 
13259  /* "PyClical.pyx":1563
13260  * return math.sqrt(obj)
13261  * except:
13262  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13263  *
13264  * cpdef inline exp(obj):
13265  */
13266  __Pyx_XDECREF(__pyx_r);
13267  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13268  __Pyx_GOTREF(__pyx_t_10);
13269  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13270  __Pyx_GOTREF(__pyx_t_11);
13271  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13272  __pyx_r = __pyx_t_11;
13273  __pyx_t_11 = 0;
13274  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13275  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13276  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13277  goto __pyx_L7_except_return;
13278  }
13279  __pyx_L6_except_error:;
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  __Pyx_XGIVEREF(__pyx_t_6);
13289  __Pyx_XGIVEREF(__pyx_t_7);
13290  __Pyx_XGIVEREF(__pyx_t_8);
13291  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13292  goto __pyx_L1_error;
13293  __pyx_L8_try_return:;
13294  __Pyx_XGIVEREF(__pyx_t_6);
13295  __Pyx_XGIVEREF(__pyx_t_7);
13296  __Pyx_XGIVEREF(__pyx_t_8);
13297  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13298  goto __pyx_L0;
13299  __pyx_L7_except_return:;
13300  __Pyx_XGIVEREF(__pyx_t_6);
13301  __Pyx_XGIVEREF(__pyx_t_7);
13302  __Pyx_XGIVEREF(__pyx_t_8);
13303  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13304  goto __pyx_L0;
13305  }
13306  }
13307 
13308  /* "PyClical.pyx":1542
13309  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13310  *
13311  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13312  * """
13313  * Square root of multivector with optional complexifier.
13314  */
13315 
13316  /* function exit code */
13317  __pyx_L1_error:;
13318  __Pyx_XDECREF(__pyx_t_3);
13319  __Pyx_XDECREF(__pyx_t_5);
13320  __Pyx_XDECREF(__pyx_t_9);
13321  __Pyx_XDECREF(__pyx_t_10);
13322  __Pyx_XDECREF(__pyx_t_11);
13323  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13324  __pyx_r = 0;
13325  __pyx_L0:;
13326  __Pyx_XGIVEREF(__pyx_r);
13327  __Pyx_RefNannyFinishContext();
13328  return __pyx_r;
13329  }
13330 
13331  /* Python wrapper */
13332  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13333  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 ";
13334  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13335  PyObject *__pyx_v_obj = 0;
13336  PyObject *__pyx_v_i = 0;
13337  PyObject *__pyx_r = 0;
13338  __Pyx_RefNannyDeclarations
13339  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13340  {
13341  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13342  PyObject* values[2] = {0,0};
13343  values[1] = ((PyObject *)Py_None);
13344  if (unlikely(__pyx_kwds)) {
13345  Py_ssize_t kw_args;
13346  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13347  switch (pos_args) {
13348  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13349  CYTHON_FALLTHROUGH;
13350  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13351  CYTHON_FALLTHROUGH;
13352  case 0: break;
13353  default: goto __pyx_L5_argtuple_error;
13354  }
13355  kw_args = PyDict_Size(__pyx_kwds);
13356  switch (pos_args) {
13357  case 0:
13358  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13359  else goto __pyx_L5_argtuple_error;
13360  CYTHON_FALLTHROUGH;
13361  case 1:
13362  if (kw_args > 0) {
13363  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13364  if (value) { values[1] = value; kw_args--; }
13365  }
13366  }
13367  if (unlikely(kw_args > 0)) {
13368  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13369  }
13370  } else {
13371  switch (PyTuple_GET_SIZE(__pyx_args)) {
13372  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13373  CYTHON_FALLTHROUGH;
13374  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13375  break;
13376  default: goto __pyx_L5_argtuple_error;
13377  }
13378  }
13379  __pyx_v_obj = values[0];
13380  __pyx_v_i = values[1];
13381  }
13382  goto __pyx_L4_argument_unpacking_done;
13383  __pyx_L5_argtuple_error:;
13384  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13385  __pyx_L3_error:;
13386  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13387  __Pyx_RefNannyFinishContext();
13388  return NULL;
13389  __pyx_L4_argument_unpacking_done:;
13390  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13391 
13392  /* function exit code */
13393  __Pyx_RefNannyFinishContext();
13394  return __pyx_r;
13395  }
13396 
13397  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13398  PyObject *__pyx_r = NULL;
13399  __Pyx_RefNannyDeclarations
13400  PyObject *__pyx_t_1 = NULL;
13401  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13402  __Pyx_RefNannySetupContext("sqrt", 0);
13403  __Pyx_XDECREF(__pyx_r);
13404  __pyx_t_2.__pyx_n = 1;
13405  __pyx_t_2.i = __pyx_v_i;
13406  __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)
13407  __Pyx_GOTREF(__pyx_t_1);
13408  __pyx_r = __pyx_t_1;
13409  __pyx_t_1 = 0;
13410  goto __pyx_L0;
13411 
13412  /* function exit code */
13413  __pyx_L1_error:;
13414  __Pyx_XDECREF(__pyx_t_1);
13415  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13416  __pyx_r = NULL;
13417  __pyx_L0:;
13418  __Pyx_XGIVEREF(__pyx_r);
13419  __Pyx_RefNannyFinishContext();
13420  return __pyx_r;
13421  }
13422 
13423  /* "PyClical.pyx":1565
13424  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13425  *
13426  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13427  * """
13428  * Exponential of multivector.
13429  */
13430 
13431  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13432  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13433  PyObject *__pyx_r = NULL;
13434  __Pyx_RefNannyDeclarations
13435  PyObject *__pyx_t_1 = NULL;
13436  PyObject *__pyx_t_2 = NULL;
13437  PyObject *__pyx_t_3 = NULL;
13438  PyObject *__pyx_t_4 = NULL;
13439  PyObject *__pyx_t_5 = NULL;
13440  PyObject *__pyx_t_6 = NULL;
13441  PyObject *__pyx_t_7 = NULL;
13442  PyObject *__pyx_t_8 = NULL;
13443  __Pyx_RefNannySetupContext("exp", 0);
13444 
13445  /* "PyClical.pyx":1574
13446  * {1,2}
13447  * """
13448  * try: # <<<<<<<<<<<<<<
13449  * return math.exp(obj)
13450  * except:
13451  */
13452  {
13453  __Pyx_PyThreadState_declare
13454  __Pyx_PyThreadState_assign
13455  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13456  __Pyx_XGOTREF(__pyx_t_1);
13457  __Pyx_XGOTREF(__pyx_t_2);
13458  __Pyx_XGOTREF(__pyx_t_3);
13459  /*try:*/ {
13460 
13461  /* "PyClical.pyx":1575
13462  * """
13463  * try:
13464  * return math.exp(obj) # <<<<<<<<<<<<<<
13465  * except:
13466  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13467  */
13468  __Pyx_XDECREF(__pyx_r);
13469  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13470  __Pyx_GOTREF(__pyx_t_5);
13471  __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)
13472  __Pyx_GOTREF(__pyx_t_6);
13473  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13474  __pyx_t_5 = NULL;
13475  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13476  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13477  if (likely(__pyx_t_5)) {
13478  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13479  __Pyx_INCREF(__pyx_t_5);
13480  __Pyx_INCREF(function);
13481  __Pyx_DECREF_SET(__pyx_t_6, function);
13482  }
13483  }
13484  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
13485  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13486  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13487  __Pyx_GOTREF(__pyx_t_4);
13488  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13489  __pyx_r = __pyx_t_4;
13490  __pyx_t_4 = 0;
13491  goto __pyx_L7_try_return;
13492 
13493  /* "PyClical.pyx":1574
13494  * {1,2}
13495  * """
13496  * try: # <<<<<<<<<<<<<<
13497  * return math.exp(obj)
13498  * except:
13499  */
13500  }
13501  __pyx_L3_error:;
13502  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13503  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13504  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13505 
13506  /* "PyClical.pyx":1576
13507  * try:
13508  * return math.exp(obj)
13509  * except: # <<<<<<<<<<<<<<
13510  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13511  *
13512  */
13513  /*except:*/ {
13514  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13515  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13516  __Pyx_GOTREF(__pyx_t_4);
13517  __Pyx_GOTREF(__pyx_t_6);
13518  __Pyx_GOTREF(__pyx_t_5);
13519 
13520  /* "PyClical.pyx":1577
13521  * return math.exp(obj)
13522  * except:
13523  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13524  *
13525  * cpdef inline log(obj,i = None):
13526  */
13527  __Pyx_XDECREF(__pyx_r);
13528  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13529  __Pyx_GOTREF(__pyx_t_7);
13530  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), exp(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13531  __Pyx_GOTREF(__pyx_t_8);
13532  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13533  __pyx_r = __pyx_t_8;
13534  __pyx_t_8 = 0;
13535  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13536  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13537  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13538  goto __pyx_L6_except_return;
13539  }
13540  __pyx_L5_except_error:;
13541 
13542  /* "PyClical.pyx":1574
13543  * {1,2}
13544  * """
13545  * try: # <<<<<<<<<<<<<<
13546  * return math.exp(obj)
13547  * except:
13548  */
13549  __Pyx_XGIVEREF(__pyx_t_1);
13550  __Pyx_XGIVEREF(__pyx_t_2);
13551  __Pyx_XGIVEREF(__pyx_t_3);
13552  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13553  goto __pyx_L1_error;
13554  __pyx_L7_try_return:;
13555  __Pyx_XGIVEREF(__pyx_t_1);
13556  __Pyx_XGIVEREF(__pyx_t_2);
13557  __Pyx_XGIVEREF(__pyx_t_3);
13558  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13559  goto __pyx_L0;
13560  __pyx_L6_except_return:;
13561  __Pyx_XGIVEREF(__pyx_t_1);
13562  __Pyx_XGIVEREF(__pyx_t_2);
13563  __Pyx_XGIVEREF(__pyx_t_3);
13564  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13565  goto __pyx_L0;
13566  }
13567 
13568  /* "PyClical.pyx":1565
13569  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13570  *
13571  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13572  * """
13573  * Exponential of multivector.
13574  */
13575 
13576  /* function exit code */
13577  __pyx_L1_error:;
13578  __Pyx_XDECREF(__pyx_t_4);
13579  __Pyx_XDECREF(__pyx_t_5);
13580  __Pyx_XDECREF(__pyx_t_6);
13581  __Pyx_XDECREF(__pyx_t_7);
13582  __Pyx_XDECREF(__pyx_t_8);
13583  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13584  __pyx_r = 0;
13585  __pyx_L0:;
13586  __Pyx_XGIVEREF(__pyx_r);
13587  __Pyx_RefNannyFinishContext();
13588  return __pyx_r;
13589  }
13590 
13591  /* Python wrapper */
13592  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13593  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 ";
13594  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13595  PyObject *__pyx_r = 0;
13596  __Pyx_RefNannyDeclarations
13597  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13598  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13599 
13600  /* function exit code */
13601  __Pyx_RefNannyFinishContext();
13602  return __pyx_r;
13603  }
13604 
13605  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13606  PyObject *__pyx_r = NULL;
13607  __Pyx_RefNannyDeclarations
13608  PyObject *__pyx_t_1 = NULL;
13609  __Pyx_RefNannySetupContext("exp", 0);
13610  __Pyx_XDECREF(__pyx_r);
13611  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13612  __Pyx_GOTREF(__pyx_t_1);
13613  __pyx_r = __pyx_t_1;
13614  __pyx_t_1 = 0;
13615  goto __pyx_L0;
13616 
13617  /* function exit code */
13618  __pyx_L1_error:;
13619  __Pyx_XDECREF(__pyx_t_1);
13620  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13621  __pyx_r = NULL;
13622  __pyx_L0:;
13623  __Pyx_XGIVEREF(__pyx_r);
13624  __Pyx_RefNannyFinishContext();
13625  return __pyx_r;
13626  }
13627 
13628  /* "PyClical.pyx":1579
13629  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13630  *
13631  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13632  * """
13633  * Natural logarithm of multivector with optional complexifier.
13634  */
13635 
13636  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13637  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) {
13638  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13639  PyObject *__pyx_r = NULL;
13640  __Pyx_RefNannyDeclarations
13641  int __pyx_t_1;
13642  int __pyx_t_2;
13643  PyObject *__pyx_t_3 = NULL;
13644  Clifford __pyx_t_4;
13645  PyObject *__pyx_t_5 = NULL;
13646  PyObject *__pyx_t_6 = NULL;
13647  PyObject *__pyx_t_7 = NULL;
13648  PyObject *__pyx_t_8 = NULL;
13649  PyObject *__pyx_t_9 = NULL;
13650  PyObject *__pyx_t_10 = NULL;
13651  PyObject *__pyx_t_11 = NULL;
13652  __Pyx_RefNannySetupContext("log", 0);
13653  if (__pyx_optional_args) {
13654  if (__pyx_optional_args->__pyx_n > 0) {
13655  __pyx_v_i = __pyx_optional_args->i;
13656  }
13657  }
13658 
13659  /* "PyClical.pyx":1594
13660  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13661  * """
13662  * if not (i is None): # <<<<<<<<<<<<<<
13663  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13664  * else:
13665  */
13666  __pyx_t_1 = (__pyx_v_i != Py_None);
13667  __pyx_t_2 = (__pyx_t_1 != 0);
13668  if (__pyx_t_2) {
13669 
13670  /* "PyClical.pyx":1595
13671  * """
13672  * if not (i is None):
13673  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13674  * else:
13675  * try:
13676  */
13677  __Pyx_XDECREF(__pyx_r);
13678  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13679  __Pyx_GOTREF(__pyx_t_3);
13680  try {
13681  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13682  } catch(...) {
13683  __Pyx_CppExn2PyErr();
13684  __PYX_ERR(0, 1595, __pyx_L1_error)
13685  }
13686  __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)
13687  __Pyx_GOTREF(__pyx_t_5);
13688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13689  __pyx_r = __pyx_t_5;
13690  __pyx_t_5 = 0;
13691  goto __pyx_L0;
13692 
13693  /* "PyClical.pyx":1594
13694  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13695  * """
13696  * if not (i is None): # <<<<<<<<<<<<<<
13697  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13698  * else:
13699  */
13700  }
13701 
13702  /* "PyClical.pyx":1597
13703  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13704  * else:
13705  * try: # <<<<<<<<<<<<<<
13706  * return math.log(obj)
13707  * except:
13708  */
13709  /*else*/ {
13710  {
13711  __Pyx_PyThreadState_declare
13712  __Pyx_PyThreadState_assign
13713  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13714  __Pyx_XGOTREF(__pyx_t_6);
13715  __Pyx_XGOTREF(__pyx_t_7);
13716  __Pyx_XGOTREF(__pyx_t_8);
13717  /*try:*/ {
13718 
13719  /* "PyClical.pyx":1598
13720  * else:
13721  * try:
13722  * return math.log(obj) # <<<<<<<<<<<<<<
13723  * except:
13724  * return clifford().wrap( glucat.log(toClifford(obj)) )
13725  */
13726  __Pyx_XDECREF(__pyx_r);
13727  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13728  __Pyx_GOTREF(__pyx_t_3);
13729  __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)
13730  __Pyx_GOTREF(__pyx_t_9);
13731  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13732  __pyx_t_3 = NULL;
13733  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13734  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13735  if (likely(__pyx_t_3)) {
13736  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13737  __Pyx_INCREF(__pyx_t_3);
13738  __Pyx_INCREF(function);
13739  __Pyx_DECREF_SET(__pyx_t_9, function);
13740  }
13741  }
13742  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
13743  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13744  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13745  __Pyx_GOTREF(__pyx_t_5);
13746  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13747  __pyx_r = __pyx_t_5;
13748  __pyx_t_5 = 0;
13749  goto __pyx_L8_try_return;
13750 
13751  /* "PyClical.pyx":1597
13752  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13753  * else:
13754  * try: # <<<<<<<<<<<<<<
13755  * return math.log(obj)
13756  * except:
13757  */
13758  }
13759  __pyx_L4_error:;
13760  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13761  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13762  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13763 
13764  /* "PyClical.pyx":1599
13765  * try:
13766  * return math.log(obj)
13767  * except: # <<<<<<<<<<<<<<
13768  * return clifford().wrap( glucat.log(toClifford(obj)) )
13769  *
13770  */
13771  /*except:*/ {
13772  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13773  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13774  __Pyx_GOTREF(__pyx_t_5);
13775  __Pyx_GOTREF(__pyx_t_9);
13776  __Pyx_GOTREF(__pyx_t_3);
13777 
13778  /* "PyClical.pyx":1600
13779  * return math.log(obj)
13780  * except:
13781  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13782  *
13783  * cpdef inline cos(obj,i = None):
13784  */
13785  __Pyx_XDECREF(__pyx_r);
13786  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13787  __Pyx_GOTREF(__pyx_t_10);
13788  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), log(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13789  __Pyx_GOTREF(__pyx_t_11);
13790  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13791  __pyx_r = __pyx_t_11;
13792  __pyx_t_11 = 0;
13793  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13794  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13795  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13796  goto __pyx_L7_except_return;
13797  }
13798  __pyx_L6_except_error:;
13799 
13800  /* "PyClical.pyx":1597
13801  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13802  * else:
13803  * try: # <<<<<<<<<<<<<<
13804  * return math.log(obj)
13805  * except:
13806  */
13807  __Pyx_XGIVEREF(__pyx_t_6);
13808  __Pyx_XGIVEREF(__pyx_t_7);
13809  __Pyx_XGIVEREF(__pyx_t_8);
13810  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13811  goto __pyx_L1_error;
13812  __pyx_L8_try_return:;
13813  __Pyx_XGIVEREF(__pyx_t_6);
13814  __Pyx_XGIVEREF(__pyx_t_7);
13815  __Pyx_XGIVEREF(__pyx_t_8);
13816  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13817  goto __pyx_L0;
13818  __pyx_L7_except_return:;
13819  __Pyx_XGIVEREF(__pyx_t_6);
13820  __Pyx_XGIVEREF(__pyx_t_7);
13821  __Pyx_XGIVEREF(__pyx_t_8);
13822  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13823  goto __pyx_L0;
13824  }
13825  }
13826 
13827  /* "PyClical.pyx":1579
13828  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13829  *
13830  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13831  * """
13832  * Natural logarithm of multivector with optional complexifier.
13833  */
13834 
13835  /* function exit code */
13836  __pyx_L1_error:;
13837  __Pyx_XDECREF(__pyx_t_3);
13838  __Pyx_XDECREF(__pyx_t_5);
13839  __Pyx_XDECREF(__pyx_t_9);
13840  __Pyx_XDECREF(__pyx_t_10);
13841  __Pyx_XDECREF(__pyx_t_11);
13842  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13843  __pyx_r = 0;
13844  __pyx_L0:;
13845  __Pyx_XGIVEREF(__pyx_r);
13846  __Pyx_RefNannyFinishContext();
13847  return __pyx_r;
13848  }
13849 
13850  /* Python wrapper */
13851  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13852  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 ";
13853  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13854  PyObject *__pyx_v_obj = 0;
13855  PyObject *__pyx_v_i = 0;
13856  PyObject *__pyx_r = 0;
13857  __Pyx_RefNannyDeclarations
13858  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13859  {
13860  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13861  PyObject* values[2] = {0,0};
13862  values[1] = ((PyObject *)Py_None);
13863  if (unlikely(__pyx_kwds)) {
13864  Py_ssize_t kw_args;
13865  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13866  switch (pos_args) {
13867  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13868  CYTHON_FALLTHROUGH;
13869  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13870  CYTHON_FALLTHROUGH;
13871  case 0: break;
13872  default: goto __pyx_L5_argtuple_error;
13873  }
13874  kw_args = PyDict_Size(__pyx_kwds);
13875  switch (pos_args) {
13876  case 0:
13877  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13878  else goto __pyx_L5_argtuple_error;
13879  CYTHON_FALLTHROUGH;
13880  case 1:
13881  if (kw_args > 0) {
13882  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13883  if (value) { values[1] = value; kw_args--; }
13884  }
13885  }
13886  if (unlikely(kw_args > 0)) {
13887  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13888  }
13889  } else {
13890  switch (PyTuple_GET_SIZE(__pyx_args)) {
13891  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13892  CYTHON_FALLTHROUGH;
13893  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13894  break;
13895  default: goto __pyx_L5_argtuple_error;
13896  }
13897  }
13898  __pyx_v_obj = values[0];
13899  __pyx_v_i = values[1];
13900  }
13901  goto __pyx_L4_argument_unpacking_done;
13902  __pyx_L5_argtuple_error:;
13903  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
13904  __pyx_L3_error:;
13905  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13906  __Pyx_RefNannyFinishContext();
13907  return NULL;
13908  __pyx_L4_argument_unpacking_done:;
13909  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
13910 
13911  /* function exit code */
13912  __Pyx_RefNannyFinishContext();
13913  return __pyx_r;
13914  }
13915 
13916  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13917  PyObject *__pyx_r = NULL;
13918  __Pyx_RefNannyDeclarations
13919  PyObject *__pyx_t_1 = NULL;
13920  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
13921  __Pyx_RefNannySetupContext("log", 0);
13922  __Pyx_XDECREF(__pyx_r);
13923  __pyx_t_2.__pyx_n = 1;
13924  __pyx_t_2.i = __pyx_v_i;
13925  __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)
13926  __Pyx_GOTREF(__pyx_t_1);
13927  __pyx_r = __pyx_t_1;
13928  __pyx_t_1 = 0;
13929  goto __pyx_L0;
13930 
13931  /* function exit code */
13932  __pyx_L1_error:;
13933  __Pyx_XDECREF(__pyx_t_1);
13934  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13935  __pyx_r = NULL;
13936  __pyx_L0:;
13937  __Pyx_XGIVEREF(__pyx_r);
13938  __Pyx_RefNannyFinishContext();
13939  return __pyx_r;
13940  }
13941 
13942  /* "PyClical.pyx":1602
13943  * return clifford().wrap( glucat.log(toClifford(obj)) )
13944  *
13945  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
13946  * """
13947  * Cosine of multivector with optional complexifier.
13948  */
13949 
13950  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13951  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) {
13952  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13953  PyObject *__pyx_r = NULL;
13954  __Pyx_RefNannyDeclarations
13955  int __pyx_t_1;
13956  int __pyx_t_2;
13957  PyObject *__pyx_t_3 = NULL;
13958  Clifford __pyx_t_4;
13959  PyObject *__pyx_t_5 = NULL;
13960  PyObject *__pyx_t_6 = NULL;
13961  PyObject *__pyx_t_7 = NULL;
13962  PyObject *__pyx_t_8 = NULL;
13963  PyObject *__pyx_t_9 = NULL;
13964  PyObject *__pyx_t_10 = NULL;
13965  PyObject *__pyx_t_11 = NULL;
13966  __Pyx_RefNannySetupContext("cos", 0);
13967  if (__pyx_optional_args) {
13968  if (__pyx_optional_args->__pyx_n > 0) {
13969  __pyx_v_i = __pyx_optional_args->i;
13970  }
13971  }
13972 
13973  /* "PyClical.pyx":1611
13974  * {1,2}
13975  * """
13976  * if not (i is None): # <<<<<<<<<<<<<<
13977  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
13978  * else:
13979  */
13980  __pyx_t_1 = (__pyx_v_i != Py_None);
13981  __pyx_t_2 = (__pyx_t_1 != 0);
13982  if (__pyx_t_2) {
13983 
13984  /* "PyClical.pyx":1612
13985  * """
13986  * if not (i is None):
13987  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13988  * else:
13989  * try:
13990  */
13991  __Pyx_XDECREF(__pyx_r);
13992  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
13993  __Pyx_GOTREF(__pyx_t_3);
13994  try {
13995  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13996  } catch(...) {
13997  __Pyx_CppExn2PyErr();
13998  __PYX_ERR(0, 1612, __pyx_L1_error)
13999  }
14000  __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)
14001  __Pyx_GOTREF(__pyx_t_5);
14002  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14003  __pyx_r = __pyx_t_5;
14004  __pyx_t_5 = 0;
14005  goto __pyx_L0;
14006 
14007  /* "PyClical.pyx":1611
14008  * {1,2}
14009  * """
14010  * if not (i is None): # <<<<<<<<<<<<<<
14011  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14012  * else:
14013  */
14014  }
14015 
14016  /* "PyClical.pyx":1614
14017  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14018  * else:
14019  * try: # <<<<<<<<<<<<<<
14020  * return math.cos(obj)
14021  * except:
14022  */
14023  /*else*/ {
14024  {
14025  __Pyx_PyThreadState_declare
14026  __Pyx_PyThreadState_assign
14027  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14028  __Pyx_XGOTREF(__pyx_t_6);
14029  __Pyx_XGOTREF(__pyx_t_7);
14030  __Pyx_XGOTREF(__pyx_t_8);
14031  /*try:*/ {
14032 
14033  /* "PyClical.pyx":1615
14034  * else:
14035  * try:
14036  * return math.cos(obj) # <<<<<<<<<<<<<<
14037  * except:
14038  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14039  */
14040  __Pyx_XDECREF(__pyx_r);
14041  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14042  __Pyx_GOTREF(__pyx_t_3);
14043  __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)
14044  __Pyx_GOTREF(__pyx_t_9);
14045  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14046  __pyx_t_3 = NULL;
14047  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14048  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14049  if (likely(__pyx_t_3)) {
14050  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14051  __Pyx_INCREF(__pyx_t_3);
14052  __Pyx_INCREF(function);
14053  __Pyx_DECREF_SET(__pyx_t_9, function);
14054  }
14055  }
14056  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14057  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14058  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14059  __Pyx_GOTREF(__pyx_t_5);
14060  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14061  __pyx_r = __pyx_t_5;
14062  __pyx_t_5 = 0;
14063  goto __pyx_L8_try_return;
14064 
14065  /* "PyClical.pyx":1614
14066  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14067  * else:
14068  * try: # <<<<<<<<<<<<<<
14069  * return math.cos(obj)
14070  * except:
14071  */
14072  }
14073  __pyx_L4_error:;
14074  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14075  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14076  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14077 
14078  /* "PyClical.pyx":1616
14079  * try:
14080  * return math.cos(obj)
14081  * except: # <<<<<<<<<<<<<<
14082  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14083  *
14084  */
14085  /*except:*/ {
14086  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14087  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14088  __Pyx_GOTREF(__pyx_t_5);
14089  __Pyx_GOTREF(__pyx_t_9);
14090  __Pyx_GOTREF(__pyx_t_3);
14091 
14092  /* "PyClical.pyx":1617
14093  * return math.cos(obj)
14094  * except:
14095  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14096  *
14097  * cpdef inline acos(obj,i = None):
14098  */
14099  __Pyx_XDECREF(__pyx_r);
14100  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14101  __Pyx_GOTREF(__pyx_t_10);
14102  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14103  __Pyx_GOTREF(__pyx_t_11);
14104  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14105  __pyx_r = __pyx_t_11;
14106  __pyx_t_11 = 0;
14107  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14108  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14109  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14110  goto __pyx_L7_except_return;
14111  }
14112  __pyx_L6_except_error:;
14113 
14114  /* "PyClical.pyx":1614
14115  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14116  * else:
14117  * try: # <<<<<<<<<<<<<<
14118  * return math.cos(obj)
14119  * except:
14120  */
14121  __Pyx_XGIVEREF(__pyx_t_6);
14122  __Pyx_XGIVEREF(__pyx_t_7);
14123  __Pyx_XGIVEREF(__pyx_t_8);
14124  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14125  goto __pyx_L1_error;
14126  __pyx_L8_try_return:;
14127  __Pyx_XGIVEREF(__pyx_t_6);
14128  __Pyx_XGIVEREF(__pyx_t_7);
14129  __Pyx_XGIVEREF(__pyx_t_8);
14130  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14131  goto __pyx_L0;
14132  __pyx_L7_except_return:;
14133  __Pyx_XGIVEREF(__pyx_t_6);
14134  __Pyx_XGIVEREF(__pyx_t_7);
14135  __Pyx_XGIVEREF(__pyx_t_8);
14136  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14137  goto __pyx_L0;
14138  }
14139  }
14140 
14141  /* "PyClical.pyx":1602
14142  * return clifford().wrap( glucat.log(toClifford(obj)) )
14143  *
14144  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14145  * """
14146  * Cosine of multivector with optional complexifier.
14147  */
14148 
14149  /* function exit code */
14150  __pyx_L1_error:;
14151  __Pyx_XDECREF(__pyx_t_3);
14152  __Pyx_XDECREF(__pyx_t_5);
14153  __Pyx_XDECREF(__pyx_t_9);
14154  __Pyx_XDECREF(__pyx_t_10);
14155  __Pyx_XDECREF(__pyx_t_11);
14156  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14157  __pyx_r = 0;
14158  __pyx_L0:;
14159  __Pyx_XGIVEREF(__pyx_r);
14160  __Pyx_RefNannyFinishContext();
14161  return __pyx_r;
14162  }
14163 
14164  /* Python wrapper */
14165  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14166  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 ";
14167  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14168  PyObject *__pyx_v_obj = 0;
14169  PyObject *__pyx_v_i = 0;
14170  PyObject *__pyx_r = 0;
14171  __Pyx_RefNannyDeclarations
14172  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14173  {
14174  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14175  PyObject* values[2] = {0,0};
14176  values[1] = ((PyObject *)Py_None);
14177  if (unlikely(__pyx_kwds)) {
14178  Py_ssize_t kw_args;
14179  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14180  switch (pos_args) {
14181  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14182  CYTHON_FALLTHROUGH;
14183  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14184  CYTHON_FALLTHROUGH;
14185  case 0: break;
14186  default: goto __pyx_L5_argtuple_error;
14187  }
14188  kw_args = PyDict_Size(__pyx_kwds);
14189  switch (pos_args) {
14190  case 0:
14191  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14192  else goto __pyx_L5_argtuple_error;
14193  CYTHON_FALLTHROUGH;
14194  case 1:
14195  if (kw_args > 0) {
14196  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14197  if (value) { values[1] = value; kw_args--; }
14198  }
14199  }
14200  if (unlikely(kw_args > 0)) {
14201  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14202  }
14203  } else {
14204  switch (PyTuple_GET_SIZE(__pyx_args)) {
14205  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14206  CYTHON_FALLTHROUGH;
14207  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14208  break;
14209  default: goto __pyx_L5_argtuple_error;
14210  }
14211  }
14212  __pyx_v_obj = values[0];
14213  __pyx_v_i = values[1];
14214  }
14215  goto __pyx_L4_argument_unpacking_done;
14216  __pyx_L5_argtuple_error:;
14217  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14218  __pyx_L3_error:;
14219  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14220  __Pyx_RefNannyFinishContext();
14221  return NULL;
14222  __pyx_L4_argument_unpacking_done:;
14223  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14224 
14225  /* function exit code */
14226  __Pyx_RefNannyFinishContext();
14227  return __pyx_r;
14228  }
14229 
14230  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14231  PyObject *__pyx_r = NULL;
14232  __Pyx_RefNannyDeclarations
14233  PyObject *__pyx_t_1 = NULL;
14234  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14235  __Pyx_RefNannySetupContext("cos", 0);
14236  __Pyx_XDECREF(__pyx_r);
14237  __pyx_t_2.__pyx_n = 1;
14238  __pyx_t_2.i = __pyx_v_i;
14239  __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)
14240  __Pyx_GOTREF(__pyx_t_1);
14241  __pyx_r = __pyx_t_1;
14242  __pyx_t_1 = 0;
14243  goto __pyx_L0;
14244 
14245  /* function exit code */
14246  __pyx_L1_error:;
14247  __Pyx_XDECREF(__pyx_t_1);
14248  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14249  __pyx_r = NULL;
14250  __pyx_L0:;
14251  __Pyx_XGIVEREF(__pyx_r);
14252  __Pyx_RefNannyFinishContext();
14253  return __pyx_r;
14254  }
14255 
14256  /* "PyClical.pyx":1619
14257  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14258  *
14259  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14260  * """
14261  * Inverse cosine of multivector with optional complexifier.
14262  */
14263 
14264  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14265  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) {
14266  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14267  PyObject *__pyx_r = NULL;
14268  __Pyx_RefNannyDeclarations
14269  int __pyx_t_1;
14270  int __pyx_t_2;
14271  PyObject *__pyx_t_3 = NULL;
14272  Clifford __pyx_t_4;
14273  PyObject *__pyx_t_5 = NULL;
14274  PyObject *__pyx_t_6 = NULL;
14275  PyObject *__pyx_t_7 = NULL;
14276  PyObject *__pyx_t_8 = NULL;
14277  PyObject *__pyx_t_9 = NULL;
14278  PyObject *__pyx_t_10 = NULL;
14279  PyObject *__pyx_t_11 = NULL;
14280  __Pyx_RefNannySetupContext("acos", 0);
14281  if (__pyx_optional_args) {
14282  if (__pyx_optional_args->__pyx_n > 0) {
14283  __pyx_v_i = __pyx_optional_args->i;
14284  }
14285  }
14286 
14287  /* "PyClical.pyx":1632
14288  * {1,2}
14289  * """
14290  * if not (i is None): # <<<<<<<<<<<<<<
14291  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14292  * else:
14293  */
14294  __pyx_t_1 = (__pyx_v_i != Py_None);
14295  __pyx_t_2 = (__pyx_t_1 != 0);
14296  if (__pyx_t_2) {
14297 
14298  /* "PyClical.pyx":1633
14299  * """
14300  * if not (i is None):
14301  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14302  * else:
14303  * try:
14304  */
14305  __Pyx_XDECREF(__pyx_r);
14306  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14307  __Pyx_GOTREF(__pyx_t_3);
14308  try {
14309  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14310  } catch(...) {
14311  __Pyx_CppExn2PyErr();
14312  __PYX_ERR(0, 1633, __pyx_L1_error)
14313  }
14314  __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)
14315  __Pyx_GOTREF(__pyx_t_5);
14316  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14317  __pyx_r = __pyx_t_5;
14318  __pyx_t_5 = 0;
14319  goto __pyx_L0;
14320 
14321  /* "PyClical.pyx":1632
14322  * {1,2}
14323  * """
14324  * if not (i is None): # <<<<<<<<<<<<<<
14325  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14326  * else:
14327  */
14328  }
14329 
14330  /* "PyClical.pyx":1635
14331  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14332  * else:
14333  * try: # <<<<<<<<<<<<<<
14334  * return math.acos(obj)
14335  * except:
14336  */
14337  /*else*/ {
14338  {
14339  __Pyx_PyThreadState_declare
14340  __Pyx_PyThreadState_assign
14341  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14342  __Pyx_XGOTREF(__pyx_t_6);
14343  __Pyx_XGOTREF(__pyx_t_7);
14344  __Pyx_XGOTREF(__pyx_t_8);
14345  /*try:*/ {
14346 
14347  /* "PyClical.pyx":1636
14348  * else:
14349  * try:
14350  * return math.acos(obj) # <<<<<<<<<<<<<<
14351  * except:
14352  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14353  */
14354  __Pyx_XDECREF(__pyx_r);
14355  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14356  __Pyx_GOTREF(__pyx_t_3);
14357  __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)
14358  __Pyx_GOTREF(__pyx_t_9);
14359  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14360  __pyx_t_3 = NULL;
14361  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14362  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14363  if (likely(__pyx_t_3)) {
14364  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14365  __Pyx_INCREF(__pyx_t_3);
14366  __Pyx_INCREF(function);
14367  __Pyx_DECREF_SET(__pyx_t_9, function);
14368  }
14369  }
14370  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14371  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14372  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14373  __Pyx_GOTREF(__pyx_t_5);
14374  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14375  __pyx_r = __pyx_t_5;
14376  __pyx_t_5 = 0;
14377  goto __pyx_L8_try_return;
14378 
14379  /* "PyClical.pyx":1635
14380  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14381  * else:
14382  * try: # <<<<<<<<<<<<<<
14383  * return math.acos(obj)
14384  * except:
14385  */
14386  }
14387  __pyx_L4_error:;
14388  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14389  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14390  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14391 
14392  /* "PyClical.pyx":1637
14393  * try:
14394  * return math.acos(obj)
14395  * except: # <<<<<<<<<<<<<<
14396  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14397  *
14398  */
14399  /*except:*/ {
14400  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14401  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14402  __Pyx_GOTREF(__pyx_t_5);
14403  __Pyx_GOTREF(__pyx_t_9);
14404  __Pyx_GOTREF(__pyx_t_3);
14405 
14406  /* "PyClical.pyx":1638
14407  * return math.acos(obj)
14408  * except:
14409  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14410  *
14411  * cpdef inline cosh(obj):
14412  */
14413  __Pyx_XDECREF(__pyx_r);
14414  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14415  __Pyx_GOTREF(__pyx_t_10);
14416  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14417  __Pyx_GOTREF(__pyx_t_11);
14418  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14419  __pyx_r = __pyx_t_11;
14420  __pyx_t_11 = 0;
14421  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14422  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14423  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14424  goto __pyx_L7_except_return;
14425  }
14426  __pyx_L6_except_error:;
14427 
14428  /* "PyClical.pyx":1635
14429  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14430  * else:
14431  * try: # <<<<<<<<<<<<<<
14432  * return math.acos(obj)
14433  * except:
14434  */
14435  __Pyx_XGIVEREF(__pyx_t_6);
14436  __Pyx_XGIVEREF(__pyx_t_7);
14437  __Pyx_XGIVEREF(__pyx_t_8);
14438  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14439  goto __pyx_L1_error;
14440  __pyx_L8_try_return:;
14441  __Pyx_XGIVEREF(__pyx_t_6);
14442  __Pyx_XGIVEREF(__pyx_t_7);
14443  __Pyx_XGIVEREF(__pyx_t_8);
14444  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14445  goto __pyx_L0;
14446  __pyx_L7_except_return:;
14447  __Pyx_XGIVEREF(__pyx_t_6);
14448  __Pyx_XGIVEREF(__pyx_t_7);
14449  __Pyx_XGIVEREF(__pyx_t_8);
14450  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14451  goto __pyx_L0;
14452  }
14453  }
14454 
14455  /* "PyClical.pyx":1619
14456  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14457  *
14458  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14459  * """
14460  * Inverse cosine of multivector with optional complexifier.
14461  */
14462 
14463  /* function exit code */
14464  __pyx_L1_error:;
14465  __Pyx_XDECREF(__pyx_t_3);
14466  __Pyx_XDECREF(__pyx_t_5);
14467  __Pyx_XDECREF(__pyx_t_9);
14468  __Pyx_XDECREF(__pyx_t_10);
14469  __Pyx_XDECREF(__pyx_t_11);
14470  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14471  __pyx_r = 0;
14472  __pyx_L0:;
14473  __Pyx_XGIVEREF(__pyx_r);
14474  __Pyx_RefNannyFinishContext();
14475  return __pyx_r;
14476  }
14477 
14478  /* Python wrapper */
14479  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14480  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 ";
14481  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14482  PyObject *__pyx_v_obj = 0;
14483  PyObject *__pyx_v_i = 0;
14484  PyObject *__pyx_r = 0;
14485  __Pyx_RefNannyDeclarations
14486  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14487  {
14488  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14489  PyObject* values[2] = {0,0};
14490  values[1] = ((PyObject *)Py_None);
14491  if (unlikely(__pyx_kwds)) {
14492  Py_ssize_t kw_args;
14493  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14494  switch (pos_args) {
14495  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14496  CYTHON_FALLTHROUGH;
14497  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14498  CYTHON_FALLTHROUGH;
14499  case 0: break;
14500  default: goto __pyx_L5_argtuple_error;
14501  }
14502  kw_args = PyDict_Size(__pyx_kwds);
14503  switch (pos_args) {
14504  case 0:
14505  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14506  else goto __pyx_L5_argtuple_error;
14507  CYTHON_FALLTHROUGH;
14508  case 1:
14509  if (kw_args > 0) {
14510  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14511  if (value) { values[1] = value; kw_args--; }
14512  }
14513  }
14514  if (unlikely(kw_args > 0)) {
14515  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14516  }
14517  } else {
14518  switch (PyTuple_GET_SIZE(__pyx_args)) {
14519  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14520  CYTHON_FALLTHROUGH;
14521  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14522  break;
14523  default: goto __pyx_L5_argtuple_error;
14524  }
14525  }
14526  __pyx_v_obj = values[0];
14527  __pyx_v_i = values[1];
14528  }
14529  goto __pyx_L4_argument_unpacking_done;
14530  __pyx_L5_argtuple_error:;
14531  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14532  __pyx_L3_error:;
14533  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14534  __Pyx_RefNannyFinishContext();
14535  return NULL;
14536  __pyx_L4_argument_unpacking_done:;
14537  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14538 
14539  /* function exit code */
14540  __Pyx_RefNannyFinishContext();
14541  return __pyx_r;
14542  }
14543 
14544  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14545  PyObject *__pyx_r = NULL;
14546  __Pyx_RefNannyDeclarations
14547  PyObject *__pyx_t_1 = NULL;
14548  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14549  __Pyx_RefNannySetupContext("acos", 0);
14550  __Pyx_XDECREF(__pyx_r);
14551  __pyx_t_2.__pyx_n = 1;
14552  __pyx_t_2.i = __pyx_v_i;
14553  __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)
14554  __Pyx_GOTREF(__pyx_t_1);
14555  __pyx_r = __pyx_t_1;
14556  __pyx_t_1 = 0;
14557  goto __pyx_L0;
14558 
14559  /* function exit code */
14560  __pyx_L1_error:;
14561  __Pyx_XDECREF(__pyx_t_1);
14562  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14563  __pyx_r = NULL;
14564  __pyx_L0:;
14565  __Pyx_XGIVEREF(__pyx_r);
14566  __Pyx_RefNannyFinishContext();
14567  return __pyx_r;
14568  }
14569 
14570  /* "PyClical.pyx":1640
14571  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14572  *
14573  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14574  * """
14575  * Hyperbolic cosine of multivector.
14576  */
14577 
14578  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14579  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14580  PyObject *__pyx_r = NULL;
14581  __Pyx_RefNannyDeclarations
14582  PyObject *__pyx_t_1 = NULL;
14583  PyObject *__pyx_t_2 = NULL;
14584  PyObject *__pyx_t_3 = NULL;
14585  PyObject *__pyx_t_4 = NULL;
14586  PyObject *__pyx_t_5 = NULL;
14587  PyObject *__pyx_t_6 = NULL;
14588  PyObject *__pyx_t_7 = NULL;
14589  PyObject *__pyx_t_8 = NULL;
14590  __Pyx_RefNannySetupContext("cosh", 0);
14591 
14592  /* "PyClical.pyx":1651
14593  * {1,2}
14594  * """
14595  * try: # <<<<<<<<<<<<<<
14596  * return math.cosh(obj)
14597  * except:
14598  */
14599  {
14600  __Pyx_PyThreadState_declare
14601  __Pyx_PyThreadState_assign
14602  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14603  __Pyx_XGOTREF(__pyx_t_1);
14604  __Pyx_XGOTREF(__pyx_t_2);
14605  __Pyx_XGOTREF(__pyx_t_3);
14606  /*try:*/ {
14607 
14608  /* "PyClical.pyx":1652
14609  * """
14610  * try:
14611  * return math.cosh(obj) # <<<<<<<<<<<<<<
14612  * except:
14613  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14614  */
14615  __Pyx_XDECREF(__pyx_r);
14616  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14617  __Pyx_GOTREF(__pyx_t_5);
14618  __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)
14619  __Pyx_GOTREF(__pyx_t_6);
14620  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14621  __pyx_t_5 = NULL;
14622  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14623  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14624  if (likely(__pyx_t_5)) {
14625  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14626  __Pyx_INCREF(__pyx_t_5);
14627  __Pyx_INCREF(function);
14628  __Pyx_DECREF_SET(__pyx_t_6, function);
14629  }
14630  }
14631  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
14632  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14633  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14634  __Pyx_GOTREF(__pyx_t_4);
14635  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14636  __pyx_r = __pyx_t_4;
14637  __pyx_t_4 = 0;
14638  goto __pyx_L7_try_return;
14639 
14640  /* "PyClical.pyx":1651
14641  * {1,2}
14642  * """
14643  * try: # <<<<<<<<<<<<<<
14644  * return math.cosh(obj)
14645  * except:
14646  */
14647  }
14648  __pyx_L3_error:;
14649  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14650  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14651  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14652 
14653  /* "PyClical.pyx":1653
14654  * try:
14655  * return math.cosh(obj)
14656  * except: # <<<<<<<<<<<<<<
14657  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14658  *
14659  */
14660  /*except:*/ {
14661  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14662  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14663  __Pyx_GOTREF(__pyx_t_4);
14664  __Pyx_GOTREF(__pyx_t_6);
14665  __Pyx_GOTREF(__pyx_t_5);
14666 
14667  /* "PyClical.pyx":1654
14668  * return math.cosh(obj)
14669  * except:
14670  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14671  *
14672  * cpdef inline acosh(obj,i = None):
14673  */
14674  __Pyx_XDECREF(__pyx_r);
14675  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14676  __Pyx_GOTREF(__pyx_t_7);
14677  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), cosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14678  __Pyx_GOTREF(__pyx_t_8);
14679  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14680  __pyx_r = __pyx_t_8;
14681  __pyx_t_8 = 0;
14682  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14683  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14684  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14685  goto __pyx_L6_except_return;
14686  }
14687  __pyx_L5_except_error:;
14688 
14689  /* "PyClical.pyx":1651
14690  * {1,2}
14691  * """
14692  * try: # <<<<<<<<<<<<<<
14693  * return math.cosh(obj)
14694  * except:
14695  */
14696  __Pyx_XGIVEREF(__pyx_t_1);
14697  __Pyx_XGIVEREF(__pyx_t_2);
14698  __Pyx_XGIVEREF(__pyx_t_3);
14699  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14700  goto __pyx_L1_error;
14701  __pyx_L7_try_return:;
14702  __Pyx_XGIVEREF(__pyx_t_1);
14703  __Pyx_XGIVEREF(__pyx_t_2);
14704  __Pyx_XGIVEREF(__pyx_t_3);
14705  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14706  goto __pyx_L0;
14707  __pyx_L6_except_return:;
14708  __Pyx_XGIVEREF(__pyx_t_1);
14709  __Pyx_XGIVEREF(__pyx_t_2);
14710  __Pyx_XGIVEREF(__pyx_t_3);
14711  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14712  goto __pyx_L0;
14713  }
14714 
14715  /* "PyClical.pyx":1640
14716  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14717  *
14718  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14719  * """
14720  * Hyperbolic cosine of multivector.
14721  */
14722 
14723  /* function exit code */
14724  __pyx_L1_error:;
14725  __Pyx_XDECREF(__pyx_t_4);
14726  __Pyx_XDECREF(__pyx_t_5);
14727  __Pyx_XDECREF(__pyx_t_6);
14728  __Pyx_XDECREF(__pyx_t_7);
14729  __Pyx_XDECREF(__pyx_t_8);
14730  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14731  __pyx_r = 0;
14732  __pyx_L0:;
14733  __Pyx_XGIVEREF(__pyx_r);
14734  __Pyx_RefNannyFinishContext();
14735  return __pyx_r;
14736  }
14737 
14738  /* Python wrapper */
14739  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14740  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 ";
14741  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14742  PyObject *__pyx_r = 0;
14743  __Pyx_RefNannyDeclarations
14744  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14745  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14746 
14747  /* function exit code */
14748  __Pyx_RefNannyFinishContext();
14749  return __pyx_r;
14750  }
14751 
14752  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14753  PyObject *__pyx_r = NULL;
14754  __Pyx_RefNannyDeclarations
14755  PyObject *__pyx_t_1 = NULL;
14756  __Pyx_RefNannySetupContext("cosh", 0);
14757  __Pyx_XDECREF(__pyx_r);
14758  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14759  __Pyx_GOTREF(__pyx_t_1);
14760  __pyx_r = __pyx_t_1;
14761  __pyx_t_1 = 0;
14762  goto __pyx_L0;
14763 
14764  /* function exit code */
14765  __pyx_L1_error:;
14766  __Pyx_XDECREF(__pyx_t_1);
14767  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14768  __pyx_r = NULL;
14769  __pyx_L0:;
14770  __Pyx_XGIVEREF(__pyx_r);
14771  __Pyx_RefNannyFinishContext();
14772  return __pyx_r;
14773  }
14774 
14775  /* "PyClical.pyx":1656
14776  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14777  *
14778  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14779  * """
14780  * Inverse hyperbolic cosine of multivector with optional complexifier.
14781  */
14782 
14783  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14784  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) {
14785  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14786  PyObject *__pyx_r = NULL;
14787  __Pyx_RefNannyDeclarations
14788  int __pyx_t_1;
14789  int __pyx_t_2;
14790  PyObject *__pyx_t_3 = NULL;
14791  Clifford __pyx_t_4;
14792  PyObject *__pyx_t_5 = NULL;
14793  PyObject *__pyx_t_6 = NULL;
14794  PyObject *__pyx_t_7 = NULL;
14795  PyObject *__pyx_t_8 = NULL;
14796  PyObject *__pyx_t_9 = NULL;
14797  PyObject *__pyx_t_10 = NULL;
14798  PyObject *__pyx_t_11 = NULL;
14799  __Pyx_RefNannySetupContext("acosh", 0);
14800  if (__pyx_optional_args) {
14801  if (__pyx_optional_args->__pyx_n > 0) {
14802  __pyx_v_i = __pyx_optional_args->i;
14803  }
14804  }
14805 
14806  /* "PyClical.pyx":1671
14807  * {1,2}
14808  * """
14809  * if not (i is None): # <<<<<<<<<<<<<<
14810  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14811  * else:
14812  */
14813  __pyx_t_1 = (__pyx_v_i != Py_None);
14814  __pyx_t_2 = (__pyx_t_1 != 0);
14815  if (__pyx_t_2) {
14816 
14817  /* "PyClical.pyx":1672
14818  * """
14819  * if not (i is None):
14820  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14821  * else:
14822  * try:
14823  */
14824  __Pyx_XDECREF(__pyx_r);
14825  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
14826  __Pyx_GOTREF(__pyx_t_3);
14827  try {
14828  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14829  } catch(...) {
14830  __Pyx_CppExn2PyErr();
14831  __PYX_ERR(0, 1672, __pyx_L1_error)
14832  }
14833  __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)
14834  __Pyx_GOTREF(__pyx_t_5);
14835  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14836  __pyx_r = __pyx_t_5;
14837  __pyx_t_5 = 0;
14838  goto __pyx_L0;
14839 
14840  /* "PyClical.pyx":1671
14841  * {1,2}
14842  * """
14843  * if not (i is None): # <<<<<<<<<<<<<<
14844  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14845  * else:
14846  */
14847  }
14848 
14849  /* "PyClical.pyx":1674
14850  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14851  * else:
14852  * try: # <<<<<<<<<<<<<<
14853  * return math.acosh(obj)
14854  * except:
14855  */
14856  /*else*/ {
14857  {
14858  __Pyx_PyThreadState_declare
14859  __Pyx_PyThreadState_assign
14860  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14861  __Pyx_XGOTREF(__pyx_t_6);
14862  __Pyx_XGOTREF(__pyx_t_7);
14863  __Pyx_XGOTREF(__pyx_t_8);
14864  /*try:*/ {
14865 
14866  /* "PyClical.pyx":1675
14867  * else:
14868  * try:
14869  * return math.acosh(obj) # <<<<<<<<<<<<<<
14870  * except:
14871  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14872  */
14873  __Pyx_XDECREF(__pyx_r);
14874  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
14875  __Pyx_GOTREF(__pyx_t_3);
14876  __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)
14877  __Pyx_GOTREF(__pyx_t_9);
14878  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14879  __pyx_t_3 = NULL;
14880  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14881  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14882  if (likely(__pyx_t_3)) {
14883  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14884  __Pyx_INCREF(__pyx_t_3);
14885  __Pyx_INCREF(function);
14886  __Pyx_DECREF_SET(__pyx_t_9, function);
14887  }
14888  }
14889  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
14890  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14891  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
14892  __Pyx_GOTREF(__pyx_t_5);
14893  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14894  __pyx_r = __pyx_t_5;
14895  __pyx_t_5 = 0;
14896  goto __pyx_L8_try_return;
14897 
14898  /* "PyClical.pyx":1674
14899  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14900  * else:
14901  * try: # <<<<<<<<<<<<<<
14902  * return math.acosh(obj)
14903  * except:
14904  */
14905  }
14906  __pyx_L4_error:;
14907  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14908  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14909  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14910 
14911  /* "PyClical.pyx":1676
14912  * try:
14913  * return math.acosh(obj)
14914  * except: # <<<<<<<<<<<<<<
14915  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
14916  *
14917  */
14918  /*except:*/ {
14919  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14920  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
14921  __Pyx_GOTREF(__pyx_t_5);
14922  __Pyx_GOTREF(__pyx_t_9);
14923  __Pyx_GOTREF(__pyx_t_3);
14924 
14925  /* "PyClical.pyx":1677
14926  * return math.acosh(obj)
14927  * except:
14928  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14929  *
14930  * cpdef inline sin(obj,i = None):
14931  */
14932  __Pyx_XDECREF(__pyx_r);
14933  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14934  __Pyx_GOTREF(__pyx_t_10);
14935  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
14936  __Pyx_GOTREF(__pyx_t_11);
14937  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14938  __pyx_r = __pyx_t_11;
14939  __pyx_t_11 = 0;
14940  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14941  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14942  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14943  goto __pyx_L7_except_return;
14944  }
14945  __pyx_L6_except_error:;
14946 
14947  /* "PyClical.pyx":1674
14948  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
14949  * else:
14950  * try: # <<<<<<<<<<<<<<
14951  * return math.acosh(obj)
14952  * except:
14953  */
14954  __Pyx_XGIVEREF(__pyx_t_6);
14955  __Pyx_XGIVEREF(__pyx_t_7);
14956  __Pyx_XGIVEREF(__pyx_t_8);
14957  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14958  goto __pyx_L1_error;
14959  __pyx_L8_try_return:;
14960  __Pyx_XGIVEREF(__pyx_t_6);
14961  __Pyx_XGIVEREF(__pyx_t_7);
14962  __Pyx_XGIVEREF(__pyx_t_8);
14963  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14964  goto __pyx_L0;
14965  __pyx_L7_except_return:;
14966  __Pyx_XGIVEREF(__pyx_t_6);
14967  __Pyx_XGIVEREF(__pyx_t_7);
14968  __Pyx_XGIVEREF(__pyx_t_8);
14969  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14970  goto __pyx_L0;
14971  }
14972  }
14973 
14974  /* "PyClical.pyx":1656
14975  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14976  *
14977  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14978  * """
14979  * Inverse hyperbolic cosine of multivector with optional complexifier.
14980  */
14981 
14982  /* function exit code */
14983  __pyx_L1_error:;
14984  __Pyx_XDECREF(__pyx_t_3);
14985  __Pyx_XDECREF(__pyx_t_5);
14986  __Pyx_XDECREF(__pyx_t_9);
14987  __Pyx_XDECREF(__pyx_t_10);
14988  __Pyx_XDECREF(__pyx_t_11);
14989  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14990  __pyx_r = 0;
14991  __pyx_L0:;
14992  __Pyx_XGIVEREF(__pyx_r);
14993  __Pyx_RefNannyFinishContext();
14994  return __pyx_r;
14995  }
14996 
14997  /* Python wrapper */
14998  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14999  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 ";
15000  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15001  PyObject *__pyx_v_obj = 0;
15002  PyObject *__pyx_v_i = 0;
15003  PyObject *__pyx_r = 0;
15004  __Pyx_RefNannyDeclarations
15005  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15006  {
15007  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15008  PyObject* values[2] = {0,0};
15009  values[1] = ((PyObject *)Py_None);
15010  if (unlikely(__pyx_kwds)) {
15011  Py_ssize_t kw_args;
15012  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15013  switch (pos_args) {
15014  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15015  CYTHON_FALLTHROUGH;
15016  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15017  CYTHON_FALLTHROUGH;
15018  case 0: break;
15019  default: goto __pyx_L5_argtuple_error;
15020  }
15021  kw_args = PyDict_Size(__pyx_kwds);
15022  switch (pos_args) {
15023  case 0:
15024  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15025  else goto __pyx_L5_argtuple_error;
15026  CYTHON_FALLTHROUGH;
15027  case 1:
15028  if (kw_args > 0) {
15029  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15030  if (value) { values[1] = value; kw_args--; }
15031  }
15032  }
15033  if (unlikely(kw_args > 0)) {
15034  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15035  }
15036  } else {
15037  switch (PyTuple_GET_SIZE(__pyx_args)) {
15038  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15039  CYTHON_FALLTHROUGH;
15040  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15041  break;
15042  default: goto __pyx_L5_argtuple_error;
15043  }
15044  }
15045  __pyx_v_obj = values[0];
15046  __pyx_v_i = values[1];
15047  }
15048  goto __pyx_L4_argument_unpacking_done;
15049  __pyx_L5_argtuple_error:;
15050  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15051  __pyx_L3_error:;
15052  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15053  __Pyx_RefNannyFinishContext();
15054  return NULL;
15055  __pyx_L4_argument_unpacking_done:;
15056  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15057 
15058  /* function exit code */
15059  __Pyx_RefNannyFinishContext();
15060  return __pyx_r;
15061  }
15062 
15063  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15064  PyObject *__pyx_r = NULL;
15065  __Pyx_RefNannyDeclarations
15066  PyObject *__pyx_t_1 = NULL;
15067  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15068  __Pyx_RefNannySetupContext("acosh", 0);
15069  __Pyx_XDECREF(__pyx_r);
15070  __pyx_t_2.__pyx_n = 1;
15071  __pyx_t_2.i = __pyx_v_i;
15072  __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)
15073  __Pyx_GOTREF(__pyx_t_1);
15074  __pyx_r = __pyx_t_1;
15075  __pyx_t_1 = 0;
15076  goto __pyx_L0;
15077 
15078  /* function exit code */
15079  __pyx_L1_error:;
15080  __Pyx_XDECREF(__pyx_t_1);
15081  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15082  __pyx_r = NULL;
15083  __pyx_L0:;
15084  __Pyx_XGIVEREF(__pyx_r);
15085  __Pyx_RefNannyFinishContext();
15086  return __pyx_r;
15087  }
15088 
15089  /* "PyClical.pyx":1679
15090  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15091  *
15092  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15093  * """
15094  * Sine of multivector with optional complexifier.
15095  */
15096 
15097  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15098  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) {
15099  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15100  PyObject *__pyx_r = NULL;
15101  __Pyx_RefNannyDeclarations
15102  int __pyx_t_1;
15103  int __pyx_t_2;
15104  PyObject *__pyx_t_3 = NULL;
15105  Clifford __pyx_t_4;
15106  PyObject *__pyx_t_5 = NULL;
15107  PyObject *__pyx_t_6 = NULL;
15108  PyObject *__pyx_t_7 = NULL;
15109  PyObject *__pyx_t_8 = NULL;
15110  PyObject *__pyx_t_9 = NULL;
15111  PyObject *__pyx_t_10 = NULL;
15112  PyObject *__pyx_t_11 = NULL;
15113  __Pyx_RefNannySetupContext("sin", 0);
15114  if (__pyx_optional_args) {
15115  if (__pyx_optional_args->__pyx_n > 0) {
15116  __pyx_v_i = __pyx_optional_args->i;
15117  }
15118  }
15119 
15120  /* "PyClical.pyx":1690
15121  * {1,2,3}
15122  * """
15123  * if not (i is None): # <<<<<<<<<<<<<<
15124  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15125  * else:
15126  */
15127  __pyx_t_1 = (__pyx_v_i != Py_None);
15128  __pyx_t_2 = (__pyx_t_1 != 0);
15129  if (__pyx_t_2) {
15130 
15131  /* "PyClical.pyx":1691
15132  * """
15133  * if not (i is None):
15134  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15135  * else:
15136  * try:
15137  */
15138  __Pyx_XDECREF(__pyx_r);
15139  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15140  __Pyx_GOTREF(__pyx_t_3);
15141  try {
15142  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15143  } catch(...) {
15144  __Pyx_CppExn2PyErr();
15145  __PYX_ERR(0, 1691, __pyx_L1_error)
15146  }
15147  __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)
15148  __Pyx_GOTREF(__pyx_t_5);
15149  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15150  __pyx_r = __pyx_t_5;
15151  __pyx_t_5 = 0;
15152  goto __pyx_L0;
15153 
15154  /* "PyClical.pyx":1690
15155  * {1,2,3}
15156  * """
15157  * if not (i is None): # <<<<<<<<<<<<<<
15158  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15159  * else:
15160  */
15161  }
15162 
15163  /* "PyClical.pyx":1693
15164  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15165  * else:
15166  * try: # <<<<<<<<<<<<<<
15167  * return math.sin(obj)
15168  * except:
15169  */
15170  /*else*/ {
15171  {
15172  __Pyx_PyThreadState_declare
15173  __Pyx_PyThreadState_assign
15174  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15175  __Pyx_XGOTREF(__pyx_t_6);
15176  __Pyx_XGOTREF(__pyx_t_7);
15177  __Pyx_XGOTREF(__pyx_t_8);
15178  /*try:*/ {
15179 
15180  /* "PyClical.pyx":1694
15181  * else:
15182  * try:
15183  * return math.sin(obj) # <<<<<<<<<<<<<<
15184  * except:
15185  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15186  */
15187  __Pyx_XDECREF(__pyx_r);
15188  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15189  __Pyx_GOTREF(__pyx_t_3);
15190  __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)
15191  __Pyx_GOTREF(__pyx_t_9);
15192  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15193  __pyx_t_3 = NULL;
15194  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15195  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15196  if (likely(__pyx_t_3)) {
15197  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15198  __Pyx_INCREF(__pyx_t_3);
15199  __Pyx_INCREF(function);
15200  __Pyx_DECREF_SET(__pyx_t_9, function);
15201  }
15202  }
15203  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15204  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15205  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15206  __Pyx_GOTREF(__pyx_t_5);
15207  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15208  __pyx_r = __pyx_t_5;
15209  __pyx_t_5 = 0;
15210  goto __pyx_L8_try_return;
15211 
15212  /* "PyClical.pyx":1693
15213  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15214  * else:
15215  * try: # <<<<<<<<<<<<<<
15216  * return math.sin(obj)
15217  * except:
15218  */
15219  }
15220  __pyx_L4_error:;
15221  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15222  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15223  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15224 
15225  /* "PyClical.pyx":1695
15226  * try:
15227  * return math.sin(obj)
15228  * except: # <<<<<<<<<<<<<<
15229  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15230  *
15231  */
15232  /*except:*/ {
15233  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15234  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15235  __Pyx_GOTREF(__pyx_t_5);
15236  __Pyx_GOTREF(__pyx_t_9);
15237  __Pyx_GOTREF(__pyx_t_3);
15238 
15239  /* "PyClical.pyx":1696
15240  * return math.sin(obj)
15241  * except:
15242  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15243  *
15244  * cpdef inline asin(obj,i = None):
15245  */
15246  __Pyx_XDECREF(__pyx_r);
15247  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15248  __Pyx_GOTREF(__pyx_t_10);
15249  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15250  __Pyx_GOTREF(__pyx_t_11);
15251  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15252  __pyx_r = __pyx_t_11;
15253  __pyx_t_11 = 0;
15254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15255  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15256  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15257  goto __pyx_L7_except_return;
15258  }
15259  __pyx_L6_except_error:;
15260 
15261  /* "PyClical.pyx":1693
15262  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15263  * else:
15264  * try: # <<<<<<<<<<<<<<
15265  * return math.sin(obj)
15266  * except:
15267  */
15268  __Pyx_XGIVEREF(__pyx_t_6);
15269  __Pyx_XGIVEREF(__pyx_t_7);
15270  __Pyx_XGIVEREF(__pyx_t_8);
15271  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15272  goto __pyx_L1_error;
15273  __pyx_L8_try_return:;
15274  __Pyx_XGIVEREF(__pyx_t_6);
15275  __Pyx_XGIVEREF(__pyx_t_7);
15276  __Pyx_XGIVEREF(__pyx_t_8);
15277  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15278  goto __pyx_L0;
15279  __pyx_L7_except_return:;
15280  __Pyx_XGIVEREF(__pyx_t_6);
15281  __Pyx_XGIVEREF(__pyx_t_7);
15282  __Pyx_XGIVEREF(__pyx_t_8);
15283  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15284  goto __pyx_L0;
15285  }
15286  }
15287 
15288  /* "PyClical.pyx":1679
15289  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15290  *
15291  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15292  * """
15293  * Sine of multivector with optional complexifier.
15294  */
15295 
15296  /* function exit code */
15297  __pyx_L1_error:;
15298  __Pyx_XDECREF(__pyx_t_3);
15299  __Pyx_XDECREF(__pyx_t_5);
15300  __Pyx_XDECREF(__pyx_t_9);
15301  __Pyx_XDECREF(__pyx_t_10);
15302  __Pyx_XDECREF(__pyx_t_11);
15303  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15304  __pyx_r = 0;
15305  __pyx_L0:;
15306  __Pyx_XGIVEREF(__pyx_r);
15307  __Pyx_RefNannyFinishContext();
15308  return __pyx_r;
15309  }
15310 
15311  /* Python wrapper */
15312  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15313  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 ";
15314  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15315  PyObject *__pyx_v_obj = 0;
15316  PyObject *__pyx_v_i = 0;
15317  PyObject *__pyx_r = 0;
15318  __Pyx_RefNannyDeclarations
15319  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15320  {
15321  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15322  PyObject* values[2] = {0,0};
15323  values[1] = ((PyObject *)Py_None);
15324  if (unlikely(__pyx_kwds)) {
15325  Py_ssize_t kw_args;
15326  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15327  switch (pos_args) {
15328  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15329  CYTHON_FALLTHROUGH;
15330  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15331  CYTHON_FALLTHROUGH;
15332  case 0: break;
15333  default: goto __pyx_L5_argtuple_error;
15334  }
15335  kw_args = PyDict_Size(__pyx_kwds);
15336  switch (pos_args) {
15337  case 0:
15338  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15339  else goto __pyx_L5_argtuple_error;
15340  CYTHON_FALLTHROUGH;
15341  case 1:
15342  if (kw_args > 0) {
15343  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15344  if (value) { values[1] = value; kw_args--; }
15345  }
15346  }
15347  if (unlikely(kw_args > 0)) {
15348  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15349  }
15350  } else {
15351  switch (PyTuple_GET_SIZE(__pyx_args)) {
15352  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15353  CYTHON_FALLTHROUGH;
15354  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15355  break;
15356  default: goto __pyx_L5_argtuple_error;
15357  }
15358  }
15359  __pyx_v_obj = values[0];
15360  __pyx_v_i = values[1];
15361  }
15362  goto __pyx_L4_argument_unpacking_done;
15363  __pyx_L5_argtuple_error:;
15364  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15365  __pyx_L3_error:;
15366  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15367  __Pyx_RefNannyFinishContext();
15368  return NULL;
15369  __pyx_L4_argument_unpacking_done:;
15370  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15371 
15372  /* function exit code */
15373  __Pyx_RefNannyFinishContext();
15374  return __pyx_r;
15375  }
15376 
15377  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15378  PyObject *__pyx_r = NULL;
15379  __Pyx_RefNannyDeclarations
15380  PyObject *__pyx_t_1 = NULL;
15381  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15382  __Pyx_RefNannySetupContext("sin", 0);
15383  __Pyx_XDECREF(__pyx_r);
15384  __pyx_t_2.__pyx_n = 1;
15385  __pyx_t_2.i = __pyx_v_i;
15386  __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)
15387  __Pyx_GOTREF(__pyx_t_1);
15388  __pyx_r = __pyx_t_1;
15389  __pyx_t_1 = 0;
15390  goto __pyx_L0;
15391 
15392  /* function exit code */
15393  __pyx_L1_error:;
15394  __Pyx_XDECREF(__pyx_t_1);
15395  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15396  __pyx_r = NULL;
15397  __pyx_L0:;
15398  __Pyx_XGIVEREF(__pyx_r);
15399  __Pyx_RefNannyFinishContext();
15400  return __pyx_r;
15401  }
15402 
15403  /* "PyClical.pyx":1698
15404  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15405  *
15406  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15407  * """
15408  * Inverse sine of multivector with optional complexifier.
15409  */
15410 
15411  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15412  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) {
15413  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15414  PyObject *__pyx_r = NULL;
15415  __Pyx_RefNannyDeclarations
15416  int __pyx_t_1;
15417  int __pyx_t_2;
15418  PyObject *__pyx_t_3 = NULL;
15419  Clifford __pyx_t_4;
15420  PyObject *__pyx_t_5 = NULL;
15421  PyObject *__pyx_t_6 = NULL;
15422  PyObject *__pyx_t_7 = NULL;
15423  PyObject *__pyx_t_8 = NULL;
15424  PyObject *__pyx_t_9 = NULL;
15425  PyObject *__pyx_t_10 = NULL;
15426  PyObject *__pyx_t_11 = NULL;
15427  __Pyx_RefNannySetupContext("asin", 0);
15428  if (__pyx_optional_args) {
15429  if (__pyx_optional_args->__pyx_n > 0) {
15430  __pyx_v_i = __pyx_optional_args->i;
15431  }
15432  }
15433 
15434  /* "PyClical.pyx":1711
15435  * {1,2,3}
15436  * """
15437  * if not (i is None): # <<<<<<<<<<<<<<
15438  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15439  * else:
15440  */
15441  __pyx_t_1 = (__pyx_v_i != Py_None);
15442  __pyx_t_2 = (__pyx_t_1 != 0);
15443  if (__pyx_t_2) {
15444 
15445  /* "PyClical.pyx":1712
15446  * """
15447  * if not (i is None):
15448  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15449  * else:
15450  * try:
15451  */
15452  __Pyx_XDECREF(__pyx_r);
15453  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15454  __Pyx_GOTREF(__pyx_t_3);
15455  try {
15456  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15457  } catch(...) {
15458  __Pyx_CppExn2PyErr();
15459  __PYX_ERR(0, 1712, __pyx_L1_error)
15460  }
15461  __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)
15462  __Pyx_GOTREF(__pyx_t_5);
15463  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15464  __pyx_r = __pyx_t_5;
15465  __pyx_t_5 = 0;
15466  goto __pyx_L0;
15467 
15468  /* "PyClical.pyx":1711
15469  * {1,2,3}
15470  * """
15471  * if not (i is None): # <<<<<<<<<<<<<<
15472  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15473  * else:
15474  */
15475  }
15476 
15477  /* "PyClical.pyx":1714
15478  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15479  * else:
15480  * try: # <<<<<<<<<<<<<<
15481  * return math.asin(obj)
15482  * except:
15483  */
15484  /*else*/ {
15485  {
15486  __Pyx_PyThreadState_declare
15487  __Pyx_PyThreadState_assign
15488  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15489  __Pyx_XGOTREF(__pyx_t_6);
15490  __Pyx_XGOTREF(__pyx_t_7);
15491  __Pyx_XGOTREF(__pyx_t_8);
15492  /*try:*/ {
15493 
15494  /* "PyClical.pyx":1715
15495  * else:
15496  * try:
15497  * return math.asin(obj) # <<<<<<<<<<<<<<
15498  * except:
15499  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15500  */
15501  __Pyx_XDECREF(__pyx_r);
15502  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15503  __Pyx_GOTREF(__pyx_t_3);
15504  __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)
15505  __Pyx_GOTREF(__pyx_t_9);
15506  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15507  __pyx_t_3 = NULL;
15508  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15509  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15510  if (likely(__pyx_t_3)) {
15511  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15512  __Pyx_INCREF(__pyx_t_3);
15513  __Pyx_INCREF(function);
15514  __Pyx_DECREF_SET(__pyx_t_9, function);
15515  }
15516  }
15517  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
15518  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15519  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15520  __Pyx_GOTREF(__pyx_t_5);
15521  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15522  __pyx_r = __pyx_t_5;
15523  __pyx_t_5 = 0;
15524  goto __pyx_L8_try_return;
15525 
15526  /* "PyClical.pyx":1714
15527  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15528  * else:
15529  * try: # <<<<<<<<<<<<<<
15530  * return math.asin(obj)
15531  * except:
15532  */
15533  }
15534  __pyx_L4_error:;
15535  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15536  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15537  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15538 
15539  /* "PyClical.pyx":1716
15540  * try:
15541  * return math.asin(obj)
15542  * except: # <<<<<<<<<<<<<<
15543  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15544  *
15545  */
15546  /*except:*/ {
15547  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15548  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15549  __Pyx_GOTREF(__pyx_t_5);
15550  __Pyx_GOTREF(__pyx_t_9);
15551  __Pyx_GOTREF(__pyx_t_3);
15552 
15553  /* "PyClical.pyx":1717
15554  * return math.asin(obj)
15555  * except:
15556  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15557  *
15558  * cpdef inline sinh(obj):
15559  */
15560  __Pyx_XDECREF(__pyx_r);
15561  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15562  __Pyx_GOTREF(__pyx_t_10);
15563  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15564  __Pyx_GOTREF(__pyx_t_11);
15565  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15566  __pyx_r = __pyx_t_11;
15567  __pyx_t_11 = 0;
15568  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15569  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15570  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15571  goto __pyx_L7_except_return;
15572  }
15573  __pyx_L6_except_error:;
15574 
15575  /* "PyClical.pyx":1714
15576  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15577  * else:
15578  * try: # <<<<<<<<<<<<<<
15579  * return math.asin(obj)
15580  * except:
15581  */
15582  __Pyx_XGIVEREF(__pyx_t_6);
15583  __Pyx_XGIVEREF(__pyx_t_7);
15584  __Pyx_XGIVEREF(__pyx_t_8);
15585  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15586  goto __pyx_L1_error;
15587  __pyx_L8_try_return:;
15588  __Pyx_XGIVEREF(__pyx_t_6);
15589  __Pyx_XGIVEREF(__pyx_t_7);
15590  __Pyx_XGIVEREF(__pyx_t_8);
15591  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15592  goto __pyx_L0;
15593  __pyx_L7_except_return:;
15594  __Pyx_XGIVEREF(__pyx_t_6);
15595  __Pyx_XGIVEREF(__pyx_t_7);
15596  __Pyx_XGIVEREF(__pyx_t_8);
15597  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15598  goto __pyx_L0;
15599  }
15600  }
15601 
15602  /* "PyClical.pyx":1698
15603  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15604  *
15605  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15606  * """
15607  * Inverse sine of multivector with optional complexifier.
15608  */
15609 
15610  /* function exit code */
15611  __pyx_L1_error:;
15612  __Pyx_XDECREF(__pyx_t_3);
15613  __Pyx_XDECREF(__pyx_t_5);
15614  __Pyx_XDECREF(__pyx_t_9);
15615  __Pyx_XDECREF(__pyx_t_10);
15616  __Pyx_XDECREF(__pyx_t_11);
15617  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15618  __pyx_r = 0;
15619  __pyx_L0:;
15620  __Pyx_XGIVEREF(__pyx_r);
15621  __Pyx_RefNannyFinishContext();
15622  return __pyx_r;
15623  }
15624 
15625  /* Python wrapper */
15626  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15627  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 ";
15628  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15629  PyObject *__pyx_v_obj = 0;
15630  PyObject *__pyx_v_i = 0;
15631  PyObject *__pyx_r = 0;
15632  __Pyx_RefNannyDeclarations
15633  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15634  {
15635  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15636  PyObject* values[2] = {0,0};
15637  values[1] = ((PyObject *)Py_None);
15638  if (unlikely(__pyx_kwds)) {
15639  Py_ssize_t kw_args;
15640  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15641  switch (pos_args) {
15642  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15643  CYTHON_FALLTHROUGH;
15644  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15645  CYTHON_FALLTHROUGH;
15646  case 0: break;
15647  default: goto __pyx_L5_argtuple_error;
15648  }
15649  kw_args = PyDict_Size(__pyx_kwds);
15650  switch (pos_args) {
15651  case 0:
15652  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15653  else goto __pyx_L5_argtuple_error;
15654  CYTHON_FALLTHROUGH;
15655  case 1:
15656  if (kw_args > 0) {
15657  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15658  if (value) { values[1] = value; kw_args--; }
15659  }
15660  }
15661  if (unlikely(kw_args > 0)) {
15662  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15663  }
15664  } else {
15665  switch (PyTuple_GET_SIZE(__pyx_args)) {
15666  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15667  CYTHON_FALLTHROUGH;
15668  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15669  break;
15670  default: goto __pyx_L5_argtuple_error;
15671  }
15672  }
15673  __pyx_v_obj = values[0];
15674  __pyx_v_i = values[1];
15675  }
15676  goto __pyx_L4_argument_unpacking_done;
15677  __pyx_L5_argtuple_error:;
15678  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15679  __pyx_L3_error:;
15680  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15681  __Pyx_RefNannyFinishContext();
15682  return NULL;
15683  __pyx_L4_argument_unpacking_done:;
15684  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15685 
15686  /* function exit code */
15687  __Pyx_RefNannyFinishContext();
15688  return __pyx_r;
15689  }
15690 
15691  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15692  PyObject *__pyx_r = NULL;
15693  __Pyx_RefNannyDeclarations
15694  PyObject *__pyx_t_1 = NULL;
15695  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15696  __Pyx_RefNannySetupContext("asin", 0);
15697  __Pyx_XDECREF(__pyx_r);
15698  __pyx_t_2.__pyx_n = 1;
15699  __pyx_t_2.i = __pyx_v_i;
15700  __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)
15701  __Pyx_GOTREF(__pyx_t_1);
15702  __pyx_r = __pyx_t_1;
15703  __pyx_t_1 = 0;
15704  goto __pyx_L0;
15705 
15706  /* function exit code */
15707  __pyx_L1_error:;
15708  __Pyx_XDECREF(__pyx_t_1);
15709  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15710  __pyx_r = NULL;
15711  __pyx_L0:;
15712  __Pyx_XGIVEREF(__pyx_r);
15713  __Pyx_RefNannyFinishContext();
15714  return __pyx_r;
15715  }
15716 
15717  /* "PyClical.pyx":1719
15718  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15719  *
15720  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15721  * """
15722  * Hyperbolic sine of multivector.
15723  */
15724 
15725  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15726  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
15727  PyObject *__pyx_r = NULL;
15728  __Pyx_RefNannyDeclarations
15729  PyObject *__pyx_t_1 = NULL;
15730  PyObject *__pyx_t_2 = NULL;
15731  PyObject *__pyx_t_3 = NULL;
15732  PyObject *__pyx_t_4 = NULL;
15733  PyObject *__pyx_t_5 = NULL;
15734  PyObject *__pyx_t_6 = NULL;
15735  PyObject *__pyx_t_7 = NULL;
15736  PyObject *__pyx_t_8 = NULL;
15737  __Pyx_RefNannySetupContext("sinh", 0);
15738 
15739  /* "PyClical.pyx":1728
15740  * 0.5{1,2}
15741  * """
15742  * try: # <<<<<<<<<<<<<<
15743  * return math.sinh(obj)
15744  * except:
15745  */
15746  {
15747  __Pyx_PyThreadState_declare
15748  __Pyx_PyThreadState_assign
15749  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
15750  __Pyx_XGOTREF(__pyx_t_1);
15751  __Pyx_XGOTREF(__pyx_t_2);
15752  __Pyx_XGOTREF(__pyx_t_3);
15753  /*try:*/ {
15754 
15755  /* "PyClical.pyx":1729
15756  * """
15757  * try:
15758  * return math.sinh(obj) # <<<<<<<<<<<<<<
15759  * except:
15760  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15761  */
15762  __Pyx_XDECREF(__pyx_r);
15763  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
15764  __Pyx_GOTREF(__pyx_t_5);
15765  __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)
15766  __Pyx_GOTREF(__pyx_t_6);
15767  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15768  __pyx_t_5 = NULL;
15769  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
15770  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
15771  if (likely(__pyx_t_5)) {
15772  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
15773  __Pyx_INCREF(__pyx_t_5);
15774  __Pyx_INCREF(function);
15775  __Pyx_DECREF_SET(__pyx_t_6, function);
15776  }
15777  }
15778  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
15779  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15780  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
15781  __Pyx_GOTREF(__pyx_t_4);
15782  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15783  __pyx_r = __pyx_t_4;
15784  __pyx_t_4 = 0;
15785  goto __pyx_L7_try_return;
15786 
15787  /* "PyClical.pyx":1728
15788  * 0.5{1,2}
15789  * """
15790  * try: # <<<<<<<<<<<<<<
15791  * return math.sinh(obj)
15792  * except:
15793  */
15794  }
15795  __pyx_L3_error:;
15796  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
15797  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15798  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
15799 
15800  /* "PyClical.pyx":1730
15801  * try:
15802  * return math.sinh(obj)
15803  * except: # <<<<<<<<<<<<<<
15804  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15805  *
15806  */
15807  /*except:*/ {
15808  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15809  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
15810  __Pyx_GOTREF(__pyx_t_4);
15811  __Pyx_GOTREF(__pyx_t_6);
15812  __Pyx_GOTREF(__pyx_t_5);
15813 
15814  /* "PyClical.pyx":1731
15815  * return math.sinh(obj)
15816  * except:
15817  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15818  *
15819  * cpdef inline asinh(obj,i = None):
15820  */
15821  __Pyx_XDECREF(__pyx_r);
15822  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15823  __Pyx_GOTREF(__pyx_t_7);
15824  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), sinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
15825  __Pyx_GOTREF(__pyx_t_8);
15826  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15827  __pyx_r = __pyx_t_8;
15828  __pyx_t_8 = 0;
15829  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15830  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15831  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15832  goto __pyx_L6_except_return;
15833  }
15834  __pyx_L5_except_error:;
15835 
15836  /* "PyClical.pyx":1728
15837  * 0.5{1,2}
15838  * """
15839  * try: # <<<<<<<<<<<<<<
15840  * return math.sinh(obj)
15841  * except:
15842  */
15843  __Pyx_XGIVEREF(__pyx_t_1);
15844  __Pyx_XGIVEREF(__pyx_t_2);
15845  __Pyx_XGIVEREF(__pyx_t_3);
15846  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15847  goto __pyx_L1_error;
15848  __pyx_L7_try_return:;
15849  __Pyx_XGIVEREF(__pyx_t_1);
15850  __Pyx_XGIVEREF(__pyx_t_2);
15851  __Pyx_XGIVEREF(__pyx_t_3);
15852  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15853  goto __pyx_L0;
15854  __pyx_L6_except_return:;
15855  __Pyx_XGIVEREF(__pyx_t_1);
15856  __Pyx_XGIVEREF(__pyx_t_2);
15857  __Pyx_XGIVEREF(__pyx_t_3);
15858  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
15859  goto __pyx_L0;
15860  }
15861 
15862  /* "PyClical.pyx":1719
15863  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15864  *
15865  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
15866  * """
15867  * Hyperbolic sine of multivector.
15868  */
15869 
15870  /* function exit code */
15871  __pyx_L1_error:;
15872  __Pyx_XDECREF(__pyx_t_4);
15873  __Pyx_XDECREF(__pyx_t_5);
15874  __Pyx_XDECREF(__pyx_t_6);
15875  __Pyx_XDECREF(__pyx_t_7);
15876  __Pyx_XDECREF(__pyx_t_8);
15877  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15878  __pyx_r = 0;
15879  __pyx_L0:;
15880  __Pyx_XGIVEREF(__pyx_r);
15881  __Pyx_RefNannyFinishContext();
15882  return __pyx_r;
15883  }
15884 
15885  /* Python wrapper */
15886  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15887  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 ";
15888  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15889  PyObject *__pyx_r = 0;
15890  __Pyx_RefNannyDeclarations
15891  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
15892  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
15893 
15894  /* function exit code */
15895  __Pyx_RefNannyFinishContext();
15896  return __pyx_r;
15897  }
15898 
15899  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15900  PyObject *__pyx_r = NULL;
15901  __Pyx_RefNannyDeclarations
15902  PyObject *__pyx_t_1 = NULL;
15903  __Pyx_RefNannySetupContext("sinh", 0);
15904  __Pyx_XDECREF(__pyx_r);
15905  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
15906  __Pyx_GOTREF(__pyx_t_1);
15907  __pyx_r = __pyx_t_1;
15908  __pyx_t_1 = 0;
15909  goto __pyx_L0;
15910 
15911  /* function exit code */
15912  __pyx_L1_error:;
15913  __Pyx_XDECREF(__pyx_t_1);
15914  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15915  __pyx_r = NULL;
15916  __pyx_L0:;
15917  __Pyx_XGIVEREF(__pyx_r);
15918  __Pyx_RefNannyFinishContext();
15919  return __pyx_r;
15920  }
15921 
15922  /* "PyClical.pyx":1733
15923  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
15924  *
15925  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
15926  * """
15927  * Inverse hyperbolic sine of multivector with optional complexifier.
15928  */
15929 
15930  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15931  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) {
15932  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15933  PyObject *__pyx_r = NULL;
15934  __Pyx_RefNannyDeclarations
15935  int __pyx_t_1;
15936  int __pyx_t_2;
15937  PyObject *__pyx_t_3 = NULL;
15938  Clifford __pyx_t_4;
15939  PyObject *__pyx_t_5 = NULL;
15940  PyObject *__pyx_t_6 = NULL;
15941  PyObject *__pyx_t_7 = NULL;
15942  PyObject *__pyx_t_8 = NULL;
15943  PyObject *__pyx_t_9 = NULL;
15944  PyObject *__pyx_t_10 = NULL;
15945  PyObject *__pyx_t_11 = NULL;
15946  __Pyx_RefNannySetupContext("asinh", 0);
15947  if (__pyx_optional_args) {
15948  if (__pyx_optional_args->__pyx_n > 0) {
15949  __pyx_v_i = __pyx_optional_args->i;
15950  }
15951  }
15952 
15953  /* "PyClical.pyx":1744
15954  * {1,2}
15955  * """
15956  * if not (i is None): # <<<<<<<<<<<<<<
15957  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15958  * else:
15959  */
15960  __pyx_t_1 = (__pyx_v_i != Py_None);
15961  __pyx_t_2 = (__pyx_t_1 != 0);
15962  if (__pyx_t_2) {
15963 
15964  /* "PyClical.pyx":1745
15965  * """
15966  * if not (i is None):
15967  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15968  * else:
15969  * try:
15970  */
15971  __Pyx_XDECREF(__pyx_r);
15972  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
15973  __Pyx_GOTREF(__pyx_t_3);
15974  try {
15975  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15976  } catch(...) {
15977  __Pyx_CppExn2PyErr();
15978  __PYX_ERR(0, 1745, __pyx_L1_error)
15979  }
15980  __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)
15981  __Pyx_GOTREF(__pyx_t_5);
15982  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15983  __pyx_r = __pyx_t_5;
15984  __pyx_t_5 = 0;
15985  goto __pyx_L0;
15986 
15987  /* "PyClical.pyx":1744
15988  * {1,2}
15989  * """
15990  * if not (i is None): # <<<<<<<<<<<<<<
15991  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15992  * else:
15993  */
15994  }
15995 
15996  /* "PyClical.pyx":1747
15997  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
15998  * else:
15999  * try: # <<<<<<<<<<<<<<
16000  * return math.asinh(obj)
16001  * except:
16002  */
16003  /*else*/ {
16004  {
16005  __Pyx_PyThreadState_declare
16006  __Pyx_PyThreadState_assign
16007  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16008  __Pyx_XGOTREF(__pyx_t_6);
16009  __Pyx_XGOTREF(__pyx_t_7);
16010  __Pyx_XGOTREF(__pyx_t_8);
16011  /*try:*/ {
16012 
16013  /* "PyClical.pyx":1748
16014  * else:
16015  * try:
16016  * return math.asinh(obj) # <<<<<<<<<<<<<<
16017  * except:
16018  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16019  */
16020  __Pyx_XDECREF(__pyx_r);
16021  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16022  __Pyx_GOTREF(__pyx_t_3);
16023  __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)
16024  __Pyx_GOTREF(__pyx_t_9);
16025  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16026  __pyx_t_3 = NULL;
16027  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16028  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16029  if (likely(__pyx_t_3)) {
16030  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16031  __Pyx_INCREF(__pyx_t_3);
16032  __Pyx_INCREF(function);
16033  __Pyx_DECREF_SET(__pyx_t_9, function);
16034  }
16035  }
16036  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16037  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16038  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16039  __Pyx_GOTREF(__pyx_t_5);
16040  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16041  __pyx_r = __pyx_t_5;
16042  __pyx_t_5 = 0;
16043  goto __pyx_L8_try_return;
16044 
16045  /* "PyClical.pyx":1747
16046  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16047  * else:
16048  * try: # <<<<<<<<<<<<<<
16049  * return math.asinh(obj)
16050  * except:
16051  */
16052  }
16053  __pyx_L4_error:;
16054  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16055  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16056  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16057 
16058  /* "PyClical.pyx":1749
16059  * try:
16060  * return math.asinh(obj)
16061  * except: # <<<<<<<<<<<<<<
16062  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16063  *
16064  */
16065  /*except:*/ {
16066  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16067  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16068  __Pyx_GOTREF(__pyx_t_5);
16069  __Pyx_GOTREF(__pyx_t_9);
16070  __Pyx_GOTREF(__pyx_t_3);
16071 
16072  /* "PyClical.pyx":1750
16073  * return math.asinh(obj)
16074  * except:
16075  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16076  *
16077  * cpdef inline tan(obj,i = None):
16078  */
16079  __Pyx_XDECREF(__pyx_r);
16080  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16081  __Pyx_GOTREF(__pyx_t_10);
16082  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16083  __Pyx_GOTREF(__pyx_t_11);
16084  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16085  __pyx_r = __pyx_t_11;
16086  __pyx_t_11 = 0;
16087  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16088  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16089  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16090  goto __pyx_L7_except_return;
16091  }
16092  __pyx_L6_except_error:;
16093 
16094  /* "PyClical.pyx":1747
16095  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16096  * else:
16097  * try: # <<<<<<<<<<<<<<
16098  * return math.asinh(obj)
16099  * except:
16100  */
16101  __Pyx_XGIVEREF(__pyx_t_6);
16102  __Pyx_XGIVEREF(__pyx_t_7);
16103  __Pyx_XGIVEREF(__pyx_t_8);
16104  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16105  goto __pyx_L1_error;
16106  __pyx_L8_try_return:;
16107  __Pyx_XGIVEREF(__pyx_t_6);
16108  __Pyx_XGIVEREF(__pyx_t_7);
16109  __Pyx_XGIVEREF(__pyx_t_8);
16110  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16111  goto __pyx_L0;
16112  __pyx_L7_except_return:;
16113  __Pyx_XGIVEREF(__pyx_t_6);
16114  __Pyx_XGIVEREF(__pyx_t_7);
16115  __Pyx_XGIVEREF(__pyx_t_8);
16116  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16117  goto __pyx_L0;
16118  }
16119  }
16120 
16121  /* "PyClical.pyx":1733
16122  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16123  *
16124  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16125  * """
16126  * Inverse hyperbolic sine of multivector with optional complexifier.
16127  */
16128 
16129  /* function exit code */
16130  __pyx_L1_error:;
16131  __Pyx_XDECREF(__pyx_t_3);
16132  __Pyx_XDECREF(__pyx_t_5);
16133  __Pyx_XDECREF(__pyx_t_9);
16134  __Pyx_XDECREF(__pyx_t_10);
16135  __Pyx_XDECREF(__pyx_t_11);
16136  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16137  __pyx_r = 0;
16138  __pyx_L0:;
16139  __Pyx_XGIVEREF(__pyx_r);
16140  __Pyx_RefNannyFinishContext();
16141  return __pyx_r;
16142  }
16143 
16144  /* Python wrapper */
16145  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16146  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 ";
16147  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16148  PyObject *__pyx_v_obj = 0;
16149  PyObject *__pyx_v_i = 0;
16150  PyObject *__pyx_r = 0;
16151  __Pyx_RefNannyDeclarations
16152  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16153  {
16154  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16155  PyObject* values[2] = {0,0};
16156  values[1] = ((PyObject *)Py_None);
16157  if (unlikely(__pyx_kwds)) {
16158  Py_ssize_t kw_args;
16159  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16160  switch (pos_args) {
16161  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16162  CYTHON_FALLTHROUGH;
16163  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16164  CYTHON_FALLTHROUGH;
16165  case 0: break;
16166  default: goto __pyx_L5_argtuple_error;
16167  }
16168  kw_args = PyDict_Size(__pyx_kwds);
16169  switch (pos_args) {
16170  case 0:
16171  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16172  else goto __pyx_L5_argtuple_error;
16173  CYTHON_FALLTHROUGH;
16174  case 1:
16175  if (kw_args > 0) {
16176  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16177  if (value) { values[1] = value; kw_args--; }
16178  }
16179  }
16180  if (unlikely(kw_args > 0)) {
16181  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16182  }
16183  } else {
16184  switch (PyTuple_GET_SIZE(__pyx_args)) {
16185  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16186  CYTHON_FALLTHROUGH;
16187  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16188  break;
16189  default: goto __pyx_L5_argtuple_error;
16190  }
16191  }
16192  __pyx_v_obj = values[0];
16193  __pyx_v_i = values[1];
16194  }
16195  goto __pyx_L4_argument_unpacking_done;
16196  __pyx_L5_argtuple_error:;
16197  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16198  __pyx_L3_error:;
16199  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16200  __Pyx_RefNannyFinishContext();
16201  return NULL;
16202  __pyx_L4_argument_unpacking_done:;
16203  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16204 
16205  /* function exit code */
16206  __Pyx_RefNannyFinishContext();
16207  return __pyx_r;
16208  }
16209 
16210  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16211  PyObject *__pyx_r = NULL;
16212  __Pyx_RefNannyDeclarations
16213  PyObject *__pyx_t_1 = NULL;
16214  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16215  __Pyx_RefNannySetupContext("asinh", 0);
16216  __Pyx_XDECREF(__pyx_r);
16217  __pyx_t_2.__pyx_n = 1;
16218  __pyx_t_2.i = __pyx_v_i;
16219  __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)
16220  __Pyx_GOTREF(__pyx_t_1);
16221  __pyx_r = __pyx_t_1;
16222  __pyx_t_1 = 0;
16223  goto __pyx_L0;
16224 
16225  /* function exit code */
16226  __pyx_L1_error:;
16227  __Pyx_XDECREF(__pyx_t_1);
16228  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16229  __pyx_r = NULL;
16230  __pyx_L0:;
16231  __Pyx_XGIVEREF(__pyx_r);
16232  __Pyx_RefNannyFinishContext();
16233  return __pyx_r;
16234  }
16235 
16236  /* "PyClical.pyx":1752
16237  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16238  *
16239  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16240  * """
16241  * Tangent of multivector with optional complexifier.
16242  */
16243 
16244  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16245  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) {
16246  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16247  PyObject *__pyx_r = NULL;
16248  __Pyx_RefNannyDeclarations
16249  int __pyx_t_1;
16250  int __pyx_t_2;
16251  PyObject *__pyx_t_3 = NULL;
16252  Clifford __pyx_t_4;
16253  PyObject *__pyx_t_5 = NULL;
16254  PyObject *__pyx_t_6 = NULL;
16255  PyObject *__pyx_t_7 = NULL;
16256  PyObject *__pyx_t_8 = NULL;
16257  PyObject *__pyx_t_9 = NULL;
16258  PyObject *__pyx_t_10 = NULL;
16259  PyObject *__pyx_t_11 = NULL;
16260  __Pyx_RefNannySetupContext("tan", 0);
16261  if (__pyx_optional_args) {
16262  if (__pyx_optional_args->__pyx_n > 0) {
16263  __pyx_v_i = __pyx_optional_args->i;
16264  }
16265  }
16266 
16267  /* "PyClical.pyx":1761
16268  * 0.7616{1,2}
16269  * """
16270  * if not (i is None): # <<<<<<<<<<<<<<
16271  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16272  * else:
16273  */
16274  __pyx_t_1 = (__pyx_v_i != Py_None);
16275  __pyx_t_2 = (__pyx_t_1 != 0);
16276  if (__pyx_t_2) {
16277 
16278  /* "PyClical.pyx":1762
16279  * """
16280  * if not (i is None):
16281  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16282  * else:
16283  * try:
16284  */
16285  __Pyx_XDECREF(__pyx_r);
16286  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16287  __Pyx_GOTREF(__pyx_t_3);
16288  try {
16289  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16290  } catch(...) {
16291  __Pyx_CppExn2PyErr();
16292  __PYX_ERR(0, 1762, __pyx_L1_error)
16293  }
16294  __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)
16295  __Pyx_GOTREF(__pyx_t_5);
16296  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16297  __pyx_r = __pyx_t_5;
16298  __pyx_t_5 = 0;
16299  goto __pyx_L0;
16300 
16301  /* "PyClical.pyx":1761
16302  * 0.7616{1,2}
16303  * """
16304  * if not (i is None): # <<<<<<<<<<<<<<
16305  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16306  * else:
16307  */
16308  }
16309 
16310  /* "PyClical.pyx":1764
16311  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16312  * else:
16313  * try: # <<<<<<<<<<<<<<
16314  * return math.tan(obj)
16315  * except:
16316  */
16317  /*else*/ {
16318  {
16319  __Pyx_PyThreadState_declare
16320  __Pyx_PyThreadState_assign
16321  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16322  __Pyx_XGOTREF(__pyx_t_6);
16323  __Pyx_XGOTREF(__pyx_t_7);
16324  __Pyx_XGOTREF(__pyx_t_8);
16325  /*try:*/ {
16326 
16327  /* "PyClical.pyx":1765
16328  * else:
16329  * try:
16330  * return math.tan(obj) # <<<<<<<<<<<<<<
16331  * except:
16332  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16333  */
16334  __Pyx_XDECREF(__pyx_r);
16335  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16336  __Pyx_GOTREF(__pyx_t_3);
16337  __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)
16338  __Pyx_GOTREF(__pyx_t_9);
16339  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16340  __pyx_t_3 = NULL;
16341  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16342  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16343  if (likely(__pyx_t_3)) {
16344  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16345  __Pyx_INCREF(__pyx_t_3);
16346  __Pyx_INCREF(function);
16347  __Pyx_DECREF_SET(__pyx_t_9, function);
16348  }
16349  }
16350  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16351  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16352  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16353  __Pyx_GOTREF(__pyx_t_5);
16354  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16355  __pyx_r = __pyx_t_5;
16356  __pyx_t_5 = 0;
16357  goto __pyx_L8_try_return;
16358 
16359  /* "PyClical.pyx":1764
16360  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16361  * else:
16362  * try: # <<<<<<<<<<<<<<
16363  * return math.tan(obj)
16364  * except:
16365  */
16366  }
16367  __pyx_L4_error:;
16368  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16369  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16370  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16371 
16372  /* "PyClical.pyx":1766
16373  * try:
16374  * return math.tan(obj)
16375  * except: # <<<<<<<<<<<<<<
16376  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16377  *
16378  */
16379  /*except:*/ {
16380  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16381  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16382  __Pyx_GOTREF(__pyx_t_5);
16383  __Pyx_GOTREF(__pyx_t_9);
16384  __Pyx_GOTREF(__pyx_t_3);
16385 
16386  /* "PyClical.pyx":1767
16387  * return math.tan(obj)
16388  * except:
16389  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16390  *
16391  * cpdef inline atan(obj,i = None):
16392  */
16393  __Pyx_XDECREF(__pyx_r);
16394  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16395  __Pyx_GOTREF(__pyx_t_10);
16396  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16397  __Pyx_GOTREF(__pyx_t_11);
16398  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16399  __pyx_r = __pyx_t_11;
16400  __pyx_t_11 = 0;
16401  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16402  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16403  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16404  goto __pyx_L7_except_return;
16405  }
16406  __pyx_L6_except_error:;
16407 
16408  /* "PyClical.pyx":1764
16409  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16410  * else:
16411  * try: # <<<<<<<<<<<<<<
16412  * return math.tan(obj)
16413  * except:
16414  */
16415  __Pyx_XGIVEREF(__pyx_t_6);
16416  __Pyx_XGIVEREF(__pyx_t_7);
16417  __Pyx_XGIVEREF(__pyx_t_8);
16418  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16419  goto __pyx_L1_error;
16420  __pyx_L8_try_return:;
16421  __Pyx_XGIVEREF(__pyx_t_6);
16422  __Pyx_XGIVEREF(__pyx_t_7);
16423  __Pyx_XGIVEREF(__pyx_t_8);
16424  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16425  goto __pyx_L0;
16426  __pyx_L7_except_return:;
16427  __Pyx_XGIVEREF(__pyx_t_6);
16428  __Pyx_XGIVEREF(__pyx_t_7);
16429  __Pyx_XGIVEREF(__pyx_t_8);
16430  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16431  goto __pyx_L0;
16432  }
16433  }
16434 
16435  /* "PyClical.pyx":1752
16436  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16437  *
16438  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16439  * """
16440  * Tangent of multivector with optional complexifier.
16441  */
16442 
16443  /* function exit code */
16444  __pyx_L1_error:;
16445  __Pyx_XDECREF(__pyx_t_3);
16446  __Pyx_XDECREF(__pyx_t_5);
16447  __Pyx_XDECREF(__pyx_t_9);
16448  __Pyx_XDECREF(__pyx_t_10);
16449  __Pyx_XDECREF(__pyx_t_11);
16450  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16451  __pyx_r = 0;
16452  __pyx_L0:;
16453  __Pyx_XGIVEREF(__pyx_r);
16454  __Pyx_RefNannyFinishContext();
16455  return __pyx_r;
16456  }
16457 
16458  /* Python wrapper */
16459  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16460  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 ";
16461  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16462  PyObject *__pyx_v_obj = 0;
16463  PyObject *__pyx_v_i = 0;
16464  PyObject *__pyx_r = 0;
16465  __Pyx_RefNannyDeclarations
16466  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16467  {
16468  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16469  PyObject* values[2] = {0,0};
16470  values[1] = ((PyObject *)Py_None);
16471  if (unlikely(__pyx_kwds)) {
16472  Py_ssize_t kw_args;
16473  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16474  switch (pos_args) {
16475  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16476  CYTHON_FALLTHROUGH;
16477  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16478  CYTHON_FALLTHROUGH;
16479  case 0: break;
16480  default: goto __pyx_L5_argtuple_error;
16481  }
16482  kw_args = PyDict_Size(__pyx_kwds);
16483  switch (pos_args) {
16484  case 0:
16485  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16486  else goto __pyx_L5_argtuple_error;
16487  CYTHON_FALLTHROUGH;
16488  case 1:
16489  if (kw_args > 0) {
16490  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16491  if (value) { values[1] = value; kw_args--; }
16492  }
16493  }
16494  if (unlikely(kw_args > 0)) {
16495  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16496  }
16497  } else {
16498  switch (PyTuple_GET_SIZE(__pyx_args)) {
16499  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16500  CYTHON_FALLTHROUGH;
16501  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16502  break;
16503  default: goto __pyx_L5_argtuple_error;
16504  }
16505  }
16506  __pyx_v_obj = values[0];
16507  __pyx_v_i = values[1];
16508  }
16509  goto __pyx_L4_argument_unpacking_done;
16510  __pyx_L5_argtuple_error:;
16511  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16512  __pyx_L3_error:;
16513  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16514  __Pyx_RefNannyFinishContext();
16515  return NULL;
16516  __pyx_L4_argument_unpacking_done:;
16517  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16518 
16519  /* function exit code */
16520  __Pyx_RefNannyFinishContext();
16521  return __pyx_r;
16522  }
16523 
16524  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16525  PyObject *__pyx_r = NULL;
16526  __Pyx_RefNannyDeclarations
16527  PyObject *__pyx_t_1 = NULL;
16528  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16529  __Pyx_RefNannySetupContext("tan", 0);
16530  __Pyx_XDECREF(__pyx_r);
16531  __pyx_t_2.__pyx_n = 1;
16532  __pyx_t_2.i = __pyx_v_i;
16533  __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)
16534  __Pyx_GOTREF(__pyx_t_1);
16535  __pyx_r = __pyx_t_1;
16536  __pyx_t_1 = 0;
16537  goto __pyx_L0;
16538 
16539  /* function exit code */
16540  __pyx_L1_error:;
16541  __Pyx_XDECREF(__pyx_t_1);
16542  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16543  __pyx_r = NULL;
16544  __pyx_L0:;
16545  __Pyx_XGIVEREF(__pyx_r);
16546  __Pyx_RefNannyFinishContext();
16547  return __pyx_r;
16548  }
16549 
16550  /* "PyClical.pyx":1769
16551  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16552  *
16553  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16554  * """
16555  * Inverse tangent of multivector with optional complexifier.
16556  */
16557 
16558  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16559  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) {
16560  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16561  PyObject *__pyx_r = NULL;
16562  __Pyx_RefNannyDeclarations
16563  int __pyx_t_1;
16564  int __pyx_t_2;
16565  PyObject *__pyx_t_3 = NULL;
16566  Clifford __pyx_t_4;
16567  PyObject *__pyx_t_5 = NULL;
16568  PyObject *__pyx_t_6 = NULL;
16569  PyObject *__pyx_t_7 = NULL;
16570  PyObject *__pyx_t_8 = NULL;
16571  PyObject *__pyx_t_9 = NULL;
16572  PyObject *__pyx_t_10 = NULL;
16573  PyObject *__pyx_t_11 = NULL;
16574  __Pyx_RefNannySetupContext("atan", 0);
16575  if (__pyx_optional_args) {
16576  if (__pyx_optional_args->__pyx_n > 0) {
16577  __pyx_v_i = __pyx_optional_args->i;
16578  }
16579  }
16580 
16581  /* "PyClical.pyx":1778
16582  * {1}
16583  * """
16584  * if not (i is None): # <<<<<<<<<<<<<<
16585  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16586  * else:
16587  */
16588  __pyx_t_1 = (__pyx_v_i != Py_None);
16589  __pyx_t_2 = (__pyx_t_1 != 0);
16590  if (__pyx_t_2) {
16591 
16592  /* "PyClical.pyx":1779
16593  * """
16594  * if not (i is None):
16595  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16596  * else:
16597  * try:
16598  */
16599  __Pyx_XDECREF(__pyx_r);
16600  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16601  __Pyx_GOTREF(__pyx_t_3);
16602  try {
16603  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16604  } catch(...) {
16605  __Pyx_CppExn2PyErr();
16606  __PYX_ERR(0, 1779, __pyx_L1_error)
16607  }
16608  __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)
16609  __Pyx_GOTREF(__pyx_t_5);
16610  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16611  __pyx_r = __pyx_t_5;
16612  __pyx_t_5 = 0;
16613  goto __pyx_L0;
16614 
16615  /* "PyClical.pyx":1778
16616  * {1}
16617  * """
16618  * if not (i is None): # <<<<<<<<<<<<<<
16619  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16620  * else:
16621  */
16622  }
16623 
16624  /* "PyClical.pyx":1781
16625  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16626  * else:
16627  * try: # <<<<<<<<<<<<<<
16628  * return math.atan(obj)
16629  * except:
16630  */
16631  /*else*/ {
16632  {
16633  __Pyx_PyThreadState_declare
16634  __Pyx_PyThreadState_assign
16635  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16636  __Pyx_XGOTREF(__pyx_t_6);
16637  __Pyx_XGOTREF(__pyx_t_7);
16638  __Pyx_XGOTREF(__pyx_t_8);
16639  /*try:*/ {
16640 
16641  /* "PyClical.pyx":1782
16642  * else:
16643  * try:
16644  * return math.atan(obj) # <<<<<<<<<<<<<<
16645  * except:
16646  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16647  */
16648  __Pyx_XDECREF(__pyx_r);
16649  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
16650  __Pyx_GOTREF(__pyx_t_3);
16651  __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)
16652  __Pyx_GOTREF(__pyx_t_9);
16653  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16654  __pyx_t_3 = NULL;
16655  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16656  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16657  if (likely(__pyx_t_3)) {
16658  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16659  __Pyx_INCREF(__pyx_t_3);
16660  __Pyx_INCREF(function);
16661  __Pyx_DECREF_SET(__pyx_t_9, function);
16662  }
16663  }
16664  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
16665  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16666  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
16667  __Pyx_GOTREF(__pyx_t_5);
16668  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16669  __pyx_r = __pyx_t_5;
16670  __pyx_t_5 = 0;
16671  goto __pyx_L8_try_return;
16672 
16673  /* "PyClical.pyx":1781
16674  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16675  * else:
16676  * try: # <<<<<<<<<<<<<<
16677  * return math.atan(obj)
16678  * except:
16679  */
16680  }
16681  __pyx_L4_error:;
16682  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16683  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16684  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16685 
16686  /* "PyClical.pyx":1783
16687  * try:
16688  * return math.atan(obj)
16689  * except: # <<<<<<<<<<<<<<
16690  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16691  *
16692  */
16693  /*except:*/ {
16694  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16695  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
16696  __Pyx_GOTREF(__pyx_t_5);
16697  __Pyx_GOTREF(__pyx_t_9);
16698  __Pyx_GOTREF(__pyx_t_3);
16699 
16700  /* "PyClical.pyx":1784
16701  * return math.atan(obj)
16702  * except:
16703  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16704  *
16705  * cpdef inline tanh(obj):
16706  */
16707  __Pyx_XDECREF(__pyx_r);
16708  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16709  __Pyx_GOTREF(__pyx_t_10);
16710  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
16711  __Pyx_GOTREF(__pyx_t_11);
16712  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16713  __pyx_r = __pyx_t_11;
16714  __pyx_t_11 = 0;
16715  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16716  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16717  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16718  goto __pyx_L7_except_return;
16719  }
16720  __pyx_L6_except_error:;
16721 
16722  /* "PyClical.pyx":1781
16723  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16724  * else:
16725  * try: # <<<<<<<<<<<<<<
16726  * return math.atan(obj)
16727  * except:
16728  */
16729  __Pyx_XGIVEREF(__pyx_t_6);
16730  __Pyx_XGIVEREF(__pyx_t_7);
16731  __Pyx_XGIVEREF(__pyx_t_8);
16732  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16733  goto __pyx_L1_error;
16734  __pyx_L8_try_return:;
16735  __Pyx_XGIVEREF(__pyx_t_6);
16736  __Pyx_XGIVEREF(__pyx_t_7);
16737  __Pyx_XGIVEREF(__pyx_t_8);
16738  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16739  goto __pyx_L0;
16740  __pyx_L7_except_return:;
16741  __Pyx_XGIVEREF(__pyx_t_6);
16742  __Pyx_XGIVEREF(__pyx_t_7);
16743  __Pyx_XGIVEREF(__pyx_t_8);
16744  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16745  goto __pyx_L0;
16746  }
16747  }
16748 
16749  /* "PyClical.pyx":1769
16750  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16751  *
16752  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16753  * """
16754  * Inverse tangent of multivector with optional complexifier.
16755  */
16756 
16757  /* function exit code */
16758  __pyx_L1_error:;
16759  __Pyx_XDECREF(__pyx_t_3);
16760  __Pyx_XDECREF(__pyx_t_5);
16761  __Pyx_XDECREF(__pyx_t_9);
16762  __Pyx_XDECREF(__pyx_t_10);
16763  __Pyx_XDECREF(__pyx_t_11);
16764  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16765  __pyx_r = 0;
16766  __pyx_L0:;
16767  __Pyx_XGIVEREF(__pyx_r);
16768  __Pyx_RefNannyFinishContext();
16769  return __pyx_r;
16770  }
16771 
16772  /* Python wrapper */
16773  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16774  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 ";
16775  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16776  PyObject *__pyx_v_obj = 0;
16777  PyObject *__pyx_v_i = 0;
16778  PyObject *__pyx_r = 0;
16779  __Pyx_RefNannyDeclarations
16780  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
16781  {
16782  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16783  PyObject* values[2] = {0,0};
16784  values[1] = ((PyObject *)Py_None);
16785  if (unlikely(__pyx_kwds)) {
16786  Py_ssize_t kw_args;
16787  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16788  switch (pos_args) {
16789  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16790  CYTHON_FALLTHROUGH;
16791  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16792  CYTHON_FALLTHROUGH;
16793  case 0: break;
16794  default: goto __pyx_L5_argtuple_error;
16795  }
16796  kw_args = PyDict_Size(__pyx_kwds);
16797  switch (pos_args) {
16798  case 0:
16799  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16800  else goto __pyx_L5_argtuple_error;
16801  CYTHON_FALLTHROUGH;
16802  case 1:
16803  if (kw_args > 0) {
16804  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16805  if (value) { values[1] = value; kw_args--; }
16806  }
16807  }
16808  if (unlikely(kw_args > 0)) {
16809  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
16810  }
16811  } else {
16812  switch (PyTuple_GET_SIZE(__pyx_args)) {
16813  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16814  CYTHON_FALLTHROUGH;
16815  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16816  break;
16817  default: goto __pyx_L5_argtuple_error;
16818  }
16819  }
16820  __pyx_v_obj = values[0];
16821  __pyx_v_i = values[1];
16822  }
16823  goto __pyx_L4_argument_unpacking_done;
16824  __pyx_L5_argtuple_error:;
16825  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
16826  __pyx_L3_error:;
16827  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16828  __Pyx_RefNannyFinishContext();
16829  return NULL;
16830  __pyx_L4_argument_unpacking_done:;
16831  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16832 
16833  /* function exit code */
16834  __Pyx_RefNannyFinishContext();
16835  return __pyx_r;
16836  }
16837 
16838  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16839  PyObject *__pyx_r = NULL;
16840  __Pyx_RefNannyDeclarations
16841  PyObject *__pyx_t_1 = NULL;
16842  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
16843  __Pyx_RefNannySetupContext("atan", 0);
16844  __Pyx_XDECREF(__pyx_r);
16845  __pyx_t_2.__pyx_n = 1;
16846  __pyx_t_2.i = __pyx_v_i;
16847  __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)
16848  __Pyx_GOTREF(__pyx_t_1);
16849  __pyx_r = __pyx_t_1;
16850  __pyx_t_1 = 0;
16851  goto __pyx_L0;
16852 
16853  /* function exit code */
16854  __pyx_L1_error:;
16855  __Pyx_XDECREF(__pyx_t_1);
16856  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16857  __pyx_r = NULL;
16858  __pyx_L0:;
16859  __Pyx_XGIVEREF(__pyx_r);
16860  __Pyx_RefNannyFinishContext();
16861  return __pyx_r;
16862  }
16863 
16864  /* "PyClical.pyx":1786
16865  * return clifford().wrap( glucat.atan(toClifford(obj)) )
16866  *
16867  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
16868  * """
16869  * Hyperbolic tangent of multivector.
16870  */
16871 
16872  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16873  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16874  PyObject *__pyx_r = NULL;
16875  __Pyx_RefNannyDeclarations
16876  PyObject *__pyx_t_1 = NULL;
16877  PyObject *__pyx_t_2 = NULL;
16878  PyObject *__pyx_t_3 = NULL;
16879  PyObject *__pyx_t_4 = NULL;
16880  PyObject *__pyx_t_5 = NULL;
16881  PyObject *__pyx_t_6 = NULL;
16882  PyObject *__pyx_t_7 = NULL;
16883  PyObject *__pyx_t_8 = NULL;
16884  __Pyx_RefNannySetupContext("tanh", 0);
16885 
16886  /* "PyClical.pyx":1793
16887  * {1,2}
16888  * """
16889  * try: # <<<<<<<<<<<<<<
16890  * return math.tanh(obj)
16891  * except:
16892  */
16893  {
16894  __Pyx_PyThreadState_declare
16895  __Pyx_PyThreadState_assign
16896  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16897  __Pyx_XGOTREF(__pyx_t_1);
16898  __Pyx_XGOTREF(__pyx_t_2);
16899  __Pyx_XGOTREF(__pyx_t_3);
16900  /*try:*/ {
16901 
16902  /* "PyClical.pyx":1794
16903  * """
16904  * try:
16905  * return math.tanh(obj) # <<<<<<<<<<<<<<
16906  * except:
16907  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16908  */
16909  __Pyx_XDECREF(__pyx_r);
16910  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
16911  __Pyx_GOTREF(__pyx_t_5);
16912  __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)
16913  __Pyx_GOTREF(__pyx_t_6);
16914  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16915  __pyx_t_5 = NULL;
16916  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16917  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16918  if (likely(__pyx_t_5)) {
16919  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16920  __Pyx_INCREF(__pyx_t_5);
16921  __Pyx_INCREF(function);
16922  __Pyx_DECREF_SET(__pyx_t_6, function);
16923  }
16924  }
16925  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj);
16926  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16927  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
16928  __Pyx_GOTREF(__pyx_t_4);
16929  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16930  __pyx_r = __pyx_t_4;
16931  __pyx_t_4 = 0;
16932  goto __pyx_L7_try_return;
16933 
16934  /* "PyClical.pyx":1793
16935  * {1,2}
16936  * """
16937  * try: # <<<<<<<<<<<<<<
16938  * return math.tanh(obj)
16939  * except:
16940  */
16941  }
16942  __pyx_L3_error:;
16943  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16944  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16945  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16946 
16947  /* "PyClical.pyx":1795
16948  * try:
16949  * return math.tanh(obj)
16950  * except: # <<<<<<<<<<<<<<
16951  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
16952  *
16953  */
16954  /*except:*/ {
16955  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16956  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
16957  __Pyx_GOTREF(__pyx_t_4);
16958  __Pyx_GOTREF(__pyx_t_6);
16959  __Pyx_GOTREF(__pyx_t_5);
16960 
16961  /* "PyClical.pyx":1796
16962  * return math.tanh(obj)
16963  * except:
16964  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16965  *
16966  * cpdef inline atanh(obj,i = None):
16967  */
16968  __Pyx_XDECREF(__pyx_r);
16969  __pyx_t_7 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16970  __Pyx_GOTREF(__pyx_t_7);
16971  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_7), tanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
16972  __Pyx_GOTREF(__pyx_t_8);
16973  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16974  __pyx_r = __pyx_t_8;
16975  __pyx_t_8 = 0;
16976  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16977  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16978  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16979  goto __pyx_L6_except_return;
16980  }
16981  __pyx_L5_except_error:;
16982 
16983  /* "PyClical.pyx":1793
16984  * {1,2}
16985  * """
16986  * try: # <<<<<<<<<<<<<<
16987  * return math.tanh(obj)
16988  * except:
16989  */
16990  __Pyx_XGIVEREF(__pyx_t_1);
16991  __Pyx_XGIVEREF(__pyx_t_2);
16992  __Pyx_XGIVEREF(__pyx_t_3);
16993  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16994  goto __pyx_L1_error;
16995  __pyx_L7_try_return:;
16996  __Pyx_XGIVEREF(__pyx_t_1);
16997  __Pyx_XGIVEREF(__pyx_t_2);
16998  __Pyx_XGIVEREF(__pyx_t_3);
16999  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17000  goto __pyx_L0;
17001  __pyx_L6_except_return:;
17002  __Pyx_XGIVEREF(__pyx_t_1);
17003  __Pyx_XGIVEREF(__pyx_t_2);
17004  __Pyx_XGIVEREF(__pyx_t_3);
17005  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17006  goto __pyx_L0;
17007  }
17008 
17009  /* "PyClical.pyx":1786
17010  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17011  *
17012  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17013  * """
17014  * Hyperbolic tangent of multivector.
17015  */
17016 
17017  /* function exit code */
17018  __pyx_L1_error:;
17019  __Pyx_XDECREF(__pyx_t_4);
17020  __Pyx_XDECREF(__pyx_t_5);
17021  __Pyx_XDECREF(__pyx_t_6);
17022  __Pyx_XDECREF(__pyx_t_7);
17023  __Pyx_XDECREF(__pyx_t_8);
17024  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17025  __pyx_r = 0;
17026  __pyx_L0:;
17027  __Pyx_XGIVEREF(__pyx_r);
17028  __Pyx_RefNannyFinishContext();
17029  return __pyx_r;
17030  }
17031 
17032  /* Python wrapper */
17033  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17034  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 ";
17035  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17036  PyObject *__pyx_r = 0;
17037  __Pyx_RefNannyDeclarations
17038  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17039  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17040 
17041  /* function exit code */
17042  __Pyx_RefNannyFinishContext();
17043  return __pyx_r;
17044  }
17045 
17046  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17047  PyObject *__pyx_r = NULL;
17048  __Pyx_RefNannyDeclarations
17049  PyObject *__pyx_t_1 = NULL;
17050  __Pyx_RefNannySetupContext("tanh", 0);
17051  __Pyx_XDECREF(__pyx_r);
17052  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17053  __Pyx_GOTREF(__pyx_t_1);
17054  __pyx_r = __pyx_t_1;
17055  __pyx_t_1 = 0;
17056  goto __pyx_L0;
17057 
17058  /* function exit code */
17059  __pyx_L1_error:;
17060  __Pyx_XDECREF(__pyx_t_1);
17061  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17062  __pyx_r = NULL;
17063  __pyx_L0:;
17064  __Pyx_XGIVEREF(__pyx_r);
17065  __Pyx_RefNannyFinishContext();
17066  return __pyx_r;
17067  }
17068 
17069  /* "PyClical.pyx":1798
17070  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17071  *
17072  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17073  * """
17074  * Inverse hyperbolic tangent of multivector with optional complexifier.
17075  */
17076 
17077  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17078  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) {
17079  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17080  PyObject *__pyx_r = NULL;
17081  __Pyx_RefNannyDeclarations
17082  int __pyx_t_1;
17083  int __pyx_t_2;
17084  PyObject *__pyx_t_3 = NULL;
17085  Clifford __pyx_t_4;
17086  PyObject *__pyx_t_5 = NULL;
17087  PyObject *__pyx_t_6 = NULL;
17088  PyObject *__pyx_t_7 = NULL;
17089  PyObject *__pyx_t_8 = NULL;
17090  PyObject *__pyx_t_9 = NULL;
17091  PyObject *__pyx_t_10 = NULL;
17092  PyObject *__pyx_t_11 = NULL;
17093  __Pyx_RefNannySetupContext("atanh", 0);
17094  if (__pyx_optional_args) {
17095  if (__pyx_optional_args->__pyx_n > 0) {
17096  __pyx_v_i = __pyx_optional_args->i;
17097  }
17098  }
17099 
17100  /* "PyClical.pyx":1807
17101  * {1,2}
17102  * """
17103  * if not (i is None): # <<<<<<<<<<<<<<
17104  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17105  * else:
17106  */
17107  __pyx_t_1 = (__pyx_v_i != Py_None);
17108  __pyx_t_2 = (__pyx_t_1 != 0);
17109  if (__pyx_t_2) {
17110 
17111  /* "PyClical.pyx":1808
17112  * """
17113  * if not (i is None):
17114  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17115  * else:
17116  * try:
17117  */
17118  __Pyx_XDECREF(__pyx_r);
17119  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17120  __Pyx_GOTREF(__pyx_t_3);
17121  try {
17122  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17123  } catch(...) {
17124  __Pyx_CppExn2PyErr();
17125  __PYX_ERR(0, 1808, __pyx_L1_error)
17126  }
17127  __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)
17128  __Pyx_GOTREF(__pyx_t_5);
17129  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17130  __pyx_r = __pyx_t_5;
17131  __pyx_t_5 = 0;
17132  goto __pyx_L0;
17133 
17134  /* "PyClical.pyx":1807
17135  * {1,2}
17136  * """
17137  * if not (i is None): # <<<<<<<<<<<<<<
17138  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17139  * else:
17140  */
17141  }
17142 
17143  /* "PyClical.pyx":1810
17144  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17145  * else:
17146  * try: # <<<<<<<<<<<<<<
17147  * return math.atanh(obj)
17148  * except:
17149  */
17150  /*else*/ {
17151  {
17152  __Pyx_PyThreadState_declare
17153  __Pyx_PyThreadState_assign
17154  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17155  __Pyx_XGOTREF(__pyx_t_6);
17156  __Pyx_XGOTREF(__pyx_t_7);
17157  __Pyx_XGOTREF(__pyx_t_8);
17158  /*try:*/ {
17159 
17160  /* "PyClical.pyx":1811
17161  * else:
17162  * try:
17163  * return math.atanh(obj) # <<<<<<<<<<<<<<
17164  * except:
17165  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17166  */
17167  __Pyx_XDECREF(__pyx_r);
17168  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17169  __Pyx_GOTREF(__pyx_t_3);
17170  __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)
17171  __Pyx_GOTREF(__pyx_t_9);
17172  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17173  __pyx_t_3 = NULL;
17174  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17175  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17176  if (likely(__pyx_t_3)) {
17177  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17178  __Pyx_INCREF(__pyx_t_3);
17179  __Pyx_INCREF(function);
17180  __Pyx_DECREF_SET(__pyx_t_9, function);
17181  }
17182  }
17183  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_3, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj);
17184  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17185  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17186  __Pyx_GOTREF(__pyx_t_5);
17187  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17188  __pyx_r = __pyx_t_5;
17189  __pyx_t_5 = 0;
17190  goto __pyx_L8_try_return;
17191 
17192  /* "PyClical.pyx":1810
17193  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17194  * else:
17195  * try: # <<<<<<<<<<<<<<
17196  * return math.atanh(obj)
17197  * except:
17198  */
17199  }
17200  __pyx_L4_error:;
17201  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17202  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17203  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17204 
17205  /* "PyClical.pyx":1812
17206  * try:
17207  * return math.atanh(obj)
17208  * except: # <<<<<<<<<<<<<<
17209  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17210  *
17211  */
17212  /*except:*/ {
17213  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17214  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17215  __Pyx_GOTREF(__pyx_t_5);
17216  __Pyx_GOTREF(__pyx_t_9);
17217  __Pyx_GOTREF(__pyx_t_3);
17218 
17219  /* "PyClical.pyx":1813
17220  * return math.atanh(obj)
17221  * except:
17222  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17223  *
17224  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17225  */
17226  __Pyx_XDECREF(__pyx_r);
17227  __pyx_t_10 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17228  __Pyx_GOTREF(__pyx_t_10);
17229  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_10), atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17230  __Pyx_GOTREF(__pyx_t_11);
17231  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17232  __pyx_r = __pyx_t_11;
17233  __pyx_t_11 = 0;
17234  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17235  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17236  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17237  goto __pyx_L7_except_return;
17238  }
17239  __pyx_L6_except_error:;
17240 
17241  /* "PyClical.pyx":1810
17242  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17243  * else:
17244  * try: # <<<<<<<<<<<<<<
17245  * return math.atanh(obj)
17246  * except:
17247  */
17248  __Pyx_XGIVEREF(__pyx_t_6);
17249  __Pyx_XGIVEREF(__pyx_t_7);
17250  __Pyx_XGIVEREF(__pyx_t_8);
17251  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17252  goto __pyx_L1_error;
17253  __pyx_L8_try_return:;
17254  __Pyx_XGIVEREF(__pyx_t_6);
17255  __Pyx_XGIVEREF(__pyx_t_7);
17256  __Pyx_XGIVEREF(__pyx_t_8);
17257  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17258  goto __pyx_L0;
17259  __pyx_L7_except_return:;
17260  __Pyx_XGIVEREF(__pyx_t_6);
17261  __Pyx_XGIVEREF(__pyx_t_7);
17262  __Pyx_XGIVEREF(__pyx_t_8);
17263  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17264  goto __pyx_L0;
17265  }
17266  }
17267 
17268  /* "PyClical.pyx":1798
17269  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17270  *
17271  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17272  * """
17273  * Inverse hyperbolic tangent of multivector with optional complexifier.
17274  */
17275 
17276  /* function exit code */
17277  __pyx_L1_error:;
17278  __Pyx_XDECREF(__pyx_t_3);
17279  __Pyx_XDECREF(__pyx_t_5);
17280  __Pyx_XDECREF(__pyx_t_9);
17281  __Pyx_XDECREF(__pyx_t_10);
17282  __Pyx_XDECREF(__pyx_t_11);
17283  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17284  __pyx_r = 0;
17285  __pyx_L0:;
17286  __Pyx_XGIVEREF(__pyx_r);
17287  __Pyx_RefNannyFinishContext();
17288  return __pyx_r;
17289  }
17290 
17291  /* Python wrapper */
17292  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17293  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 ";
17294  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17295  PyObject *__pyx_v_obj = 0;
17296  PyObject *__pyx_v_i = 0;
17297  PyObject *__pyx_r = 0;
17298  __Pyx_RefNannyDeclarations
17299  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17300  {
17301  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17302  PyObject* values[2] = {0,0};
17303  values[1] = ((PyObject *)Py_None);
17304  if (unlikely(__pyx_kwds)) {
17305  Py_ssize_t kw_args;
17306  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17307  switch (pos_args) {
17308  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17309  CYTHON_FALLTHROUGH;
17310  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17311  CYTHON_FALLTHROUGH;
17312  case 0: break;
17313  default: goto __pyx_L5_argtuple_error;
17314  }
17315  kw_args = PyDict_Size(__pyx_kwds);
17316  switch (pos_args) {
17317  case 0:
17318  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17319  else goto __pyx_L5_argtuple_error;
17320  CYTHON_FALLTHROUGH;
17321  case 1:
17322  if (kw_args > 0) {
17323  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17324  if (value) { values[1] = value; kw_args--; }
17325  }
17326  }
17327  if (unlikely(kw_args > 0)) {
17328  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17329  }
17330  } else {
17331  switch (PyTuple_GET_SIZE(__pyx_args)) {
17332  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17333  CYTHON_FALLTHROUGH;
17334  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17335  break;
17336  default: goto __pyx_L5_argtuple_error;
17337  }
17338  }
17339  __pyx_v_obj = values[0];
17340  __pyx_v_i = values[1];
17341  }
17342  goto __pyx_L4_argument_unpacking_done;
17343  __pyx_L5_argtuple_error:;
17344  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17345  __pyx_L3_error:;
17346  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17347  __Pyx_RefNannyFinishContext();
17348  return NULL;
17349  __pyx_L4_argument_unpacking_done:;
17350  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17351 
17352  /* function exit code */
17353  __Pyx_RefNannyFinishContext();
17354  return __pyx_r;
17355  }
17356 
17357  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17358  PyObject *__pyx_r = NULL;
17359  __Pyx_RefNannyDeclarations
17360  PyObject *__pyx_t_1 = NULL;
17361  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17362  __Pyx_RefNannySetupContext("atanh", 0);
17363  __Pyx_XDECREF(__pyx_r);
17364  __pyx_t_2.__pyx_n = 1;
17365  __pyx_t_2.i = __pyx_v_i;
17366  __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)
17367  __Pyx_GOTREF(__pyx_t_1);
17368  __pyx_r = __pyx_t_1;
17369  __pyx_t_1 = 0;
17370  goto __pyx_L0;
17371 
17372  /* function exit code */
17373  __pyx_L1_error:;
17374  __Pyx_XDECREF(__pyx_t_1);
17375  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17376  __pyx_r = NULL;
17377  __pyx_L0:;
17378  __Pyx_XGIVEREF(__pyx_r);
17379  __Pyx_RefNannyFinishContext();
17380  return __pyx_r;
17381  }
17382 
17383  /* "PyClical.pyx":1815
17384  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17385  *
17386  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17387  * """
17388  * Random multivector within a frame.
17389  */
17390 
17391  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17392  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) {
17393  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17394  PyObject *__pyx_r = NULL;
17395  __Pyx_RefNannyDeclarations
17396  PyObject *__pyx_t_1 = NULL;
17397  PyObject *__pyx_t_2 = NULL;
17398  scalar_t __pyx_t_3;
17399  PyObject *__pyx_t_4 = NULL;
17400  __Pyx_RefNannySetupContext("random_clifford", 0);
17401  if (__pyx_optional_args) {
17402  if (__pyx_optional_args->__pyx_n > 0) {
17403  __pyx_v_fill = __pyx_optional_args->fill;
17404  }
17405  }
17406 
17407  /* "PyClical.pyx":1822
17408  * {-3,-1,2}
17409  * """
17410  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17411  *
17412  * cpdef inline cga3(obj):
17413  */
17414  __Pyx_XDECREF(__pyx_r);
17415  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17416  __Pyx_GOTREF(__pyx_t_1);
17417  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17418  __Pyx_GOTREF(__pyx_t_2);
17419  __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)
17420  __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)
17421  __Pyx_GOTREF(__pyx_t_4);
17422  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17423  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17424  __pyx_r = __pyx_t_4;
17425  __pyx_t_4 = 0;
17426  goto __pyx_L0;
17427 
17428  /* "PyClical.pyx":1815
17429  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17430  *
17431  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17432  * """
17433  * Random multivector within a frame.
17434  */
17435 
17436  /* function exit code */
17437  __pyx_L1_error:;
17438  __Pyx_XDECREF(__pyx_t_1);
17439  __Pyx_XDECREF(__pyx_t_2);
17440  __Pyx_XDECREF(__pyx_t_4);
17441  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17442  __pyx_r = 0;
17443  __pyx_L0:;
17444  __Pyx_XGIVEREF(__pyx_r);
17445  __Pyx_RefNannyFinishContext();
17446  return __pyx_r;
17447  }
17448 
17449  /* Python wrapper */
17450  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17451  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 ";
17452  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17453  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17454  PyObject *__pyx_v_fill = 0;
17455  PyObject *__pyx_r = 0;
17456  __Pyx_RefNannyDeclarations
17457  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17458  {
17459  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17460  PyObject* values[2] = {0,0};
17461  values[1] = ((PyObject *)__pyx_float_1_0);
17462  if (unlikely(__pyx_kwds)) {
17463  Py_ssize_t kw_args;
17464  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17465  switch (pos_args) {
17466  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17467  CYTHON_FALLTHROUGH;
17468  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17469  CYTHON_FALLTHROUGH;
17470  case 0: break;
17471  default: goto __pyx_L5_argtuple_error;
17472  }
17473  kw_args = PyDict_Size(__pyx_kwds);
17474  switch (pos_args) {
17475  case 0:
17476  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17477  else goto __pyx_L5_argtuple_error;
17478  CYTHON_FALLTHROUGH;
17479  case 1:
17480  if (kw_args > 0) {
17481  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17482  if (value) { values[1] = value; kw_args--; }
17483  }
17484  }
17485  if (unlikely(kw_args > 0)) {
17486  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17487  }
17488  } else {
17489  switch (PyTuple_GET_SIZE(__pyx_args)) {
17490  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17491  CYTHON_FALLTHROUGH;
17492  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17493  break;
17494  default: goto __pyx_L5_argtuple_error;
17495  }
17496  }
17497  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17498  __pyx_v_fill = values[1];
17499  }
17500  goto __pyx_L4_argument_unpacking_done;
17501  __pyx_L5_argtuple_error:;
17502  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17503  __pyx_L3_error:;
17504  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17505  __Pyx_RefNannyFinishContext();
17506  return NULL;
17507  __pyx_L4_argument_unpacking_done:;
17508  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17509  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17510 
17511  /* function exit code */
17512  goto __pyx_L0;
17513  __pyx_L1_error:;
17514  __pyx_r = NULL;
17515  __pyx_L0:;
17516  __Pyx_RefNannyFinishContext();
17517  return __pyx_r;
17518  }
17519 
17520  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) {
17521  PyObject *__pyx_r = NULL;
17522  __Pyx_RefNannyDeclarations
17523  PyObject *__pyx_t_1 = NULL;
17524  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17525  __Pyx_RefNannySetupContext("random_clifford", 0);
17526  __Pyx_XDECREF(__pyx_r);
17527  __pyx_t_2.__pyx_n = 1;
17528  __pyx_t_2.fill = __pyx_v_fill;
17529  __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)
17530  __Pyx_GOTREF(__pyx_t_1);
17531  __pyx_r = __pyx_t_1;
17532  __pyx_t_1 = 0;
17533  goto __pyx_L0;
17534 
17535  /* function exit code */
17536  __pyx_L1_error:;
17537  __Pyx_XDECREF(__pyx_t_1);
17538  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17539  __pyx_r = NULL;
17540  __pyx_L0:;
17541  __Pyx_XGIVEREF(__pyx_r);
17542  __Pyx_RefNannyFinishContext();
17543  return __pyx_r;
17544  }
17545 
17546  /* "PyClical.pyx":1824
17547  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17548  *
17549  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17550  * """
17551  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17552  */
17553 
17554  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17555  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17556  PyObject *__pyx_r = NULL;
17557  __Pyx_RefNannyDeclarations
17558  PyObject *__pyx_t_1 = NULL;
17559  PyObject *__pyx_t_2 = NULL;
17560  __Pyx_RefNannySetupContext("cga3", 0);
17561 
17562  /* "PyClical.pyx":1831
17563  * 87{-1}+4{1}+18{2}+2{3}+85{4}
17564  * """
17565  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17566  *
17567  * cpdef inline cga3std(obj):
17568  */
17569  __Pyx_XDECREF(__pyx_r);
17570  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
17571  __Pyx_GOTREF(__pyx_t_1);
17572  __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)
17573  __Pyx_GOTREF(__pyx_t_2);
17574  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17575  __pyx_r = __pyx_t_2;
17576  __pyx_t_2 = 0;
17577  goto __pyx_L0;
17578 
17579  /* "PyClical.pyx":1824
17580  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
17581  *
17582  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
17583  * """
17584  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
17585  */
17586 
17587  /* function exit code */
17588  __pyx_L1_error:;
17589  __Pyx_XDECREF(__pyx_t_1);
17590  __Pyx_XDECREF(__pyx_t_2);
17591  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17592  __pyx_r = 0;
17593  __pyx_L0:;
17594  __Pyx_XGIVEREF(__pyx_r);
17595  __Pyx_RefNannyFinishContext();
17596  return __pyx_r;
17597  }
17598 
17599  /* Python wrapper */
17600  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17601  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 ";
17602  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17603  PyObject *__pyx_r = 0;
17604  __Pyx_RefNannyDeclarations
17605  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
17606  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
17607 
17608  /* function exit code */
17609  __Pyx_RefNannyFinishContext();
17610  return __pyx_r;
17611  }
17612 
17613  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17614  PyObject *__pyx_r = NULL;
17615  __Pyx_RefNannyDeclarations
17616  PyObject *__pyx_t_1 = NULL;
17617  __Pyx_RefNannySetupContext("cga3", 0);
17618  __Pyx_XDECREF(__pyx_r);
17619  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
17620  __Pyx_GOTREF(__pyx_t_1);
17621  __pyx_r = __pyx_t_1;
17622  __pyx_t_1 = 0;
17623  goto __pyx_L0;
17624 
17625  /* function exit code */
17626  __pyx_L1_error:;
17627  __Pyx_XDECREF(__pyx_t_1);
17628  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17629  __pyx_r = NULL;
17630  __pyx_L0:;
17631  __Pyx_XGIVEREF(__pyx_r);
17632  __Pyx_RefNannyFinishContext();
17633  return __pyx_r;
17634  }
17635 
17636  /* "PyClical.pyx":1833
17637  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17638  *
17639  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17640  * """
17641  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17642  */
17643 
17644  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17645  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17646  PyObject *__pyx_r = NULL;
17647  __Pyx_RefNannyDeclarations
17648  PyObject *__pyx_t_1 = NULL;
17649  PyObject *__pyx_t_2 = NULL;
17650  __Pyx_RefNannySetupContext("cga3std", 0);
17651 
17652  /* "PyClical.pyx":1842
17653  * 0
17654  * """
17655  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
17656  *
17657  * cpdef inline agc3(obj):
17658  */
17659  __Pyx_XDECREF(__pyx_r);
17660  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
17661  __Pyx_GOTREF(__pyx_t_1);
17662  __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)
17663  __Pyx_GOTREF(__pyx_t_2);
17664  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17665  __pyx_r = __pyx_t_2;
17666  __pyx_t_2 = 0;
17667  goto __pyx_L0;
17668 
17669  /* "PyClical.pyx":1833
17670  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
17671  *
17672  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
17673  * """
17674  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
17675  */
17676 
17677  /* function exit code */
17678  __pyx_L1_error:;
17679  __Pyx_XDECREF(__pyx_t_1);
17680  __Pyx_XDECREF(__pyx_t_2);
17681  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17682  __pyx_r = 0;
17683  __pyx_L0:;
17684  __Pyx_XGIVEREF(__pyx_r);
17685  __Pyx_RefNannyFinishContext();
17686  return __pyx_r;
17687  }
17688 
17689  /* Python wrapper */
17690  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17691  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 ";
17692  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17693  PyObject *__pyx_r = 0;
17694  __Pyx_RefNannyDeclarations
17695  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
17696  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
17697 
17698  /* function exit code */
17699  __Pyx_RefNannyFinishContext();
17700  return __pyx_r;
17701  }
17702 
17703  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17704  PyObject *__pyx_r = NULL;
17705  __Pyx_RefNannyDeclarations
17706  PyObject *__pyx_t_1 = NULL;
17707  __Pyx_RefNannySetupContext("cga3std", 0);
17708  __Pyx_XDECREF(__pyx_r);
17709  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
17710  __Pyx_GOTREF(__pyx_t_1);
17711  __pyx_r = __pyx_t_1;
17712  __pyx_t_1 = 0;
17713  goto __pyx_L0;
17714 
17715  /* function exit code */
17716  __pyx_L1_error:;
17717  __Pyx_XDECREF(__pyx_t_1);
17718  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
17719  __pyx_r = NULL;
17720  __pyx_L0:;
17721  __Pyx_XGIVEREF(__pyx_r);
17722  __Pyx_RefNannyFinishContext();
17723  return __pyx_r;
17724  }
17725 
17726  /* "PyClical.pyx":1844
17727  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17728  *
17729  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17730  * """
17731  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17732  */
17733 
17734  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17735  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17736  PyObject *__pyx_r = NULL;
17737  __Pyx_RefNannyDeclarations
17738  PyObject *__pyx_t_1 = NULL;
17739  PyObject *__pyx_t_2 = NULL;
17740  __Pyx_RefNannySetupContext("agc3", 0);
17741 
17742  /* "PyClical.pyx":1853
17743  * 0
17744  * """
17745  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
17746  *
17747  * # Some abbreviations.
17748  */
17749  __Pyx_XDECREF(__pyx_r);
17750  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
17751  __Pyx_GOTREF(__pyx_t_1);
17752  __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)
17753  __Pyx_GOTREF(__pyx_t_2);
17754  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17755  __pyx_r = __pyx_t_2;
17756  __pyx_t_2 = 0;
17757  goto __pyx_L0;
17758 
17759  /* "PyClical.pyx":1844
17760  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
17761  *
17762  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
17763  * """
17764  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
17765  */
17766 
17767  /* function exit code */
17768  __pyx_L1_error:;
17769  __Pyx_XDECREF(__pyx_t_1);
17770  __Pyx_XDECREF(__pyx_t_2);
17771  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17772  __pyx_r = 0;
17773  __pyx_L0:;
17774  __Pyx_XGIVEREF(__pyx_r);
17775  __Pyx_RefNannyFinishContext();
17776  return __pyx_r;
17777  }
17778 
17779  /* Python wrapper */
17780  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17781  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 ";
17782  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17783  PyObject *__pyx_r = 0;
17784  __Pyx_RefNannyDeclarations
17785  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
17786  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
17787 
17788  /* function exit code */
17789  __Pyx_RefNannyFinishContext();
17790  return __pyx_r;
17791  }
17792 
17793  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17794  PyObject *__pyx_r = NULL;
17795  __Pyx_RefNannyDeclarations
17796  PyObject *__pyx_t_1 = NULL;
17797  __Pyx_RefNannySetupContext("agc3", 0);
17798  __Pyx_XDECREF(__pyx_r);
17799  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
17800  __Pyx_GOTREF(__pyx_t_1);
17801  __pyx_r = __pyx_t_1;
17802  __pyx_t_1 = 0;
17803  goto __pyx_L0;
17804 
17805  /* function exit code */
17806  __pyx_L1_error:;
17807  __Pyx_XDECREF(__pyx_t_1);
17808  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
17809  __pyx_r = NULL;
17810  __pyx_L0:;
17811  __Pyx_XGIVEREF(__pyx_r);
17812  __Pyx_RefNannyFinishContext();
17813  return __pyx_r;
17814  }
17815 
17816  /* "PyClical.pyx":1887
17817  * """
17818  *
17819  * def e(obj): # <<<<<<<<<<<<<<
17820  * """
17821  * Abbreviation for clifford(index_set(obj)).
17822  */
17823 
17824  /* Python wrapper */
17825  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17826  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 ";
17827  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
17828  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17829  PyObject *__pyx_r = 0;
17830  __Pyx_RefNannyDeclarations
17831  __Pyx_RefNannySetupContext("e (wrapper)", 0);
17832  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
17833 
17834  /* function exit code */
17835  __Pyx_RefNannyFinishContext();
17836  return __pyx_r;
17837  }
17838 
17839  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17840  PyObject *__pyx_r = NULL;
17841  __Pyx_RefNannyDeclarations
17842  PyObject *__pyx_t_1 = NULL;
17843  PyObject *__pyx_t_2 = NULL;
17844  __Pyx_RefNannySetupContext("e", 0);
17845 
17846  /* "PyClical.pyx":1898
17847  * 1
17848  * """
17849  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
17850  *
17851  * def istpq(p, q):
17852  */
17853  __Pyx_XDECREF(__pyx_r);
17854  __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)
17855  __Pyx_GOTREF(__pyx_t_1);
17856  __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)
17857  __Pyx_GOTREF(__pyx_t_2);
17858  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17859  __pyx_r = __pyx_t_2;
17860  __pyx_t_2 = 0;
17861  goto __pyx_L0;
17862 
17863  /* "PyClical.pyx":1887
17864  * """
17865  *
17866  * def e(obj): # <<<<<<<<<<<<<<
17867  * """
17868  * Abbreviation for clifford(index_set(obj)).
17869  */
17870 
17871  /* function exit code */
17872  __pyx_L1_error:;
17873  __Pyx_XDECREF(__pyx_t_1);
17874  __Pyx_XDECREF(__pyx_t_2);
17875  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
17876  __pyx_r = NULL;
17877  __pyx_L0:;
17878  __Pyx_XGIVEREF(__pyx_r);
17879  __Pyx_RefNannyFinishContext();
17880  return __pyx_r;
17881  }
17882 
17883  /* "PyClical.pyx":1900
17884  * return clifford(index_set(obj))
17885  *
17886  * def istpq(p, q): # <<<<<<<<<<<<<<
17887  * """
17888  * Abbreviation for index_set({-q,...p}).
17889  */
17890 
17891  /* Python wrapper */
17892  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17893  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 ";
17894  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
17895  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17896  PyObject *__pyx_v_p = 0;
17897  PyObject *__pyx_v_q = 0;
17898  PyObject *__pyx_r = 0;
17899  __Pyx_RefNannyDeclarations
17900  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
17901  {
17902  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
17903  PyObject* values[2] = {0,0};
17904  if (unlikely(__pyx_kwds)) {
17905  Py_ssize_t kw_args;
17906  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17907  switch (pos_args) {
17908  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17909  CYTHON_FALLTHROUGH;
17910  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17911  CYTHON_FALLTHROUGH;
17912  case 0: break;
17913  default: goto __pyx_L5_argtuple_error;
17914  }
17915  kw_args = PyDict_Size(__pyx_kwds);
17916  switch (pos_args) {
17917  case 0:
17918  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
17919  else goto __pyx_L5_argtuple_error;
17920  CYTHON_FALLTHROUGH;
17921  case 1:
17922  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
17923  else {
17924  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
17925  }
17926  }
17927  if (unlikely(kw_args > 0)) {
17928  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
17929  }
17930  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
17931  goto __pyx_L5_argtuple_error;
17932  } else {
17933  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17934  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17935  }
17936  __pyx_v_p = values[0];
17937  __pyx_v_q = values[1];
17938  }
17939  goto __pyx_L4_argument_unpacking_done;
17940  __pyx_L5_argtuple_error:;
17941  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
17942  __pyx_L3_error:;
17943  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
17944  __Pyx_RefNannyFinishContext();
17945  return NULL;
17946  __pyx_L4_argument_unpacking_done:;
17947  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
17948 
17949  /* function exit code */
17950  __Pyx_RefNannyFinishContext();
17951  return __pyx_r;
17952  }
17953 
17954  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
17955  PyObject *__pyx_r = NULL;
17956  __Pyx_RefNannyDeclarations
17957  PyObject *__pyx_t_1 = NULL;
17958  PyObject *__pyx_t_2 = NULL;
17959  PyObject *__pyx_t_3 = NULL;
17960  __Pyx_RefNannySetupContext("istpq", 0);
17961 
17962  /* "PyClical.pyx":1907
17963  * {-3,-2,-1,1,2}
17964  * """
17965  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
17966  *
17967  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
17968  */
17969  __Pyx_XDECREF(__pyx_r);
17970  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
17971  __Pyx_GOTREF(__pyx_t_1);
17972  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
17973  __Pyx_GOTREF(__pyx_t_2);
17974  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17975  __Pyx_GOTREF(__pyx_t_3);
17976  __Pyx_GIVEREF(__pyx_t_1);
17977  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
17978  __Pyx_GIVEREF(__pyx_t_2);
17979  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
17980  __pyx_t_1 = 0;
17981  __pyx_t_2 = 0;
17982  __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)
17983  __Pyx_GOTREF(__pyx_t_2);
17984  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17985  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
17986  __Pyx_GOTREF(__pyx_t_3);
17987  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17988  __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)
17989  __Pyx_GOTREF(__pyx_t_2);
17990  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17991  __pyx_r = __pyx_t_2;
17992  __pyx_t_2 = 0;
17993  goto __pyx_L0;
17994 
17995  /* "PyClical.pyx":1900
17996  * return clifford(index_set(obj))
17997  *
17998  * def istpq(p, q): # <<<<<<<<<<<<<<
17999  * """
18000  * Abbreviation for index_set({-q,...p}).
18001  */
18002 
18003  /* function exit code */
18004  __pyx_L1_error:;
18005  __Pyx_XDECREF(__pyx_t_1);
18006  __Pyx_XDECREF(__pyx_t_2);
18007  __Pyx_XDECREF(__pyx_t_3);
18008  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18009  __pyx_r = NULL;
18010  __pyx_L0:;
18011  __Pyx_XGIVEREF(__pyx_r);
18012  __Pyx_RefNannyFinishContext();
18013  return __pyx_r;
18014  }
18015 
18016  /* "PyClical.pyx":1913
18017  *
18018  * # Doctest interface.
18019  * def _test(): # <<<<<<<<<<<<<<
18020  * import PyClical, doctest
18021  * return doctest.testmod(PyClical)
18022  */
18023 
18024  /* Python wrapper */
18025  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18026  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18027  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18028  PyObject *__pyx_r = 0;
18029  __Pyx_RefNannyDeclarations
18030  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18031  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18032 
18033  /* function exit code */
18034  __Pyx_RefNannyFinishContext();
18035  return __pyx_r;
18036  }
18037 
18038  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18039  PyObject *__pyx_v_PyClical = NULL;
18040  PyObject *__pyx_v_doctest = NULL;
18041  PyObject *__pyx_r = NULL;
18042  __Pyx_RefNannyDeclarations
18043  PyObject *__pyx_t_1 = NULL;
18044  PyObject *__pyx_t_2 = NULL;
18045  PyObject *__pyx_t_3 = NULL;
18046  __Pyx_RefNannySetupContext("_test", 0);
18047 
18048  /* "PyClical.pyx":1914
18049  * # Doctest interface.
18050  * def _test():
18051  * import PyClical, doctest # <<<<<<<<<<<<<<
18052  * return doctest.testmod(PyClical)
18053  *
18054  */
18055  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18056  __Pyx_GOTREF(__pyx_t_1);
18057  __pyx_v_PyClical = __pyx_t_1;
18058  __pyx_t_1 = 0;
18059  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18060  __Pyx_GOTREF(__pyx_t_1);
18061  __pyx_v_doctest = __pyx_t_1;
18062  __pyx_t_1 = 0;
18063 
18064  /* "PyClical.pyx":1915
18065  * def _test():
18066  * import PyClical, doctest
18067  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18068  *
18069  * if __name__ == "__main__":
18070  */
18071  __Pyx_XDECREF(__pyx_r);
18072  __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)
18073  __Pyx_GOTREF(__pyx_t_2);
18074  __pyx_t_3 = NULL;
18075  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18076  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18077  if (likely(__pyx_t_3)) {
18078  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18079  __Pyx_INCREF(__pyx_t_3);
18080  __Pyx_INCREF(function);
18081  __Pyx_DECREF_SET(__pyx_t_2, function);
18082  }
18083  }
18084  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_PyClical) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical);
18085  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18086  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18087  __Pyx_GOTREF(__pyx_t_1);
18088  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18089  __pyx_r = __pyx_t_1;
18090  __pyx_t_1 = 0;
18091  goto __pyx_L0;
18092 
18093  /* "PyClical.pyx":1913
18094  *
18095  * # Doctest interface.
18096  * def _test(): # <<<<<<<<<<<<<<
18097  * import PyClical, doctest
18098  * return doctest.testmod(PyClical)
18099  */
18100 
18101  /* function exit code */
18102  __pyx_L1_error:;
18103  __Pyx_XDECREF(__pyx_t_1);
18104  __Pyx_XDECREF(__pyx_t_2);
18105  __Pyx_XDECREF(__pyx_t_3);
18106  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18107  __pyx_r = NULL;
18108  __pyx_L0:;
18109  __Pyx_XDECREF(__pyx_v_PyClical);
18110  __Pyx_XDECREF(__pyx_v_doctest);
18111  __Pyx_XGIVEREF(__pyx_r);
18112  __Pyx_RefNannyFinishContext();
18113  return __pyx_r;
18114  }
18115  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18116 
18117  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18118  struct __pyx_obj_8PyClical_index_set *p;
18119  PyObject *o;
18120  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18121  o = (*t->tp_alloc)(t, 0);
18122  } else {
18123  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18124  }
18125  if (unlikely(!o)) return 0;
18126  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18127  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18128  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18129  return o;
18130  bad:
18131  Py_DECREF(o); o = 0;
18132  return NULL;
18133  }
18134 
18135  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18136  #if CYTHON_USE_TP_FINALIZE
18137  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))) {
18138  if (PyObject_CallFinalizerFromDealloc(o)) return;
18139  }
18140  #endif
18141  {
18142  PyObject *etype, *eval, *etb;
18143  PyErr_Fetch(&etype, &eval, &etb);
18144  ++Py_REFCNT(o);
18145  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18146  --Py_REFCNT(o);
18147  PyErr_Restore(etype, eval, etb);
18148  }
18149  (*Py_TYPE(o)->tp_free)(o);
18150  }
18151  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18152  PyObject *r;
18153  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18154  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18155  Py_DECREF(x);
18156  return r;
18157  }
18158 
18159  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18160  if (v) {
18161  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18162  }
18163  else {
18164  PyErr_Format(PyExc_NotImplementedError,
18165  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18166  return -1;
18167  }
18168  }
18169 
18170  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18171  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18172  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18173  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18174  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18175  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18176  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18177  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18178  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18179  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18180  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18181  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18182  {0, 0, 0, 0}
18183  };
18184 
18185  static PyNumberMethods __pyx_tp_as_number_index_set = {
18186  0, /*nb_add*/
18187  0, /*nb_subtract*/
18188  0, /*nb_multiply*/
18189  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18190  0, /*nb_divide*/
18191  #endif
18192  0, /*nb_remainder*/
18193  0, /*nb_divmod*/
18194  0, /*nb_power*/
18195  0, /*nb_negative*/
18196  0, /*nb_positive*/
18197  0, /*nb_absolute*/
18198  0, /*nb_nonzero*/
18199  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18200  0, /*nb_lshift*/
18201  0, /*nb_rshift*/
18202  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18203  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18204  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18205  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18206  0, /*nb_coerce*/
18207  #endif
18208  0, /*nb_int*/
18209  #if PY_MAJOR_VERSION < 3
18210  0, /*nb_long*/
18211  #else
18212  0, /*reserved*/
18213  #endif
18214  0, /*nb_float*/
18215  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18216  0, /*nb_oct*/
18217  #endif
18218  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18219  0, /*nb_hex*/
18220  #endif
18221  0, /*nb_inplace_add*/
18222  0, /*nb_inplace_subtract*/
18223  0, /*nb_inplace_multiply*/
18224  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18225  0, /*nb_inplace_divide*/
18226  #endif
18227  0, /*nb_inplace_remainder*/
18228  0, /*nb_inplace_power*/
18229  0, /*nb_inplace_lshift*/
18230  0, /*nb_inplace_rshift*/
18231  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18232  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18233  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18234  0, /*nb_floor_divide*/
18235  0, /*nb_true_divide*/
18236  0, /*nb_inplace_floor_divide*/
18237  0, /*nb_inplace_true_divide*/
18238  0, /*nb_index*/
18239  #if PY_VERSION_HEX >= 0x03050000
18240  0, /*nb_matrix_multiply*/
18241  #endif
18242  #if PY_VERSION_HEX >= 0x03050000
18243  0, /*nb_inplace_matrix_multiply*/
18244  #endif
18245  };
18246 
18247  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18248  0, /*sq_length*/
18249  0, /*sq_concat*/
18250  0, /*sq_repeat*/
18251  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18252  0, /*sq_slice*/
18253  0, /*sq_ass_item*/
18254  0, /*sq_ass_slice*/
18255  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18256  0, /*sq_inplace_concat*/
18257  0, /*sq_inplace_repeat*/
18258  };
18259 
18260  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18261  0, /*mp_length*/
18262  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18263  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18264  };
18265 
18266  static PyTypeObject __pyx_type_8PyClical_index_set = {
18267  PyVarObject_HEAD_INIT(0, 0)
18268  "PyClical.index_set", /*tp_name*/
18269  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18270  0, /*tp_itemsize*/
18271  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18272  #if PY_VERSION_HEX < 0x030800b4
18273  0, /*tp_print*/
18274  #endif
18275  #if PY_VERSION_HEX >= 0x030800b4
18276  0, /*tp_vectorcall_offset*/
18277  #endif
18278  0, /*tp_getattr*/
18279  0, /*tp_setattr*/
18280  #if PY_MAJOR_VERSION < 3
18281  0, /*tp_compare*/
18282  #endif
18283  #if PY_MAJOR_VERSION >= 3
18284  0, /*tp_as_async*/
18285  #endif
18286  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18287  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18288  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18289  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18290  0, /*tp_hash*/
18291  0, /*tp_call*/
18292  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18293  0, /*tp_getattro*/
18294  0, /*tp_setattro*/
18295  0, /*tp_as_buffer*/
18296  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18297  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18298  0, /*tp_traverse*/
18299  0, /*tp_clear*/
18300  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18301  0, /*tp_weaklistoffset*/
18302  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18303  0, /*tp_iternext*/
18304  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18305  0, /*tp_members*/
18306  0, /*tp_getset*/
18307  0, /*tp_base*/
18308  0, /*tp_dict*/
18309  0, /*tp_descr_get*/
18310  0, /*tp_descr_set*/
18311  0, /*tp_dictoffset*/
18312  0, /*tp_init*/
18313  0, /*tp_alloc*/
18314  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18315  0, /*tp_free*/
18316  0, /*tp_is_gc*/
18317  0, /*tp_bases*/
18318  0, /*tp_mro*/
18319  0, /*tp_cache*/
18320  0, /*tp_subclasses*/
18321  0, /*tp_weaklist*/
18322  0, /*tp_del*/
18323  0, /*tp_version_tag*/
18324  #if PY_VERSION_HEX >= 0x030400a1
18325  0, /*tp_finalize*/
18326  #endif
18327  #if PY_VERSION_HEX >= 0x030800b1
18328  0, /*tp_vectorcall*/
18329  #endif
18330  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18331  0, /*tp_print*/
18332  #endif
18333  };
18334  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18335 
18336  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18337  struct __pyx_obj_8PyClical_clifford *p;
18338  PyObject *o;
18339  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18340  o = (*t->tp_alloc)(t, 0);
18341  } else {
18342  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18343  }
18344  if (unlikely(!o)) return 0;
18345  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18346  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18347  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18348  return o;
18349  bad:
18350  Py_DECREF(o); o = 0;
18351  return NULL;
18352  }
18353 
18354  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18355  #if CYTHON_USE_TP_FINALIZE
18356  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))) {
18357  if (PyObject_CallFinalizerFromDealloc(o)) return;
18358  }
18359  #endif
18360  {
18361  PyObject *etype, *eval, *etb;
18362  PyErr_Fetch(&etype, &eval, &etb);
18363  ++Py_REFCNT(o);
18364  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18365  --Py_REFCNT(o);
18366  PyErr_Restore(etype, eval, etb);
18367  }
18368  (*Py_TYPE(o)->tp_free)(o);
18369  }
18370  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18371  PyObject *r;
18372  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18373  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18374  Py_DECREF(x);
18375  return r;
18376  }
18377 
18378  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18379  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18380  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18381  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18382  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18383  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18384  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18385  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18386  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18387  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18388  {"vector_part", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18389  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18390  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18391  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18392  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18393  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18394  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18395  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18396  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18397  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18398  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18399  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18400  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18401  {0, 0, 0, 0}
18402  };
18403 
18404  static PyNumberMethods __pyx_tp_as_number_clifford = {
18405  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18406  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18407  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18408  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18409  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18410  #endif
18411  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18412  0, /*nb_divmod*/
18413  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18414  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18415  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18416  0, /*nb_absolute*/
18417  0, /*nb_nonzero*/
18418  0, /*nb_invert*/
18419  0, /*nb_lshift*/
18420  0, /*nb_rshift*/
18421  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18422  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18423  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18424  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18425  0, /*nb_coerce*/
18426  #endif
18427  0, /*nb_int*/
18428  #if PY_MAJOR_VERSION < 3
18429  0, /*nb_long*/
18430  #else
18431  0, /*reserved*/
18432  #endif
18433  0, /*nb_float*/
18434  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18435  0, /*nb_oct*/
18436  #endif
18437  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18438  0, /*nb_hex*/
18439  #endif
18440  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18441  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18442  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18443  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18444  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18445  #endif
18446  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18447  0, /*nb_inplace_power*/
18448  0, /*nb_inplace_lshift*/
18449  0, /*nb_inplace_rshift*/
18450  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18451  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18452  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18453  0, /*nb_floor_divide*/
18454  0, /*nb_true_divide*/
18455  0, /*nb_inplace_floor_divide*/
18456  0, /*nb_inplace_true_divide*/
18457  0, /*nb_index*/
18458  #if PY_VERSION_HEX >= 0x03050000
18459  0, /*nb_matrix_multiply*/
18460  #endif
18461  #if PY_VERSION_HEX >= 0x03050000
18462  0, /*nb_inplace_matrix_multiply*/
18463  #endif
18464  };
18465 
18466  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18467  0, /*sq_length*/
18468  0, /*sq_concat*/
18469  0, /*sq_repeat*/
18470  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18471  0, /*sq_slice*/
18472  0, /*sq_ass_item*/
18473  0, /*sq_ass_slice*/
18474  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18475  0, /*sq_inplace_concat*/
18476  0, /*sq_inplace_repeat*/
18477  };
18478 
18479  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18480  0, /*mp_length*/
18481  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18482  0, /*mp_ass_subscript*/
18483  };
18484 
18485  static PyTypeObject __pyx_type_8PyClical_clifford = {
18486  PyVarObject_HEAD_INIT(0, 0)
18487  "PyClical.clifford", /*tp_name*/
18488  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18489  0, /*tp_itemsize*/
18490  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18491  #if PY_VERSION_HEX < 0x030800b4
18492  0, /*tp_print*/
18493  #endif
18494  #if PY_VERSION_HEX >= 0x030800b4
18495  0, /*tp_vectorcall_offset*/
18496  #endif
18497  0, /*tp_getattr*/
18498  0, /*tp_setattr*/
18499  #if PY_MAJOR_VERSION < 3
18500  0, /*tp_compare*/
18501  #endif
18502  #if PY_MAJOR_VERSION >= 3
18503  0, /*tp_as_async*/
18504  #endif
18505  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18506  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18507  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18508  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18509  0, /*tp_hash*/
18510  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18511  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18512  0, /*tp_getattro*/
18513  0, /*tp_setattro*/
18514  0, /*tp_as_buffer*/
18515  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18516  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18517  0, /*tp_traverse*/
18518  0, /*tp_clear*/
18519  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18520  0, /*tp_weaklistoffset*/
18521  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18522  0, /*tp_iternext*/
18523  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18524  0, /*tp_members*/
18525  0, /*tp_getset*/
18526  0, /*tp_base*/
18527  0, /*tp_dict*/
18528  0, /*tp_descr_get*/
18529  0, /*tp_descr_set*/
18530  0, /*tp_dictoffset*/
18531  0, /*tp_init*/
18532  0, /*tp_alloc*/
18533  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
18534  0, /*tp_free*/
18535  0, /*tp_is_gc*/
18536  0, /*tp_bases*/
18537  0, /*tp_mro*/
18538  0, /*tp_cache*/
18539  0, /*tp_subclasses*/
18540  0, /*tp_weaklist*/
18541  0, /*tp_del*/
18542  0, /*tp_version_tag*/
18543  #if PY_VERSION_HEX >= 0x030400a1
18544  0, /*tp_finalize*/
18545  #endif
18546  #if PY_VERSION_HEX >= 0x030800b1
18547  0, /*tp_vectorcall*/
18548  #endif
18549  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18550  0, /*tp_print*/
18551  #endif
18552  };
18553 
18554  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
18555  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
18556 
18557  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
18558  PyObject *o;
18559  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__)))) {
18560  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
18561  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
18562  (void) PyObject_INIT(o, t);
18563  PyObject_GC_Track(o);
18564  } else {
18565  o = (*t->tp_alloc)(t, 0);
18566  if (unlikely(!o)) return 0;
18567  }
18568  return o;
18569  }
18570 
18571  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
18572  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18573  PyObject_GC_UnTrack(o);
18574  Py_CLEAR(p->__pyx_v_idx);
18575  Py_CLEAR(p->__pyx_v_self);
18576  Py_CLEAR(p->__pyx_t_0);
18577  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__)))) {
18578  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
18579  } else {
18580  (*Py_TYPE(o)->tp_free)(o);
18581  }
18582  }
18583 
18584  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
18585  int e;
18586  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
18587  if (p->__pyx_v_idx) {
18588  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
18589  }
18590  if (p->__pyx_v_self) {
18591  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
18592  }
18593  if (p->__pyx_t_0) {
18594  e = (*v)(p->__pyx_t_0, a); if (e) return e;
18595  }
18596  return 0;
18597  }
18598 
18599  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
18600  PyVarObject_HEAD_INIT(0, 0)
18601  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
18602  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
18603  0, /*tp_itemsize*/
18604  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
18605  #if PY_VERSION_HEX < 0x030800b4
18606  0, /*tp_print*/
18607  #endif
18608  #if PY_VERSION_HEX >= 0x030800b4
18609  0, /*tp_vectorcall_offset*/
18610  #endif
18611  0, /*tp_getattr*/
18612  0, /*tp_setattr*/
18613  #if PY_MAJOR_VERSION < 3
18614  0, /*tp_compare*/
18615  #endif
18616  #if PY_MAJOR_VERSION >= 3
18617  0, /*tp_as_async*/
18618  #endif
18619  0, /*tp_repr*/
18620  0, /*tp_as_number*/
18621  0, /*tp_as_sequence*/
18622  0, /*tp_as_mapping*/
18623  0, /*tp_hash*/
18624  0, /*tp_call*/
18625  0, /*tp_str*/
18626  0, /*tp_getattro*/
18627  0, /*tp_setattro*/
18628  0, /*tp_as_buffer*/
18629  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
18630  0, /*tp_doc*/
18631  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
18632  0, /*tp_clear*/
18633  0, /*tp_richcompare*/
18634  0, /*tp_weaklistoffset*/
18635  0, /*tp_iter*/
18636  0, /*tp_iternext*/
18637  0, /*tp_methods*/
18638  0, /*tp_members*/
18639  0, /*tp_getset*/
18640  0, /*tp_base*/
18641  0, /*tp_dict*/
18642  0, /*tp_descr_get*/
18643  0, /*tp_descr_set*/
18644  0, /*tp_dictoffset*/
18645  0, /*tp_init*/
18646  0, /*tp_alloc*/
18647  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
18648  0, /*tp_free*/
18649  0, /*tp_is_gc*/
18650  0, /*tp_bases*/
18651  0, /*tp_mro*/
18652  0, /*tp_cache*/
18653  0, /*tp_subclasses*/
18654  0, /*tp_weaklist*/
18655  0, /*tp_del*/
18656  0, /*tp_version_tag*/
18657  #if PY_VERSION_HEX >= 0x030400a1
18658  0, /*tp_finalize*/
18659  #endif
18660  #if PY_VERSION_HEX >= 0x030800b1
18661  0, /*tp_vectorcall*/
18662  #endif
18663  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
18664  0, /*tp_print*/
18665  #endif
18666  };
18667 
18668  static PyMethodDef __pyx_methods[] = {
18669  {"compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
18670  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
18671  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
18672  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
18673  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
18674  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
18675  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
18676  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
18677  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
18678  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
18679  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
18680  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
18681  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
18682  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
18683  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
18684  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
18685  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
18686  {"pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
18687  {"outer_pow", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
18688  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
18689  {"sqrt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
18690  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
18691  {"log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
18692  {"cos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
18693  {"acos", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
18694  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
18695  {"acosh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
18696  {"sin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
18697  {"asin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
18698  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
18699  {"asinh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
18700  {"tan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
18701  {"atan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
18702  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
18703  {"atanh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
18704  {"random_clifford", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
18705  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
18706  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
18707  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
18708  {0, 0, 0, 0}
18709  };
18710 
18711  #if PY_MAJOR_VERSION >= 3
18712  #if CYTHON_PEP489_MULTI_PHASE_INIT
18713  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
18714  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
18715  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
18716  {Py_mod_create, (void*)__pyx_pymod_create},
18717  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
18718  {0, NULL}
18719  };
18720  #endif
18721 
18722  static struct PyModuleDef __pyx_moduledef = {
18723  PyModuleDef_HEAD_INIT,
18724  "PyClical",
18725  0, /* m_doc */
18726  #if CYTHON_PEP489_MULTI_PHASE_INIT
18727  0, /* m_size */
18728  #else
18729  -1, /* m_size */
18730  #endif
18731  __pyx_methods /* m_methods */,
18732  #if CYTHON_PEP489_MULTI_PHASE_INIT
18733  __pyx_moduledef_slots, /* m_slots */
18734  #else
18735  NULL, /* m_reload */
18736  #endif
18737  NULL, /* m_traverse */
18738  NULL, /* m_clear */
18739  NULL /* m_free */
18740  };
18741  #endif
18742  #ifndef CYTHON_SMALL_CODE
18743 #if defined(__clang__)
18744  #define CYTHON_SMALL_CODE
18745 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
18746  #define CYTHON_SMALL_CODE __attribute__((cold))
18747 #else
18748  #define CYTHON_SMALL_CODE
18749 #endif
18750 #endif
18751 
18752 static __Pyx_StringTabEntry __pyx_string_tab[] = {
18753  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
18754  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
18755  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
18756  {&__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},
18757  {&__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},
18758  {&__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},
18759  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
18760  {&__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},
18761  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
18762  {&__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},
18763  {&__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},
18764  {&__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},
18765  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
18766  {&__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},
18767  {&__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},
18768  {&__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},
18769  {&__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},
18770  {&__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},
18771  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
18772  {&__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},
18773  {&__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},
18774  {&__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},
18775  {&__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},
18776  {&__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},
18777  {&__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},
18778  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
18779  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
18780  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
18781  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
18782  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
18783  {&__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},
18784  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
18785  {&__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},
18786  {&__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},
18787  {&__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},
18788  {&__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},
18789  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
18790  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
18791  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
18792  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
18793  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
18794  {&__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},
18795  {&__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},
18796  {&__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},
18797  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
18798  {&__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},
18799  {&__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},
18800  {&__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},
18801  {&__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},
18802  {&__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},
18803  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
18804  {&__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},
18805  {&__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},
18806  {&__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},
18807  {&__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},
18808  {&__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},
18809  {&__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},
18810  {&__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},
18811  {&__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},
18812  {&__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},
18813  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
18814  {&__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},
18815  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
18816  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
18817  {&__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},
18818  {&__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},
18819  {&__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},
18820  {&__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},
18821  {&__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},
18822  {&__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},
18823  {&__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},
18824  {&__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},
18825  {&__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},
18826  {&__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},
18827  {&__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},
18828  {&__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},
18829  {&__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},
18830  {&__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},
18831  {&__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},
18832  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
18833  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
18834  {&__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},
18835  {&__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},
18836  {&__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},
18837  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
18838  {&__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},
18839  {&__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},
18840  {&__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},
18841  {&__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},
18842  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
18843  {&__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},
18844  {&__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},
18845  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
18846  {&__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},
18847  {&__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},
18848  {&__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},
18849  {&__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},
18850  {&__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},
18851  {&__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},
18852  {&__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},
18853  {&__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},
18854  {&__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},
18855  {&__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},
18856  {&__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},
18857  {&__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},
18858  {&__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},
18859  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
18860  {&__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},
18861  {&__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},
18862  {&__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},
18863  {&__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},
18864  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
18865  {&__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},
18866  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
18867  {&__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},
18868  {&__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},
18869  {&__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},
18870  {&__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},
18871  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
18872  {&__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},
18873  {&__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},
18874  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
18875  {&__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},
18876  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
18877  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
18878  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
18879  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
18880  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
18881  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
18882  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
18883  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
18884  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
18885  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
18886  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
18887  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
18888  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
18889  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
18890  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
18891  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
18892  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
18893  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
18894  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
18895  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
18896  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
18897  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
18898  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
18899  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
18900  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
18901  {&__pyx_n_s_clifford, __pyx_k_clifford, sizeof(__pyx_k_clifford), 0, 0, 1, 1},
18902  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
18903  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
18904  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
18905  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
18906  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
18907  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
18908  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
18909  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
18910  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
18911  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
18912  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
18913  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
18914  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
18915  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
18916  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
18917  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
18918  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
18919  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
18920  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
18921  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
18922  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
18923  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
18924  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
18925  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
18926  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
18927  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
18928  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
18929  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
18930  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
18931  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
18932  {&__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},
18933  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
18934  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
18935  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
18936  {&__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},
18937  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
18938  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
18939  {&__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},
18940  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
18941  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
18942  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
18943  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
18944  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
18945  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
18946  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
18947  {&__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},
18948  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
18949  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
18950  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
18951  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
18952  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
18953  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
18954  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
18955  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
18956  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
18957  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
18958  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
18959  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
18960  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
18961  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
18962  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
18963  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
18964  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
18965  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
18966  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
18967  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
18968  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
18969  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
18970  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
18971  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
18972  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
18973  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
18974  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
18975  {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
18976  {&__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},
18977  {&__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},
18978  {&__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},
18979  {&__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},
18980  {&__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},
18981  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
18982  {&__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},
18983  {&__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},
18984  {&__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},
18985  {&__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},
18986  {&__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},
18987  {&__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},
18988  {&__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},
18989  {&__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},
18990  {&__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},
18991  {&__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},
18992  {&__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},
18993  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
18994  {&__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},
18995  {&__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},
18996  {&__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},
18997  {&__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},
18998  {&__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},
18999  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19000  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19001  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19002  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19003  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19004  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19005  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19006  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19007  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19008  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19009  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19010  {&__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},
19011  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19012  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19013  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19014  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19015  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19016  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19017  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19018  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19019  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19020  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19021  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19022  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19023  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19024  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19025  {&__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},
19026  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19027  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19028  {&__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},
19029  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19030  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19031  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19032  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19033  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19034  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19035  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19036  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19037  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19038  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19039  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19040  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19041  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19042  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19043  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19044  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19045  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19046  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19047  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19048  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19049  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19050  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19051  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19052  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19053  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19054  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19055  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19056  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19057  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19058  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19059  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19060  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19061  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19062  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19063  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19064  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19065  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19066  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19067  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19068  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19069  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19070  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19071  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19072  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19073  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19074  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19075  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19076  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19077  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19078  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19079  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19080  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19081  {0, 0, 0, 0, 0, 0, 0}
19082 };
19083 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
19084  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19085  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19086  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19087  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19088  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19089  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19090  #if PY_MAJOR_VERSION >= 3
19091  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19092  #else
19093  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19094  #endif
19095  return 0;
19096  __pyx_L1_error:;
19097  return -1;
19098 }
19099 
19100 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
19101  __Pyx_RefNannyDeclarations
19102  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19103 
19104  /* "(tree fragment)":2
19105  * def __reduce_cython__(self):
19106  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19107  * def __setstate_cython__(self, __pyx_state):
19108  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19109  */
19110  __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)
19111  __Pyx_GOTREF(__pyx_tuple__3);
19112  __Pyx_GIVEREF(__pyx_tuple__3);
19113 
19114  /* "(tree fragment)":4
19115  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19116  * def __setstate_cython__(self, __pyx_state):
19117  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19118  */
19119  __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)
19120  __Pyx_GOTREF(__pyx_tuple__4);
19121  __Pyx_GIVEREF(__pyx_tuple__4);
19122 
19123  /* "PyClical.pyx":635
19124  * TypeError: Not applicable.
19125  * """
19126  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19127  *
19128  * def __iter__(self):
19129  */
19130  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19131  __Pyx_GOTREF(__pyx_tuple__10);
19132  __Pyx_GIVEREF(__pyx_tuple__10);
19133 
19134  /* "(tree fragment)":2
19135  * def __reduce_cython__(self):
19136  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19137  * def __setstate_cython__(self, __pyx_state):
19138  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19139  */
19140  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
19141  __Pyx_GOTREF(__pyx_tuple__11);
19142  __Pyx_GIVEREF(__pyx_tuple__11);
19143 
19144  /* "(tree fragment)":4
19145  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19146  * def __setstate_cython__(self, __pyx_state):
19147  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19148  */
19149  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
19150  __Pyx_GOTREF(__pyx_tuple__12);
19151  __Pyx_GIVEREF(__pyx_tuple__12);
19152 
19153  /* "PyClical.pyx":404
19154  * return index_set_to_str( self.unwrap() ).c_str()
19155  *
19156  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19157  * """
19158  * Tests for functions that Doctest cannot see.
19159  */
19160  __pyx_codeobj__13 = (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__13)) __PYX_ERR(0, 404, __pyx_L1_error)
19161 
19162  /* "PyClical.pyx":1243
19163  * return clifford_to_str( self.unwrap() ).c_str()
19164  *
19165  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19166  * """
19167  * Tests for functions that Doctest cannot see.
19168  */
19169  __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_clifford_hidden_doctests, 1243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 1243, __pyx_L1_error)
19170 
19171  /* "PyClical.pyx":1856
19172  *
19173  * # Some abbreviations.
19174  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19175  * pi = tau / 2.0
19176  *
19177  */
19178  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1856, __pyx_L1_error)
19179  __Pyx_GOTREF(__pyx_tuple__15);
19180  __Pyx_GIVEREF(__pyx_tuple__15);
19181 
19182  /* "PyClical.pyx":1887
19183  * """
19184  *
19185  * def e(obj): # <<<<<<<<<<<<<<
19186  * """
19187  * Abbreviation for clifford(index_set(obj)).
19188  */
19189  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1887, __pyx_L1_error)
19190  __Pyx_GOTREF(__pyx_tuple__16);
19191  __Pyx_GIVEREF(__pyx_tuple__16);
19192  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_e, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19193 
19194  /* "PyClical.pyx":1900
19195  * return clifford(index_set(obj))
19196  *
19197  * def istpq(p, q): # <<<<<<<<<<<<<<
19198  * """
19199  * Abbreviation for index_set({-q,...p}).
19200  */
19201  __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1900, __pyx_L1_error)
19202  __Pyx_GOTREF(__pyx_tuple__18);
19203  __Pyx_GIVEREF(__pyx_tuple__18);
19204  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_istpq, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 1900, __pyx_L1_error)
19205 
19206  /* "PyClical.pyx":1909
19207  * return index_set(set(range(-q,p+1)))
19208  *
19209  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19210  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19211  *
19212  */
19213  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1909, __pyx_L1_error)
19214  __Pyx_GOTREF(__pyx_tuple__20);
19215  __Pyx_GIVEREF(__pyx_tuple__20);
19216  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19217  __Pyx_GOTREF(__pyx_tuple__21);
19218  __Pyx_GIVEREF(__pyx_tuple__21);
19219 
19220  /* "PyClical.pyx":1913
19221  *
19222  * # Doctest interface.
19223  * def _test(): # <<<<<<<<<<<<<<
19224  * import PyClical, doctest
19225  * return doctest.testmod(PyClical)
19226  */
19227  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1913, __pyx_L1_error)
19228  __Pyx_GOTREF(__pyx_tuple__22);
19229  __Pyx_GIVEREF(__pyx_tuple__22);
19230  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_test, 1913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 1913, __pyx_L1_error)
19231  __Pyx_RefNannyFinishContext();
19232  return 0;
19233  __pyx_L1_error:;
19234  __Pyx_RefNannyFinishContext();
19235  return -1;
19236 }
19237 
19238 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
19239  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19240  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19241  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19242  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19243  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19244  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19245  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19246  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19247  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19248  return 0;
19249  __pyx_L1_error:;
19250  return -1;
19251 }
19252 
19253 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
19254 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
19255 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
19256 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
19257 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
19258 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
19259 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
19260 
19261 static int __Pyx_modinit_global_init_code(void) {
19262  __Pyx_RefNannyDeclarations
19263  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19264  /*--- Global init code ---*/
19265  __Pyx_RefNannyFinishContext();
19266  return 0;
19267 }
19268 
19269 static int __Pyx_modinit_variable_export_code(void) {
19270  __Pyx_RefNannyDeclarations
19271  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19272  /*--- Variable export code ---*/
19273  __Pyx_RefNannyFinishContext();
19274  return 0;
19275 }
19276 
19277 static int __Pyx_modinit_function_export_code(void) {
19278  __Pyx_RefNannyDeclarations
19279  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19280  /*--- Function export code ---*/
19281  __Pyx_RefNannyFinishContext();
19282  return 0;
19283 }
19284 
19285 static int __Pyx_modinit_type_init_code(void) {
19286  __Pyx_RefNannyDeclarations
19287  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19288  /*--- Type init code ---*/
19289  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19290  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19291  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19292  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19293  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19294  #if PY_VERSION_HEX < 0x030800B1
19295  __pyx_type_8PyClical_index_set.tp_print = 0;
19296  #endif
19297  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)) {
19298  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19299  }
19300  #if CYTHON_COMPILING_IN_CPYTHON
19301  {
19302  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19303  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19304  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19305  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19306  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19307  }
19308  }
19309  #endif
19310  #if CYTHON_COMPILING_IN_CPYTHON
19311  {
19312  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19313  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19314  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19315  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19316  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19317  }
19318  }
19319  #endif
19320  #if CYTHON_COMPILING_IN_CPYTHON
19321  {
19322  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19323  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19324  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19325  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19326  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19327  }
19328  }
19329  #endif
19330  #if CYTHON_COMPILING_IN_CPYTHON
19331  {
19332  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19333  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19334  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19335  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19336  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19337  }
19338  }
19339  #endif
19340  #if CYTHON_COMPILING_IN_CPYTHON
19341  {
19342  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19343  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19344  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19345  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19346  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19347  }
19348  }
19349  #endif
19350  #if CYTHON_COMPILING_IN_CPYTHON
19351  {
19352  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19353  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19354  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19355  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19356  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19357  }
19358  }
19359  #endif
19360  #if CYTHON_COMPILING_IN_CPYTHON
19361  {
19362  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19363  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19364  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19365  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19366  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19367  }
19368  }
19369  #endif
19370  #if CYTHON_COMPILING_IN_CPYTHON
19371  {
19372  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19373  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19374  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19375  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19376  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19377  }
19378  }
19379  #endif
19380  #if CYTHON_COMPILING_IN_CPYTHON
19381  {
19382  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19383  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19384  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19385  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19386  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19387  }
19388  }
19389  #endif
19390  #if CYTHON_COMPILING_IN_CPYTHON
19391  {
19392  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19393  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19394  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19395  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19396  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19397  }
19398  }
19399  #endif
19400  #if CYTHON_COMPILING_IN_CPYTHON
19401  {
19402  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19403  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19404  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19405  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19406  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19407  }
19408  }
19409  #endif
19410  #if CYTHON_COMPILING_IN_CPYTHON
19411  {
19412  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19413  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19414  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19415  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19416  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19417  }
19418  }
19419  #endif
19420  #if CYTHON_COMPILING_IN_CPYTHON
19421  {
19422  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19423  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19424  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19425  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19426  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19427  }
19428  }
19429  #endif
19430  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19431  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_index_set, (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19432  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19433  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19434  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19435  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19436  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19437  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19438  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19439  #if PY_VERSION_HEX < 0x030800B1
19440  __pyx_type_8PyClical_clifford.tp_print = 0;
19441  #endif
19442  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19443  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19444  }
19445  #if CYTHON_COMPILING_IN_CPYTHON
19446  {
19447  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19448  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19449  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19450  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19451  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19452  }
19453  }
19454  #endif
19455  #if CYTHON_COMPILING_IN_CPYTHON
19456  {
19457  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19458  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19459  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19460  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19461  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19462  }
19463  }
19464  #endif
19465  #if CYTHON_COMPILING_IN_CPYTHON
19466  {
19467  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19468  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19469  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19470  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19471  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19472  }
19473  }
19474  #endif
19475  #if CYTHON_COMPILING_IN_CPYTHON
19476  {
19477  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19478  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19479  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19480  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19481  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19482  }
19483  }
19484  #endif
19485  #if CYTHON_COMPILING_IN_CPYTHON
19486  {
19487  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19488  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19489  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19490  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19491  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19492  }
19493  }
19494  #endif
19495  #if CYTHON_COMPILING_IN_CPYTHON
19496  {
19497  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19498  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19499  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19500  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19501  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19502  }
19503  }
19504  #endif
19505  #if CYTHON_COMPILING_IN_CPYTHON
19506  {
19507  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19508  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19509  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19510  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19511  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19512  }
19513  }
19514  #endif
19515  #if CYTHON_COMPILING_IN_CPYTHON
19516  {
19517  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19518  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19519  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19520  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19521  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19522  }
19523  }
19524  #endif
19525  #if CYTHON_COMPILING_IN_CPYTHON
19526  {
19527  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19528  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19529  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19530  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19531  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19532  }
19533  }
19534  #endif
19535  #if CYTHON_COMPILING_IN_CPYTHON
19536  {
19537  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19538  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19539  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19540  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
19541  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
19542  }
19543  }
19544  #endif
19545  #if CYTHON_COMPILING_IN_CPYTHON
19546  {
19547  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19548  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19549  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19550  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
19551  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
19552  }
19553  }
19554  #endif
19555  #if CYTHON_COMPILING_IN_CPYTHON
19556  {
19557  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19558  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19559  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19560  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
19561  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
19562  }
19563  }
19564  #endif
19565  #if CYTHON_COMPILING_IN_CPYTHON
19566  {
19567  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19568  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19569  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19570  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
19571  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
19572  }
19573  }
19574  #endif
19575  #if CYTHON_COMPILING_IN_CPYTHON
19576  {
19577  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19578  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19579  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19580  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
19581  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
19582  }
19583  }
19584  #endif
19585  #if CYTHON_COMPILING_IN_CPYTHON
19586  {
19587  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19588  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19589  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19590  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
19591  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
19592  }
19593  }
19594  #endif
19595  #if CYTHON_COMPILING_IN_CPYTHON
19596  {
19597  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19598  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19599  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19600  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
19601  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
19602  }
19603  }
19604  #endif
19605  #if CYTHON_COMPILING_IN_CPYTHON
19606  {
19607  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19608  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19609  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19610  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
19611  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
19612  }
19613  }
19614  #endif
19615  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19616  #if CYTHON_COMPILING_IN_CPYTHON
19617  {
19618  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19619  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19620  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19621  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
19622  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
19623  }
19624  }
19625  #endif
19626  #endif
19627  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
19628  #if CYTHON_COMPILING_IN_CPYTHON
19629  {
19630  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19631  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19632  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19633  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
19634  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
19635  }
19636  }
19637  #endif
19638  #endif
19639  #if CYTHON_COMPILING_IN_CPYTHON
19640  {
19641  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19642  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19643  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19644  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
19645  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
19646  }
19647  }
19648  #endif
19649  #if CYTHON_COMPILING_IN_CPYTHON
19650  {
19651  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19652  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19653  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19654  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
19655  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
19656  }
19657  }
19658  #endif
19659  #if CYTHON_COMPILING_IN_CPYTHON
19660  {
19661  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19662  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19663  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19664  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
19665  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
19666  }
19667  }
19668  #endif
19669  #if CYTHON_COMPILING_IN_CPYTHON
19670  {
19671  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19672  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19673  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19674  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
19675  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
19676  }
19677  }
19678  #endif
19679  #if CYTHON_COMPILING_IN_CPYTHON
19680  {
19681  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19682  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19683  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19684  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
19685  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
19686  }
19687  }
19688  #endif
19689  #if CYTHON_COMPILING_IN_CPYTHON
19690  {
19691  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19692  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19693  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19694  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
19695  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
19696  }
19697  }
19698  #endif
19699  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19700  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_clifford, (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19701  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19702  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
19703  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
19704  #if PY_VERSION_HEX < 0x030800B1
19705  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
19706  #endif
19707  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)) {
19708  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
19709  }
19710  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
19711  __Pyx_RefNannyFinishContext();
19712  return 0;
19713  __pyx_L1_error:;
19714  __Pyx_RefNannyFinishContext();
19715  return -1;
19716 }
19717 
19718 static int __Pyx_modinit_type_import_code(void) {
19719  __Pyx_RefNannyDeclarations
19720  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
19721  /*--- Type import code ---*/
19722  __Pyx_RefNannyFinishContext();
19723  return 0;
19724 }
19725 
19726 static int __Pyx_modinit_variable_import_code(void) {
19727  __Pyx_RefNannyDeclarations
19728  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
19729  /*--- Variable import code ---*/
19730  __Pyx_RefNannyFinishContext();
19731  return 0;
19732 }
19733 
19734 static int __Pyx_modinit_function_import_code(void) {
19735  __Pyx_RefNannyDeclarations
19736  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
19737  /*--- Function import code ---*/
19738  __Pyx_RefNannyFinishContext();
19739  return 0;
19740 }
19741 
19742 
19743 #if PY_MAJOR_VERSION < 3
19744 #ifdef CYTHON_NO_PYINIT_EXPORT
19745 #define __Pyx_PyMODINIT_FUNC void
19746 #else
19747 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19748 #endif
19749 #else
19750 #ifdef CYTHON_NO_PYINIT_EXPORT
19751 #define __Pyx_PyMODINIT_FUNC PyObject *
19752 #else
19753 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
19754 #endif
19755 #endif
19756 
19757 
19758 #if PY_MAJOR_VERSION < 3
19759 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
19760 __Pyx_PyMODINIT_FUNC initPyClical(void)
19761 #else
19762 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
19763 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
19764 #if CYTHON_PEP489_MULTI_PHASE_INIT
19765 {
19766  return PyModuleDef_Init(&__pyx_moduledef);
19767 }
19768 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
19769  #if PY_VERSION_HEX >= 0x030700A1
19770  static PY_INT64_T main_interpreter_id = -1;
19771  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
19772  if (main_interpreter_id == -1) {
19773  main_interpreter_id = current_id;
19774  return (unlikely(current_id == -1)) ? -1 : 0;
19775  } else if (unlikely(main_interpreter_id != current_id))
19776  #else
19777  static PyInterpreterState *main_interpreter = NULL;
19778  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
19779  if (!main_interpreter) {
19780  main_interpreter = current_interpreter;
19781  } else if (unlikely(main_interpreter != current_interpreter))
19782  #endif
19783  {
19784  PyErr_SetString(
19785  PyExc_ImportError,
19786  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
19787  return -1;
19788  }
19789  return 0;
19790 }
19791 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
19792  PyObject *value = PyObject_GetAttrString(spec, from_name);
19793  int result = 0;
19794  if (likely(value)) {
19795  if (allow_none || value != Py_None) {
19796  result = PyDict_SetItemString(moddict, to_name, value);
19797  }
19798  Py_DECREF(value);
19799  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
19800  PyErr_Clear();
19801  } else {
19802  result = -1;
19803  }
19804  return result;
19805 }
19806 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
19807  PyObject *module = NULL, *moddict, *modname;
19808  if (__Pyx_check_single_interpreter())
19809  return NULL;
19810  if (__pyx_m)
19811  return __Pyx_NewRef(__pyx_m);
19812  modname = PyObject_GetAttrString(spec, "name");
19813  if (unlikely(!modname)) goto bad;
19814  module = PyModule_NewObject(modname);
19815  Py_DECREF(modname);
19816  if (unlikely(!module)) goto bad;
19817  moddict = PyModule_GetDict(module);
19818  if (unlikely(!moddict)) goto bad;
19819  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
19820  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
19821  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
19822  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
19823  return module;
19824 bad:
19825  Py_XDECREF(module);
19826  return NULL;
19827 }
19828 
19829 
19830 static CYTHON_SMALL_CODE int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
19831 #endif
19832 #endif
19833 {
19834  PyObject *__pyx_t_1 = NULL;
19835  PyObject *__pyx_t_2 = NULL;
19836  PyObject *__pyx_t_3 = NULL;
19837  int __pyx_t_4;
19838  __Pyx_RefNannyDeclarations
19839  #if CYTHON_PEP489_MULTI_PHASE_INIT
19840  if (__pyx_m) {
19841  if (__pyx_m == __pyx_pyinit_module) return 0;
19842  PyErr_SetString(PyExc_RuntimeError, "Module 'PyClical' has already been imported. Re-initialisation is not supported.");
19843  return -1;
19844  }
19845  #elif PY_MAJOR_VERSION >= 3
19846  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
19847  #endif
19848  #if CYTHON_REFNANNY
19849 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
19850 if (!__Pyx_RefNanny) {
19851  PyErr_Clear();
19852  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
19853  if (!__Pyx_RefNanny)
19854  Py_FatalError("failed to import 'refnanny' module");
19855 }
19856 #endif
19857  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
19858  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19859  #ifdef __Pxy_PyFrame_Initialize_Offsets
19860  __Pxy_PyFrame_Initialize_Offsets();
19861  #endif
19862  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
19863  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
19864  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
19865  #ifdef __Pyx_CyFunction_USED
19866  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19867  #endif
19868  #ifdef __Pyx_FusedFunction_USED
19869  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19870  #endif
19871  #ifdef __Pyx_Coroutine_USED
19872  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19873  #endif
19874  #ifdef __Pyx_Generator_USED
19875  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19876  #endif
19877  #ifdef __Pyx_AsyncGen_USED
19878  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19879  #endif
19880  #ifdef __Pyx_StopAsyncIteration_USED
19881  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19882  #endif
19883  /*--- Library function declarations ---*/
19884  /*--- Threads initialization code ---*/
19885  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
19886  #ifdef WITH_THREAD /* Python build with threading support? */
19887  PyEval_InitThreads();
19888  #endif
19889  #endif
19890  /*--- Module creation code ---*/
19891  #if CYTHON_PEP489_MULTI_PHASE_INIT
19892  __pyx_m = __pyx_pyinit_module;
19893  Py_INCREF(__pyx_m);
19894  #else
19895  #if PY_MAJOR_VERSION < 3
19896  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
19897  #else
19898  __pyx_m = PyModule_Create(&__pyx_moduledef);
19899  #endif
19900  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
19901  #endif
19902  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
19903  Py_INCREF(__pyx_d);
19904  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
19905  Py_INCREF(__pyx_b);
19906  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
19907  Py_INCREF(__pyx_cython_runtime);
19908  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19909  /*--- Initialize various global constants etc. ---*/
19910  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19911  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
19912  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19913  #endif
19914  if (__pyx_module_is_main_PyClical) {
19915  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19916  }
19917  #if PY_MAJOR_VERSION >= 3
19918  {
19919  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
19920  if (!PyDict_GetItemString(modules, "PyClical")) {
19921  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
19922  }
19923  }
19924  #endif
19925  /*--- Builtin init code ---*/
19926  if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
19927  /*--- Constants init code ---*/
19928  if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
19929  /*--- Global type/function init code ---*/
19930  (void)__Pyx_modinit_global_init_code();
19931  (void)__Pyx_modinit_variable_export_code();
19932  (void)__Pyx_modinit_function_export_code();
19933  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
19934  (void)__Pyx_modinit_type_import_code();
19935  (void)__Pyx_modinit_variable_import_code();
19936  (void)__Pyx_modinit_function_import_code();
19937  /*--- Execution code ---*/
19938  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
19939  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
19940  #endif
19941 
19942  /* "PyClical.pyx":28
19943  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
19944  *
19945  * import math # <<<<<<<<<<<<<<
19946  * import numbers
19947  * import collections
19948  */
19949  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
19950  __Pyx_GOTREF(__pyx_t_1);
19951  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
19952  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19953 
19954  /* "PyClical.pyx":29
19955  *
19956  * import math
19957  * import numbers # <<<<<<<<<<<<<<
19958  * import collections
19959  *
19960  */
19961  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
19962  __Pyx_GOTREF(__pyx_t_1);
19963  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
19964  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19965 
19966  /* "PyClical.pyx":30
19967  * import math
19968  * import numbers
19969  * import collections # <<<<<<<<<<<<<<
19970  *
19971  * __version__ = "0.8.2"
19972  */
19973  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
19974  __Pyx_GOTREF(__pyx_t_1);
19975  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
19976  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19977 
19978  /* "PyClical.pyx":32
19979  * import collections
19980  *
19981  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
19982  *
19983  * from PyClical cimport *
19984  */
19985  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
19986 
19987  /* "PyClical.pyx":404
19988  * return index_set_to_str( self.unwrap() ).c_str()
19989  *
19990  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19991  * """
19992  * Tests for functions that Doctest cannot see.
19993  */
19994  __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)
19995  __Pyx_GOTREF(__pyx_t_1);
19996  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
19997  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19998 
19999  /* "PyClical.pyx":1243
20000  * return clifford_to_str( self.unwrap() ).c_str()
20001  *
20002  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20003  * """
20004  * Tests for functions that Doctest cannot see.
20005  */
20006  __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)
20007  __Pyx_GOTREF(__pyx_t_1);
20008  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20009  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20010 
20011  /* "PyClical.pyx":1856
20012  *
20013  * # Some abbreviations.
20014  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20015  * pi = tau / 2.0
20016  *
20017  */
20018  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20019  __Pyx_GOTREF(__pyx_t_1);
20020  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20021  __Pyx_GOTREF(__pyx_t_2);
20022  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20023  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20024  __Pyx_GOTREF(__pyx_t_1);
20025  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20026  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20027  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20028 
20029  /* "PyClical.pyx":1857
20030  * # Some abbreviations.
20031  * tau = atan(clifford(1.0)) * 8.0
20032  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20033  *
20034  * cl = clifford
20035  */
20036  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20037  __Pyx_GOTREF(__pyx_t_1);
20038  __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
20039  __Pyx_GOTREF(__pyx_t_2);
20040  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20041  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20042  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20043 
20044  /* "PyClical.pyx":1859
20045  * pi = tau / 2.0
20046  *
20047  * cl = clifford # <<<<<<<<<<<<<<
20048  * """
20049  * Abbreviation for clifford.
20050  */
20051  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20052 
20053  /* "PyClical.pyx":1879
20054  * """
20055  *
20056  * ist = index_set # <<<<<<<<<<<<<<
20057  * """
20058  * Abbreviation for index_set.
20059  */
20060  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20061 
20062  /* "PyClical.pyx":1887
20063  * """
20064  *
20065  * def e(obj): # <<<<<<<<<<<<<<
20066  * """
20067  * Abbreviation for clifford(index_set(obj)).
20068  */
20069  __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)
20070  __Pyx_GOTREF(__pyx_t_2);
20071  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20072  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20073 
20074  /* "PyClical.pyx":1900
20075  * return clifford(index_set(obj))
20076  *
20077  * def istpq(p, q): # <<<<<<<<<<<<<<
20078  * """
20079  * Abbreviation for index_set({-q,...p}).
20080  */
20081  __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)
20082  __Pyx_GOTREF(__pyx_t_2);
20083  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20084  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20085 
20086  /* "PyClical.pyx":1909
20087  * return index_set(set(range(-q,p+1)))
20088  *
20089  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20090  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20091  *
20092  */
20093  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20094  __Pyx_GOTREF(__pyx_t_2);
20095  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20096  __Pyx_GOTREF(__pyx_t_1);
20097  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20098  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20099  __Pyx_GOTREF(__pyx_t_2);
20100  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
20101  __Pyx_GOTREF(__pyx_t_3);
20102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20103  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20104  __Pyx_GOTREF(__pyx_t_2);
20105  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20106  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20107  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20108  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20109 
20110  /* "PyClical.pyx":1910
20111  *
20112  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20113  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20114  *
20115  * # Doctest interface.
20116  */
20117  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20118  __Pyx_GOTREF(__pyx_t_2);
20119  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L1_error)
20120  __Pyx_GOTREF(__pyx_t_3);
20121  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20122  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20123  __Pyx_GOTREF(__pyx_t_2);
20124  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
20125  __Pyx_GOTREF(__pyx_t_1);
20126  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20127  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20128  __Pyx_GOTREF(__pyx_t_2);
20129  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20130  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20131  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20132  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20133 
20134  /* "PyClical.pyx":1913
20135  *
20136  * # Doctest interface.
20137  * def _test(): # <<<<<<<<<<<<<<
20138  * import PyClical, doctest
20139  * return doctest.testmod(PyClical)
20140  */
20141  __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)
20142  __Pyx_GOTREF(__pyx_t_2);
20143  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20144  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20145 
20146  /* "PyClical.pyx":1917
20147  * return doctest.testmod(PyClical)
20148  *
20149  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20150  * _test()
20151  */
20152  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20153  __Pyx_GOTREF(__pyx_t_2);
20154  __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)
20155  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20156  if (__pyx_t_4) {
20157 
20158  /* "PyClical.pyx":1918
20159  *
20160  * if __name__ == "__main__":
20161  * _test() # <<<<<<<<<<<<<<
20162  */
20163  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20164  __Pyx_GOTREF(__pyx_t_2);
20165  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20166  __Pyx_GOTREF(__pyx_t_1);
20167  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20168  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20169 
20170  /* "PyClical.pyx":1917
20171  * return doctest.testmod(PyClical)
20172  *
20173  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20174  * _test()
20175  */
20176  }
20177 
20178  /* "PyClical.pyx":1
20179  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20180  * # distutils: language = c++
20181  * #
20182  */
20183  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20184  __Pyx_GOTREF(__pyx_t_1);
20185  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)
20186  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)
20187  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)
20188  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)
20189  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)
20190  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)
20191  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)
20192  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)
20193  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)
20194  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)
20195  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)
20196  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)
20197  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)
20198  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)
20199  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)
20200  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)
20201  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)
20202  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)
20203  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)
20204  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)
20205  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)
20206  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)
20207  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)
20208  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)
20209  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)
20210  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)
20211  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)
20212  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)
20213  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)
20214  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)
20215  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)
20216  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)
20217  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)
20218  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)
20219  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)
20220  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)
20221  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)
20222  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)
20223  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)
20224  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)
20225  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)
20226  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)
20227  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)
20228  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)
20229  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)
20230  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)
20231  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)
20232  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)
20233  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)
20234  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)
20235  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)
20236  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)
20237  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)
20238  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)
20239  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)
20240  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)
20241  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)
20242  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)
20243  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)
20244  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)
20245  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)
20246  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)
20247  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)
20248  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)
20249  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)
20250  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)
20251  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)
20252  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)
20253  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)
20254  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)
20255  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)
20256  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)
20257  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)
20258  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)
20259  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)
20260  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)
20261  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)
20262  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)
20263  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)
20264  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)
20265  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)
20266  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)
20267  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)
20268  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)
20269  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)
20270  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)
20271  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)
20272  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)
20273  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)
20274  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)
20275  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)
20276  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)
20277  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)
20278  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)
20279  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)
20280  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)
20281  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)
20282  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)
20283  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)
20284  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)
20285  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)
20286  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)
20287  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)
20288  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)
20289  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)
20290  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)
20291  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)
20292  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20293  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20294 
20295  /*--- Wrapped vars code ---*/
20296 
20297  goto __pyx_L0;
20298  __pyx_L1_error:;
20299  __Pyx_XDECREF(__pyx_t_1);
20300  __Pyx_XDECREF(__pyx_t_2);
20301  __Pyx_XDECREF(__pyx_t_3);
20302  if (__pyx_m) {
20303  if (__pyx_d) {
20304  __Pyx_AddTraceback("init PyClical", __pyx_clineno, __pyx_lineno, __pyx_filename);
20305  }
20306  Py_CLEAR(__pyx_m);
20307  } else if (!PyErr_Occurred()) {
20308  PyErr_SetString(PyExc_ImportError, "init PyClical");
20309  }
20310  __pyx_L0:;
20311  __Pyx_RefNannyFinishContext();
20312  #if CYTHON_PEP489_MULTI_PHASE_INIT
20313  return (__pyx_m != NULL) ? 0 : -1;
20314  #elif PY_MAJOR_VERSION >= 3
20315  return __pyx_m;
20316  #else
20317  return;
20318  #endif
20319 }
20320 
20321 /* --- Runtime support code --- */
20322 /* Refnanny */
20323 #if CYTHON_REFNANNY
20324 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20325  PyObject *m = NULL, *p = NULL;
20326  void *r = NULL;
20327  m = PyImport_ImportModule(modname);
20328  if (!m) goto end;
20329  p = PyObject_GetAttrString(m, "RefNannyAPI");
20330  if (!p) goto end;
20331  r = PyLong_AsVoidPtr(p);
20332 end:
20333  Py_XDECREF(p);
20334  Py_XDECREF(m);
20335  return (__Pyx_RefNannyAPIStruct *)r;
20336 }
20337 #endif
20338 
20339 /* PyObjectGetAttrStr */
20340 #if CYTHON_USE_TYPE_SLOTS
20341 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20342  PyTypeObject* tp = Py_TYPE(obj);
20343  if (likely(tp->tp_getattro))
20344  return tp->tp_getattro(obj, attr_name);
20345 #if PY_MAJOR_VERSION < 3
20346  if (likely(tp->tp_getattr))
20347  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20348 #endif
20349  return PyObject_GetAttr(obj, attr_name);
20350 }
20351 #endif
20352 
20353 /* GetBuiltinName */
20354 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20355  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20356  if (unlikely(!result)) {
20357  PyErr_Format(PyExc_NameError,
20358 #if PY_MAJOR_VERSION >= 3
20359  "name '%U' is not defined", name);
20360 #else
20361  "name '%.200s' is not defined", PyString_AS_STRING(name));
20362 #endif
20363  }
20364  return result;
20365 }
20366 
20367 /* PyCFunctionFastCall */
20368 #if CYTHON_FAST_PYCCALL
20369 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20370  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20371  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20372  PyObject *self = PyCFunction_GET_SELF(func);
20373  int flags = PyCFunction_GET_FLAGS(func);
20374  assert(PyCFunction_Check(func));
20375  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
20376  assert(nargs >= 0);
20377  assert(nargs == 0 || args != NULL);
20378  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20379  because it may clear it (directly or indirectly) and so the
20380  caller loses its exception */
20381  assert(!PyErr_Occurred());
20382  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20383  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
20384  } else {
20385  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
20386  }
20387 }
20388 #endif
20389 
20390 /* PyFunctionFastCall */
20391 #if CYTHON_FAST_PYCALL
20392 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20393  PyObject *globals) {
20394  PyFrameObject *f;
20395  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20396  PyObject **fastlocals;
20397  Py_ssize_t i;
20398  PyObject *result;
20399  assert(globals != NULL);
20400  /* XXX Perhaps we should create a specialized
20401  PyFrame_New() that doesn't take locals, but does
20402  take builtins without sanity checking them.
20403  */
20404  assert(tstate != NULL);
20405  f = PyFrame_New(tstate, co, globals, NULL);
20406  if (f == NULL) {
20407  return NULL;
20408  }
20409  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
20410  for (i = 0; i < na; i++) {
20411  Py_INCREF(*args);
20412  fastlocals[i] = *args++;
20413  }
20414  result = PyEval_EvalFrameEx(f,0);
20415  ++tstate->recursion_depth;
20416  Py_DECREF(f);
20417  --tstate->recursion_depth;
20418  return result;
20419 }
20420 #if 1 || PY_VERSION_HEX < 0x030600B1
20421 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
20422  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20423  PyObject *globals = PyFunction_GET_GLOBALS(func);
20424  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20425  PyObject *closure;
20426 #if PY_MAJOR_VERSION >= 3
20427  PyObject *kwdefs;
20428 #endif
20429  PyObject *kwtuple, **k;
20430  PyObject **d;
20431  Py_ssize_t nd;
20432  Py_ssize_t nk;
20433  PyObject *result;
20434  assert(kwargs == NULL || PyDict_Check(kwargs));
20435  nk = kwargs ? PyDict_Size(kwargs) : 0;
20436  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20437  return NULL;
20438  }
20439  if (
20440 #if PY_MAJOR_VERSION >= 3
20441  co->co_kwonlyargcount == 0 &&
20442 #endif
20443  likely(kwargs == NULL || nk == 0) &&
20444  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20445  if (argdefs == NULL && co->co_argcount == nargs) {
20446  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20447  goto done;
20448  }
20449  else if (nargs == 0 && argdefs != NULL
20450  && co->co_argcount == Py_SIZE(argdefs)) {
20451  /* function called with no arguments, but all parameters have
20452  a default value: use default values as arguments .*/
20453  args = &PyTuple_GET_ITEM(argdefs, 0);
20454  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20455  goto done;
20456  }
20457  }
20458  if (kwargs != NULL) {
20459  Py_ssize_t pos, i;
20460  kwtuple = PyTuple_New(2 * nk);
20461  if (kwtuple == NULL) {
20462  result = NULL;
20463  goto done;
20464  }
20465  k = &PyTuple_GET_ITEM(kwtuple, 0);
20466  pos = i = 0;
20467  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20468  Py_INCREF(k[i]);
20469  Py_INCREF(k[i+1]);
20470  i += 2;
20471  }
20472  nk = i / 2;
20473  }
20474  else {
20475  kwtuple = NULL;
20476  k = NULL;
20477  }
20478  closure = PyFunction_GET_CLOSURE(func);
20479 #if PY_MAJOR_VERSION >= 3
20480  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20481 #endif
20482  if (argdefs != NULL) {
20483  d = &PyTuple_GET_ITEM(argdefs, 0);
20484  nd = Py_SIZE(argdefs);
20485  }
20486  else {
20487  d = NULL;
20488  nd = 0;
20489  }
20490 #if PY_MAJOR_VERSION >= 3
20491  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20492  args, (int)nargs,
20493  k, (int)nk,
20494  d, (int)nd, kwdefs, closure);
20495 #else
20496  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20497  args, (int)nargs,
20498  k, (int)nk,
20499  d, (int)nd, closure);
20500 #endif
20501  Py_XDECREF(kwtuple);
20502 done:
20503  Py_LeaveRecursiveCall();
20504  return result;
20505 }
20506 #endif
20507 #endif
20508 
20509 /* PyObjectCall */
20510 #if CYTHON_COMPILING_IN_CPYTHON
20511 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20512  PyObject *result;
20513  ternaryfunc call = func->ob_type->tp_call;
20514  if (unlikely(!call))
20515  return PyObject_Call(func, arg, kw);
20516  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20517  return NULL;
20518  result = (*call)(func, arg, kw);
20519  Py_LeaveRecursiveCall();
20520  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20521  PyErr_SetString(
20522  PyExc_SystemError,
20523  "NULL result without error in PyObject_Call");
20524  }
20525  return result;
20526 }
20527 #endif
20528 
20529 /* PyObjectCallMethO */
20530 #if CYTHON_COMPILING_IN_CPYTHON
20531 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20532  PyObject *self, *result;
20533  PyCFunction cfunc;
20534  cfunc = PyCFunction_GET_FUNCTION(func);
20535  self = PyCFunction_GET_SELF(func);
20536  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20537  return NULL;
20538  result = cfunc(self, arg);
20539  Py_LeaveRecursiveCall();
20540  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20541  PyErr_SetString(
20542  PyExc_SystemError,
20543  "NULL result without error in PyObject_Call");
20544  }
20545  return result;
20546 }
20547 #endif
20548 
20549 /* PyObjectCallOneArg */
20550 #if CYTHON_COMPILING_IN_CPYTHON
20551 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20552  PyObject *result;
20553  PyObject *args = PyTuple_New(1);
20554  if (unlikely(!args)) return NULL;
20555  Py_INCREF(arg);
20556  PyTuple_SET_ITEM(args, 0, arg);
20557  result = __Pyx_PyObject_Call(func, args, NULL);
20558  Py_DECREF(args);
20559  return result;
20560 }
20561 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20562 #if CYTHON_FAST_PYCALL
20563  if (PyFunction_Check(func)) {
20564  return __Pyx_PyFunction_FastCall(func, &arg, 1);
20565  }
20566 #endif
20567  if (likely(PyCFunction_Check(func))) {
20568  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
20569  return __Pyx_PyObject_CallMethO(func, arg);
20570 #if CYTHON_FAST_PYCCALL
20571  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
20572  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
20573 #endif
20574  }
20575  }
20576  return __Pyx__PyObject_CallOneArg(func, arg);
20577 }
20578 #else
20579 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20580  PyObject *result;
20581  PyObject *args = PyTuple_Pack(1, arg);
20582  if (unlikely(!args)) return NULL;
20583  result = __Pyx_PyObject_Call(func, args, NULL);
20584  Py_DECREF(args);
20585  return result;
20586 }
20587 #endif
20588 
20589 /* PyErrFetchRestore */
20590 #if CYTHON_FAST_THREAD_STATE
20591 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20592  PyObject *tmp_type, *tmp_value, *tmp_tb;
20593  tmp_type = tstate->curexc_type;
20594  tmp_value = tstate->curexc_value;
20595  tmp_tb = tstate->curexc_traceback;
20596  tstate->curexc_type = type;
20597  tstate->curexc_value = value;
20598  tstate->curexc_traceback = tb;
20599  Py_XDECREF(tmp_type);
20600  Py_XDECREF(tmp_value);
20601  Py_XDECREF(tmp_tb);
20602 }
20603 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20604  *type = tstate->curexc_type;
20605  *value = tstate->curexc_value;
20606  *tb = tstate->curexc_traceback;
20607  tstate->curexc_type = 0;
20608  tstate->curexc_value = 0;
20609  tstate->curexc_traceback = 0;
20610 }
20611 #endif
20612 
20613 /* WriteUnraisableException */
20614 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
20615  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
20616  int full_traceback, CYTHON_UNUSED int nogil) {
20617  PyObject *old_exc, *old_val, *old_tb;
20618  PyObject *ctx;
20619  __Pyx_PyThreadState_declare
20620 #ifdef WITH_THREAD
20621  PyGILState_STATE state;
20622  if (nogil)
20623  state = PyGILState_Ensure();
20624 #ifdef _MSC_VER
20625  else state = (PyGILState_STATE)-1;
20626 #endif
20627 #endif
20628  __Pyx_PyThreadState_assign
20629  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
20630  if (full_traceback) {
20631  Py_XINCREF(old_exc);
20632  Py_XINCREF(old_val);
20633  Py_XINCREF(old_tb);
20634  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20635  PyErr_PrintEx(1);
20636  }
20637  #if PY_MAJOR_VERSION < 3
20638  ctx = PyString_FromString(name);
20639  #else
20640  ctx = PyUnicode_FromString(name);
20641  #endif
20642  __Pyx_ErrRestore(old_exc, old_val, old_tb);
20643  if (!ctx) {
20644  PyErr_WriteUnraisable(Py_None);
20645  } else {
20646  PyErr_WriteUnraisable(ctx);
20647  Py_DECREF(ctx);
20648  }
20649 #ifdef WITH_THREAD
20650  if (nogil)
20651  PyGILState_Release(state);
20652 #endif
20653 }
20654 
20655 /* PyDictVersioning */
20656 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
20657 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
20658  PyObject *dict = Py_TYPE(obj)->tp_dict;
20659  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
20660 }
20661 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
20662  PyObject **dictptr = NULL;
20663  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
20664  if (offset) {
20665 #if CYTHON_COMPILING_IN_CPYTHON
20666  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
20667 #else
20668  dictptr = _PyObject_GetDictPtr(obj);
20669 #endif
20670  }
20671  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
20672 }
20673 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
20674  PyObject *dict = Py_TYPE(obj)->tp_dict;
20675  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
20676  return 0;
20677  return obj_dict_version == __Pyx_get_object_dict_version(obj);
20678 }
20679 #endif
20680 
20681 /* PyObjectCallNoArg */
20682 #if CYTHON_COMPILING_IN_CPYTHON
20683 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
20684 #if CYTHON_FAST_PYCALL
20685  if (PyFunction_Check(func)) {
20686  return __Pyx_PyFunction_FastCall(func, NULL, 0);
20687  }
20688 #endif
20689 #ifdef __Pyx_CyFunction_USED
20690  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
20691 #else
20692  if (likely(PyCFunction_Check(func)))
20693 #endif
20694  {
20695  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
20696  return __Pyx_PyObject_CallMethO(func, NULL);
20697  }
20698  }
20699  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
20700 }
20701 #endif
20702 
20703 /* RaiseDoubleKeywords */
20704 static void __Pyx_RaiseDoubleKeywordsError(
20705  const char* func_name,
20706  PyObject* kw_name)
20707 {
20708  PyErr_Format(PyExc_TypeError,
20709  #if PY_MAJOR_VERSION >= 3
20710  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
20711  #else
20712  "%s() got multiple values for keyword argument '%s'", func_name,
20713  PyString_AsString(kw_name));
20714  #endif
20715 }
20716 
20717 /* ParseKeywords */
20718 static int __Pyx_ParseOptionalKeywords(
20719  PyObject *kwds,
20720  PyObject **argnames[],
20721  PyObject *kwds2,
20722  PyObject *values[],
20723  Py_ssize_t num_pos_args,
20724  const char* function_name)
20725 {
20726  PyObject *key = 0, *value = 0;
20727  Py_ssize_t pos = 0;
20728  PyObject*** name;
20729  PyObject*** first_kw_arg = argnames + num_pos_args;
20730  while (PyDict_Next(kwds, &pos, &key, &value)) {
20731  name = first_kw_arg;
20732  while (*name && (**name != key)) name++;
20733  if (*name) {
20734  values[name-argnames] = value;
20735  continue;
20736  }
20737  name = first_kw_arg;
20738  #if PY_MAJOR_VERSION < 3
20739  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
20740  while (*name) {
20741  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
20742  && _PyString_Eq(**name, key)) {
20743  values[name-argnames] = value;
20744  break;
20745  }
20746  name++;
20747  }
20748  if (*name) continue;
20749  else {
20750  PyObject*** argname = argnames;
20751  while (argname != first_kw_arg) {
20752  if ((**argname == key) || (
20753  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
20754  && _PyString_Eq(**argname, key))) {
20755  goto arg_passed_twice;
20756  }
20757  argname++;
20758  }
20759  }
20760  } else
20761  #endif
20762  if (likely(PyUnicode_Check(key))) {
20763  while (*name) {
20764  int cmp = (**name == key) ? 0 :
20765  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20766  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
20767  #endif
20768  PyUnicode_Compare(**name, key);
20769  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20770  if (cmp == 0) {
20771  values[name-argnames] = value;
20772  break;
20773  }
20774  name++;
20775  }
20776  if (*name) continue;
20777  else {
20778  PyObject*** argname = argnames;
20779  while (argname != first_kw_arg) {
20780  int cmp = (**argname == key) ? 0 :
20781  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
20782  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
20783  #endif
20784  PyUnicode_Compare(**argname, key);
20785  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
20786  if (cmp == 0) goto arg_passed_twice;
20787  argname++;
20788  }
20789  }
20790  } else
20791  goto invalid_keyword_type;
20792  if (kwds2) {
20793  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
20794  } else {
20795  goto invalid_keyword;
20796  }
20797  }
20798  return 0;
20799 arg_passed_twice:
20800  __Pyx_RaiseDoubleKeywordsError(function_name, key);
20801  goto bad;
20802 invalid_keyword_type:
20803  PyErr_Format(PyExc_TypeError,
20804  "%.200s() keywords must be strings", function_name);
20805  goto bad;
20806 invalid_keyword:
20807  PyErr_Format(PyExc_TypeError,
20808  #if PY_MAJOR_VERSION < 3
20809  "%.200s() got an unexpected keyword argument '%.200s'",
20810  function_name, PyString_AsString(key));
20811  #else
20812  "%s() got an unexpected keyword argument '%U'",
20813  function_name, key);
20814  #endif
20815 bad:
20816  return -1;
20817 }
20818 
20819 /* RaiseArgTupleInvalid */
20820 static void __Pyx_RaiseArgtupleInvalid(
20821  const char* func_name,
20822  int exact,
20823  Py_ssize_t num_min,
20824  Py_ssize_t num_max,
20825  Py_ssize_t num_found)
20826 {
20827  Py_ssize_t num_expected;
20828  const char *more_or_less;
20829  if (num_found < num_min) {
20830  num_expected = num_min;
20831  more_or_less = "at least";
20832  } else {
20833  num_expected = num_max;
20834  more_or_less = "at most";
20835  }
20836  if (exact) {
20837  more_or_less = "exactly";
20838  }
20839  PyErr_Format(PyExc_TypeError,
20840  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
20841  func_name, more_or_less, num_expected,
20842  (num_expected == 1) ? "" : "s", num_found);
20843 }
20844 
20845 /* GetModuleGlobalName */
20846 #if CYTHON_USE_DICT_VERSIONS
20847 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
20848 #else
20849 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
20850 #endif
20851 {
20852  PyObject *result;
20853 #if !CYTHON_AVOID_BORROWED_REFS
20854 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
20855  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
20856  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20857  if (likely(result)) {
20858  return __Pyx_NewRef(result);
20859  } else if (unlikely(PyErr_Occurred())) {
20860  return NULL;
20861  }
20862 #else
20863  result = PyDict_GetItem(__pyx_d, name);
20864  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20865  if (likely(result)) {
20866  return __Pyx_NewRef(result);
20867  }
20868 #endif
20869 #else
20870  result = PyObject_GetItem(__pyx_d, name);
20871  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
20872  if (likely(result)) {
20873  return __Pyx_NewRef(result);
20874  }
20875  PyErr_Clear();
20876 #endif
20877  return __Pyx_GetBuiltinName(name);
20878 }
20879 
20880 /* GetTopmostException */
20881 #if CYTHON_USE_EXC_INFO_STACK
20882 static _PyErr_StackItem *
20883 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
20884 {
20885  _PyErr_StackItem *exc_info = tstate->exc_info;
20886  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
20887  exc_info->previous_item != NULL)
20888  {
20889  exc_info = exc_info->previous_item;
20890  }
20891  return exc_info;
20892 }
20893 #endif
20894 
20895 /* SaveResetException */
20896 #if CYTHON_FAST_THREAD_STATE
20897 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
20898  #if CYTHON_USE_EXC_INFO_STACK
20899  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
20900  *type = exc_info->exc_type;
20901  *value = exc_info->exc_value;
20902  *tb = exc_info->exc_traceback;
20903  #else
20904  *type = tstate->exc_type;
20905  *value = tstate->exc_value;
20906  *tb = tstate->exc_traceback;
20907  #endif
20908  Py_XINCREF(*type);
20909  Py_XINCREF(*value);
20910  Py_XINCREF(*tb);
20911 }
20912 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
20913  PyObject *tmp_type, *tmp_value, *tmp_tb;
20914  #if CYTHON_USE_EXC_INFO_STACK
20915  _PyErr_StackItem *exc_info = tstate->exc_info;
20916  tmp_type = exc_info->exc_type;
20917  tmp_value = exc_info->exc_value;
20918  tmp_tb = exc_info->exc_traceback;
20919  exc_info->exc_type = type;
20920  exc_info->exc_value = value;
20921  exc_info->exc_traceback = tb;
20922  #else
20923  tmp_type = tstate->exc_type;
20924  tmp_value = tstate->exc_value;
20925  tmp_tb = tstate->exc_traceback;
20926  tstate->exc_type = type;
20927  tstate->exc_value = value;
20928  tstate->exc_traceback = tb;
20929  #endif
20930  Py_XDECREF(tmp_type);
20931  Py_XDECREF(tmp_value);
20932  Py_XDECREF(tmp_tb);
20933 }
20934 #endif
20935 
20936 /* PyErrExceptionMatches */
20937 #if CYTHON_FAST_THREAD_STATE
20938 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
20939  Py_ssize_t i, n;
20940  n = PyTuple_GET_SIZE(tuple);
20941 #if PY_MAJOR_VERSION >= 3
20942  for (i=0; i<n; i++) {
20943  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
20944  }
20945 #endif
20946  for (i=0; i<n; i++) {
20947  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
20948  }
20949  return 0;
20950 }
20951 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
20952  PyObject *exc_type = tstate->curexc_type;
20953  if (exc_type == err) return 1;
20954  if (unlikely(!exc_type)) return 0;
20955  if (unlikely(PyTuple_Check(err)))
20956  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
20957  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
20958 }
20959 #endif
20960 
20961 /* GetException */
20962 #if CYTHON_FAST_THREAD_STATE
20963 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
20964 #else
20965 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
20966 #endif
20967 {
20968  PyObject *local_type, *local_value, *local_tb;
20969 #if CYTHON_FAST_THREAD_STATE
20970  PyObject *tmp_type, *tmp_value, *tmp_tb;
20971  local_type = tstate->curexc_type;
20972  local_value = tstate->curexc_value;
20973  local_tb = tstate->curexc_traceback;
20974  tstate->curexc_type = 0;
20975  tstate->curexc_value = 0;
20976  tstate->curexc_traceback = 0;
20977 #else
20978  PyErr_Fetch(&local_type, &local_value, &local_tb);
20979 #endif
20980  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
20981 #if CYTHON_FAST_THREAD_STATE
20982  if (unlikely(tstate->curexc_type))
20983 #else
20984  if (unlikely(PyErr_Occurred()))
20985 #endif
20986  goto bad;
20987  #if PY_MAJOR_VERSION >= 3
20988  if (local_tb) {
20989  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
20990  goto bad;
20991  }
20992  #endif
20993  Py_XINCREF(local_tb);
20994  Py_XINCREF(local_type);
20995  Py_XINCREF(local_value);
20996  *type = local_type;
20997  *value = local_value;
20998  *tb = local_tb;
20999 #if CYTHON_FAST_THREAD_STATE
21000  #if CYTHON_USE_EXC_INFO_STACK
21001  {
21002  _PyErr_StackItem *exc_info = tstate->exc_info;
21003  tmp_type = exc_info->exc_type;
21004  tmp_value = exc_info->exc_value;
21005  tmp_tb = exc_info->exc_traceback;
21006  exc_info->exc_type = local_type;
21007  exc_info->exc_value = local_value;
21008  exc_info->exc_traceback = local_tb;
21009  }
21010  #else
21011  tmp_type = tstate->exc_type;
21012  tmp_value = tstate->exc_value;
21013  tmp_tb = tstate->exc_traceback;
21014  tstate->exc_type = local_type;
21015  tstate->exc_value = local_value;
21016  tstate->exc_traceback = local_tb;
21017  #endif
21018  Py_XDECREF(tmp_type);
21019  Py_XDECREF(tmp_value);
21020  Py_XDECREF(tmp_tb);
21021 #else
21022  PyErr_SetExcInfo(local_type, local_value, local_tb);
21023 #endif
21024  return 0;
21025 bad:
21026  *type = 0;
21027  *value = 0;
21028  *tb = 0;
21029  Py_XDECREF(local_type);
21030  Py_XDECREF(local_value);
21031  Py_XDECREF(local_tb);
21032  return -1;
21033 }
21034 
21035 /* RaiseException */
21036 #if PY_MAJOR_VERSION < 3
21037 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21038  CYTHON_UNUSED PyObject *cause) {
21039  __Pyx_PyThreadState_declare
21040  Py_XINCREF(type);
21041  if (!value || value == Py_None)
21042  value = NULL;
21043  else
21044  Py_INCREF(value);
21045  if (!tb || tb == Py_None)
21046  tb = NULL;
21047  else {
21048  Py_INCREF(tb);
21049  if (!PyTraceBack_Check(tb)) {
21050  PyErr_SetString(PyExc_TypeError,
21051  "raise: arg 3 must be a traceback or None");
21052  goto raise_error;
21053  }
21054  }
21055  if (PyType_Check(type)) {
21056 #if CYTHON_COMPILING_IN_PYPY
21057  if (!value) {
21058  Py_INCREF(Py_None);
21059  value = Py_None;
21060  }
21061 #endif
21062  PyErr_NormalizeException(&type, &value, &tb);
21063  } else {
21064  if (value) {
21065  PyErr_SetString(PyExc_TypeError,
21066  "instance exception may not have a separate value");
21067  goto raise_error;
21068  }
21069  value = type;
21070  type = (PyObject*) Py_TYPE(type);
21071  Py_INCREF(type);
21072  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21073  PyErr_SetString(PyExc_TypeError,
21074  "raise: exception class must be a subclass of BaseException");
21075  goto raise_error;
21076  }
21077  }
21078  __Pyx_PyThreadState_assign
21079  __Pyx_ErrRestore(type, value, tb);
21080  return;
21081 raise_error:
21082  Py_XDECREF(value);
21083  Py_XDECREF(type);
21084  Py_XDECREF(tb);
21085  return;
21086 }
21087 #else
21088 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21089  PyObject* owned_instance = NULL;
21090  if (tb == Py_None) {
21091  tb = 0;
21092  } else if (tb && !PyTraceBack_Check(tb)) {
21093  PyErr_SetString(PyExc_TypeError,
21094  "raise: arg 3 must be a traceback or None");
21095  goto bad;
21096  }
21097  if (value == Py_None)
21098  value = 0;
21099  if (PyExceptionInstance_Check(type)) {
21100  if (value) {
21101  PyErr_SetString(PyExc_TypeError,
21102  "instance exception may not have a separate value");
21103  goto bad;
21104  }
21105  value = type;
21106  type = (PyObject*) Py_TYPE(value);
21107  } else if (PyExceptionClass_Check(type)) {
21108  PyObject *instance_class = NULL;
21109  if (value && PyExceptionInstance_Check(value)) {
21110  instance_class = (PyObject*) Py_TYPE(value);
21111  if (instance_class != type) {
21112  int is_subclass = PyObject_IsSubclass(instance_class, type);
21113  if (!is_subclass) {
21114  instance_class = NULL;
21115  } else if (unlikely(is_subclass == -1)) {
21116  goto bad;
21117  } else {
21118  type = instance_class;
21119  }
21120  }
21121  }
21122  if (!instance_class) {
21123  PyObject *args;
21124  if (!value)
21125  args = PyTuple_New(0);
21126  else if (PyTuple_Check(value)) {
21127  Py_INCREF(value);
21128  args = value;
21129  } else
21130  args = PyTuple_Pack(1, value);
21131  if (!args)
21132  goto bad;
21133  owned_instance = PyObject_Call(type, args, NULL);
21134  Py_DECREF(args);
21135  if (!owned_instance)
21136  goto bad;
21137  value = owned_instance;
21138  if (!PyExceptionInstance_Check(value)) {
21139  PyErr_Format(PyExc_TypeError,
21140  "calling %R should have returned an instance of "
21141  "BaseException, not %R",
21142  type, Py_TYPE(value));
21143  goto bad;
21144  }
21145  }
21146  } else {
21147  PyErr_SetString(PyExc_TypeError,
21148  "raise: exception class must be a subclass of BaseException");
21149  goto bad;
21150  }
21151  if (cause) {
21152  PyObject *fixed_cause;
21153  if (cause == Py_None) {
21154  fixed_cause = NULL;
21155  } else if (PyExceptionClass_Check(cause)) {
21156  fixed_cause = PyObject_CallObject(cause, NULL);
21157  if (fixed_cause == NULL)
21158  goto bad;
21159  } else if (PyExceptionInstance_Check(cause)) {
21160  fixed_cause = cause;
21161  Py_INCREF(fixed_cause);
21162  } else {
21163  PyErr_SetString(PyExc_TypeError,
21164  "exception causes must derive from "
21165  "BaseException");
21166  goto bad;
21167  }
21168  PyException_SetCause(value, fixed_cause);
21169  }
21170  PyErr_SetObject(type, value);
21171  if (tb) {
21172 #if CYTHON_COMPILING_IN_PYPY
21173  PyObject *tmp_type, *tmp_value, *tmp_tb;
21174  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21175  Py_INCREF(tb);
21176  PyErr_Restore(tmp_type, tmp_value, tb);
21177  Py_XDECREF(tmp_tb);
21178 #else
21179  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21180  PyObject* tmp_tb = tstate->curexc_traceback;
21181  if (tb != tmp_tb) {
21182  Py_INCREF(tb);
21183  tstate->curexc_traceback = tb;
21184  Py_XDECREF(tmp_tb);
21185  }
21186 #endif
21187  }
21188 bad:
21189  Py_XDECREF(owned_instance);
21190  return;
21191 }
21192 #endif
21193 
21194 /* PyIntBinop */
21195 #if !CYTHON_COMPILING_IN_PYPY
21196 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
21197  (void)inplace;
21198  (void)zerodivision_check;
21199  #if PY_MAJOR_VERSION < 3
21200  if (likely(PyInt_CheckExact(op1))) {
21201  const long b = intval;
21202  long x;
21203  long a = PyInt_AS_LONG(op1);
21204  x = (long)((unsigned long)a + b);
21205  if (likely((x^a) >= 0 || (x^b) >= 0))
21206  return PyInt_FromLong(x);
21207  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21208  }
21209  #endif
21210  #if CYTHON_USE_PYLONG_INTERNALS
21211  if (likely(PyLong_CheckExact(op1))) {
21212  const long b = intval;
21213  long a, x;
21214 #ifdef HAVE_LONG_LONG
21215  const PY_LONG_LONG llb = intval;
21216  PY_LONG_LONG lla, llx;
21217 #endif
21218  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21219  const Py_ssize_t size = Py_SIZE(op1);
21220  if (likely(__Pyx_sst_abs(size) <= 1)) {
21221  a = likely(size) ? digits[0] : 0;
21222  if (size == -1) a = -a;
21223  } else {
21224  switch (size) {
21225  case -2:
21226  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21227  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21228  break;
21229 #ifdef HAVE_LONG_LONG
21230  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21231  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21232  goto long_long;
21233 #endif
21234  }
21235  CYTHON_FALLTHROUGH;
21236  case 2:
21237  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21238  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21239  break;
21240 #ifdef HAVE_LONG_LONG
21241  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21242  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21243  goto long_long;
21244 #endif
21245  }
21246  CYTHON_FALLTHROUGH;
21247  case -3:
21248  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21249  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21250  break;
21251 #ifdef HAVE_LONG_LONG
21252  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21253  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]));
21254  goto long_long;
21255 #endif
21256  }
21257  CYTHON_FALLTHROUGH;
21258  case 3:
21259  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21260  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21261  break;
21262 #ifdef HAVE_LONG_LONG
21263  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21264  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]));
21265  goto long_long;
21266 #endif
21267  }
21268  CYTHON_FALLTHROUGH;
21269  case -4:
21270  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21271  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21272  break;
21273 #ifdef HAVE_LONG_LONG
21274  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21275  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]));
21276  goto long_long;
21277 #endif
21278  }
21279  CYTHON_FALLTHROUGH;
21280  case 4:
21281  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21282  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21283  break;
21284 #ifdef HAVE_LONG_LONG
21285  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21286  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]));
21287  goto long_long;
21288 #endif
21289  }
21290  CYTHON_FALLTHROUGH;
21291  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21292  }
21293  }
21294  x = a + b;
21295  return PyLong_FromLong(x);
21296 #ifdef HAVE_LONG_LONG
21297  long_long:
21298  llx = lla + llb;
21299  return PyLong_FromLongLong(llx);
21300 #endif
21301 
21302 
21303  }
21304  #endif
21305  if (PyFloat_CheckExact(op1)) {
21306  const long b = intval;
21307  double a = PyFloat_AS_DOUBLE(op1);
21308  double result;
21309  PyFPE_START_PROTECT("add", return NULL)
21310  result = ((double)a) + (double)b;
21311  PyFPE_END_PROTECT(result)
21312  return PyFloat_FromDouble(result);
21313  }
21314  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21315 }
21316 #endif
21317 
21318 /* SetItemInt */
21319 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21320  int r;
21321  if (!j) return -1;
21322  r = PyObject_SetItem(o, j, v);
21323  Py_DECREF(j);
21324  return r;
21325 }
21326 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21327  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21328 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21329  if (is_list || PyList_CheckExact(o)) {
21330  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21331  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
21332  PyObject* old = PyList_GET_ITEM(o, n);
21333  Py_INCREF(v);
21334  PyList_SET_ITEM(o, n, v);
21335  Py_DECREF(old);
21336  return 1;
21337  }
21338  } else {
21339  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21340  if (likely(m && m->sq_ass_item)) {
21341  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21342  Py_ssize_t l = m->sq_length(o);
21343  if (likely(l >= 0)) {
21344  i += l;
21345  } else {
21346  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21347  return -1;
21348  PyErr_Clear();
21349  }
21350  }
21351  return m->sq_ass_item(o, i, v);
21352  }
21353  }
21354 #else
21355 #if CYTHON_COMPILING_IN_PYPY
21356  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
21357 #else
21358  if (is_list || PySequence_Check(o))
21359 #endif
21360  {
21361  return PySequence_SetItem(o, i, v);
21362  }
21363 #endif
21364  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21365 }
21366 
21367 /* PyObjectCall2Args */
21368 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
21369  PyObject *args, *result = NULL;
21370  #if CYTHON_FAST_PYCALL
21371  if (PyFunction_Check(function)) {
21372  PyObject *args[2] = {arg1, arg2};
21373  return __Pyx_PyFunction_FastCall(function, args, 2);
21374  }
21375  #endif
21376  #if CYTHON_FAST_PYCCALL
21377  if (__Pyx_PyFastCFunction_Check(function)) {
21378  PyObject *args[2] = {arg1, arg2};
21379  return __Pyx_PyCFunction_FastCall(function, args, 2);
21380  }
21381  #endif
21382  args = PyTuple_New(2);
21383  if (unlikely(!args)) goto done;
21384  Py_INCREF(arg1);
21385  PyTuple_SET_ITEM(args, 0, arg1);
21386  Py_INCREF(arg2);
21387  PyTuple_SET_ITEM(args, 1, arg2);
21388  Py_INCREF(function);
21389  result = __Pyx_PyObject_Call(function, args, NULL);
21390  Py_DECREF(args);
21391  Py_DECREF(function);
21392 done:
21393  return result;
21394 }
21395 
21396 /* ArgTypeTest */
21397 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21398 {
21399  if (unlikely(!type)) {
21400  PyErr_SetString(PyExc_SystemError, "Missing type object");
21401  return 0;
21402  }
21403  else if (exact) {
21404  #if PY_MAJOR_VERSION == 2
21405  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21406  #endif
21407  }
21408  else {
21409  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21410  }
21411  PyErr_Format(PyExc_TypeError,
21412  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21413  name, type->tp_name, Py_TYPE(obj)->tp_name);
21414  return 0;
21415 }
21416 
21417 /* Import */
21418 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21419  PyObject *empty_list = 0;
21420  PyObject *module = 0;
21421  PyObject *global_dict = 0;
21422  PyObject *empty_dict = 0;
21423  PyObject *list;
21424  #if PY_MAJOR_VERSION < 3
21425  PyObject *py_import;
21426  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21427  if (!py_import)
21428  goto bad;
21429  #endif
21430  if (from_list)
21431  list = from_list;
21432  else {
21433  empty_list = PyList_New(0);
21434  if (!empty_list)
21435  goto bad;
21436  list = empty_list;
21437  }
21438  global_dict = PyModule_GetDict(__pyx_m);
21439  if (!global_dict)
21440  goto bad;
21441  empty_dict = PyDict_New();
21442  if (!empty_dict)
21443  goto bad;
21444  {
21445  #if PY_MAJOR_VERSION >= 3
21446  if (level == -1) {
21447  if (strchr(__Pyx_MODULE_NAME, '.')) {
21448  module = PyImport_ImportModuleLevelObject(
21449  name, global_dict, empty_dict, list, 1);
21450  if (!module) {
21451  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21452  goto bad;
21453  PyErr_Clear();
21454  }
21455  }
21456  level = 0;
21457  }
21458  #endif
21459  if (!module) {
21460  #if PY_MAJOR_VERSION < 3
21461  PyObject *py_level = PyInt_FromLong(level);
21462  if (!py_level)
21463  goto bad;
21464  module = PyObject_CallFunctionObjArgs(py_import,
21465  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
21466  Py_DECREF(py_level);
21467  #else
21468  module = PyImport_ImportModuleLevelObject(
21469  name, global_dict, empty_dict, list, level);
21470  #endif
21471  }
21472  }
21473 bad:
21474  #if PY_MAJOR_VERSION < 3
21475  Py_XDECREF(py_import);
21476  #endif
21477  Py_XDECREF(empty_list);
21478  Py_XDECREF(empty_dict);
21479  return module;
21480 }
21481 
21482 /* PyObject_GenericGetAttrNoDict */
21483 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21484 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21485  PyErr_Format(PyExc_AttributeError,
21486 #if PY_MAJOR_VERSION >= 3
21487  "'%.50s' object has no attribute '%U'",
21488  tp->tp_name, attr_name);
21489 #else
21490  "'%.50s' object has no attribute '%.400s'",
21491  tp->tp_name, PyString_AS_STRING(attr_name));
21492 #endif
21493  return NULL;
21494 }
21495 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21496  PyObject *descr;
21497  PyTypeObject *tp = Py_TYPE(obj);
21498  if (unlikely(!PyString_Check(attr_name))) {
21499  return PyObject_GenericGetAttr(obj, attr_name);
21500  }
21501  assert(!tp->tp_dictoffset);
21502  descr = _PyType_Lookup(tp, attr_name);
21503  if (unlikely(!descr)) {
21504  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21505  }
21506  Py_INCREF(descr);
21507  #if PY_MAJOR_VERSION < 3
21508  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21509  #endif
21510  {
21511  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21512  if (unlikely(f)) {
21513  PyObject *res = f(descr, obj, (PyObject *)tp);
21514  Py_DECREF(descr);
21515  return res;
21516  }
21517  }
21518  return descr;
21519 }
21520 #endif
21521 
21522 /* PyObject_GenericGetAttr */
21523 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21524 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21525  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21526  return PyObject_GenericGetAttr(obj, attr_name);
21527  }
21528  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21529 }
21530 #endif
21531 
21532 /* SetVTable */
21533 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21534 #if PY_VERSION_HEX >= 0x02070000
21535  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21536 #else
21537  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21538 #endif
21539  if (!ob)
21540  goto bad;
21541  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21542  goto bad;
21543  Py_DECREF(ob);
21544  return 0;
21545 bad:
21546  Py_XDECREF(ob);
21547  return -1;
21548 }
21549 
21550 /* SetupReduce */
21551 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21552  int ret;
21553  PyObject *name_attr;
21554  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21555  if (likely(name_attr)) {
21556  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21557  } else {
21558  ret = -1;
21559  }
21560  if (unlikely(ret < 0)) {
21561  PyErr_Clear();
21562  ret = 0;
21563  }
21564  Py_XDECREF(name_attr);
21565  return ret;
21566 }
21567 static int __Pyx_setup_reduce(PyObject* type_obj) {
21568  int ret = 0;
21569  PyObject *object_reduce = NULL;
21570  PyObject *object_reduce_ex = NULL;
21571  PyObject *reduce = NULL;
21572  PyObject *reduce_ex = NULL;
21573  PyObject *reduce_cython = NULL;
21574  PyObject *setstate = NULL;
21575  PyObject *setstate_cython = NULL;
21576 #if CYTHON_USE_PYTYPE_LOOKUP
21577  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21578 #else
21579  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21580 #endif
21581 #if CYTHON_USE_PYTYPE_LOOKUP
21582  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21583 #else
21584  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21585 #endif
21586  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21587  if (reduce_ex == object_reduce_ex) {
21588 #if CYTHON_USE_PYTYPE_LOOKUP
21589  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21590 #else
21591  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21592 #endif
21593  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21594  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21595  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21596  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21597  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21598  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21599  if (!setstate) PyErr_Clear();
21600  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21601  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21602  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21603  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21604  }
21605  PyType_Modified((PyTypeObject*)type_obj);
21606  }
21607  }
21608  goto GOOD;
21609 BAD:
21610  if (!PyErr_Occurred())
21611  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21612  ret = -1;
21613 GOOD:
21614 #if !CYTHON_USE_PYTYPE_LOOKUP
21615  Py_XDECREF(object_reduce);
21616  Py_XDECREF(object_reduce_ex);
21617 #endif
21618  Py_XDECREF(reduce);
21619  Py_XDECREF(reduce_ex);
21620  Py_XDECREF(reduce_cython);
21621  Py_XDECREF(setstate);
21622  Py_XDECREF(setstate_cython);
21623  return ret;
21624 }
21625 
21626 /* PyFloatBinop */
21627 #if !CYTHON_COMPILING_IN_PYPY
21628 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
21629  const double b = floatval;
21630  double a, result;
21631  (void)inplace;
21632  (void)zerodivision_check;
21633  if (likely(PyFloat_CheckExact(op1))) {
21634  a = PyFloat_AS_DOUBLE(op1);
21635 
21636  } else
21637  #if PY_MAJOR_VERSION < 3
21638  if (likely(PyInt_CheckExact(op1))) {
21639  a = (double) PyInt_AS_LONG(op1);
21640 
21641  } else
21642  #endif
21643  if (likely(PyLong_CheckExact(op1))) {
21644  #if CYTHON_USE_PYLONG_INTERNALS
21645  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21646  const Py_ssize_t size = Py_SIZE(op1);
21647  switch (size) {
21648  case 0: a = 0.0; break;
21649  case -1: a = -(double) digits[0]; break;
21650  case 1: a = (double) digits[0]; break;
21651  case -2:
21652  case 2:
21653  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21654  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21655  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21656  if (size == -2)
21657  a = -a;
21658  break;
21659  }
21660  }
21661  CYTHON_FALLTHROUGH;
21662  case -3:
21663  case 3:
21664  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
21665  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21666  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21667  if (size == -3)
21668  a = -a;
21669  break;
21670  }
21671  }
21672  CYTHON_FALLTHROUGH;
21673  case -4:
21674  case 4:
21675  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
21676  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21677  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
21678  if (size == -4)
21679  a = -a;
21680  break;
21681  }
21682  }
21683  CYTHON_FALLTHROUGH;
21684  default:
21685  #else
21686  {
21687  #endif
21688  a = PyLong_AsDouble(op1);
21689  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
21690 
21691  }
21692  } else {
21693  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
21694  }
21695 
21696  PyFPE_START_PROTECT("divide", return NULL)
21697  result = a / b;
21698  PyFPE_END_PROTECT(result)
21699  return PyFloat_FromDouble(result);
21700 }
21701 #endif
21702 
21703 /* BytesEquals */
21704  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
21705 #if CYTHON_COMPILING_IN_PYPY
21706  return PyObject_RichCompareBool(s1, s2, equals);
21707 #else
21708  if (s1 == s2) {
21709  return (equals == Py_EQ);
21710  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
21711  const char *ps1, *ps2;
21712  Py_ssize_t length = PyBytes_GET_SIZE(s1);
21713  if (length != PyBytes_GET_SIZE(s2))
21714  return (equals == Py_NE);
21715  ps1 = PyBytes_AS_STRING(s1);
21716  ps2 = PyBytes_AS_STRING(s2);
21717  if (ps1[0] != ps2[0]) {
21718  return (equals == Py_NE);
21719  } else if (length == 1) {
21720  return (equals == Py_EQ);
21721  } else {
21722  int result;
21723 #if CYTHON_USE_UNICODE_INTERNALS
21724  Py_hash_t hash1, hash2;
21725  hash1 = ((PyBytesObject*)s1)->ob_shash;
21726  hash2 = ((PyBytesObject*)s2)->ob_shash;
21727  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21728  return (equals == Py_NE);
21729  }
21730 #endif
21731  result = memcmp(ps1, ps2, (size_t)length);
21732  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21733  }
21734  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
21735  return (equals == Py_NE);
21736  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
21737  return (equals == Py_NE);
21738  } else {
21739  int result;
21740  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21741  if (!py_result)
21742  return -1;
21743  result = __Pyx_PyObject_IsTrue(py_result);
21744  Py_DECREF(py_result);
21745  return result;
21746  }
21747 #endif
21748 }
21749 
21750 /* UnicodeEquals */
21751  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
21752 #if CYTHON_COMPILING_IN_PYPY
21753  return PyObject_RichCompareBool(s1, s2, equals);
21754 #else
21755 #if PY_MAJOR_VERSION < 3
21756  PyObject* owned_ref = NULL;
21757 #endif
21758  int s1_is_unicode, s2_is_unicode;
21759  if (s1 == s2) {
21760  goto return_eq;
21761  }
21762  s1_is_unicode = PyUnicode_CheckExact(s1);
21763  s2_is_unicode = PyUnicode_CheckExact(s2);
21764 #if PY_MAJOR_VERSION < 3
21765  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
21766  owned_ref = PyUnicode_FromObject(s2);
21767  if (unlikely(!owned_ref))
21768  return -1;
21769  s2 = owned_ref;
21770  s2_is_unicode = 1;
21771  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
21772  owned_ref = PyUnicode_FromObject(s1);
21773  if (unlikely(!owned_ref))
21774  return -1;
21775  s1 = owned_ref;
21776  s1_is_unicode = 1;
21777  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
21778  return __Pyx_PyBytes_Equals(s1, s2, equals);
21779  }
21780 #endif
21781  if (s1_is_unicode & s2_is_unicode) {
21782  Py_ssize_t length;
21783  int kind;
21784  void *data1, *data2;
21785  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
21786  return -1;
21787  length = __Pyx_PyUnicode_GET_LENGTH(s1);
21788  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
21789  goto return_ne;
21790  }
21791 #if CYTHON_USE_UNICODE_INTERNALS
21792  {
21793  Py_hash_t hash1, hash2;
21794  #if CYTHON_PEP393_ENABLED
21795  hash1 = ((PyASCIIObject*)s1)->hash;
21796  hash2 = ((PyASCIIObject*)s2)->hash;
21797  #else
21798  hash1 = ((PyUnicodeObject*)s1)->hash;
21799  hash2 = ((PyUnicodeObject*)s2)->hash;
21800  #endif
21801  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
21802  goto return_ne;
21803  }
21804  }
21805 #endif
21806  kind = __Pyx_PyUnicode_KIND(s1);
21807  if (kind != __Pyx_PyUnicode_KIND(s2)) {
21808  goto return_ne;
21809  }
21810  data1 = __Pyx_PyUnicode_DATA(s1);
21811  data2 = __Pyx_PyUnicode_DATA(s2);
21812  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
21813  goto return_ne;
21814  } else if (length == 1) {
21815  goto return_eq;
21816  } else {
21817  int result = memcmp(data1, data2, (size_t)(length * kind));
21818  #if PY_MAJOR_VERSION < 3
21819  Py_XDECREF(owned_ref);
21820  #endif
21821  return (equals == Py_EQ) ? (result == 0) : (result != 0);
21822  }
21823  } else if ((s1 == Py_None) & s2_is_unicode) {
21824  goto return_ne;
21825  } else if ((s2 == Py_None) & s1_is_unicode) {
21826  goto return_ne;
21827  } else {
21828  int result;
21829  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
21830  #if PY_MAJOR_VERSION < 3
21831  Py_XDECREF(owned_ref);
21832  #endif
21833  if (!py_result)
21834  return -1;
21835  result = __Pyx_PyObject_IsTrue(py_result);
21836  Py_DECREF(py_result);
21837  return result;
21838  }
21839 return_eq:
21840  #if PY_MAJOR_VERSION < 3
21841  Py_XDECREF(owned_ref);
21842  #endif
21843  return (equals == Py_EQ);
21844 return_ne:
21845  #if PY_MAJOR_VERSION < 3
21846  Py_XDECREF(owned_ref);
21847  #endif
21848  return (equals == Py_NE);
21849 #endif
21850 }
21851 
21852 /* CLineInTraceback */
21853  #ifndef CYTHON_CLINE_IN_TRACEBACK
21854 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
21855  PyObject *use_cline;
21856  PyObject *ptype, *pvalue, *ptraceback;
21857 #if CYTHON_COMPILING_IN_CPYTHON
21858  PyObject **cython_runtime_dict;
21859 #endif
21860  if (unlikely(!__pyx_cython_runtime)) {
21861  return c_line;
21862  }
21863  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
21864 #if CYTHON_COMPILING_IN_CPYTHON
21865  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
21866  if (likely(cython_runtime_dict)) {
21867  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
21868  use_cline, *cython_runtime_dict,
21869  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
21870  } else
21871 #endif
21872  {
21873  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
21874  if (use_cline_obj) {
21875  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
21876  Py_DECREF(use_cline_obj);
21877  } else {
21878  PyErr_Clear();
21879  use_cline = NULL;
21880  }
21881  }
21882  if (!use_cline) {
21883  c_line = 0;
21884  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
21885  }
21886  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
21887  c_line = 0;
21888  }
21889  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
21890  return c_line;
21891 }
21892 #endif
21893 
21894 /* CodeObjectCache */
21895  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
21896  int start = 0, mid = 0, end = count - 1;
21897  if (end >= 0 && code_line > entries[end].code_line) {
21898  return count;
21899  }
21900  while (start < end) {
21901  mid = start + (end - start) / 2;
21902  if (code_line < entries[mid].code_line) {
21903  end = mid;
21904  } else if (code_line > entries[mid].code_line) {
21905  start = mid + 1;
21906  } else {
21907  return mid;
21908  }
21909  }
21910  if (code_line <= entries[mid].code_line) {
21911  return mid;
21912  } else {
21913  return mid + 1;
21914  }
21915 }
21916 static PyCodeObject *__pyx_find_code_object(int code_line) {
21917  PyCodeObject* code_object;
21918  int pos;
21919  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
21920  return NULL;
21921  }
21922  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21923  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
21924  return NULL;
21925  }
21926  code_object = __pyx_code_cache.entries[pos].code_object;
21927  Py_INCREF(code_object);
21928  return code_object;
21929 }
21930 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
21931  int pos, i;
21932  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
21933  if (unlikely(!code_line)) {
21934  return;
21935  }
21936  if (unlikely(!entries)) {
21937  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
21938  if (likely(entries)) {
21939  __pyx_code_cache.entries = entries;
21940  __pyx_code_cache.max_count = 64;
21941  __pyx_code_cache.count = 1;
21942  entries[0].code_line = code_line;
21943  entries[0].code_object = code_object;
21944  Py_INCREF(code_object);
21945  }
21946  return;
21947  }
21948  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
21949  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
21950  PyCodeObject* tmp = entries[pos].code_object;
21951  entries[pos].code_object = code_object;
21952  Py_DECREF(tmp);
21953  return;
21954  }
21955  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
21956  int new_max = __pyx_code_cache.max_count + 64;
21957  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
21958  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
21959  if (unlikely(!entries)) {
21960  return;
21961  }
21962  __pyx_code_cache.entries = entries;
21963  __pyx_code_cache.max_count = new_max;
21964  }
21965  for (i=__pyx_code_cache.count; i>pos; i--) {
21966  entries[i] = entries[i-1];
21967  }
21968  entries[pos].code_line = code_line;
21969  entries[pos].code_object = code_object;
21970  __pyx_code_cache.count++;
21971  Py_INCREF(code_object);
21972 }
21973 
21974 /* AddTraceback */
21975  #include "compile.h"
21976 #include "frameobject.h"
21977 #include "traceback.h"
21978 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
21979  const char *funcname, int c_line,
21980  int py_line, const char *filename) {
21981  PyCodeObject *py_code = 0;
21982  PyObject *py_srcfile = 0;
21983  PyObject *py_funcname = 0;
21984  #if PY_MAJOR_VERSION < 3
21985  py_srcfile = PyString_FromString(filename);
21986  #else
21987  py_srcfile = PyUnicode_FromString(filename);
21988  #endif
21989  if (!py_srcfile) goto bad;
21990  if (c_line) {
21991  #if PY_MAJOR_VERSION < 3
21992  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21993  #else
21994  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
21995  #endif
21996  }
21997  else {
21998  #if PY_MAJOR_VERSION < 3
21999  py_funcname = PyString_FromString(funcname);
22000  #else
22001  py_funcname = PyUnicode_FromString(funcname);
22002  #endif
22003  }
22004  if (!py_funcname) goto bad;
22005  py_code = __Pyx_PyCode_New(
22006  0,
22007  0,
22008  0,
22009  0,
22010  0,
22011  __pyx_empty_bytes, /*PyObject *code,*/
22012  __pyx_empty_tuple, /*PyObject *consts,*/
22013  __pyx_empty_tuple, /*PyObject *names,*/
22014  __pyx_empty_tuple, /*PyObject *varnames,*/
22015  __pyx_empty_tuple, /*PyObject *freevars,*/
22016  __pyx_empty_tuple, /*PyObject *cellvars,*/
22017  py_srcfile, /*PyObject *filename,*/
22018  py_funcname, /*PyObject *name,*/
22019  py_line,
22020  __pyx_empty_bytes /*PyObject *lnotab*/
22021  );
22022  Py_DECREF(py_srcfile);
22023  Py_DECREF(py_funcname);
22024  return py_code;
22025 bad:
22026  Py_XDECREF(py_srcfile);
22027  Py_XDECREF(py_funcname);
22028  return NULL;
22029 }
22030 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22031  int py_line, const char *filename) {
22032  PyCodeObject *py_code = 0;
22033  PyFrameObject *py_frame = 0;
22034  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22035  if (c_line) {
22036  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22037  }
22038  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22039  if (!py_code) {
22040  py_code = __Pyx_CreateCodeObjectForTraceback(
22041  funcname, c_line, py_line, filename);
22042  if (!py_code) goto bad;
22043  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22044  }
22045  py_frame = PyFrame_New(
22046  tstate, /*PyThreadState *tstate,*/
22047  py_code, /*PyCodeObject *code,*/
22048  __pyx_d, /*PyObject *globals,*/
22049  0 /*PyObject *locals*/
22050  );
22051  if (!py_frame) goto bad;
22052  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22053  PyTraceBack_Here(py_frame);
22054 bad:
22055  Py_XDECREF(py_code);
22056  Py_XDECREF(py_frame);
22057 }
22058 
22059 /* CIntFromPyVerify */
22060  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22061  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22062 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22063  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22064 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22065  {\
22066  func_type value = func_value;\
22067  if (sizeof(target_type) < sizeof(func_type)) {\
22068  if (unlikely(value != (func_type) (target_type) value)) {\
22069  func_type zero = 0;\
22070  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22071  return (target_type) -1;\
22072  if (is_unsigned && unlikely(value < zero))\
22073  goto raise_neg_overflow;\
22074  else\
22075  goto raise_overflow;\
22076  }\
22077  }\
22078  return (target_type) value;\
22079  }
22080 
22081 /* CIntToPy */
22082  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22083  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22084  const int is_unsigned = neg_one > const_zero;
22085  if (is_unsigned) {
22086  if (sizeof(int) < sizeof(long)) {
22087  return PyInt_FromLong((long) value);
22088  } else if (sizeof(int) <= sizeof(unsigned long)) {
22089  return PyLong_FromUnsignedLong((unsigned long) value);
22090 #ifdef HAVE_LONG_LONG
22091  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22092  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22093 #endif
22094  }
22095  } else {
22096  if (sizeof(int) <= sizeof(long)) {
22097  return PyInt_FromLong((long) value);
22098 #ifdef HAVE_LONG_LONG
22099  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22100  return PyLong_FromLongLong((PY_LONG_LONG) value);
22101 #endif
22102  }
22103  }
22104  {
22105  int one = 1; int little = (int)*(unsigned char *)&one;
22106  unsigned char *bytes = (unsigned char *)&value;
22107  return _PyLong_FromByteArray(bytes, sizeof(int),
22108  little, !is_unsigned);
22109  }
22110 }
22111 
22112 /* CIntFromPy */
22113  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22114  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
22115  const int is_unsigned = neg_one > const_zero;
22116 #if PY_MAJOR_VERSION < 3
22117  if (likely(PyInt_Check(x))) {
22118  if (sizeof(int) < sizeof(long)) {
22119  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22120  } else {
22121  long val = PyInt_AS_LONG(x);
22122  if (is_unsigned && unlikely(val < 0)) {
22123  goto raise_neg_overflow;
22124  }
22125  return (int) val;
22126  }
22127  } else
22128 #endif
22129  if (likely(PyLong_Check(x))) {
22130  if (is_unsigned) {
22131 #if CYTHON_USE_PYLONG_INTERNALS
22132  const digit* digits = ((PyLongObject*)x)->ob_digit;
22133  switch (Py_SIZE(x)) {
22134  case 0: return (int) 0;
22135  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22136  case 2:
22137  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22138  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22139  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22140  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22141  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22142  }
22143  }
22144  break;
22145  case 3:
22146  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22147  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22148  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22149  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22150  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22151  }
22152  }
22153  break;
22154  case 4:
22155  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22156  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22157  __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])))
22158  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22159  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22160  }
22161  }
22162  break;
22163  }
22164 #endif
22165 #if CYTHON_COMPILING_IN_CPYTHON
22166  if (unlikely(Py_SIZE(x) < 0)) {
22167  goto raise_neg_overflow;
22168  }
22169 #else
22170  {
22171  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22172  if (unlikely(result < 0))
22173  return (int) -1;
22174  if (unlikely(result == 1))
22175  goto raise_neg_overflow;
22176  }
22177 #endif
22178  if (sizeof(int) <= sizeof(unsigned long)) {
22179  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22180 #ifdef HAVE_LONG_LONG
22181  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22182  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22183 #endif
22184  }
22185  } else {
22186 #if CYTHON_USE_PYLONG_INTERNALS
22187  const digit* digits = ((PyLongObject*)x)->ob_digit;
22188  switch (Py_SIZE(x)) {
22189  case 0: return (int) 0;
22190  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22191  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22192  case -2:
22193  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22194  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22195  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22196  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22197  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22198  }
22199  }
22200  break;
22201  case 2:
22202  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22203  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22204  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22205  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22206  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22207  }
22208  }
22209  break;
22210  case -3:
22211  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22212  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22213  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22214  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22215  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22216  }
22217  }
22218  break;
22219  case 3:
22220  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22221  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22222  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22223  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22224  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22225  }
22226  }
22227  break;
22228  case -4:
22229  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22230  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22231  __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])))
22232  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22233  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22234  }
22235  }
22236  break;
22237  case 4:
22238  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22239  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22240  __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])))
22241  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22242  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22243  }
22244  }
22245  break;
22246  }
22247 #endif
22248  if (sizeof(int) <= sizeof(long)) {
22249  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22250 #ifdef HAVE_LONG_LONG
22251  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22252  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22253 #endif
22254  }
22255  }
22256  {
22257 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22258  PyErr_SetString(PyExc_RuntimeError,
22259  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22260 #else
22261  int val;
22262  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22263  #if PY_MAJOR_VERSION < 3
22264  if (likely(v) && !PyLong_Check(v)) {
22265  PyObject *tmp = v;
22266  v = PyNumber_Long(tmp);
22267  Py_DECREF(tmp);
22268  }
22269  #endif
22270  if (likely(v)) {
22271  int one = 1; int is_little = (int)*(unsigned char *)&one;
22272  unsigned char *bytes = (unsigned char *)&val;
22273  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22274  bytes, sizeof(val),
22275  is_little, !is_unsigned);
22276  Py_DECREF(v);
22277  if (likely(!ret))
22278  return val;
22279  }
22280 #endif
22281  return (int) -1;
22282  }
22283  } else {
22284  int val;
22285  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22286  if (!tmp) return (int) -1;
22287  val = __Pyx_PyInt_As_int(tmp);
22288  Py_DECREF(tmp);
22289  return val;
22290  }
22291 raise_overflow:
22292  PyErr_SetString(PyExc_OverflowError,
22293  "value too large to convert to int");
22294  return (int) -1;
22295 raise_neg_overflow:
22296  PyErr_SetString(PyExc_OverflowError,
22297  "can't convert negative value to int");
22298  return (int) -1;
22299 }
22300 
22301 /* CIntToPy */
22302  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22303  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22304  const int is_unsigned = neg_one > const_zero;
22305  if (is_unsigned) {
22306  if (sizeof(long) < sizeof(long)) {
22307  return PyInt_FromLong((long) value);
22308  } else if (sizeof(long) <= sizeof(unsigned long)) {
22309  return PyLong_FromUnsignedLong((unsigned long) value);
22310 #ifdef HAVE_LONG_LONG
22311  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22312  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22313 #endif
22314  }
22315  } else {
22316  if (sizeof(long) <= sizeof(long)) {
22317  return PyInt_FromLong((long) value);
22318 #ifdef HAVE_LONG_LONG
22319  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22320  return PyLong_FromLongLong((PY_LONG_LONG) value);
22321 #endif
22322  }
22323  }
22324  {
22325  int one = 1; int little = (int)*(unsigned char *)&one;
22326  unsigned char *bytes = (unsigned char *)&value;
22327  return _PyLong_FromByteArray(bytes, sizeof(long),
22328  little, !is_unsigned);
22329  }
22330 }
22331 
22332 /* CIntFromPy */
22333  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22334  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
22335  const int is_unsigned = neg_one > const_zero;
22336 #if PY_MAJOR_VERSION < 3
22337  if (likely(PyInt_Check(x))) {
22338  if (sizeof(long) < sizeof(long)) {
22339  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22340  } else {
22341  long val = PyInt_AS_LONG(x);
22342  if (is_unsigned && unlikely(val < 0)) {
22343  goto raise_neg_overflow;
22344  }
22345  return (long) val;
22346  }
22347  } else
22348 #endif
22349  if (likely(PyLong_Check(x))) {
22350  if (is_unsigned) {
22351 #if CYTHON_USE_PYLONG_INTERNALS
22352  const digit* digits = ((PyLongObject*)x)->ob_digit;
22353  switch (Py_SIZE(x)) {
22354  case 0: return (long) 0;
22355  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22356  case 2:
22357  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22358  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22359  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22360  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22361  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22362  }
22363  }
22364  break;
22365  case 3:
22366  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22367  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22368  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22369  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22370  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22371  }
22372  }
22373  break;
22374  case 4:
22375  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22376  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22377  __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])))
22378  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22379  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22380  }
22381  }
22382  break;
22383  }
22384 #endif
22385 #if CYTHON_COMPILING_IN_CPYTHON
22386  if (unlikely(Py_SIZE(x) < 0)) {
22387  goto raise_neg_overflow;
22388  }
22389 #else
22390  {
22391  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22392  if (unlikely(result < 0))
22393  return (long) -1;
22394  if (unlikely(result == 1))
22395  goto raise_neg_overflow;
22396  }
22397 #endif
22398  if (sizeof(long) <= sizeof(unsigned long)) {
22399  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22400 #ifdef HAVE_LONG_LONG
22401  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22402  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22403 #endif
22404  }
22405  } else {
22406 #if CYTHON_USE_PYLONG_INTERNALS
22407  const digit* digits = ((PyLongObject*)x)->ob_digit;
22408  switch (Py_SIZE(x)) {
22409  case 0: return (long) 0;
22410  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22411  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22412  case -2:
22413  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22414  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22415  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22416  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22417  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22418  }
22419  }
22420  break;
22421  case 2:
22422  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22423  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22424  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22425  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22426  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22427  }
22428  }
22429  break;
22430  case -3:
22431  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22432  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22433  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22434  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22435  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22436  }
22437  }
22438  break;
22439  case 3:
22440  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22441  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22442  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22443  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22444  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22445  }
22446  }
22447  break;
22448  case -4:
22449  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22450  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22451  __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])))
22452  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22453  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22454  }
22455  }
22456  break;
22457  case 4:
22458  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22459  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22460  __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])))
22461  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22462  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22463  }
22464  }
22465  break;
22466  }
22467 #endif
22468  if (sizeof(long) <= sizeof(long)) {
22469  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22470 #ifdef HAVE_LONG_LONG
22471  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22472  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22473 #endif
22474  }
22475  }
22476  {
22477 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22478  PyErr_SetString(PyExc_RuntimeError,
22479  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22480 #else
22481  long val;
22482  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22483  #if PY_MAJOR_VERSION < 3
22484  if (likely(v) && !PyLong_Check(v)) {
22485  PyObject *tmp = v;
22486  v = PyNumber_Long(tmp);
22487  Py_DECREF(tmp);
22488  }
22489  #endif
22490  if (likely(v)) {
22491  int one = 1; int is_little = (int)*(unsigned char *)&one;
22492  unsigned char *bytes = (unsigned char *)&val;
22493  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22494  bytes, sizeof(val),
22495  is_little, !is_unsigned);
22496  Py_DECREF(v);
22497  if (likely(!ret))
22498  return val;
22499  }
22500 #endif
22501  return (long) -1;
22502  }
22503  } else {
22504  long val;
22505  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22506  if (!tmp) return (long) -1;
22507  val = __Pyx_PyInt_As_long(tmp);
22508  Py_DECREF(tmp);
22509  return val;
22510  }
22511 raise_overflow:
22512  PyErr_SetString(PyExc_OverflowError,
22513  "value too large to convert to long");
22514  return (long) -1;
22515 raise_neg_overflow:
22516  PyErr_SetString(PyExc_OverflowError,
22517  "can't convert negative value to long");
22518  return (long) -1;
22519 }
22520 
22521 /* FastTypeChecks */
22522  #if CYTHON_COMPILING_IN_CPYTHON
22523 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22524  while (a) {
22525  a = a->tp_base;
22526  if (a == b)
22527  return 1;
22528  }
22529  return b == &PyBaseObject_Type;
22530 }
22531 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22532  PyObject *mro;
22533  if (a == b) return 1;
22534  mro = a->tp_mro;
22535  if (likely(mro)) {
22536  Py_ssize_t i, n;
22537  n = PyTuple_GET_SIZE(mro);
22538  for (i = 0; i < n; i++) {
22539  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22540  return 1;
22541  }
22542  return 0;
22543  }
22544  return __Pyx_InBases(a, b);
22545 }
22546 #if PY_MAJOR_VERSION == 2
22547 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22548  PyObject *exception, *value, *tb;
22549  int res;
22550  __Pyx_PyThreadState_declare
22551  __Pyx_PyThreadState_assign
22552  __Pyx_ErrFetch(&exception, &value, &tb);
22553  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22554  if (unlikely(res == -1)) {
22555  PyErr_WriteUnraisable(err);
22556  res = 0;
22557  }
22558  if (!res) {
22559  res = PyObject_IsSubclass(err, exc_type2);
22560  if (unlikely(res == -1)) {
22561  PyErr_WriteUnraisable(err);
22562  res = 0;
22563  }
22564  }
22565  __Pyx_ErrRestore(exception, value, tb);
22566  return res;
22567 }
22568 #else
22569 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22570  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22571  if (!res) {
22572  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22573  }
22574  return res;
22575 }
22576 #endif
22577 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22578  Py_ssize_t i, n;
22579  assert(PyExceptionClass_Check(exc_type));
22580  n = PyTuple_GET_SIZE(tuple);
22581 #if PY_MAJOR_VERSION >= 3
22582  for (i=0; i<n; i++) {
22583  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22584  }
22585 #endif
22586  for (i=0; i<n; i++) {
22587  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22588  #if PY_MAJOR_VERSION < 3
22589  if (likely(exc_type == t)) return 1;
22590  #endif
22591  if (likely(PyExceptionClass_Check(t))) {
22592  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22593  } else {
22594  }
22595  }
22596  return 0;
22597 }
22598 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22599  if (likely(err == exc_type)) return 1;
22600  if (likely(PyExceptionClass_Check(err))) {
22601  if (likely(PyExceptionClass_Check(exc_type))) {
22602  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22603  } else if (likely(PyTuple_Check(exc_type))) {
22604  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22605  } else {
22606  }
22607  }
22608  return PyErr_GivenExceptionMatches(err, exc_type);
22609 }
22610 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22611  assert(PyExceptionClass_Check(exc_type1));
22612  assert(PyExceptionClass_Check(exc_type2));
22613  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22614  if (likely(PyExceptionClass_Check(err))) {
22615  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22616  }
22617  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22618 }
22619 #endif
22620 
22621 /* FetchCommonType */
22622  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22623  PyObject* fake_module;
22624  PyTypeObject* cached_type = NULL;
22625  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22626  if (!fake_module) return NULL;
22627  Py_INCREF(fake_module);
22628  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22629  if (cached_type) {
22630  if (!PyType_Check((PyObject*)cached_type)) {
22631  PyErr_Format(PyExc_TypeError,
22632  "Shared Cython type %.200s is not a type object",
22633  type->tp_name);
22634  goto bad;
22635  }
22636  if (cached_type->tp_basicsize != type->tp_basicsize) {
22637  PyErr_Format(PyExc_TypeError,
22638  "Shared Cython type %.200s has the wrong size, try recompiling",
22639  type->tp_name);
22640  goto bad;
22641  }
22642  } else {
22643  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22644  PyErr_Clear();
22645  if (PyType_Ready(type) < 0) goto bad;
22646  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22647  goto bad;
22648  Py_INCREF(type);
22649  cached_type = type;
22650  }
22651 done:
22652  Py_DECREF(fake_module);
22653  return cached_type;
22654 bad:
22655  Py_XDECREF(cached_type);
22656  cached_type = NULL;
22657  goto done;
22658 }
22659 
22660 /* SwapException */
22661  #if CYTHON_FAST_THREAD_STATE
22662 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
22663  PyObject *tmp_type, *tmp_value, *tmp_tb;
22664  #if CYTHON_USE_EXC_INFO_STACK
22665  _PyErr_StackItem *exc_info = tstate->exc_info;
22666  tmp_type = exc_info->exc_type;
22667  tmp_value = exc_info->exc_value;
22668  tmp_tb = exc_info->exc_traceback;
22669  exc_info->exc_type = *type;
22670  exc_info->exc_value = *value;
22671  exc_info->exc_traceback = *tb;
22672  #else
22673  tmp_type = tstate->exc_type;
22674  tmp_value = tstate->exc_value;
22675  tmp_tb = tstate->exc_traceback;
22676  tstate->exc_type = *type;
22677  tstate->exc_value = *value;
22678  tstate->exc_traceback = *tb;
22679  #endif
22680  *type = tmp_type;
22681  *value = tmp_value;
22682  *tb = tmp_tb;
22683 }
22684 #else
22685 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
22686  PyObject *tmp_type, *tmp_value, *tmp_tb;
22687  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
22688  PyErr_SetExcInfo(*type, *value, *tb);
22689  *type = tmp_type;
22690  *value = tmp_value;
22691  *tb = tmp_tb;
22692 }
22693 #endif
22694 
22695 /* PyObjectGetMethod */
22696  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
22697  PyObject *attr;
22698 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
22699  PyTypeObject *tp = Py_TYPE(obj);
22700  PyObject *descr;
22701  descrgetfunc f = NULL;
22702  PyObject **dictptr, *dict;
22703  int meth_found = 0;
22704  assert (*method == NULL);
22705  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
22706  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22707  goto try_unpack;
22708  }
22709  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
22710  return 0;
22711  }
22712  descr = _PyType_Lookup(tp, name);
22713  if (likely(descr != NULL)) {
22714  Py_INCREF(descr);
22715 #if PY_MAJOR_VERSION >= 3
22716  #ifdef __Pyx_CyFunction_USED
22717  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
22718  #else
22719  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
22720  #endif
22721 #else
22722  #ifdef __Pyx_CyFunction_USED
22723  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
22724  #else
22725  if (likely(PyFunction_Check(descr)))
22726  #endif
22727 #endif
22728  {
22729  meth_found = 1;
22730  } else {
22731  f = Py_TYPE(descr)->tp_descr_get;
22732  if (f != NULL && PyDescr_IsData(descr)) {
22733  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22734  Py_DECREF(descr);
22735  goto try_unpack;
22736  }
22737  }
22738  }
22739  dictptr = _PyObject_GetDictPtr(obj);
22740  if (dictptr != NULL && (dict = *dictptr) != NULL) {
22741  Py_INCREF(dict);
22742  attr = __Pyx_PyDict_GetItemStr(dict, name);
22743  if (attr != NULL) {
22744  Py_INCREF(attr);
22745  Py_DECREF(dict);
22746  Py_XDECREF(descr);
22747  goto try_unpack;
22748  }
22749  Py_DECREF(dict);
22750  }
22751  if (meth_found) {
22752  *method = descr;
22753  return 1;
22754  }
22755  if (f != NULL) {
22756  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
22757  Py_DECREF(descr);
22758  goto try_unpack;
22759  }
22760  if (descr != NULL) {
22761  *method = descr;
22762  return 0;
22763  }
22764  PyErr_Format(PyExc_AttributeError,
22765 #if PY_MAJOR_VERSION >= 3
22766  "'%.50s' object has no attribute '%U'",
22767  tp->tp_name, name);
22768 #else
22769  "'%.50s' object has no attribute '%.400s'",
22770  tp->tp_name, PyString_AS_STRING(name));
22771 #endif
22772  return 0;
22773 #else
22774  attr = __Pyx_PyObject_GetAttrStr(obj, name);
22775  goto try_unpack;
22776 #endif
22777 try_unpack:
22778 #if CYTHON_UNPACK_METHODS
22779  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
22780  PyObject *function = PyMethod_GET_FUNCTION(attr);
22781  Py_INCREF(function);
22782  Py_DECREF(attr);
22783  *method = function;
22784  return 1;
22785  }
22786 #endif
22787  *method = attr;
22788  return 0;
22789 }
22790 
22791 /* PyObjectCallMethod1 */
22792  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
22793  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
22794  Py_DECREF(method);
22795  return result;
22796 }
22797 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
22798  PyObject *method = NULL, *result;
22799  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
22800  if (likely(is_method)) {
22801  result = __Pyx_PyObject_Call2Args(method, obj, arg);
22802  Py_DECREF(method);
22803  return result;
22804  }
22805  if (unlikely(!method)) return NULL;
22806  return __Pyx__PyObject_CallMethod1(method, arg);
22807 }
22808 
22809 /* CoroutineBase */
22810  #include <structmember.h>
22811 #include <frameobject.h>
22812 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
22813 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
22814  PyObject *et, *ev, *tb;
22815  PyObject *value = NULL;
22816  __Pyx_ErrFetch(&et, &ev, &tb);
22817  if (!et) {
22818  Py_XDECREF(tb);
22819  Py_XDECREF(ev);
22820  Py_INCREF(Py_None);
22821  *pvalue = Py_None;
22822  return 0;
22823  }
22824  if (likely(et == PyExc_StopIteration)) {
22825  if (!ev) {
22826  Py_INCREF(Py_None);
22827  value = Py_None;
22828  }
22829 #if PY_VERSION_HEX >= 0x030300A0
22830  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
22831  value = ((PyStopIterationObject *)ev)->value;
22832  Py_INCREF(value);
22833  Py_DECREF(ev);
22834  }
22835 #endif
22836  else if (unlikely(PyTuple_Check(ev))) {
22837  if (PyTuple_GET_SIZE(ev) >= 1) {
22838 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22839  value = PyTuple_GET_ITEM(ev, 0);
22840  Py_INCREF(value);
22841 #else
22842  value = PySequence_ITEM(ev, 0);
22843 #endif
22844  } else {
22845  Py_INCREF(Py_None);
22846  value = Py_None;
22847  }
22848  Py_DECREF(ev);
22849  }
22850  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
22851  value = ev;
22852  }
22853  if (likely(value)) {
22854  Py_XDECREF(tb);
22855  Py_DECREF(et);
22856  *pvalue = value;
22857  return 0;
22858  }
22859  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
22860  __Pyx_ErrRestore(et, ev, tb);
22861  return -1;
22862  }
22863  PyErr_NormalizeException(&et, &ev, &tb);
22864  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
22865  __Pyx_ErrRestore(et, ev, tb);
22866  return -1;
22867  }
22868  Py_XDECREF(tb);
22869  Py_DECREF(et);
22870 #if PY_VERSION_HEX >= 0x030300A0
22871  value = ((PyStopIterationObject *)ev)->value;
22872  Py_INCREF(value);
22873  Py_DECREF(ev);
22874 #else
22875  {
22876  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
22877  Py_DECREF(ev);
22878  if (likely(args)) {
22879  value = PySequence_GetItem(args, 0);
22880  Py_DECREF(args);
22881  }
22882  if (unlikely(!value)) {
22883  __Pyx_ErrRestore(NULL, NULL, NULL);
22884  Py_INCREF(Py_None);
22885  value = Py_None;
22886  }
22887  }
22888 #endif
22889  *pvalue = value;
22890  return 0;
22891 }
22892 static CYTHON_INLINE
22893 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
22894  PyObject *t, *v, *tb;
22895  t = exc_state->exc_type;
22896  v = exc_state->exc_value;
22897  tb = exc_state->exc_traceback;
22898  exc_state->exc_type = NULL;
22899  exc_state->exc_value = NULL;
22900  exc_state->exc_traceback = NULL;
22901  Py_XDECREF(t);
22902  Py_XDECREF(v);
22903  Py_XDECREF(tb);
22904 }
22905 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
22906 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
22907  const char *msg;
22908  if ((0)) {
22909  #ifdef __Pyx_Coroutine_USED
22910  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
22911  msg = "coroutine already executing";
22912  #endif
22913  #ifdef __Pyx_AsyncGen_USED
22914  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
22915  msg = "async generator already executing";
22916  #endif
22917  } else {
22918  msg = "generator already executing";
22919  }
22920  PyErr_SetString(PyExc_ValueError, msg);
22921 }
22922 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
22923 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
22924  const char *msg;
22925  if ((0)) {
22926  #ifdef __Pyx_Coroutine_USED
22927  } else if (__Pyx_Coroutine_Check(gen)) {
22928  msg = "can't send non-None value to a just-started coroutine";
22929  #endif
22930  #ifdef __Pyx_AsyncGen_USED
22931  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
22932  msg = "can't send non-None value to a just-started async generator";
22933  #endif
22934  } else {
22935  msg = "can't send non-None value to a just-started generator";
22936  }
22937  PyErr_SetString(PyExc_TypeError, msg);
22938 }
22939 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
22940 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
22941  #ifdef __Pyx_Coroutine_USED
22942  if (!closing && __Pyx_Coroutine_Check(gen)) {
22943  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
22944  } else
22945  #endif
22946  if (value) {
22947  #ifdef __Pyx_AsyncGen_USED
22948  if (__Pyx_AsyncGen_CheckExact(gen))
22949  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
22950  else
22951  #endif
22952  PyErr_SetNone(PyExc_StopIteration);
22953  }
22954 }
22955 static
22956 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
22957  __Pyx_PyThreadState_declare
22958  PyThreadState *tstate;
22959  __Pyx_ExcInfoStruct *exc_state;
22960  PyObject *retval;
22961  assert(!self->is_running);
22962  if (unlikely(self->resume_label == 0)) {
22963  if (unlikely(value && value != Py_None)) {
22964  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
22965  }
22966  }
22967  if (unlikely(self->resume_label == -1)) {
22968  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
22969  }
22970 #if CYTHON_FAST_THREAD_STATE
22971  __Pyx_PyThreadState_assign
22972  tstate = __pyx_tstate;
22973 #else
22974  tstate = __Pyx_PyThreadState_Current;
22975 #endif
22976  exc_state = &self->gi_exc_state;
22977  if (exc_state->exc_type) {
22978  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
22979  #else
22980  if (exc_state->exc_traceback) {
22981  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
22982  PyFrameObject *f = tb->tb_frame;
22983  Py_XINCREF(tstate->frame);
22984  assert(f->f_back == NULL);
22985  f->f_back = tstate->frame;
22986  }
22987  #endif
22988  }
22989 #if CYTHON_USE_EXC_INFO_STACK
22990  exc_state->previous_item = tstate->exc_info;
22991  tstate->exc_info = exc_state;
22992 #else
22993  if (exc_state->exc_type) {
22994  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22995  } else {
22996  __Pyx_Coroutine_ExceptionClear(exc_state);
22997  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
22998  }
22999 #endif
23000  self->is_running = 1;
23001  retval = self->body((PyObject *) self, tstate, value);
23002  self->is_running = 0;
23003 #if CYTHON_USE_EXC_INFO_STACK
23004  exc_state = &self->gi_exc_state;
23005  tstate->exc_info = exc_state->previous_item;
23006  exc_state->previous_item = NULL;
23007  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
23008 #endif
23009  return retval;
23010 }
23011 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
23012  PyObject *exc_tb = exc_state->exc_traceback;
23013  if (likely(exc_tb)) {
23014 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23015 #else
23016  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
23017  PyFrameObject *f = tb->tb_frame;
23018  Py_CLEAR(f->f_back);
23019 #endif
23020  }
23021 }
23022 static CYTHON_INLINE
23023 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23024  if (unlikely(!retval)) {
23025  __Pyx_PyThreadState_declare
23026  __Pyx_PyThreadState_assign
23027  if (!__Pyx_PyErr_Occurred()) {
23028  PyObject *exc = PyExc_StopIteration;
23029  #ifdef __Pyx_AsyncGen_USED
23030  if (__Pyx_AsyncGen_CheckExact(gen))
23031  exc = __Pyx_PyExc_StopAsyncIteration;
23032  #endif
23033  __Pyx_PyErr_SetNone(exc);
23034  }
23035  }
23036  return retval;
23037 }
23038 static CYTHON_INLINE
23039 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23040  PyObject *ret;
23041  PyObject *val = NULL;
23042  __Pyx_Coroutine_Undelegate(gen);
23043  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23044  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23045  Py_XDECREF(val);
23046  return ret;
23047 }
23048 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23049  PyObject *retval;
23050  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23051  PyObject *yf = gen->yieldfrom;
23052  if (unlikely(gen->is_running))
23053  return __Pyx_Coroutine_AlreadyRunningError(gen);
23054  if (yf) {
23055  PyObject *ret;
23056  gen->is_running = 1;
23057  #ifdef __Pyx_Generator_USED
23058  if (__Pyx_Generator_CheckExact(yf)) {
23059  ret = __Pyx_Coroutine_Send(yf, value);
23060  } else
23061  #endif
23062  #ifdef __Pyx_Coroutine_USED
23063  if (__Pyx_Coroutine_Check(yf)) {
23064  ret = __Pyx_Coroutine_Send(yf, value);
23065  } else
23066  #endif
23067  #ifdef __Pyx_AsyncGen_USED
23068  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23069  ret = __Pyx_async_gen_asend_send(yf, value);
23070  } else
23071  #endif
23072  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23073  if (PyGen_CheckExact(yf)) {
23074  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23075  } else
23076  #endif
23077  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23078  if (PyCoro_CheckExact(yf)) {
23079  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23080  } else
23081  #endif
23082  {
23083  if (value == Py_None)
23084  ret = Py_TYPE(yf)->tp_iternext(yf);
23085  else
23086  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23087  }
23088  gen->is_running = 0;
23089  if (likely(ret)) {
23090  return ret;
23091  }
23092  retval = __Pyx_Coroutine_FinishDelegation(gen);
23093  } else {
23094  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23095  }
23096  return __Pyx_Coroutine_MethodReturn(self, retval);
23097 }
23098 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23099  PyObject *retval = NULL;
23100  int err = 0;
23101  #ifdef __Pyx_Generator_USED
23102  if (__Pyx_Generator_CheckExact(yf)) {
23103  retval = __Pyx_Coroutine_Close(yf);
23104  if (!retval)
23105  return -1;
23106  } else
23107  #endif
23108  #ifdef __Pyx_Coroutine_USED
23109  if (__Pyx_Coroutine_Check(yf)) {
23110  retval = __Pyx_Coroutine_Close(yf);
23111  if (!retval)
23112  return -1;
23113  } else
23114  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23115  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
23116  if (!retval)
23117  return -1;
23118  } else
23119  #endif
23120  #ifdef __Pyx_AsyncGen_USED
23121  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23122  retval = __Pyx_async_gen_asend_close(yf, NULL);
23123  } else
23124  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23125  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23126  } else
23127  #endif
23128  {
23129  PyObject *meth;
23130  gen->is_running = 1;
23131  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23132  if (unlikely(!meth)) {
23133  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23134  PyErr_WriteUnraisable(yf);
23135  }
23136  PyErr_Clear();
23137  } else {
23138  retval = PyObject_CallFunction(meth, NULL);
23139  Py_DECREF(meth);
23140  if (!retval)
23141  err = -1;
23142  }
23143  gen->is_running = 0;
23144  }
23145  Py_XDECREF(retval);
23146  return err;
23147 }
23148 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23149  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23150  PyObject *yf = gen->yieldfrom;
23151  if (unlikely(gen->is_running))
23152  return __Pyx_Coroutine_AlreadyRunningError(gen);
23153  if (yf) {
23154  PyObject *ret;
23155  gen->is_running = 1;
23156  #ifdef __Pyx_Generator_USED
23157  if (__Pyx_Generator_CheckExact(yf)) {
23158  ret = __Pyx_Generator_Next(yf);
23159  } else
23160  #endif
23161  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23162  if (PyGen_CheckExact(yf)) {
23163  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23164  } else
23165  #endif
23166  #ifdef __Pyx_Coroutine_USED
23167  if (__Pyx_Coroutine_Check(yf)) {
23168  ret = __Pyx_Coroutine_Send(yf, Py_None);
23169  } else
23170  #endif
23171  ret = Py_TYPE(yf)->tp_iternext(yf);
23172  gen->is_running = 0;
23173  if (likely(ret)) {
23174  return ret;
23175  }
23176  return __Pyx_Coroutine_FinishDelegation(gen);
23177  }
23178  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23179 }
23180 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
23181  return __Pyx_Coroutine_Close(self);
23182 }
23183 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23184  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23185  PyObject *retval, *raised_exception;
23186  PyObject *yf = gen->yieldfrom;
23187  int err = 0;
23188  if (unlikely(gen->is_running))
23189  return __Pyx_Coroutine_AlreadyRunningError(gen);
23190  if (yf) {
23191  Py_INCREF(yf);
23192  err = __Pyx_Coroutine_CloseIter(gen, yf);
23193  __Pyx_Coroutine_Undelegate(gen);
23194  Py_DECREF(yf);
23195  }
23196  if (err == 0)
23197  PyErr_SetNone(PyExc_GeneratorExit);
23198  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23199  if (unlikely(retval)) {
23200  const char *msg;
23201  Py_DECREF(retval);
23202  if ((0)) {
23203  #ifdef __Pyx_Coroutine_USED
23204  } else if (__Pyx_Coroutine_Check(self)) {
23205  msg = "coroutine ignored GeneratorExit";
23206  #endif
23207  #ifdef __Pyx_AsyncGen_USED
23208  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23209 #if PY_VERSION_HEX < 0x03060000
23210  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23211 #else
23212  msg = "async generator ignored GeneratorExit";
23213 #endif
23214  #endif
23215  } else {
23216  msg = "generator ignored GeneratorExit";
23217  }
23218  PyErr_SetString(PyExc_RuntimeError, msg);
23219  return NULL;
23220  }
23221  raised_exception = PyErr_Occurred();
23222  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23223  if (raised_exception) PyErr_Clear();
23224  Py_INCREF(Py_None);
23225  return Py_None;
23226  }
23227  return NULL;
23228 }
23229 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23230  PyObject *args, int close_on_genexit) {
23231  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23232  PyObject *yf = gen->yieldfrom;
23233  if (unlikely(gen->is_running))
23234  return __Pyx_Coroutine_AlreadyRunningError(gen);
23235  if (yf) {
23236  PyObject *ret;
23237  Py_INCREF(yf);
23238  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23239  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23240  Py_DECREF(yf);
23241  __Pyx_Coroutine_Undelegate(gen);
23242  if (err < 0)
23243  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23244  goto throw_here;
23245  }
23246  gen->is_running = 1;
23247  if (0
23248  #ifdef __Pyx_Generator_USED
23249  || __Pyx_Generator_CheckExact(yf)
23250  #endif
23251  #ifdef __Pyx_Coroutine_USED
23252  || __Pyx_Coroutine_Check(yf)
23253  #endif
23254  ) {
23255  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23256  #ifdef __Pyx_Coroutine_USED
23257  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23258  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23259  #endif
23260  } else {
23261  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23262  if (unlikely(!meth)) {
23263  Py_DECREF(yf);
23264  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23265  gen->is_running = 0;
23266  return NULL;
23267  }
23268  PyErr_Clear();
23269  __Pyx_Coroutine_Undelegate(gen);
23270  gen->is_running = 0;
23271  goto throw_here;
23272  }
23273  if (likely(args)) {
23274  ret = PyObject_CallObject(meth, args);
23275  } else {
23276  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23277  }
23278  Py_DECREF(meth);
23279  }
23280  gen->is_running = 0;
23281  Py_DECREF(yf);
23282  if (!ret) {
23283  ret = __Pyx_Coroutine_FinishDelegation(gen);
23284  }
23285  return __Pyx_Coroutine_MethodReturn(self, ret);
23286  }
23287 throw_here:
23288  __Pyx_Raise(typ, val, tb, NULL);
23289  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23290 }
23291 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23292  PyObject *typ;
23293  PyObject *val = NULL;
23294  PyObject *tb = NULL;
23295  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23296  return NULL;
23297  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23298 }
23299 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
23300  Py_VISIT(exc_state->exc_type);
23301  Py_VISIT(exc_state->exc_value);
23302  Py_VISIT(exc_state->exc_traceback);
23303  return 0;
23304 }
23305 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23306  Py_VISIT(gen->closure);
23307  Py_VISIT(gen->classobj);
23308  Py_VISIT(gen->yieldfrom);
23309  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
23310 }
23311 static int __Pyx_Coroutine_clear(PyObject *self) {
23312  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23313  Py_CLEAR(gen->closure);
23314  Py_CLEAR(gen->classobj);
23315  Py_CLEAR(gen->yieldfrom);
23316  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
23317 #ifdef __Pyx_AsyncGen_USED
23318  if (__Pyx_AsyncGen_CheckExact(self)) {
23319  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23320  }
23321 #endif
23322  Py_CLEAR(gen->gi_code);
23323  Py_CLEAR(gen->gi_name);
23324  Py_CLEAR(gen->gi_qualname);
23325  Py_CLEAR(gen->gi_modulename);
23326  return 0;
23327 }
23328 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23329  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23330  PyObject_GC_UnTrack(gen);
23331  if (gen->gi_weakreflist != NULL)
23332  PyObject_ClearWeakRefs(self);
23333  if (gen->resume_label >= 0) {
23334  PyObject_GC_Track(self);
23335 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23336  if (PyObject_CallFinalizerFromDealloc(self))
23337 #else
23338  Py_TYPE(gen)->tp_del(self);
23339  if (self->ob_refcnt > 0)
23340 #endif
23341  {
23342  return;
23343  }
23344  PyObject_GC_UnTrack(self);
23345  }
23346 #ifdef __Pyx_AsyncGen_USED
23347  if (__Pyx_AsyncGen_CheckExact(self)) {
23348  /* We have to handle this case for asynchronous generators
23349  right here, because this code has to be between UNTRACK
23350  and GC_Del. */
23351  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23352  }
23353 #endif
23354  __Pyx_Coroutine_clear(self);
23355  PyObject_GC_Del(gen);
23356 }
23357 static void __Pyx_Coroutine_del(PyObject *self) {
23358  PyObject *error_type, *error_value, *error_traceback;
23359  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23360  __Pyx_PyThreadState_declare
23361  if (gen->resume_label < 0) {
23362  return;
23363  }
23364 #if !CYTHON_USE_TP_FINALIZE
23365  assert(self->ob_refcnt == 0);
23366  self->ob_refcnt = 1;
23367 #endif
23368  __Pyx_PyThreadState_assign
23369  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23370 #ifdef __Pyx_AsyncGen_USED
23371  if (__Pyx_AsyncGen_CheckExact(self)) {
23372  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23373  PyObject *finalizer = agen->ag_finalizer;
23374  if (finalizer && !agen->ag_closed) {
23375  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23376  if (unlikely(!res)) {
23377  PyErr_WriteUnraisable(self);
23378  } else {
23379  Py_DECREF(res);
23380  }
23381  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23382  return;
23383  }
23384  }
23385 #endif
23386  if (unlikely(gen->resume_label == 0 && !error_value)) {
23387 #ifdef __Pyx_Coroutine_USED
23388 #ifdef __Pyx_Generator_USED
23389  if (!__Pyx_Generator_CheckExact(self))
23390 #endif
23391  {
23392  PyObject_GC_UnTrack(self);
23393 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23394  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23395  PyErr_WriteUnraisable(self);
23396 #else
23397  {PyObject *msg;
23398  char *cmsg;
23399  #if CYTHON_COMPILING_IN_PYPY
23400  msg = NULL;
23401  cmsg = (char*) "coroutine was never awaited";
23402  #else
23403  char *cname;
23404  PyObject *qualname;
23405  qualname = gen->gi_qualname;
23406  cname = PyString_AS_STRING(qualname);
23407  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23408  if (unlikely(!msg)) {
23409  PyErr_Clear();
23410  cmsg = (char*) "coroutine was never awaited";
23411  } else {
23412  cmsg = PyString_AS_STRING(msg);
23413  }
23414  #endif
23415  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23416  PyErr_WriteUnraisable(self);
23417  Py_XDECREF(msg);}
23418 #endif
23419  PyObject_GC_Track(self);
23420  }
23421 #endif
23422  } else {
23423  PyObject *res = __Pyx_Coroutine_Close(self);
23424  if (unlikely(!res)) {
23425  if (PyErr_Occurred())
23426  PyErr_WriteUnraisable(self);
23427  } else {
23428  Py_DECREF(res);
23429  }
23430  }
23431  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23432 #if !CYTHON_USE_TP_FINALIZE
23433  assert(self->ob_refcnt > 0);
23434  if (--self->ob_refcnt == 0) {
23435  return;
23436  }
23437  {
23438  Py_ssize_t refcnt = self->ob_refcnt;
23439  _Py_NewReference(self);
23440  self->ob_refcnt = refcnt;
23441  }
23442 #if CYTHON_COMPILING_IN_CPYTHON
23443  assert(PyType_IS_GC(self->ob_type) &&
23444  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23445  _Py_DEC_REFTOTAL;
23446 #endif
23447 #ifdef COUNT_ALLOCS
23448  --Py_TYPE(self)->tp_frees;
23449  --Py_TYPE(self)->tp_allocs;
23450 #endif
23451 #endif
23452 }
23453 static PyObject *
23454 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23455 {
23456  PyObject *name = self->gi_name;
23457  if (unlikely(!name)) name = Py_None;
23458  Py_INCREF(name);
23459  return name;
23460 }
23461 static int
23462 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23463 {
23464  PyObject *tmp;
23465 #if PY_MAJOR_VERSION >= 3
23466  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23467 #else
23468  if (unlikely(value == NULL || !PyString_Check(value)))
23469 #endif
23470  {
23471  PyErr_SetString(PyExc_TypeError,
23472  "__name__ must be set to a string object");
23473  return -1;
23474  }
23475  tmp = self->gi_name;
23476  Py_INCREF(value);
23477  self->gi_name = value;
23478  Py_XDECREF(tmp);
23479  return 0;
23480 }
23481 static PyObject *
23482 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
23483 {
23484  PyObject *name = self->gi_qualname;
23485  if (unlikely(!name)) name = Py_None;
23486  Py_INCREF(name);
23487  return name;
23488 }
23489 static int
23490 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
23491 {
23492  PyObject *tmp;
23493 #if PY_MAJOR_VERSION >= 3
23494  if (unlikely(value == NULL || !PyUnicode_Check(value)))
23495 #else
23496  if (unlikely(value == NULL || !PyString_Check(value)))
23497 #endif
23498  {
23499  PyErr_SetString(PyExc_TypeError,
23500  "__qualname__ must be set to a string object");
23501  return -1;
23502  }
23503  tmp = self->gi_qualname;
23504  Py_INCREF(value);
23505  self->gi_qualname = value;
23506  Py_XDECREF(tmp);
23507  return 0;
23508 }
23509 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23510  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23511  PyObject *name, PyObject *qualname, PyObject *module_name) {
23512  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23513  if (unlikely(!gen))
23514  return NULL;
23515  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23516 }
23517 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23518  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23519  PyObject *name, PyObject *qualname, PyObject *module_name) {
23520  gen->body = body;
23521  gen->closure = closure;
23522  Py_XINCREF(closure);
23523  gen->is_running = 0;
23524  gen->resume_label = 0;
23525  gen->classobj = NULL;
23526  gen->yieldfrom = NULL;
23527  gen->gi_exc_state.exc_type = NULL;
23528  gen->gi_exc_state.exc_value = NULL;
23529  gen->gi_exc_state.exc_traceback = NULL;
23530 #if CYTHON_USE_EXC_INFO_STACK
23531  gen->gi_exc_state.previous_item = NULL;
23532 #endif
23533  gen->gi_weakreflist = NULL;
23534  Py_XINCREF(qualname);
23535  gen->gi_qualname = qualname;
23536  Py_XINCREF(name);
23537  gen->gi_name = name;
23538  Py_XINCREF(module_name);
23539  gen->gi_modulename = module_name;
23540  Py_XINCREF(code);
23541  gen->gi_code = code;
23542  PyObject_GC_Track(gen);
23543  return gen;
23544 }
23545 
23546 /* PatchModuleWithCoroutine */
23547  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23548 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23549  int result;
23550  PyObject *globals, *result_obj;
23551  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23552  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23553  #ifdef __Pyx_Coroutine_USED
23554  (PyObject*)__pyx_CoroutineType);
23555  #else
23556  Py_None);
23557  #endif
23558  if (unlikely(result < 0)) goto ignore;
23559  result = PyDict_SetItemString(globals, "_cython_generator_type",
23560  #ifdef __Pyx_Generator_USED
23561  (PyObject*)__pyx_GeneratorType);
23562  #else
23563  Py_None);
23564  #endif
23565  if (unlikely(result < 0)) goto ignore;
23566  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23567  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23568  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23569  if (unlikely(!result_obj)) goto ignore;
23570  Py_DECREF(result_obj);
23571  Py_DECREF(globals);
23572  return module;
23573 ignore:
23574  Py_XDECREF(globals);
23575  PyErr_WriteUnraisable(module);
23576  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23577  Py_DECREF(module);
23578  module = NULL;
23579  }
23580 #else
23581  py_code++;
23582 #endif
23583  return module;
23584 }
23585 
23586 /* PatchGeneratorABC */
23587  #ifndef CYTHON_REGISTER_ABCS
23588 #define CYTHON_REGISTER_ABCS 1
23589 #endif
23590 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23591 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23592 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23593  module = __Pyx_Coroutine_patch_module(
23594  module, ""
23595 "if _cython_generator_type is not None:\n"
23596 " try: Generator = _module.Generator\n"
23597 " except AttributeError: pass\n"
23598 " else: Generator.register(_cython_generator_type)\n"
23599 "if _cython_coroutine_type is not None:\n"
23600 " try: Coroutine = _module.Coroutine\n"
23601 " except AttributeError: pass\n"
23602 " else: Coroutine.register(_cython_coroutine_type)\n"
23603  );
23604  return module;
23605 }
23606 #endif
23607 static int __Pyx_patch_abc(void) {
23608 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23609  static int abc_patched = 0;
23610  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23611  PyObject *module;
23612  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23613  if (!module) {
23614  PyErr_WriteUnraisable(NULL);
23615  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23616  ((PY_MAJOR_VERSION >= 3) ?
23617  "Cython module failed to register with collections.abc module" :
23618  "Cython module failed to register with collections module"), 1) < 0)) {
23619  return -1;
23620  }
23621  } else {
23622  module = __Pyx_patch_abc_module(module);
23623  abc_patched = 1;
23624  if (unlikely(!module))
23625  return -1;
23626  Py_DECREF(module);
23627  }
23628  module = PyImport_ImportModule("backports_abc");
23629  if (module) {
23630  module = __Pyx_patch_abc_module(module);
23631  Py_XDECREF(module);
23632  }
23633  if (!module) {
23634  PyErr_Clear();
23635  }
23636  }
23637 #else
23638  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23639 #endif
23640  return 0;
23641 }
23642 
23643 /* Generator */
23644  static PyMethodDef __pyx_Generator_methods[] = {
23645  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23646  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23647  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23648  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23649  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
23650  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23651  {0, 0, 0, 0}
23652 };
23653 static PyMemberDef __pyx_Generator_memberlist[] = {
23654  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23655  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23656  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23657  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23658  {0, 0, 0, 0, 0}
23659 };
23660 static PyGetSetDef __pyx_Generator_getsets[] = {
23661  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23662  (char*) PyDoc_STR("name of the generator"), 0},
23663  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23664  (char*) PyDoc_STR("qualified name of the generator"), 0},
23665  {0, 0, 0, 0, 0}
23666 };
23667 static PyTypeObject __pyx_GeneratorType_type = {
23668  PyVarObject_HEAD_INIT(0, 0)
23669  "generator",
23670  sizeof(__pyx_CoroutineObject),
23671  0,
23672  (destructor) __Pyx_Coroutine_dealloc,
23673  0,
23674  0,
23675  0,
23676  0,
23677  0,
23678  0,
23679  0,
23680  0,
23681  0,
23682  0,
23683  0,
23684  0,
23685  0,
23686  0,
23687  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23688  0,
23689  (traverseproc) __Pyx_Coroutine_traverse,
23690  0,
23691  0,
23692  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23693  0,
23694  (iternextfunc) __Pyx_Generator_Next,
23695  __pyx_Generator_methods,
23696  __pyx_Generator_memberlist,
23697  __pyx_Generator_getsets,
23698  0,
23699  0,
23700  0,
23701  0,
23702  0,
23703  0,
23704  0,
23705  0,
23706  0,
23707  0,
23708  0,
23709  0,
23710  0,
23711  0,
23712  0,
23713 #if CYTHON_USE_TP_FINALIZE
23714  0,
23715 #else
23716  __Pyx_Coroutine_del,
23717 #endif
23718  0,
23719 #if CYTHON_USE_TP_FINALIZE
23720  __Pyx_Coroutine_del,
23721 #elif PY_VERSION_HEX >= 0x030400a1
23722  0,
23723 #endif
23724 #if PY_VERSION_HEX >= 0x030800b1
23725  0,
23726 #endif
23727 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
23728  0,
23729 #endif
23730 };
23731 static int __pyx_Generator_init(void) {
23732  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23733  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23734  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23735  if (unlikely(!__pyx_GeneratorType)) {
23736  return -1;
23737  }
23738  return 0;
23739 }
23740 
23741 /* CheckBinaryVersion */
23742  static int __Pyx_check_binary_version(void) {
23743  char ctversion[4], rtversion[4];
23744  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23745  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23746  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23747  char message[200];
23748  PyOS_snprintf(message, sizeof(message),
23749  "compiletime version %s of module '%.100s' "
23750  "does not match runtime version %s",
23751  ctversion, __Pyx_MODULE_NAME, rtversion);
23752  return PyErr_WarnEx(NULL, message, 1);
23753  }
23754  return 0;
23755 }
23756 
23757 /* InitStrings */
23758  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
23759  while (t->p) {
23760  #if PY_MAJOR_VERSION < 3
23761  if (t->is_unicode) {
23762  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
23763  } else if (t->intern) {
23764  *t->p = PyString_InternFromString(t->s);
23765  } else {
23766  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
23767  }
23768  #else
23769  if (t->is_unicode | t->is_str) {
23770  if (t->intern) {
23771  *t->p = PyUnicode_InternFromString(t->s);
23772  } else if (t->encoding) {
23773  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
23774  } else {
23775  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
23776  }
23777  } else {
23778  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
23779  }
23780  #endif
23781  if (!*t->p)
23782  return -1;
23783  if (PyObject_Hash(*t->p) == -1)
23784  return -1;
23785  ++t;
23786  }
23787  return 0;
23788 }
23789 
23790 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
23791  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
23792 }
23793 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
23794  Py_ssize_t ignore;
23795  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
23796 }
23797 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23798 #if !CYTHON_PEP393_ENABLED
23799 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23800  char* defenc_c;
23801  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
23802  if (!defenc) return NULL;
23803  defenc_c = PyBytes_AS_STRING(defenc);
23804 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23805  {
23806  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
23807  char* c;
23808  for (c = defenc_c; c < end; c++) {
23809  if ((unsigned char) (*c) >= 128) {
23810  PyUnicode_AsASCIIString(o);
23811  return NULL;
23812  }
23813  }
23814  }
23815 #endif
23816  *length = PyBytes_GET_SIZE(defenc);
23817  return defenc_c;
23818 }
23819 #else
23820 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23821  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
23822 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23823  if (likely(PyUnicode_IS_ASCII(o))) {
23824  *length = PyUnicode_GET_LENGTH(o);
23825  return PyUnicode_AsUTF8(o);
23826  } else {
23827  PyUnicode_AsASCIIString(o);
23828  return NULL;
23829  }
23830 #else
23831  return PyUnicode_AsUTF8AndSize(o, length);
23832 #endif
23833 }
23834 #endif
23835 #endif
23836 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
23837 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
23838  if (
23839 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
23840  __Pyx_sys_getdefaultencoding_not_ascii &&
23841 #endif
23842  PyUnicode_Check(o)) {
23843  return __Pyx_PyUnicode_AsStringAndSize(o, length);
23844  } else
23845 #endif
23846 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
23847  if (PyByteArray_Check(o)) {
23848  *length = PyByteArray_GET_SIZE(o);
23849  return PyByteArray_AS_STRING(o);
23850  } else
23851 #endif
23852  {
23853  char* result;
23854  int r = PyBytes_AsStringAndSize(o, &result, length);
23855  if (unlikely(r < 0)) {
23856  return NULL;
23857  } else {
23858  return result;
23859  }
23860  }
23861 }
23862 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
23863  int is_true = x == Py_True;
23864  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
23865  else return PyObject_IsTrue(x);
23866 }
23867 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
23868  int retval;
23869  if (unlikely(!x)) return -1;
23870  retval = __Pyx_PyObject_IsTrue(x);
23871  Py_DECREF(x);
23872  return retval;
23873 }
23874 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
23875 #if PY_MAJOR_VERSION >= 3
23876  if (PyLong_Check(result)) {
23877  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
23878  "__int__ returned non-int (type %.200s). "
23879  "The ability to return an instance of a strict subclass of int "
23880  "is deprecated, and may be removed in a future version of Python.",
23881  Py_TYPE(result)->tp_name)) {
23882  Py_DECREF(result);
23883  return NULL;
23884  }
23885  return result;
23886  }
23887 #endif
23888  PyErr_Format(PyExc_TypeError,
23889  "__%.4s__ returned non-%.4s (type %.200s)",
23890  type_name, type_name, Py_TYPE(result)->tp_name);
23891  Py_DECREF(result);
23892  return NULL;
23893 }
23894 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
23895 #if CYTHON_USE_TYPE_SLOTS
23896  PyNumberMethods *m;
23897 #endif
23898  const char *name = NULL;
23899  PyObject *res = NULL;
23900 #if PY_MAJOR_VERSION < 3
23901  if (likely(PyInt_Check(x) || PyLong_Check(x)))
23902 #else
23903  if (likely(PyLong_Check(x)))
23904 #endif
23905  return __Pyx_NewRef(x);
23906 #if CYTHON_USE_TYPE_SLOTS
23907  m = Py_TYPE(x)->tp_as_number;
23908  #if PY_MAJOR_VERSION < 3
23909  if (m && m->nb_int) {
23910  name = "int";
23911  res = m->nb_int(x);
23912  }
23913  else if (m && m->nb_long) {
23914  name = "long";
23915  res = m->nb_long(x);
23916  }
23917  #else
23918  if (likely(m && m->nb_int)) {
23919  name = "int";
23920  res = m->nb_int(x);
23921  }
23922  #endif
23923 #else
23924  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
23925  res = PyNumber_Int(x);
23926  }
23927 #endif
23928  if (likely(res)) {
23929 #if PY_MAJOR_VERSION < 3
23930  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
23931 #else
23932  if (unlikely(!PyLong_CheckExact(res))) {
23933 #endif
23934  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
23935  }
23936  }
23937  else if (!PyErr_Occurred()) {
23938  PyErr_SetString(PyExc_TypeError,
23939  "an integer is required");
23940  }
23941  return res;
23942 }
23943 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
23944  Py_ssize_t ival;
23945  PyObject *x;
23946 #if PY_MAJOR_VERSION < 3
23947  if (likely(PyInt_CheckExact(b))) {
23948  if (sizeof(Py_ssize_t) >= sizeof(long))
23949  return PyInt_AS_LONG(b);
23950  else
23951  return PyInt_AsSsize_t(b);
23952  }
23953 #endif
23954  if (likely(PyLong_CheckExact(b))) {
23955  #if CYTHON_USE_PYLONG_INTERNALS
23956  const digit* digits = ((PyLongObject*)b)->ob_digit;
23957  const Py_ssize_t size = Py_SIZE(b);
23958  if (likely(__Pyx_sst_abs(size) <= 1)) {
23959  ival = likely(size) ? digits[0] : 0;
23960  if (size == -1) ival = -ival;
23961  return ival;
23962  } else {
23963  switch (size) {
23964  case 2:
23965  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23966  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23967  }
23968  break;
23969  case -2:
23970  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
23971  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23972  }
23973  break;
23974  case 3:
23975  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23976  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23977  }
23978  break;
23979  case -3:
23980  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
23981  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
23982  }
23983  break;
23984  case 4:
23985  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23986  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]));
23987  }
23988  break;
23989  case -4:
23990  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
23991  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]));
23992  }
23993  break;
23994  }
23995  }
23996  #endif
23997  return PyLong_AsSsize_t(b);
23998  }
23999  x = PyNumber_Index(b);
24000  if (!x) return -1;
24001  ival = PyInt_AsSsize_t(x);
24002  Py_DECREF(x);
24003  return ival;
24004 }
24005 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24006  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24007 }
24008 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24009  return PyInt_FromSize_t(ival);
24010 }
24011 
24012 
24013 #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