glucat  0.8.2
PyClical.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.28.5 */
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  "-O2",
19  "-Wall",
20  "-D_FORTIFY_SOURCE=2",
21  "-fstack-protector-strong",
22  "-funwind-tables",
23  "-fasynchronous-unwind-tables",
24  "-fstack-clash-protection",
25  "-g",
26  "-finline-limit=4000",
27  "--param",
28  "inline-unit-growth=200",
29  "-funroll-loops",
30  "-fvariable-expansion-in-unroller",
31  "-DNDEBUG",
32  "-DHAVE_BITS_WORDSIZE_H",
33  "-D_GLUCAT_USE_STD_UNORDERED_MAP",
34  "-D_GLUCAT_USE_DENSE_MATRICES",
35  "-D_GLUCAT_CHECK_ISNAN",
36  "-Wno-unused-local-typedefs",
37  "-Wno-misleading-indentation",
38  "-fno-check-new",
39  "-fexceptions"
40  ],
41  "include_dirs": [
42  ".",
43  ".."
44  ],
45  "language": "c++",
46  "name": "PyClical",
47  "sources": [
48  "PyClical.pyx"
49  ]
50  },
51  "module_name": "PyClical"
52 }
53 END: Cython Metadata */
54 
55 #define PY_SSIZE_T_CLEAN
56 #include "Python.h"
57 #ifndef Py_PYTHON_H
58  #error Python headers needed to compile C extensions, please install development version of Python.
59 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
60  #error Cython requires Python 2.6+ or Python 3.3+.
61 #else
62 #define CYTHON_ABI "0_28_5"
63 #define CYTHON_FUTURE_DIVISION 0
64 #include <stddef.h>
65 #ifndef offsetof
66  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
67 #endif
68 #if !defined(WIN32) && !defined(MS_WINDOWS)
69  #ifndef __stdcall
70  #define __stdcall
71  #endif
72  #ifndef __cdecl
73  #define __cdecl
74  #endif
75  #ifndef __fastcall
76  #define __fastcall
77  #endif
78 #endif
79 #ifndef DL_IMPORT
80  #define DL_IMPORT(t) t
81 #endif
82 #ifndef DL_EXPORT
83  #define DL_EXPORT(t) t
84 #endif
85 #define __PYX_COMMA ,
86 #ifndef HAVE_LONG_LONG
87  #if PY_VERSION_HEX >= 0x02070000
88  #define HAVE_LONG_LONG
89  #endif
90 #endif
91 #ifndef PY_LONG_LONG
92  #define PY_LONG_LONG LONG_LONG
93 #endif
94 #ifndef Py_HUGE_VAL
95  #define Py_HUGE_VAL HUGE_VAL
96 #endif
97 #ifdef PYPY_VERSION
98  #define CYTHON_COMPILING_IN_PYPY 1
99  #define CYTHON_COMPILING_IN_PYSTON 0
100  #define CYTHON_COMPILING_IN_CPYTHON 0
101  #undef CYTHON_USE_TYPE_SLOTS
102  #define CYTHON_USE_TYPE_SLOTS 0
103  #undef CYTHON_USE_PYTYPE_LOOKUP
104  #define CYTHON_USE_PYTYPE_LOOKUP 0
105  #if PY_VERSION_HEX < 0x03050000
106  #undef CYTHON_USE_ASYNC_SLOTS
107  #define CYTHON_USE_ASYNC_SLOTS 0
108  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
109  #define CYTHON_USE_ASYNC_SLOTS 1
110  #endif
111  #undef CYTHON_USE_PYLIST_INTERNALS
112  #define CYTHON_USE_PYLIST_INTERNALS 0
113  #undef CYTHON_USE_UNICODE_INTERNALS
114  #define CYTHON_USE_UNICODE_INTERNALS 0
115  #undef CYTHON_USE_UNICODE_WRITER
116  #define CYTHON_USE_UNICODE_WRITER 0
117  #undef CYTHON_USE_PYLONG_INTERNALS
118  #define CYTHON_USE_PYLONG_INTERNALS 0
119  #undef CYTHON_AVOID_BORROWED_REFS
120  #define CYTHON_AVOID_BORROWED_REFS 1
121  #undef CYTHON_ASSUME_SAFE_MACROS
122  #define CYTHON_ASSUME_SAFE_MACROS 0
123  #undef CYTHON_UNPACK_METHODS
124  #define CYTHON_UNPACK_METHODS 0
125  #undef CYTHON_FAST_THREAD_STATE
126  #define CYTHON_FAST_THREAD_STATE 0
127  #undef CYTHON_FAST_PYCALL
128  #define CYTHON_FAST_PYCALL 0
129  #undef CYTHON_PEP489_MULTI_PHASE_INIT
130  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
131  #undef CYTHON_USE_TP_FINALIZE
132  #define CYTHON_USE_TP_FINALIZE 0
133 #elif defined(PYSTON_VERSION)
134  #define CYTHON_COMPILING_IN_PYPY 0
135  #define CYTHON_COMPILING_IN_PYSTON 1
136  #define CYTHON_COMPILING_IN_CPYTHON 0
137  #ifndef CYTHON_USE_TYPE_SLOTS
138  #define CYTHON_USE_TYPE_SLOTS 1
139  #endif
140  #undef CYTHON_USE_PYTYPE_LOOKUP
141  #define CYTHON_USE_PYTYPE_LOOKUP 0
142  #undef CYTHON_USE_ASYNC_SLOTS
143  #define CYTHON_USE_ASYNC_SLOTS 0
144  #undef CYTHON_USE_PYLIST_INTERNALS
145  #define CYTHON_USE_PYLIST_INTERNALS 0
146  #ifndef CYTHON_USE_UNICODE_INTERNALS
147  #define CYTHON_USE_UNICODE_INTERNALS 1
148  #endif
149  #undef CYTHON_USE_UNICODE_WRITER
150  #define CYTHON_USE_UNICODE_WRITER 0
151  #undef CYTHON_USE_PYLONG_INTERNALS
152  #define CYTHON_USE_PYLONG_INTERNALS 0
153  #ifndef CYTHON_AVOID_BORROWED_REFS
154  #define CYTHON_AVOID_BORROWED_REFS 0
155  #endif
156  #ifndef CYTHON_ASSUME_SAFE_MACROS
157  #define CYTHON_ASSUME_SAFE_MACROS 1
158  #endif
159  #ifndef CYTHON_UNPACK_METHODS
160  #define CYTHON_UNPACK_METHODS 1
161  #endif
162  #undef CYTHON_FAST_THREAD_STATE
163  #define CYTHON_FAST_THREAD_STATE 0
164  #undef CYTHON_FAST_PYCALL
165  #define CYTHON_FAST_PYCALL 0
166  #undef CYTHON_PEP489_MULTI_PHASE_INIT
167  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
168  #undef CYTHON_USE_TP_FINALIZE
169  #define CYTHON_USE_TP_FINALIZE 0
170 #else
171  #define CYTHON_COMPILING_IN_PYPY 0
172  #define CYTHON_COMPILING_IN_PYSTON 0
173  #define CYTHON_COMPILING_IN_CPYTHON 1
174  #ifndef CYTHON_USE_TYPE_SLOTS
175  #define CYTHON_USE_TYPE_SLOTS 1
176  #endif
177  #if PY_VERSION_HEX < 0x02070000
178  #undef CYTHON_USE_PYTYPE_LOOKUP
179  #define CYTHON_USE_PYTYPE_LOOKUP 0
180  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
181  #define CYTHON_USE_PYTYPE_LOOKUP 1
182  #endif
183  #if PY_MAJOR_VERSION < 3
184  #undef CYTHON_USE_ASYNC_SLOTS
185  #define CYTHON_USE_ASYNC_SLOTS 0
186  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
187  #define CYTHON_USE_ASYNC_SLOTS 1
188  #endif
189  #if PY_VERSION_HEX < 0x02070000
190  #undef CYTHON_USE_PYLONG_INTERNALS
191  #define CYTHON_USE_PYLONG_INTERNALS 0
192  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
193  #define CYTHON_USE_PYLONG_INTERNALS 1
194  #endif
195  #ifndef CYTHON_USE_PYLIST_INTERNALS
196  #define CYTHON_USE_PYLIST_INTERNALS 1
197  #endif
198  #ifndef CYTHON_USE_UNICODE_INTERNALS
199  #define CYTHON_USE_UNICODE_INTERNALS 1
200  #endif
201  #if PY_VERSION_HEX < 0x030300F0
202  #undef CYTHON_USE_UNICODE_WRITER
203  #define CYTHON_USE_UNICODE_WRITER 0
204  #elif !defined(CYTHON_USE_UNICODE_WRITER)
205  #define CYTHON_USE_UNICODE_WRITER 1
206  #endif
207  #ifndef CYTHON_AVOID_BORROWED_REFS
208  #define CYTHON_AVOID_BORROWED_REFS 0
209  #endif
210  #ifndef CYTHON_ASSUME_SAFE_MACROS
211  #define CYTHON_ASSUME_SAFE_MACROS 1
212  #endif
213  #ifndef CYTHON_UNPACK_METHODS
214  #define CYTHON_UNPACK_METHODS 1
215  #endif
216  #ifndef CYTHON_FAST_THREAD_STATE
217  #define CYTHON_FAST_THREAD_STATE 1
218  #endif
219  #ifndef CYTHON_FAST_PYCALL
220  #define CYTHON_FAST_PYCALL 1
221  #endif
222  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
223  #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
224  #endif
225  #ifndef CYTHON_USE_TP_FINALIZE
226  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
227  #endif
228 #endif
229 #if !defined(CYTHON_FAST_PYCCALL)
230 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
231 #endif
232 #if CYTHON_USE_PYLONG_INTERNALS
233  #include "longintrepr.h"
234  #undef SHIFT
235  #undef BASE
236  #undef MASK
237 #endif
238 #ifndef __has_attribute
239  #define __has_attribute(x) 0
240 #endif
241 #ifndef __has_cpp_attribute
242  #define __has_cpp_attribute(x) 0
243 #endif
244 #ifndef CYTHON_RESTRICT
245  #if defined(__GNUC__)
246  #define CYTHON_RESTRICT __restrict__
247  #elif defined(_MSC_VER) && _MSC_VER >= 1400
248  #define CYTHON_RESTRICT __restrict
249  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
250  #define CYTHON_RESTRICT restrict
251  #else
252  #define CYTHON_RESTRICT
253  #endif
254 #endif
255 #ifndef CYTHON_UNUSED
256 # if defined(__GNUC__)
257 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
258 # define CYTHON_UNUSED __attribute__ ((__unused__))
259 # else
260 # define CYTHON_UNUSED
261 # endif
262 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
263 # define CYTHON_UNUSED __attribute__ ((__unused__))
264 # else
265 # define CYTHON_UNUSED
266 # endif
267 #endif
268 #ifndef CYTHON_MAYBE_UNUSED_VAR
269 # if defined(__cplusplus)
270  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
271 # else
272 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
273 # endif
274 #endif
275 #ifndef CYTHON_NCP_UNUSED
276 # if CYTHON_COMPILING_IN_CPYTHON
277 # define CYTHON_NCP_UNUSED
278 # else
279 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
280 # endif
281 #endif
282 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
283 #ifdef _MSC_VER
284  #ifndef _MSC_STDINT_H_
285  #if _MSC_VER < 1300
286  typedef unsigned char uint8_t;
287  typedef unsigned int uint32_t;
288  #else
289  typedef unsigned __int8 uint8_t;
290  typedef unsigned __int32 uint32_t;
291  #endif
292  #endif
293 #else
294  #include <stdint.h>
295 #endif
296 #ifndef CYTHON_FALLTHROUGH
297  #if defined(__cplusplus) && __cplusplus >= 201103L
298  #if __has_cpp_attribute(fallthrough)
299  #define CYTHON_FALLTHROUGH [[fallthrough]]
300  #elif __has_cpp_attribute(clang::fallthrough)
301  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
302  #elif __has_cpp_attribute(gnu::fallthrough)
303  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
304  #endif
305  #endif
306  #ifndef CYTHON_FALLTHROUGH
307  #if __has_attribute(fallthrough)
308  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
309  #else
310  #define CYTHON_FALLTHROUGH
311  #endif
312  #endif
313  #if defined(__clang__ ) && defined(__apple_build_version__)
314  #if __apple_build_version__ < 7000000
315  #undef CYTHON_FALLTHROUGH
316  #define CYTHON_FALLTHROUGH
317  #endif
318  #endif
319 #endif
320 
321 #ifndef __cplusplus
322  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
323 #endif
324 #ifndef CYTHON_INLINE
325  #if defined(__clang__)
326  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
327  #else
328  #define CYTHON_INLINE inline
329  #endif
330 #endif
331 template<typename T>
332 void __Pyx_call_destructor(T& x) {
333  x.~T();
334 }
335 template<typename T>
336 class __Pyx_FakeReference {
337  public:
338  __Pyx_FakeReference() : ptr(NULL) { }
339  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
340  T *operator->() { return ptr; }
341  T *operator&() { return ptr; }
342  operator T&() { return *ptr; }
343  template<typename U> bool operator ==(U other) { return *ptr == other; }
344  template<typename U> bool operator !=(U other) { return *ptr != other; }
345  private:
346  T *ptr;
347 };
348 
349 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
350  #define Py_OptimizeFlag 0
351 #endif
352 #define __PYX_BUILD_PY_SSIZE_T "n"
353 #define CYTHON_FORMAT_SSIZE_T "z"
354 #if PY_MAJOR_VERSION < 3
355  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
356  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
357  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
358  #define __Pyx_DefaultClassType PyClass_Type
359 #else
360  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
361  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
362  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
363  #define __Pyx_DefaultClassType PyType_Type
364 #endif
365 #ifndef Py_TPFLAGS_CHECKTYPES
366  #define Py_TPFLAGS_CHECKTYPES 0
367 #endif
368 #ifndef Py_TPFLAGS_HAVE_INDEX
369  #define Py_TPFLAGS_HAVE_INDEX 0
370 #endif
371 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
372  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
373 #endif
374 #ifndef Py_TPFLAGS_HAVE_FINALIZE
375  #define Py_TPFLAGS_HAVE_FINALIZE 0
376 #endif
377 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
378  #ifndef METH_FASTCALL
379  #define METH_FASTCALL 0x80
380  #endif
381  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
382  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
383  Py_ssize_t nargs, PyObject *kwnames);
384 #else
385  #define __Pyx_PyCFunctionFast _PyCFunctionFast
386  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
387 #endif
388 #if CYTHON_FAST_PYCCALL
389 #define __Pyx_PyFastCFunction_Check(func)\
390  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
391 #else
392 #define __Pyx_PyFastCFunction_Check(func) 0
393 #endif
394 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
395  #define PyObject_Malloc(s) PyMem_Malloc(s)
396  #define PyObject_Free(p) PyMem_Free(p)
397  #define PyObject_Realloc(p) PyMem_Realloc(p)
398 #endif
399 #if CYTHON_COMPILING_IN_PYSTON
400  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
401  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
402 #else
403  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
404  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
405 #endif
406 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
407  #define __Pyx_PyThreadState_Current PyThreadState_GET()
408 #elif PY_VERSION_HEX >= 0x03060000
409  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
410 #elif PY_VERSION_HEX >= 0x03000000
411  #define __Pyx_PyThreadState_Current PyThreadState_GET()
412 #else
413  #define __Pyx_PyThreadState_Current _PyThreadState_Current
414 #endif
415 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
416 #include "pythread.h"
417 #define Py_tss_NEEDS_INIT 0
418 typedef int Py_tss_t;
419 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
420  *key = PyThread_create_key();
421  return 0; // PyThread_create_key reports success always
422 }
423 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
424  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
425  *key = Py_tss_NEEDS_INIT;
426  return key;
427 }
428 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
429  PyObject_Free(key);
430 }
431 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
432  return *key != Py_tss_NEEDS_INIT;
433 }
434 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
435  PyThread_delete_key(*key);
436  *key = Py_tss_NEEDS_INIT;
437 }
438 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
439  return PyThread_set_key_value(*key, value);
440 }
441 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
442  return PyThread_get_key_value(*key);
443 }
444 #endif // TSS (Thread Specific Storage) API
445 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
446 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
447 #else
448 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
449 #endif
450 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
451  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
452  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
453 #else
454  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
455  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
456 #endif
457 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
458 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
459 #else
460 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
461 #endif
462 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
463  #define CYTHON_PEP393_ENABLED 1
464  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
465  0 : _PyUnicode_Ready((PyObject *)(op)))
466  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
467  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
468  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
469  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
470  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
471  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
472  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
473  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
474 #else
475  #define CYTHON_PEP393_ENABLED 0
476  #define PyUnicode_1BYTE_KIND 1
477  #define PyUnicode_2BYTE_KIND 2
478  #define PyUnicode_4BYTE_KIND 4
479  #define __Pyx_PyUnicode_READY(op) (0)
480  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
481  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
482  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
483  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
484  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
485  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
486  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
487  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
488 #endif
489 #if CYTHON_COMPILING_IN_PYPY
490  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
491  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
492 #else
493  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
494  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
495  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
496 #endif
497 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
498  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
499 #endif
500 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
501  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
502 #endif
503 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
504  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
505 #endif
506 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
507 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
508 #if PY_MAJOR_VERSION >= 3
509  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
510 #else
511  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
512 #endif
513 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
514  #define PyObject_ASCII(o) PyObject_Repr(o)
515 #endif
516 #if PY_MAJOR_VERSION >= 3
517  #define PyBaseString_Type PyUnicode_Type
518  #define PyStringObject PyUnicodeObject
519  #define PyString_Type PyUnicode_Type
520  #define PyString_Check PyUnicode_Check
521  #define PyString_CheckExact PyUnicode_CheckExact
522  #define PyObject_Unicode PyObject_Str
523 #endif
524 #if PY_MAJOR_VERSION >= 3
525  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
526  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
527 #else
528  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
529  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
530 #endif
531 #ifndef PySet_CheckExact
532  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
533 #endif
534 #if CYTHON_ASSUME_SAFE_MACROS
535  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
536 #else
537  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
538 #endif
539 #if PY_MAJOR_VERSION >= 3
540  #define PyIntObject PyLongObject
541  #define PyInt_Type PyLong_Type
542  #define PyInt_Check(op) PyLong_Check(op)
543  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
544  #define PyInt_FromString PyLong_FromString
545  #define PyInt_FromUnicode PyLong_FromUnicode
546  #define PyInt_FromLong PyLong_FromLong
547  #define PyInt_FromSize_t PyLong_FromSize_t
548  #define PyInt_FromSsize_t PyLong_FromSsize_t
549  #define PyInt_AsLong PyLong_AsLong
550  #define PyInt_AS_LONG PyLong_AS_LONG
551  #define PyInt_AsSsize_t PyLong_AsSsize_t
552  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
553  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
554  #define PyNumber_Int PyNumber_Long
555 #endif
556 #if PY_MAJOR_VERSION >= 3
557  #define PyBoolObject PyLongObject
558 #endif
559 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
560  #ifndef PyUnicode_InternFromString
561  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
562  #endif
563 #endif
564 #if PY_VERSION_HEX < 0x030200A4
565  typedef long Py_hash_t;
566  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
567  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
568 #else
569  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
570  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
571 #endif
572 #if PY_MAJOR_VERSION >= 3
573  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
574 #else
575  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
576 #endif
577 #if CYTHON_USE_ASYNC_SLOTS
578  #if PY_VERSION_HEX >= 0x030500B1
579  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
580  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
581  #else
582  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
583  #endif
584 #else
585  #define __Pyx_PyType_AsAsync(obj) NULL
586 #endif
587 #ifndef __Pyx_PyAsyncMethodsStruct
588  typedef struct {
589  unaryfunc am_await;
590  unaryfunc am_aiter;
591  unaryfunc am_anext;
592  } __Pyx_PyAsyncMethodsStruct;
593 #endif
594 
595 #if defined(WIN32) || defined(MS_WINDOWS)
596  #define _USE_MATH_DEFINES
597 #endif
598 #include <math.h>
599 #ifdef NAN
600 #define __PYX_NAN() ((float) NAN)
601 #else
602 static CYTHON_INLINE float __PYX_NAN() {
603  float value;
604  memset(&value, 0xFF, sizeof(value));
605  return value;
606 }
607 #endif
608 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
609 #define __Pyx_truncl trunc
610 #else
611 #define __Pyx_truncl truncl
612 #endif
613 
614 
615 #define __PYX_ERR(f_index, lineno, Ln_error) \
616 { \
617  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
618 }
619 
620 #ifndef __PYX_EXTERN_C
621  #ifdef __cplusplus
622  #define __PYX_EXTERN_C extern "C"
623  #else
624  #define __PYX_EXTERN_C extern
625  #endif
626 #endif
627 
628 #define __PYX_HAVE__PyClical
629 #define __PYX_HAVE_API__PyClical
630 /* Early includes */
631 #include "ios"
632 #include "new"
633 #include "stdexcept"
634 #include "typeinfo"
635 #include <vector>
636 #include "PyClical.h"
637 #ifdef _OPENMP
638 #include <omp.h>
639 #endif /* _OPENMP */
640 
641 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
642 #define CYTHON_WITHOUT_ASSERTIONS
643 #endif
644 
645 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
646  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
647 
648 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
649 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
650 #define __PYX_DEFAULT_STRING_ENCODING ""
651 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
652 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
653 #define __Pyx_uchar_cast(c) ((unsigned char)c)
654 #define __Pyx_long_cast(x) ((long)x)
655 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
656  (sizeof(type) < sizeof(Py_ssize_t)) ||\
657  (sizeof(type) > sizeof(Py_ssize_t) &&\
658  likely(v < (type)PY_SSIZE_T_MAX ||\
659  v == (type)PY_SSIZE_T_MAX) &&\
660  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
661  v == (type)PY_SSIZE_T_MIN))) ||\
662  (sizeof(type) == sizeof(Py_ssize_t) &&\
663  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
664  v == (type)PY_SSIZE_T_MAX))) )
665 #if defined (__cplusplus) && __cplusplus >= 201103L
666  #include <cstdlib>
667  #define __Pyx_sst_abs(value) std::abs(value)
668 #elif SIZEOF_INT >= SIZEOF_SIZE_T
669  #define __Pyx_sst_abs(value) abs(value)
670 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
671  #define __Pyx_sst_abs(value) labs(value)
672 #elif defined (_MSC_VER)
673  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
674 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
675  #define __Pyx_sst_abs(value) llabs(value)
676 #elif defined (__GNUC__)
677  #define __Pyx_sst_abs(value) __builtin_llabs(value)
678 #else
679  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
680 #endif
681 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
682 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
683 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
684 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
685 #define __Pyx_PyBytes_FromString PyBytes_FromString
686 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
687 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
688 #if PY_MAJOR_VERSION < 3
689  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
690  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
691 #else
692  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
693  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
694 #endif
695 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
696 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
697 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
698 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
699 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
700 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
701 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
702 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
703 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
704 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
705 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
706 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
707 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
708 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
709 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
710 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
711 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
712  const Py_UNICODE *u_end = u;
713  while (*u_end++) ;
714  return (size_t)(u_end - u - 1);
715 }
716 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
717 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
718 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
719 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
720 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
721 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
722 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
723 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
724 #define __Pyx_PySequence_Tuple(obj)\
725  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
726 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
727 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
728 #if CYTHON_ASSUME_SAFE_MACROS
729 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
730 #else
731 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
732 #endif
733 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
734 #if PY_MAJOR_VERSION >= 3
735 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
736 #else
737 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
738 #endif
739 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
740 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
741 static int __Pyx_sys_getdefaultencoding_not_ascii;
742 static int __Pyx_init_sys_getdefaultencoding_params(void) {
743  PyObject* sys;
744  PyObject* default_encoding = NULL;
745  PyObject* ascii_chars_u = NULL;
746  PyObject* ascii_chars_b = NULL;
747  const char* default_encoding_c;
748  sys = PyImport_ImportModule("sys");
749  if (!sys) goto bad;
750  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
751  Py_DECREF(sys);
752  if (!default_encoding) goto bad;
753  default_encoding_c = PyBytes_AsString(default_encoding);
754  if (!default_encoding_c) goto bad;
755  if (strcmp(default_encoding_c, "ascii") == 0) {
756  __Pyx_sys_getdefaultencoding_not_ascii = 0;
757  } else {
758  char ascii_chars[128];
759  int c;
760  for (c = 0; c < 128; c++) {
761  ascii_chars[c] = c;
762  }
763  __Pyx_sys_getdefaultencoding_not_ascii = 1;
764  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
765  if (!ascii_chars_u) goto bad;
766  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
767  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
768  PyErr_Format(
769  PyExc_ValueError,
770  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
771  default_encoding_c);
772  goto bad;
773  }
774  Py_DECREF(ascii_chars_u);
775  Py_DECREF(ascii_chars_b);
776  }
777  Py_DECREF(default_encoding);
778  return 0;
779 bad:
780  Py_XDECREF(default_encoding);
781  Py_XDECREF(ascii_chars_u);
782  Py_XDECREF(ascii_chars_b);
783  return -1;
784 }
785 #endif
786 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
787 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
788 #else
789 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
790 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
791 static char* __PYX_DEFAULT_STRING_ENCODING;
792 static int __Pyx_init_sys_getdefaultencoding_params(void) {
793  PyObject* sys;
794  PyObject* default_encoding = NULL;
795  char* default_encoding_c;
796  sys = PyImport_ImportModule("sys");
797  if (!sys) goto bad;
798  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
799  Py_DECREF(sys);
800  if (!default_encoding) goto bad;
801  default_encoding_c = PyBytes_AsString(default_encoding);
802  if (!default_encoding_c) goto bad;
803  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
804  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
805  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
806  Py_DECREF(default_encoding);
807  return 0;
808 bad:
809  Py_XDECREF(default_encoding);
810  return -1;
811 }
812 #endif
813 #endif
814 
815 
816 /* Test for GCC > 2.95 */
817 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
818  #define likely(x) __builtin_expect(!!(x), 1)
819  #define unlikely(x) __builtin_expect(!!(x), 0)
820 #else /* !__GNUC__ or GCC < 2.95 */
821  #define likely(x) (x)
822  #define unlikely(x) (x)
823 #endif /* __GNUC__ */
824 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
825 
826 static PyObject *__pyx_m = NULL;
827 static PyObject *__pyx_d;
828 static PyObject *__pyx_b;
829 static PyObject *__pyx_cython_runtime = NULL;
830 static PyObject *__pyx_empty_tuple;
831 static PyObject *__pyx_empty_bytes;
832 static PyObject *__pyx_empty_unicode;
833 static int __pyx_lineno;
834 static int __pyx_clineno = 0;
835 static const char * __pyx_cfilenm= __FILE__;
836 static const char *__pyx_filename;
837 
838 
839 static const char *__pyx_f[] = {
840  "PyClical.pyx",
841  "stringsource",
842 };
843 
844 /*--- Type declarations ---*/
845 struct __pyx_obj_8PyClical_index_set;
846 struct __pyx_obj_8PyClical_clifford;
847 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__;
848 struct __pyx_opt_args_8PyClical_sqrt;
849 struct __pyx_opt_args_8PyClical_log;
850 struct __pyx_opt_args_8PyClical_cos;
851 struct __pyx_opt_args_8PyClical_acos;
852 struct __pyx_opt_args_8PyClical_acosh;
853 struct __pyx_opt_args_8PyClical_sin;
854 struct __pyx_opt_args_8PyClical_asin;
855 struct __pyx_opt_args_8PyClical_asinh;
856 struct __pyx_opt_args_8PyClical_tan;
857 struct __pyx_opt_args_8PyClical_atan;
858 struct __pyx_opt_args_8PyClical_atanh;
859 struct __pyx_opt_args_8PyClical_random_clifford;
860 
861 /* "PyClical.pyx":1542
862  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
863  *
864  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
865  * """
866  * Square root of multivector with optional complexifier.
867  */
868 struct __pyx_opt_args_8PyClical_sqrt {
869  int __pyx_n;
870  PyObject *i;
871 };
872 
873 /* "PyClical.pyx":1579
874  * return clifford().wrap( glucat.exp(toClifford(obj)) )
875  *
876  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
877  * """
878  * Natural logarithm of multivector with optional complexifier.
879  */
880 struct __pyx_opt_args_8PyClical_log {
881  int __pyx_n;
882  PyObject *i;
883 };
884 
885 /* "PyClical.pyx":1602
886  * return clifford().wrap( glucat.log(toClifford(obj)) )
887  *
888  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
889  * """
890  * Cosine of multivector with optional complexifier.
891  */
892 struct __pyx_opt_args_8PyClical_cos {
893  int __pyx_n;
894  PyObject *i;
895 };
896 
897 /* "PyClical.pyx":1619
898  * return clifford().wrap( glucat.cos(toClifford(obj)) )
899  *
900  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
901  * """
902  * Inverse cosine of multivector with optional complexifier.
903  */
904 struct __pyx_opt_args_8PyClical_acos {
905  int __pyx_n;
906  PyObject *i;
907 };
908 
909 /* "PyClical.pyx":1656
910  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
911  *
912  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
913  * """
914  * Inverse hyperbolic cosine of multivector with optional complexifier.
915  */
916 struct __pyx_opt_args_8PyClical_acosh {
917  int __pyx_n;
918  PyObject *i;
919 };
920 
921 /* "PyClical.pyx":1679
922  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
923  *
924  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
925  * """
926  * Sine of multivector with optional complexifier.
927  */
928 struct __pyx_opt_args_8PyClical_sin {
929  int __pyx_n;
930  PyObject *i;
931 };
932 
933 /* "PyClical.pyx":1698
934  * return clifford().wrap( glucat.sin(toClifford(obj)) )
935  *
936  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
937  * """
938  * Inverse sine of multivector with optional complexifier.
939  */
940 struct __pyx_opt_args_8PyClical_asin {
941  int __pyx_n;
942  PyObject *i;
943 };
944 
945 /* "PyClical.pyx":1733
946  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
947  *
948  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
949  * """
950  * Inverse hyperbolic sine of multivector with optional complexifier.
951  */
952 struct __pyx_opt_args_8PyClical_asinh {
953  int __pyx_n;
954  PyObject *i;
955 };
956 
957 /* "PyClical.pyx":1752
958  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
959  *
960  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
961  * """
962  * Tangent of multivector with optional complexifier.
963  */
964 struct __pyx_opt_args_8PyClical_tan {
965  int __pyx_n;
966  PyObject *i;
967 };
968 
969 /* "PyClical.pyx":1769
970  * return clifford().wrap( glucat.tan(toClifford(obj)) )
971  *
972  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
973  * """
974  * Inverse tangent of multivector with optional complexifier.
975  */
976 struct __pyx_opt_args_8PyClical_atan {
977  int __pyx_n;
978  PyObject *i;
979 };
980 
981 /* "PyClical.pyx":1798
982  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
983  *
984  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
985  * """
986  * Inverse hyperbolic tangent of multivector with optional complexifier.
987  */
988 struct __pyx_opt_args_8PyClical_atanh {
989  int __pyx_n;
990  PyObject *i;
991 };
992 
993 /* "PyClical.pyx":1815
994  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
995  *
996  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
997  * """
998  * Random multivector within a frame.
999  */
1000 struct __pyx_opt_args_8PyClical_random_clifford {
1001  int __pyx_n;
1002  PyObject *fill;
1003 };
1004 
1005 /* "PyClical.pyx":37
1006  *
1007  * # Forward reference
1008  * cdef class index_set # <<<<<<<<<<<<<<
1009  *
1010  * cdef inline IndexSet toIndexSet(obj):
1011  */
1012 struct __pyx_obj_8PyClical_index_set {
1013  PyObject_HEAD
1014  struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtab;
1015  IndexSet *instance;
1016 };
1017 
1018 
1019 /* "PyClical.pyx":530
1020  *
1021  * # Forward reference.
1022  * cdef class clifford # <<<<<<<<<<<<<<
1023  *
1024  * cdef inline Clifford toClifford(obj):
1025  */
1026 struct __pyx_obj_8PyClical_clifford {
1027  PyObject_HEAD
1028  struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtab;
1029  Clifford *instance;
1030 };
1031 
1032 
1033 /* "PyClical.pyx":227
1034  * return self.instance.getitem(idx)
1035  *
1036  * def __iter__(self): # <<<<<<<<<<<<<<
1037  * """
1038  * Iterate over the indices of an index_set.
1039  */
1040 struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ {
1041  PyObject_HEAD
1042  PyObject *__pyx_v_idx;
1043  struct __pyx_obj_8PyClical_index_set *__pyx_v_self;
1044  PyObject *__pyx_t_0;
1045  Py_ssize_t __pyx_t_1;
1046  PyObject *(*__pyx_t_2)(PyObject *);
1047 };
1048 
1049 
1050 
1051 /* "PyClical.pyx":45
1052  * return index_set(obj).instance[0]
1053  *
1054  * cdef class index_set: # <<<<<<<<<<<<<<
1055  * """
1056  * Python class index_set wraps C++ class IndexSet.
1057  */
1058 
1059 struct __pyx_vtabstruct_8PyClical_index_set {
1060  PyObject *(*wrap)(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1061  IndexSet (*unwrap)(struct __pyx_obj_8PyClical_index_set *);
1062  PyObject *(*copy)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch);
1063 };
1064 static struct __pyx_vtabstruct_8PyClical_index_set *__pyx_vtabptr_8PyClical_index_set;
1065 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *, IndexSet);
1066 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *);
1067 
1068 
1069 /* "PyClical.pyx":535
1070  * return clifford(obj).instance[0]
1071  *
1072  * cdef class clifford: # <<<<<<<<<<<<<<
1073  * """
1074  * Python class clifford wraps C++ class Clifford.
1075  */
1076 
1077 struct __pyx_vtabstruct_8PyClical_clifford {
1078  PyObject *(*wrap)(struct __pyx_obj_8PyClical_clifford *, Clifford);
1079  Clifford (*unwrap)(struct __pyx_obj_8PyClical_clifford *);
1080  PyObject *(*copy)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch);
1081 };
1082 static struct __pyx_vtabstruct_8PyClical_clifford *__pyx_vtabptr_8PyClical_clifford;
1083 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *, Clifford);
1084 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *);
1085 
1086 /* --- Runtime support code (head) --- */
1087 /* Refnanny.proto */
1088 #ifndef CYTHON_REFNANNY
1089  #define CYTHON_REFNANNY 0
1090 #endif
1091 #if CYTHON_REFNANNY
1092  typedef struct {
1093  void (*INCREF)(void*, PyObject*, int);
1094  void (*DECREF)(void*, PyObject*, int);
1095  void (*GOTREF)(void*, PyObject*, int);
1096  void (*GIVEREF)(void*, PyObject*, int);
1097  void* (*SetupContext)(const char*, int, const char*);
1098  void (*FinishContext)(void**);
1099  } __Pyx_RefNannyAPIStruct;
1100  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1101  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1102  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1103 #ifdef WITH_THREAD
1104  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1105  if (acquire_gil) {\
1106  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1107  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1108  PyGILState_Release(__pyx_gilstate_save);\
1109  } else {\
1110  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1111  }
1112 #else
1113  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1114  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1115 #endif
1116  #define __Pyx_RefNannyFinishContext()\
1117  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1118  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1119  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1120  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1121  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1122  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1123  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1124  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1125  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1126 #else
1127  #define __Pyx_RefNannyDeclarations
1128  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1129  #define __Pyx_RefNannyFinishContext()
1130  #define __Pyx_INCREF(r) Py_INCREF(r)
1131  #define __Pyx_DECREF(r) Py_DECREF(r)
1132  #define __Pyx_GOTREF(r)
1133  #define __Pyx_GIVEREF(r)
1134  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1135  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1136  #define __Pyx_XGOTREF(r)
1137  #define __Pyx_XGIVEREF(r)
1138 #endif
1139 #define __Pyx_XDECREF_SET(r, v) do {\
1140  PyObject *tmp = (PyObject *) r;\
1141  r = v; __Pyx_XDECREF(tmp);\
1142  } while (0)
1143 #define __Pyx_DECREF_SET(r, v) do {\
1144  PyObject *tmp = (PyObject *) r;\
1145  r = v; __Pyx_DECREF(tmp);\
1146  } while (0)
1147 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1148 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1149 
1150 /* PyObjectGetAttrStr.proto */
1151 #if CYTHON_USE_TYPE_SLOTS
1152 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1153 #else
1154 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1155 #endif
1156 
1157 /* GetBuiltinName.proto */
1158 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1159 
1160 /* PyCFunctionFastCall.proto */
1161 #if CYTHON_FAST_PYCCALL
1162 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1163 #else
1164 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1165 #endif
1166 
1167 /* PyFunctionFastCall.proto */
1168 #if CYTHON_FAST_PYCALL
1169 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1170  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1171 #if 1 || PY_VERSION_HEX < 0x030600B1
1172 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1173 #else
1174 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1175 #endif
1176 #endif
1177 
1178 /* PyObjectCall.proto */
1179 #if CYTHON_COMPILING_IN_CPYTHON
1180 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1181 #else
1182 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1183 #endif
1184 
1185 /* PyObjectCallMethO.proto */
1186 #if CYTHON_COMPILING_IN_CPYTHON
1187 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1188 #endif
1189 
1190 /* PyObjectCallOneArg.proto */
1191 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1192 
1193 /* PyThreadStateGet.proto */
1194 #if CYTHON_FAST_THREAD_STATE
1195 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1196 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1197 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1198 #else
1199 #define __Pyx_PyThreadState_declare
1200 #define __Pyx_PyThreadState_assign
1201 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1202 #endif
1203 
1204 /* PyErrFetchRestore.proto */
1205 #if CYTHON_FAST_THREAD_STATE
1206 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1207 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1208 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1209 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1210 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1211 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1212 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1213 #if CYTHON_COMPILING_IN_CPYTHON
1214 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1215 #else
1216 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1217 #endif
1218 #else
1219 #define __Pyx_PyErr_Clear() PyErr_Clear()
1220 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1221 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1222 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1223 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1224 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1225 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1226 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1227 #endif
1228 
1229 /* WriteUnraisableException.proto */
1230 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1231  int lineno, const char *filename,
1232  int full_traceback, int nogil);
1233 
1234 /* PyObjectCallNoArg.proto */
1235 #if CYTHON_COMPILING_IN_CPYTHON
1236 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1237 #else
1238 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1239 #endif
1240 
1241 /* RaiseDoubleKeywords.proto */
1242 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1243 
1244 /* ParseKeywords.proto */
1245 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1246  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1247  const char* function_name);
1248 
1249 /* RaiseArgTupleInvalid.proto */
1250 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1251  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1252 
1253 /* GetModuleGlobalName.proto */
1254 static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
1255 
1256 /* SaveResetException.proto */
1257 #if CYTHON_FAST_THREAD_STATE
1258 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1259 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1260 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1261 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1262 #else
1263 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1264 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1265 #endif
1266 
1267 /* PyErrExceptionMatches.proto */
1268 #if CYTHON_FAST_THREAD_STATE
1269 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1270 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1271 #else
1272 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1273 #endif
1274 
1275 /* GetException.proto */
1276 #if CYTHON_FAST_THREAD_STATE
1277 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1278 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1279 #else
1280 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1281 #endif
1282 
1283 /* RaiseException.proto */
1284 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1285 
1286 /* PyIntBinop.proto */
1287 #if !CYTHON_COMPILING_IN_PYPY
1288 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1289 #else
1290 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1291  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1292 #endif
1293 
1294 /* PySequenceContains.proto */
1295 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
1296  int result = PySequence_Contains(seq, item);
1297  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
1298 }
1299 
1300 /* SetItemInt.proto */
1301 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1302  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1303  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
1304  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
1305  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
1306 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
1307 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
1308  int is_list, int wraparound, int boundscheck);
1309 
1310 /* ArgTypeTest.proto */
1311 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1312  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1313  __Pyx__ArgTypeTest(obj, type, name, exact))
1314 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1315 
1316 /* Import.proto */
1317 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1318 
1319 /* IncludeStringH.proto */
1320 #include <string.h>
1321 
1322 /* PyObject_GenericGetAttrNoDict.proto */
1323 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1324 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1325 #else
1326 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1327 #endif
1328 
1329 /* PyObject_GenericGetAttr.proto */
1330 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1331 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1332 #else
1333 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1334 #endif
1335 
1336 /* SetVTable.proto */
1337 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1338 
1339 /* SetupReduce.proto */
1340 static int __Pyx_setup_reduce(PyObject* type_obj);
1341 
1342 /* PyFloatBinop.proto */
1343 #if !CYTHON_COMPILING_IN_PYPY
1344 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace);
1345 #else
1346 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace)\
1347  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
1348  #endif
1349 
1350 /* BytesEquals.proto */
1351 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1352 
1353 /* UnicodeEquals.proto */
1354 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1355 
1356 /* StrEquals.proto */
1357 #if PY_MAJOR_VERSION >= 3
1358 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1359 #else
1360 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1361 #endif
1362 
1363 /* CLineInTraceback.proto */
1364 #ifdef CYTHON_CLINE_IN_TRACEBACK
1365 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1366 #else
1367 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1368 #endif
1369 
1370 /* CodeObjectCache.proto */
1371 typedef struct {
1372  PyCodeObject* code_object;
1373  int code_line;
1374 } __Pyx_CodeObjectCacheEntry;
1375 struct __Pyx_CodeObjectCache {
1376  int count;
1377  int max_count;
1378  __Pyx_CodeObjectCacheEntry* entries;
1379 };
1380 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1381 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1382 static PyCodeObject *__pyx_find_code_object(int code_line);
1383 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1384 
1385 /* AddTraceback.proto */
1386 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1387  int py_line, const char *filename);
1388 
1389 /* CppExceptionConversion.proto */
1390 #ifndef __Pyx_CppExn2PyErr
1391 #include <new>
1392 #include <typeinfo>
1393 #include <stdexcept>
1394 #include <ios>
1395 static void __Pyx_CppExn2PyErr() {
1396  try {
1397  if (PyErr_Occurred())
1398  ; // let the latest Python exn pass through and ignore the current one
1399  else
1400  throw;
1401  } catch (const std::bad_alloc& exn) {
1402  PyErr_SetString(PyExc_MemoryError, exn.what());
1403  } catch (const std::bad_cast& exn) {
1404  PyErr_SetString(PyExc_TypeError, exn.what());
1405  } catch (const std::bad_typeid& exn) {
1406  PyErr_SetString(PyExc_TypeError, exn.what());
1407  } catch (const std::domain_error& exn) {
1408  PyErr_SetString(PyExc_ValueError, exn.what());
1409  } catch (const std::invalid_argument& exn) {
1410  PyErr_SetString(PyExc_ValueError, exn.what());
1411  } catch (const std::ios_base::failure& exn) {
1412  PyErr_SetString(PyExc_IOError, exn.what());
1413  } catch (const std::out_of_range& exn) {
1414  PyErr_SetString(PyExc_IndexError, exn.what());
1415  } catch (const std::overflow_error& exn) {
1416  PyErr_SetString(PyExc_OverflowError, exn.what());
1417  } catch (const std::range_error& exn) {
1418  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1419  } catch (const std::underflow_error& exn) {
1420  PyErr_SetString(PyExc_ArithmeticError, exn.what());
1421  } catch (const std::exception& exn) {
1422  PyErr_SetString(PyExc_RuntimeError, exn.what());
1423  }
1424  catch (...)
1425  {
1426  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
1427  }
1428 }
1429 #endif
1430 
1431 /* CIntToPy.proto */
1432 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1433 
1434 /* CIntFromPy.proto */
1435 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
1436 
1437 /* CIntToPy.proto */
1438 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
1439 
1440 /* CIntFromPy.proto */
1441 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
1442 
1443 /* FastTypeChecks.proto */
1444 #if CYTHON_COMPILING_IN_CPYTHON
1445 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1446 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1447 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1448 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1449 #else
1450 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1451 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1452 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1453 #endif
1454 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1455 
1456 /* FetchCommonType.proto */
1457 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
1458 
1459 /* SwapException.proto */
1460 #if CYTHON_FAST_THREAD_STATE
1461 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1462 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1463 #else
1464 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1465 #endif
1466 
1467 /* PyObjectCallMethod1.proto */
1468 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
1469 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
1470 
1471 /* CoroutineBase.proto */
1472 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
1473 typedef struct {
1474  PyObject_HEAD
1475  __pyx_coroutine_body_t body;
1476  PyObject *closure;
1477  PyObject *exc_type;
1478  PyObject *exc_value;
1479  PyObject *exc_traceback;
1480  PyObject *gi_weakreflist;
1481  PyObject *classobj;
1482  PyObject *yieldfrom;
1483  PyObject *gi_name;
1484  PyObject *gi_qualname;
1485  PyObject *gi_modulename;
1486  PyObject *gi_code;
1487  int resume_label;
1488  char is_running;
1489 } __pyx_CoroutineObject;
1490 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
1491  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1492  PyObject *name, PyObject *qualname, PyObject *module_name);
1493 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
1494  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
1495  PyObject *name, PyObject *qualname, PyObject *module_name);
1496 static int __Pyx_Coroutine_clear(PyObject *self);
1497 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
1498 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
1499 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
1500 #define __Pyx_Coroutine_SwapException(self) {\
1501  __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
1502  __Pyx_Coroutine_ResetFrameBackpointer(self);\
1503  }
1504 #define __Pyx_Coroutine_ResetAndClearException(self) {\
1505  __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
1506  (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
1507  }
1508 #if CYTHON_FAST_THREAD_STATE
1509 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1510  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
1511 #else
1512 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
1513  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
1514 #endif
1515 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
1516 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
1517 
1518 /* PatchModuleWithCoroutine.proto */
1519 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
1520 
1521 /* PatchGeneratorABC.proto */
1522 static int __Pyx_patch_abc(void);
1523 
1524 /* Generator.proto */
1525 #define __Pyx_Generator_USED
1526 static PyTypeObject *__pyx_GeneratorType = 0;
1527 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
1528 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
1529  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
1530 static PyObject *__Pyx_Generator_Next(PyObject *self);
1531 static int __pyx_Generator_init(void);
1532 
1533 /* CheckBinaryVersion.proto */
1534 static int __Pyx_check_binary_version(void);
1535 
1536 /* InitStrings.proto */
1537 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
1538 
1539 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other); /* proto*/
1540 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto*/
1541 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1542 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other); /* proto*/
1543 static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto*/
1544 static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
1545 
1546 /* Module declarations from 'libcpp.vector' */
1547 
1548 /* Module declarations from 'glucat' */
1549 
1550 /* Module declarations from 'PyClical' */
1551 static PyTypeObject *__pyx_ptype_8PyClical_index_set = 0;
1552 static PyTypeObject *__pyx_ptype_8PyClical_clifford = 0;
1553 static PyTypeObject *__pyx_ptype_8PyClical___pyx_scope_struct____iter__ = 0;
1554 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *); /*proto*/
1555 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1556 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *, int __pyx_skip_dispatch); /*proto*/
1557 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *, int __pyx_skip_dispatch); /*proto*/
1558 static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *); /*proto*/
1559 static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *); /*proto*/
1560 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *, int __pyx_skip_dispatch); /*proto*/
1561 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *, int __pyx_skip_dispatch); /*proto*/
1562 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *, int __pyx_skip_dispatch); /*proto*/
1563 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(PyObject *, int __pyx_skip_dispatch); /*proto*/
1564 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *, int __pyx_skip_dispatch); /*proto*/
1565 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *, int __pyx_skip_dispatch); /*proto*/
1566 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *, int __pyx_skip_dispatch); /*proto*/
1567 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *, int __pyx_skip_dispatch); /*proto*/
1568 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *, int __pyx_skip_dispatch); /*proto*/
1569 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *, int __pyx_skip_dispatch); /*proto*/
1570 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *, int __pyx_skip_dispatch); /*proto*/
1571 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *, int __pyx_skip_dispatch); /*proto*/
1572 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1573 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *, int __pyx_skip_dispatch); /*proto*/
1574 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1575 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/
1576 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *, int __pyx_skip_dispatch); /*proto*/
1577 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sqrt(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sqrt *__pyx_optional_args); /*proto*/
1578 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *, int __pyx_skip_dispatch); /*proto*/
1579 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_log(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_log *__pyx_optional_args); /*proto*/
1580 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_cos *__pyx_optional_args); /*proto*/
1581 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acos(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acos *__pyx_optional_args); /*proto*/
1582 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1583 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_acosh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_acosh *__pyx_optional_args); /*proto*/
1584 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_sin *__pyx_optional_args); /*proto*/
1585 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asin(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asin *__pyx_optional_args); /*proto*/
1586 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1587 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_asinh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_asinh *__pyx_optional_args); /*proto*/
1588 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_tan *__pyx_optional_args); /*proto*/
1589 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atan(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atan *__pyx_optional_args); /*proto*/
1590 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *, int __pyx_skip_dispatch); /*proto*/
1591 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_atanh(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_8PyClical_atanh *__pyx_optional_args); /*proto*/
1592 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*/
1593 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1594 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *, int __pyx_skip_dispatch); /*proto*/
1595 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *, int __pyx_skip_dispatch); /*proto*/
1596 #define __Pyx_MODULE_NAME "PyClical"
1597 extern int __pyx_module_is_main_PyClical;
1598 int __pyx_module_is_main_PyClical = 0;
1599 
1600 /* Implementation of 'PyClical' */
1601 static PyObject *__pyx_builtin_IndexError;
1602 static PyObject *__pyx_builtin_RuntimeError;
1603 static PyObject *__pyx_builtin_TypeError;
1604 static PyObject *__pyx_builtin_ValueError;
1605 static PyObject *__pyx_builtin_NotImplemented;
1606 static PyObject *__pyx_builtin_range;
1607 static PyObject *__pyx_builtin_xrange;
1608 static const char __pyx_k_[] = ".";
1609 static const char __pyx_k_e[] = "e";
1610 static const char __pyx_k_i[] = "i";
1611 static const char __pyx_k_m[] = "m";
1612 static const char __pyx_k_p[] = "p";
1613 static const char __pyx_k_q[] = "q";
1614 static const char __pyx_k__2[] = " ";
1615 static const char __pyx_k__5[] = ":";
1616 static const char __pyx_k__6[] = "\n\t";
1617 static const char __pyx_k__7[] = " (";
1618 static const char __pyx_k__8[] = ", ";
1619 static const char __pyx_k__9[] = ").";
1620 static const char __pyx_k_cl[] = "cl";
1621 static const char __pyx_k_pi[] = "pi";
1622 static const char __pyx_k_cos[] = "cos";
1623 static const char __pyx_k_exp[] = "exp";
1624 static const char __pyx_k_frm[] = "frm";
1625 static const char __pyx_k_inv[] = "inv";
1626 static const char __pyx_k_ist[] = "ist";
1627 static const char __pyx_k_ixt[] = "ixt";
1628 static const char __pyx_k_lhs[] = "lhs";
1629 static const char __pyx_k_log[] = "log";
1630 static const char __pyx_k_max[] = "max";
1631 static const char __pyx_k_min[] = "min";
1632 static const char __pyx_k_obj[] = "obj";
1633 static const char __pyx_k_odd[] = "odd";
1634 static const char __pyx_k_pow[] = "pow";
1635 static const char __pyx_k_rhs[] = "rhs";
1636 static const char __pyx_k_sin[] = "sin";
1637 static const char __pyx_k_tan[] = "tan";
1638 static const char __pyx_k_tau[] = "tau";
1639 static const char __pyx_k_Real[] = "Real";
1640 static const char __pyx_k_acos[] = "acos";
1641 static const char __pyx_k_args[] = "args";
1642 static const char __pyx_k_asin[] = "asin";
1643 static const char __pyx_k_atan[] = "atan";
1644 static const char __pyx_k_conj[] = "conj";
1645 static const char __pyx_k_copy[] = "copy";
1646 static const char __pyx_k_cosh[] = "cosh";
1647 static const char __pyx_k_even[] = "even";
1648 static const char __pyx_k_fill[] = "fill";
1649 static const char __pyx_k_from[] = " from ";
1650 static const char __pyx_k_iter[] = "__iter__";
1651 static const char __pyx_k_main[] = "__main__";
1652 static const char __pyx_k_math[] = "math";
1653 static const char __pyx_k_name[] = "__name__";
1654 static const char __pyx_k_norm[] = "norm";
1655 static const char __pyx_k_pure[] = "pure";
1656 static const char __pyx_k_quad[] = "quad";
1657 static const char __pyx_k_send[] = "send";
1658 static const char __pyx_k_sinh[] = "sinh";
1659 static const char __pyx_k_sqrt[] = "sqrt";
1660 static const char __pyx_k_tanh[] = "tanh";
1661 static const char __pyx_k_test[] = "_test";
1662 static const char __pyx_k_0_8_2[] = "0.8.2";
1663 static const char __pyx_k_acosh[] = "acosh";
1664 static const char __pyx_k_asinh[] = "asinh";
1665 static const char __pyx_k_atanh[] = "atanh";
1666 static const char __pyx_k_close[] = "close";
1667 static const char __pyx_k_grade[] = "grade";
1668 static const char __pyx_k_istpq[] = "istpq";
1669 static const char __pyx_k_nbar3[] = "nbar3";
1670 static const char __pyx_k_ninf3[] = "ninf3";
1671 static const char __pyx_k_other[] = "other";
1672 static const char __pyx_k_range[] = "range";
1673 static const char __pyx_k_throw[] = "throw";
1674 static const char __pyx_k_using[] = " using (";
1675 static const char __pyx_k_value[] = " value ";
1676 static const char __pyx_k_import[] = "__import__";
1677 static const char __pyx_k_reduce[] = "__reduce__";
1678 static const char __pyx_k_scalar[] = "scalar";
1679 static const char __pyx_k_test_2[] = "__test__";
1680 static const char __pyx_k_xrange[] = "xrange";
1681 static const char __pyx_k_doctest[] = "doctest";
1682 static const char __pyx_k_invalid[] = " invalid ";
1683 static const char __pyx_k_numbers[] = "numbers";
1684 static const char __pyx_k_reverse[] = "reverse";
1685 static const char __pyx_k_testmod[] = "testmod";
1686 static const char __pyx_k_version[] = "__version__";
1687 static const char __pyx_k_Integral[] = "Integral";
1688 static const char __pyx_k_PyClical[] = "PyClical";
1689 static const char __pyx_k_Sequence[] = "Sequence";
1690 static const char __pyx_k_as_frame[] = " as frame:\n\t";
1691 static const char __pyx_k_getstate[] = "__getstate__";
1692 static const char __pyx_k_involute[] = "involute";
1693 static const char __pyx_k_setstate[] = "__setstate__";
1694 static const char __pyx_k_to_frame[] = " to frame ";
1695 static const char __pyx_k_TypeError[] = "TypeError";
1696 static const char __pyx_k_outer_pow[] = "outer_pow";
1697 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
1698 static const char __pyx_k_IndexError[] = "IndexError";
1699 static const char __pyx_k_ValueError[] = "ValueError";
1700 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
1701 static const char __pyx_k_collections[] = "collections";
1702 static const char __pyx_k_e_line_1887[] = "e (line 1887)";
1703 static const char __pyx_k_PyClical_pyx[] = "PyClical.pyx";
1704 static const char __pyx_k_RuntimeError[] = "RuntimeError";
1705 static const char __pyx_k_abs_line_1473[] = "abs (line 1473)";
1706 static const char __pyx_k_cos_line_1602[] = "cos (line 1602)";
1707 static const char __pyx_k_exp_line_1565[] = "exp (line 1565)";
1708 static const char __pyx_k_inv_line_1329[] = "inv (line 1329)";
1709 static const char __pyx_k_log_line_1579[] = "log (line 1579)";
1710 static const char __pyx_k_odd_line_1397[] = "odd (line 1397)";
1711 static const char __pyx_k_pow_line_1494[] = "pow (line 1494)";
1712 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
1713 static const char __pyx_k_sin_line_1679[] = "sin (line 1679)";
1714 static const char __pyx_k_tan_line_1752[] = "tan (line 1752)";
1715 static const char __pyx_k_using_invalid[] = " using invalid ";
1716 static const char __pyx_k_Cannot_reframe[] = "Cannot reframe";
1717 static const char __pyx_k_NotImplemented[] = "NotImplemented";
1718 static const char __pyx_k_Not_applicable[] = "Not applicable.";
1719 static const char __pyx_k_acos_line_1619[] = "acos (line 1619)";
1720 static const char __pyx_k_agc3_line_1844[] = "agc3 (line 1844)";
1721 static const char __pyx_k_asin_line_1698[] = "asin (line 1698)";
1722 static const char __pyx_k_atan_line_1769[] = "atan (line 1769)";
1723 static const char __pyx_k_cga3_line_1824[] = "cga3 (line 1824)";
1724 static const char __pyx_k_conj_line_1436[] = "conj (line 1436)";
1725 static const char __pyx_k_cosh_line_1640[] = "cosh (line 1640)";
1726 static const char __pyx_k_even_line_1388[] = "even (line 1388)";
1727 static const char __pyx_k_imag_line_1366[] = "imag (line 1366)";
1728 static const char __pyx_k_invalid_string[] = " invalid string ";
1729 static const char __pyx_k_norm_line_1462[] = "norm (line 1462)";
1730 static const char __pyx_k_pure_line_1377[] = "pure (line 1377)";
1731 static const char __pyx_k_quad_line_1451[] = "quad (line 1451)";
1732 static const char __pyx_k_real_line_1355[] = "real (line 1355)";
1733 static const char __pyx_k_sinh_line_1719[] = "sinh (line 1719)";
1734 static const char __pyx_k_sqrt_line_1542[] = "sqrt (line 1542)";
1735 static const char __pyx_k_tanh_line_1786[] = "tanh (line 1786)";
1736 static const char __pyx_k_acosh_line_1656[] = "acosh (line 1656)";
1737 static const char __pyx_k_asinh_line_1733[] = "asinh (line 1733)";
1738 static const char __pyx_k_atanh_line_1798[] = "atanh (line 1798)";
1739 static const char __pyx_k_istpq_line_1900[] = "istpq (line 1900)";
1740 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
1741 static const char __pyx_k_compare_line_490[] = "compare (line 490)";
1742 static const char __pyx_k_index_set___iter[] = "index_set.__iter__";
1743 static const char __pyx_k_max_pos_line_511[] = "max_pos (line 511)";
1744 static const char __pyx_k_min_neg_line_502[] = "min_neg (line 502)";
1745 static const char __pyx_k_scalar_line_1344[] = "scalar (line 1344)";
1746 static const char __pyx_k_cga3std_line_1833[] = "cga3std (line 1833)";
1747 static const char __pyx_k_max_abs_line_1482[] = "max_abs (line 1482)";
1748 static const char __pyx_k_reverse_line_1421[] = "reverse (line 1421)";
1749 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
1750 static const char __pyx_k_involute_line_1406[] = "involute (line 1406)";
1751 static const char __pyx_k_outer_pow_line_1518[] = "outer_pow (line 1518)";
1752 static const char __pyx_k_clifford_inv_line_925[] = "clifford.inv (line 925)";
1753 static const char __pyx_k_clifford_pow_line_979[] = "clifford.pow (line 979)";
1754 static const char __pyx_k_clifford_abs_line_1174[] = "clifford.abs (line 1174)";
1755 static const char __pyx_k_clifford_copy_line_554[] = "clifford.copy (line 554)";
1756 static const char __pyx_k_clifford_odd_line_1069[] = "clifford.odd (line 1069)";
1757 static const char __pyx_k_complexifier_line_1527[] = "complexifier (line 1527)";
1758 static const char __pyx_k_index_set_copy_line_64[] = "index_set.copy (line 64)";
1759 static const char __pyx_k_index_set_max_line_349[] = "index_set.max (line 349)";
1760 static const char __pyx_k_index_set_min_line_340[] = "index_set.min (line 340)";
1761 static const char __pyx_k_clifford_conj_line_1137[] = "clifford.conj (line 1137)";
1762 static const char __pyx_k_clifford_even_line_1060[] = "clifford.even (line 1060)";
1763 static const char __pyx_k_clifford_norm_line_1163[] = "clifford.norm (line 1163)";
1764 static const char __pyx_k_clifford_pure_line_1049[] = "clifford.pure (line 1049)";
1765 static const char __pyx_k_clifford_quad_line_1152[] = "clifford.quad (line 1152)";
1766 static const char __pyx_k_Unary_print_clifford_1_1[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
1767 static const char __pyx_k_clifford___or___line_938[] = "clifford.__or__ (line 938)";
1768 static const char __pyx_k_clifford_frame_line_1214[] = "clifford.frame (line 1214)";
1769 static const char __pyx_k_clifford_hidden_doctests[] = "clifford_hidden_doctests";
1770 static const char __pyx_k_clifford_isnan_line_1205[] = "clifford.isnan (line 1205)";
1771 static const char __pyx_k_index_set_count_line_313[] = "index_set.count (line 313)";
1772 static const char __pyx_k_clifford___add___line_739[] = "clifford.__add__ (line 739)";
1773 static const char __pyx_k_clifford___and___line_835[] = "clifford.__and__ (line 835)";
1774 static const char __pyx_k_clifford___div___line_895[] = "clifford.__div__ (line 895)";
1775 static const char __pyx_k_clifford___ior___line_949[] = "clifford.__ior__ (line 949)";
1776 static const char __pyx_k_clifford___mod___line_805[] = "clifford.__mod__ (line 805)";
1777 static const char __pyx_k_clifford___mul___line_779[] = "clifford.__mul__ (line 779)";
1778 static const char __pyx_k_clifford___neg___line_721[] = "clifford.__neg__ (line 721)";
1779 static const char __pyx_k_clifford___pos___line_730[] = "clifford.__pos__ (line 730)";
1780 static const char __pyx_k_clifford___pow___line_960[] = "clifford.__pow__ (line 960)";
1781 static const char __pyx_k_clifford___sub___line_759[] = "clifford.__sub__ (line 759)";
1782 static const char __pyx_k_clifford___xor___line_865[] = "clifford.__xor__ (line 865)";
1783 static const char __pyx_k_clifford_reframe_line_648[] = "clifford.reframe (line 648)";
1784 static const char __pyx_k_clifford_scalar_line_1038[] = "clifford.scalar (line 1038)";
1785 static const char __pyx_k_index_set___or___line_291[] = "index_set.__or__ (line 291)";
1786 static const char __pyx_k_index_set_hidden_doctests[] = "index_set_hidden_doctests";
1787 static const char __pyx_k_random_clifford_line_1815[] = "random_clifford (line 1815)";
1788 static const char __pyx_k_Cannot_take_vector_part_of[] = "Cannot take vector part of ";
1789 static const char __pyx_k_Unary_print_clifford_1_1_2[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
1790 static const char __pyx_k_clifford___iadd___line_750[] = "clifford.__iadd__ (line 750)";
1791 static const char __pyx_k_clifford___iand___line_850[] = "clifford.__iand__ (line 850)";
1792 static const char __pyx_k_clifford___idiv___line_910[] = "clifford.__idiv__ (line 910)";
1793 static const char __pyx_k_clifford___imod___line_820[] = "clifford.__imod__ (line 820)";
1794 static const char __pyx_k_clifford___imul___line_792[] = "clifford.__imul__ (line 792)";
1795 static const char __pyx_k_clifford___isub___line_770[] = "clifford.__isub__ (line 770)";
1796 static const char __pyx_k_clifford___iter___line_637[] = "clifford.__iter__ (line 637)";
1797 static const char __pyx_k_clifford___ixor___line_880[] = "clifford.__ixor__ (line 880)";
1798 static const char __pyx_k_clifford___str___line_1234[] = "clifford.__str__ (line 1234)";
1799 static const char __pyx_k_clifford_max_abs_line_1183[] = "clifford.max_abs (line 1183)";
1800 static const char __pyx_k_clifford_reverse_line_1122[] = "clifford.reverse (line 1122)";
1801 static const char __pyx_k_index_set___and___line_269[] = "index_set.__and__ (line 269)";
1802 static const char __pyx_k_index_set___ior___line_302[] = "index_set.__ior__ (line 302)";
1803 static const char __pyx_k_index_set___str___line_393[] = "index_set.__str__ (line 393)";
1804 static const char __pyx_k_index_set___xor___line_247[] = "index_set.__xor__ (line 247)";
1805 static const char __pyx_k_clifford___call___line_1019[] = "clifford.__call__ (line 1019)";
1806 static const char __pyx_k_clifford___repr___line_1225[] = "clifford.__repr__ (line 1225)";
1807 static const char __pyx_k_clifford_involute_line_1106[] = "clifford.involute (line 1106)";
1808 static const char __pyx_k_index_set___iand___line_280[] = "index_set.__iand__ (line 280)";
1809 static const char __pyx_k_index_set___iter___line_227[] = "index_set.__iter__ (line 227)";
1810 static const char __pyx_k_index_set___ixor___line_258[] = "index_set.__ixor__ (line 258)";
1811 static const char __pyx_k_index_set___repr___line_382[] = "index_set.__repr__ (line 382)";
1812 static const char __pyx_k_clifford_outer_pow_line_1003[] = "clifford.outer_pow (line 1003)";
1813 static const char __pyx_k_clifford_truncated_line_1194[] = "clifford.truncated (line 1194)";
1814 static const char __pyx_k_index_set_count_neg_line_322[] = "index_set.count_neg (line 322)";
1815 static const char __pyx_k_index_set_count_pos_line_331[] = "index_set.count_pos (line 331)";
1816 static const char __pyx_k_clifford___getitem___line_706[] = "clifford.__getitem__ (line 706)";
1817 static const char __pyx_k_index_set___invert___line_238[] = "index_set.__invert__ (line 238)";
1818 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 ";
1819 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 ";
1820 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 ";
1821 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 ";
1822 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 ";
1823 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 ";
1824 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 ";
1825 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 ";
1826 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 ";
1827 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 ";
1828 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 ";
1829 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 ";
1830 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 ";
1831 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 ";
1832 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 ";
1833 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 ";
1834 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 ";
1835 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 ";
1836 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 ";
1837 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 ";
1838 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 ";
1839 static const char __pyx_k_clifford_vector_part_line_1078[] = "clifford.vector_part (line 1078)";
1840 static const char __pyx_k_index_set___getitem___line_189[] = "index_set.__getitem__ (line 189)";
1841 static const char __pyx_k_index_set___setitem___line_177[] = "index_set.__setitem__ (line 177)";
1842 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 ";
1843 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 ";
1844 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 ";
1845 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 ";
1846 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 ";
1847 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 ";
1848 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 ";
1849 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 ";
1850 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 ";
1851 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 ";
1852 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 ";
1853 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 ";
1854 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 ";
1855 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 ";
1856 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 ";
1857 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 ";
1858 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 ";
1859 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 ";
1860 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 ";
1861 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 ";
1862 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 ";
1863 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 ";
1864 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 ";
1865 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 ";
1866 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 ";
1867 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 ";
1868 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 ";
1869 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 ";
1870 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 ";
1871 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 ";
1872 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 ";
1873 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 ";
1874 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 ";
1875 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 ";
1876 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 ";
1877 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 ";
1878 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 ";
1879 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 ";
1880 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 ";
1881 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 ";
1882 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 ";
1883 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 ";
1884 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 ";
1885 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 ";
1886 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 ";
1887 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 ";
1888 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 ";
1889 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 ";
1890 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 ";
1891 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 ";
1892 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 ";
1893 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 ";
1894 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 ";
1895 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 ";
1896 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 ";
1897 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 ";
1898 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 ";
1899 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 ";
1900 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 ";
1901 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 ";
1902 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 ";
1903 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 ";
1904 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 ";
1905 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 ";
1906 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 ";
1907 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 ";
1908 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 ";
1909 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 ";
1910  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 ";
1911  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 ";
1912  static const char __pyx_k_This_comparison_operator_is_not[] = "This comparison operator is not implemented for ";
1913  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 ";
1914  static const char __pyx_k_index_set_sign_of_mult_line_364[] = "index_set.sign_of_mult (line 364)";
1915  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 ";
1916  static const char __pyx_k_Cannot_initialize_clifford_objec[] = "Cannot initialize clifford object from";
1917  static const char __pyx_k_Cannot_initialize_index_set_obje[] = "Cannot initialize index_set object from";
1918  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 ";
1919  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 ";
1920  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 ";
1921  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 ";
1922  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 ";
1923  static const char __pyx_k_clifford_hidden_doctests_line_12[] = "clifford_hidden_doctests (line 1243)";
1924  static const char __pyx_k_index_set_hidden_doctests_line_4[] = "index_set_hidden_doctests (line 404)";
1925  static const char __pyx_k_index_set_sign_of_square_line_37[] = "index_set.sign_of_square (line 373)";
1926  static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
1927  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 ";
1928  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 ";
1929  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 ";
1930  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 ";
1931  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 ";
1932  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 ";
1933  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 ";
1934  static PyObject *__pyx_kp_s_;
1935  static PyObject *__pyx_kp_s_0_8_2;
1936  static PyObject *__pyx_kp_u_Abbreviation_for_clifford_index;
1937  static PyObject *__pyx_kp_u_Abbreviation_for_index_set_q_p;
1938  static PyObject *__pyx_kp_u_Absolute_value_of_multivector_m;
1939  static PyObject *__pyx_kp_u_Absolute_value_square_root_of_n;
1940  static PyObject *__pyx_kp_s_Cannot_initialize_clifford_objec;
1941  static PyObject *__pyx_kp_s_Cannot_initialize_index_set_obje;
1942  static PyObject *__pyx_kp_s_Cannot_reframe;
1943  static PyObject *__pyx_kp_s_Cannot_take_vector_part_of;
1944  static PyObject *__pyx_kp_u_Cardinality_Number_of_indices_i;
1945  static PyObject *__pyx_kp_u_Check_if_a_multivector_contains;
1946  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute;
1947  static PyObject *__pyx_kp_u_Conjugation_reverse_o_involute_2;
1948  static PyObject *__pyx_kp_u_Contraction_print_clifford_1_cl;
1949  static PyObject *__pyx_kp_u_Contraction_x_clifford_1_x_clif;
1950  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_Euc;
1951  static PyObject *__pyx_kp_u_Convert_CGA3_null_vector_to_sta;
1952  static PyObject *__pyx_kp_u_Convert_Euclidean_3D_multivecto;
1953  static PyObject *__pyx_kp_u_Copy_this_clifford_object_x_cli;
1954  static PyObject *__pyx_kp_u_Copy_this_index_set_object_s_in;
1955  static PyObject *__pyx_kp_u_Cosine_of_multivector_with_opti;
1956  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of;
1957  static PyObject *__pyx_kp_u_Even_part_of_multivector_sum_of_2;
1958  static PyObject *__pyx_kp_u_Exponential_of_multivector_x_cl;
1959  static PyObject *__pyx_kp_u_Geometric_difference_print_clif;
1960  static PyObject *__pyx_kp_u_Geometric_difference_x_clifford;
1961  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers;
1962  static PyObject *__pyx_kp_u_Geometric_multiplicative_invers_2;
1963  static PyObject *__pyx_kp_u_Geometric_product_print_cliffor;
1964  static PyObject *__pyx_kp_u_Geometric_product_x_clifford_2;
1965  static PyObject *__pyx_kp_u_Geometric_quotient_print_cliffo;
1966  static PyObject *__pyx_kp_u_Geometric_quotient_x_clifford_1;
1967  static PyObject *__pyx_kp_u_Geometric_sum_print_clifford_1;
1968  static PyObject *__pyx_kp_u_Geometric_sum_x_clifford_1_x_cl;
1969  static PyObject *__pyx_kp_u_Get_the_value_of_an_index_set_o;
1970  static PyObject *__pyx_kp_u_Hyperbolic_cosine_of_multivecto;
1971  static PyObject *__pyx_kp_u_Hyperbolic_sine_of_multivector;
1972  static PyObject *__pyx_kp_u_Hyperbolic_tangent_of_multivect;
1973  static PyObject *__pyx_kp_u_Imaginary_part_deprecated_alway;
1974  static PyObject *__pyx_n_s_IndexError;
1975  static PyObject *__pyx_kp_u_Inner_product_print_clifford_1;
1976  static PyObject *__pyx_kp_u_Inner_product_x_clifford_1_x_cl;
1977  static PyObject *__pyx_kp_u_Integer_power_of_multivector_ob;
1978  static PyObject *__pyx_n_s_Integral;
1979  static PyObject *__pyx_kp_u_Inverse_cosine_of_multivector_w;
1980  static PyObject *__pyx_kp_u_Inverse_hyperbolic_cosine_of_mu;
1981  static PyObject *__pyx_kp_u_Inverse_hyperbolic_sine_of_mult;
1982  static PyObject *__pyx_kp_u_Inverse_hyperbolic_tangent_of_m;
1983  static PyObject *__pyx_kp_u_Inverse_sine_of_multivector_wit;
1984  static PyObject *__pyx_kp_u_Inverse_tangent_of_multivector;
1985  static PyObject *__pyx_kp_u_Iterate_over_the_indices_of_an;
1986  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla;
1987  static PyObject *__pyx_kp_u_Main_involution_each_i_is_repla_2;
1988  static PyObject *__pyx_kp_u_Maximum_absolute_value_of_coord;
1989  static PyObject *__pyx_kp_u_Maximum_member_index_set_1_1_2;
1990  static PyObject *__pyx_kp_u_Maximum_of_absolute_values_of_c;
1991  static PyObject *__pyx_kp_u_Maximum_positive_index_or_0_if;
1992  static PyObject *__pyx_kp_u_Minimum_member_index_set_1_1_2;
1993  static PyObject *__pyx_kp_u_Minimum_negative_index_or_0_if;
1994  static PyObject *__pyx_kp_u_Natural_logarithm_of_multivecto;
1995  static PyObject *__pyx_kp_u_Norm_sum_of_squares_of_coordina;
1996  static PyObject *__pyx_n_s_NotImplemented;
1997  static PyObject *__pyx_kp_s_Not_applicable;
1998  static PyObject *__pyx_kp_u_Not_applicable_for_a_in_cliffor;
1999  static PyObject *__pyx_kp_u_Number_of_negative_indices_incl;
2000  static PyObject *__pyx_kp_u_Number_of_positive_indices_incl;
2001  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of;
2002  static PyObject *__pyx_kp_u_Odd_part_of_multivector_sum_of_2;
2003  static PyObject *__pyx_kp_u_Outer_product_power_of_multivec;
2004  static PyObject *__pyx_kp_u_Outer_product_power_x_clifford;
2005  static PyObject *__pyx_kp_u_Outer_product_print_clifford_1;
2006  static PyObject *__pyx_kp_u_Outer_product_x_clifford_1_x_cl;
2007  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford;
2008  static PyObject *__pyx_kp_u_Power_self_to_the_m_x_clifford_2;
2009  static PyObject *__pyx_kp_u_Pure_grade_vector_part_print_cl;
2010  static PyObject *__pyx_kp_u_Pure_part_print_clifford_1_1_1;
2011  static PyObject *__pyx_kp_u_Pure_part_print_pure_clifford_1;
2012  static PyObject *__pyx_kp_u_Put_self_into_a_larger_frame_co;
2013  static PyObject *__pyx_n_s_PyClical;
2014  static PyObject *__pyx_kp_s_PyClical_pyx;
2015  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print;
2016  static PyObject *__pyx_kp_u_Quadratic_form_rev_x_x_0_print_2;
2017  static PyObject *__pyx_kp_u_Random_multivector_within_a_fra;
2018  static PyObject *__pyx_n_s_Real;
2019  static PyObject *__pyx_kp_u_Real_part_synonym_for_scalar_pa;
2020  static PyObject *__pyx_kp_u_Remove_all_terms_of_self_with_r;
2021  static PyObject *__pyx_kp_u_Reversion_eg_1_2_2_1_print_reve;
2022  static PyObject *__pyx_kp_u_Reversion_eg_clifford_1_cliffor;
2023  static PyObject *__pyx_n_s_RuntimeError;
2024  static PyObject *__pyx_kp_u_Scalar_part_clifford_1_1_1_2_sc;
2025  static PyObject *__pyx_kp_u_Scalar_part_scalar_clifford_1_1;
2026  static PyObject *__pyx_n_s_Sequence;
2027  static PyObject *__pyx_kp_u_Set_complement_not_print_index;
2028  static PyObject *__pyx_kp_u_Set_intersection_and_print_inde;
2029  static PyObject *__pyx_kp_u_Set_intersection_and_x_index_se;
2030  static PyObject *__pyx_kp_u_Set_the_value_of_an_index_set_o;
2031  static PyObject *__pyx_kp_u_Set_union_or_print_index_set_1;
2032  static PyObject *__pyx_kp_u_Set_union_or_x_index_set_1_x_in;
2033  static PyObject *__pyx_kp_u_Sign_of_geometric_product_of_tw;
2034  static PyObject *__pyx_kp_u_Sign_of_geometric_square_of_a_C;
2035  static PyObject *__pyx_kp_u_Sine_of_multivector_with_option;
2036  static PyObject *__pyx_kp_u_Square_root_of_1_which_commutes;
2037  static PyObject *__pyx_kp_u_Square_root_of_multivector_with;
2038  static PyObject *__pyx_kp_u_Subalgebra_generated_by_all_gen;
2039  static PyObject *__pyx_kp_u_Subscripting_map_from_index_set;
2040  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus;
2041  static PyObject *__pyx_kp_u_Symmetric_set_difference_exclus_2;
2042  static PyObject *__pyx_kp_u_Tangent_of_multivector_with_opt;
2043  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes;
2044  static PyObject *__pyx_kp_u_Tests_for_functions_that_Doctes_2;
2045  static PyObject *__pyx_kp_u_The_informal_string_representat;
2046  static PyObject *__pyx_kp_u_The_informal_string_representat_2;
2047  static PyObject *__pyx_kp_u_The_official_string_representat;
2048  static PyObject *__pyx_kp_u_The_official_string_representat_2;
2049  static PyObject *__pyx_kp_s_This_comparison_operator_is_not;
2050  static PyObject *__pyx_kp_u_Transform_left_hand_side_using;
2051  static PyObject *__pyx_kp_u_Transform_left_hand_side_using_2;
2052  static PyObject *__pyx_n_s_TypeError;
2053  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1;
2054  static PyObject *__pyx_kp_u_Unary_print_clifford_1_1_2;
2055  static PyObject *__pyx_n_s_ValueError;
2056  static PyObject *__pyx_kp_u_Vector_part_of_multivector_as_a;
2057  static PyObject *__pyx_kp_s__2;
2058  static PyObject *__pyx_kp_s__5;
2059  static PyObject *__pyx_kp_s__6;
2060  static PyObject *__pyx_kp_s__7;
2061  static PyObject *__pyx_kp_s__8;
2062  static PyObject *__pyx_kp_s__9;
2063  static PyObject *__pyx_kp_u_abs_line_1473;
2064  static PyObject *__pyx_n_s_acos;
2065  static PyObject *__pyx_kp_u_acos_line_1619;
2066  static PyObject *__pyx_n_s_acosh;
2067  static PyObject *__pyx_kp_u_acosh_line_1656;
2068  static PyObject *__pyx_kp_u_agc3_line_1844;
2069  static PyObject *__pyx_n_s_args;
2070  static PyObject *__pyx_kp_s_as_frame;
2071  static PyObject *__pyx_n_s_asin;
2072  static PyObject *__pyx_kp_u_asin_line_1698;
2073  static PyObject *__pyx_n_s_asinh;
2074  static PyObject *__pyx_kp_u_asinh_line_1733;
2075  static PyObject *__pyx_n_s_atan;
2076  static PyObject *__pyx_kp_u_atan_line_1769;
2077  static PyObject *__pyx_n_s_atanh;
2078  static PyObject *__pyx_kp_u_atanh_line_1798;
2079  static PyObject *__pyx_kp_u_cga3_line_1824;
2080  static PyObject *__pyx_kp_u_cga3std_line_1833;
2081  static PyObject *__pyx_n_s_cl;
2082  static PyObject *__pyx_kp_u_clifford___add___line_739;
2083  static PyObject *__pyx_kp_u_clifford___and___line_835;
2084  static PyObject *__pyx_kp_u_clifford___call___line_1019;
2085  static PyObject *__pyx_kp_u_clifford___div___line_895;
2086  static PyObject *__pyx_kp_u_clifford___getitem___line_706;
2087  static PyObject *__pyx_kp_u_clifford___iadd___line_750;
2088  static PyObject *__pyx_kp_u_clifford___iand___line_850;
2089  static PyObject *__pyx_kp_u_clifford___idiv___line_910;
2090  static PyObject *__pyx_kp_u_clifford___imod___line_820;
2091  static PyObject *__pyx_kp_u_clifford___imul___line_792;
2092  static PyObject *__pyx_kp_u_clifford___ior___line_949;
2093  static PyObject *__pyx_kp_u_clifford___isub___line_770;
2094  static PyObject *__pyx_kp_u_clifford___iter___line_637;
2095  static PyObject *__pyx_kp_u_clifford___ixor___line_880;
2096  static PyObject *__pyx_kp_u_clifford___mod___line_805;
2097  static PyObject *__pyx_kp_u_clifford___mul___line_779;
2098  static PyObject *__pyx_kp_u_clifford___neg___line_721;
2099  static PyObject *__pyx_kp_u_clifford___or___line_938;
2100  static PyObject *__pyx_kp_u_clifford___pos___line_730;
2101  static PyObject *__pyx_kp_u_clifford___pow___line_960;
2102  static PyObject *__pyx_kp_u_clifford___repr___line_1225;
2103  static PyObject *__pyx_kp_u_clifford___str___line_1234;
2104  static PyObject *__pyx_kp_u_clifford___sub___line_759;
2105  static PyObject *__pyx_kp_u_clifford___xor___line_865;
2106  static PyObject *__pyx_kp_u_clifford_abs_line_1174;
2107  static PyObject *__pyx_kp_u_clifford_conj_line_1137;
2108  static PyObject *__pyx_kp_u_clifford_copy_line_554;
2109  static PyObject *__pyx_kp_u_clifford_even_line_1060;
2110  static PyObject *__pyx_kp_u_clifford_frame_line_1214;
2111  static PyObject *__pyx_n_s_clifford_hidden_doctests;
2112  static PyObject *__pyx_kp_u_clifford_hidden_doctests_line_12;
2113  static PyObject *__pyx_kp_u_clifford_inv_line_925;
2114  static PyObject *__pyx_kp_u_clifford_involute_line_1106;
2115  static PyObject *__pyx_kp_u_clifford_isnan_line_1205;
2116  static PyObject *__pyx_kp_u_clifford_max_abs_line_1183;
2117  static PyObject *__pyx_kp_u_clifford_norm_line_1163;
2118  static PyObject *__pyx_kp_u_clifford_odd_line_1069;
2119  static PyObject *__pyx_kp_u_clifford_outer_pow_line_1003;
2120  static PyObject *__pyx_kp_u_clifford_pow_line_979;
2121  static PyObject *__pyx_kp_u_clifford_pure_line_1049;
2122  static PyObject *__pyx_kp_u_clifford_quad_line_1152;
2123  static PyObject *__pyx_kp_u_clifford_reframe_line_648;
2124  static PyObject *__pyx_kp_u_clifford_reverse_line_1122;
2125  static PyObject *__pyx_kp_u_clifford_scalar_line_1038;
2126  static PyObject *__pyx_kp_u_clifford_truncated_line_1194;
2127  static PyObject *__pyx_kp_u_clifford_vector_part_line_1078;
2128  static PyObject *__pyx_n_s_cline_in_traceback;
2129  static PyObject *__pyx_n_s_close;
2130  static PyObject *__pyx_n_s_collections;
2131  static PyObject *__pyx_kp_u_compare_line_490;
2132  static PyObject *__pyx_kp_u_complexifier_line_1527;
2133  static PyObject *__pyx_n_s_conj;
2134  static PyObject *__pyx_kp_u_conj_line_1436;
2135  static PyObject *__pyx_n_s_copy;
2136  static PyObject *__pyx_n_s_cos;
2137  static PyObject *__pyx_kp_u_cos_line_1602;
2138  static PyObject *__pyx_n_s_cosh;
2139  static PyObject *__pyx_kp_u_cosh_line_1640;
2140  static PyObject *__pyx_n_s_doctest;
2141  static PyObject *__pyx_n_s_e;
2142  static PyObject *__pyx_kp_u_e_line_1887;
2143  static PyObject *__pyx_n_s_even;
2144  static PyObject *__pyx_kp_u_even_line_1388;
2145  static PyObject *__pyx_n_s_exp;
2146  static PyObject *__pyx_kp_u_exp_line_1565;
2147  static PyObject *__pyx_n_s_fill;
2148  static PyObject *__pyx_n_s_frm;
2149  static PyObject *__pyx_kp_s_from;
2150  static PyObject *__pyx_n_s_getstate;
2151  static PyObject *__pyx_n_s_grade;
2152  static PyObject *__pyx_n_s_i;
2153  static PyObject *__pyx_kp_u_imag_line_1366;
2154  static PyObject *__pyx_n_s_import;
2155  static PyObject *__pyx_kp_u_index_set___and___line_269;
2156  static PyObject *__pyx_kp_u_index_set___getitem___line_189;
2157  static PyObject *__pyx_kp_u_index_set___iand___line_280;
2158  static PyObject *__pyx_kp_u_index_set___invert___line_238;
2159  static PyObject *__pyx_kp_u_index_set___ior___line_302;
2160  static PyObject *__pyx_n_s_index_set___iter;
2161  static PyObject *__pyx_kp_u_index_set___iter___line_227;
2162  static PyObject *__pyx_kp_u_index_set___ixor___line_258;
2163  static PyObject *__pyx_kp_u_index_set___or___line_291;
2164  static PyObject *__pyx_kp_u_index_set___repr___line_382;
2165  static PyObject *__pyx_kp_u_index_set___setitem___line_177;
2166  static PyObject *__pyx_kp_u_index_set___str___line_393;
2167  static PyObject *__pyx_kp_u_index_set___xor___line_247;
2168  static PyObject *__pyx_kp_u_index_set_copy_line_64;
2169  static PyObject *__pyx_kp_u_index_set_count_line_313;
2170  static PyObject *__pyx_kp_u_index_set_count_neg_line_322;
2171  static PyObject *__pyx_kp_u_index_set_count_pos_line_331;
2172  static PyObject *__pyx_n_s_index_set_hidden_doctests;
2173  static PyObject *__pyx_kp_u_index_set_hidden_doctests_line_4;
2174  static PyObject *__pyx_kp_u_index_set_max_line_349;
2175  static PyObject *__pyx_kp_u_index_set_min_line_340;
2176  static PyObject *__pyx_kp_u_index_set_sign_of_mult_line_364;
2177  static PyObject *__pyx_kp_u_index_set_sign_of_square_line_37;
2178  static PyObject *__pyx_n_s_inv;
2179  static PyObject *__pyx_kp_u_inv_line_1329;
2180  static PyObject *__pyx_kp_s_invalid;
2181  static PyObject *__pyx_kp_s_invalid_string;
2182  static PyObject *__pyx_n_s_involute;
2183  static PyObject *__pyx_kp_u_involute_line_1406;
2184  static PyObject *__pyx_n_s_ist;
2185  static PyObject *__pyx_n_s_istpq;
2186  static PyObject *__pyx_kp_u_istpq_line_1900;
2187  static PyObject *__pyx_n_s_iter;
2188  static PyObject *__pyx_n_s_ixt;
2189  static PyObject *__pyx_kp_u_lexicographic_compare_eg_3_4_5;
2190  static PyObject *__pyx_n_s_lhs;
2191  static PyObject *__pyx_n_s_log;
2192  static PyObject *__pyx_kp_u_log_line_1579;
2193  static PyObject *__pyx_n_s_m;
2194  static PyObject *__pyx_n_s_main;
2195  static PyObject *__pyx_n_s_math;
2196  static PyObject *__pyx_n_s_max;
2197  static PyObject *__pyx_kp_u_max_abs_line_1482;
2198  static PyObject *__pyx_kp_u_max_pos_line_511;
2199  static PyObject *__pyx_n_s_min;
2200  static PyObject *__pyx_kp_u_min_neg_line_502;
2201  static PyObject *__pyx_n_s_name;
2202  static PyObject *__pyx_n_s_nbar3;
2203  static PyObject *__pyx_n_s_ninf3;
2204  static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2205  static PyObject *__pyx_n_s_norm;
2206  static PyObject *__pyx_kp_u_norm_line_1462;
2207  static PyObject *__pyx_kp_u_norm_sum_of_squares_of_coordina;
2208  static PyObject *__pyx_n_s_numbers;
2209  static PyObject *__pyx_n_s_obj;
2210  static PyObject *__pyx_n_s_odd;
2211  static PyObject *__pyx_kp_u_odd_line_1397;
2212  static PyObject *__pyx_n_s_other;
2213  static PyObject *__pyx_n_s_outer_pow;
2214  static PyObject *__pyx_kp_u_outer_pow_line_1518;
2215  static PyObject *__pyx_n_s_p;
2216  static PyObject *__pyx_n_s_pi;
2217  static PyObject *__pyx_n_s_pow;
2218  static PyObject *__pyx_kp_u_pow_line_1494;
2219  static PyObject *__pyx_n_s_pure;
2220  static PyObject *__pyx_kp_u_pure_line_1377;
2221  static PyObject *__pyx_n_s_pyx_vtable;
2222  static PyObject *__pyx_n_s_q;
2223  static PyObject *__pyx_n_s_quad;
2224  static PyObject *__pyx_kp_u_quad_line_1451;
2225  static PyObject *__pyx_kp_u_random_clifford_line_1815;
2226  static PyObject *__pyx_n_s_range;
2227  static PyObject *__pyx_kp_u_real_line_1355;
2228  static PyObject *__pyx_n_s_reduce;
2229  static PyObject *__pyx_n_s_reduce_cython;
2230  static PyObject *__pyx_n_s_reduce_ex;
2231  static PyObject *__pyx_n_s_reverse;
2232  static PyObject *__pyx_kp_u_reverse_line_1421;
2233  static PyObject *__pyx_n_s_rhs;
2234  static PyObject *__pyx_n_s_scalar;
2235  static PyObject *__pyx_kp_u_scalar_line_1344;
2236  static PyObject *__pyx_n_s_send;
2237  static PyObject *__pyx_n_s_setstate;
2238  static PyObject *__pyx_n_s_setstate_cython;
2239  static PyObject *__pyx_n_s_sin;
2240  static PyObject *__pyx_kp_u_sin_line_1679;
2241  static PyObject *__pyx_n_s_sinh;
2242  static PyObject *__pyx_kp_u_sinh_line_1719;
2243  static PyObject *__pyx_n_s_sqrt;
2244  static PyObject *__pyx_kp_u_sqrt_line_1542;
2245  static PyObject *__pyx_n_s_tan;
2246  static PyObject *__pyx_kp_u_tan_line_1752;
2247  static PyObject *__pyx_n_s_tanh;
2248  static PyObject *__pyx_kp_u_tanh_line_1786;
2249  static PyObject *__pyx_n_s_tau;
2250  static PyObject *__pyx_n_s_test;
2251  static PyObject *__pyx_n_s_test_2;
2252  static PyObject *__pyx_n_s_testmod;
2253  static PyObject *__pyx_n_s_throw;
2254  static PyObject *__pyx_kp_s_to_frame;
2255  static PyObject *__pyx_kp_s_using;
2256  static PyObject *__pyx_kp_s_using_invalid;
2257  static PyObject *__pyx_kp_s_value;
2258  static PyObject *__pyx_n_s_version;
2259  static PyObject *__pyx_n_s_xrange;
2260 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2261 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
2262 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2263 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 */
2264 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 */
2265 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2266 static int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx); /* proto */
2267 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2268 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2269 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2270 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2271 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2272 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2273 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2274 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2275 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2276 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2277 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2278 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2279 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2280 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2281 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2282 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2283 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2284 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2285 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self); /* proto */
2286 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 */
2287 static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2288 static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2289 static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2290 static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2291 static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2292 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 */
2293 static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2294 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 */
2295 static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2296 static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2297 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 */
2298 static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt); /* proto */
2299 static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2300 static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2301 static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2302 static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2303 static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2304 static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2305 static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2306 static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2307 static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2308 static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2309 static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2310 static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2311 static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2312 static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2313 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2314 static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2315 #endif
2316 #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
2317 static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2318 #endif
2319 static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2320 static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
2321 static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs); /* proto */
2322 static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy); /* proto */
2323 static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2324 static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m); /* proto */
2325 static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade); /* proto */
2326 static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2327 static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2328 static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2329 static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2330 static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm); /* proto */
2331 static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2332 static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2333 static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2334 static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2335 static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2336 static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2337 static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2338 static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit); /* proto */
2339 static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2340 static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2341 static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2342 static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2343 static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self); /* proto */
2344 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 */
2345 static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2346 static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2347 static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2348 static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2349 static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2350 static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2351 static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2352 static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2353 static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2354 static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2355 static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2356 static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2357 static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2358 static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2359 static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2360 static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2361 static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m); /* proto */
2362 static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2363 static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2364 static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2365 static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2366 static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2367 static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2368 static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2369 static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2370 static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2371 static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2372 static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2373 static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2374 static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2375 static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2376 static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2377 static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i); /* proto */
2378 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 */
2379 static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2380 static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2381 static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2382 static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
2383 static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q); /* proto */
2384 static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
2385 static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2386 static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2387 static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2388 static PyObject *__pyx_float_0_0;
2389 static PyObject *__pyx_float_1_0;
2390 static PyObject *__pyx_float_2_0;
2391 static PyObject *__pyx_float_8_0;
2392 static PyObject *__pyx_int_0;
2393 static PyObject *__pyx_int_1;
2394 static PyObject *__pyx_int_4;
2395 static PyObject *__pyx_int_neg_1;
2396 static PyObject *__pyx_tuple__3;
2397 static PyObject *__pyx_tuple__4;
2398 static PyObject *__pyx_tuple__10;
2399 static PyObject *__pyx_tuple__11;
2400 static PyObject *__pyx_tuple__12;
2401 static PyObject *__pyx_tuple__13;
2402 static PyObject *__pyx_tuple__16;
2403 static PyObject *__pyx_tuple__17;
2404 static PyObject *__pyx_tuple__19;
2405 static PyObject *__pyx_tuple__21;
2406 static PyObject *__pyx_tuple__22;
2407 static PyObject *__pyx_tuple__23;
2408 static PyObject *__pyx_tuple__24;
2409 static PyObject *__pyx_tuple__25;
2410 static PyObject *__pyx_codeobj__14;
2411 static PyObject *__pyx_codeobj__15;
2412 static PyObject *__pyx_codeobj__18;
2413 static PyObject *__pyx_codeobj__20;
2414 static PyObject *__pyx_codeobj__26;
2415 /* Late includes */
2416 
2417 /* "PyClical.pyx":39
2418  * cdef class index_set
2419  *
2420  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2421  * """
2422  * Return the C++ IndexSet instance wrapped by index_set(obj).
2423  */
2424 
2425 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_toIndexSet(PyObject *__pyx_v_obj) {
2426  IndexSet __pyx_r;
2427  __Pyx_RefNannyDeclarations
2428  PyObject *__pyx_t_1 = NULL;
2429  __Pyx_RefNannySetupContext("toIndexSet", 0);
2430 
2431  /* "PyClical.pyx":43
2432  * Return the C++ IndexSet instance wrapped by index_set(obj).
2433  * """
2434  * return index_set(obj).instance[0] # <<<<<<<<<<<<<<
2435  *
2436  * cdef class index_set:
2437  */
2438  __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)
2439  __Pyx_GOTREF(__pyx_t_1);
2440  __pyx_r = (((struct __pyx_obj_8PyClical_index_set *)__pyx_t_1)->instance[0]);
2441  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2442  goto __pyx_L0;
2443 
2444  /* "PyClical.pyx":39
2445  * cdef class index_set
2446  *
2447  * cdef inline IndexSet toIndexSet(obj): # <<<<<<<<<<<<<<
2448  * """
2449  * Return the C++ IndexSet instance wrapped by index_set(obj).
2450  */
2451 
2452  /* function exit code */
2453  __pyx_L1_error:;
2454  __Pyx_XDECREF(__pyx_t_1);
2455  __Pyx_WriteUnraisable("PyClical.toIndexSet", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2456  __Pyx_pretend_to_initialize(&__pyx_r);
2457  __pyx_L0:;
2458  __Pyx_RefNannyFinishContext();
2459  return __pyx_r;
2460 }
2461 
2462 /* "PyClical.pyx":51
2463  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2464  *
2465  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2466  * """
2467  * Wrap an instance of the C++ class IndexSet.
2468  */
2469 
2470 static CYTHON_INLINE PyObject *__pyx_f_8PyClical_9index_set_wrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, IndexSet __pyx_v_other) {
2471  PyObject *__pyx_r = NULL;
2472  __Pyx_RefNannyDeclarations
2473  __Pyx_RefNannySetupContext("wrap", 0);
2474 
2475  /* "PyClical.pyx":55
2476  * Wrap an instance of the C++ class IndexSet.
2477  * """
2478  * self.instance[0] = other # <<<<<<<<<<<<<<
2479  * return self
2480  *
2481  */
2482  (__pyx_v_self->instance[0]) = __pyx_v_other;
2483 
2484  /* "PyClical.pyx":56
2485  * """
2486  * self.instance[0] = other
2487  * return self # <<<<<<<<<<<<<<
2488  *
2489  * cdef inline IndexSet unwrap(index_set self):
2490  */
2491  __Pyx_XDECREF(__pyx_r);
2492  __Pyx_INCREF(((PyObject *)__pyx_v_self));
2493  __pyx_r = ((PyObject *)__pyx_v_self);
2494  goto __pyx_L0;
2495 
2496  /* "PyClical.pyx":51
2497  * cdef IndexSet *instance # Wrapped instance of C++ class IndexSet.
2498  *
2499  * cdef inline wrap(index_set self, IndexSet other): # <<<<<<<<<<<<<<
2500  * """
2501  * Wrap an instance of the C++ class IndexSet.
2502  */
2503 
2504  /* function exit code */
2505  __pyx_L0:;
2506  __Pyx_XGIVEREF(__pyx_r);
2507  __Pyx_RefNannyFinishContext();
2508  return __pyx_r;
2509 }
2510 
2511 /* "PyClical.pyx":58
2512  * return self
2513  *
2514  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2515  * """
2516  * Return the wrapped C++ IndexSet instance.
2517  */
2518 
2519 static CYTHON_INLINE IndexSet __pyx_f_8PyClical_9index_set_unwrap(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2520  IndexSet __pyx_r;
2521  __Pyx_RefNannyDeclarations
2522  __Pyx_RefNannySetupContext("unwrap", 0);
2523 
2524  /* "PyClical.pyx":62
2525  * Return the wrapped C++ IndexSet instance.
2526  * """
2527  * return self.instance[0] # <<<<<<<<<<<<<<
2528  *
2529  * cpdef copy(index_set self):
2530  */
2531  __pyx_r = (__pyx_v_self->instance[0]);
2532  goto __pyx_L0;
2533 
2534  /* "PyClical.pyx":58
2535  * return self
2536  *
2537  * cdef inline IndexSet unwrap(index_set self): # <<<<<<<<<<<<<<
2538  * """
2539  * Return the wrapped C++ IndexSet instance.
2540  */
2541 
2542  /* function exit code */
2543  __pyx_L0:;
2544  __Pyx_RefNannyFinishContext();
2545  return __pyx_r;
2546 }
2547 
2548 /* "PyClical.pyx":64
2549  * return self.instance[0]
2550  *
2551  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2552  * """
2553  * Copy this index_set object.
2554  */
2555 
2556 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2557 static PyObject *__pyx_f_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, int __pyx_skip_dispatch) {
2558  PyObject *__pyx_r = NULL;
2559  __Pyx_RefNannyDeclarations
2560  PyObject *__pyx_t_1 = NULL;
2561  PyObject *__pyx_t_2 = NULL;
2562  PyObject *__pyx_t_3 = NULL;
2563  PyObject *__pyx_t_4 = NULL;
2564  __Pyx_RefNannySetupContext("copy", 0);
2565  /* Check if called by wrapper */
2566  if (unlikely(__pyx_skip_dispatch)) ;
2567  /* Check if overridden in Python */
2568  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
2569  __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)
2570  __Pyx_GOTREF(__pyx_t_1);
2571  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy)) {
2572  __Pyx_XDECREF(__pyx_r);
2573  __Pyx_INCREF(__pyx_t_1);
2574  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
2575  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
2576  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
2577  if (likely(__pyx_t_4)) {
2578  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
2579  __Pyx_INCREF(__pyx_t_4);
2580  __Pyx_INCREF(function);
2581  __Pyx_DECREF_SET(__pyx_t_3, function);
2582  }
2583  }
2584  if (__pyx_t_4) {
2585  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2586  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2587  } else {
2588  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error)
2589  }
2590  __Pyx_GOTREF(__pyx_t_2);
2591  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2592  __pyx_r = __pyx_t_2;
2593  __pyx_t_2 = 0;
2594  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2595  goto __pyx_L0;
2596  }
2597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2598  }
2599 
2600  /* "PyClical.pyx":71
2601  * {1}
2602  * """
2603  * return index_set(self) # <<<<<<<<<<<<<<
2604  *
2605  * def __cinit__(self, other = 0):
2606  */
2607  __Pyx_XDECREF(__pyx_r);
2608  __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)
2609  __Pyx_GOTREF(__pyx_t_1);
2610  __pyx_r = __pyx_t_1;
2611  __pyx_t_1 = 0;
2612  goto __pyx_L0;
2613 
2614  /* "PyClical.pyx":64
2615  * return self.instance[0]
2616  *
2617  * cpdef copy(index_set self): # <<<<<<<<<<<<<<
2618  * """
2619  * Copy this index_set object.
2620  */
2621 
2622  /* function exit code */
2623  __pyx_L1_error:;
2624  __Pyx_XDECREF(__pyx_t_1);
2625  __Pyx_XDECREF(__pyx_t_2);
2626  __Pyx_XDECREF(__pyx_t_3);
2627  __Pyx_XDECREF(__pyx_t_4);
2628  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2629  __pyx_r = 0;
2630  __pyx_L0:;
2631  __Pyx_XGIVEREF(__pyx_r);
2632  __Pyx_RefNannyFinishContext();
2633  return __pyx_r;
2634 }
2635 
2636 /* Python wrapper */
2637 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
2638 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 ";
2639 static PyObject *__pyx_pw_8PyClical_9index_set_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
2640  PyObject *__pyx_r = 0;
2641  __Pyx_RefNannyDeclarations
2642  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
2643  __pyx_r = __pyx_pf_8PyClical_9index_set_copy(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
2644 
2645  /* function exit code */
2646  __Pyx_RefNannyFinishContext();
2647  return __pyx_r;
2648 }
2649 
2650 static PyObject *__pyx_pf_8PyClical_9index_set_copy(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
2651  PyObject *__pyx_r = NULL;
2652  __Pyx_RefNannyDeclarations
2653  PyObject *__pyx_t_1 = NULL;
2654  __Pyx_RefNannySetupContext("copy", 0);
2655  __Pyx_XDECREF(__pyx_r);
2656  __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)
2657  __Pyx_GOTREF(__pyx_t_1);
2658  __pyx_r = __pyx_t_1;
2659  __pyx_t_1 = 0;
2660  goto __pyx_L0;
2661 
2662  /* function exit code */
2663  __pyx_L1_error:;
2664  __Pyx_XDECREF(__pyx_t_1);
2665  __Pyx_AddTraceback("PyClical.index_set.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
2666  __pyx_r = NULL;
2667  __pyx_L0:;
2668  __Pyx_XGIVEREF(__pyx_r);
2669  __Pyx_RefNannyFinishContext();
2670  return __pyx_r;
2671 }
2672 
2673 /* "PyClical.pyx":73
2674  * return index_set(self)
2675  *
2676  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
2677  * """
2678  * Construct an object of type index_set.
2679  */
2680 
2681 /* Python wrapper */
2682 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2683 static int __pyx_pw_8PyClical_9index_set_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2684  PyObject *__pyx_v_other = 0;
2685  int __pyx_r;
2686  __Pyx_RefNannyDeclarations
2687  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
2688  {
2689  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0};
2690  PyObject* values[1] = {0};
2691  values[0] = ((PyObject *)__pyx_int_0);
2692  if (unlikely(__pyx_kwds)) {
2693  Py_ssize_t kw_args;
2694  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
2695  switch (pos_args) {
2696  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2697  CYTHON_FALLTHROUGH;
2698  case 0: break;
2699  default: goto __pyx_L5_argtuple_error;
2700  }
2701  kw_args = PyDict_Size(__pyx_kwds);
2702  switch (pos_args) {
2703  case 0:
2704  if (kw_args > 0) {
2705  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
2706  if (value) { values[0] = value; kw_args--; }
2707  }
2708  }
2709  if (unlikely(kw_args > 0)) {
2710  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 73, __pyx_L3_error)
2711  }
2712  } else {
2713  switch (PyTuple_GET_SIZE(__pyx_args)) {
2714  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2715  CYTHON_FALLTHROUGH;
2716  case 0: break;
2717  default: goto __pyx_L5_argtuple_error;
2718  }
2719  }
2720  __pyx_v_other = values[0];
2721  }
2722  goto __pyx_L4_argument_unpacking_done;
2723  __pyx_L5_argtuple_error:;
2724  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 73, __pyx_L3_error)
2725  __pyx_L3_error:;
2726  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2727  __Pyx_RefNannyFinishContext();
2728  return -1;
2729  __pyx_L4_argument_unpacking_done:;
2730  __pyx_r = __pyx_pf_8PyClical_9index_set_2__cinit__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), __pyx_v_other);
2731 
2732  /* function exit code */
2733  __Pyx_RefNannyFinishContext();
2734  return __pyx_r;
2735 }
2736 
2737 static int __pyx_pf_8PyClical_9index_set_2__cinit__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_other) {
2738  PyObject *__pyx_v_error_msg_prefix = NULL;
2739  PyObject *__pyx_v_idx = NULL;
2740  int __pyx_r;
2741  __Pyx_RefNannyDeclarations
2742  int __pyx_t_1;
2743  int __pyx_t_2;
2744  IndexSet *__pyx_t_3;
2745  PyObject *__pyx_t_4 = NULL;
2746  PyObject *__pyx_t_5 = NULL;
2747  int __pyx_t_6;
2748  int __pyx_t_7;
2749  PyObject *__pyx_t_8 = NULL;
2750  PyObject *__pyx_t_9 = NULL;
2751  PyObject *__pyx_t_10 = NULL;
2752  Py_ssize_t __pyx_t_11;
2753  PyObject *(*__pyx_t_12)(PyObject *);
2754  PyObject *__pyx_t_13 = NULL;
2755  PyObject *__pyx_t_14 = NULL;
2756  PyObject *__pyx_t_15 = NULL;
2757  PyObject *__pyx_t_16 = NULL;
2758  char *__pyx_t_17;
2759  __Pyx_RefNannySetupContext("__cinit__", 0);
2760 
2761  /* "PyClical.pyx":92
2762  * {}
2763  * """
2764  * error_msg_prefix = "Cannot initialize index_set object from" # <<<<<<<<<<<<<<
2765  * if isinstance(other, index_set):
2766  * self.instance = new IndexSet((<index_set>other).unwrap())
2767  */
2768  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_index_set_obje);
2769  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_index_set_obje;
2770 
2771  /* "PyClical.pyx":93
2772  * """
2773  * error_msg_prefix = "Cannot initialize index_set object from"
2774  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2775  * self.instance = new IndexSet((<index_set>other).unwrap())
2776  * elif isinstance(other, numbers.Integral):
2777  */
2778  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
2779  __pyx_t_2 = (__pyx_t_1 != 0);
2780  if (__pyx_t_2) {
2781 
2782  /* "PyClical.pyx":94
2783  * error_msg_prefix = "Cannot initialize index_set object from"
2784  * if isinstance(other, index_set):
2785  * self.instance = new IndexSet((<index_set>other).unwrap()) # <<<<<<<<<<<<<<
2786  * elif isinstance(other, numbers.Integral):
2787  * self.instance = new IndexSet(<int>other)
2788  */
2789  try {
2790  __pyx_t_3 = new IndexSet(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)));
2791  } catch(...) {
2792  __Pyx_CppExn2PyErr();
2793  __PYX_ERR(0, 94, __pyx_L1_error)
2794  }
2795  __pyx_v_self->instance = __pyx_t_3;
2796 
2797  /* "PyClical.pyx":93
2798  * """
2799  * error_msg_prefix = "Cannot initialize index_set object from"
2800  * if isinstance(other, index_set): # <<<<<<<<<<<<<<
2801  * self.instance = new IndexSet((<index_set>other).unwrap())
2802  * elif isinstance(other, numbers.Integral):
2803  */
2804  goto __pyx_L3;
2805  }
2806 
2807  /* "PyClical.pyx":95
2808  * if isinstance(other, index_set):
2809  * self.instance = new IndexSet((<index_set>other).unwrap())
2810  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2811  * self.instance = new IndexSet(<int>other)
2812  * elif isinstance(other, (set, frozenset)):
2813  */
2814  __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error)
2815  __Pyx_GOTREF(__pyx_t_4);
2816  __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)
2817  __Pyx_GOTREF(__pyx_t_5);
2818  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2819  __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)
2820  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2821  __pyx_t_1 = (__pyx_t_2 != 0);
2822  if (__pyx_t_1) {
2823 
2824  /* "PyClical.pyx":96
2825  * self.instance = new IndexSet((<index_set>other).unwrap())
2826  * elif isinstance(other, numbers.Integral):
2827  * self.instance = new IndexSet(<int>other) # <<<<<<<<<<<<<<
2828  * elif isinstance(other, (set, frozenset)):
2829  * try:
2830  */
2831  __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)
2832  try {
2833  __pyx_t_3 = new IndexSet(((int)__pyx_t_6));
2834  } catch(...) {
2835  __Pyx_CppExn2PyErr();
2836  __PYX_ERR(0, 96, __pyx_L1_error)
2837  }
2838  __pyx_v_self->instance = __pyx_t_3;
2839 
2840  /* "PyClical.pyx":95
2841  * if isinstance(other, index_set):
2842  * self.instance = new IndexSet((<index_set>other).unwrap())
2843  * elif isinstance(other, numbers.Integral): # <<<<<<<<<<<<<<
2844  * self.instance = new IndexSet(<int>other)
2845  * elif isinstance(other, (set, frozenset)):
2846  */
2847  goto __pyx_L3;
2848  }
2849 
2850  /* "PyClical.pyx":97
2851  * elif isinstance(other, numbers.Integral):
2852  * self.instance = new IndexSet(<int>other)
2853  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
2854  * try:
2855  * self.instance = new IndexSet()
2856  */
2857  __pyx_t_2 = PySet_Check(__pyx_v_other);
2858  __pyx_t_7 = (__pyx_t_2 != 0);
2859  if (!__pyx_t_7) {
2860  } else {
2861  __pyx_t_1 = __pyx_t_7;
2862  goto __pyx_L4_bool_binop_done;
2863  }
2864  __pyx_t_7 = PyFrozenSet_Check(__pyx_v_other);
2865  __pyx_t_2 = (__pyx_t_7 != 0);
2866  __pyx_t_1 = __pyx_t_2;
2867  __pyx_L4_bool_binop_done:;
2868  __pyx_t_2 = (__pyx_t_1 != 0);
2869  if (__pyx_t_2) {
2870 
2871  /* "PyClical.pyx":98
2872  * self.instance = new IndexSet(<int>other)
2873  * elif isinstance(other, (set, frozenset)):
2874  * try: # <<<<<<<<<<<<<<
2875  * self.instance = new IndexSet()
2876  * for idx in other:
2877  */
2878  {
2879  __Pyx_PyThreadState_declare
2880  __Pyx_PyThreadState_assign
2881  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
2882  __Pyx_XGOTREF(__pyx_t_8);
2883  __Pyx_XGOTREF(__pyx_t_9);
2884  __Pyx_XGOTREF(__pyx_t_10);
2885  /*try:*/ {
2886 
2887  /* "PyClical.pyx":99
2888  * elif isinstance(other, (set, frozenset)):
2889  * try:
2890  * self.instance = new IndexSet() # <<<<<<<<<<<<<<
2891  * for idx in other:
2892  * self[idx] = True
2893  */
2894  __pyx_t_3 = new IndexSet();
2895  __pyx_v_self->instance = __pyx_t_3;
2896 
2897  /* "PyClical.pyx":100
2898  * try:
2899  * self.instance = new IndexSet()
2900  * for idx in other: # <<<<<<<<<<<<<<
2901  * self[idx] = True
2902  * except IndexError:
2903  */
2904  if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) {
2905  __pyx_t_5 = __pyx_v_other; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0;
2906  __pyx_t_12 = NULL;
2907  } else {
2908  __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 100, __pyx_L6_error)
2909  __Pyx_GOTREF(__pyx_t_5);
2910  __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 100, __pyx_L6_error)
2911  }
2912  for (;;) {
2913  if (likely(!__pyx_t_12)) {
2914  if (likely(PyList_CheckExact(__pyx_t_5))) {
2915  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break;
2916  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2917  __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)
2918  #else
2919  __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)
2920  __Pyx_GOTREF(__pyx_t_4);
2921  #endif
2922  } else {
2923  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2924  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
2925  __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)
2926  #else
2927  __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)
2928  __Pyx_GOTREF(__pyx_t_4);
2929  #endif
2930  }
2931  } else {
2932  __pyx_t_4 = __pyx_t_12(__pyx_t_5);
2933  if (unlikely(!__pyx_t_4)) {
2934  PyObject* exc_type = PyErr_Occurred();
2935  if (exc_type) {
2936  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
2937  else __PYX_ERR(0, 100, __pyx_L6_error)
2938  }
2939  break;
2940  }
2941  __Pyx_GOTREF(__pyx_t_4);
2942  }
2943  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_4);
2944  __pyx_t_4 = 0;
2945 
2946  /* "PyClical.pyx":101
2947  * self.instance = new IndexSet()
2948  * for idx in other:
2949  * self[idx] = True # <<<<<<<<<<<<<<
2950  * except IndexError:
2951  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2952  */
2953  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_idx, Py_True) < 0)) __PYX_ERR(0, 101, __pyx_L6_error)
2954 
2955  /* "PyClical.pyx":100
2956  * try:
2957  * self.instance = new IndexSet()
2958  * for idx in other: # <<<<<<<<<<<<<<
2959  * self[idx] = True
2960  * except IndexError:
2961  */
2962  }
2963  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2964 
2965  /* "PyClical.pyx":98
2966  * self.instance = new IndexSet(<int>other)
2967  * elif isinstance(other, (set, frozenset)):
2968  * try: # <<<<<<<<<<<<<<
2969  * self.instance = new IndexSet()
2970  * for idx in other:
2971  */
2972  }
2973  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
2974  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
2975  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
2976  goto __pyx_L11_try_end;
2977  __pyx_L6_error:;
2978  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
2979  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
2980 
2981  /* "PyClical.pyx":102
2982  * for idx in other:
2983  * self[idx] = True
2984  * except IndexError: # <<<<<<<<<<<<<<
2985  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
2986  * except (RuntimeError, TypeError):
2987  */
2988  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
2989  if (__pyx_t_6) {
2990  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
2991  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 102, __pyx_L8_except_error)
2992  __Pyx_GOTREF(__pyx_t_5);
2993  __Pyx_GOTREF(__pyx_t_4);
2994  __Pyx_GOTREF(__pyx_t_13);
2995 
2996  /* "PyClical.pyx":103
2997  * self[idx] = True
2998  * except IndexError:
2999  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3000  * except (RuntimeError, TypeError):
3001  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3002  */
3003  __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)
3004  __Pyx_GOTREF(__pyx_t_14);
3005  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3006  __Pyx_GOTREF(__pyx_t_15);
3007  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3008  __Pyx_GOTREF(__pyx_t_16);
3009  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3010  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3011  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 103, __pyx_L8_except_error)
3012  __Pyx_GOTREF(__pyx_t_15);
3013  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3014  __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)
3015  __Pyx_GOTREF(__pyx_t_16);
3016  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3017  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3018  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3019  __PYX_ERR(0, 103, __pyx_L8_except_error)
3020  }
3021 
3022  /* "PyClical.pyx":104
3023  * except IndexError:
3024  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3025  * except (RuntimeError, TypeError): # <<<<<<<<<<<<<<
3026  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3027  * elif isinstance(other, str):
3028  */
3029  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
3030  if (__pyx_t_6) {
3031  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3032  if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 104, __pyx_L8_except_error)
3033  __Pyx_GOTREF(__pyx_t_13);
3034  __Pyx_GOTREF(__pyx_t_4);
3035  __Pyx_GOTREF(__pyx_t_5);
3036 
3037  /* "PyClical.pyx":105
3038  * raise IndexError(error_msg_prefix + " invalid " + repr(other) + ".")
3039  * except (RuntimeError, TypeError):
3040  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".") # <<<<<<<<<<<<<<
3041  * elif isinstance(other, str):
3042  * try:
3043  */
3044  __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)
3045  __Pyx_GOTREF(__pyx_t_16);
3046  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3047  __Pyx_GOTREF(__pyx_t_15);
3048  __pyx_t_14 = PyNumber_Add(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3049  __Pyx_GOTREF(__pyx_t_14);
3050  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3051  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3052  __pyx_t_15 = PyNumber_Add(__pyx_t_14, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 105, __pyx_L8_except_error)
3053  __Pyx_GOTREF(__pyx_t_15);
3054  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3055  __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)
3056  __Pyx_GOTREF(__pyx_t_14);
3057  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3058  __Pyx_Raise(__pyx_t_14, 0, 0, 0);
3059  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3060  __PYX_ERR(0, 105, __pyx_L8_except_error)
3061  }
3062  goto __pyx_L8_except_error;
3063  __pyx_L8_except_error:;
3064 
3065  /* "PyClical.pyx":98
3066  * self.instance = new IndexSet(<int>other)
3067  * elif isinstance(other, (set, frozenset)):
3068  * try: # <<<<<<<<<<<<<<
3069  * self.instance = new IndexSet()
3070  * for idx in other:
3071  */
3072  __Pyx_XGIVEREF(__pyx_t_8);
3073  __Pyx_XGIVEREF(__pyx_t_9);
3074  __Pyx_XGIVEREF(__pyx_t_10);
3075  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
3076  goto __pyx_L1_error;
3077  __pyx_L11_try_end:;
3078  }
3079 
3080  /* "PyClical.pyx":97
3081  * elif isinstance(other, numbers.Integral):
3082  * self.instance = new IndexSet(<int>other)
3083  * elif isinstance(other, (set, frozenset)): # <<<<<<<<<<<<<<
3084  * try:
3085  * self.instance = new IndexSet()
3086  */
3087  goto __pyx_L3;
3088  }
3089 
3090  /* "PyClical.pyx":106
3091  * except (RuntimeError, TypeError):
3092  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3093  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3094  * try:
3095  * self.instance = new IndexSet(<char *>other)
3096  */
3097  __pyx_t_2 = PyString_Check(__pyx_v_other);
3098  __pyx_t_1 = (__pyx_t_2 != 0);
3099  if (likely(__pyx_t_1)) {
3100 
3101  /* "PyClical.pyx":107
3102  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3103  * elif isinstance(other, str):
3104  * try: # <<<<<<<<<<<<<<
3105  * self.instance = new IndexSet(<char *>other)
3106  * except RuntimeError:
3107  */
3108  {
3109  __Pyx_PyThreadState_declare
3110  __Pyx_PyThreadState_assign
3111  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
3112  __Pyx_XGOTREF(__pyx_t_10);
3113  __Pyx_XGOTREF(__pyx_t_9);
3114  __Pyx_XGOTREF(__pyx_t_8);
3115  /*try:*/ {
3116 
3117  /* "PyClical.pyx":108
3118  * elif isinstance(other, str):
3119  * try:
3120  * self.instance = new IndexSet(<char *>other) # <<<<<<<<<<<<<<
3121  * except RuntimeError:
3122  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3123  */
3124  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L18_error)
3125  try {
3126  __pyx_t_3 = new IndexSet(((char *)__pyx_t_17));
3127  } catch(...) {
3128  __Pyx_CppExn2PyErr();
3129  __PYX_ERR(0, 108, __pyx_L18_error)
3130  }
3131  __pyx_v_self->instance = __pyx_t_3;
3132 
3133  /* "PyClical.pyx":107
3134  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3135  * elif isinstance(other, str):
3136  * try: # <<<<<<<<<<<<<<
3137  * self.instance = new IndexSet(<char *>other)
3138  * except RuntimeError:
3139  */
3140  }
3141  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
3142  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
3143  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
3144  goto __pyx_L23_try_end;
3145  __pyx_L18_error:;
3146  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
3147  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
3148  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
3149  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
3150  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3151  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3152 
3153  /* "PyClical.pyx":109
3154  * try:
3155  * self.instance = new IndexSet(<char *>other)
3156  * except RuntimeError: # <<<<<<<<<<<<<<
3157  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3158  * else:
3159  */
3160  __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
3161  if (__pyx_t_6) {
3162  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3163  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_13) < 0) __PYX_ERR(0, 109, __pyx_L20_except_error)
3164  __Pyx_GOTREF(__pyx_t_5);
3165  __Pyx_GOTREF(__pyx_t_4);
3166  __Pyx_GOTREF(__pyx_t_13);
3167 
3168  /* "PyClical.pyx":110
3169  * self.instance = new IndexSet(<char *>other)
3170  * except RuntimeError:
3171  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
3172  * else:
3173  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3174  */
3175  __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)
3176  __Pyx_GOTREF(__pyx_t_14);
3177  __pyx_t_15 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3178  __Pyx_GOTREF(__pyx_t_15);
3179  __pyx_t_16 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3180  __Pyx_GOTREF(__pyx_t_16);
3181  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
3182  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3183  __pyx_t_15 = PyNumber_Add(__pyx_t_16, __pyx_kp_s_); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 110, __pyx_L20_except_error)
3184  __Pyx_GOTREF(__pyx_t_15);
3185  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3186  __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)
3187  __Pyx_GOTREF(__pyx_t_16);
3188  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
3189  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
3190  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
3191  __PYX_ERR(0, 110, __pyx_L20_except_error)
3192  }
3193  goto __pyx_L20_except_error;
3194  __pyx_L20_except_error:;
3195 
3196  /* "PyClical.pyx":107
3197  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3198  * elif isinstance(other, str):
3199  * try: # <<<<<<<<<<<<<<
3200  * self.instance = new IndexSet(<char *>other)
3201  * except RuntimeError:
3202  */
3203  __Pyx_XGIVEREF(__pyx_t_10);
3204  __Pyx_XGIVEREF(__pyx_t_9);
3205  __Pyx_XGIVEREF(__pyx_t_8);
3206  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
3207  goto __pyx_L1_error;
3208  __pyx_L23_try_end:;
3209  }
3210 
3211  /* "PyClical.pyx":106
3212  * except (RuntimeError, TypeError):
3213  * raise ValueError(error_msg_prefix + " invalid " + repr(other) + ".")
3214  * elif isinstance(other, str): # <<<<<<<<<<<<<<
3215  * try:
3216  * self.instance = new IndexSet(<char *>other)
3217  */
3218  goto __pyx_L3;
3219  }
3220 
3221  /* "PyClical.pyx":112
3222  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
3223  * else:
3224  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
3225  *
3226  * def __dealloc__(self):
3227  */
3228  /*else*/ {
3229  __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)
3230  __Pyx_GOTREF(__pyx_t_13);
3231  __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)
3232  __Pyx_GOTREF(__pyx_t_4);
3233  __pyx_t_5 = PyNumber_Add(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3234  __Pyx_GOTREF(__pyx_t_5);
3235  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
3236  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3237  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
3238  __Pyx_GOTREF(__pyx_t_4);
3239  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3240  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
3241  __Pyx_GOTREF(__pyx_t_5);
3242  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3243  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
3244  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3245  __PYX_ERR(0, 112, __pyx_L1_error)
3246  }
3247  __pyx_L3:;
3248 
3249  /* "PyClical.pyx":73
3250  * return index_set(self)
3251  *
3252  * def __cinit__(self, other = 0): # <<<<<<<<<<<<<<
3253  * """
3254  * Construct an object of type index_set.
3255  */
3256 
3257  /* function exit code */
3258  __pyx_r = 0;
3259  goto __pyx_L0;
3260  __pyx_L1_error:;
3261  __Pyx_XDECREF(__pyx_t_4);
3262  __Pyx_XDECREF(__pyx_t_5);
3263  __Pyx_XDECREF(__pyx_t_13);
3264  __Pyx_XDECREF(__pyx_t_14);
3265  __Pyx_XDECREF(__pyx_t_15);
3266  __Pyx_XDECREF(__pyx_t_16);
3267  __Pyx_AddTraceback("PyClical.index_set.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3268  __pyx_r = -1;
3269  __pyx_L0:;
3270  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
3271  __Pyx_XDECREF(__pyx_v_idx);
3272  __Pyx_RefNannyFinishContext();
3273  return __pyx_r;
3274 }
3275 
3276 /* "PyClical.pyx":114
3277  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3278  *
3279  * def __dealloc__(self): # <<<<<<<<<<<<<<
3280  * """
3281  * Clean up by deallocating the instance of C++ class IndexSet.
3282  */
3283 
3284 /* Python wrapper */
3285 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
3286 static void __pyx_pw_8PyClical_9index_set_5__dealloc__(PyObject *__pyx_v_self) {
3287  __Pyx_RefNannyDeclarations
3288  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3289  __pyx_pf_8PyClical_9index_set_4__dealloc__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
3290 
3291  /* function exit code */
3292  __Pyx_RefNannyFinishContext();
3293 }
3294 
3295 static void __pyx_pf_8PyClical_9index_set_4__dealloc__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
3296  __Pyx_RefNannyDeclarations
3297  __Pyx_RefNannySetupContext("__dealloc__", 0);
3298 
3299  /* "PyClical.pyx":118
3300  * Clean up by deallocating the instance of C++ class IndexSet.
3301  * """
3302  * del self.instance # <<<<<<<<<<<<<<
3303  *
3304  * def __richcmp__(lhs, rhs, int op):
3305  */
3306  delete __pyx_v_self->instance;
3307 
3308  /* "PyClical.pyx":114
3309  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
3310  *
3311  * def __dealloc__(self): # <<<<<<<<<<<<<<
3312  * """
3313  * Clean up by deallocating the instance of C++ class IndexSet.
3314  */
3315 
3316  /* function exit code */
3317  __Pyx_RefNannyFinishContext();
3318 }
3319 
3320 /* "PyClical.pyx":120
3321  * del self.instance
3322  *
3323  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3324  * """
3325  * Compare two objects of class index_set.
3326  */
3327 
3328 /* Python wrapper */
3329 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
3330 static PyObject *__pyx_pw_8PyClical_9index_set_7__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
3331  PyObject *__pyx_r = 0;
3332  __Pyx_RefNannyDeclarations
3333  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
3334  __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));
3335 
3336  /* function exit code */
3337  __Pyx_RefNannyFinishContext();
3338  return __pyx_r;
3339 }
3340 
3341 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) {
3342  PyObject *__pyx_v_eq = NULL;
3343  PyObject *__pyx_v_lt = NULL;
3344  PyObject *__pyx_r = NULL;
3345  __Pyx_RefNannyDeclarations
3346  int __pyx_t_1;
3347  int __pyx_t_2;
3348  int __pyx_t_3;
3349  PyObject *__pyx_t_4 = NULL;
3350  __Pyx_RefNannySetupContext("__richcmp__", 0);
3351 
3352  /* "PyClical.pyx":141
3353  * False
3354  * """
3355  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3356  * eq = bool(lhs is rhs)
3357  * if op == 2: # ==
3358  */
3359  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
3360  __pyx_t_3 = (__pyx_t_2 != 0);
3361  if (!__pyx_t_3) {
3362  } else {
3363  __pyx_t_1 = __pyx_t_3;
3364  goto __pyx_L4_bool_binop_done;
3365  }
3366  __pyx_t_3 = (__pyx_v_rhs == Py_None);
3367  __pyx_t_2 = (__pyx_t_3 != 0);
3368  __pyx_t_1 = __pyx_t_2;
3369  __pyx_L4_bool_binop_done:;
3370  if (__pyx_t_1) {
3371 
3372  /* "PyClical.pyx":142
3373  * """
3374  * if (lhs is None) or (rhs is None):
3375  * eq = bool(lhs is rhs) # <<<<<<<<<<<<<<
3376  * if op == 2: # ==
3377  * return eq
3378  */
3379  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
3380  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
3381  __Pyx_GOTREF(__pyx_t_4);
3382  __pyx_v_eq = __pyx_t_4;
3383  __pyx_t_4 = 0;
3384 
3385  /* "PyClical.pyx":143
3386  * if (lhs is None) or (rhs is None):
3387  * eq = bool(lhs is rhs)
3388  * if op == 2: # == # <<<<<<<<<<<<<<
3389  * return eq
3390  * elif op == 3: # !=
3391  */
3392  switch (__pyx_v_op) {
3393  case 2:
3394 
3395  /* "PyClical.pyx":144
3396  * eq = bool(lhs is rhs)
3397  * if op == 2: # ==
3398  * return eq # <<<<<<<<<<<<<<
3399  * elif op == 3: # !=
3400  * return not eq
3401  */
3402  __Pyx_XDECREF(__pyx_r);
3403  __Pyx_INCREF(__pyx_v_eq);
3404  __pyx_r = __pyx_v_eq;
3405  goto __pyx_L0;
3406 
3407  /* "PyClical.pyx":143
3408  * if (lhs is None) or (rhs is None):
3409  * eq = bool(lhs is rhs)
3410  * if op == 2: # == # <<<<<<<<<<<<<<
3411  * return eq
3412  * elif op == 3: # !=
3413  */
3414  break;
3415 
3416  /* "PyClical.pyx":145
3417  * if op == 2: # ==
3418  * return eq
3419  * elif op == 3: # != # <<<<<<<<<<<<<<
3420  * return not eq
3421  * else:
3422  */
3423  case 3:
3424 
3425  /* "PyClical.pyx":146
3426  * return eq
3427  * elif op == 3: # !=
3428  * return not eq # <<<<<<<<<<<<<<
3429  * else:
3430  * if op == 0: # <
3431  */
3432  __Pyx_XDECREF(__pyx_r);
3433  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 146, __pyx_L1_error)
3434  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
3435  __Pyx_GOTREF(__pyx_t_4);
3436  __pyx_r = __pyx_t_4;
3437  __pyx_t_4 = 0;
3438  goto __pyx_L0;
3439 
3440  /* "PyClical.pyx":145
3441  * if op == 2: # ==
3442  * return eq
3443  * elif op == 3: # != # <<<<<<<<<<<<<<
3444  * return not eq
3445  * else:
3446  */
3447  break;
3448  default:
3449 
3450  /* "PyClical.pyx":148
3451  * return not eq
3452  * else:
3453  * if op == 0: # < # <<<<<<<<<<<<<<
3454  * return False
3455  * elif op == 1: # <=
3456  */
3457  switch (__pyx_v_op) {
3458  case 0:
3459 
3460  /* "PyClical.pyx":149
3461  * else:
3462  * if op == 0: # <
3463  * return False # <<<<<<<<<<<<<<
3464  * elif op == 1: # <=
3465  * return eq
3466  */
3467  __Pyx_XDECREF(__pyx_r);
3468  __Pyx_INCREF(Py_False);
3469  __pyx_r = Py_False;
3470  goto __pyx_L0;
3471 
3472  /* "PyClical.pyx":148
3473  * return not eq
3474  * else:
3475  * if op == 0: # < # <<<<<<<<<<<<<<
3476  * return False
3477  * elif op == 1: # <=
3478  */
3479  break;
3480 
3481  /* "PyClical.pyx":150
3482  * if op == 0: # <
3483  * return False
3484  * elif op == 1: # <= # <<<<<<<<<<<<<<
3485  * return eq
3486  * elif op == 4: # >
3487  */
3488  case 1:
3489 
3490  /* "PyClical.pyx":151
3491  * return False
3492  * elif op == 1: # <=
3493  * return eq # <<<<<<<<<<<<<<
3494  * elif op == 4: # >
3495  * return False
3496  */
3497  __Pyx_XDECREF(__pyx_r);
3498  __Pyx_INCREF(__pyx_v_eq);
3499  __pyx_r = __pyx_v_eq;
3500  goto __pyx_L0;
3501 
3502  /* "PyClical.pyx":150
3503  * if op == 0: # <
3504  * return False
3505  * elif op == 1: # <= # <<<<<<<<<<<<<<
3506  * return eq
3507  * elif op == 4: # >
3508  */
3509  break;
3510 
3511  /* "PyClical.pyx":152
3512  * elif op == 1: # <=
3513  * return eq
3514  * elif op == 4: # > # <<<<<<<<<<<<<<
3515  * return False
3516  * elif op == 5: # >=
3517  */
3518  case 4:
3519 
3520  /* "PyClical.pyx":153
3521  * return eq
3522  * elif op == 4: # >
3523  * return False # <<<<<<<<<<<<<<
3524  * elif op == 5: # >=
3525  * return eq
3526  */
3527  __Pyx_XDECREF(__pyx_r);
3528  __Pyx_INCREF(Py_False);
3529  __pyx_r = Py_False;
3530  goto __pyx_L0;
3531 
3532  /* "PyClical.pyx":152
3533  * elif op == 1: # <=
3534  * return eq
3535  * elif op == 4: # > # <<<<<<<<<<<<<<
3536  * return False
3537  * elif op == 5: # >=
3538  */
3539  break;
3540 
3541  /* "PyClical.pyx":154
3542  * elif op == 4: # >
3543  * return False
3544  * elif op == 5: # >= # <<<<<<<<<<<<<<
3545  * return eq
3546  * else:
3547  */
3548  case 5:
3549 
3550  /* "PyClical.pyx":155
3551  * return False
3552  * elif op == 5: # >=
3553  * return eq # <<<<<<<<<<<<<<
3554  * else:
3555  * return NotImplemented
3556  */
3557  __Pyx_XDECREF(__pyx_r);
3558  __Pyx_INCREF(__pyx_v_eq);
3559  __pyx_r = __pyx_v_eq;
3560  goto __pyx_L0;
3561 
3562  /* "PyClical.pyx":154
3563  * elif op == 4: # >
3564  * return False
3565  * elif op == 5: # >= # <<<<<<<<<<<<<<
3566  * return eq
3567  * else:
3568  */
3569  break;
3570  default:
3571 
3572  /* "PyClical.pyx":157
3573  * return eq
3574  * else:
3575  * return NotImplemented # <<<<<<<<<<<<<<
3576  * else:
3577  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3578  */
3579  __Pyx_XDECREF(__pyx_r);
3580  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3581  __pyx_r = __pyx_builtin_NotImplemented;
3582  goto __pyx_L0;
3583  break;
3584  }
3585  break;
3586  }
3587 
3588  /* "PyClical.pyx":141
3589  * False
3590  * """
3591  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
3592  * eq = bool(lhs is rhs)
3593  * if op == 2: # ==
3594  */
3595  }
3596 
3597  /* "PyClical.pyx":159
3598  * return NotImplemented
3599  * else:
3600  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3601  * if op == 2: # ==
3602  * return eq
3603  */
3604  /*else*/ {
3605  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3606  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 159, __pyx_L1_error)
3607  __Pyx_GOTREF(__pyx_t_4);
3608  __pyx_v_eq = __pyx_t_4;
3609  __pyx_t_4 = 0;
3610 
3611  /* "PyClical.pyx":160
3612  * else:
3613  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3614  * if op == 2: # == # <<<<<<<<<<<<<<
3615  * return eq
3616  * elif op == 3: # !=
3617  */
3618  switch (__pyx_v_op) {
3619  case 2:
3620 
3621  /* "PyClical.pyx":161
3622  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3623  * if op == 2: # ==
3624  * return eq # <<<<<<<<<<<<<<
3625  * elif op == 3: # !=
3626  * return not eq
3627  */
3628  __Pyx_XDECREF(__pyx_r);
3629  __Pyx_INCREF(__pyx_v_eq);
3630  __pyx_r = __pyx_v_eq;
3631  goto __pyx_L0;
3632 
3633  /* "PyClical.pyx":160
3634  * else:
3635  * eq = bool( toIndexSet(lhs) == toIndexSet(rhs) )
3636  * if op == 2: # == # <<<<<<<<<<<<<<
3637  * return eq
3638  * elif op == 3: # !=
3639  */
3640  break;
3641 
3642  /* "PyClical.pyx":162
3643  * if op == 2: # ==
3644  * return eq
3645  * elif op == 3: # != # <<<<<<<<<<<<<<
3646  * return not eq
3647  * else:
3648  */
3649  case 3:
3650 
3651  /* "PyClical.pyx":163
3652  * return eq
3653  * elif op == 3: # !=
3654  * return not eq # <<<<<<<<<<<<<<
3655  * else:
3656  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3657  */
3658  __Pyx_XDECREF(__pyx_r);
3659  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
3660  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
3661  __Pyx_GOTREF(__pyx_t_4);
3662  __pyx_r = __pyx_t_4;
3663  __pyx_t_4 = 0;
3664  goto __pyx_L0;
3665 
3666  /* "PyClical.pyx":162
3667  * if op == 2: # ==
3668  * return eq
3669  * elif op == 3: # != # <<<<<<<<<<<<<<
3670  * return not eq
3671  * else:
3672  */
3673  break;
3674  default:
3675 
3676  /* "PyClical.pyx":165
3677  * return not eq
3678  * else:
3679  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) ) # <<<<<<<<<<<<<<
3680  * if op == 0: # <
3681  * return lt
3682  */
3683  __pyx_t_1 = (__pyx_f_8PyClical_toIndexSet(((PyObject *)__pyx_v_lhs)) < __pyx_f_8PyClical_toIndexSet(__pyx_v_rhs));
3684  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
3685  __Pyx_GOTREF(__pyx_t_4);
3686  __pyx_v_lt = __pyx_t_4;
3687  __pyx_t_4 = 0;
3688 
3689  /* "PyClical.pyx":166
3690  * else:
3691  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3692  * if op == 0: # < # <<<<<<<<<<<<<<
3693  * return lt
3694  * elif op == 1: # <=
3695  */
3696  switch (__pyx_v_op) {
3697  case 0:
3698 
3699  /* "PyClical.pyx":167
3700  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3701  * if op == 0: # <
3702  * return lt # <<<<<<<<<<<<<<
3703  * elif op == 1: # <=
3704  * return lt or eq
3705  */
3706  __Pyx_XDECREF(__pyx_r);
3707  __Pyx_INCREF(__pyx_v_lt);
3708  __pyx_r = __pyx_v_lt;
3709  goto __pyx_L0;
3710 
3711  /* "PyClical.pyx":166
3712  * else:
3713  * lt = bool( toIndexSet(lhs) < toIndexSet(rhs) )
3714  * if op == 0: # < # <<<<<<<<<<<<<<
3715  * return lt
3716  * elif op == 1: # <=
3717  */
3718  break;
3719 
3720  /* "PyClical.pyx":168
3721  * if op == 0: # <
3722  * return lt
3723  * elif op == 1: # <= # <<<<<<<<<<<<<<
3724  * return lt or eq
3725  * elif op == 4: # >
3726  */
3727  case 1:
3728 
3729  /* "PyClical.pyx":169
3730  * return lt
3731  * elif op == 1: # <=
3732  * return lt or eq # <<<<<<<<<<<<<<
3733  * elif op == 4: # >
3734  * return not (lt or eq)
3735  */
3736  __Pyx_XDECREF(__pyx_r);
3737  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 169, __pyx_L1_error)
3738  if (!__pyx_t_1) {
3739  } else {
3740  __Pyx_INCREF(__pyx_v_lt);
3741  __pyx_t_4 = __pyx_v_lt;
3742  goto __pyx_L6_bool_binop_done;
3743  }
3744  __Pyx_INCREF(__pyx_v_eq);
3745  __pyx_t_4 = __pyx_v_eq;
3746  __pyx_L6_bool_binop_done:;
3747  __pyx_r = __pyx_t_4;
3748  __pyx_t_4 = 0;
3749  goto __pyx_L0;
3750 
3751  /* "PyClical.pyx":168
3752  * if op == 0: # <
3753  * return lt
3754  * elif op == 1: # <= # <<<<<<<<<<<<<<
3755  * return lt or eq
3756  * elif op == 4: # >
3757  */
3758  break;
3759 
3760  /* "PyClical.pyx":170
3761  * elif op == 1: # <=
3762  * return lt or eq
3763  * elif op == 4: # > # <<<<<<<<<<<<<<
3764  * return not (lt or eq)
3765  * elif op == 5: # >=
3766  */
3767  case 4:
3768 
3769  /* "PyClical.pyx":171
3770  * return lt or eq
3771  * elif op == 4: # >
3772  * return not (lt or eq) # <<<<<<<<<<<<<<
3773  * elif op == 5: # >=
3774  * return not lt
3775  */
3776  __Pyx_XDECREF(__pyx_r);
3777  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3778  if (!__pyx_t_2) {
3779  } else {
3780  __pyx_t_1 = __pyx_t_2;
3781  goto __pyx_L8_bool_binop_done;
3782  }
3783  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
3784  __pyx_t_1 = __pyx_t_2;
3785  __pyx_L8_bool_binop_done:;
3786  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
3787  __Pyx_GOTREF(__pyx_t_4);
3788  __pyx_r = __pyx_t_4;
3789  __pyx_t_4 = 0;
3790  goto __pyx_L0;
3791 
3792  /* "PyClical.pyx":170
3793  * elif op == 1: # <=
3794  * return lt or eq
3795  * elif op == 4: # > # <<<<<<<<<<<<<<
3796  * return not (lt or eq)
3797  * elif op == 5: # >=
3798  */
3799  break;
3800 
3801  /* "PyClical.pyx":172
3802  * elif op == 4: # >
3803  * return not (lt or eq)
3804  * elif op == 5: # >= # <<<<<<<<<<<<<<
3805  * return not lt
3806  * else:
3807  */
3808  case 5:
3809 
3810  /* "PyClical.pyx":173
3811  * return not (lt or eq)
3812  * elif op == 5: # >=
3813  * return not lt # <<<<<<<<<<<<<<
3814  * else:
3815  * return NotImplemented
3816  */
3817  __Pyx_XDECREF(__pyx_r);
3818  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_lt); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error)
3819  __pyx_t_4 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error)
3820  __Pyx_GOTREF(__pyx_t_4);
3821  __pyx_r = __pyx_t_4;
3822  __pyx_t_4 = 0;
3823  goto __pyx_L0;
3824 
3825  /* "PyClical.pyx":172
3826  * elif op == 4: # >
3827  * return not (lt or eq)
3828  * elif op == 5: # >= # <<<<<<<<<<<<<<
3829  * return not lt
3830  * else:
3831  */
3832  break;
3833  default:
3834 
3835  /* "PyClical.pyx":175
3836  * return not lt
3837  * else:
3838  * return NotImplemented # <<<<<<<<<<<<<<
3839  *
3840  * def __setitem__(self, idx, val):
3841  */
3842  __Pyx_XDECREF(__pyx_r);
3843  __Pyx_INCREF(__pyx_builtin_NotImplemented);
3844  __pyx_r = __pyx_builtin_NotImplemented;
3845  goto __pyx_L0;
3846  break;
3847  }
3848  break;
3849  }
3850  }
3851 
3852  /* "PyClical.pyx":120
3853  * del self.instance
3854  *
3855  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
3856  * """
3857  * Compare two objects of class index_set.
3858  */
3859 
3860  /* function exit code */
3861  __pyx_L1_error:;
3862  __Pyx_XDECREF(__pyx_t_4);
3863  __Pyx_AddTraceback("PyClical.index_set.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3864  __pyx_r = NULL;
3865  __pyx_L0:;
3866  __Pyx_XDECREF(__pyx_v_eq);
3867  __Pyx_XDECREF(__pyx_v_lt);
3868  __Pyx_XGIVEREF(__pyx_r);
3869  __Pyx_RefNannyFinishContext();
3870  return __pyx_r;
3871 }
3872 
3873 /* "PyClical.pyx":177
3874  * return NotImplemented
3875  *
3876  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3877  * """
3878  * Set the value of an index_set object at index idx to value val.
3879  */
3880 
3881 /* Python wrapper */
3882 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val); /*proto*/
3883 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 ";
3884 #if CYTHON_COMPILING_IN_CPYTHON
3885 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
3886 #endif
3887 static int __pyx_pw_8PyClical_9index_set_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx, PyObject *__pyx_v_val) {
3888  int __pyx_r;
3889  __Pyx_RefNannyDeclarations
3890  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
3891  __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));
3892 
3893  /* function exit code */
3894  __Pyx_RefNannyFinishContext();
3895  return __pyx_r;
3896 }
3897 
3898 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) {
3899  int __pyx_r;
3900  __Pyx_RefNannyDeclarations
3901  int __pyx_t_1;
3902  int __pyx_t_2;
3903  __Pyx_RefNannySetupContext("__setitem__", 0);
3904 
3905  /* "PyClical.pyx":186
3906  * {2}
3907  * """
3908  * self.instance.set(idx, val) # <<<<<<<<<<<<<<
3909  * return
3910  *
3911  */
3912  __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)
3913  __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)
3914  try {
3915  __pyx_v_self->instance->set(__pyx_t_1, __pyx_t_2);
3916  } catch(...) {
3917  __Pyx_CppExn2PyErr();
3918  __PYX_ERR(0, 186, __pyx_L1_error)
3919  }
3920 
3921  /* "PyClical.pyx":187
3922  * """
3923  * self.instance.set(idx, val)
3924  * return # <<<<<<<<<<<<<<
3925  *
3926  * def __getitem__(self, idx):
3927  */
3928  __pyx_r = 0;
3929  goto __pyx_L0;
3930 
3931  /* "PyClical.pyx":177
3932  * return NotImplemented
3933  *
3934  * def __setitem__(self, idx, val): # <<<<<<<<<<<<<<
3935  * """
3936  * Set the value of an index_set object at index idx to value val.
3937  */
3938 
3939  /* function exit code */
3940  __pyx_L1_error:;
3941  __Pyx_AddTraceback("PyClical.index_set.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3942  __pyx_r = -1;
3943  __pyx_L0:;
3944  __Pyx_RefNannyFinishContext();
3945  return __pyx_r;
3946 }
3947 
3948 /* "PyClical.pyx":189
3949  * return
3950  *
3951  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3952  * """
3953  * Get the value of an index_set object at an index.
3954  */
3955 
3956 /* Python wrapper */
3957 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
3958 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 ";
3959 #if CYTHON_COMPILING_IN_CPYTHON
3960 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
3961 #endif
3962 static PyObject *__pyx_pw_8PyClical_9index_set_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
3963  PyObject *__pyx_r = 0;
3964  __Pyx_RefNannyDeclarations
3965  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
3966  __pyx_r = __pyx_pf_8PyClical_9index_set_10__getitem__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_idx));
3967 
3968  /* function exit code */
3969  __Pyx_RefNannyFinishContext();
3970  return __pyx_r;
3971 }
3972 
3973 static PyObject *__pyx_pf_8PyClical_9index_set_10__getitem__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
3974  PyObject *__pyx_r = NULL;
3975  __Pyx_RefNannyDeclarations
3976  int __pyx_t_1;
3977  PyObject *__pyx_t_2 = NULL;
3978  __Pyx_RefNannySetupContext("__getitem__", 0);
3979 
3980  /* "PyClical.pyx":206
3981  * False
3982  * """
3983  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
3984  *
3985  * def __contains__(self, idx):
3986  */
3987  __Pyx_XDECREF(__pyx_r);
3988  __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)
3989  __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)
3990  __Pyx_GOTREF(__pyx_t_2);
3991  __pyx_r = __pyx_t_2;
3992  __pyx_t_2 = 0;
3993  goto __pyx_L0;
3994 
3995  /* "PyClical.pyx":189
3996  * return
3997  *
3998  * def __getitem__(self, idx): # <<<<<<<<<<<<<<
3999  * """
4000  * Get the value of an index_set object at an index.
4001  */
4002 
4003  /* function exit code */
4004  __pyx_L1_error:;
4005  __Pyx_XDECREF(__pyx_t_2);
4006  __Pyx_AddTraceback("PyClical.index_set.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4007  __pyx_r = NULL;
4008  __pyx_L0:;
4009  __Pyx_XGIVEREF(__pyx_r);
4010  __Pyx_RefNannyFinishContext();
4011  return __pyx_r;
4012 }
4013 
4014 /* "PyClical.pyx":208
4015  * return self.instance.getitem(idx)
4016  *
4017  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4018  * """
4019  * Check that an index_set object contains the index idx: idx in self.
4020  */
4021 
4022 /* Python wrapper */
4023 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx); /*proto*/
4024 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 ";
4025 #if CYTHON_COMPILING_IN_CPYTHON
4026 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_12__contains__;
4027 #endif
4028 static int __pyx_pw_8PyClical_9index_set_13__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_idx) {
4029  int __pyx_r;
4030  __Pyx_RefNannyDeclarations
4031  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
4032  __pyx_r = __pyx_pf_8PyClical_9index_set_12__contains__(((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 int __pyx_pf_8PyClical_9index_set_12__contains__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_idx) {
4040  int __pyx_r;
4041  __Pyx_RefNannyDeclarations
4042  int __pyx_t_1;
4043  __Pyx_RefNannySetupContext("__contains__", 0);
4044 
4045  /* "PyClical.pyx":225
4046  * False
4047  * """
4048  * return self.instance.getitem(idx) # <<<<<<<<<<<<<<
4049  *
4050  * def __iter__(self):
4051  */
4052  __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)
4053  __pyx_r = __pyx_v_self->instance->operator[](__pyx_t_1);
4054  goto __pyx_L0;
4055 
4056  /* "PyClical.pyx":208
4057  * return self.instance.getitem(idx)
4058  *
4059  * def __contains__(self, idx): # <<<<<<<<<<<<<<
4060  * """
4061  * Check that an index_set object contains the index idx: idx in self.
4062  */
4063 
4064  /* function exit code */
4065  __pyx_L1_error:;
4066  __Pyx_AddTraceback("PyClical.index_set.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4067  __pyx_r = -1;
4068  __pyx_L0:;
4069  __Pyx_RefNannyFinishContext();
4070  return __pyx_r;
4071 }
4072 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
4073 
4074 /* "PyClical.pyx":227
4075  * return self.instance.getitem(idx)
4076  *
4077  * def __iter__(self): # <<<<<<<<<<<<<<
4078  * """
4079  * Iterate over the indices of an index_set.
4080  */
4081 
4082 /* Python wrapper */
4083 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self); /*proto*/
4084 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 ";
4085 #if CYTHON_COMPILING_IN_CPYTHON
4086 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_14__iter__;
4087 #endif
4088 static PyObject *__pyx_pw_8PyClical_9index_set_15__iter__(PyObject *__pyx_v_self) {
4089  PyObject *__pyx_r = 0;
4090  __Pyx_RefNannyDeclarations
4091  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
4092  __pyx_r = __pyx_pf_8PyClical_9index_set_14__iter__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4093 
4094  /* function exit code */
4095  __Pyx_RefNannyFinishContext();
4096  return __pyx_r;
4097 }
4098 
4099 static PyObject *__pyx_pf_8PyClical_9index_set_14__iter__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4100  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope;
4101  PyObject *__pyx_r = NULL;
4102  __Pyx_RefNannyDeclarations
4103  __Pyx_RefNannySetupContext("__iter__", 0);
4104  __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);
4105  if (unlikely(!__pyx_cur_scope)) {
4106  __pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)Py_None);
4107  __Pyx_INCREF(Py_None);
4108  __PYX_ERR(0, 227, __pyx_L1_error)
4109  } else {
4110  __Pyx_GOTREF(__pyx_cur_scope);
4111  }
4112  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
4113  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4114  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
4115  {
4116  __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)
4117  __Pyx_DECREF(__pyx_cur_scope);
4118  __Pyx_RefNannyFinishContext();
4119  return (PyObject *) gen;
4120  }
4121 
4122  /* function exit code */
4123  __pyx_L1_error:;
4124  __Pyx_AddTraceback("PyClical.index_set.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4125  __pyx_r = NULL;
4126  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
4127  __Pyx_XGIVEREF(__pyx_r);
4128  __Pyx_RefNannyFinishContext();
4129  return __pyx_r;
4130 }
4131 
4132 static PyObject *__pyx_gb_8PyClical_9index_set_16generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
4133 {
4134  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)__pyx_generator->closure);
4135  PyObject *__pyx_r = NULL;
4136  PyObject *__pyx_t_1 = NULL;
4137  PyObject *__pyx_t_2 = NULL;
4138  PyObject *__pyx_t_3 = NULL;
4139  PyObject *__pyx_t_4 = NULL;
4140  Py_ssize_t __pyx_t_5;
4141  PyObject *(*__pyx_t_6)(PyObject *);
4142  int __pyx_t_7;
4143  int __pyx_t_8;
4144  __Pyx_RefNannyDeclarations
4145  __Pyx_RefNannySetupContext("__iter__", 0);
4146  switch (__pyx_generator->resume_label) {
4147  case 0: goto __pyx_L3_first_run;
4148  case 1: goto __pyx_L7_resume_from_yield;
4149  default: /* CPython raises the right error here */
4150  __Pyx_RefNannyFinishContext();
4151  return NULL;
4152  }
4153  __pyx_L3_first_run:;
4154  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
4155 
4156  /* "PyClical.pyx":234
4157  * -3 4 7
4158  * """
4159  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4160  * if idx in self:
4161  * yield idx
4162  */
4163  __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)
4164  __Pyx_GOTREF(__pyx_t_2);
4165  __pyx_t_3 = NULL;
4166  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4167  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4168  if (likely(__pyx_t_3)) {
4169  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4170  __Pyx_INCREF(__pyx_t_3);
4171  __Pyx_INCREF(function);
4172  __Pyx_DECREF_SET(__pyx_t_2, function);
4173  }
4174  }
4175  if (__pyx_t_3) {
4176  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4177  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4178  } else {
4179  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
4180  }
4181  __Pyx_GOTREF(__pyx_t_1);
4182  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4183  __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)
4184  __Pyx_GOTREF(__pyx_t_3);
4185  __pyx_t_4 = NULL;
4186  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
4187  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4188  if (likely(__pyx_t_4)) {
4189  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4190  __Pyx_INCREF(__pyx_t_4);
4191  __Pyx_INCREF(function);
4192  __Pyx_DECREF_SET(__pyx_t_3, function);
4193  }
4194  }
4195  if (__pyx_t_4) {
4196  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4197  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4198  } else {
4199  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4200  }
4201  __Pyx_GOTREF(__pyx_t_2);
4202  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4203  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
4204  __Pyx_GOTREF(__pyx_t_3);
4205  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4206  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4207  __Pyx_GOTREF(__pyx_t_2);
4208  __Pyx_GIVEREF(__pyx_t_1);
4209  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
4210  __Pyx_GIVEREF(__pyx_t_3);
4211  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
4212  __pyx_t_1 = 0;
4213  __pyx_t_3 = 0;
4214  __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)
4215  __Pyx_GOTREF(__pyx_t_3);
4216  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4217  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
4218  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
4219  __pyx_t_6 = NULL;
4220  } else {
4221  __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
4222  __Pyx_GOTREF(__pyx_t_2);
4223  __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
4224  }
4225  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4226  for (;;) {
4227  if (likely(!__pyx_t_6)) {
4228  if (likely(PyList_CheckExact(__pyx_t_2))) {
4229  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
4230  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4231  __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)
4232  #else
4233  __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)
4234  __Pyx_GOTREF(__pyx_t_3);
4235  #endif
4236  } else {
4237  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
4238  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
4239  __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)
4240  #else
4241  __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)
4242  __Pyx_GOTREF(__pyx_t_3);
4243  #endif
4244  }
4245  } else {
4246  __pyx_t_3 = __pyx_t_6(__pyx_t_2);
4247  if (unlikely(!__pyx_t_3)) {
4248  PyObject* exc_type = PyErr_Occurred();
4249  if (exc_type) {
4250  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
4251  else __PYX_ERR(0, 234, __pyx_L1_error)
4252  }
4253  break;
4254  }
4255  __Pyx_GOTREF(__pyx_t_3);
4256  }
4257  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_idx);
4258  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_idx, __pyx_t_3);
4259  __Pyx_GIVEREF(__pyx_t_3);
4260  __pyx_t_3 = 0;
4261 
4262  /* "PyClical.pyx":235
4263  * """
4264  * for idx in range(self.min(), self.max()+1):
4265  * if idx in self: # <<<<<<<<<<<<<<
4266  * yield idx
4267  *
4268  */
4269  __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)
4270  __pyx_t_8 = (__pyx_t_7 != 0);
4271  if (__pyx_t_8) {
4272 
4273  /* "PyClical.pyx":236
4274  * for idx in range(self.min(), self.max()+1):
4275  * if idx in self:
4276  * yield idx # <<<<<<<<<<<<<<
4277  *
4278  * def __invert__(self):
4279  */
4280  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idx);
4281  __pyx_r = __pyx_cur_scope->__pyx_v_idx;
4282  __Pyx_XGIVEREF(__pyx_t_2);
4283  __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
4284  __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
4285  __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
4286  __Pyx_XGIVEREF(__pyx_r);
4287  __Pyx_RefNannyFinishContext();
4288  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4289  /* return from generator, yielding value */
4290  __pyx_generator->resume_label = 1;
4291  return __pyx_r;
4292  __pyx_L7_resume_from_yield:;
4293  __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
4294  __pyx_cur_scope->__pyx_t_0 = 0;
4295  __Pyx_XGOTREF(__pyx_t_2);
4296  __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
4297  __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
4298  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 236, __pyx_L1_error)
4299 
4300  /* "PyClical.pyx":235
4301  * """
4302  * for idx in range(self.min(), self.max()+1):
4303  * if idx in self: # <<<<<<<<<<<<<<
4304  * yield idx
4305  *
4306  */
4307  }
4308 
4309  /* "PyClical.pyx":234
4310  * -3 4 7
4311  * """
4312  * for idx in range(self.min(), self.max()+1): # <<<<<<<<<<<<<<
4313  * if idx in self:
4314  * yield idx
4315  */
4316  }
4317  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4318  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
4319 
4320  /* "PyClical.pyx":227
4321  * return self.instance.getitem(idx)
4322  *
4323  * def __iter__(self): # <<<<<<<<<<<<<<
4324  * """
4325  * Iterate over the indices of an index_set.
4326  */
4327 
4328  /* function exit code */
4329  PyErr_SetNone(PyExc_StopIteration);
4330  goto __pyx_L0;
4331  __pyx_L1_error:;
4332  __Pyx_XDECREF(__pyx_t_1);
4333  __Pyx_XDECREF(__pyx_t_2);
4334  __Pyx_XDECREF(__pyx_t_3);
4335  __Pyx_XDECREF(__pyx_t_4);
4336  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4337  __pyx_L0:;
4338  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
4339  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
4340  __pyx_generator->resume_label = -1;
4341  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
4342  __Pyx_RefNannyFinishContext();
4343  return __pyx_r;
4344 }
4345 
4346 /* "PyClical.pyx":238
4347  * yield idx
4348  *
4349  * def __invert__(self): # <<<<<<<<<<<<<<
4350  * """
4351  * Set complement: not.
4352  */
4353 
4354 /* Python wrapper */
4355 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self); /*proto*/
4356 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 ";
4357 #if CYTHON_COMPILING_IN_CPYTHON
4358 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_17__invert__;
4359 #endif
4360 static PyObject *__pyx_pw_8PyClical_9index_set_18__invert__(PyObject *__pyx_v_self) {
4361  PyObject *__pyx_r = 0;
4362  __Pyx_RefNannyDeclarations
4363  __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0);
4364  __pyx_r = __pyx_pf_8PyClical_9index_set_17__invert__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4365 
4366  /* function exit code */
4367  __Pyx_RefNannyFinishContext();
4368  return __pyx_r;
4369 }
4370 
4371 static PyObject *__pyx_pf_8PyClical_9index_set_17__invert__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4372  PyObject *__pyx_r = NULL;
4373  __Pyx_RefNannyDeclarations
4374  PyObject *__pyx_t_1 = NULL;
4375  PyObject *__pyx_t_2 = NULL;
4376  __Pyx_RefNannySetupContext("__invert__", 0);
4377 
4378  /* "PyClical.pyx":245
4379  * {-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}
4380  * """
4381  * return index_set().wrap( self.instance.invert() ) # <<<<<<<<<<<<<<
4382  *
4383  * def __xor__(lhs, rhs):
4384  */
4385  __Pyx_XDECREF(__pyx_r);
4386  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
4387  __Pyx_GOTREF(__pyx_t_1);
4388  __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)
4389  __Pyx_GOTREF(__pyx_t_2);
4390  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4391  __pyx_r = __pyx_t_2;
4392  __pyx_t_2 = 0;
4393  goto __pyx_L0;
4394 
4395  /* "PyClical.pyx":238
4396  * yield idx
4397  *
4398  * def __invert__(self): # <<<<<<<<<<<<<<
4399  * """
4400  * Set complement: not.
4401  */
4402 
4403  /* function exit code */
4404  __pyx_L1_error:;
4405  __Pyx_XDECREF(__pyx_t_1);
4406  __Pyx_XDECREF(__pyx_t_2);
4407  __Pyx_AddTraceback("PyClical.index_set.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4408  __pyx_r = NULL;
4409  __pyx_L0:;
4410  __Pyx_XGIVEREF(__pyx_r);
4411  __Pyx_RefNannyFinishContext();
4412  return __pyx_r;
4413 }
4414 
4415 /* "PyClical.pyx":247
4416  * return index_set().wrap( self.instance.invert() )
4417  *
4418  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4419  * """
4420  * Symmetric set difference: exclusive or.
4421  */
4422 
4423 /* Python wrapper */
4424 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4425 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 ";
4426 #if CYTHON_COMPILING_IN_CPYTHON
4427 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_19__xor__;
4428 #endif
4429 static PyObject *__pyx_pw_8PyClical_9index_set_20__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4430  PyObject *__pyx_r = 0;
4431  __Pyx_RefNannyDeclarations
4432  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
4433  __pyx_r = __pyx_pf_8PyClical_9index_set_19__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4434 
4435  /* function exit code */
4436  __Pyx_RefNannyFinishContext();
4437  return __pyx_r;
4438 }
4439 
4440 static PyObject *__pyx_pf_8PyClical_9index_set_19__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4441  PyObject *__pyx_r = NULL;
4442  __Pyx_RefNannyDeclarations
4443  PyObject *__pyx_t_1 = NULL;
4444  PyObject *__pyx_t_2 = NULL;
4445  __Pyx_RefNannySetupContext("__xor__", 0);
4446 
4447  /* "PyClical.pyx":256
4448  * {1}
4449  * """
4450  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4451  *
4452  * def __ixor__(self, rhs):
4453  */
4454  __Pyx_XDECREF(__pyx_r);
4455  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
4456  __Pyx_GOTREF(__pyx_t_1);
4457  __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)
4458  __Pyx_GOTREF(__pyx_t_2);
4459  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4460  __pyx_r = __pyx_t_2;
4461  __pyx_t_2 = 0;
4462  goto __pyx_L0;
4463 
4464  /* "PyClical.pyx":247
4465  * return index_set().wrap( self.instance.invert() )
4466  *
4467  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
4468  * """
4469  * Symmetric set difference: exclusive or.
4470  */
4471 
4472  /* function exit code */
4473  __pyx_L1_error:;
4474  __Pyx_XDECREF(__pyx_t_1);
4475  __Pyx_XDECREF(__pyx_t_2);
4476  __Pyx_AddTraceback("PyClical.index_set.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4477  __pyx_r = NULL;
4478  __pyx_L0:;
4479  __Pyx_XGIVEREF(__pyx_r);
4480  __Pyx_RefNannyFinishContext();
4481  return __pyx_r;
4482 }
4483 
4484 /* "PyClical.pyx":258
4485  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4486  *
4487  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4488  * """
4489  * Symmetric set difference: exclusive or.
4490  */
4491 
4492 /* Python wrapper */
4493 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4494 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 ";
4495 #if CYTHON_COMPILING_IN_CPYTHON
4496 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
4497 #endif
4498 static PyObject *__pyx_pw_8PyClical_9index_set_22__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4499  PyObject *__pyx_r = 0;
4500  __Pyx_RefNannyDeclarations
4501  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
4502  __pyx_r = __pyx_pf_8PyClical_9index_set_21__ixor__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4503 
4504  /* function exit code */
4505  __Pyx_RefNannyFinishContext();
4506  return __pyx_r;
4507 }
4508 
4509 static PyObject *__pyx_pf_8PyClical_9index_set_21__ixor__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4510  PyObject *__pyx_r = NULL;
4511  __Pyx_RefNannyDeclarations
4512  PyObject *__pyx_t_1 = NULL;
4513  __Pyx_RefNannySetupContext("__ixor__", 0);
4514 
4515  /* "PyClical.pyx":267
4516  * {1}
4517  * """
4518  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4519  *
4520  * def __and__(lhs, rhs):
4521  */
4522  __Pyx_XDECREF(__pyx_r);
4523  __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)
4524  __Pyx_GOTREF(__pyx_t_1);
4525  __pyx_r = __pyx_t_1;
4526  __pyx_t_1 = 0;
4527  goto __pyx_L0;
4528 
4529  /* "PyClical.pyx":258
4530  * return index_set().wrap( toIndexSet(lhs) ^ toIndexSet(rhs) )
4531  *
4532  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
4533  * """
4534  * Symmetric set difference: exclusive or.
4535  */
4536 
4537  /* function exit code */
4538  __pyx_L1_error:;
4539  __Pyx_XDECREF(__pyx_t_1);
4540  __Pyx_AddTraceback("PyClical.index_set.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4541  __pyx_r = NULL;
4542  __pyx_L0:;
4543  __Pyx_XGIVEREF(__pyx_r);
4544  __Pyx_RefNannyFinishContext();
4545  return __pyx_r;
4546 }
4547 
4548 /* "PyClical.pyx":269
4549  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4550  *
4551  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4552  * """
4553  * Set intersection: and.
4554  */
4555 
4556 /* Python wrapper */
4557 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4558 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 ";
4559 #if CYTHON_COMPILING_IN_CPYTHON
4560 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_23__and__;
4561 #endif
4562 static PyObject *__pyx_pw_8PyClical_9index_set_24__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4563  PyObject *__pyx_r = 0;
4564  __Pyx_RefNannyDeclarations
4565  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
4566  __pyx_r = __pyx_pf_8PyClical_9index_set_23__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4567 
4568  /* function exit code */
4569  __Pyx_RefNannyFinishContext();
4570  return __pyx_r;
4571 }
4572 
4573 static PyObject *__pyx_pf_8PyClical_9index_set_23__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4574  PyObject *__pyx_r = NULL;
4575  __Pyx_RefNannyDeclarations
4576  PyObject *__pyx_t_1 = NULL;
4577  PyObject *__pyx_t_2 = NULL;
4578  __Pyx_RefNannySetupContext("__and__", 0);
4579 
4580  /* "PyClical.pyx":278
4581  * {2}
4582  * """
4583  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4584  *
4585  * def __iand__(self, rhs):
4586  */
4587  __Pyx_XDECREF(__pyx_r);
4588  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
4589  __Pyx_GOTREF(__pyx_t_1);
4590  __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)
4591  __Pyx_GOTREF(__pyx_t_2);
4592  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4593  __pyx_r = __pyx_t_2;
4594  __pyx_t_2 = 0;
4595  goto __pyx_L0;
4596 
4597  /* "PyClical.pyx":269
4598  * return self.wrap( self.unwrap() ^ toIndexSet(rhs) )
4599  *
4600  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
4601  * """
4602  * Set intersection: and.
4603  */
4604 
4605  /* function exit code */
4606  __pyx_L1_error:;
4607  __Pyx_XDECREF(__pyx_t_1);
4608  __Pyx_XDECREF(__pyx_t_2);
4609  __Pyx_AddTraceback("PyClical.index_set.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4610  __pyx_r = NULL;
4611  __pyx_L0:;
4612  __Pyx_XGIVEREF(__pyx_r);
4613  __Pyx_RefNannyFinishContext();
4614  return __pyx_r;
4615 }
4616 
4617 /* "PyClical.pyx":280
4618  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4619  *
4620  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4621  * """
4622  * Set intersection: and.
4623  */
4624 
4625 /* Python wrapper */
4626 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4627 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 ";
4628 #if CYTHON_COMPILING_IN_CPYTHON
4629 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_25__iand__;
4630 #endif
4631 static PyObject *__pyx_pw_8PyClical_9index_set_26__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4632  PyObject *__pyx_r = 0;
4633  __Pyx_RefNannyDeclarations
4634  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
4635  __pyx_r = __pyx_pf_8PyClical_9index_set_25__iand__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4636 
4637  /* function exit code */
4638  __Pyx_RefNannyFinishContext();
4639  return __pyx_r;
4640 }
4641 
4642 static PyObject *__pyx_pf_8PyClical_9index_set_25__iand__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4643  PyObject *__pyx_r = NULL;
4644  __Pyx_RefNannyDeclarations
4645  PyObject *__pyx_t_1 = NULL;
4646  __Pyx_RefNannySetupContext("__iand__", 0);
4647 
4648  /* "PyClical.pyx":289
4649  * {2}
4650  * """
4651  * return self.wrap( self.unwrap() & toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4652  *
4653  * def __or__(lhs, rhs):
4654  */
4655  __Pyx_XDECREF(__pyx_r);
4656  __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)
4657  __Pyx_GOTREF(__pyx_t_1);
4658  __pyx_r = __pyx_t_1;
4659  __pyx_t_1 = 0;
4660  goto __pyx_L0;
4661 
4662  /* "PyClical.pyx":280
4663  * return index_set().wrap( toIndexSet(lhs) & toIndexSet(rhs) )
4664  *
4665  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
4666  * """
4667  * Set intersection: and.
4668  */
4669 
4670  /* function exit code */
4671  __pyx_L1_error:;
4672  __Pyx_XDECREF(__pyx_t_1);
4673  __Pyx_AddTraceback("PyClical.index_set.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4674  __pyx_r = NULL;
4675  __pyx_L0:;
4676  __Pyx_XGIVEREF(__pyx_r);
4677  __Pyx_RefNannyFinishContext();
4678  return __pyx_r;
4679 }
4680 
4681 /* "PyClical.pyx":291
4682  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4683  *
4684  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4685  * """
4686  * Set union: or.
4687  */
4688 
4689 /* Python wrapper */
4690 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
4691 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 ";
4692 #if CYTHON_COMPILING_IN_CPYTHON
4693 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_27__or__;
4694 #endif
4695 static PyObject *__pyx_pw_8PyClical_9index_set_28__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4696  PyObject *__pyx_r = 0;
4697  __Pyx_RefNannyDeclarations
4698  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
4699  __pyx_r = __pyx_pf_8PyClical_9index_set_27__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
4700 
4701  /* function exit code */
4702  __Pyx_RefNannyFinishContext();
4703  return __pyx_r;
4704 }
4705 
4706 static PyObject *__pyx_pf_8PyClical_9index_set_27__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
4707  PyObject *__pyx_r = NULL;
4708  __Pyx_RefNannyDeclarations
4709  PyObject *__pyx_t_1 = NULL;
4710  PyObject *__pyx_t_2 = NULL;
4711  __Pyx_RefNannySetupContext("__or__", 0);
4712 
4713  /* "PyClical.pyx":300
4714  * {1,2}
4715  * """
4716  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4717  *
4718  * def __ior__(self, rhs):
4719  */
4720  __Pyx_XDECREF(__pyx_r);
4721  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
4722  __Pyx_GOTREF(__pyx_t_1);
4723  __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)
4724  __Pyx_GOTREF(__pyx_t_2);
4725  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4726  __pyx_r = __pyx_t_2;
4727  __pyx_t_2 = 0;
4728  goto __pyx_L0;
4729 
4730  /* "PyClical.pyx":291
4731  * return self.wrap( self.unwrap() & toIndexSet(rhs) )
4732  *
4733  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
4734  * """
4735  * Set union: or.
4736  */
4737 
4738  /* function exit code */
4739  __pyx_L1_error:;
4740  __Pyx_XDECREF(__pyx_t_1);
4741  __Pyx_XDECREF(__pyx_t_2);
4742  __Pyx_AddTraceback("PyClical.index_set.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4743  __pyx_r = NULL;
4744  __pyx_L0:;
4745  __Pyx_XGIVEREF(__pyx_r);
4746  __Pyx_RefNannyFinishContext();
4747  return __pyx_r;
4748 }
4749 
4750 /* "PyClical.pyx":302
4751  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4752  *
4753  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4754  * """
4755  * Set union: or.
4756  */
4757 
4758 /* Python wrapper */
4759 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
4760 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 ";
4761 #if CYTHON_COMPILING_IN_CPYTHON
4762 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_29__ior__;
4763 #endif
4764 static PyObject *__pyx_pw_8PyClical_9index_set_30__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
4765  PyObject *__pyx_r = 0;
4766  __Pyx_RefNannyDeclarations
4767  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
4768  __pyx_r = __pyx_pf_8PyClical_9index_set_29__ior__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
4769 
4770  /* function exit code */
4771  __Pyx_RefNannyFinishContext();
4772  return __pyx_r;
4773 }
4774 
4775 static PyObject *__pyx_pf_8PyClical_9index_set_29__ior__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
4776  PyObject *__pyx_r = NULL;
4777  __Pyx_RefNannyDeclarations
4778  PyObject *__pyx_t_1 = NULL;
4779  __Pyx_RefNannySetupContext("__ior__", 0);
4780 
4781  /* "PyClical.pyx":311
4782  * {1,2}
4783  * """
4784  * return self.wrap( self.unwrap() | toIndexSet(rhs) ) # <<<<<<<<<<<<<<
4785  *
4786  * def count(self):
4787  */
4788  __Pyx_XDECREF(__pyx_r);
4789  __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)
4790  __Pyx_GOTREF(__pyx_t_1);
4791  __pyx_r = __pyx_t_1;
4792  __pyx_t_1 = 0;
4793  goto __pyx_L0;
4794 
4795  /* "PyClical.pyx":302
4796  * return index_set().wrap( toIndexSet(lhs) | toIndexSet(rhs) )
4797  *
4798  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
4799  * """
4800  * Set union: or.
4801  */
4802 
4803  /* function exit code */
4804  __pyx_L1_error:;
4805  __Pyx_XDECREF(__pyx_t_1);
4806  __Pyx_AddTraceback("PyClical.index_set.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4807  __pyx_r = NULL;
4808  __pyx_L0:;
4809  __Pyx_XGIVEREF(__pyx_r);
4810  __Pyx_RefNannyFinishContext();
4811  return __pyx_r;
4812 }
4813 
4814 /* "PyClical.pyx":313
4815  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4816  *
4817  * def count(self): # <<<<<<<<<<<<<<
4818  * """
4819  * Cardinality: Number of indices included in set.
4820  */
4821 
4822 /* Python wrapper */
4823 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4824 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 ";
4825 static PyObject *__pyx_pw_8PyClical_9index_set_32count(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4826  PyObject *__pyx_r = 0;
4827  __Pyx_RefNannyDeclarations
4828  __Pyx_RefNannySetupContext("count (wrapper)", 0);
4829  __pyx_r = __pyx_pf_8PyClical_9index_set_31count(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4830 
4831  /* function exit code */
4832  __Pyx_RefNannyFinishContext();
4833  return __pyx_r;
4834 }
4835 
4836 static PyObject *__pyx_pf_8PyClical_9index_set_31count(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4837  PyObject *__pyx_r = NULL;
4838  __Pyx_RefNannyDeclarations
4839  PyObject *__pyx_t_1 = NULL;
4840  __Pyx_RefNannySetupContext("count", 0);
4841 
4842  /* "PyClical.pyx":320
4843  * 3
4844  * """
4845  * return self.instance.count() # <<<<<<<<<<<<<<
4846  *
4847  * def count_neg(self):
4848  */
4849  __Pyx_XDECREF(__pyx_r);
4850  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->count()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
4851  __Pyx_GOTREF(__pyx_t_1);
4852  __pyx_r = __pyx_t_1;
4853  __pyx_t_1 = 0;
4854  goto __pyx_L0;
4855 
4856  /* "PyClical.pyx":313
4857  * return self.wrap( self.unwrap() | toIndexSet(rhs) )
4858  *
4859  * def count(self): # <<<<<<<<<<<<<<
4860  * """
4861  * Cardinality: Number of indices included in set.
4862  */
4863 
4864  /* function exit code */
4865  __pyx_L1_error:;
4866  __Pyx_XDECREF(__pyx_t_1);
4867  __Pyx_AddTraceback("PyClical.index_set.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
4868  __pyx_r = NULL;
4869  __pyx_L0:;
4870  __Pyx_XGIVEREF(__pyx_r);
4871  __Pyx_RefNannyFinishContext();
4872  return __pyx_r;
4873 }
4874 
4875 /* "PyClical.pyx":322
4876  * return self.instance.count()
4877  *
4878  * def count_neg(self): # <<<<<<<<<<<<<<
4879  * """
4880  * Number of negative indices included in set.
4881  */
4882 
4883 /* Python wrapper */
4884 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4885 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 ";
4886 static PyObject *__pyx_pw_8PyClical_9index_set_34count_neg(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4887  PyObject *__pyx_r = 0;
4888  __Pyx_RefNannyDeclarations
4889  __Pyx_RefNannySetupContext("count_neg (wrapper)", 0);
4890  __pyx_r = __pyx_pf_8PyClical_9index_set_33count_neg(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4891 
4892  /* function exit code */
4893  __Pyx_RefNannyFinishContext();
4894  return __pyx_r;
4895 }
4896 
4897 static PyObject *__pyx_pf_8PyClical_9index_set_33count_neg(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4898  PyObject *__pyx_r = NULL;
4899  __Pyx_RefNannyDeclarations
4900  PyObject *__pyx_t_1 = NULL;
4901  __Pyx_RefNannySetupContext("count_neg", 0);
4902 
4903  /* "PyClical.pyx":329
4904  * 1
4905  * """
4906  * return self.instance.count_neg() # <<<<<<<<<<<<<<
4907  *
4908  * def count_pos(self):
4909  */
4910  __Pyx_XDECREF(__pyx_r);
4911  __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)
4912  __Pyx_GOTREF(__pyx_t_1);
4913  __pyx_r = __pyx_t_1;
4914  __pyx_t_1 = 0;
4915  goto __pyx_L0;
4916 
4917  /* "PyClical.pyx":322
4918  * return self.instance.count()
4919  *
4920  * def count_neg(self): # <<<<<<<<<<<<<<
4921  * """
4922  * Number of negative indices included in set.
4923  */
4924 
4925  /* function exit code */
4926  __pyx_L1_error:;
4927  __Pyx_XDECREF(__pyx_t_1);
4928  __Pyx_AddTraceback("PyClical.index_set.count_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
4929  __pyx_r = NULL;
4930  __pyx_L0:;
4931  __Pyx_XGIVEREF(__pyx_r);
4932  __Pyx_RefNannyFinishContext();
4933  return __pyx_r;
4934 }
4935 
4936 /* "PyClical.pyx":331
4937  * return self.instance.count_neg()
4938  *
4939  * def count_pos(self): # <<<<<<<<<<<<<<
4940  * """
4941  * Number of positive indices included in set.
4942  */
4943 
4944 /* Python wrapper */
4945 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4946 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 ";
4947 static PyObject *__pyx_pw_8PyClical_9index_set_36count_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4948  PyObject *__pyx_r = 0;
4949  __Pyx_RefNannyDeclarations
4950  __Pyx_RefNannySetupContext("count_pos (wrapper)", 0);
4951  __pyx_r = __pyx_pf_8PyClical_9index_set_35count_pos(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
4952 
4953  /* function exit code */
4954  __Pyx_RefNannyFinishContext();
4955  return __pyx_r;
4956 }
4957 
4958 static PyObject *__pyx_pf_8PyClical_9index_set_35count_pos(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
4959  PyObject *__pyx_r = NULL;
4960  __Pyx_RefNannyDeclarations
4961  PyObject *__pyx_t_1 = NULL;
4962  __Pyx_RefNannySetupContext("count_pos", 0);
4963 
4964  /* "PyClical.pyx":338
4965  * 2
4966  * """
4967  * return self.instance.count_pos() # <<<<<<<<<<<<<<
4968  *
4969  * def min(self):
4970  */
4971  __Pyx_XDECREF(__pyx_r);
4972  __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)
4973  __Pyx_GOTREF(__pyx_t_1);
4974  __pyx_r = __pyx_t_1;
4975  __pyx_t_1 = 0;
4976  goto __pyx_L0;
4977 
4978  /* "PyClical.pyx":331
4979  * return self.instance.count_neg()
4980  *
4981  * def count_pos(self): # <<<<<<<<<<<<<<
4982  * """
4983  * Number of positive indices included in set.
4984  */
4985 
4986  /* function exit code */
4987  __pyx_L1_error:;
4988  __Pyx_XDECREF(__pyx_t_1);
4989  __Pyx_AddTraceback("PyClical.index_set.count_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
4990  __pyx_r = NULL;
4991  __pyx_L0:;
4992  __Pyx_XGIVEREF(__pyx_r);
4993  __Pyx_RefNannyFinishContext();
4994  return __pyx_r;
4995 }
4996 
4997 /* "PyClical.pyx":340
4998  * return self.instance.count_pos()
4999  *
5000  * def min(self): # <<<<<<<<<<<<<<
5001  * """
5002  * Minimum member.
5003  */
5004 
5005 /* Python wrapper */
5006 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5007 static char __pyx_doc_8PyClical_9index_set_37min[] = "\n Minimum member.\n\n >>> index_set({-1,1,2}).min()\n -1\n ";
5008 static PyObject *__pyx_pw_8PyClical_9index_set_38min(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5009  PyObject *__pyx_r = 0;
5010  __Pyx_RefNannyDeclarations
5011  __Pyx_RefNannySetupContext("min (wrapper)", 0);
5012  __pyx_r = __pyx_pf_8PyClical_9index_set_37min(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5013 
5014  /* function exit code */
5015  __Pyx_RefNannyFinishContext();
5016  return __pyx_r;
5017 }
5018 
5019 static PyObject *__pyx_pf_8PyClical_9index_set_37min(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5020  PyObject *__pyx_r = NULL;
5021  __Pyx_RefNannyDeclarations
5022  PyObject *__pyx_t_1 = NULL;
5023  __Pyx_RefNannySetupContext("min", 0);
5024 
5025  /* "PyClical.pyx":347
5026  * -1
5027  * """
5028  * return self.instance.min() # <<<<<<<<<<<<<<
5029  *
5030  * def max(self):
5031  */
5032  __Pyx_XDECREF(__pyx_r);
5033  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->min()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
5034  __Pyx_GOTREF(__pyx_t_1);
5035  __pyx_r = __pyx_t_1;
5036  __pyx_t_1 = 0;
5037  goto __pyx_L0;
5038 
5039  /* "PyClical.pyx":340
5040  * return self.instance.count_pos()
5041  *
5042  * def min(self): # <<<<<<<<<<<<<<
5043  * """
5044  * Minimum member.
5045  */
5046 
5047  /* function exit code */
5048  __pyx_L1_error:;
5049  __Pyx_XDECREF(__pyx_t_1);
5050  __Pyx_AddTraceback("PyClical.index_set.min", __pyx_clineno, __pyx_lineno, __pyx_filename);
5051  __pyx_r = NULL;
5052  __pyx_L0:;
5053  __Pyx_XGIVEREF(__pyx_r);
5054  __Pyx_RefNannyFinishContext();
5055  return __pyx_r;
5056 }
5057 
5058 /* "PyClical.pyx":349
5059  * return self.instance.min()
5060  *
5061  * def max(self): # <<<<<<<<<<<<<<
5062  * """
5063  * Maximum member.
5064  */
5065 
5066 /* Python wrapper */
5067 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5068 static char __pyx_doc_8PyClical_9index_set_39max[] = "\n Maximum member.\n\n >>> index_set({-1,1,2}).max()\n 2\n ";
5069 static PyObject *__pyx_pw_8PyClical_9index_set_40max(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5070  PyObject *__pyx_r = 0;
5071  __Pyx_RefNannyDeclarations
5072  __Pyx_RefNannySetupContext("max (wrapper)", 0);
5073  __pyx_r = __pyx_pf_8PyClical_9index_set_39max(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5074 
5075  /* function exit code */
5076  __Pyx_RefNannyFinishContext();
5077  return __pyx_r;
5078 }
5079 
5080 static PyObject *__pyx_pf_8PyClical_9index_set_39max(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5081  PyObject *__pyx_r = NULL;
5082  __Pyx_RefNannyDeclarations
5083  PyObject *__pyx_t_1 = NULL;
5084  __Pyx_RefNannySetupContext("max", 0);
5085 
5086  /* "PyClical.pyx":356
5087  * 2
5088  * """
5089  * return self.instance.max() # <<<<<<<<<<<<<<
5090  *
5091  * def hash_fn(self):
5092  */
5093  __Pyx_XDECREF(__pyx_r);
5094  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->instance->max()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error)
5095  __Pyx_GOTREF(__pyx_t_1);
5096  __pyx_r = __pyx_t_1;
5097  __pyx_t_1 = 0;
5098  goto __pyx_L0;
5099 
5100  /* "PyClical.pyx":349
5101  * return self.instance.min()
5102  *
5103  * def max(self): # <<<<<<<<<<<<<<
5104  * """
5105  * Maximum member.
5106  */
5107 
5108  /* function exit code */
5109  __pyx_L1_error:;
5110  __Pyx_XDECREF(__pyx_t_1);
5111  __Pyx_AddTraceback("PyClical.index_set.max", __pyx_clineno, __pyx_lineno, __pyx_filename);
5112  __pyx_r = NULL;
5113  __pyx_L0:;
5114  __Pyx_XGIVEREF(__pyx_r);
5115  __Pyx_RefNannyFinishContext();
5116  return __pyx_r;
5117 }
5118 
5119 /* "PyClical.pyx":358
5120  * return self.instance.max()
5121  *
5122  * def hash_fn(self): # <<<<<<<<<<<<<<
5123  * """
5124  * Hash function.
5125  */
5126 
5127 /* Python wrapper */
5128 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5129 static char __pyx_doc_8PyClical_9index_set_41hash_fn[] = "\n Hash function.\n ";
5130 static PyObject *__pyx_pw_8PyClical_9index_set_42hash_fn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5131  PyObject *__pyx_r = 0;
5132  __Pyx_RefNannyDeclarations
5133  __Pyx_RefNannySetupContext("hash_fn (wrapper)", 0);
5134  __pyx_r = __pyx_pf_8PyClical_9index_set_41hash_fn(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5135 
5136  /* function exit code */
5137  __Pyx_RefNannyFinishContext();
5138  return __pyx_r;
5139 }
5140 
5141 static PyObject *__pyx_pf_8PyClical_9index_set_41hash_fn(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5142  PyObject *__pyx_r = NULL;
5143  __Pyx_RefNannyDeclarations
5144  PyObject *__pyx_t_1 = NULL;
5145  __Pyx_RefNannySetupContext("hash_fn", 0);
5146 
5147  /* "PyClical.pyx":362
5148  * Hash function.
5149  * """
5150  * return self.instance.hash_fn() # <<<<<<<<<<<<<<
5151  *
5152  * def sign_of_mult(self, rhs):
5153  */
5154  __Pyx_XDECREF(__pyx_r);
5155  __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)
5156  __Pyx_GOTREF(__pyx_t_1);
5157  __pyx_r = __pyx_t_1;
5158  __pyx_t_1 = 0;
5159  goto __pyx_L0;
5160 
5161  /* "PyClical.pyx":358
5162  * return self.instance.max()
5163  *
5164  * def hash_fn(self): # <<<<<<<<<<<<<<
5165  * """
5166  * Hash function.
5167  */
5168 
5169  /* function exit code */
5170  __pyx_L1_error:;
5171  __Pyx_XDECREF(__pyx_t_1);
5172  __Pyx_AddTraceback("PyClical.index_set.hash_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
5173  __pyx_r = NULL;
5174  __pyx_L0:;
5175  __Pyx_XGIVEREF(__pyx_r);
5176  __Pyx_RefNannyFinishContext();
5177  return __pyx_r;
5178 }
5179 
5180 /* "PyClical.pyx":364
5181  * return self.instance.hash_fn()
5182  *
5183  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5184  * """
5185  * Sign of geometric product of two Clifford basis elements.
5186  */
5187 
5188 /* Python wrapper */
5189 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
5190 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 ";
5191 static PyObject *__pyx_pw_8PyClical_9index_set_44sign_of_mult(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
5192  PyObject *__pyx_r = 0;
5193  __Pyx_RefNannyDeclarations
5194  __Pyx_RefNannySetupContext("sign_of_mult (wrapper)", 0);
5195  __pyx_r = __pyx_pf_8PyClical_9index_set_43sign_of_mult(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
5196 
5197  /* function exit code */
5198  __Pyx_RefNannyFinishContext();
5199  return __pyx_r;
5200 }
5201 
5202 static PyObject *__pyx_pf_8PyClical_9index_set_43sign_of_mult(struct __pyx_obj_8PyClical_index_set *__pyx_v_self, PyObject *__pyx_v_rhs) {
5203  PyObject *__pyx_r = NULL;
5204  __Pyx_RefNannyDeclarations
5205  PyObject *__pyx_t_1 = NULL;
5206  __Pyx_RefNannySetupContext("sign_of_mult", 0);
5207 
5208  /* "PyClical.pyx":371
5209  * 1
5210  * """
5211  * return self.instance.sign_of_mult(toIndexSet(rhs)) # <<<<<<<<<<<<<<
5212  *
5213  * def sign_of_square(self):
5214  */
5215  __Pyx_XDECREF(__pyx_r);
5216  __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)
5217  __Pyx_GOTREF(__pyx_t_1);
5218  __pyx_r = __pyx_t_1;
5219  __pyx_t_1 = 0;
5220  goto __pyx_L0;
5221 
5222  /* "PyClical.pyx":364
5223  * return self.instance.hash_fn()
5224  *
5225  * def sign_of_mult(self, rhs): # <<<<<<<<<<<<<<
5226  * """
5227  * Sign of geometric product of two Clifford basis elements.
5228  */
5229 
5230  /* function exit code */
5231  __pyx_L1_error:;
5232  __Pyx_XDECREF(__pyx_t_1);
5233  __Pyx_AddTraceback("PyClical.index_set.sign_of_mult", __pyx_clineno, __pyx_lineno, __pyx_filename);
5234  __pyx_r = NULL;
5235  __pyx_L0:;
5236  __Pyx_XGIVEREF(__pyx_r);
5237  __Pyx_RefNannyFinishContext();
5238  return __pyx_r;
5239 }
5240 
5241 /* "PyClical.pyx":373
5242  * return self.instance.sign_of_mult(toIndexSet(rhs))
5243  *
5244  * def sign_of_square(self): # <<<<<<<<<<<<<<
5245  * """
5246  * Sign of geometric square of a Clifford basis element.
5247  */
5248 
5249 /* Python wrapper */
5250 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5251 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 ";
5252 static PyObject *__pyx_pw_8PyClical_9index_set_46sign_of_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5253  PyObject *__pyx_r = 0;
5254  __Pyx_RefNannyDeclarations
5255  __Pyx_RefNannySetupContext("sign_of_square (wrapper)", 0);
5256  __pyx_r = __pyx_pf_8PyClical_9index_set_45sign_of_square(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5257 
5258  /* function exit code */
5259  __Pyx_RefNannyFinishContext();
5260  return __pyx_r;
5261 }
5262 
5263 static PyObject *__pyx_pf_8PyClical_9index_set_45sign_of_square(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5264  PyObject *__pyx_r = NULL;
5265  __Pyx_RefNannyDeclarations
5266  PyObject *__pyx_t_1 = NULL;
5267  __Pyx_RefNannySetupContext("sign_of_square", 0);
5268 
5269  /* "PyClical.pyx":380
5270  * -1
5271  * """
5272  * return self.instance.sign_of_square() # <<<<<<<<<<<<<<
5273  *
5274  * def __repr__(self):
5275  */
5276  __Pyx_XDECREF(__pyx_r);
5277  __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)
5278  __Pyx_GOTREF(__pyx_t_1);
5279  __pyx_r = __pyx_t_1;
5280  __pyx_t_1 = 0;
5281  goto __pyx_L0;
5282 
5283  /* "PyClical.pyx":373
5284  * return self.instance.sign_of_mult(toIndexSet(rhs))
5285  *
5286  * def sign_of_square(self): # <<<<<<<<<<<<<<
5287  * """
5288  * Sign of geometric square of a Clifford basis element.
5289  */
5290 
5291  /* function exit code */
5292  __pyx_L1_error:;
5293  __Pyx_XDECREF(__pyx_t_1);
5294  __Pyx_AddTraceback("PyClical.index_set.sign_of_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
5295  __pyx_r = NULL;
5296  __pyx_L0:;
5297  __Pyx_XGIVEREF(__pyx_r);
5298  __Pyx_RefNannyFinishContext();
5299  return __pyx_r;
5300 }
5301 
5302 /* "PyClical.pyx":382
5303  * return self.instance.sign_of_square()
5304  *
5305  * def __repr__(self): # <<<<<<<<<<<<<<
5306  * """
5307  * The official string representation of self.
5308  */
5309 
5310 /* Python wrapper */
5311 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self); /*proto*/
5312 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 ";
5313 #if CYTHON_COMPILING_IN_CPYTHON
5314 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_47__repr__;
5315 #endif
5316 static PyObject *__pyx_pw_8PyClical_9index_set_48__repr__(PyObject *__pyx_v_self) {
5317  PyObject *__pyx_r = 0;
5318  __Pyx_RefNannyDeclarations
5319  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
5320  __pyx_r = __pyx_pf_8PyClical_9index_set_47__repr__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5321 
5322  /* function exit code */
5323  __Pyx_RefNannyFinishContext();
5324  return __pyx_r;
5325 }
5326 
5327 static PyObject *__pyx_pf_8PyClical_9index_set_47__repr__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5328  PyObject *__pyx_r = NULL;
5329  __Pyx_RefNannyDeclarations
5330  PyObject *__pyx_t_1 = NULL;
5331  __Pyx_RefNannySetupContext("__repr__", 0);
5332 
5333  /* "PyClical.pyx":391
5334  * 'index_set({1,2})'
5335  * """
5336  * return index_set_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5337  *
5338  * def __str__(self):
5339  */
5340  __Pyx_XDECREF(__pyx_r);
5341  __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)
5342  __Pyx_GOTREF(__pyx_t_1);
5343  __pyx_r = __pyx_t_1;
5344  __pyx_t_1 = 0;
5345  goto __pyx_L0;
5346 
5347  /* "PyClical.pyx":382
5348  * return self.instance.sign_of_square()
5349  *
5350  * def __repr__(self): # <<<<<<<<<<<<<<
5351  * """
5352  * The official string representation of self.
5353  */
5354 
5355  /* function exit code */
5356  __pyx_L1_error:;
5357  __Pyx_XDECREF(__pyx_t_1);
5358  __Pyx_AddTraceback("PyClical.index_set.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5359  __pyx_r = NULL;
5360  __pyx_L0:;
5361  __Pyx_XGIVEREF(__pyx_r);
5362  __Pyx_RefNannyFinishContext();
5363  return __pyx_r;
5364 }
5365 
5366 /* "PyClical.pyx":393
5367  * return index_set_to_repr( self.unwrap() ).c_str()
5368  *
5369  * def __str__(self): # <<<<<<<<<<<<<<
5370  * """
5371  * The informal string representation of self.
5372  */
5373 
5374 /* Python wrapper */
5375 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self); /*proto*/
5376 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 ";
5377 #if CYTHON_COMPILING_IN_CPYTHON
5378 struct wrapperbase __pyx_wrapperbase_8PyClical_9index_set_49__str__;
5379 #endif
5380 static PyObject *__pyx_pw_8PyClical_9index_set_50__str__(PyObject *__pyx_v_self) {
5381  PyObject *__pyx_r = 0;
5382  __Pyx_RefNannyDeclarations
5383  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
5384  __pyx_r = __pyx_pf_8PyClical_9index_set_49__str__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5385 
5386  /* function exit code */
5387  __Pyx_RefNannyFinishContext();
5388  return __pyx_r;
5389 }
5390 
5391 static PyObject *__pyx_pf_8PyClical_9index_set_49__str__(struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5392  PyObject *__pyx_r = NULL;
5393  __Pyx_RefNannyDeclarations
5394  PyObject *__pyx_t_1 = NULL;
5395  __Pyx_RefNannySetupContext("__str__", 0);
5396 
5397  /* "PyClical.pyx":402
5398  * '{1,2}'
5399  * """
5400  * return index_set_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
5401  *
5402  * def index_set_hidden_doctests():
5403  */
5404  __Pyx_XDECREF(__pyx_r);
5405  __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)
5406  __Pyx_GOTREF(__pyx_t_1);
5407  __pyx_r = __pyx_t_1;
5408  __pyx_t_1 = 0;
5409  goto __pyx_L0;
5410 
5411  /* "PyClical.pyx":393
5412  * return index_set_to_repr( self.unwrap() ).c_str()
5413  *
5414  * def __str__(self): # <<<<<<<<<<<<<<
5415  * """
5416  * The informal string representation of self.
5417  */
5418 
5419  /* function exit code */
5420  __pyx_L1_error:;
5421  __Pyx_XDECREF(__pyx_t_1);
5422  __Pyx_AddTraceback("PyClical.index_set.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5423  __pyx_r = NULL;
5424  __pyx_L0:;
5425  __Pyx_XGIVEREF(__pyx_r);
5426  __Pyx_RefNannyFinishContext();
5427  return __pyx_r;
5428 }
5429 
5430 /* "(tree fragment)":1
5431  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5432  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5433  * def __setstate_cython__(self, __pyx_state):
5434  */
5435 
5436 /* Python wrapper */
5437 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5438 static PyObject *__pyx_pw_8PyClical_9index_set_52__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5439  PyObject *__pyx_r = 0;
5440  __Pyx_RefNannyDeclarations
5441  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
5442  __pyx_r = __pyx_pf_8PyClical_9index_set_51__reduce_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self));
5443 
5444  /* function exit code */
5445  __Pyx_RefNannyFinishContext();
5446  return __pyx_r;
5447 }
5448 
5449 static PyObject *__pyx_pf_8PyClical_9index_set_51__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_index_set *__pyx_v_self) {
5450  PyObject *__pyx_r = NULL;
5451  __Pyx_RefNannyDeclarations
5452  PyObject *__pyx_t_1 = NULL;
5453  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
5454 
5455  /* "(tree fragment)":2
5456  * def __reduce_cython__(self):
5457  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5458  * def __setstate_cython__(self, __pyx_state):
5459  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5460  */
5461  __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)
5462  __Pyx_GOTREF(__pyx_t_1);
5463  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5464  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5465  __PYX_ERR(1, 2, __pyx_L1_error)
5466 
5467  /* "(tree fragment)":1
5468  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
5469  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5470  * def __setstate_cython__(self, __pyx_state):
5471  */
5472 
5473  /* function exit code */
5474  __pyx_L1_error:;
5475  __Pyx_XDECREF(__pyx_t_1);
5476  __Pyx_AddTraceback("PyClical.index_set.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5477  __pyx_r = NULL;
5478  __Pyx_XGIVEREF(__pyx_r);
5479  __Pyx_RefNannyFinishContext();
5480  return __pyx_r;
5481 }
5482 
5483 /* "(tree fragment)":3
5484  * def __reduce_cython__(self):
5485  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5486  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5487  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5488  */
5489 
5490 /* Python wrapper */
5491 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
5492 static PyObject *__pyx_pw_8PyClical_9index_set_54__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
5493  PyObject *__pyx_r = 0;
5494  __Pyx_RefNannyDeclarations
5495  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
5496  __pyx_r = __pyx_pf_8PyClical_9index_set_53__setstate_cython__(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
5497 
5498  /* function exit code */
5499  __Pyx_RefNannyFinishContext();
5500  return __pyx_r;
5501 }
5502 
5503 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) {
5504  PyObject *__pyx_r = NULL;
5505  __Pyx_RefNannyDeclarations
5506  PyObject *__pyx_t_1 = NULL;
5507  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
5508 
5509  /* "(tree fragment)":4
5510  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5511  * def __setstate_cython__(self, __pyx_state):
5512  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
5513  */
5514  __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)
5515  __Pyx_GOTREF(__pyx_t_1);
5516  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
5517  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5518  __PYX_ERR(1, 4, __pyx_L1_error)
5519 
5520  /* "(tree fragment)":3
5521  * def __reduce_cython__(self):
5522  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5523  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
5524  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
5525  */
5526 
5527  /* function exit code */
5528  __pyx_L1_error:;
5529  __Pyx_XDECREF(__pyx_t_1);
5530  __Pyx_AddTraceback("PyClical.index_set.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5531  __pyx_r = NULL;
5532  __Pyx_XGIVEREF(__pyx_r);
5533  __Pyx_RefNannyFinishContext();
5534  return __pyx_r;
5535 }
5536 
5537 /* "PyClical.pyx":404
5538  * return index_set_to_str( self.unwrap() ).c_str()
5539  *
5540  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5541  * """
5542  * Tests for functions that Doctest cannot see.
5543  */
5544 
5545 /* Python wrapper */
5546 static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5547 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 ";
5548  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};
5549  static PyObject *__pyx_pw_8PyClical_1index_set_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
5550  PyObject *__pyx_r = 0;
5551  __Pyx_RefNannyDeclarations
5552  __Pyx_RefNannySetupContext("index_set_hidden_doctests (wrapper)", 0);
5553  __pyx_r = __pyx_pf_8PyClical_index_set_hidden_doctests(__pyx_self);
5554 
5555  /* function exit code */
5556  __Pyx_RefNannyFinishContext();
5557  return __pyx_r;
5558  }
5559 
5560  static PyObject *__pyx_pf_8PyClical_index_set_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
5561  PyObject *__pyx_r = NULL;
5562  __Pyx_RefNannyDeclarations
5563  __Pyx_RefNannySetupContext("index_set_hidden_doctests", 0);
5564 
5565  /* "PyClical.pyx":488
5566  * False
5567  * """
5568  * return # <<<<<<<<<<<<<<
5569  *
5570  * cpdef inline compare(lhs,rhs):
5571  */
5572  __Pyx_XDECREF(__pyx_r);
5573  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5574  goto __pyx_L0;
5575 
5576  /* "PyClical.pyx":404
5577  * return index_set_to_str( self.unwrap() ).c_str()
5578  *
5579  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
5580  * """
5581  * Tests for functions that Doctest cannot see.
5582  */
5583 
5584  /* function exit code */
5585  __pyx_L0:;
5586  __Pyx_XGIVEREF(__pyx_r);
5587  __Pyx_RefNannyFinishContext();
5588  return __pyx_r;
5589  }
5590 
5591  /* "PyClical.pyx":490
5592  * return
5593  *
5594  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5595  * """
5596  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5597  */
5598 
5599  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5600  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_compare(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, CYTHON_UNUSED int __pyx_skip_dispatch) {
5601  PyObject *__pyx_r = NULL;
5602  __Pyx_RefNannyDeclarations
5603  PyObject *__pyx_t_1 = NULL;
5604  __Pyx_RefNannySetupContext("compare", 0);
5605 
5606  /* "PyClical.pyx":500
5607  * 1
5608  * """
5609  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) ) # <<<<<<<<<<<<<<
5610  *
5611  * cpdef inline min_neg(obj):
5612  */
5613  __Pyx_XDECREF(__pyx_r);
5614  __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)
5615  __Pyx_GOTREF(__pyx_t_1);
5616  __pyx_r = __pyx_t_1;
5617  __pyx_t_1 = 0;
5618  goto __pyx_L0;
5619 
5620  /* "PyClical.pyx":490
5621  * return
5622  *
5623  * cpdef inline compare(lhs,rhs): # <<<<<<<<<<<<<<
5624  * """
5625  * "lexicographic compare" eg. {3,4,5} is less than {3,7,8};
5626  */
5627 
5628  /* function exit code */
5629  __pyx_L1_error:;
5630  __Pyx_XDECREF(__pyx_t_1);
5631  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5632  __pyx_r = 0;
5633  __pyx_L0:;
5634  __Pyx_XGIVEREF(__pyx_r);
5635  __Pyx_RefNannyFinishContext();
5636  return __pyx_r;
5637  }
5638 
5639  /* Python wrapper */
5640  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5641  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 ";
5642  static PyObject *__pyx_pw_8PyClical_3compare(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5643  PyObject *__pyx_v_lhs = 0;
5644  PyObject *__pyx_v_rhs = 0;
5645  PyObject *__pyx_r = 0;
5646  __Pyx_RefNannyDeclarations
5647  __Pyx_RefNannySetupContext("compare (wrapper)", 0);
5648  {
5649  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
5650  PyObject* values[2] = {0,0};
5651  if (unlikely(__pyx_kwds)) {
5652  Py_ssize_t kw_args;
5653  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
5654  switch (pos_args) {
5655  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5656  CYTHON_FALLTHROUGH;
5657  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5658  CYTHON_FALLTHROUGH;
5659  case 0: break;
5660  default: goto __pyx_L5_argtuple_error;
5661  }
5662  kw_args = PyDict_Size(__pyx_kwds);
5663  switch (pos_args) {
5664  case 0:
5665  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
5666  else goto __pyx_L5_argtuple_error;
5667  CYTHON_FALLTHROUGH;
5668  case 1:
5669  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
5670  else {
5671  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, 1); __PYX_ERR(0, 490, __pyx_L3_error)
5672  }
5673  }
5674  if (unlikely(kw_args > 0)) {
5675  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare") < 0)) __PYX_ERR(0, 490, __pyx_L3_error)
5676  }
5677  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5678  goto __pyx_L5_argtuple_error;
5679  } else {
5680  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5681  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5682  }
5683  __pyx_v_lhs = values[0];
5684  __pyx_v_rhs = values[1];
5685  }
5686  goto __pyx_L4_argument_unpacking_done;
5687  __pyx_L5_argtuple_error:;
5688  __Pyx_RaiseArgtupleInvalid("compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 490, __pyx_L3_error)
5689  __pyx_L3_error:;
5690  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5691  __Pyx_RefNannyFinishContext();
5692  return NULL;
5693  __pyx_L4_argument_unpacking_done:;
5694  __pyx_r = __pyx_pf_8PyClical_2compare(__pyx_self, __pyx_v_lhs, __pyx_v_rhs);
5695 
5696  /* function exit code */
5697  __Pyx_RefNannyFinishContext();
5698  return __pyx_r;
5699  }
5700 
5701  static PyObject *__pyx_pf_8PyClical_2compare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
5702  PyObject *__pyx_r = NULL;
5703  __Pyx_RefNannyDeclarations
5704  PyObject *__pyx_t_1 = NULL;
5705  __Pyx_RefNannySetupContext("compare", 0);
5706  __Pyx_XDECREF(__pyx_r);
5707  __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)
5708  __Pyx_GOTREF(__pyx_t_1);
5709  __pyx_r = __pyx_t_1;
5710  __pyx_t_1 = 0;
5711  goto __pyx_L0;
5712 
5713  /* function exit code */
5714  __pyx_L1_error:;
5715  __Pyx_XDECREF(__pyx_t_1);
5716  __Pyx_AddTraceback("PyClical.compare", __pyx_clineno, __pyx_lineno, __pyx_filename);
5717  __pyx_r = NULL;
5718  __pyx_L0:;
5719  __Pyx_XGIVEREF(__pyx_r);
5720  __Pyx_RefNannyFinishContext();
5721  return __pyx_r;
5722  }
5723 
5724  /* "PyClical.pyx":502
5725  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5726  *
5727  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5728  * """
5729  * Minimum negative index, or 0 if none.
5730  */
5731 
5732  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5733  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_min_neg(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5734  PyObject *__pyx_r = NULL;
5735  __Pyx_RefNannyDeclarations
5736  PyObject *__pyx_t_1 = NULL;
5737  __Pyx_RefNannySetupContext("min_neg", 0);
5738 
5739  /* "PyClical.pyx":509
5740  * 0
5741  * """
5742  * return glucat.min_neg( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5743  *
5744  * cpdef inline max_pos(obj):
5745  */
5746  __Pyx_XDECREF(__pyx_r);
5747  __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)
5748  __Pyx_GOTREF(__pyx_t_1);
5749  __pyx_r = __pyx_t_1;
5750  __pyx_t_1 = 0;
5751  goto __pyx_L0;
5752 
5753  /* "PyClical.pyx":502
5754  * return glucat.compare( toIndexSet(lhs), toIndexSet(rhs) )
5755  *
5756  * cpdef inline min_neg(obj): # <<<<<<<<<<<<<<
5757  * """
5758  * Minimum negative index, or 0 if none.
5759  */
5760 
5761  /* function exit code */
5762  __pyx_L1_error:;
5763  __Pyx_XDECREF(__pyx_t_1);
5764  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5765  __pyx_r = 0;
5766  __pyx_L0:;
5767  __Pyx_XGIVEREF(__pyx_r);
5768  __Pyx_RefNannyFinishContext();
5769  return __pyx_r;
5770  }
5771 
5772  /* Python wrapper */
5773  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5774  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 ";
5775  static PyObject *__pyx_pw_8PyClical_5min_neg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5776  PyObject *__pyx_r = 0;
5777  __Pyx_RefNannyDeclarations
5778  __Pyx_RefNannySetupContext("min_neg (wrapper)", 0);
5779  __pyx_r = __pyx_pf_8PyClical_4min_neg(__pyx_self, ((PyObject *)__pyx_v_obj));
5780 
5781  /* function exit code */
5782  __Pyx_RefNannyFinishContext();
5783  return __pyx_r;
5784  }
5785 
5786  static PyObject *__pyx_pf_8PyClical_4min_neg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5787  PyObject *__pyx_r = NULL;
5788  __Pyx_RefNannyDeclarations
5789  PyObject *__pyx_t_1 = NULL;
5790  __Pyx_RefNannySetupContext("min_neg", 0);
5791  __Pyx_XDECREF(__pyx_r);
5792  __pyx_t_1 = __pyx_f_8PyClical_min_neg(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error)
5793  __Pyx_GOTREF(__pyx_t_1);
5794  __pyx_r = __pyx_t_1;
5795  __pyx_t_1 = 0;
5796  goto __pyx_L0;
5797 
5798  /* function exit code */
5799  __pyx_L1_error:;
5800  __Pyx_XDECREF(__pyx_t_1);
5801  __Pyx_AddTraceback("PyClical.min_neg", __pyx_clineno, __pyx_lineno, __pyx_filename);
5802  __pyx_r = NULL;
5803  __pyx_L0:;
5804  __Pyx_XGIVEREF(__pyx_r);
5805  __Pyx_RefNannyFinishContext();
5806  return __pyx_r;
5807  }
5808 
5809  /* "PyClical.pyx":511
5810  * return glucat.min_neg( toIndexSet(obj) )
5811  *
5812  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5813  * """
5814  * Maximum positive index, or 0 if none.
5815  */
5816 
5817  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5818  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_pos(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
5819  PyObject *__pyx_r = NULL;
5820  __Pyx_RefNannyDeclarations
5821  PyObject *__pyx_t_1 = NULL;
5822  __Pyx_RefNannySetupContext("max_pos", 0);
5823 
5824  /* "PyClical.pyx":518
5825  * 2
5826  * """
5827  * return glucat.max_pos( toIndexSet(obj) ) # <<<<<<<<<<<<<<
5828  *
5829  * cdef inline vector[scalar_t] list_to_vector(lst):
5830  */
5831  __Pyx_XDECREF(__pyx_r);
5832  __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)
5833  __Pyx_GOTREF(__pyx_t_1);
5834  __pyx_r = __pyx_t_1;
5835  __pyx_t_1 = 0;
5836  goto __pyx_L0;
5837 
5838  /* "PyClical.pyx":511
5839  * return glucat.min_neg( toIndexSet(obj) )
5840  *
5841  * cpdef inline max_pos(obj): # <<<<<<<<<<<<<<
5842  * """
5843  * Maximum positive index, or 0 if none.
5844  */
5845 
5846  /* function exit code */
5847  __pyx_L1_error:;
5848  __Pyx_XDECREF(__pyx_t_1);
5849  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5850  __pyx_r = 0;
5851  __pyx_L0:;
5852  __Pyx_XGIVEREF(__pyx_r);
5853  __Pyx_RefNannyFinishContext();
5854  return __pyx_r;
5855  }
5856 
5857  /* Python wrapper */
5858  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
5859  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 ";
5860  static PyObject *__pyx_pw_8PyClical_7max_pos(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5861  PyObject *__pyx_r = 0;
5862  __Pyx_RefNannyDeclarations
5863  __Pyx_RefNannySetupContext("max_pos (wrapper)", 0);
5864  __pyx_r = __pyx_pf_8PyClical_6max_pos(__pyx_self, ((PyObject *)__pyx_v_obj));
5865 
5866  /* function exit code */
5867  __Pyx_RefNannyFinishContext();
5868  return __pyx_r;
5869  }
5870 
5871  static PyObject *__pyx_pf_8PyClical_6max_pos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
5872  PyObject *__pyx_r = NULL;
5873  __Pyx_RefNannyDeclarations
5874  PyObject *__pyx_t_1 = NULL;
5875  __Pyx_RefNannySetupContext("max_pos", 0);
5876  __Pyx_XDECREF(__pyx_r);
5877  __pyx_t_1 = __pyx_f_8PyClical_max_pos(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
5878  __Pyx_GOTREF(__pyx_t_1);
5879  __pyx_r = __pyx_t_1;
5880  __pyx_t_1 = 0;
5881  goto __pyx_L0;
5882 
5883  /* function exit code */
5884  __pyx_L1_error:;
5885  __Pyx_XDECREF(__pyx_t_1);
5886  __Pyx_AddTraceback("PyClical.max_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
5887  __pyx_r = NULL;
5888  __pyx_L0:;
5889  __Pyx_XGIVEREF(__pyx_r);
5890  __Pyx_RefNannyFinishContext();
5891  return __pyx_r;
5892  }
5893 
5894  /* "PyClical.pyx":520
5895  * return glucat.max_pos( toIndexSet(obj) )
5896  *
5897  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
5898  * """
5899  * Create a C++ std:vector[scalar_t] from an iterable Python object.
5900  */
5901 
5902  static CYTHON_INLINE std::vector<scalar_t> __pyx_f_8PyClical_list_to_vector(PyObject *__pyx_v_lst) {
5903  std::vector<scalar_t> __pyx_v_v;
5904  PyObject *__pyx_v_s = NULL;
5905  std::vector<scalar_t> __pyx_r;
5906  __Pyx_RefNannyDeclarations
5907  PyObject *__pyx_t_1 = NULL;
5908  Py_ssize_t __pyx_t_2;
5909  PyObject *(*__pyx_t_3)(PyObject *);
5910  PyObject *__pyx_t_4 = NULL;
5911  scalar_t __pyx_t_5;
5912  __Pyx_RefNannySetupContext("list_to_vector", 0);
5913 
5914  /* "PyClical.pyx":525
5915  * """
5916  * cdef vector[scalar_t] v
5917  * for s in lst: # <<<<<<<<<<<<<<
5918  * v.push_back(<scalar_t>s)
5919  * return v
5920  */
5921  if (likely(PyList_CheckExact(__pyx_v_lst)) || PyTuple_CheckExact(__pyx_v_lst)) {
5922  __pyx_t_1 = __pyx_v_lst; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
5923  __pyx_t_3 = NULL;
5924  } else {
5925  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_lst); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
5926  __Pyx_GOTREF(__pyx_t_1);
5927  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error)
5928  }
5929  for (;;) {
5930  if (likely(!__pyx_t_3)) {
5931  if (likely(PyList_CheckExact(__pyx_t_1))) {
5932  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
5933  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5934  __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)
5935  #else
5936  __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)
5937  __Pyx_GOTREF(__pyx_t_4);
5938  #endif
5939  } else {
5940  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
5941  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5942  __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)
5943  #else
5944  __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)
5945  __Pyx_GOTREF(__pyx_t_4);
5946  #endif
5947  }
5948  } else {
5949  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
5950  if (unlikely(!__pyx_t_4)) {
5951  PyObject* exc_type = PyErr_Occurred();
5952  if (exc_type) {
5953  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5954  else __PYX_ERR(0, 525, __pyx_L1_error)
5955  }
5956  break;
5957  }
5958  __Pyx_GOTREF(__pyx_t_4);
5959  }
5960  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
5961  __pyx_t_4 = 0;
5962 
5963  /* "PyClical.pyx":526
5964  * cdef vector[scalar_t] v
5965  * for s in lst:
5966  * v.push_back(<scalar_t>s) # <<<<<<<<<<<<<<
5967  * return v
5968  *
5969  */
5970  __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)
5971  try {
5972  __pyx_v_v.push_back(((scalar_t)__pyx_t_5));
5973  } catch(...) {
5974  __Pyx_CppExn2PyErr();
5975  __PYX_ERR(0, 526, __pyx_L1_error)
5976  }
5977 
5978  /* "PyClical.pyx":525
5979  * """
5980  * cdef vector[scalar_t] v
5981  * for s in lst: # <<<<<<<<<<<<<<
5982  * v.push_back(<scalar_t>s)
5983  * return v
5984  */
5985  }
5986  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5987 
5988  /* "PyClical.pyx":527
5989  * for s in lst:
5990  * v.push_back(<scalar_t>s)
5991  * return v # <<<<<<<<<<<<<<
5992  *
5993  * # Forward reference.
5994  */
5995  __pyx_r = __pyx_v_v;
5996  goto __pyx_L0;
5997 
5998  /* "PyClical.pyx":520
5999  * return glucat.max_pos( toIndexSet(obj) )
6000  *
6001  * cdef inline vector[scalar_t] list_to_vector(lst): # <<<<<<<<<<<<<<
6002  * """
6003  * Create a C++ std:vector[scalar_t] from an iterable Python object.
6004  */
6005 
6006  /* function exit code */
6007  __pyx_L1_error:;
6008  __Pyx_XDECREF(__pyx_t_1);
6009  __Pyx_XDECREF(__pyx_t_4);
6010  __Pyx_WriteUnraisable("PyClical.list_to_vector", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6011  __Pyx_pretend_to_initialize(&__pyx_r);
6012  __pyx_L0:;
6013  __Pyx_XDECREF(__pyx_v_s);
6014  __Pyx_RefNannyFinishContext();
6015  return __pyx_r;
6016  }
6017 
6018  /* "PyClical.pyx":532
6019  * cdef class clifford
6020  *
6021  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6022  * return clifford(obj).instance[0]
6023  *
6024  */
6025 
6026  static CYTHON_INLINE Clifford __pyx_f_8PyClical_toClifford(PyObject *__pyx_v_obj) {
6027  Clifford __pyx_r;
6028  __Pyx_RefNannyDeclarations
6029  PyObject *__pyx_t_1 = NULL;
6030  __Pyx_RefNannySetupContext("toClifford", 0);
6031 
6032  /* "PyClical.pyx":533
6033  *
6034  * cdef inline Clifford toClifford(obj):
6035  * return clifford(obj).instance[0] # <<<<<<<<<<<<<<
6036  *
6037  * cdef class clifford:
6038  */
6039  __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)
6040  __Pyx_GOTREF(__pyx_t_1);
6041  __pyx_r = (((struct __pyx_obj_8PyClical_clifford *)__pyx_t_1)->instance[0]);
6042  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6043  goto __pyx_L0;
6044 
6045  /* "PyClical.pyx":532
6046  * cdef class clifford
6047  *
6048  * cdef inline Clifford toClifford(obj): # <<<<<<<<<<<<<<
6049  * return clifford(obj).instance[0]
6050  *
6051  */
6052 
6053  /* function exit code */
6054  __pyx_L1_error:;
6055  __Pyx_XDECREF(__pyx_t_1);
6056  __Pyx_WriteUnraisable("PyClical.toClifford", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
6057  __Pyx_pretend_to_initialize(&__pyx_r);
6058  __pyx_L0:;
6059  __Pyx_RefNannyFinishContext();
6060  return __pyx_r;
6061  }
6062 
6063  /* "PyClical.pyx":541
6064  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6065  *
6066  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6067  * """
6068  * Wrap an instance of the C++ class Clifford.
6069  */
6070 
6071  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_8clifford_wrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, Clifford __pyx_v_other) {
6072  PyObject *__pyx_r = NULL;
6073  __Pyx_RefNannyDeclarations
6074  __Pyx_RefNannySetupContext("wrap", 0);
6075 
6076  /* "PyClical.pyx":545
6077  * Wrap an instance of the C++ class Clifford.
6078  * """
6079  * self.instance[0] = other # <<<<<<<<<<<<<<
6080  * return self
6081  *
6082  */
6083  (__pyx_v_self->instance[0]) = __pyx_v_other;
6084 
6085  /* "PyClical.pyx":546
6086  * """
6087  * self.instance[0] = other
6088  * return self # <<<<<<<<<<<<<<
6089  *
6090  * cdef inline Clifford unwrap(clifford self):
6091  */
6092  __Pyx_XDECREF(__pyx_r);
6093  __Pyx_INCREF(((PyObject *)__pyx_v_self));
6094  __pyx_r = ((PyObject *)__pyx_v_self);
6095  goto __pyx_L0;
6096 
6097  /* "PyClical.pyx":541
6098  * cdef Clifford *instance # Wrapped instance of C++ class Clifford.
6099  *
6100  * cdef inline wrap(clifford self, Clifford other): # <<<<<<<<<<<<<<
6101  * """
6102  * Wrap an instance of the C++ class Clifford.
6103  */
6104 
6105  /* function exit code */
6106  __pyx_L0:;
6107  __Pyx_XGIVEREF(__pyx_r);
6108  __Pyx_RefNannyFinishContext();
6109  return __pyx_r;
6110  }
6111 
6112  /* "PyClical.pyx":548
6113  * return self
6114  *
6115  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6116  * """
6117  * Return the wrapped C++ Clifford instance.
6118  */
6119 
6120  static CYTHON_INLINE Clifford __pyx_f_8PyClical_8clifford_unwrap(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6121  Clifford __pyx_r;
6122  __Pyx_RefNannyDeclarations
6123  __Pyx_RefNannySetupContext("unwrap", 0);
6124 
6125  /* "PyClical.pyx":552
6126  * Return the wrapped C++ Clifford instance.
6127  * """
6128  * return self.instance[0] # <<<<<<<<<<<<<<
6129  *
6130  * cpdef copy(clifford self):
6131  */
6132  __pyx_r = (__pyx_v_self->instance[0]);
6133  goto __pyx_L0;
6134 
6135  /* "PyClical.pyx":548
6136  * return self
6137  *
6138  * cdef inline Clifford unwrap(clifford self): # <<<<<<<<<<<<<<
6139  * """
6140  * Return the wrapped C++ Clifford instance.
6141  */
6142 
6143  /* function exit code */
6144  __pyx_L0:;
6145  __Pyx_RefNannyFinishContext();
6146  return __pyx_r;
6147  }
6148 
6149  /* "PyClical.pyx":554
6150  * return self.instance[0]
6151  *
6152  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6153  * """
6154  * Copy this clifford object.
6155  */
6156 
6157  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6158  static PyObject *__pyx_f_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, int __pyx_skip_dispatch) {
6159  PyObject *__pyx_r = NULL;
6160  __Pyx_RefNannyDeclarations
6161  PyObject *__pyx_t_1 = NULL;
6162  PyObject *__pyx_t_2 = NULL;
6163  PyObject *__pyx_t_3 = NULL;
6164  PyObject *__pyx_t_4 = NULL;
6165  __Pyx_RefNannySetupContext("copy", 0);
6166  /* Check if called by wrapper */
6167  if (unlikely(__pyx_skip_dispatch)) ;
6168  /* Check if overridden in Python */
6169  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
6170  __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)
6171  __Pyx_GOTREF(__pyx_t_1);
6172  if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy)) {
6173  __Pyx_XDECREF(__pyx_r);
6174  __Pyx_INCREF(__pyx_t_1);
6175  __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
6176  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
6177  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
6178  if (likely(__pyx_t_4)) {
6179  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
6180  __Pyx_INCREF(__pyx_t_4);
6181  __Pyx_INCREF(function);
6182  __Pyx_DECREF_SET(__pyx_t_3, function);
6183  }
6184  }
6185  if (__pyx_t_4) {
6186  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6187  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6188  } else {
6189  __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
6190  }
6191  __Pyx_GOTREF(__pyx_t_2);
6192  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6193  __pyx_r = __pyx_t_2;
6194  __pyx_t_2 = 0;
6195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6196  goto __pyx_L0;
6197  }
6198  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6199  }
6200 
6201  /* "PyClical.pyx":561
6202  * {2}
6203  * """
6204  * return clifford(self) # <<<<<<<<<<<<<<
6205  *
6206  * def __cinit__(self, other = 0, ixt = None):
6207  */
6208  __Pyx_XDECREF(__pyx_r);
6209  __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)
6210  __Pyx_GOTREF(__pyx_t_1);
6211  __pyx_r = __pyx_t_1;
6212  __pyx_t_1 = 0;
6213  goto __pyx_L0;
6214 
6215  /* "PyClical.pyx":554
6216  * return self.instance[0]
6217  *
6218  * cpdef copy(clifford self): # <<<<<<<<<<<<<<
6219  * """
6220  * Copy this clifford object.
6221  */
6222 
6223  /* function exit code */
6224  __pyx_L1_error:;
6225  __Pyx_XDECREF(__pyx_t_1);
6226  __Pyx_XDECREF(__pyx_t_2);
6227  __Pyx_XDECREF(__pyx_t_3);
6228  __Pyx_XDECREF(__pyx_t_4);
6229  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6230  __pyx_r = 0;
6231  __pyx_L0:;
6232  __Pyx_XGIVEREF(__pyx_r);
6233  __Pyx_RefNannyFinishContext();
6234  return __pyx_r;
6235  }
6236 
6237  /* Python wrapper */
6238  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
6239  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 ";
6240  static PyObject *__pyx_pw_8PyClical_8clifford_1copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
6241  PyObject *__pyx_r = 0;
6242  __Pyx_RefNannyDeclarations
6243  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
6244  __pyx_r = __pyx_pf_8PyClical_8clifford_copy(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
6245 
6246  /* function exit code */
6247  __Pyx_RefNannyFinishContext();
6248  return __pyx_r;
6249  }
6250 
6251  static PyObject *__pyx_pf_8PyClical_8clifford_copy(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
6252  PyObject *__pyx_r = NULL;
6253  __Pyx_RefNannyDeclarations
6254  PyObject *__pyx_t_1 = NULL;
6255  __Pyx_RefNannySetupContext("copy", 0);
6256  __Pyx_XDECREF(__pyx_r);
6257  __pyx_t_1 = __pyx_f_8PyClical_8clifford_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
6258  __Pyx_GOTREF(__pyx_t_1);
6259  __pyx_r = __pyx_t_1;
6260  __pyx_t_1 = 0;
6261  goto __pyx_L0;
6262 
6263  /* function exit code */
6264  __pyx_L1_error:;
6265  __Pyx_XDECREF(__pyx_t_1);
6266  __Pyx_AddTraceback("PyClical.clifford.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
6267  __pyx_r = NULL;
6268  __pyx_L0:;
6269  __Pyx_XGIVEREF(__pyx_r);
6270  __Pyx_RefNannyFinishContext();
6271  return __pyx_r;
6272  }
6273 
6274  /* "PyClical.pyx":563
6275  * return clifford(self)
6276  *
6277  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
6278  * """
6279  * Construct an object of type clifford.
6280  */
6281 
6282  /* Python wrapper */
6283  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6284  static int __pyx_pw_8PyClical_8clifford_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6285  PyObject *__pyx_v_other = 0;
6286  PyObject *__pyx_v_ixt = 0;
6287  int __pyx_r;
6288  __Pyx_RefNannyDeclarations
6289  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6290  {
6291  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,&__pyx_n_s_ixt,0};
6292  PyObject* values[2] = {0,0};
6293  values[0] = ((PyObject *)__pyx_int_0);
6294  values[1] = ((PyObject *)Py_None);
6295  if (unlikely(__pyx_kwds)) {
6296  Py_ssize_t kw_args;
6297  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6298  switch (pos_args) {
6299  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6300  CYTHON_FALLTHROUGH;
6301  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6302  CYTHON_FALLTHROUGH;
6303  case 0: break;
6304  default: goto __pyx_L5_argtuple_error;
6305  }
6306  kw_args = PyDict_Size(__pyx_kwds);
6307  switch (pos_args) {
6308  case 0:
6309  if (kw_args > 0) {
6310  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other);
6311  if (value) { values[0] = value; kw_args--; }
6312  }
6313  CYTHON_FALLTHROUGH;
6314  case 1:
6315  if (kw_args > 0) {
6316  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt);
6317  if (value) { values[1] = value; kw_args--; }
6318  }
6319  }
6320  if (unlikely(kw_args > 0)) {
6321  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 563, __pyx_L3_error)
6322  }
6323  } else {
6324  switch (PyTuple_GET_SIZE(__pyx_args)) {
6325  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
6326  CYTHON_FALLTHROUGH;
6327  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6328  CYTHON_FALLTHROUGH;
6329  case 0: break;
6330  default: goto __pyx_L5_argtuple_error;
6331  }
6332  }
6333  __pyx_v_other = values[0];
6334  __pyx_v_ixt = values[1];
6335  }
6336  goto __pyx_L4_argument_unpacking_done;
6337  __pyx_L5_argtuple_error:;
6338  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 563, __pyx_L3_error)
6339  __pyx_L3_error:;
6340  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6341  __Pyx_RefNannyFinishContext();
6342  return -1;
6343  __pyx_L4_argument_unpacking_done:;
6344  __pyx_r = __pyx_pf_8PyClical_8clifford_2__cinit__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_other, __pyx_v_ixt);
6345 
6346  /* function exit code */
6347  __Pyx_RefNannyFinishContext();
6348  return __pyx_r;
6349  }
6350 
6351  static int __pyx_pf_8PyClical_8clifford_2__cinit__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_ixt) {
6352  PyObject *__pyx_v_error_msg_prefix = NULL;
6353  PyObject *__pyx_v_err = NULL;
6354  int __pyx_r;
6355  __Pyx_RefNannyDeclarations
6356  int __pyx_t_1;
6357  int __pyx_t_2;
6358  PyObject *__pyx_t_3 = NULL;
6359  PyObject *__pyx_t_4 = NULL;
6360  PyObject *__pyx_t_5 = NULL;
6361  Clifford *__pyx_t_6;
6362  PyObject *__pyx_t_7 = NULL;
6363  PyObject *__pyx_t_8 = NULL;
6364  scalar_t __pyx_t_9;
6365  PyObject *__pyx_t_10 = NULL;
6366  PyObject *__pyx_t_11 = NULL;
6367  PyObject *__pyx_t_12 = NULL;
6368  char *__pyx_t_13;
6369  int __pyx_t_14;
6370  PyObject *__pyx_t_15 = NULL;
6371  PyObject *__pyx_t_16 = NULL;
6372  PyObject *__pyx_t_17 = NULL;
6373  PyObject *__pyx_t_18 = NULL;
6374  __Pyx_RefNannySetupContext("__cinit__", 0);
6375 
6376  /* "PyClical.pyx":588
6377  * 2{1}+3{2}
6378  * """
6379  * error_msg_prefix = "Cannot initialize clifford object from" # <<<<<<<<<<<<<<
6380  * if ixt is None:
6381  * try:
6382  */
6383  __Pyx_INCREF(__pyx_kp_s_Cannot_initialize_clifford_objec);
6384  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_initialize_clifford_objec;
6385 
6386  /* "PyClical.pyx":589
6387  * """
6388  * error_msg_prefix = "Cannot initialize clifford object from"
6389  * if ixt is None: # <<<<<<<<<<<<<<
6390  * try:
6391  * if isinstance(other, clifford):
6392  */
6393  __pyx_t_1 = (__pyx_v_ixt == Py_None);
6394  __pyx_t_2 = (__pyx_t_1 != 0);
6395  if (__pyx_t_2) {
6396 
6397  /* "PyClical.pyx":590
6398  * error_msg_prefix = "Cannot initialize clifford object from"
6399  * if ixt is None:
6400  * try: # <<<<<<<<<<<<<<
6401  * if isinstance(other, clifford):
6402  * self.instance = new Clifford((<clifford>other).unwrap())
6403  */
6404  {
6405  __Pyx_PyThreadState_declare
6406  __Pyx_PyThreadState_assign
6407  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
6408  __Pyx_XGOTREF(__pyx_t_3);
6409  __Pyx_XGOTREF(__pyx_t_4);
6410  __Pyx_XGOTREF(__pyx_t_5);
6411  /*try:*/ {
6412 
6413  /* "PyClical.pyx":591
6414  * if ixt is None:
6415  * try:
6416  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6417  * self.instance = new Clifford((<clifford>other).unwrap())
6418  * elif isinstance(other, index_set):
6419  */
6420  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_clifford);
6421  __pyx_t_1 = (__pyx_t_2 != 0);
6422  if (__pyx_t_1) {
6423 
6424  /* "PyClical.pyx":592
6425  * try:
6426  * if isinstance(other, clifford):
6427  * self.instance = new Clifford((<clifford>other).unwrap()) # <<<<<<<<<<<<<<
6428  * elif isinstance(other, index_set):
6429  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6430  */
6431  try {
6432  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_8clifford_unwrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_other)));
6433  } catch(...) {
6434  __Pyx_CppExn2PyErr();
6435  __PYX_ERR(0, 592, __pyx_L4_error)
6436  }
6437  __pyx_v_self->instance = __pyx_t_6;
6438 
6439  /* "PyClical.pyx":591
6440  * if ixt is None:
6441  * try:
6442  * if isinstance(other, clifford): # <<<<<<<<<<<<<<
6443  * self.instance = new Clifford((<clifford>other).unwrap())
6444  * elif isinstance(other, index_set):
6445  */
6446  goto __pyx_L10;
6447  }
6448 
6449  /* "PyClical.pyx":593
6450  * if isinstance(other, clifford):
6451  * self.instance = new Clifford((<clifford>other).unwrap())
6452  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6453  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6454  * elif isinstance(other, numbers.Real):
6455  */
6456  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_8PyClical_index_set);
6457  __pyx_t_2 = (__pyx_t_1 != 0);
6458  if (__pyx_t_2) {
6459 
6460  /* "PyClical.pyx":594
6461  * self.instance = new Clifford((<clifford>other).unwrap())
6462  * elif isinstance(other, index_set):
6463  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0) # <<<<<<<<<<<<<<
6464  * elif isinstance(other, numbers.Real):
6465  * self.instance = new Clifford(<scalar_t>other)
6466  */
6467  try {
6468  __pyx_t_6 = new Clifford(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_other)), ((scalar_t)1.0));
6469  } catch(...) {
6470  __Pyx_CppExn2PyErr();
6471  __PYX_ERR(0, 594, __pyx_L4_error)
6472  }
6473  __pyx_v_self->instance = __pyx_t_6;
6474 
6475  /* "PyClical.pyx":593
6476  * if isinstance(other, clifford):
6477  * self.instance = new Clifford((<clifford>other).unwrap())
6478  * elif isinstance(other, index_set): # <<<<<<<<<<<<<<
6479  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6480  * elif isinstance(other, numbers.Real):
6481  */
6482  goto __pyx_L10;
6483  }
6484 
6485  /* "PyClical.pyx":595
6486  * elif isinstance(other, index_set):
6487  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6488  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6489  * self.instance = new Clifford(<scalar_t>other)
6490  * elif isinstance(other, str):
6491  */
6492  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L4_error)
6493  __Pyx_GOTREF(__pyx_t_7);
6494  __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)
6495  __Pyx_GOTREF(__pyx_t_8);
6496  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6497  __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)
6498  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6499  __pyx_t_1 = (__pyx_t_2 != 0);
6500  if (__pyx_t_1) {
6501 
6502  /* "PyClical.pyx":596
6503  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6504  * elif isinstance(other, numbers.Real):
6505  * self.instance = new Clifford(<scalar_t>other) # <<<<<<<<<<<<<<
6506  * elif isinstance(other, str):
6507  * try:
6508  */
6509  __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)
6510  try {
6511  __pyx_t_6 = new Clifford(((scalar_t)__pyx_t_9));
6512  } catch(...) {
6513  __Pyx_CppExn2PyErr();
6514  __PYX_ERR(0, 596, __pyx_L4_error)
6515  }
6516  __pyx_v_self->instance = __pyx_t_6;
6517 
6518  /* "PyClical.pyx":595
6519  * elif isinstance(other, index_set):
6520  * self.instance = new Clifford((<index_set>other).unwrap(), <scalar_t>1.0)
6521  * elif isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6522  * self.instance = new Clifford(<scalar_t>other)
6523  * elif isinstance(other, str):
6524  */
6525  goto __pyx_L10;
6526  }
6527 
6528  /* "PyClical.pyx":597
6529  * elif isinstance(other, numbers.Real):
6530  * self.instance = new Clifford(<scalar_t>other)
6531  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6532  * try:
6533  * self.instance = new Clifford(<char *>other)
6534  */
6535  __pyx_t_1 = PyString_Check(__pyx_v_other);
6536  __pyx_t_2 = (__pyx_t_1 != 0);
6537  if (likely(__pyx_t_2)) {
6538 
6539  /* "PyClical.pyx":598
6540  * self.instance = new Clifford(<scalar_t>other)
6541  * elif isinstance(other, str):
6542  * try: # <<<<<<<<<<<<<<
6543  * self.instance = new Clifford(<char *>other)
6544  * except RuntimeError:
6545  */
6546  {
6547  __Pyx_PyThreadState_declare
6548  __Pyx_PyThreadState_assign
6549  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
6550  __Pyx_XGOTREF(__pyx_t_10);
6551  __Pyx_XGOTREF(__pyx_t_11);
6552  __Pyx_XGOTREF(__pyx_t_12);
6553  /*try:*/ {
6554 
6555  /* "PyClical.pyx":599
6556  * elif isinstance(other, str):
6557  * try:
6558  * self.instance = new Clifford(<char *>other) # <<<<<<<<<<<<<<
6559  * except RuntimeError:
6560  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6561  */
6562  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_other); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 599, __pyx_L11_error)
6563  try {
6564  __pyx_t_6 = new Clifford(((char *)__pyx_t_13));
6565  } catch(...) {
6566  __Pyx_CppExn2PyErr();
6567  __PYX_ERR(0, 599, __pyx_L11_error)
6568  }
6569  __pyx_v_self->instance = __pyx_t_6;
6570 
6571  /* "PyClical.pyx":598
6572  * self.instance = new Clifford(<scalar_t>other)
6573  * elif isinstance(other, str):
6574  * try: # <<<<<<<<<<<<<<
6575  * self.instance = new Clifford(<char *>other)
6576  * except RuntimeError:
6577  */
6578  }
6579  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
6580  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
6581  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
6582  goto __pyx_L16_try_end;
6583  __pyx_L11_error:;
6584  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6585  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6586 
6587  /* "PyClical.pyx":600
6588  * try:
6589  * self.instance = new Clifford(<char *>other)
6590  * except RuntimeError: # <<<<<<<<<<<<<<
6591  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6592  * else:
6593  */
6594  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6595  if (__pyx_t_14) {
6596  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6597  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 600, __pyx_L13_except_error)
6598  __Pyx_GOTREF(__pyx_t_8);
6599  __Pyx_GOTREF(__pyx_t_7);
6600  __Pyx_GOTREF(__pyx_t_15);
6601 
6602  /* "PyClical.pyx":601
6603  * self.instance = new Clifford(<char *>other)
6604  * except RuntimeError:
6605  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".") # <<<<<<<<<<<<<<
6606  * else:
6607  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6608  */
6609  __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)
6610  __Pyx_GOTREF(__pyx_t_16);
6611  __pyx_t_17 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6612  __Pyx_GOTREF(__pyx_t_17);
6613  __pyx_t_18 = PyNumber_Add(__pyx_t_16, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6614  __Pyx_GOTREF(__pyx_t_18);
6615  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6616  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6617  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_kp_s_); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L13_except_error)
6618  __Pyx_GOTREF(__pyx_t_17);
6619  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6620  __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)
6621  __Pyx_GOTREF(__pyx_t_18);
6622  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6623  __Pyx_Raise(__pyx_t_18, 0, 0, 0);
6624  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6625  __PYX_ERR(0, 601, __pyx_L13_except_error)
6626  }
6627  goto __pyx_L13_except_error;
6628  __pyx_L13_except_error:;
6629 
6630  /* "PyClical.pyx":598
6631  * self.instance = new Clifford(<scalar_t>other)
6632  * elif isinstance(other, str):
6633  * try: # <<<<<<<<<<<<<<
6634  * self.instance = new Clifford(<char *>other)
6635  * except RuntimeError:
6636  */
6637  __Pyx_XGIVEREF(__pyx_t_10);
6638  __Pyx_XGIVEREF(__pyx_t_11);
6639  __Pyx_XGIVEREF(__pyx_t_12);
6640  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
6641  goto __pyx_L4_error;
6642  __pyx_L16_try_end:;
6643  }
6644 
6645  /* "PyClical.pyx":597
6646  * elif isinstance(other, numbers.Real):
6647  * self.instance = new Clifford(<scalar_t>other)
6648  * elif isinstance(other, str): # <<<<<<<<<<<<<<
6649  * try:
6650  * self.instance = new Clifford(<char *>other)
6651  */
6652  goto __pyx_L10;
6653  }
6654 
6655  /* "PyClical.pyx":603
6656  * raise ValueError(error_msg_prefix + " invalid string " + repr(other) + ".")
6657  * else:
6658  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".") # <<<<<<<<<<<<<<
6659  * except RuntimeError as err:
6660  * raise ValueError(error_msg_prefix + " " + str(type(other))
6661  */
6662  /*else*/ {
6663  __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)
6664  __Pyx_GOTREF(__pyx_t_15);
6665  __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)
6666  __Pyx_GOTREF(__pyx_t_7);
6667  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6668  __Pyx_GOTREF(__pyx_t_8);
6669  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6670  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6671  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L4_error)
6672  __Pyx_GOTREF(__pyx_t_7);
6673  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6674  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L4_error)
6675  __Pyx_GOTREF(__pyx_t_8);
6676  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6677  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
6678  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6679  __PYX_ERR(0, 603, __pyx_L4_error)
6680  }
6681  __pyx_L10:;
6682 
6683  /* "PyClical.pyx":590
6684  * error_msg_prefix = "Cannot initialize clifford object from"
6685  * if ixt is None:
6686  * try: # <<<<<<<<<<<<<<
6687  * if isinstance(other, clifford):
6688  * self.instance = new Clifford((<clifford>other).unwrap())
6689  */
6690  }
6691  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
6692  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
6693  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6694  goto __pyx_L9_try_end;
6695  __pyx_L4_error:;
6696  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
6697  __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
6698  __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
6699  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
6700  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
6701  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
6702 
6703  /* "PyClical.pyx":604
6704  * else:
6705  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6706  * except RuntimeError as err: # <<<<<<<<<<<<<<
6707  * raise ValueError(error_msg_prefix + " " + str(type(other))
6708  * + " value " + repr(other) + ":"
6709  */
6710  __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
6711  if (__pyx_t_14) {
6712  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6713  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_15) < 0) __PYX_ERR(0, 604, __pyx_L6_except_error)
6714  __Pyx_GOTREF(__pyx_t_8);
6715  __Pyx_GOTREF(__pyx_t_7);
6716  __Pyx_GOTREF(__pyx_t_15);
6717  __Pyx_INCREF(__pyx_t_7);
6718  __pyx_v_err = __pyx_t_7;
6719 
6720  /* "PyClical.pyx":605
6721  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6722  * except RuntimeError as err:
6723  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6724  * + " value " + repr(other) + ":"
6725  * + "\n\t" + str(err))
6726  */
6727  __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)
6728  __Pyx_GOTREF(__pyx_t_18);
6729  __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)
6730  __Pyx_GOTREF(__pyx_t_17);
6731  __pyx_t_16 = PyNumber_Add(__pyx_t_18, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 605, __pyx_L6_except_error)
6732  __Pyx_GOTREF(__pyx_t_16);
6733  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6734  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6735 
6736  /* "PyClical.pyx":606
6737  * except RuntimeError as err:
6738  * raise ValueError(error_msg_prefix + " " + str(type(other))
6739  * + " value " + repr(other) + ":" # <<<<<<<<<<<<<<
6740  * + "\n\t" + str(err))
6741  * elif isinstance(ixt, index_set):
6742  */
6743  __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)
6744  __Pyx_GOTREF(__pyx_t_17);
6745  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6746  __pyx_t_16 = PyObject_Repr(__pyx_v_other); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6747  __Pyx_GOTREF(__pyx_t_16);
6748  __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_t_16); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 606, __pyx_L6_except_error)
6749  __Pyx_GOTREF(__pyx_t_18);
6750  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6751  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6752  __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)
6753  __Pyx_GOTREF(__pyx_t_16);
6754  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6755 
6756  /* "PyClical.pyx":607
6757  * raise ValueError(error_msg_prefix + " " + str(type(other))
6758  * + " value " + repr(other) + ":"
6759  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
6760  * elif isinstance(ixt, index_set):
6761  * if isinstance(other, numbers.Real):
6762  */
6763  __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)
6764  __Pyx_GOTREF(__pyx_t_18);
6765  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6766  __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)
6767  __Pyx_GOTREF(__pyx_t_16);
6768  __pyx_t_17 = PyNumber_Add(__pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 607, __pyx_L6_except_error)
6769  __Pyx_GOTREF(__pyx_t_17);
6770  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
6771  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6772 
6773  /* "PyClical.pyx":605
6774  * raise TypeError(error_msg_prefix + " " + str(type(other)) + ".")
6775  * except RuntimeError as err:
6776  * raise ValueError(error_msg_prefix + " " + str(type(other)) # <<<<<<<<<<<<<<
6777  * + " value " + repr(other) + ":"
6778  * + "\n\t" + str(err))
6779  */
6780  __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)
6781  __Pyx_GOTREF(__pyx_t_16);
6782  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
6783  __Pyx_Raise(__pyx_t_16, 0, 0, 0);
6784  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
6785  __PYX_ERR(0, 605, __pyx_L6_except_error)
6786  }
6787  goto __pyx_L6_except_error;
6788  __pyx_L6_except_error:;
6789 
6790  /* "PyClical.pyx":590
6791  * error_msg_prefix = "Cannot initialize clifford object from"
6792  * if ixt is None:
6793  * try: # <<<<<<<<<<<<<<
6794  * if isinstance(other, clifford):
6795  * self.instance = new Clifford((<clifford>other).unwrap())
6796  */
6797  __Pyx_XGIVEREF(__pyx_t_3);
6798  __Pyx_XGIVEREF(__pyx_t_4);
6799  __Pyx_XGIVEREF(__pyx_t_5);
6800  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
6801  goto __pyx_L1_error;
6802  __pyx_L9_try_end:;
6803  }
6804 
6805  /* "PyClical.pyx":589
6806  * """
6807  * error_msg_prefix = "Cannot initialize clifford object from"
6808  * if ixt is None: # <<<<<<<<<<<<<<
6809  * try:
6810  * if isinstance(other, clifford):
6811  */
6812  goto __pyx_L3;
6813  }
6814 
6815  /* "PyClical.pyx":608
6816  * + " value " + repr(other) + ":"
6817  * + "\n\t" + str(err))
6818  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6819  * if isinstance(other, numbers.Real):
6820  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6821  */
6822  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
6823  __pyx_t_1 = (__pyx_t_2 != 0);
6824  if (likely(__pyx_t_1)) {
6825 
6826  /* "PyClical.pyx":609
6827  * + "\n\t" + str(err))
6828  * elif isinstance(ixt, index_set):
6829  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6830  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6831  * elif isinstance(other, collections.Sequence):
6832  */
6833  __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 609, __pyx_L1_error)
6834  __Pyx_GOTREF(__pyx_t_15);
6835  __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)
6836  __Pyx_GOTREF(__pyx_t_7);
6837  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6838  __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)
6839  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6840  __pyx_t_2 = (__pyx_t_1 != 0);
6841  if (__pyx_t_2) {
6842 
6843  /* "PyClical.pyx":610
6844  * elif isinstance(ixt, index_set):
6845  * if isinstance(other, numbers.Real):
6846  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other) # <<<<<<<<<<<<<<
6847  * elif isinstance(other, collections.Sequence):
6848  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6849  */
6850  __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)
6851  try {
6852  __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));
6853  } catch(...) {
6854  __Pyx_CppExn2PyErr();
6855  __PYX_ERR(0, 610, __pyx_L1_error)
6856  }
6857  __pyx_v_self->instance = __pyx_t_6;
6858 
6859  /* "PyClical.pyx":609
6860  * + "\n\t" + str(err))
6861  * elif isinstance(ixt, index_set):
6862  * if isinstance(other, numbers.Real): # <<<<<<<<<<<<<<
6863  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6864  * elif isinstance(other, collections.Sequence):
6865  */
6866  goto __pyx_L21;
6867  }
6868 
6869  /* "PyClical.pyx":611
6870  * if isinstance(other, numbers.Real):
6871  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6872  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6873  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6874  * else:
6875  */
6876  __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_collections); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
6877  __Pyx_GOTREF(__pyx_t_7);
6878  __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)
6879  __Pyx_GOTREF(__pyx_t_15);
6880  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6881  __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)
6882  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6883  __pyx_t_1 = (__pyx_t_2 != 0);
6884  if (likely(__pyx_t_1)) {
6885 
6886  /* "PyClical.pyx":612
6887  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6888  * elif isinstance(other, collections.Sequence):
6889  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
6890  * else:
6891  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6892  */
6893  try {
6894  __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)));
6895  } catch(...) {
6896  __Pyx_CppExn2PyErr();
6897  __PYX_ERR(0, 612, __pyx_L1_error)
6898  }
6899  __pyx_v_self->instance = __pyx_t_6;
6900 
6901  /* "PyClical.pyx":611
6902  * if isinstance(other, numbers.Real):
6903  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6904  * elif isinstance(other, collections.Sequence): # <<<<<<<<<<<<<<
6905  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6906  * else:
6907  */
6908  goto __pyx_L21;
6909  }
6910 
6911  /* "PyClical.pyx":614
6912  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6913  * else:
6914  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6915  * + ", " + repr(ixt) + ").")
6916  * else:
6917  */
6918  /*else*/ {
6919  __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)
6920  __Pyx_GOTREF(__pyx_t_15);
6921  __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)
6922  __Pyx_GOTREF(__pyx_t_7);
6923  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 614, __pyx_L1_error)
6924  __Pyx_GOTREF(__pyx_t_8);
6925  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6926  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6927 
6928  /* "PyClical.pyx":615
6929  * else:
6930  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6931  * + ", " + repr(ixt) + ").") # <<<<<<<<<<<<<<
6932  * else:
6933  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6934  */
6935  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L1_error)
6936  __Pyx_GOTREF(__pyx_t_7);
6937  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6938  __pyx_t_8 = PyObject_Repr(__pyx_v_ixt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6939  __Pyx_GOTREF(__pyx_t_8);
6940  __pyx_t_15 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 615, __pyx_L1_error)
6941  __Pyx_GOTREF(__pyx_t_15);
6942  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6943  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6944  __pyx_t_8 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L1_error)
6945  __Pyx_GOTREF(__pyx_t_8);
6946  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6947 
6948  /* "PyClical.pyx":614
6949  * self.instance = new Clifford(list_to_vector(other), (<index_set>ixt).unwrap())
6950  * else:
6951  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6952  * + ", " + repr(ixt) + ").")
6953  * else:
6954  */
6955  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 614, __pyx_L1_error)
6956  __Pyx_GOTREF(__pyx_t_15);
6957  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6958  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
6959  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6960  __PYX_ERR(0, 614, __pyx_L1_error)
6961  }
6962  __pyx_L21:;
6963 
6964  /* "PyClical.pyx":608
6965  * + " value " + repr(other) + ":"
6966  * + "\n\t" + str(err))
6967  * elif isinstance(ixt, index_set): # <<<<<<<<<<<<<<
6968  * if isinstance(other, numbers.Real):
6969  * self.instance = new Clifford((<index_set>ixt).unwrap(), <scalar_t>other)
6970  */
6971  goto __pyx_L3;
6972  }
6973 
6974  /* "PyClical.pyx":617
6975  * + ", " + repr(ixt) + ").")
6976  * else:
6977  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
6978  * + ", " + str(type(ixt)) + ").")
6979  *
6980  */
6981  /*else*/ {
6982  __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)
6983  __Pyx_GOTREF(__pyx_t_15);
6984  __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)
6985  __Pyx_GOTREF(__pyx_t_8);
6986  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
6987  __Pyx_GOTREF(__pyx_t_7);
6988  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
6989  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
6990 
6991  /* "PyClical.pyx":618
6992  * else:
6993  * raise TypeError(error_msg_prefix + " (" + str(type(other))
6994  * + ", " + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
6995  *
6996  * def __dealloc__(self):
6997  */
6998  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 618, __pyx_L1_error)
6999  __Pyx_GOTREF(__pyx_t_8);
7000  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7001  __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)
7002  __Pyx_GOTREF(__pyx_t_7);
7003  __pyx_t_15 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 618, __pyx_L1_error)
7004  __Pyx_GOTREF(__pyx_t_15);
7005  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7006  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7007  __pyx_t_7 = PyNumber_Add(__pyx_t_15, __pyx_kp_s__9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error)
7008  __Pyx_GOTREF(__pyx_t_7);
7009  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7010 
7011  /* "PyClical.pyx":617
7012  * + ", " + repr(ixt) + ").")
7013  * else:
7014  * raise TypeError(error_msg_prefix + " (" + str(type(other)) # <<<<<<<<<<<<<<
7015  * + ", " + str(type(ixt)) + ").")
7016  *
7017  */
7018  __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 617, __pyx_L1_error)
7019  __Pyx_GOTREF(__pyx_t_15);
7020  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
7021  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
7022  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
7023  __PYX_ERR(0, 617, __pyx_L1_error)
7024  }
7025  __pyx_L3:;
7026 
7027  /* "PyClical.pyx":563
7028  * return clifford(self)
7029  *
7030  * def __cinit__(self, other = 0, ixt = None): # <<<<<<<<<<<<<<
7031  * """
7032  * Construct an object of type clifford.
7033  */
7034 
7035  /* function exit code */
7036  __pyx_r = 0;
7037  goto __pyx_L0;
7038  __pyx_L1_error:;
7039  __Pyx_XDECREF(__pyx_t_7);
7040  __Pyx_XDECREF(__pyx_t_8);
7041  __Pyx_XDECREF(__pyx_t_15);
7042  __Pyx_XDECREF(__pyx_t_16);
7043  __Pyx_XDECREF(__pyx_t_17);
7044  __Pyx_XDECREF(__pyx_t_18);
7045  __Pyx_AddTraceback("PyClical.clifford.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7046  __pyx_r = -1;
7047  __pyx_L0:;
7048  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7049  __Pyx_XDECREF(__pyx_v_err);
7050  __Pyx_RefNannyFinishContext();
7051  return __pyx_r;
7052  }
7053 
7054  /* "PyClical.pyx":620
7055  * + ", " + str(type(ixt)) + ").")
7056  *
7057  * def __dealloc__(self): # <<<<<<<<<<<<<<
7058  * """
7059  * Clean up by deallocating the instance of C++ class Clifford.
7060  */
7061 
7062  /* Python wrapper */
7063  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
7064  static void __pyx_pw_8PyClical_8clifford_5__dealloc__(PyObject *__pyx_v_self) {
7065  __Pyx_RefNannyDeclarations
7066  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
7067  __pyx_pf_8PyClical_8clifford_4__dealloc__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7068 
7069  /* function exit code */
7070  __Pyx_RefNannyFinishContext();
7071  }
7072 
7073  static void __pyx_pf_8PyClical_8clifford_4__dealloc__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7074  __Pyx_RefNannyDeclarations
7075  __Pyx_RefNannySetupContext("__dealloc__", 0);
7076 
7077  /* "PyClical.pyx":624
7078  * Clean up by deallocating the instance of C++ class Clifford.
7079  * """
7080  * del self.instance # <<<<<<<<<<<<<<
7081  *
7082  * def __contains__(self, x):
7083  */
7084  delete __pyx_v_self->instance;
7085 
7086  /* "PyClical.pyx":620
7087  * + ", " + str(type(ixt)) + ").")
7088  *
7089  * def __dealloc__(self): # <<<<<<<<<<<<<<
7090  * """
7091  * Clean up by deallocating the instance of C++ class Clifford.
7092  */
7093 
7094  /* function exit code */
7095  __Pyx_RefNannyFinishContext();
7096  }
7097 
7098  /* "PyClical.pyx":626
7099  * del self.instance
7100  *
7101  * def __contains__(self, x): # <<<<<<<<<<<<<<
7102  * """
7103  * Not applicable.
7104  */
7105 
7106  /* Python wrapper */
7107  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
7108  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 ";
7109  #if CYTHON_COMPILING_IN_CPYTHON
7110  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_6__contains__;
7111  #endif
7112  static int __pyx_pw_8PyClical_8clifford_7__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
7113  int __pyx_r;
7114  __Pyx_RefNannyDeclarations
7115  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
7116  __pyx_r = __pyx_pf_8PyClical_8clifford_6__contains__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_x));
7117 
7118  /* function exit code */
7119  __Pyx_RefNannyFinishContext();
7120  return __pyx_r;
7121  }
7122 
7123  static int __pyx_pf_8PyClical_8clifford_6__contains__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_x) {
7124  int __pyx_r;
7125  __Pyx_RefNannyDeclarations
7126  PyObject *__pyx_t_1 = NULL;
7127  __Pyx_RefNannySetupContext("__contains__", 0);
7128 
7129  /* "PyClical.pyx":635
7130  * TypeError: Not applicable.
7131  * """
7132  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7133  *
7134  * def __iter__(self):
7135  */
7136  __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)
7137  __Pyx_GOTREF(__pyx_t_1);
7138  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7139  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7140  __PYX_ERR(0, 635, __pyx_L1_error)
7141 
7142  /* "PyClical.pyx":626
7143  * del self.instance
7144  *
7145  * def __contains__(self, x): # <<<<<<<<<<<<<<
7146  * """
7147  * Not applicable.
7148  */
7149 
7150  /* function exit code */
7151  __pyx_L1_error:;
7152  __Pyx_XDECREF(__pyx_t_1);
7153  __Pyx_AddTraceback("PyClical.clifford.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7154  __pyx_r = -1;
7155  __Pyx_RefNannyFinishContext();
7156  return __pyx_r;
7157  }
7158 
7159  /* "PyClical.pyx":637
7160  * raise TypeError("Not applicable.")
7161  *
7162  * def __iter__(self): # <<<<<<<<<<<<<<
7163  * """
7164  * Not applicable.
7165  */
7166 
7167  /* Python wrapper */
7168  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self); /*proto*/
7169  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 ";
7170  #if CYTHON_COMPILING_IN_CPYTHON
7171  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_8__iter__;
7172  #endif
7173  static PyObject *__pyx_pw_8PyClical_8clifford_9__iter__(PyObject *__pyx_v_self) {
7174  PyObject *__pyx_r = 0;
7175  __Pyx_RefNannyDeclarations
7176  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
7177  __pyx_r = __pyx_pf_8PyClical_8clifford_8__iter__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7178 
7179  /* function exit code */
7180  __Pyx_RefNannyFinishContext();
7181  return __pyx_r;
7182  }
7183 
7184  static PyObject *__pyx_pf_8PyClical_8clifford_8__iter__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7185  PyObject *__pyx_r = NULL;
7186  __Pyx_RefNannyDeclarations
7187  PyObject *__pyx_t_1 = NULL;
7188  __Pyx_RefNannySetupContext("__iter__", 0);
7189 
7190  /* "PyClical.pyx":646
7191  * TypeError: Not applicable.
7192  * """
7193  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
7194  *
7195  * def reframe(self, ixt):
7196  */
7197  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
7198  __Pyx_GOTREF(__pyx_t_1);
7199  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7200  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7201  __PYX_ERR(0, 646, __pyx_L1_error)
7202 
7203  /* "PyClical.pyx":637
7204  * raise TypeError("Not applicable.")
7205  *
7206  * def __iter__(self): # <<<<<<<<<<<<<<
7207  * """
7208  * Not applicable.
7209  */
7210 
7211  /* function exit code */
7212  __pyx_L1_error:;
7213  __Pyx_XDECREF(__pyx_t_1);
7214  __Pyx_AddTraceback("PyClical.clifford.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7215  __pyx_r = NULL;
7216  __Pyx_XGIVEREF(__pyx_r);
7217  __Pyx_RefNannyFinishContext();
7218  return __pyx_r;
7219  }
7220 
7221  /* "PyClical.pyx":648
7222  * raise TypeError("Not applicable.")
7223  *
7224  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7225  * """
7226  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7227  */
7228 
7229  /* Python wrapper */
7230  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7231  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 ";
7232  static PyObject *__pyx_pw_8PyClical_8clifford_11reframe(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7233  PyObject *__pyx_r = 0;
7234  __Pyx_RefNannyDeclarations
7235  __Pyx_RefNannySetupContext("reframe (wrapper)", 0);
7236  __pyx_r = __pyx_pf_8PyClical_8clifford_10reframe(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7237 
7238  /* function exit code */
7239  __Pyx_RefNannyFinishContext();
7240  return __pyx_r;
7241  }
7242 
7243  static PyObject *__pyx_pf_8PyClical_8clifford_10reframe(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7244  PyObject *__pyx_v_error_msg_prefix = NULL;
7245  struct __pyx_obj_8PyClical_clifford *__pyx_v_result = NULL;
7246  PyObject *__pyx_v_err = NULL;
7247  PyObject *__pyx_r = NULL;
7248  __Pyx_RefNannyDeclarations
7249  int __pyx_t_1;
7250  int __pyx_t_2;
7251  PyObject *__pyx_t_3 = NULL;
7252  PyObject *__pyx_t_4 = NULL;
7253  PyObject *__pyx_t_5 = NULL;
7254  PyObject *__pyx_t_6 = NULL;
7255  Clifford *__pyx_t_7;
7256  int __pyx_t_8;
7257  PyObject *__pyx_t_9 = NULL;
7258  PyObject *__pyx_t_10 = NULL;
7259  PyObject *__pyx_t_11 = NULL;
7260  PyObject *__pyx_t_12 = NULL;
7261  PyObject *__pyx_t_13 = NULL;
7262  __Pyx_RefNannySetupContext("reframe", 0);
7263 
7264  /* "PyClical.pyx":658
7265  * True
7266  * """
7267  * error_msg_prefix = "Cannot reframe" # <<<<<<<<<<<<<<
7268  * if isinstance(ixt, index_set):
7269  * try:
7270  */
7271  __Pyx_INCREF(__pyx_kp_s_Cannot_reframe);
7272  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_reframe;
7273 
7274  /* "PyClical.pyx":659
7275  * """
7276  * error_msg_prefix = "Cannot reframe"
7277  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7278  * try:
7279  * result = clifford()
7280  */
7281  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ixt, __pyx_ptype_8PyClical_index_set);
7282  __pyx_t_2 = (__pyx_t_1 != 0);
7283  if (likely(__pyx_t_2)) {
7284 
7285  /* "PyClical.pyx":660
7286  * error_msg_prefix = "Cannot reframe"
7287  * if isinstance(ixt, index_set):
7288  * try: # <<<<<<<<<<<<<<
7289  * result = clifford()
7290  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7291  */
7292  {
7293  __Pyx_PyThreadState_declare
7294  __Pyx_PyThreadState_assign
7295  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
7296  __Pyx_XGOTREF(__pyx_t_3);
7297  __Pyx_XGOTREF(__pyx_t_4);
7298  __Pyx_XGOTREF(__pyx_t_5);
7299  /*try:*/ {
7300 
7301  /* "PyClical.pyx":661
7302  * if isinstance(ixt, index_set):
7303  * try:
7304  * result = clifford() # <<<<<<<<<<<<<<
7305  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7306  * except RuntimeError as err:
7307  */
7308  __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L4_error)
7309  __Pyx_GOTREF(__pyx_t_6);
7310  __pyx_v_result = ((struct __pyx_obj_8PyClical_clifford *)__pyx_t_6);
7311  __pyx_t_6 = 0;
7312 
7313  /* "PyClical.pyx":662
7314  * try:
7315  * result = clifford()
7316  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap()) # <<<<<<<<<<<<<<
7317  * except RuntimeError as err:
7318  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7319  */
7320  try {
7321  __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)));
7322  } catch(...) {
7323  __Pyx_CppExn2PyErr();
7324  __PYX_ERR(0, 662, __pyx_L4_error)
7325  }
7326  __pyx_v_result->instance = __pyx_t_7;
7327 
7328  /* "PyClical.pyx":660
7329  * error_msg_prefix = "Cannot reframe"
7330  * if isinstance(ixt, index_set):
7331  * try: # <<<<<<<<<<<<<<
7332  * result = clifford()
7333  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7334  */
7335  }
7336  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7337  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
7338  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7339  goto __pyx_L9_try_end;
7340  __pyx_L4_error:;
7341  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7342 
7343  /* "PyClical.pyx":663
7344  * result = clifford()
7345  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7346  * except RuntimeError as err: # <<<<<<<<<<<<<<
7347  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7348  * + str(ixt) + ":"
7349  */
7350  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
7351  if (__pyx_t_8) {
7352  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7353  if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 663, __pyx_L6_except_error)
7354  __Pyx_GOTREF(__pyx_t_6);
7355  __Pyx_GOTREF(__pyx_t_9);
7356  __Pyx_GOTREF(__pyx_t_10);
7357  __Pyx_INCREF(__pyx_t_9);
7358  __pyx_v_err = __pyx_t_9;
7359 
7360  /* "PyClical.pyx":664
7361  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7362  * except RuntimeError as err:
7363  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7364  * + str(ixt) + ":"
7365  * + "\n\t" + str(err))
7366  */
7367  __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)
7368  __Pyx_GOTREF(__pyx_t_11);
7369  __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)
7370  __Pyx_GOTREF(__pyx_t_12);
7371  __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L6_except_error)
7372  __Pyx_GOTREF(__pyx_t_13);
7373  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7374  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7375  __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)
7376  __Pyx_GOTREF(__pyx_t_12);
7377  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7378 
7379  /* "PyClical.pyx":665
7380  * except RuntimeError as err:
7381  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7382  * + str(ixt) + ":" # <<<<<<<<<<<<<<
7383  * + "\n\t" + str(err))
7384  * else:
7385  */
7386  __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)
7387  __Pyx_GOTREF(__pyx_t_13);
7388  __pyx_t_11 = PyNumber_Add(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 665, __pyx_L6_except_error)
7389  __Pyx_GOTREF(__pyx_t_11);
7390  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7391  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7392  __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)
7393  __Pyx_GOTREF(__pyx_t_13);
7394  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7395 
7396  /* "PyClical.pyx":666
7397  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame "
7398  * + str(ixt) + ":"
7399  * + "\n\t" + str(err)) # <<<<<<<<<<<<<<
7400  * else:
7401  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7402  */
7403  __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)
7404  __Pyx_GOTREF(__pyx_t_11);
7405  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7406  __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)
7407  __Pyx_GOTREF(__pyx_t_13);
7408  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 666, __pyx_L6_except_error)
7409  __Pyx_GOTREF(__pyx_t_12);
7410  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
7411  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7412 
7413  /* "PyClical.pyx":664
7414  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7415  * except RuntimeError as err:
7416  * raise ValueError(error_msg_prefix + " from " + str(self) + " to frame " # <<<<<<<<<<<<<<
7417  * + str(ixt) + ":"
7418  * + "\n\t" + str(err))
7419  */
7420  __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)
7421  __Pyx_GOTREF(__pyx_t_13);
7422  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
7423  __Pyx_Raise(__pyx_t_13, 0, 0, 0);
7424  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
7425  __PYX_ERR(0, 664, __pyx_L6_except_error)
7426  }
7427  goto __pyx_L6_except_error;
7428  __pyx_L6_except_error:;
7429 
7430  /* "PyClical.pyx":660
7431  * error_msg_prefix = "Cannot reframe"
7432  * if isinstance(ixt, index_set):
7433  * try: # <<<<<<<<<<<<<<
7434  * result = clifford()
7435  * result.instance = new Clifford(self.unwrap(), (<index_set>ixt).unwrap())
7436  */
7437  __Pyx_XGIVEREF(__pyx_t_3);
7438  __Pyx_XGIVEREF(__pyx_t_4);
7439  __Pyx_XGIVEREF(__pyx_t_5);
7440  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
7441  goto __pyx_L1_error;
7442  __pyx_L9_try_end:;
7443  }
7444 
7445  /* "PyClical.pyx":659
7446  * """
7447  * error_msg_prefix = "Cannot reframe"
7448  * if isinstance(ixt, index_set): # <<<<<<<<<<<<<<
7449  * try:
7450  * result = clifford()
7451  */
7452  goto __pyx_L3;
7453  }
7454 
7455  /* "PyClical.pyx":668
7456  * + "\n\t" + str(err))
7457  * else:
7458  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").") # <<<<<<<<<<<<<<
7459  * return result
7460  *
7461  */
7462  /*else*/ {
7463  __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)
7464  __Pyx_GOTREF(__pyx_t_10);
7465  __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)
7466  __Pyx_GOTREF(__pyx_t_9);
7467  __pyx_t_6 = PyNumber_Add(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7468  __Pyx_GOTREF(__pyx_t_6);
7469  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7470  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7471  __pyx_t_9 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 668, __pyx_L1_error)
7472  __Pyx_GOTREF(__pyx_t_9);
7473  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7474  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
7475  __Pyx_GOTREF(__pyx_t_6);
7476  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7477  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7478  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7479  __PYX_ERR(0, 668, __pyx_L1_error)
7480  }
7481  __pyx_L3:;
7482 
7483  /* "PyClical.pyx":669
7484  * else:
7485  * raise TypeError(error_msg_prefix + " using (" + str(type(ixt)) + ").")
7486  * return result # <<<<<<<<<<<<<<
7487  *
7488  * def __richcmp__(lhs, rhs, int op):
7489  */
7490  __Pyx_XDECREF(__pyx_r);
7491  __Pyx_INCREF(((PyObject *)__pyx_v_result));
7492  __pyx_r = ((PyObject *)__pyx_v_result);
7493  goto __pyx_L0;
7494 
7495  /* "PyClical.pyx":648
7496  * raise TypeError("Not applicable.")
7497  *
7498  * def reframe(self, ixt): # <<<<<<<<<<<<<<
7499  * """
7500  * Put self into a larger frame, containing the union of self.frame() and index set ixt.
7501  */
7502 
7503  /* function exit code */
7504  __pyx_L1_error:;
7505  __Pyx_XDECREF(__pyx_t_6);
7506  __Pyx_XDECREF(__pyx_t_9);
7507  __Pyx_XDECREF(__pyx_t_10);
7508  __Pyx_XDECREF(__pyx_t_11);
7509  __Pyx_XDECREF(__pyx_t_12);
7510  __Pyx_XDECREF(__pyx_t_13);
7511  __Pyx_AddTraceback("PyClical.clifford.reframe", __pyx_clineno, __pyx_lineno, __pyx_filename);
7512  __pyx_r = NULL;
7513  __pyx_L0:;
7514  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
7515  __Pyx_XDECREF((PyObject *)__pyx_v_result);
7516  __Pyx_XDECREF(__pyx_v_err);
7517  __Pyx_XGIVEREF(__pyx_r);
7518  __Pyx_RefNannyFinishContext();
7519  return __pyx_r;
7520  }
7521 
7522  /* "PyClical.pyx":671
7523  * return result
7524  *
7525  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7526  * """
7527  * Compare objects of type clifford.
7528  */
7529 
7530  /* Python wrapper */
7531  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op); /*proto*/
7532  static PyObject *__pyx_pw_8PyClical_8clifford_13__richcmp__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7533  PyObject *__pyx_r = 0;
7534  __Pyx_RefNannyDeclarations
7535  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
7536  __pyx_r = __pyx_pf_8PyClical_8clifford_12__richcmp__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs), ((int)__pyx_v_op));
7537 
7538  /* function exit code */
7539  __Pyx_RefNannyFinishContext();
7540  return __pyx_r;
7541  }
7542 
7543  static PyObject *__pyx_pf_8PyClical_8clifford_12__richcmp__(struct __pyx_obj_8PyClical_clifford *__pyx_v_lhs, PyObject *__pyx_v_rhs, int __pyx_v_op) {
7544  PyObject *__pyx_r = NULL;
7545  __Pyx_RefNannyDeclarations
7546  int __pyx_t_1;
7547  int __pyx_t_2;
7548  int __pyx_t_3;
7549  PyObject *__pyx_t_4 = NULL;
7550  PyObject *__pyx_t_5 = NULL;
7551  PyObject *__pyx_t_6 = NULL;
7552  __Pyx_RefNannySetupContext("__richcmp__", 0);
7553 
7554  /* "PyClical.pyx":690
7555  * True
7556  * """
7557  * if op == 2: # == # <<<<<<<<<<<<<<
7558  * if (lhs is None) or (rhs is None):
7559  * return bool(lhs is rhs)
7560  */
7561  __pyx_t_1 = ((__pyx_v_op == 2) != 0);
7562  if (__pyx_t_1) {
7563 
7564  /* "PyClical.pyx":691
7565  * """
7566  * if op == 2: # ==
7567  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7568  * return bool(lhs is rhs)
7569  * else:
7570  */
7571  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7572  __pyx_t_3 = (__pyx_t_2 != 0);
7573  if (!__pyx_t_3) {
7574  } else {
7575  __pyx_t_1 = __pyx_t_3;
7576  goto __pyx_L5_bool_binop_done;
7577  }
7578  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7579  __pyx_t_2 = (__pyx_t_3 != 0);
7580  __pyx_t_1 = __pyx_t_2;
7581  __pyx_L5_bool_binop_done:;
7582  if (__pyx_t_1) {
7583 
7584  /* "PyClical.pyx":692
7585  * if op == 2: # ==
7586  * if (lhs is None) or (rhs is None):
7587  * return bool(lhs is rhs) # <<<<<<<<<<<<<<
7588  * else:
7589  * return bool( toClifford(lhs) == toClifford(rhs) )
7590  */
7591  __Pyx_XDECREF(__pyx_r);
7592  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7593  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error)
7594  __Pyx_GOTREF(__pyx_t_4);
7595  __pyx_r = __pyx_t_4;
7596  __pyx_t_4 = 0;
7597  goto __pyx_L0;
7598 
7599  /* "PyClical.pyx":691
7600  * """
7601  * if op == 2: # ==
7602  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7603  * return bool(lhs is rhs)
7604  * else:
7605  */
7606  }
7607 
7608  /* "PyClical.pyx":694
7609  * return bool(lhs is rhs)
7610  * else:
7611  * return bool( toClifford(lhs) == toClifford(rhs) ) # <<<<<<<<<<<<<<
7612  * elif op == 3: # !=
7613  * if (lhs is None) or (rhs is None):
7614  */
7615  /*else*/ {
7616  __Pyx_XDECREF(__pyx_r);
7617  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) == __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7618  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
7619  __Pyx_GOTREF(__pyx_t_4);
7620  __pyx_r = __pyx_t_4;
7621  __pyx_t_4 = 0;
7622  goto __pyx_L0;
7623  }
7624 
7625  /* "PyClical.pyx":690
7626  * True
7627  * """
7628  * if op == 2: # == # <<<<<<<<<<<<<<
7629  * if (lhs is None) or (rhs is None):
7630  * return bool(lhs is rhs)
7631  */
7632  }
7633 
7634  /* "PyClical.pyx":695
7635  * else:
7636  * return bool( toClifford(lhs) == toClifford(rhs) )
7637  * elif op == 3: # != # <<<<<<<<<<<<<<
7638  * if (lhs is None) or (rhs is None):
7639  * return not bool(lhs is rhs)
7640  */
7641  __pyx_t_1 = ((__pyx_v_op == 3) != 0);
7642  if (__pyx_t_1) {
7643 
7644  /* "PyClical.pyx":696
7645  * return bool( toClifford(lhs) == toClifford(rhs) )
7646  * elif op == 3: # !=
7647  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7648  * return not bool(lhs is rhs)
7649  * else:
7650  */
7651  __pyx_t_2 = (((PyObject *)__pyx_v_lhs) == Py_None);
7652  __pyx_t_3 = (__pyx_t_2 != 0);
7653  if (!__pyx_t_3) {
7654  } else {
7655  __pyx_t_1 = __pyx_t_3;
7656  goto __pyx_L8_bool_binop_done;
7657  }
7658  __pyx_t_3 = (__pyx_v_rhs == Py_None);
7659  __pyx_t_2 = (__pyx_t_3 != 0);
7660  __pyx_t_1 = __pyx_t_2;
7661  __pyx_L8_bool_binop_done:;
7662  if (__pyx_t_1) {
7663 
7664  /* "PyClical.pyx":697
7665  * elif op == 3: # !=
7666  * if (lhs is None) or (rhs is None):
7667  * return not bool(lhs is rhs) # <<<<<<<<<<<<<<
7668  * else:
7669  * return bool( toClifford(lhs) != toClifford(rhs) )
7670  */
7671  __Pyx_XDECREF(__pyx_r);
7672  __pyx_t_1 = (((PyObject *)__pyx_v_lhs) == __pyx_v_rhs);
7673  __pyx_t_4 = __Pyx_PyBool_FromLong((!((!(!__pyx_t_1)) != 0))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
7674  __Pyx_GOTREF(__pyx_t_4);
7675  __pyx_r = __pyx_t_4;
7676  __pyx_t_4 = 0;
7677  goto __pyx_L0;
7678 
7679  /* "PyClical.pyx":696
7680  * return bool( toClifford(lhs) == toClifford(rhs) )
7681  * elif op == 3: # !=
7682  * if (lhs is None) or (rhs is None): # <<<<<<<<<<<<<<
7683  * return not bool(lhs is rhs)
7684  * else:
7685  */
7686  }
7687 
7688  /* "PyClical.pyx":699
7689  * return not bool(lhs is rhs)
7690  * else:
7691  * return bool( toClifford(lhs) != toClifford(rhs) ) # <<<<<<<<<<<<<<
7692  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7693  * raise TypeError("This comparison operator is not implemented for "
7694  */
7695  /*else*/ {
7696  __Pyx_XDECREF(__pyx_r);
7697  __pyx_t_1 = (__pyx_f_8PyClical_toClifford(((PyObject *)__pyx_v_lhs)) != __pyx_f_8PyClical_toClifford(__pyx_v_rhs));
7698  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error)
7699  __Pyx_GOTREF(__pyx_t_4);
7700  __pyx_r = __pyx_t_4;
7701  __pyx_t_4 = 0;
7702  goto __pyx_L0;
7703  }
7704 
7705  /* "PyClical.pyx":695
7706  * else:
7707  * return bool( toClifford(lhs) == toClifford(rhs) )
7708  * elif op == 3: # != # <<<<<<<<<<<<<<
7709  * if (lhs is None) or (rhs is None):
7710  * return not bool(lhs is rhs)
7711  */
7712  }
7713 
7714  /* "PyClical.pyx":700
7715  * else:
7716  * return bool( toClifford(lhs) != toClifford(rhs) )
7717  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7718  * raise TypeError("This comparison operator is not implemented for "
7719  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7720  */
7721  __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_lhs), __pyx_ptype_8PyClical_clifford);
7722  __pyx_t_3 = (__pyx_t_2 != 0);
7723  if (!__pyx_t_3) {
7724  } else {
7725  __pyx_t_1 = __pyx_t_3;
7726  goto __pyx_L10_bool_binop_done;
7727  }
7728  __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_rhs, __pyx_ptype_8PyClical_clifford);
7729  __pyx_t_2 = (__pyx_t_3 != 0);
7730  __pyx_t_1 = __pyx_t_2;
7731  __pyx_L10_bool_binop_done:;
7732  if (unlikely(__pyx_t_1)) {
7733 
7734  /* "PyClical.pyx":702
7735  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7736  * raise TypeError("This comparison operator is not implemented for "
7737  * + str(type(lhs)) + ", " + str(type(rhs)) + ".") # <<<<<<<<<<<<<<
7738  * else:
7739  * return NotImplemented
7740  */
7741  __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)
7742  __Pyx_GOTREF(__pyx_t_4);
7743  __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)
7744  __Pyx_GOTREF(__pyx_t_5);
7745  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7746  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
7747  __Pyx_GOTREF(__pyx_t_4);
7748  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7749  __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)
7750  __Pyx_GOTREF(__pyx_t_5);
7751  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 702, __pyx_L1_error)
7752  __Pyx_GOTREF(__pyx_t_6);
7753  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7754  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7755  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error)
7756  __Pyx_GOTREF(__pyx_t_5);
7757  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7758 
7759  /* "PyClical.pyx":701
7760  * return bool( toClifford(lhs) != toClifford(rhs) )
7761  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford):
7762  * raise TypeError("This comparison operator is not implemented for " # <<<<<<<<<<<<<<
7763  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7764  * else:
7765  */
7766  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error)
7767  __Pyx_GOTREF(__pyx_t_6);
7768  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7769  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
7770  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7771  __PYX_ERR(0, 701, __pyx_L1_error)
7772 
7773  /* "PyClical.pyx":700
7774  * else:
7775  * return bool( toClifford(lhs) != toClifford(rhs) )
7776  * elif isinstance(lhs, clifford) or isinstance(rhs, clifford): # <<<<<<<<<<<<<<
7777  * raise TypeError("This comparison operator is not implemented for "
7778  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7779  */
7780  }
7781 
7782  /* "PyClical.pyx":704
7783  * + str(type(lhs)) + ", " + str(type(rhs)) + ".")
7784  * else:
7785  * return NotImplemented # <<<<<<<<<<<<<<
7786  *
7787  * def __getitem__(self, ixt):
7788  */
7789  /*else*/ {
7790  __Pyx_XDECREF(__pyx_r);
7791  __Pyx_INCREF(__pyx_builtin_NotImplemented);
7792  __pyx_r = __pyx_builtin_NotImplemented;
7793  goto __pyx_L0;
7794  }
7795 
7796  /* "PyClical.pyx":671
7797  * return result
7798  *
7799  * def __richcmp__(lhs, rhs, int op): # <<<<<<<<<<<<<<
7800  * """
7801  * Compare objects of type clifford.
7802  */
7803 
7804  /* function exit code */
7805  __pyx_L1_error:;
7806  __Pyx_XDECREF(__pyx_t_4);
7807  __Pyx_XDECREF(__pyx_t_5);
7808  __Pyx_XDECREF(__pyx_t_6);
7809  __Pyx_AddTraceback("PyClical.clifford.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7810  __pyx_r = NULL;
7811  __pyx_L0:;
7812  __Pyx_XGIVEREF(__pyx_r);
7813  __Pyx_RefNannyFinishContext();
7814  return __pyx_r;
7815  }
7816 
7817  /* "PyClical.pyx":706
7818  * return NotImplemented
7819  *
7820  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7821  * """
7822  * Subscripting: map from index set to scalar coordinate.
7823  */
7824 
7825  /* Python wrapper */
7826  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt); /*proto*/
7827  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 ";
7828  #if CYTHON_COMPILING_IN_CPYTHON
7829  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
7830  #endif
7831  static PyObject *__pyx_pw_8PyClical_8clifford_15__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ixt) {
7832  PyObject *__pyx_r = 0;
7833  __Pyx_RefNannyDeclarations
7834  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
7835  __pyx_r = __pyx_pf_8PyClical_8clifford_14__getitem__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_ixt));
7836 
7837  /* function exit code */
7838  __Pyx_RefNannyFinishContext();
7839  return __pyx_r;
7840  }
7841 
7842  static PyObject *__pyx_pf_8PyClical_8clifford_14__getitem__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_ixt) {
7843  PyObject *__pyx_r = NULL;
7844  __Pyx_RefNannyDeclarations
7845  PyObject *__pyx_t_1 = NULL;
7846  __Pyx_RefNannySetupContext("__getitem__", 0);
7847 
7848  /* "PyClical.pyx":719
7849  * 2.0
7850  * """
7851  * return self.instance.getitem(toIndexSet(ixt)) # <<<<<<<<<<<<<<
7852  *
7853  * def __neg__(self):
7854  */
7855  __Pyx_XDECREF(__pyx_r);
7856  __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)
7857  __Pyx_GOTREF(__pyx_t_1);
7858  __pyx_r = __pyx_t_1;
7859  __pyx_t_1 = 0;
7860  goto __pyx_L0;
7861 
7862  /* "PyClical.pyx":706
7863  * return NotImplemented
7864  *
7865  * def __getitem__(self, ixt): # <<<<<<<<<<<<<<
7866  * """
7867  * Subscripting: map from index set to scalar coordinate.
7868  */
7869 
7870  /* function exit code */
7871  __pyx_L1_error:;
7872  __Pyx_XDECREF(__pyx_t_1);
7873  __Pyx_AddTraceback("PyClical.clifford.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7874  __pyx_r = NULL;
7875  __pyx_L0:;
7876  __Pyx_XGIVEREF(__pyx_r);
7877  __Pyx_RefNannyFinishContext();
7878  return __pyx_r;
7879  }
7880 
7881  /* "PyClical.pyx":721
7882  * return self.instance.getitem(toIndexSet(ixt))
7883  *
7884  * def __neg__(self): # <<<<<<<<<<<<<<
7885  * """
7886  * Unary -.
7887  */
7888 
7889  /* Python wrapper */
7890  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self); /*proto*/
7891  static char __pyx_doc_8PyClical_8clifford_16__neg__[] = "\n Unary -.\n\n >>> print -clifford(\"{1}\")\n -{1}\n ";
7892  #if CYTHON_COMPILING_IN_CPYTHON
7893  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_16__neg__;
7894  #endif
7895  static PyObject *__pyx_pw_8PyClical_8clifford_17__neg__(PyObject *__pyx_v_self) {
7896  PyObject *__pyx_r = 0;
7897  __Pyx_RefNannyDeclarations
7898  __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
7899  __pyx_r = __pyx_pf_8PyClical_8clifford_16__neg__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7900 
7901  /* function exit code */
7902  __Pyx_RefNannyFinishContext();
7903  return __pyx_r;
7904  }
7905 
7906  static PyObject *__pyx_pf_8PyClical_8clifford_16__neg__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7907  PyObject *__pyx_r = NULL;
7908  __Pyx_RefNannyDeclarations
7909  PyObject *__pyx_t_1 = NULL;
7910  PyObject *__pyx_t_2 = NULL;
7911  __Pyx_RefNannySetupContext("__neg__", 0);
7912 
7913  /* "PyClical.pyx":728
7914  * -{1}
7915  * """
7916  * return clifford().wrap( self.instance.neg() ) # <<<<<<<<<<<<<<
7917  *
7918  * def __pos__(self):
7919  */
7920  __Pyx_XDECREF(__pyx_r);
7921  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
7922  __Pyx_GOTREF(__pyx_t_1);
7923  __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)
7924  __Pyx_GOTREF(__pyx_t_2);
7925  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7926  __pyx_r = __pyx_t_2;
7927  __pyx_t_2 = 0;
7928  goto __pyx_L0;
7929 
7930  /* "PyClical.pyx":721
7931  * return self.instance.getitem(toIndexSet(ixt))
7932  *
7933  * def __neg__(self): # <<<<<<<<<<<<<<
7934  * """
7935  * Unary -.
7936  */
7937 
7938  /* function exit code */
7939  __pyx_L1_error:;
7940  __Pyx_XDECREF(__pyx_t_1);
7941  __Pyx_XDECREF(__pyx_t_2);
7942  __Pyx_AddTraceback("PyClical.clifford.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7943  __pyx_r = NULL;
7944  __pyx_L0:;
7945  __Pyx_XGIVEREF(__pyx_r);
7946  __Pyx_RefNannyFinishContext();
7947  return __pyx_r;
7948  }
7949 
7950  /* "PyClical.pyx":730
7951  * return clifford().wrap( self.instance.neg() )
7952  *
7953  * def __pos__(self): # <<<<<<<<<<<<<<
7954  * """
7955  * Unary +.
7956  */
7957 
7958  /* Python wrapper */
7959  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self); /*proto*/
7960  static char __pyx_doc_8PyClical_8clifford_18__pos__[] = "\n Unary +.\n\n >>> print +clifford(\"{1}\")\n {1}\n ";
7961  #if CYTHON_COMPILING_IN_CPYTHON
7962  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_18__pos__;
7963  #endif
7964  static PyObject *__pyx_pw_8PyClical_8clifford_19__pos__(PyObject *__pyx_v_self) {
7965  PyObject *__pyx_r = 0;
7966  __Pyx_RefNannyDeclarations
7967  __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
7968  __pyx_r = __pyx_pf_8PyClical_8clifford_18__pos__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
7969 
7970  /* function exit code */
7971  __Pyx_RefNannyFinishContext();
7972  return __pyx_r;
7973  }
7974 
7975  static PyObject *__pyx_pf_8PyClical_8clifford_18__pos__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
7976  PyObject *__pyx_r = NULL;
7977  __Pyx_RefNannyDeclarations
7978  PyObject *__pyx_t_1 = NULL;
7979  __Pyx_RefNannySetupContext("__pos__", 0);
7980 
7981  /* "PyClical.pyx":737
7982  * {1}
7983  * """
7984  * return clifford(self) # <<<<<<<<<<<<<<
7985  *
7986  * def __add__(lhs, rhs):
7987  */
7988  __Pyx_XDECREF(__pyx_r);
7989  __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)
7990  __Pyx_GOTREF(__pyx_t_1);
7991  __pyx_r = __pyx_t_1;
7992  __pyx_t_1 = 0;
7993  goto __pyx_L0;
7994 
7995  /* "PyClical.pyx":730
7996  * return clifford().wrap( self.instance.neg() )
7997  *
7998  * def __pos__(self): # <<<<<<<<<<<<<<
7999  * """
8000  * Unary +.
8001  */
8002 
8003  /* function exit code */
8004  __pyx_L1_error:;
8005  __Pyx_XDECREF(__pyx_t_1);
8006  __Pyx_AddTraceback("PyClical.clifford.__pos__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8007  __pyx_r = NULL;
8008  __pyx_L0:;
8009  __Pyx_XGIVEREF(__pyx_r);
8010  __Pyx_RefNannyFinishContext();
8011  return __pyx_r;
8012  }
8013 
8014  /* "PyClical.pyx":739
8015  * return clifford(self)
8016  *
8017  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8018  * """
8019  * Geometric sum.
8020  */
8021 
8022  /* Python wrapper */
8023  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8024  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 ";
8025  #if CYTHON_COMPILING_IN_CPYTHON
8026  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_20__add__;
8027  #endif
8028  static PyObject *__pyx_pw_8PyClical_8clifford_21__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8029  PyObject *__pyx_r = 0;
8030  __Pyx_RefNannyDeclarations
8031  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
8032  __pyx_r = __pyx_pf_8PyClical_8clifford_20__add__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8033 
8034  /* function exit code */
8035  __Pyx_RefNannyFinishContext();
8036  return __pyx_r;
8037  }
8038 
8039  static PyObject *__pyx_pf_8PyClical_8clifford_20__add__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8040  PyObject *__pyx_r = NULL;
8041  __Pyx_RefNannyDeclarations
8042  PyObject *__pyx_t_1 = NULL;
8043  PyObject *__pyx_t_2 = NULL;
8044  __Pyx_RefNannySetupContext("__add__", 0);
8045 
8046  /* "PyClical.pyx":748
8047  * {1}+{2}
8048  * """
8049  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) ) # <<<<<<<<<<<<<<
8050  *
8051  * def __iadd__(self, rhs):
8052  */
8053  __Pyx_XDECREF(__pyx_r);
8054  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
8055  __Pyx_GOTREF(__pyx_t_1);
8056  __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)
8057  __Pyx_GOTREF(__pyx_t_2);
8058  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8059  __pyx_r = __pyx_t_2;
8060  __pyx_t_2 = 0;
8061  goto __pyx_L0;
8062 
8063  /* "PyClical.pyx":739
8064  * return clifford(self)
8065  *
8066  * def __add__(lhs, rhs): # <<<<<<<<<<<<<<
8067  * """
8068  * Geometric sum.
8069  */
8070 
8071  /* function exit code */
8072  __pyx_L1_error:;
8073  __Pyx_XDECREF(__pyx_t_1);
8074  __Pyx_XDECREF(__pyx_t_2);
8075  __Pyx_AddTraceback("PyClical.clifford.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8076  __pyx_r = NULL;
8077  __pyx_L0:;
8078  __Pyx_XGIVEREF(__pyx_r);
8079  __Pyx_RefNannyFinishContext();
8080  return __pyx_r;
8081  }
8082 
8083  /* "PyClical.pyx":750
8084  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8085  *
8086  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8087  * """
8088  * Geometric sum.
8089  */
8090 
8091  /* Python wrapper */
8092  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8093  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 ";
8094  #if CYTHON_COMPILING_IN_CPYTHON
8095  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
8096  #endif
8097  static PyObject *__pyx_pw_8PyClical_8clifford_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8098  PyObject *__pyx_r = 0;
8099  __Pyx_RefNannyDeclarations
8100  __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
8101  __pyx_r = __pyx_pf_8PyClical_8clifford_22__iadd__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8102 
8103  /* function exit code */
8104  __Pyx_RefNannyFinishContext();
8105  return __pyx_r;
8106  }
8107 
8108  static PyObject *__pyx_pf_8PyClical_8clifford_22__iadd__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8109  PyObject *__pyx_r = NULL;
8110  __Pyx_RefNannyDeclarations
8111  PyObject *__pyx_t_1 = NULL;
8112  __Pyx_RefNannySetupContext("__iadd__", 0);
8113 
8114  /* "PyClical.pyx":757
8115  * 1+{2}
8116  * """
8117  * return self.wrap( self.unwrap() + toClifford(rhs) ) # <<<<<<<<<<<<<<
8118  *
8119  * def __sub__(lhs, rhs):
8120  */
8121  __Pyx_XDECREF(__pyx_r);
8122  __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)
8123  __Pyx_GOTREF(__pyx_t_1);
8124  __pyx_r = __pyx_t_1;
8125  __pyx_t_1 = 0;
8126  goto __pyx_L0;
8127 
8128  /* "PyClical.pyx":750
8129  * return clifford().wrap( toClifford(lhs) + toClifford(rhs) )
8130  *
8131  * def __iadd__(self, rhs): # <<<<<<<<<<<<<<
8132  * """
8133  * Geometric sum.
8134  */
8135 
8136  /* function exit code */
8137  __pyx_L1_error:;
8138  __Pyx_XDECREF(__pyx_t_1);
8139  __Pyx_AddTraceback("PyClical.clifford.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8140  __pyx_r = NULL;
8141  __pyx_L0:;
8142  __Pyx_XGIVEREF(__pyx_r);
8143  __Pyx_RefNannyFinishContext();
8144  return __pyx_r;
8145  }
8146 
8147  /* "PyClical.pyx":759
8148  * return self.wrap( self.unwrap() + toClifford(rhs) )
8149  *
8150  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8151  * """
8152  * Geometric difference.
8153  */
8154 
8155  /* Python wrapper */
8156  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8157  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 ";
8158  #if CYTHON_COMPILING_IN_CPYTHON
8159  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_24__sub__;
8160  #endif
8161  static PyObject *__pyx_pw_8PyClical_8clifford_25__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8162  PyObject *__pyx_r = 0;
8163  __Pyx_RefNannyDeclarations
8164  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
8165  __pyx_r = __pyx_pf_8PyClical_8clifford_24__sub__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8166 
8167  /* function exit code */
8168  __Pyx_RefNannyFinishContext();
8169  return __pyx_r;
8170  }
8171 
8172  static PyObject *__pyx_pf_8PyClical_8clifford_24__sub__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8173  PyObject *__pyx_r = NULL;
8174  __Pyx_RefNannyDeclarations
8175  PyObject *__pyx_t_1 = NULL;
8176  PyObject *__pyx_t_2 = NULL;
8177  __Pyx_RefNannySetupContext("__sub__", 0);
8178 
8179  /* "PyClical.pyx":768
8180  * {1}-{2}
8181  * """
8182  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) ) # <<<<<<<<<<<<<<
8183  *
8184  * def __isub__(self, rhs):
8185  */
8186  __Pyx_XDECREF(__pyx_r);
8187  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error)
8188  __Pyx_GOTREF(__pyx_t_1);
8189  __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)
8190  __Pyx_GOTREF(__pyx_t_2);
8191  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8192  __pyx_r = __pyx_t_2;
8193  __pyx_t_2 = 0;
8194  goto __pyx_L0;
8195 
8196  /* "PyClical.pyx":759
8197  * return self.wrap( self.unwrap() + toClifford(rhs) )
8198  *
8199  * def __sub__(lhs, rhs): # <<<<<<<<<<<<<<
8200  * """
8201  * Geometric difference.
8202  */
8203 
8204  /* function exit code */
8205  __pyx_L1_error:;
8206  __Pyx_XDECREF(__pyx_t_1);
8207  __Pyx_XDECREF(__pyx_t_2);
8208  __Pyx_AddTraceback("PyClical.clifford.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8209  __pyx_r = NULL;
8210  __pyx_L0:;
8211  __Pyx_XGIVEREF(__pyx_r);
8212  __Pyx_RefNannyFinishContext();
8213  return __pyx_r;
8214  }
8215 
8216  /* "PyClical.pyx":770
8217  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8218  *
8219  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8220  * """
8221  * Geometric difference.
8222  */
8223 
8224  /* Python wrapper */
8225  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8226  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 ";
8227  #if CYTHON_COMPILING_IN_CPYTHON
8228  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_26__isub__;
8229  #endif
8230  static PyObject *__pyx_pw_8PyClical_8clifford_27__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8231  PyObject *__pyx_r = 0;
8232  __Pyx_RefNannyDeclarations
8233  __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
8234  __pyx_r = __pyx_pf_8PyClical_8clifford_26__isub__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8235 
8236  /* function exit code */
8237  __Pyx_RefNannyFinishContext();
8238  return __pyx_r;
8239  }
8240 
8241  static PyObject *__pyx_pf_8PyClical_8clifford_26__isub__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8242  PyObject *__pyx_r = NULL;
8243  __Pyx_RefNannyDeclarations
8244  PyObject *__pyx_t_1 = NULL;
8245  __Pyx_RefNannySetupContext("__isub__", 0);
8246 
8247  /* "PyClical.pyx":777
8248  * 1-{2}
8249  * """
8250  * return self.wrap( self.unwrap() - toClifford(rhs) ) # <<<<<<<<<<<<<<
8251  *
8252  * def __mul__(lhs, rhs):
8253  */
8254  __Pyx_XDECREF(__pyx_r);
8255  __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)
8256  __Pyx_GOTREF(__pyx_t_1);
8257  __pyx_r = __pyx_t_1;
8258  __pyx_t_1 = 0;
8259  goto __pyx_L0;
8260 
8261  /* "PyClical.pyx":770
8262  * return clifford().wrap( toClifford(lhs) - toClifford(rhs) )
8263  *
8264  * def __isub__(self, rhs): # <<<<<<<<<<<<<<
8265  * """
8266  * Geometric difference.
8267  */
8268 
8269  /* function exit code */
8270  __pyx_L1_error:;
8271  __Pyx_XDECREF(__pyx_t_1);
8272  __Pyx_AddTraceback("PyClical.clifford.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8273  __pyx_r = NULL;
8274  __pyx_L0:;
8275  __Pyx_XGIVEREF(__pyx_r);
8276  __Pyx_RefNannyFinishContext();
8277  return __pyx_r;
8278  }
8279 
8280  /* "PyClical.pyx":779
8281  * return self.wrap( self.unwrap() - toClifford(rhs) )
8282  *
8283  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8284  * """
8285  * Geometric product.
8286  */
8287 
8288  /* Python wrapper */
8289  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8290  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 ";
8291  #if CYTHON_COMPILING_IN_CPYTHON
8292  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_28__mul__;
8293  #endif
8294  static PyObject *__pyx_pw_8PyClical_8clifford_29__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8295  PyObject *__pyx_r = 0;
8296  __Pyx_RefNannyDeclarations
8297  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
8298  __pyx_r = __pyx_pf_8PyClical_8clifford_28__mul__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8299 
8300  /* function exit code */
8301  __Pyx_RefNannyFinishContext();
8302  return __pyx_r;
8303  }
8304 
8305  static PyObject *__pyx_pf_8PyClical_8clifford_28__mul__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8306  PyObject *__pyx_r = NULL;
8307  __Pyx_RefNannyDeclarations
8308  PyObject *__pyx_t_1 = NULL;
8309  PyObject *__pyx_t_2 = NULL;
8310  __Pyx_RefNannySetupContext("__mul__", 0);
8311 
8312  /* "PyClical.pyx":790
8313  * {2}
8314  * """
8315  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) ) # <<<<<<<<<<<<<<
8316  *
8317  * def __imul__(self, rhs):
8318  */
8319  __Pyx_XDECREF(__pyx_r);
8320  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
8321  __Pyx_GOTREF(__pyx_t_1);
8322  __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)
8323  __Pyx_GOTREF(__pyx_t_2);
8324  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8325  __pyx_r = __pyx_t_2;
8326  __pyx_t_2 = 0;
8327  goto __pyx_L0;
8328 
8329  /* "PyClical.pyx":779
8330  * return self.wrap( self.unwrap() - toClifford(rhs) )
8331  *
8332  * def __mul__(lhs, rhs): # <<<<<<<<<<<<<<
8333  * """
8334  * Geometric product.
8335  */
8336 
8337  /* function exit code */
8338  __pyx_L1_error:;
8339  __Pyx_XDECREF(__pyx_t_1);
8340  __Pyx_XDECREF(__pyx_t_2);
8341  __Pyx_AddTraceback("PyClical.clifford.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8342  __pyx_r = NULL;
8343  __pyx_L0:;
8344  __Pyx_XGIVEREF(__pyx_r);
8345  __Pyx_RefNannyFinishContext();
8346  return __pyx_r;
8347  }
8348 
8349  /* "PyClical.pyx":792
8350  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8351  *
8352  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8353  * """
8354  * Geometric product.
8355  */
8356 
8357  /* Python wrapper */
8358  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8359  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 ";
8360  #if CYTHON_COMPILING_IN_CPYTHON
8361  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_30__imul__;
8362  #endif
8363  static PyObject *__pyx_pw_8PyClical_8clifford_31__imul__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8364  PyObject *__pyx_r = 0;
8365  __Pyx_RefNannyDeclarations
8366  __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
8367  __pyx_r = __pyx_pf_8PyClical_8clifford_30__imul__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8368 
8369  /* function exit code */
8370  __Pyx_RefNannyFinishContext();
8371  return __pyx_r;
8372  }
8373 
8374  static PyObject *__pyx_pf_8PyClical_8clifford_30__imul__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8375  PyObject *__pyx_r = NULL;
8376  __Pyx_RefNannyDeclarations
8377  PyObject *__pyx_t_1 = NULL;
8378  __Pyx_RefNannySetupContext("__imul__", 0);
8379 
8380  /* "PyClical.pyx":803
8381  * {2}
8382  * """
8383  * return self.wrap( self.unwrap() * toClifford(rhs) ) # <<<<<<<<<<<<<<
8384  *
8385  * def __mod__(lhs, rhs):
8386  */
8387  __Pyx_XDECREF(__pyx_r);
8388  __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)
8389  __Pyx_GOTREF(__pyx_t_1);
8390  __pyx_r = __pyx_t_1;
8391  __pyx_t_1 = 0;
8392  goto __pyx_L0;
8393 
8394  /* "PyClical.pyx":792
8395  * return clifford().wrap( toClifford(lhs) * toClifford(rhs) )
8396  *
8397  * def __imul__(self, rhs): # <<<<<<<<<<<<<<
8398  * """
8399  * Geometric product.
8400  */
8401 
8402  /* function exit code */
8403  __pyx_L1_error:;
8404  __Pyx_XDECREF(__pyx_t_1);
8405  __Pyx_AddTraceback("PyClical.clifford.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8406  __pyx_r = NULL;
8407  __pyx_L0:;
8408  __Pyx_XGIVEREF(__pyx_r);
8409  __Pyx_RefNannyFinishContext();
8410  return __pyx_r;
8411  }
8412 
8413  /* "PyClical.pyx":805
8414  * return self.wrap( self.unwrap() * toClifford(rhs) )
8415  *
8416  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8417  * """
8418  * Contraction.
8419  */
8420 
8421  /* Python wrapper */
8422  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8423  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 ";
8424  #if CYTHON_COMPILING_IN_CPYTHON
8425  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_32__mod__;
8426  #endif
8427  static PyObject *__pyx_pw_8PyClical_8clifford_33__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8428  PyObject *__pyx_r = 0;
8429  __Pyx_RefNannyDeclarations
8430  __Pyx_RefNannySetupContext("__mod__ (wrapper)", 0);
8431  __pyx_r = __pyx_pf_8PyClical_8clifford_32__mod__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8432 
8433  /* function exit code */
8434  __Pyx_RefNannyFinishContext();
8435  return __pyx_r;
8436  }
8437 
8438  static PyObject *__pyx_pf_8PyClical_8clifford_32__mod__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8439  PyObject *__pyx_r = NULL;
8440  __Pyx_RefNannyDeclarations
8441  PyObject *__pyx_t_1 = NULL;
8442  PyObject *__pyx_t_2 = NULL;
8443  __Pyx_RefNannySetupContext("__mod__", 0);
8444 
8445  /* "PyClical.pyx":818
8446  * {2}
8447  * """
8448  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) ) # <<<<<<<<<<<<<<
8449  *
8450  * def __imod__(self, rhs):
8451  */
8452  __Pyx_XDECREF(__pyx_r);
8453  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
8454  __Pyx_GOTREF(__pyx_t_1);
8455  __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)
8456  __Pyx_GOTREF(__pyx_t_2);
8457  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8458  __pyx_r = __pyx_t_2;
8459  __pyx_t_2 = 0;
8460  goto __pyx_L0;
8461 
8462  /* "PyClical.pyx":805
8463  * return self.wrap( self.unwrap() * toClifford(rhs) )
8464  *
8465  * def __mod__(lhs, rhs): # <<<<<<<<<<<<<<
8466  * """
8467  * Contraction.
8468  */
8469 
8470  /* function exit code */
8471  __pyx_L1_error:;
8472  __Pyx_XDECREF(__pyx_t_1);
8473  __Pyx_XDECREF(__pyx_t_2);
8474  __Pyx_AddTraceback("PyClical.clifford.__mod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8475  __pyx_r = NULL;
8476  __pyx_L0:;
8477  __Pyx_XGIVEREF(__pyx_r);
8478  __Pyx_RefNannyFinishContext();
8479  return __pyx_r;
8480  }
8481 
8482  /* "PyClical.pyx":820
8483  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8484  *
8485  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8486  * """
8487  * Contraction.
8488  */
8489 
8490  /* Python wrapper */
8491  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8492  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 ";
8493  #if CYTHON_COMPILING_IN_CPYTHON
8494  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_34__imod__;
8495  #endif
8496  static PyObject *__pyx_pw_8PyClical_8clifford_35__imod__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8497  PyObject *__pyx_r = 0;
8498  __Pyx_RefNannyDeclarations
8499  __Pyx_RefNannySetupContext("__imod__ (wrapper)", 0);
8500  __pyx_r = __pyx_pf_8PyClical_8clifford_34__imod__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8501 
8502  /* function exit code */
8503  __Pyx_RefNannyFinishContext();
8504  return __pyx_r;
8505  }
8506 
8507  static PyObject *__pyx_pf_8PyClical_8clifford_34__imod__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8508  PyObject *__pyx_r = NULL;
8509  __Pyx_RefNannyDeclarations
8510  PyObject *__pyx_t_1 = NULL;
8511  __Pyx_RefNannySetupContext("__imod__", 0);
8512 
8513  /* "PyClical.pyx":833
8514  * {2}
8515  * """
8516  * return self.wrap( self.unwrap() % toClifford(rhs) ) # <<<<<<<<<<<<<<
8517  *
8518  * def __and__(lhs, rhs):
8519  */
8520  __Pyx_XDECREF(__pyx_r);
8521  __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)
8522  __Pyx_GOTREF(__pyx_t_1);
8523  __pyx_r = __pyx_t_1;
8524  __pyx_t_1 = 0;
8525  goto __pyx_L0;
8526 
8527  /* "PyClical.pyx":820
8528  * return clifford().wrap( toClifford(lhs) % toClifford(rhs) )
8529  *
8530  * def __imod__(self, rhs): # <<<<<<<<<<<<<<
8531  * """
8532  * Contraction.
8533  */
8534 
8535  /* function exit code */
8536  __pyx_L1_error:;
8537  __Pyx_XDECREF(__pyx_t_1);
8538  __Pyx_AddTraceback("PyClical.clifford.__imod__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8539  __pyx_r = NULL;
8540  __pyx_L0:;
8541  __Pyx_XGIVEREF(__pyx_r);
8542  __Pyx_RefNannyFinishContext();
8543  return __pyx_r;
8544  }
8545 
8546  /* "PyClical.pyx":835
8547  * return self.wrap( self.unwrap() % toClifford(rhs) )
8548  *
8549  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8550  * """
8551  * Inner product.
8552  */
8553 
8554  /* Python wrapper */
8555  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8556  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 ";
8557  #if CYTHON_COMPILING_IN_CPYTHON
8558  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_36__and__;
8559  #endif
8560  static PyObject *__pyx_pw_8PyClical_8clifford_37__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8561  PyObject *__pyx_r = 0;
8562  __Pyx_RefNannyDeclarations
8563  __Pyx_RefNannySetupContext("__and__ (wrapper)", 0);
8564  __pyx_r = __pyx_pf_8PyClical_8clifford_36__and__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8565 
8566  /* function exit code */
8567  __Pyx_RefNannyFinishContext();
8568  return __pyx_r;
8569  }
8570 
8571  static PyObject *__pyx_pf_8PyClical_8clifford_36__and__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8572  PyObject *__pyx_r = NULL;
8573  __Pyx_RefNannyDeclarations
8574  PyObject *__pyx_t_1 = NULL;
8575  PyObject *__pyx_t_2 = NULL;
8576  __Pyx_RefNannySetupContext("__and__", 0);
8577 
8578  /* "PyClical.pyx":848
8579  * {2}
8580  * """
8581  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) ) # <<<<<<<<<<<<<<
8582  *
8583  * def __iand__(self, rhs):
8584  */
8585  __Pyx_XDECREF(__pyx_r);
8586  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
8587  __Pyx_GOTREF(__pyx_t_1);
8588  __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)
8589  __Pyx_GOTREF(__pyx_t_2);
8590  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8591  __pyx_r = __pyx_t_2;
8592  __pyx_t_2 = 0;
8593  goto __pyx_L0;
8594 
8595  /* "PyClical.pyx":835
8596  * return self.wrap( self.unwrap() % toClifford(rhs) )
8597  *
8598  * def __and__(lhs, rhs): # <<<<<<<<<<<<<<
8599  * """
8600  * Inner product.
8601  */
8602 
8603  /* function exit code */
8604  __pyx_L1_error:;
8605  __Pyx_XDECREF(__pyx_t_1);
8606  __Pyx_XDECREF(__pyx_t_2);
8607  __Pyx_AddTraceback("PyClical.clifford.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8608  __pyx_r = NULL;
8609  __pyx_L0:;
8610  __Pyx_XGIVEREF(__pyx_r);
8611  __Pyx_RefNannyFinishContext();
8612  return __pyx_r;
8613  }
8614 
8615  /* "PyClical.pyx":850
8616  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8617  *
8618  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8619  * """
8620  * Inner product.
8621  */
8622 
8623  /* Python wrapper */
8624  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8625  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 ";
8626  #if CYTHON_COMPILING_IN_CPYTHON
8627  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_38__iand__;
8628  #endif
8629  static PyObject *__pyx_pw_8PyClical_8clifford_39__iand__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8630  PyObject *__pyx_r = 0;
8631  __Pyx_RefNannyDeclarations
8632  __Pyx_RefNannySetupContext("__iand__ (wrapper)", 0);
8633  __pyx_r = __pyx_pf_8PyClical_8clifford_38__iand__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8634 
8635  /* function exit code */
8636  __Pyx_RefNannyFinishContext();
8637  return __pyx_r;
8638  }
8639 
8640  static PyObject *__pyx_pf_8PyClical_8clifford_38__iand__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8641  PyObject *__pyx_r = NULL;
8642  __Pyx_RefNannyDeclarations
8643  PyObject *__pyx_t_1 = NULL;
8644  __Pyx_RefNannySetupContext("__iand__", 0);
8645 
8646  /* "PyClical.pyx":863
8647  * {2}
8648  * """
8649  * return self.wrap( self.unwrap() & toClifford(rhs) ) # <<<<<<<<<<<<<<
8650  *
8651  * def __xor__(lhs, rhs):
8652  */
8653  __Pyx_XDECREF(__pyx_r);
8654  __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)
8655  __Pyx_GOTREF(__pyx_t_1);
8656  __pyx_r = __pyx_t_1;
8657  __pyx_t_1 = 0;
8658  goto __pyx_L0;
8659 
8660  /* "PyClical.pyx":850
8661  * return clifford().wrap( toClifford(lhs) & toClifford(rhs) )
8662  *
8663  * def __iand__(self, rhs): # <<<<<<<<<<<<<<
8664  * """
8665  * Inner product.
8666  */
8667 
8668  /* function exit code */
8669  __pyx_L1_error:;
8670  __Pyx_XDECREF(__pyx_t_1);
8671  __Pyx_AddTraceback("PyClical.clifford.__iand__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8672  __pyx_r = NULL;
8673  __pyx_L0:;
8674  __Pyx_XGIVEREF(__pyx_r);
8675  __Pyx_RefNannyFinishContext();
8676  return __pyx_r;
8677  }
8678 
8679  /* "PyClical.pyx":865
8680  * return self.wrap( self.unwrap() & toClifford(rhs) )
8681  *
8682  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8683  * """
8684  * Outer product.
8685  */
8686 
8687  /* Python wrapper */
8688  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8689  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 ";
8690  #if CYTHON_COMPILING_IN_CPYTHON
8691  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_40__xor__;
8692  #endif
8693  static PyObject *__pyx_pw_8PyClical_8clifford_41__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8694  PyObject *__pyx_r = 0;
8695  __Pyx_RefNannyDeclarations
8696  __Pyx_RefNannySetupContext("__xor__ (wrapper)", 0);
8697  __pyx_r = __pyx_pf_8PyClical_8clifford_40__xor__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8698 
8699  /* function exit code */
8700  __Pyx_RefNannyFinishContext();
8701  return __pyx_r;
8702  }
8703 
8704  static PyObject *__pyx_pf_8PyClical_8clifford_40__xor__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8705  PyObject *__pyx_r = NULL;
8706  __Pyx_RefNannyDeclarations
8707  PyObject *__pyx_t_1 = NULL;
8708  PyObject *__pyx_t_2 = NULL;
8709  __Pyx_RefNannySetupContext("__xor__", 0);
8710 
8711  /* "PyClical.pyx":878
8712  * 0
8713  * """
8714  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8715  *
8716  * def __ixor__(self, rhs):
8717  */
8718  __Pyx_XDECREF(__pyx_r);
8719  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
8720  __Pyx_GOTREF(__pyx_t_1);
8721  __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)
8722  __Pyx_GOTREF(__pyx_t_2);
8723  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8724  __pyx_r = __pyx_t_2;
8725  __pyx_t_2 = 0;
8726  goto __pyx_L0;
8727 
8728  /* "PyClical.pyx":865
8729  * return self.wrap( self.unwrap() & toClifford(rhs) )
8730  *
8731  * def __xor__(lhs, rhs): # <<<<<<<<<<<<<<
8732  * """
8733  * Outer product.
8734  */
8735 
8736  /* function exit code */
8737  __pyx_L1_error:;
8738  __Pyx_XDECREF(__pyx_t_1);
8739  __Pyx_XDECREF(__pyx_t_2);
8740  __Pyx_AddTraceback("PyClical.clifford.__xor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8741  __pyx_r = NULL;
8742  __pyx_L0:;
8743  __Pyx_XGIVEREF(__pyx_r);
8744  __Pyx_RefNannyFinishContext();
8745  return __pyx_r;
8746  }
8747 
8748  /* "PyClical.pyx":880
8749  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8750  *
8751  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8752  * """
8753  * Outer product.
8754  */
8755 
8756  /* Python wrapper */
8757  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8758  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 ";
8759  #if CYTHON_COMPILING_IN_CPYTHON
8760  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
8761  #endif
8762  static PyObject *__pyx_pw_8PyClical_8clifford_43__ixor__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8763  PyObject *__pyx_r = 0;
8764  __Pyx_RefNannyDeclarations
8765  __Pyx_RefNannySetupContext("__ixor__ (wrapper)", 0);
8766  __pyx_r = __pyx_pf_8PyClical_8clifford_42__ixor__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8767 
8768  /* function exit code */
8769  __Pyx_RefNannyFinishContext();
8770  return __pyx_r;
8771  }
8772 
8773  static PyObject *__pyx_pf_8PyClical_8clifford_42__ixor__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8774  PyObject *__pyx_r = NULL;
8775  __Pyx_RefNannyDeclarations
8776  PyObject *__pyx_t_1 = NULL;
8777  __Pyx_RefNannySetupContext("__ixor__", 0);
8778 
8779  /* "PyClical.pyx":893
8780  * 0
8781  * """
8782  * return self.wrap( self.unwrap() ^ toClifford(rhs) ) # <<<<<<<<<<<<<<
8783  *
8784  * def __div__(lhs, rhs):
8785  */
8786  __Pyx_XDECREF(__pyx_r);
8787  __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)
8788  __Pyx_GOTREF(__pyx_t_1);
8789  __pyx_r = __pyx_t_1;
8790  __pyx_t_1 = 0;
8791  goto __pyx_L0;
8792 
8793  /* "PyClical.pyx":880
8794  * return clifford().wrap( toClifford(lhs) ^ toClifford(rhs) )
8795  *
8796  * def __ixor__(self, rhs): # <<<<<<<<<<<<<<
8797  * """
8798  * Outer product.
8799  */
8800 
8801  /* function exit code */
8802  __pyx_L1_error:;
8803  __Pyx_XDECREF(__pyx_t_1);
8804  __Pyx_AddTraceback("PyClical.clifford.__ixor__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8805  __pyx_r = NULL;
8806  __pyx_L0:;
8807  __Pyx_XGIVEREF(__pyx_r);
8808  __Pyx_RefNannyFinishContext();
8809  return __pyx_r;
8810  }
8811 
8812  /* "PyClical.pyx":895
8813  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8814  *
8815  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8816  * """
8817  * Geometric quotient.
8818  */
8819 
8820  /* Python wrapper */
8821  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8822  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
8823  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 ";
8824  #if CYTHON_COMPILING_IN_CPYTHON
8825  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_44__div__;
8826  #endif
8827  static PyObject *__pyx_pw_8PyClical_8clifford_45__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8828  PyObject *__pyx_r = 0;
8829  __Pyx_RefNannyDeclarations
8830  __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
8831  __pyx_r = __pyx_pf_8PyClical_8clifford_44__div__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
8832 
8833  /* function exit code */
8834  __Pyx_RefNannyFinishContext();
8835  return __pyx_r;
8836  }
8837  #endif
8839  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8840  static PyObject *__pyx_pf_8PyClical_8clifford_44__div__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
8841  PyObject *__pyx_r = NULL;
8842  __Pyx_RefNannyDeclarations
8843  PyObject *__pyx_t_1 = NULL;
8844  PyObject *__pyx_t_2 = NULL;
8845  __Pyx_RefNannySetupContext("__div__", 0);
8846 
8847  /* "PyClical.pyx":908
8848  * -{2}
8849  * """
8850  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) ) # <<<<<<<<<<<<<<
8851  *
8852  * def __idiv__(self, rhs):
8853  */
8854  __Pyx_XDECREF(__pyx_r);
8855  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error)
8856  __Pyx_GOTREF(__pyx_t_1);
8857  __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)
8858  __Pyx_GOTREF(__pyx_t_2);
8859  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8860  __pyx_r = __pyx_t_2;
8861  __pyx_t_2 = 0;
8862  goto __pyx_L0;
8863 
8864  /* "PyClical.pyx":895
8865  * return self.wrap( self.unwrap() ^ toClifford(rhs) )
8866  *
8867  * def __div__(lhs, rhs): # <<<<<<<<<<<<<<
8868  * """
8869  * Geometric quotient.
8870  */
8871 
8872  /* function exit code */
8873  __pyx_L1_error:;
8874  __Pyx_XDECREF(__pyx_t_1);
8875  __Pyx_XDECREF(__pyx_t_2);
8876  __Pyx_AddTraceback("PyClical.clifford.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8877  __pyx_r = NULL;
8878  __pyx_L0:;
8879  __Pyx_XGIVEREF(__pyx_r);
8880  __Pyx_RefNannyFinishContext();
8881  return __pyx_r;
8882  }
8883  #endif
8885  /* "PyClical.pyx":910
8886  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8887  *
8888  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8889  * """
8890  * Geometric quotient.
8891  */
8892 
8893  /* Python wrapper */
8894  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8895  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
8896  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 ";
8897  #if CYTHON_COMPILING_IN_CPYTHON
8898  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
8899  #endif
8900  static PyObject *__pyx_pw_8PyClical_8clifford_47__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
8901  PyObject *__pyx_r = 0;
8902  __Pyx_RefNannyDeclarations
8903  __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
8904  __pyx_r = __pyx_pf_8PyClical_8clifford_46__idiv__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
8905 
8906  /* function exit code */
8907  __Pyx_RefNannyFinishContext();
8908  return __pyx_r;
8909  }
8910  #endif
8912  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
8913  static PyObject *__pyx_pf_8PyClical_8clifford_46__idiv__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
8914  PyObject *__pyx_r = NULL;
8915  __Pyx_RefNannyDeclarations
8916  PyObject *__pyx_t_1 = NULL;
8917  __Pyx_RefNannySetupContext("__idiv__", 0);
8918 
8919  /* "PyClical.pyx":923
8920  * -{2}
8921  * """
8922  * return self.wrap( self.unwrap() / toClifford(rhs) ) # <<<<<<<<<<<<<<
8923  *
8924  * def inv(self):
8925  */
8926  __Pyx_XDECREF(__pyx_r);
8927  __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)
8928  __Pyx_GOTREF(__pyx_t_1);
8929  __pyx_r = __pyx_t_1;
8930  __pyx_t_1 = 0;
8931  goto __pyx_L0;
8932 
8933  /* "PyClical.pyx":910
8934  * return clifford().wrap( toClifford(lhs) / toClifford(rhs) )
8935  *
8936  * def __idiv__(self, rhs): # <<<<<<<<<<<<<<
8937  * """
8938  * Geometric quotient.
8939  */
8940 
8941  /* function exit code */
8942  __pyx_L1_error:;
8943  __Pyx_XDECREF(__pyx_t_1);
8944  __Pyx_AddTraceback("PyClical.clifford.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8945  __pyx_r = NULL;
8946  __pyx_L0:;
8947  __Pyx_XGIVEREF(__pyx_r);
8948  __Pyx_RefNannyFinishContext();
8949  return __pyx_r;
8950  }
8951  #endif
8953  /* "PyClical.pyx":925
8954  * return self.wrap( self.unwrap() / toClifford(rhs) )
8955  *
8956  * def inv(self): # <<<<<<<<<<<<<<
8957  * """
8958  * Geometric multiplicative inverse.
8959  */
8960 
8961  /* Python wrapper */
8962  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8963  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 ";
8964  static PyObject *__pyx_pw_8PyClical_8clifford_49inv(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8965  PyObject *__pyx_r = 0;
8966  __Pyx_RefNannyDeclarations
8967  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
8968  __pyx_r = __pyx_pf_8PyClical_8clifford_48inv(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
8969 
8970  /* function exit code */
8971  __Pyx_RefNannyFinishContext();
8972  return __pyx_r;
8973  }
8974 
8975  static PyObject *__pyx_pf_8PyClical_8clifford_48inv(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
8976  PyObject *__pyx_r = NULL;
8977  __Pyx_RefNannyDeclarations
8978  PyObject *__pyx_t_1 = NULL;
8979  PyObject *__pyx_t_2 = NULL;
8980  __Pyx_RefNannySetupContext("inv", 0);
8981 
8982  /* "PyClical.pyx":936
8983  * -{1,2}
8984  * """
8985  * return clifford().wrap( self.instance.inv() ) # <<<<<<<<<<<<<<
8986  *
8987  * def __or__(lhs, rhs):
8988  */
8989  __Pyx_XDECREF(__pyx_r);
8990  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
8991  __Pyx_GOTREF(__pyx_t_1);
8992  __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)
8993  __Pyx_GOTREF(__pyx_t_2);
8994  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8995  __pyx_r = __pyx_t_2;
8996  __pyx_t_2 = 0;
8997  goto __pyx_L0;
8998 
8999  /* "PyClical.pyx":925
9000  * return self.wrap( self.unwrap() / toClifford(rhs) )
9001  *
9002  * def inv(self): # <<<<<<<<<<<<<<
9003  * """
9004  * Geometric multiplicative inverse.
9005  */
9006 
9007  /* function exit code */
9008  __pyx_L1_error:;
9009  __Pyx_XDECREF(__pyx_t_1);
9010  __Pyx_XDECREF(__pyx_t_2);
9011  __Pyx_AddTraceback("PyClical.clifford.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
9012  __pyx_r = NULL;
9013  __pyx_L0:;
9014  __Pyx_XGIVEREF(__pyx_r);
9015  __Pyx_RefNannyFinishContext();
9016  return __pyx_r;
9017  }
9018 
9019  /* "PyClical.pyx":938
9020  * return clifford().wrap( self.instance.inv() )
9021  *
9022  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9023  * """
9024  * Transform left hand side, using right hand side as a transformation.
9025  */
9026 
9027  /* Python wrapper */
9028  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /*proto*/
9029  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 ";
9030  #if CYTHON_COMPILING_IN_CPYTHON
9031  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_50__or__;
9032  #endif
9033  static PyObject *__pyx_pw_8PyClical_8clifford_51__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9034  PyObject *__pyx_r = 0;
9035  __Pyx_RefNannyDeclarations
9036  __Pyx_RefNannySetupContext("__or__ (wrapper)", 0);
9037  __pyx_r = __pyx_pf_8PyClical_8clifford_50__or__(((PyObject *)__pyx_v_lhs), ((PyObject *)__pyx_v_rhs));
9038 
9039  /* function exit code */
9040  __Pyx_RefNannyFinishContext();
9041  return __pyx_r;
9042  }
9043 
9044  static PyObject *__pyx_pf_8PyClical_8clifford_50__or__(PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
9045  PyObject *__pyx_r = NULL;
9046  __Pyx_RefNannyDeclarations
9047  PyObject *__pyx_t_1 = NULL;
9048  PyObject *__pyx_t_2 = NULL;
9049  __Pyx_RefNannySetupContext("__or__", 0);
9050 
9051  /* "PyClical.pyx":947
9052  * -{1}
9053  * """
9054  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) ) # <<<<<<<<<<<<<<
9055  *
9056  * def __ior__(self, rhs):
9057  */
9058  __Pyx_XDECREF(__pyx_r);
9059  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 947, __pyx_L1_error)
9060  __Pyx_GOTREF(__pyx_t_1);
9061  __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)
9062  __Pyx_GOTREF(__pyx_t_2);
9063  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9064  __pyx_r = __pyx_t_2;
9065  __pyx_t_2 = 0;
9066  goto __pyx_L0;
9067 
9068  /* "PyClical.pyx":938
9069  * return clifford().wrap( self.instance.inv() )
9070  *
9071  * def __or__(lhs, rhs): # <<<<<<<<<<<<<<
9072  * """
9073  * Transform left hand side, using right hand side as a transformation.
9074  */
9075 
9076  /* function exit code */
9077  __pyx_L1_error:;
9078  __Pyx_XDECREF(__pyx_t_1);
9079  __Pyx_XDECREF(__pyx_t_2);
9080  __Pyx_AddTraceback("PyClical.clifford.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9081  __pyx_r = NULL;
9082  __pyx_L0:;
9083  __Pyx_XGIVEREF(__pyx_r);
9084  __Pyx_RefNannyFinishContext();
9085  return __pyx_r;
9086  }
9087 
9088  /* "PyClical.pyx":949
9089  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9090  *
9091  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9092  * """
9093  * Transform left hand side, using right hand side as a transformation.
9094  */
9095 
9096  /* Python wrapper */
9097  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs); /*proto*/
9098  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 ";
9099  #if CYTHON_COMPILING_IN_CPYTHON
9100  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_52__ior__;
9101  #endif
9102  static PyObject *__pyx_pw_8PyClical_8clifford_53__ior__(PyObject *__pyx_v_self, PyObject *__pyx_v_rhs) {
9103  PyObject *__pyx_r = 0;
9104  __Pyx_RefNannyDeclarations
9105  __Pyx_RefNannySetupContext("__ior__ (wrapper)", 0);
9106  __pyx_r = __pyx_pf_8PyClical_8clifford_52__ior__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_rhs));
9107 
9108  /* function exit code */
9109  __Pyx_RefNannyFinishContext();
9110  return __pyx_r;
9111  }
9112 
9113  static PyObject *__pyx_pf_8PyClical_8clifford_52__ior__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_rhs) {
9114  PyObject *__pyx_r = NULL;
9115  __Pyx_RefNannyDeclarations
9116  PyObject *__pyx_t_1 = NULL;
9117  __Pyx_RefNannySetupContext("__ior__", 0);
9118 
9119  /* "PyClical.pyx":958
9120  * -{1}
9121  * """
9122  * return self.wrap( self.unwrap() | toClifford(rhs) ) # <<<<<<<<<<<<<<
9123  *
9124  * def __pow__(self, m, dummy):
9125  */
9126  __Pyx_XDECREF(__pyx_r);
9127  __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)
9128  __Pyx_GOTREF(__pyx_t_1);
9129  __pyx_r = __pyx_t_1;
9130  __pyx_t_1 = 0;
9131  goto __pyx_L0;
9132 
9133  /* "PyClical.pyx":949
9134  * return clifford().wrap( toClifford(lhs) | toClifford(rhs) )
9135  *
9136  * def __ior__(self, rhs): # <<<<<<<<<<<<<<
9137  * """
9138  * Transform left hand side, using right hand side as a transformation.
9139  */
9140 
9141  /* function exit code */
9142  __pyx_L1_error:;
9143  __Pyx_XDECREF(__pyx_t_1);
9144  __Pyx_AddTraceback("PyClical.clifford.__ior__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9145  __pyx_r = NULL;
9146  __pyx_L0:;
9147  __Pyx_XGIVEREF(__pyx_r);
9148  __Pyx_RefNannyFinishContext();
9149  return __pyx_r;
9150  }
9151 
9152  /* "PyClical.pyx":960
9153  * return self.wrap( self.unwrap() | toClifford(rhs) )
9154  *
9155  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9156  * """
9157  * Power: self to the m.
9158  */
9159 
9160  /* Python wrapper */
9161  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy); /*proto*/
9162  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 ";
9163  #if CYTHON_COMPILING_IN_CPYTHON
9164  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_54__pow__;
9165  #endif
9166  static PyObject *__pyx_pw_8PyClical_8clifford_55__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_dummy) {
9167  PyObject *__pyx_r = 0;
9168  __Pyx_RefNannyDeclarations
9169  __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
9170  __pyx_r = __pyx_pf_8PyClical_8clifford_54__pow__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_m), ((PyObject *)__pyx_v_dummy));
9171 
9172  /* function exit code */
9173  __Pyx_RefNannyFinishContext();
9174  return __pyx_r;
9175  }
9176 
9177  static PyObject *__pyx_pf_8PyClical_8clifford_54__pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_m, CYTHON_UNUSED PyObject *__pyx_v_dummy) {
9178  PyObject *__pyx_r = NULL;
9179  __Pyx_RefNannyDeclarations
9180  PyObject *__pyx_t_1 = NULL;
9181  __Pyx_RefNannySetupContext("__pow__", 0);
9182 
9183  /* "PyClical.pyx":977
9184  * 1
9185  * """
9186  * return pow(self, m) # <<<<<<<<<<<<<<
9187  *
9188  * def pow(self, m):
9189  */
9190  __Pyx_XDECREF(__pyx_r);
9191  __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)
9192  __Pyx_GOTREF(__pyx_t_1);
9193  __pyx_r = __pyx_t_1;
9194  __pyx_t_1 = 0;
9195  goto __pyx_L0;
9196 
9197  /* "PyClical.pyx":960
9198  * return self.wrap( self.unwrap() | toClifford(rhs) )
9199  *
9200  * def __pow__(self, m, dummy): # <<<<<<<<<<<<<<
9201  * """
9202  * Power: self to the m.
9203  */
9204 
9205  /* function exit code */
9206  __pyx_L1_error:;
9207  __Pyx_XDECREF(__pyx_t_1);
9208  __Pyx_AddTraceback("PyClical.clifford.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9209  __pyx_r = NULL;
9210  __pyx_L0:;
9211  __Pyx_XGIVEREF(__pyx_r);
9212  __Pyx_RefNannyFinishContext();
9213  return __pyx_r;
9214  }
9215 
9216  /* "PyClical.pyx":979
9217  * return pow(self, m)
9218  *
9219  * def pow(self, m): # <<<<<<<<<<<<<<
9220  * """
9221  * Power: self to the m.
9222  */
9223 
9224  /* Python wrapper */
9225  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9226  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 ";
9227  static PyObject *__pyx_pw_8PyClical_8clifford_57pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9228  PyObject *__pyx_r = 0;
9229  __Pyx_RefNannyDeclarations
9230  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
9231  __pyx_r = __pyx_pf_8PyClical_8clifford_56pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9232 
9233  /* function exit code */
9234  __Pyx_RefNannyFinishContext();
9235  return __pyx_r;
9236  }
9237 
9238  static PyObject *__pyx_pf_8PyClical_8clifford_56pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9239  PyObject *__pyx_r = NULL;
9240  __Pyx_RefNannyDeclarations
9241  PyObject *__pyx_t_1 = NULL;
9242  PyObject *__pyx_t_2 = NULL;
9243  int __pyx_t_3;
9244  int __pyx_t_4;
9245  int __pyx_t_5;
9246  __Pyx_RefNannySetupContext("pow", 0);
9247 
9248  /* "PyClical.pyx":998
9249  * 1
9250  * """
9251  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9252  * return clifford().wrap( self.instance.pow(m) )
9253  * else:
9254  */
9255  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
9256  __Pyx_GOTREF(__pyx_t_1);
9257  __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)
9258  __Pyx_GOTREF(__pyx_t_2);
9259  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9260  __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)
9261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9262  __pyx_t_4 = (__pyx_t_3 != 0);
9263  if (__pyx_t_4) {
9264 
9265  /* "PyClical.pyx":999
9266  * """
9267  * if isinstance(m, numbers.Integral):
9268  * return clifford().wrap( self.instance.pow(m) ) # <<<<<<<<<<<<<<
9269  * else:
9270  * return exp(m * log(self))
9271  */
9272  __Pyx_XDECREF(__pyx_r);
9273  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
9274  __Pyx_GOTREF(__pyx_t_2);
9275  __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)
9276  __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)
9277  __Pyx_GOTREF(__pyx_t_1);
9278  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9279  __pyx_r = __pyx_t_1;
9280  __pyx_t_1 = 0;
9281  goto __pyx_L0;
9282 
9283  /* "PyClical.pyx":998
9284  * 1
9285  * """
9286  * if isinstance(m, numbers.Integral): # <<<<<<<<<<<<<<
9287  * return clifford().wrap( self.instance.pow(m) )
9288  * else:
9289  */
9290  }
9291 
9292  /* "PyClical.pyx":1001
9293  * return clifford().wrap( self.instance.pow(m) )
9294  * else:
9295  * return exp(m * log(self)) # <<<<<<<<<<<<<<
9296  *
9297  * def outer_pow(self, m):
9298  */
9299  /*else*/ {
9300  __Pyx_XDECREF(__pyx_r);
9301  __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)
9302  __Pyx_GOTREF(__pyx_t_1);
9303  __pyx_t_2 = PyNumber_Multiply(__pyx_v_m, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error)
9304  __Pyx_GOTREF(__pyx_t_2);
9305  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9306  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
9307  __Pyx_GOTREF(__pyx_t_1);
9308  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9309  __pyx_r = __pyx_t_1;
9310  __pyx_t_1 = 0;
9311  goto __pyx_L0;
9312  }
9313 
9314  /* "PyClical.pyx":979
9315  * return pow(self, m)
9316  *
9317  * def pow(self, m): # <<<<<<<<<<<<<<
9318  * """
9319  * Power: self to the m.
9320  */
9321 
9322  /* function exit code */
9323  __pyx_L1_error:;
9324  __Pyx_XDECREF(__pyx_t_1);
9325  __Pyx_XDECREF(__pyx_t_2);
9326  __Pyx_AddTraceback("PyClical.clifford.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9327  __pyx_r = NULL;
9328  __pyx_L0:;
9329  __Pyx_XGIVEREF(__pyx_r);
9330  __Pyx_RefNannyFinishContext();
9331  return __pyx_r;
9332  }
9333 
9334  /* "PyClical.pyx":1003
9335  * return exp(m * log(self))
9336  *
9337  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9338  * """
9339  * Outer product power.
9340  */
9341 
9342  /* Python wrapper */
9343  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
9344  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 ";
9345  static PyObject *__pyx_pw_8PyClical_8clifford_59outer_pow(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
9346  PyObject *__pyx_r = 0;
9347  __Pyx_RefNannyDeclarations
9348  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
9349  __pyx_r = __pyx_pf_8PyClical_8clifford_58outer_pow(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_m));
9350 
9351  /* function exit code */
9352  __Pyx_RefNannyFinishContext();
9353  return __pyx_r;
9354  }
9355 
9356  static PyObject *__pyx_pf_8PyClical_8clifford_58outer_pow(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_m) {
9357  PyObject *__pyx_r = NULL;
9358  __Pyx_RefNannyDeclarations
9359  PyObject *__pyx_t_1 = NULL;
9360  int __pyx_t_2;
9361  PyObject *__pyx_t_3 = NULL;
9362  __Pyx_RefNannySetupContext("outer_pow", 0);
9363 
9364  /* "PyClical.pyx":1017
9365  *
9366  * """
9367  * return clifford().wrap( self.instance.outer_pow(m) ) # <<<<<<<<<<<<<<
9368  *
9369  * def __call__(self, grade):
9370  */
9371  __Pyx_XDECREF(__pyx_r);
9372  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1017, __pyx_L1_error)
9373  __Pyx_GOTREF(__pyx_t_1);
9374  __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)
9375  __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)
9376  __Pyx_GOTREF(__pyx_t_3);
9377  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9378  __pyx_r = __pyx_t_3;
9379  __pyx_t_3 = 0;
9380  goto __pyx_L0;
9381 
9382  /* "PyClical.pyx":1003
9383  * return exp(m * log(self))
9384  *
9385  * def outer_pow(self, m): # <<<<<<<<<<<<<<
9386  * """
9387  * Outer product power.
9388  */
9389 
9390  /* function exit code */
9391  __pyx_L1_error:;
9392  __Pyx_XDECREF(__pyx_t_1);
9393  __Pyx_XDECREF(__pyx_t_3);
9394  __Pyx_AddTraceback("PyClical.clifford.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
9395  __pyx_r = NULL;
9396  __pyx_L0:;
9397  __Pyx_XGIVEREF(__pyx_r);
9398  __Pyx_RefNannyFinishContext();
9399  return __pyx_r;
9400  }
9401 
9402  /* "PyClical.pyx":1019
9403  * return clifford().wrap( self.instance.outer_pow(m) )
9404  *
9405  * def __call__(self, grade): # <<<<<<<<<<<<<<
9406  * """
9407  * Pure grade-vector part.
9408  */
9409 
9410  /* Python wrapper */
9411  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9412  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 ";
9413  #if CYTHON_COMPILING_IN_CPYTHON
9414  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_60__call__;
9415  #endif
9416  static PyObject *__pyx_pw_8PyClical_8clifford_61__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9417  PyObject *__pyx_v_grade = 0;
9418  PyObject *__pyx_r = 0;
9419  __Pyx_RefNannyDeclarations
9420  __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
9421  {
9422  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_grade,0};
9423  PyObject* values[1] = {0};
9424  if (unlikely(__pyx_kwds)) {
9425  Py_ssize_t kw_args;
9426  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9427  switch (pos_args) {
9428  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9429  CYTHON_FALLTHROUGH;
9430  case 0: break;
9431  default: goto __pyx_L5_argtuple_error;
9432  }
9433  kw_args = PyDict_Size(__pyx_kwds);
9434  switch (pos_args) {
9435  case 0:
9436  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_grade)) != 0)) kw_args--;
9437  else goto __pyx_L5_argtuple_error;
9438  }
9439  if (unlikely(kw_args > 0)) {
9440  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1019, __pyx_L3_error)
9441  }
9442  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
9443  goto __pyx_L5_argtuple_error;
9444  } else {
9445  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9446  }
9447  __pyx_v_grade = values[0];
9448  }
9449  goto __pyx_L4_argument_unpacking_done;
9450  __pyx_L5_argtuple_error:;
9451  __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1019, __pyx_L3_error)
9452  __pyx_L3_error:;
9453  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9454  __Pyx_RefNannyFinishContext();
9455  return NULL;
9456  __pyx_L4_argument_unpacking_done:;
9457  __pyx_r = __pyx_pf_8PyClical_8clifford_60__call__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_grade);
9458 
9459  /* function exit code */
9460  __Pyx_RefNannyFinishContext();
9461  return __pyx_r;
9462  }
9463 
9464  static PyObject *__pyx_pf_8PyClical_8clifford_60__call__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_grade) {
9465  PyObject *__pyx_r = NULL;
9466  __Pyx_RefNannyDeclarations
9467  PyObject *__pyx_t_1 = NULL;
9468  int __pyx_t_2;
9469  PyObject *__pyx_t_3 = NULL;
9470  __Pyx_RefNannySetupContext("__call__", 0);
9471 
9472  /* "PyClical.pyx":1036
9473  * 0
9474  * """
9475  * return clifford().wrap( self.instance.call(grade) ) # <<<<<<<<<<<<<<
9476  *
9477  * def scalar(self):
9478  */
9479  __Pyx_XDECREF(__pyx_r);
9480  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
9481  __Pyx_GOTREF(__pyx_t_1);
9482  __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)
9483  __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)
9484  __Pyx_GOTREF(__pyx_t_3);
9485  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9486  __pyx_r = __pyx_t_3;
9487  __pyx_t_3 = 0;
9488  goto __pyx_L0;
9489 
9490  /* "PyClical.pyx":1019
9491  * return clifford().wrap( self.instance.outer_pow(m) )
9492  *
9493  * def __call__(self, grade): # <<<<<<<<<<<<<<
9494  * """
9495  * Pure grade-vector part.
9496  */
9497 
9498  /* function exit code */
9499  __pyx_L1_error:;
9500  __Pyx_XDECREF(__pyx_t_1);
9501  __Pyx_XDECREF(__pyx_t_3);
9502  __Pyx_AddTraceback("PyClical.clifford.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9503  __pyx_r = NULL;
9504  __pyx_L0:;
9505  __Pyx_XGIVEREF(__pyx_r);
9506  __Pyx_RefNannyFinishContext();
9507  return __pyx_r;
9508  }
9509 
9510  /* "PyClical.pyx":1038
9511  * return clifford().wrap( self.instance.call(grade) )
9512  *
9513  * def scalar(self): # <<<<<<<<<<<<<<
9514  * """
9515  * Scalar part.
9516  */
9517 
9518  /* Python wrapper */
9519  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9520  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 ";
9521  static PyObject *__pyx_pw_8PyClical_8clifford_63scalar(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9522  PyObject *__pyx_r = 0;
9523  __Pyx_RefNannyDeclarations
9524  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
9525  __pyx_r = __pyx_pf_8PyClical_8clifford_62scalar(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9526 
9527  /* function exit code */
9528  __Pyx_RefNannyFinishContext();
9529  return __pyx_r;
9530  }
9531 
9532  static PyObject *__pyx_pf_8PyClical_8clifford_62scalar(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9533  PyObject *__pyx_r = NULL;
9534  __Pyx_RefNannyDeclarations
9535  PyObject *__pyx_t_1 = NULL;
9536  __Pyx_RefNannySetupContext("scalar", 0);
9537 
9538  /* "PyClical.pyx":1047
9539  * 0.0
9540  * """
9541  * return self.instance.scalar() # <<<<<<<<<<<<<<
9542  *
9543  * def pure(self):
9544  */
9545  __Pyx_XDECREF(__pyx_r);
9546  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->scalar()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
9547  __Pyx_GOTREF(__pyx_t_1);
9548  __pyx_r = __pyx_t_1;
9549  __pyx_t_1 = 0;
9550  goto __pyx_L0;
9551 
9552  /* "PyClical.pyx":1038
9553  * return clifford().wrap( self.instance.call(grade) )
9554  *
9555  * def scalar(self): # <<<<<<<<<<<<<<
9556  * """
9557  * Scalar part.
9558  */
9559 
9560  /* function exit code */
9561  __pyx_L1_error:;
9562  __Pyx_XDECREF(__pyx_t_1);
9563  __Pyx_AddTraceback("PyClical.clifford.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
9564  __pyx_r = NULL;
9565  __pyx_L0:;
9566  __Pyx_XGIVEREF(__pyx_r);
9567  __Pyx_RefNannyFinishContext();
9568  return __pyx_r;
9569  }
9570 
9571  /* "PyClical.pyx":1049
9572  * return self.instance.scalar()
9573  *
9574  * def pure(self): # <<<<<<<<<<<<<<
9575  * """
9576  * Pure part.
9577  */
9578 
9579  /* Python wrapper */
9580  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9581  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 ";
9582  static PyObject *__pyx_pw_8PyClical_8clifford_65pure(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9583  PyObject *__pyx_r = 0;
9584  __Pyx_RefNannyDeclarations
9585  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
9586  __pyx_r = __pyx_pf_8PyClical_8clifford_64pure(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9587 
9588  /* function exit code */
9589  __Pyx_RefNannyFinishContext();
9590  return __pyx_r;
9591  }
9592 
9593  static PyObject *__pyx_pf_8PyClical_8clifford_64pure(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9594  PyObject *__pyx_r = NULL;
9595  __Pyx_RefNannyDeclarations
9596  PyObject *__pyx_t_1 = NULL;
9597  PyObject *__pyx_t_2 = NULL;
9598  __Pyx_RefNannySetupContext("pure", 0);
9599 
9600  /* "PyClical.pyx":1058
9601  * {1,2}
9602  * """
9603  * return clifford().wrap( self.instance.pure() ) # <<<<<<<<<<<<<<
9604  *
9605  * def even(self):
9606  */
9607  __Pyx_XDECREF(__pyx_r);
9608  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
9609  __Pyx_GOTREF(__pyx_t_1);
9610  __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)
9611  __Pyx_GOTREF(__pyx_t_2);
9612  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9613  __pyx_r = __pyx_t_2;
9614  __pyx_t_2 = 0;
9615  goto __pyx_L0;
9616 
9617  /* "PyClical.pyx":1049
9618  * return self.instance.scalar()
9619  *
9620  * def pure(self): # <<<<<<<<<<<<<<
9621  * """
9622  * Pure part.
9623  */
9624 
9625  /* function exit code */
9626  __pyx_L1_error:;
9627  __Pyx_XDECREF(__pyx_t_1);
9628  __Pyx_XDECREF(__pyx_t_2);
9629  __Pyx_AddTraceback("PyClical.clifford.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
9630  __pyx_r = NULL;
9631  __pyx_L0:;
9632  __Pyx_XGIVEREF(__pyx_r);
9633  __Pyx_RefNannyFinishContext();
9634  return __pyx_r;
9635  }
9636 
9637  /* "PyClical.pyx":1060
9638  * return clifford().wrap( self.instance.pure() )
9639  *
9640  * def even(self): # <<<<<<<<<<<<<<
9641  * """
9642  * Even part of multivector, sum of even grade terms.
9643  */
9644 
9645  /* Python wrapper */
9646  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9647  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 ";
9648  static PyObject *__pyx_pw_8PyClical_8clifford_67even(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9649  PyObject *__pyx_r = 0;
9650  __Pyx_RefNannyDeclarations
9651  __Pyx_RefNannySetupContext("even (wrapper)", 0);
9652  __pyx_r = __pyx_pf_8PyClical_8clifford_66even(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9653 
9654  /* function exit code */
9655  __Pyx_RefNannyFinishContext();
9656  return __pyx_r;
9657  }
9658 
9659  static PyObject *__pyx_pf_8PyClical_8clifford_66even(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9660  PyObject *__pyx_r = NULL;
9661  __Pyx_RefNannyDeclarations
9662  PyObject *__pyx_t_1 = NULL;
9663  PyObject *__pyx_t_2 = NULL;
9664  __Pyx_RefNannySetupContext("even", 0);
9665 
9666  /* "PyClical.pyx":1067
9667  * 1+{1,2}
9668  * """
9669  * return clifford().wrap( self.instance.even() ) # <<<<<<<<<<<<<<
9670  *
9671  * def odd(self):
9672  */
9673  __Pyx_XDECREF(__pyx_r);
9674  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
9675  __Pyx_GOTREF(__pyx_t_1);
9676  __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)
9677  __Pyx_GOTREF(__pyx_t_2);
9678  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9679  __pyx_r = __pyx_t_2;
9680  __pyx_t_2 = 0;
9681  goto __pyx_L0;
9682 
9683  /* "PyClical.pyx":1060
9684  * return clifford().wrap( self.instance.pure() )
9685  *
9686  * def even(self): # <<<<<<<<<<<<<<
9687  * """
9688  * Even part of multivector, sum of even grade terms.
9689  */
9690 
9691  /* function exit code */
9692  __pyx_L1_error:;
9693  __Pyx_XDECREF(__pyx_t_1);
9694  __Pyx_XDECREF(__pyx_t_2);
9695  __Pyx_AddTraceback("PyClical.clifford.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
9696  __pyx_r = NULL;
9697  __pyx_L0:;
9698  __Pyx_XGIVEREF(__pyx_r);
9699  __Pyx_RefNannyFinishContext();
9700  return __pyx_r;
9701  }
9702 
9703  /* "PyClical.pyx":1069
9704  * return clifford().wrap( self.instance.even() )
9705  *
9706  * def odd(self): # <<<<<<<<<<<<<<
9707  * """
9708  * Odd part of multivector, sum of odd grade terms.
9709  */
9710 
9711  /* Python wrapper */
9712  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
9713  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 ";
9714  static PyObject *__pyx_pw_8PyClical_8clifford_69odd(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
9715  PyObject *__pyx_r = 0;
9716  __Pyx_RefNannyDeclarations
9717  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
9718  __pyx_r = __pyx_pf_8PyClical_8clifford_68odd(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
9719 
9720  /* function exit code */
9721  __Pyx_RefNannyFinishContext();
9722  return __pyx_r;
9723  }
9724 
9725  static PyObject *__pyx_pf_8PyClical_8clifford_68odd(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
9726  PyObject *__pyx_r = NULL;
9727  __Pyx_RefNannyDeclarations
9728  PyObject *__pyx_t_1 = NULL;
9729  PyObject *__pyx_t_2 = NULL;
9730  __Pyx_RefNannySetupContext("odd", 0);
9731 
9732  /* "PyClical.pyx":1076
9733  * {1}
9734  * """
9735  * return clifford().wrap( self.instance.odd() ) # <<<<<<<<<<<<<<
9736  *
9737  * def vector_part(self, frm = None):
9738  */
9739  __Pyx_XDECREF(__pyx_r);
9740  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
9741  __Pyx_GOTREF(__pyx_t_1);
9742  __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)
9743  __Pyx_GOTREF(__pyx_t_2);
9744  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9745  __pyx_r = __pyx_t_2;
9746  __pyx_t_2 = 0;
9747  goto __pyx_L0;
9748 
9749  /* "PyClical.pyx":1069
9750  * return clifford().wrap( self.instance.even() )
9751  *
9752  * def odd(self): # <<<<<<<<<<<<<<
9753  * """
9754  * Odd part of multivector, sum of odd grade terms.
9755  */
9756 
9757  /* function exit code */
9758  __pyx_L1_error:;
9759  __Pyx_XDECREF(__pyx_t_1);
9760  __Pyx_XDECREF(__pyx_t_2);
9761  __Pyx_AddTraceback("PyClical.clifford.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
9762  __pyx_r = NULL;
9763  __pyx_L0:;
9764  __Pyx_XGIVEREF(__pyx_r);
9765  __Pyx_RefNannyFinishContext();
9766  return __pyx_r;
9767  }
9768 
9769  /* "PyClical.pyx":1078
9770  * return clifford().wrap( self.instance.odd() )
9771  *
9772  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
9773  * """
9774  * Vector part of multivector, as a Python list, with respect to frm.
9775  */
9776 
9777  /* Python wrapper */
9778  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9779  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 ";
9780  static PyObject *__pyx_pw_8PyClical_8clifford_71vector_part(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9781  PyObject *__pyx_v_frm = 0;
9782  PyObject *__pyx_r = 0;
9783  __Pyx_RefNannyDeclarations
9784  __Pyx_RefNannySetupContext("vector_part (wrapper)", 0);
9785  {
9786  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frm,0};
9787  PyObject* values[1] = {0};
9788  values[0] = ((PyObject *)Py_None);
9789  if (unlikely(__pyx_kwds)) {
9790  Py_ssize_t kw_args;
9791  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9792  switch (pos_args) {
9793  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9794  CYTHON_FALLTHROUGH;
9795  case 0: break;
9796  default: goto __pyx_L5_argtuple_error;
9797  }
9798  kw_args = PyDict_Size(__pyx_kwds);
9799  switch (pos_args) {
9800  case 0:
9801  if (kw_args > 0) {
9802  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_frm);
9803  if (value) { values[0] = value; kw_args--; }
9804  }
9805  }
9806  if (unlikely(kw_args > 0)) {
9807  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vector_part") < 0)) __PYX_ERR(0, 1078, __pyx_L3_error)
9808  }
9809  } else {
9810  switch (PyTuple_GET_SIZE(__pyx_args)) {
9811  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9812  CYTHON_FALLTHROUGH;
9813  case 0: break;
9814  default: goto __pyx_L5_argtuple_error;
9815  }
9816  }
9817  __pyx_v_frm = values[0];
9818  }
9819  goto __pyx_L4_argument_unpacking_done;
9820  __pyx_L5_argtuple_error:;
9821  __Pyx_RaiseArgtupleInvalid("vector_part", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1078, __pyx_L3_error)
9822  __pyx_L3_error:;
9823  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
9824  __Pyx_RefNannyFinishContext();
9825  return NULL;
9826  __pyx_L4_argument_unpacking_done:;
9827  __pyx_r = __pyx_pf_8PyClical_8clifford_70vector_part(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), __pyx_v_frm);
9828 
9829  /* function exit code */
9830  __Pyx_RefNannyFinishContext();
9831  return __pyx_r;
9832  }
9833 
9834  static PyObject *__pyx_pf_8PyClical_8clifford_70vector_part(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_frm) {
9835  PyObject *__pyx_v_error_msg_prefix = NULL;
9836  std::vector<scalar_t> __pyx_v_vec;
9837  int __pyx_v_n;
9838  int __pyx_v_i;
9839  PyObject *__pyx_v_lst = NULL;
9840  PyObject *__pyx_v_err = NULL;
9841  PyObject *__pyx_r = NULL;
9842  __Pyx_RefNannyDeclarations
9843  PyObject *__pyx_t_1 = NULL;
9844  PyObject *__pyx_t_2 = NULL;
9845  PyObject *__pyx_t_3 = NULL;
9846  int __pyx_t_4;
9847  int __pyx_t_5;
9848  std::vector<scalar_t> __pyx_t_6;
9849  PyObject *__pyx_t_7 = NULL;
9850  int __pyx_t_8;
9851  int __pyx_t_9;
9852  int __pyx_t_10;
9853  PyObject *__pyx_t_11 = NULL;
9854  PyObject *__pyx_t_12 = NULL;
9855  PyObject *__pyx_t_13 = NULL;
9856  PyObject *__pyx_t_14 = NULL;
9857  PyObject *__pyx_t_15 = NULL;
9858  __Pyx_RefNannySetupContext("vector_part", 0);
9859 
9860  /* "PyClical.pyx":1087
9861  * [0.0, 2.0, 3.0]
9862  * """
9863  * error_msg_prefix = "Cannot take vector part of " # <<<<<<<<<<<<<<
9864  * cdef vector[scalar_t] vec
9865  * cdef int n
9866  */
9867  __Pyx_INCREF(__pyx_kp_s_Cannot_take_vector_part_of);
9868  __pyx_v_error_msg_prefix = __pyx_kp_s_Cannot_take_vector_part_of;
9869 
9870  /* "PyClical.pyx":1091
9871  * cdef int n
9872  * cdef int i
9873  * try: # <<<<<<<<<<<<<<
9874  * if frm is None:
9875  * vec = self.instance.vector_part()
9876  */
9877  {
9878  __Pyx_PyThreadState_declare
9879  __Pyx_PyThreadState_assign
9880  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9881  __Pyx_XGOTREF(__pyx_t_1);
9882  __Pyx_XGOTREF(__pyx_t_2);
9883  __Pyx_XGOTREF(__pyx_t_3);
9884  /*try:*/ {
9885 
9886  /* "PyClical.pyx":1092
9887  * cdef int i
9888  * try:
9889  * if frm is None: # <<<<<<<<<<<<<<
9890  * vec = self.instance.vector_part()
9891  * else:
9892  */
9893  __pyx_t_4 = (__pyx_v_frm == Py_None);
9894  __pyx_t_5 = (__pyx_t_4 != 0);
9895  if (__pyx_t_5) {
9896 
9897  /* "PyClical.pyx":1093
9898  * try:
9899  * if frm is None:
9900  * vec = self.instance.vector_part() # <<<<<<<<<<<<<<
9901  * else:
9902  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9903  */
9904  __pyx_t_6 = __pyx_v_self->instance->vector_part();
9905  __pyx_v_vec = __pyx_t_6;
9906 
9907  /* "PyClical.pyx":1092
9908  * cdef int i
9909  * try:
9910  * if frm is None: # <<<<<<<<<<<<<<
9911  * vec = self.instance.vector_part()
9912  * else:
9913  */
9914  goto __pyx_L9;
9915  }
9916 
9917  /* "PyClical.pyx":1095
9918  * vec = self.instance.vector_part()
9919  * else:
9920  * vec = self.instance.vector_part((<index_set>frm).unwrap()) # <<<<<<<<<<<<<<
9921  * n = vec.size()
9922  * lst = [0.0]*n
9923  */
9924  /*else*/ {
9925  try {
9926  __pyx_t_6 = __pyx_v_self->instance->vector_part(__pyx_f_8PyClical_9index_set_unwrap(((struct __pyx_obj_8PyClical_index_set *)__pyx_v_frm)));
9927  } catch(...) {
9928  __Pyx_CppExn2PyErr();
9929  __PYX_ERR(0, 1095, __pyx_L3_error)
9930  }
9931  __pyx_v_vec = __pyx_t_6;
9932  }
9933  __pyx_L9:;
9934 
9935  /* "PyClical.pyx":1096
9936  * else:
9937  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9938  * n = vec.size() # <<<<<<<<<<<<<<
9939  * lst = [0.0]*n
9940  * for i in xrange(n):
9941  */
9942  __pyx_v_n = __pyx_v_vec.size();
9943 
9944  /* "PyClical.pyx":1097
9945  * vec = self.instance.vector_part((<index_set>frm).unwrap())
9946  * n = vec.size()
9947  * lst = [0.0]*n # <<<<<<<<<<<<<<
9948  * for i in xrange(n):
9949  * lst[i] = vec[i]
9950  */
9951  __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)
9952  __Pyx_GOTREF(__pyx_t_7);
9953  { Py_ssize_t __pyx_temp;
9954  for (__pyx_temp=0; __pyx_temp < __pyx_v_n; __pyx_temp++) {
9955  __Pyx_INCREF(__pyx_float_0_0);
9956  __Pyx_GIVEREF(__pyx_float_0_0);
9957  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_float_0_0);
9958  }
9959  }
9960  __pyx_v_lst = ((PyObject*)__pyx_t_7);
9961  __pyx_t_7 = 0;
9962 
9963  /* "PyClical.pyx":1098
9964  * n = vec.size()
9965  * lst = [0.0]*n
9966  * for i in xrange(n): # <<<<<<<<<<<<<<
9967  * lst[i] = vec[i]
9968  * return lst
9969  */
9970  __pyx_t_8 = __pyx_v_n;
9971  __pyx_t_9 = __pyx_t_8;
9972  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
9973  __pyx_v_i = __pyx_t_10;
9974 
9975  /* "PyClical.pyx":1099
9976  * lst = [0.0]*n
9977  * for i in xrange(n):
9978  * lst[i] = vec[i] # <<<<<<<<<<<<<<
9979  * return lst
9980  * except RuntimeError as err:
9981  */
9982  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_vec[__pyx_v_i])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1099, __pyx_L3_error)
9983  __Pyx_GOTREF(__pyx_t_7);
9984  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)
9985  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9986  }
9987 
9988  /* "PyClical.pyx":1100
9989  * for i in xrange(n):
9990  * lst[i] = vec[i]
9991  * return lst # <<<<<<<<<<<<<<
9992  * except RuntimeError as err:
9993  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
9994  */
9995  __Pyx_XDECREF(__pyx_r);
9996  __Pyx_INCREF(__pyx_v_lst);
9997  __pyx_r = __pyx_v_lst;
9998  goto __pyx_L7_try_return;
9999 
10000  /* "PyClical.pyx":1091
10001  * cdef int n
10002  * cdef int i
10003  * try: # <<<<<<<<<<<<<<
10004  * if frm is None:
10005  * vec = self.instance.vector_part()
10006  */
10007  }
10008  __pyx_L3_error:;
10009  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10010 
10011  /* "PyClical.pyx":1101
10012  * lst[i] = vec[i]
10013  * return lst
10014  * except RuntimeError as err: # <<<<<<<<<<<<<<
10015  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10016  * + repr(frm) + " as frame:\n\t"
10017  */
10018  __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
10019  if (__pyx_t_8) {
10020  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10021  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_11, &__pyx_t_12) < 0) __PYX_ERR(0, 1101, __pyx_L5_except_error)
10022  __Pyx_GOTREF(__pyx_t_7);
10023  __Pyx_GOTREF(__pyx_t_11);
10024  __Pyx_GOTREF(__pyx_t_12);
10025  __Pyx_INCREF(__pyx_t_11);
10026  __pyx_v_err = __pyx_t_11;
10027 
10028  /* "PyClical.pyx":1102
10029  * return lst
10030  * except RuntimeError as err:
10031  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10032  * + repr(frm) + " as frame:\n\t"
10033  * + str(err))
10034  */
10035  __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)
10036  __Pyx_GOTREF(__pyx_t_13);
10037  __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)
10038  __Pyx_GOTREF(__pyx_t_14);
10039  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10040  __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)
10041  __Pyx_GOTREF(__pyx_t_13);
10042  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10043 
10044  /* "PyClical.pyx":1103
10045  * except RuntimeError as err:
10046  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10047  * + repr(frm) + " as frame:\n\t" # <<<<<<<<<<<<<<
10048  * + str(err))
10049  *
10050  */
10051  __pyx_t_14 = PyObject_Repr(__pyx_v_frm); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10052  __Pyx_GOTREF(__pyx_t_14);
10053  __pyx_t_15 = PyNumber_Add(__pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1103, __pyx_L5_except_error)
10054  __Pyx_GOTREF(__pyx_t_15);
10055  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10056  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10057  __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)
10058  __Pyx_GOTREF(__pyx_t_14);
10059  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10060 
10061  /* "PyClical.pyx":1104
10062  * raise ValueError(error_msg_prefix + str(self) + " using invalid "
10063  * + repr(frm) + " as frame:\n\t"
10064  * + str(err)) # <<<<<<<<<<<<<<
10065  *
10066  * def involute(self):
10067  */
10068  __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)
10069  __Pyx_GOTREF(__pyx_t_15);
10070  __pyx_t_13 = PyNumber_Add(__pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1104, __pyx_L5_except_error)
10071  __Pyx_GOTREF(__pyx_t_13);
10072  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
10073  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10074 
10075  /* "PyClical.pyx":1102
10076  * return lst
10077  * except RuntimeError as err:
10078  * raise ValueError(error_msg_prefix + str(self) + " using invalid " # <<<<<<<<<<<<<<
10079  * + repr(frm) + " as frame:\n\t"
10080  * + str(err))
10081  */
10082  __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)
10083  __Pyx_GOTREF(__pyx_t_15);
10084  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
10085  __Pyx_Raise(__pyx_t_15, 0, 0, 0);
10086  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
10087  __PYX_ERR(0, 1102, __pyx_L5_except_error)
10088  }
10089  goto __pyx_L5_except_error;
10090  __pyx_L5_except_error:;
10091 
10092  /* "PyClical.pyx":1091
10093  * cdef int n
10094  * cdef int i
10095  * try: # <<<<<<<<<<<<<<
10096  * if frm is None:
10097  * vec = self.instance.vector_part()
10098  */
10099  __Pyx_XGIVEREF(__pyx_t_1);
10100  __Pyx_XGIVEREF(__pyx_t_2);
10101  __Pyx_XGIVEREF(__pyx_t_3);
10102  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10103  goto __pyx_L1_error;
10104  __pyx_L7_try_return:;
10105  __Pyx_XGIVEREF(__pyx_t_1);
10106  __Pyx_XGIVEREF(__pyx_t_2);
10107  __Pyx_XGIVEREF(__pyx_t_3);
10108  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
10109  goto __pyx_L0;
10110  }
10111 
10112  /* "PyClical.pyx":1078
10113  * return clifford().wrap( self.instance.odd() )
10114  *
10115  * def vector_part(self, frm = None): # <<<<<<<<<<<<<<
10116  * """
10117  * Vector part of multivector, as a Python list, with respect to frm.
10118  */
10119 
10120  /* function exit code */
10121  __pyx_L1_error:;
10122  __Pyx_XDECREF(__pyx_t_7);
10123  __Pyx_XDECREF(__pyx_t_11);
10124  __Pyx_XDECREF(__pyx_t_12);
10125  __Pyx_XDECREF(__pyx_t_13);
10126  __Pyx_XDECREF(__pyx_t_14);
10127  __Pyx_XDECREF(__pyx_t_15);
10128  __Pyx_AddTraceback("PyClical.clifford.vector_part", __pyx_clineno, __pyx_lineno, __pyx_filename);
10129  __pyx_r = NULL;
10130  __pyx_L0:;
10131  __Pyx_XDECREF(__pyx_v_error_msg_prefix);
10132  __Pyx_XDECREF(__pyx_v_lst);
10133  __Pyx_XDECREF(__pyx_v_err);
10134  __Pyx_XGIVEREF(__pyx_r);
10135  __Pyx_RefNannyFinishContext();
10136  return __pyx_r;
10137  }
10138 
10139  /* "PyClical.pyx":1106
10140  * + str(err))
10141  *
10142  * def involute(self): # <<<<<<<<<<<<<<
10143  * """
10144  * Main involution, each {i} is replaced by -{i} in each term,
10145  */
10146 
10147  /* Python wrapper */
10148  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10149  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 ";
10150  static PyObject *__pyx_pw_8PyClical_8clifford_73involute(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10151  PyObject *__pyx_r = 0;
10152  __Pyx_RefNannyDeclarations
10153  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
10154  __pyx_r = __pyx_pf_8PyClical_8clifford_72involute(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10155 
10156  /* function exit code */
10157  __Pyx_RefNannyFinishContext();
10158  return __pyx_r;
10159  }
10160 
10161  static PyObject *__pyx_pf_8PyClical_8clifford_72involute(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10162  PyObject *__pyx_r = NULL;
10163  __Pyx_RefNannyDeclarations
10164  PyObject *__pyx_t_1 = NULL;
10165  PyObject *__pyx_t_2 = NULL;
10166  __Pyx_RefNannySetupContext("involute", 0);
10167 
10168  /* "PyClical.pyx":1120
10169  * 1-{1}+{1,2}
10170  * """
10171  * return clifford().wrap( self.instance.involute() ) # <<<<<<<<<<<<<<
10172  *
10173  * def reverse(self):
10174  */
10175  __Pyx_XDECREF(__pyx_r);
10176  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
10177  __Pyx_GOTREF(__pyx_t_1);
10178  __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)
10179  __Pyx_GOTREF(__pyx_t_2);
10180  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10181  __pyx_r = __pyx_t_2;
10182  __pyx_t_2 = 0;
10183  goto __pyx_L0;
10184 
10185  /* "PyClical.pyx":1106
10186  * + str(err))
10187  *
10188  * def involute(self): # <<<<<<<<<<<<<<
10189  * """
10190  * Main involution, each {i} is replaced by -{i} in each term,
10191  */
10192 
10193  /* function exit code */
10194  __pyx_L1_error:;
10195  __Pyx_XDECREF(__pyx_t_1);
10196  __Pyx_XDECREF(__pyx_t_2);
10197  __Pyx_AddTraceback("PyClical.clifford.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
10198  __pyx_r = NULL;
10199  __pyx_L0:;
10200  __Pyx_XGIVEREF(__pyx_r);
10201  __Pyx_RefNannyFinishContext();
10202  return __pyx_r;
10203  }
10204 
10205  /* "PyClical.pyx":1122
10206  * return clifford().wrap( self.instance.involute() )
10207  *
10208  * def reverse(self): # <<<<<<<<<<<<<<
10209  * """
10210  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10211  */
10212 
10213  /* Python wrapper */
10214  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10215  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 ";
10216  static PyObject *__pyx_pw_8PyClical_8clifford_75reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10217  PyObject *__pyx_r = 0;
10218  __Pyx_RefNannyDeclarations
10219  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
10220  __pyx_r = __pyx_pf_8PyClical_8clifford_74reverse(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10221 
10222  /* function exit code */
10223  __Pyx_RefNannyFinishContext();
10224  return __pyx_r;
10225  }
10226 
10227  static PyObject *__pyx_pf_8PyClical_8clifford_74reverse(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10228  PyObject *__pyx_r = NULL;
10229  __Pyx_RefNannyDeclarations
10230  PyObject *__pyx_t_1 = NULL;
10231  PyObject *__pyx_t_2 = NULL;
10232  __Pyx_RefNannySetupContext("reverse", 0);
10233 
10234  /* "PyClical.pyx":1135
10235  * 1+{1}-{1,2}
10236  * """
10237  * return clifford().wrap( self.instance.reverse() ) # <<<<<<<<<<<<<<
10238  *
10239  * def conj(self):
10240  */
10241  __Pyx_XDECREF(__pyx_r);
10242  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1135, __pyx_L1_error)
10243  __Pyx_GOTREF(__pyx_t_1);
10244  __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)
10245  __Pyx_GOTREF(__pyx_t_2);
10246  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10247  __pyx_r = __pyx_t_2;
10248  __pyx_t_2 = 0;
10249  goto __pyx_L0;
10250 
10251  /* "PyClical.pyx":1122
10252  * return clifford().wrap( self.instance.involute() )
10253  *
10254  * def reverse(self): # <<<<<<<<<<<<<<
10255  * """
10256  * Reversion, eg. clifford("{1}")*clifford("{2}") -> clifford("{2}")*clifford("{1}").
10257  */
10258 
10259  /* function exit code */
10260  __pyx_L1_error:;
10261  __Pyx_XDECREF(__pyx_t_1);
10262  __Pyx_XDECREF(__pyx_t_2);
10263  __Pyx_AddTraceback("PyClical.clifford.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
10264  __pyx_r = NULL;
10265  __pyx_L0:;
10266  __Pyx_XGIVEREF(__pyx_r);
10267  __Pyx_RefNannyFinishContext();
10268  return __pyx_r;
10269  }
10270 
10271  /* "PyClical.pyx":1137
10272  * return clifford().wrap( self.instance.reverse() )
10273  *
10274  * def conj(self): # <<<<<<<<<<<<<<
10275  * """
10276  * Conjugation, reverse o involute == involute o reverse.
10277  */
10278 
10279  /* Python wrapper */
10280  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10281  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 ";
10282  static PyObject *__pyx_pw_8PyClical_8clifford_77conj(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10283  PyObject *__pyx_r = 0;
10284  __Pyx_RefNannyDeclarations
10285  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
10286  __pyx_r = __pyx_pf_8PyClical_8clifford_76conj(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10287 
10288  /* function exit code */
10289  __Pyx_RefNannyFinishContext();
10290  return __pyx_r;
10291  }
10292 
10293  static PyObject *__pyx_pf_8PyClical_8clifford_76conj(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10294  PyObject *__pyx_r = NULL;
10295  __Pyx_RefNannyDeclarations
10296  PyObject *__pyx_t_1 = NULL;
10297  PyObject *__pyx_t_2 = NULL;
10298  __Pyx_RefNannySetupContext("conj", 0);
10299 
10300  /* "PyClical.pyx":1150
10301  * 1-{1}-{1,2}
10302  * """
10303  * return clifford().wrap( self.instance.conj() ) # <<<<<<<<<<<<<<
10304  *
10305  * def quad(self):
10306  */
10307  __Pyx_XDECREF(__pyx_r);
10308  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error)
10309  __Pyx_GOTREF(__pyx_t_1);
10310  __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)
10311  __Pyx_GOTREF(__pyx_t_2);
10312  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10313  __pyx_r = __pyx_t_2;
10314  __pyx_t_2 = 0;
10315  goto __pyx_L0;
10316 
10317  /* "PyClical.pyx":1137
10318  * return clifford().wrap( self.instance.reverse() )
10319  *
10320  * def conj(self): # <<<<<<<<<<<<<<
10321  * """
10322  * Conjugation, reverse o involute == involute o reverse.
10323  */
10324 
10325  /* function exit code */
10326  __pyx_L1_error:;
10327  __Pyx_XDECREF(__pyx_t_1);
10328  __Pyx_XDECREF(__pyx_t_2);
10329  __Pyx_AddTraceback("PyClical.clifford.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
10330  __pyx_r = NULL;
10331  __pyx_L0:;
10332  __Pyx_XGIVEREF(__pyx_r);
10333  __Pyx_RefNannyFinishContext();
10334  return __pyx_r;
10335  }
10336 
10337  /* "PyClical.pyx":1152
10338  * return clifford().wrap( self.instance.conj() )
10339  *
10340  * def quad(self): # <<<<<<<<<<<<<<
10341  * """
10342  * Quadratic form == (rev(x)*x)(0).
10343  */
10344 
10345  /* Python wrapper */
10346  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10347  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 ";
10348  static PyObject *__pyx_pw_8PyClical_8clifford_79quad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10349  PyObject *__pyx_r = 0;
10350  __Pyx_RefNannyDeclarations
10351  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
10352  __pyx_r = __pyx_pf_8PyClical_8clifford_78quad(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10353 
10354  /* function exit code */
10355  __Pyx_RefNannyFinishContext();
10356  return __pyx_r;
10357  }
10358 
10359  static PyObject *__pyx_pf_8PyClical_8clifford_78quad(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10360  PyObject *__pyx_r = NULL;
10361  __Pyx_RefNannyDeclarations
10362  PyObject *__pyx_t_1 = NULL;
10363  __Pyx_RefNannySetupContext("quad", 0);
10364 
10365  /* "PyClical.pyx":1161
10366  * 2.0
10367  * """
10368  * return self.instance.quad() # <<<<<<<<<<<<<<
10369  *
10370  * def norm(self):
10371  */
10372  __Pyx_XDECREF(__pyx_r);
10373  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->quad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error)
10374  __Pyx_GOTREF(__pyx_t_1);
10375  __pyx_r = __pyx_t_1;
10376  __pyx_t_1 = 0;
10377  goto __pyx_L0;
10378 
10379  /* "PyClical.pyx":1152
10380  * return clifford().wrap( self.instance.conj() )
10381  *
10382  * def quad(self): # <<<<<<<<<<<<<<
10383  * """
10384  * Quadratic form == (rev(x)*x)(0).
10385  */
10386 
10387  /* function exit code */
10388  __pyx_L1_error:;
10389  __Pyx_XDECREF(__pyx_t_1);
10390  __Pyx_AddTraceback("PyClical.clifford.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
10391  __pyx_r = NULL;
10392  __pyx_L0:;
10393  __Pyx_XGIVEREF(__pyx_r);
10394  __Pyx_RefNannyFinishContext();
10395  return __pyx_r;
10396  }
10397 
10398  /* "PyClical.pyx":1163
10399  * return self.instance.quad()
10400  *
10401  * def norm(self): # <<<<<<<<<<<<<<
10402  * """
10403  * Norm == sum of squares of coordinates.
10404  */
10405 
10406  /* Python wrapper */
10407  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10408  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 ";
10409  static PyObject *__pyx_pw_8PyClical_8clifford_81norm(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10410  PyObject *__pyx_r = 0;
10411  __Pyx_RefNannyDeclarations
10412  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
10413  __pyx_r = __pyx_pf_8PyClical_8clifford_80norm(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10414 
10415  /* function exit code */
10416  __Pyx_RefNannyFinishContext();
10417  return __pyx_r;
10418  }
10419 
10420  static PyObject *__pyx_pf_8PyClical_8clifford_80norm(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10421  PyObject *__pyx_r = NULL;
10422  __Pyx_RefNannyDeclarations
10423  PyObject *__pyx_t_1 = NULL;
10424  __Pyx_RefNannySetupContext("norm", 0);
10425 
10426  /* "PyClical.pyx":1172
10427  * 4.0
10428  * """
10429  * return self.instance.norm() # <<<<<<<<<<<<<<
10430  *
10431  * def abs(self):
10432  */
10433  __Pyx_XDECREF(__pyx_r);
10434  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->norm()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
10435  __Pyx_GOTREF(__pyx_t_1);
10436  __pyx_r = __pyx_t_1;
10437  __pyx_t_1 = 0;
10438  goto __pyx_L0;
10439 
10440  /* "PyClical.pyx":1163
10441  * return self.instance.quad()
10442  *
10443  * def norm(self): # <<<<<<<<<<<<<<
10444  * """
10445  * Norm == sum of squares of coordinates.
10446  */
10447 
10448  /* function exit code */
10449  __pyx_L1_error:;
10450  __Pyx_XDECREF(__pyx_t_1);
10451  __Pyx_AddTraceback("PyClical.clifford.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
10452  __pyx_r = NULL;
10453  __pyx_L0:;
10454  __Pyx_XGIVEREF(__pyx_r);
10455  __Pyx_RefNannyFinishContext();
10456  return __pyx_r;
10457  }
10458 
10459  /* "PyClical.pyx":1174
10460  * return self.instance.norm()
10461  *
10462  * def abs(self): # <<<<<<<<<<<<<<
10463  * """
10464  * Absolute value: square root of norm.
10465  */
10466 
10467  /* Python wrapper */
10468  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10469  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 ";
10470  static PyObject *__pyx_pw_8PyClical_8clifford_83abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10471  PyObject *__pyx_r = 0;
10472  __Pyx_RefNannyDeclarations
10473  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
10474  __pyx_r = __pyx_pf_8PyClical_8clifford_82abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10475 
10476  /* function exit code */
10477  __Pyx_RefNannyFinishContext();
10478  return __pyx_r;
10479  }
10480 
10481  static PyObject *__pyx_pf_8PyClical_8clifford_82abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10482  PyObject *__pyx_r = NULL;
10483  __Pyx_RefNannyDeclarations
10484  PyObject *__pyx_t_1 = NULL;
10485  __Pyx_RefNannySetupContext("abs", 0);
10486 
10487  /* "PyClical.pyx":1181
10488  * 2.0
10489  * """
10490  * return glucat.abs( self.unwrap() ) # <<<<<<<<<<<<<<
10491  *
10492  * def max_abs(self):
10493  */
10494  __Pyx_XDECREF(__pyx_r);
10495  __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)
10496  __Pyx_GOTREF(__pyx_t_1);
10497  __pyx_r = __pyx_t_1;
10498  __pyx_t_1 = 0;
10499  goto __pyx_L0;
10500 
10501  /* "PyClical.pyx":1174
10502  * return self.instance.norm()
10503  *
10504  * def abs(self): # <<<<<<<<<<<<<<
10505  * """
10506  * Absolute value: square root of norm.
10507  */
10508 
10509  /* function exit code */
10510  __pyx_L1_error:;
10511  __Pyx_XDECREF(__pyx_t_1);
10512  __Pyx_AddTraceback("PyClical.clifford.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10513  __pyx_r = NULL;
10514  __pyx_L0:;
10515  __Pyx_XGIVEREF(__pyx_r);
10516  __Pyx_RefNannyFinishContext();
10517  return __pyx_r;
10518  }
10519 
10520  /* "PyClical.pyx":1183
10521  * return glucat.abs( self.unwrap() )
10522  *
10523  * def max_abs(self): # <<<<<<<<<<<<<<
10524  * """
10525  * Maximum of absolute values of components of multivector: multivector infinity norm.
10526  */
10527 
10528  /* Python wrapper */
10529  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10530  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 ";
10531  static PyObject *__pyx_pw_8PyClical_8clifford_85max_abs(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10532  PyObject *__pyx_r = 0;
10533  __Pyx_RefNannyDeclarations
10534  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
10535  __pyx_r = __pyx_pf_8PyClical_8clifford_84max_abs(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10536 
10537  /* function exit code */
10538  __Pyx_RefNannyFinishContext();
10539  return __pyx_r;
10540  }
10541 
10542  static PyObject *__pyx_pf_8PyClical_8clifford_84max_abs(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10543  PyObject *__pyx_r = NULL;
10544  __Pyx_RefNannyDeclarations
10545  PyObject *__pyx_t_1 = NULL;
10546  __Pyx_RefNannySetupContext("max_abs", 0);
10547 
10548  /* "PyClical.pyx":1192
10549  * 3.0
10550  * """
10551  * return self.instance.max_abs() # <<<<<<<<<<<<<<
10552  *
10553  * def truncated(self, limit):
10554  */
10555  __Pyx_XDECREF(__pyx_r);
10556  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->instance->max_abs()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
10557  __Pyx_GOTREF(__pyx_t_1);
10558  __pyx_r = __pyx_t_1;
10559  __pyx_t_1 = 0;
10560  goto __pyx_L0;
10561 
10562  /* "PyClical.pyx":1183
10563  * return glucat.abs( self.unwrap() )
10564  *
10565  * def max_abs(self): # <<<<<<<<<<<<<<
10566  * """
10567  * Maximum of absolute values of components of multivector: multivector infinity norm.
10568  */
10569 
10570  /* function exit code */
10571  __pyx_L1_error:;
10572  __Pyx_XDECREF(__pyx_t_1);
10573  __Pyx_AddTraceback("PyClical.clifford.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
10574  __pyx_r = NULL;
10575  __pyx_L0:;
10576  __Pyx_XGIVEREF(__pyx_r);
10577  __Pyx_RefNannyFinishContext();
10578  return __pyx_r;
10579  }
10580 
10581  /* "PyClical.pyx":1194
10582  * return self.instance.max_abs()
10583  *
10584  * def truncated(self, limit): # <<<<<<<<<<<<<<
10585  * """
10586  * Remove all terms of self with relative size smaller than limit.
10587  */
10588 
10589  /* Python wrapper */
10590  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit); /*proto*/
10591  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 ";
10592  static PyObject *__pyx_pw_8PyClical_8clifford_87truncated(PyObject *__pyx_v_self, PyObject *__pyx_v_limit) {
10593  PyObject *__pyx_r = 0;
10594  __Pyx_RefNannyDeclarations
10595  __Pyx_RefNannySetupContext("truncated (wrapper)", 0);
10596  __pyx_r = __pyx_pf_8PyClical_8clifford_86truncated(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v_limit));
10597 
10598  /* function exit code */
10599  __Pyx_RefNannyFinishContext();
10600  return __pyx_r;
10601  }
10602 
10603  static PyObject *__pyx_pf_8PyClical_8clifford_86truncated(struct __pyx_obj_8PyClical_clifford *__pyx_v_self, PyObject *__pyx_v_limit) {
10604  PyObject *__pyx_r = NULL;
10605  __Pyx_RefNannyDeclarations
10606  PyObject *__pyx_t_1 = NULL;
10607  scalar_t __pyx_t_2;
10608  PyObject *__pyx_t_3 = NULL;
10609  __Pyx_RefNannySetupContext("truncated", 0);
10610 
10611  /* "PyClical.pyx":1203
10612  * clifford("10000+{1}")
10613  * """
10614  * return clifford().wrap( self.instance.truncated(limit) ) # <<<<<<<<<<<<<<
10615  *
10616  * def isnan(self):
10617  */
10618  __Pyx_XDECREF(__pyx_r);
10619  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
10620  __Pyx_GOTREF(__pyx_t_1);
10621  __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)
10622  __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)
10623  __Pyx_GOTREF(__pyx_t_3);
10624  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10625  __pyx_r = __pyx_t_3;
10626  __pyx_t_3 = 0;
10627  goto __pyx_L0;
10628 
10629  /* "PyClical.pyx":1194
10630  * return self.instance.max_abs()
10631  *
10632  * def truncated(self, limit): # <<<<<<<<<<<<<<
10633  * """
10634  * Remove all terms of self with relative size smaller than limit.
10635  */
10636 
10637  /* function exit code */
10638  __pyx_L1_error:;
10639  __Pyx_XDECREF(__pyx_t_1);
10640  __Pyx_XDECREF(__pyx_t_3);
10641  __Pyx_AddTraceback("PyClical.clifford.truncated", __pyx_clineno, __pyx_lineno, __pyx_filename);
10642  __pyx_r = NULL;
10643  __pyx_L0:;
10644  __Pyx_XGIVEREF(__pyx_r);
10645  __Pyx_RefNannyFinishContext();
10646  return __pyx_r;
10647  }
10648 
10649  /* "PyClical.pyx":1205
10650  * return clifford().wrap( self.instance.truncated(limit) )
10651  *
10652  * def isnan(self): # <<<<<<<<<<<<<<
10653  * """
10654  * Check if a multivector contains any IEEE NaN values.
10655  */
10656 
10657  /* Python wrapper */
10658  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10659  static char __pyx_doc_8PyClical_8clifford_88isnan[] = "\n Check if a multivector contains any IEEE NaN values.\n\n >>> clifford().isnan()\n False\n ";
10660  static PyObject *__pyx_pw_8PyClical_8clifford_89isnan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10661  PyObject *__pyx_r = 0;
10662  __Pyx_RefNannyDeclarations
10663  __Pyx_RefNannySetupContext("isnan (wrapper)", 0);
10664  __pyx_r = __pyx_pf_8PyClical_8clifford_88isnan(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10665 
10666  /* function exit code */
10667  __Pyx_RefNannyFinishContext();
10668  return __pyx_r;
10669  }
10670 
10671  static PyObject *__pyx_pf_8PyClical_8clifford_88isnan(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10672  PyObject *__pyx_r = NULL;
10673  __Pyx_RefNannyDeclarations
10674  PyObject *__pyx_t_1 = NULL;
10675  __Pyx_RefNannySetupContext("isnan", 0);
10676 
10677  /* "PyClical.pyx":1212
10678  * False
10679  * """
10680  * return self.instance.isnan() # <<<<<<<<<<<<<<
10681  *
10682  * def frame(self):
10683  */
10684  __Pyx_XDECREF(__pyx_r);
10685  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->instance->isnan()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
10686  __Pyx_GOTREF(__pyx_t_1);
10687  __pyx_r = __pyx_t_1;
10688  __pyx_t_1 = 0;
10689  goto __pyx_L0;
10690 
10691  /* "PyClical.pyx":1205
10692  * return clifford().wrap( self.instance.truncated(limit) )
10693  *
10694  * def isnan(self): # <<<<<<<<<<<<<<
10695  * """
10696  * Check if a multivector contains any IEEE NaN values.
10697  */
10698 
10699  /* function exit code */
10700  __pyx_L1_error:;
10701  __Pyx_XDECREF(__pyx_t_1);
10702  __Pyx_AddTraceback("PyClical.clifford.isnan", __pyx_clineno, __pyx_lineno, __pyx_filename);
10703  __pyx_r = NULL;
10704  __pyx_L0:;
10705  __Pyx_XGIVEREF(__pyx_r);
10706  __Pyx_RefNannyFinishContext();
10707  return __pyx_r;
10708  }
10709 
10710  /* "PyClical.pyx":1214
10711  * return self.instance.isnan()
10712  *
10713  * def frame(self): # <<<<<<<<<<<<<<
10714  * """
10715  * Subalgebra generated by all generators of terms of given multivector.
10716  */
10717 
10718  /* Python wrapper */
10719  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10720  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 ";
10721  static PyObject *__pyx_pw_8PyClical_8clifford_91frame(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10722  PyObject *__pyx_r = 0;
10723  __Pyx_RefNannyDeclarations
10724  __Pyx_RefNannySetupContext("frame (wrapper)", 0);
10725  __pyx_r = __pyx_pf_8PyClical_8clifford_90frame(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10726 
10727  /* function exit code */
10728  __Pyx_RefNannyFinishContext();
10729  return __pyx_r;
10730  }
10731 
10732  static PyObject *__pyx_pf_8PyClical_8clifford_90frame(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10733  PyObject *__pyx_r = NULL;
10734  __Pyx_RefNannyDeclarations
10735  PyObject *__pyx_t_1 = NULL;
10736  PyObject *__pyx_t_2 = NULL;
10737  __Pyx_RefNannySetupContext("frame", 0);
10738 
10739  /* "PyClical.pyx":1223
10740  * <type 'PyClical.index_set'>
10741  * """
10742  * return index_set().wrap( self.instance.frame() ) # <<<<<<<<<<<<<<
10743  *
10744  * def __repr__(self):
10745  */
10746  __Pyx_XDECREF(__pyx_r);
10747  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_index_set)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
10748  __Pyx_GOTREF(__pyx_t_1);
10749  __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)
10750  __Pyx_GOTREF(__pyx_t_2);
10751  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10752  __pyx_r = __pyx_t_2;
10753  __pyx_t_2 = 0;
10754  goto __pyx_L0;
10755 
10756  /* "PyClical.pyx":1214
10757  * return self.instance.isnan()
10758  *
10759  * def frame(self): # <<<<<<<<<<<<<<
10760  * """
10761  * Subalgebra generated by all generators of terms of given multivector.
10762  */
10763 
10764  /* function exit code */
10765  __pyx_L1_error:;
10766  __Pyx_XDECREF(__pyx_t_1);
10767  __Pyx_XDECREF(__pyx_t_2);
10768  __Pyx_AddTraceback("PyClical.clifford.frame", __pyx_clineno, __pyx_lineno, __pyx_filename);
10769  __pyx_r = NULL;
10770  __pyx_L0:;
10771  __Pyx_XGIVEREF(__pyx_r);
10772  __Pyx_RefNannyFinishContext();
10773  return __pyx_r;
10774  }
10775 
10776  /* "PyClical.pyx":1225
10777  * return index_set().wrap( self.instance.frame() )
10778  *
10779  * def __repr__(self): # <<<<<<<<<<<<<<
10780  * """
10781  * The official string representation of self.
10782  */
10783 
10784  /* Python wrapper */
10785  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self); /*proto*/
10786  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 ";
10787  #if CYTHON_COMPILING_IN_CPYTHON
10788  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_92__repr__;
10789  #endif
10790  static PyObject *__pyx_pw_8PyClical_8clifford_93__repr__(PyObject *__pyx_v_self) {
10791  PyObject *__pyx_r = 0;
10792  __Pyx_RefNannyDeclarations
10793  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
10794  __pyx_r = __pyx_pf_8PyClical_8clifford_92__repr__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10795 
10796  /* function exit code */
10797  __Pyx_RefNannyFinishContext();
10798  return __pyx_r;
10799  }
10800 
10801  static PyObject *__pyx_pf_8PyClical_8clifford_92__repr__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10802  PyObject *__pyx_r = NULL;
10803  __Pyx_RefNannyDeclarations
10804  PyObject *__pyx_t_1 = NULL;
10805  __Pyx_RefNannySetupContext("__repr__", 0);
10806 
10807  /* "PyClical.pyx":1232
10808  * 'clifford("1+3{-1}+2{1,2}+4{-2,7}")'
10809  * """
10810  * return clifford_to_repr( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10811  *
10812  * def __str__(self):
10813  */
10814  __Pyx_XDECREF(__pyx_r);
10815  __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)
10816  __Pyx_GOTREF(__pyx_t_1);
10817  __pyx_r = __pyx_t_1;
10818  __pyx_t_1 = 0;
10819  goto __pyx_L0;
10820 
10821  /* "PyClical.pyx":1225
10822  * return index_set().wrap( self.instance.frame() )
10823  *
10824  * def __repr__(self): # <<<<<<<<<<<<<<
10825  * """
10826  * The official string representation of self.
10827  */
10828 
10829  /* function exit code */
10830  __pyx_L1_error:;
10831  __Pyx_XDECREF(__pyx_t_1);
10832  __Pyx_AddTraceback("PyClical.clifford.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10833  __pyx_r = NULL;
10834  __pyx_L0:;
10835  __Pyx_XGIVEREF(__pyx_r);
10836  __Pyx_RefNannyFinishContext();
10837  return __pyx_r;
10838  }
10839 
10840  /* "PyClical.pyx":1234
10841  * return clifford_to_repr( self.unwrap() ).c_str()
10842  *
10843  * def __str__(self): # <<<<<<<<<<<<<<
10844  * """
10845  * The informal string representation of self.
10846  */
10847 
10848  /* Python wrapper */
10849  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self); /*proto*/
10850  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 ";
10851  #if CYTHON_COMPILING_IN_CPYTHON
10852  struct wrapperbase __pyx_wrapperbase_8PyClical_8clifford_94__str__;
10853  #endif
10854  static PyObject *__pyx_pw_8PyClical_8clifford_95__str__(PyObject *__pyx_v_self) {
10855  PyObject *__pyx_r = 0;
10856  __Pyx_RefNannyDeclarations
10857  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
10858  __pyx_r = __pyx_pf_8PyClical_8clifford_94__str__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10859 
10860  /* function exit code */
10861  __Pyx_RefNannyFinishContext();
10862  return __pyx_r;
10863  }
10864 
10865  static PyObject *__pyx_pf_8PyClical_8clifford_94__str__(struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10866  PyObject *__pyx_r = NULL;
10867  __Pyx_RefNannyDeclarations
10868  PyObject *__pyx_t_1 = NULL;
10869  __Pyx_RefNannySetupContext("__str__", 0);
10870 
10871  /* "PyClical.pyx":1241
10872  * '1+3{-1}+2{1,2}+4{-2,7}'
10873  * """
10874  * return clifford_to_str( self.unwrap() ).c_str() # <<<<<<<<<<<<<<
10875  *
10876  * def clifford_hidden_doctests():
10877  */
10878  __Pyx_XDECREF(__pyx_r);
10879  __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)
10880  __Pyx_GOTREF(__pyx_t_1);
10881  __pyx_r = __pyx_t_1;
10882  __pyx_t_1 = 0;
10883  goto __pyx_L0;
10884 
10885  /* "PyClical.pyx":1234
10886  * return clifford_to_repr( self.unwrap() ).c_str()
10887  *
10888  * def __str__(self): # <<<<<<<<<<<<<<
10889  * """
10890  * The informal string representation of self.
10891  */
10892 
10893  /* function exit code */
10894  __pyx_L1_error:;
10895  __Pyx_XDECREF(__pyx_t_1);
10896  __Pyx_AddTraceback("PyClical.clifford.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10897  __pyx_r = NULL;
10898  __pyx_L0:;
10899  __Pyx_XGIVEREF(__pyx_r);
10900  __Pyx_RefNannyFinishContext();
10901  return __pyx_r;
10902  }
10903 
10904  /* "(tree fragment)":1
10905  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10906  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10907  * def __setstate_cython__(self, __pyx_state):
10908  */
10909 
10910  /* Python wrapper */
10911  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10912  static PyObject *__pyx_pw_8PyClical_8clifford_97__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10913  PyObject *__pyx_r = 0;
10914  __Pyx_RefNannyDeclarations
10915  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10916  __pyx_r = __pyx_pf_8PyClical_8clifford_96__reduce_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self));
10917 
10918  /* function exit code */
10919  __Pyx_RefNannyFinishContext();
10920  return __pyx_r;
10921  }
10922 
10923  static PyObject *__pyx_pf_8PyClical_8clifford_96__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8PyClical_clifford *__pyx_v_self) {
10924  PyObject *__pyx_r = NULL;
10925  __Pyx_RefNannyDeclarations
10926  PyObject *__pyx_t_1 = NULL;
10927  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10928 
10929  /* "(tree fragment)":2
10930  * def __reduce_cython__(self):
10931  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10932  * def __setstate_cython__(self, __pyx_state):
10933  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10934  */
10935  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
10936  __Pyx_GOTREF(__pyx_t_1);
10937  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10939  __PYX_ERR(1, 2, __pyx_L1_error)
10940 
10941  /* "(tree fragment)":1
10942  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10943  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10944  * def __setstate_cython__(self, __pyx_state):
10945  */
10946 
10947  /* function exit code */
10948  __pyx_L1_error:;
10949  __Pyx_XDECREF(__pyx_t_1);
10950  __Pyx_AddTraceback("PyClical.clifford.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10951  __pyx_r = NULL;
10952  __Pyx_XGIVEREF(__pyx_r);
10953  __Pyx_RefNannyFinishContext();
10954  return __pyx_r;
10955  }
10956 
10957  /* "(tree fragment)":3
10958  * def __reduce_cython__(self):
10959  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10960  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10961  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10962  */
10963 
10964  /* Python wrapper */
10965  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
10966  static PyObject *__pyx_pw_8PyClical_8clifford_99__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10967  PyObject *__pyx_r = 0;
10968  __Pyx_RefNannyDeclarations
10969  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10970  __pyx_r = __pyx_pf_8PyClical_8clifford_98__setstate_cython__(((struct __pyx_obj_8PyClical_clifford *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10971 
10972  /* function exit code */
10973  __Pyx_RefNannyFinishContext();
10974  return __pyx_r;
10975  }
10976 
10977  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) {
10978  PyObject *__pyx_r = NULL;
10979  __Pyx_RefNannyDeclarations
10980  PyObject *__pyx_t_1 = NULL;
10981  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10982 
10983  /* "(tree fragment)":4
10984  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10985  * def __setstate_cython__(self, __pyx_state):
10986  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10987  */
10988  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
10989  __Pyx_GOTREF(__pyx_t_1);
10990  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10991  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10992  __PYX_ERR(1, 4, __pyx_L1_error)
10993 
10994  /* "(tree fragment)":3
10995  * def __reduce_cython__(self):
10996  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10997  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10998  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10999  */
11000 
11001  /* function exit code */
11002  __pyx_L1_error:;
11003  __Pyx_XDECREF(__pyx_t_1);
11004  __Pyx_AddTraceback("PyClical.clifford.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11005  __pyx_r = NULL;
11006  __Pyx_XGIVEREF(__pyx_r);
11007  __Pyx_RefNannyFinishContext();
11008  return __pyx_r;
11009  }
11010 
11011  /* "PyClical.pyx":1243
11012  * return clifford_to_str( self.unwrap() ).c_str()
11013  *
11014  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11015  * """
11016  * Tests for functions that Doctest cannot see.
11017  */
11018 
11019  /* Python wrapper */
11020  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
11021  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 ";
11022  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};
11023  static PyObject *__pyx_pw_8PyClical_9clifford_hidden_doctests(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
11024  PyObject *__pyx_r = 0;
11025  __Pyx_RefNannyDeclarations
11026  __Pyx_RefNannySetupContext("clifford_hidden_doctests (wrapper)", 0);
11027  __pyx_r = __pyx_pf_8PyClical_8clifford_hidden_doctests(__pyx_self);
11028 
11029  /* function exit code */
11030  __Pyx_RefNannyFinishContext();
11031  return __pyx_r;
11032  }
11033 
11034  static PyObject *__pyx_pf_8PyClical_8clifford_hidden_doctests(CYTHON_UNUSED PyObject *__pyx_self) {
11035  PyObject *__pyx_r = NULL;
11036  __Pyx_RefNannyDeclarations
11037  __Pyx_RefNannySetupContext("clifford_hidden_doctests", 0);
11038 
11039  /* "PyClical.pyx":1327
11040  * True
11041  * """
11042  * return # <<<<<<<<<<<<<<
11043  *
11044  * cpdef inline inv(obj):
11045  */
11046  __Pyx_XDECREF(__pyx_r);
11047  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11048  goto __pyx_L0;
11049 
11050  /* "PyClical.pyx":1243
11051  * return clifford_to_str( self.unwrap() ).c_str()
11052  *
11053  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
11054  * """
11055  * Tests for functions that Doctest cannot see.
11056  */
11057 
11058  /* function exit code */
11059  __pyx_L0:;
11060  __Pyx_XGIVEREF(__pyx_r);
11061  __Pyx_RefNannyFinishContext();
11062  return __pyx_r;
11063  }
11064 
11065  /* "PyClical.pyx":1329
11066  * return
11067  *
11068  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11069  * """
11070  * Geometric multiplicative inverse.
11071  */
11072 
11073  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11074  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_inv(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11075  PyObject *__pyx_r = NULL;
11076  __Pyx_RefNannyDeclarations
11077  PyObject *__pyx_t_1 = NULL;
11078  PyObject *__pyx_t_2 = NULL;
11079  PyObject *__pyx_t_3 = NULL;
11080  __Pyx_RefNannySetupContext("inv", 0);
11081 
11082  /* "PyClical.pyx":1342
11083  * nan
11084  * """
11085  * return clifford(obj).inv() # <<<<<<<<<<<<<<
11086  *
11087  * cpdef inline scalar(obj):
11088  */
11089  __Pyx_XDECREF(__pyx_r);
11090  __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)
11091  __Pyx_GOTREF(__pyx_t_2);
11092  __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)
11093  __Pyx_GOTREF(__pyx_t_3);
11094  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11095  __pyx_t_2 = NULL;
11096  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11097  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11098  if (likely(__pyx_t_2)) {
11099  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11100  __Pyx_INCREF(__pyx_t_2);
11101  __Pyx_INCREF(function);
11102  __Pyx_DECREF_SET(__pyx_t_3, function);
11103  }
11104  }
11105  if (__pyx_t_2) {
11106  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11107  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11108  } else {
11109  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
11110  }
11111  __Pyx_GOTREF(__pyx_t_1);
11112  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11113  __pyx_r = __pyx_t_1;
11114  __pyx_t_1 = 0;
11115  goto __pyx_L0;
11116 
11117  /* "PyClical.pyx":1329
11118  * return
11119  *
11120  * cpdef inline inv(obj): # <<<<<<<<<<<<<<
11121  * """
11122  * Geometric multiplicative inverse.
11123  */
11124 
11125  /* function exit code */
11126  __pyx_L1_error:;
11127  __Pyx_XDECREF(__pyx_t_1);
11128  __Pyx_XDECREF(__pyx_t_2);
11129  __Pyx_XDECREF(__pyx_t_3);
11130  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11131  __pyx_r = 0;
11132  __pyx_L0:;
11133  __Pyx_XGIVEREF(__pyx_r);
11134  __Pyx_RefNannyFinishContext();
11135  return __pyx_r;
11136  }
11137 
11138  /* Python wrapper */
11139  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11140  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 ";
11141  static PyObject *__pyx_pw_8PyClical_11inv(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11142  PyObject *__pyx_r = 0;
11143  __Pyx_RefNannyDeclarations
11144  __Pyx_RefNannySetupContext("inv (wrapper)", 0);
11145  __pyx_r = __pyx_pf_8PyClical_10inv(__pyx_self, ((PyObject *)__pyx_v_obj));
11146 
11147  /* function exit code */
11148  __Pyx_RefNannyFinishContext();
11149  return __pyx_r;
11150  }
11151 
11152  static PyObject *__pyx_pf_8PyClical_10inv(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11153  PyObject *__pyx_r = NULL;
11154  __Pyx_RefNannyDeclarations
11155  PyObject *__pyx_t_1 = NULL;
11156  __Pyx_RefNannySetupContext("inv", 0);
11157  __Pyx_XDECREF(__pyx_r);
11158  __pyx_t_1 = __pyx_f_8PyClical_inv(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
11159  __Pyx_GOTREF(__pyx_t_1);
11160  __pyx_r = __pyx_t_1;
11161  __pyx_t_1 = 0;
11162  goto __pyx_L0;
11163 
11164  /* function exit code */
11165  __pyx_L1_error:;
11166  __Pyx_XDECREF(__pyx_t_1);
11167  __Pyx_AddTraceback("PyClical.inv", __pyx_clineno, __pyx_lineno, __pyx_filename);
11168  __pyx_r = NULL;
11169  __pyx_L0:;
11170  __Pyx_XGIVEREF(__pyx_r);
11171  __Pyx_RefNannyFinishContext();
11172  return __pyx_r;
11173  }
11174 
11175  /* "PyClical.pyx":1344
11176  * return clifford(obj).inv()
11177  *
11178  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11179  * """
11180  * Scalar part.
11181  */
11182 
11183  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11184  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_scalar(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11185  PyObject *__pyx_r = NULL;
11186  __Pyx_RefNannyDeclarations
11187  PyObject *__pyx_t_1 = NULL;
11188  PyObject *__pyx_t_2 = NULL;
11189  PyObject *__pyx_t_3 = NULL;
11190  __Pyx_RefNannySetupContext("scalar", 0);
11191 
11192  /* "PyClical.pyx":1353
11193  * 0.0
11194  * """
11195  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11196  *
11197  * cpdef inline real(obj):
11198  */
11199  __Pyx_XDECREF(__pyx_r);
11200  __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)
11201  __Pyx_GOTREF(__pyx_t_2);
11202  __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)
11203  __Pyx_GOTREF(__pyx_t_3);
11204  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11205  __pyx_t_2 = NULL;
11206  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11207  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11208  if (likely(__pyx_t_2)) {
11209  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11210  __Pyx_INCREF(__pyx_t_2);
11211  __Pyx_INCREF(function);
11212  __Pyx_DECREF_SET(__pyx_t_3, function);
11213  }
11214  }
11215  if (__pyx_t_2) {
11216  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11217  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11218  } else {
11219  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
11220  }
11221  __Pyx_GOTREF(__pyx_t_1);
11222  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11223  __pyx_r = __pyx_t_1;
11224  __pyx_t_1 = 0;
11225  goto __pyx_L0;
11226 
11227  /* "PyClical.pyx":1344
11228  * return clifford(obj).inv()
11229  *
11230  * cpdef inline scalar(obj): # <<<<<<<<<<<<<<
11231  * """
11232  * Scalar part.
11233  */
11234 
11235  /* function exit code */
11236  __pyx_L1_error:;
11237  __Pyx_XDECREF(__pyx_t_1);
11238  __Pyx_XDECREF(__pyx_t_2);
11239  __Pyx_XDECREF(__pyx_t_3);
11240  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11241  __pyx_r = 0;
11242  __pyx_L0:;
11243  __Pyx_XGIVEREF(__pyx_r);
11244  __Pyx_RefNannyFinishContext();
11245  return __pyx_r;
11246  }
11247 
11248  /* Python wrapper */
11249  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11250  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 ";
11251  static PyObject *__pyx_pw_8PyClical_13scalar(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11252  PyObject *__pyx_r = 0;
11253  __Pyx_RefNannyDeclarations
11254  __Pyx_RefNannySetupContext("scalar (wrapper)", 0);
11255  __pyx_r = __pyx_pf_8PyClical_12scalar(__pyx_self, ((PyObject *)__pyx_v_obj));
11256 
11257  /* function exit code */
11258  __Pyx_RefNannyFinishContext();
11259  return __pyx_r;
11260  }
11261 
11262  static PyObject *__pyx_pf_8PyClical_12scalar(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11263  PyObject *__pyx_r = NULL;
11264  __Pyx_RefNannyDeclarations
11265  PyObject *__pyx_t_1 = NULL;
11266  __Pyx_RefNannySetupContext("scalar", 0);
11267  __Pyx_XDECREF(__pyx_r);
11268  __pyx_t_1 = __pyx_f_8PyClical_scalar(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error)
11269  __Pyx_GOTREF(__pyx_t_1);
11270  __pyx_r = __pyx_t_1;
11271  __pyx_t_1 = 0;
11272  goto __pyx_L0;
11273 
11274  /* function exit code */
11275  __pyx_L1_error:;
11276  __Pyx_XDECREF(__pyx_t_1);
11277  __Pyx_AddTraceback("PyClical.scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
11278  __pyx_r = NULL;
11279  __pyx_L0:;
11280  __Pyx_XGIVEREF(__pyx_r);
11281  __Pyx_RefNannyFinishContext();
11282  return __pyx_r;
11283  }
11284 
11285  /* "PyClical.pyx":1355
11286  * return clifford(obj).scalar()
11287  *
11288  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11289  * """
11290  * Real part: synonym for scalar part.
11291  */
11292 
11293  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11294  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_real(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11295  PyObject *__pyx_r = NULL;
11296  __Pyx_RefNannyDeclarations
11297  PyObject *__pyx_t_1 = NULL;
11298  PyObject *__pyx_t_2 = NULL;
11299  PyObject *__pyx_t_3 = NULL;
11300  __Pyx_RefNannySetupContext("real", 0);
11301 
11302  /* "PyClical.pyx":1364
11303  * 0.0
11304  * """
11305  * return clifford(obj).scalar() # <<<<<<<<<<<<<<
11306  *
11307  * cpdef inline imag(obj):
11308  */
11309  __Pyx_XDECREF(__pyx_r);
11310  __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)
11311  __Pyx_GOTREF(__pyx_t_2);
11312  __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)
11313  __Pyx_GOTREF(__pyx_t_3);
11314  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11315  __pyx_t_2 = NULL;
11316  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11317  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11318  if (likely(__pyx_t_2)) {
11319  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11320  __Pyx_INCREF(__pyx_t_2);
11321  __Pyx_INCREF(function);
11322  __Pyx_DECREF_SET(__pyx_t_3, function);
11323  }
11324  }
11325  if (__pyx_t_2) {
11326  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11327  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11328  } else {
11329  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
11330  }
11331  __Pyx_GOTREF(__pyx_t_1);
11332  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11333  __pyx_r = __pyx_t_1;
11334  __pyx_t_1 = 0;
11335  goto __pyx_L0;
11336 
11337  /* "PyClical.pyx":1355
11338  * return clifford(obj).scalar()
11339  *
11340  * cpdef inline real(obj): # <<<<<<<<<<<<<<
11341  * """
11342  * Real part: synonym for scalar part.
11343  */
11344 
11345  /* function exit code */
11346  __pyx_L1_error:;
11347  __Pyx_XDECREF(__pyx_t_1);
11348  __Pyx_XDECREF(__pyx_t_2);
11349  __Pyx_XDECREF(__pyx_t_3);
11350  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11351  __pyx_r = 0;
11352  __pyx_L0:;
11353  __Pyx_XGIVEREF(__pyx_r);
11354  __Pyx_RefNannyFinishContext();
11355  return __pyx_r;
11356  }
11357 
11358  /* Python wrapper */
11359  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11360  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 ";
11361  static PyObject *__pyx_pw_8PyClical_15real(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11362  PyObject *__pyx_r = 0;
11363  __Pyx_RefNannyDeclarations
11364  __Pyx_RefNannySetupContext("real (wrapper)", 0);
11365  __pyx_r = __pyx_pf_8PyClical_14real(__pyx_self, ((PyObject *)__pyx_v_obj));
11366 
11367  /* function exit code */
11368  __Pyx_RefNannyFinishContext();
11369  return __pyx_r;
11370  }
11371 
11372  static PyObject *__pyx_pf_8PyClical_14real(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11373  PyObject *__pyx_r = NULL;
11374  __Pyx_RefNannyDeclarations
11375  PyObject *__pyx_t_1 = NULL;
11376  __Pyx_RefNannySetupContext("real", 0);
11377  __Pyx_XDECREF(__pyx_r);
11378  __pyx_t_1 = __pyx_f_8PyClical_real(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
11379  __Pyx_GOTREF(__pyx_t_1);
11380  __pyx_r = __pyx_t_1;
11381  __pyx_t_1 = 0;
11382  goto __pyx_L0;
11383 
11384  /* function exit code */
11385  __pyx_L1_error:;
11386  __Pyx_XDECREF(__pyx_t_1);
11387  __Pyx_AddTraceback("PyClical.real", __pyx_clineno, __pyx_lineno, __pyx_filename);
11388  __pyx_r = NULL;
11389  __pyx_L0:;
11390  __Pyx_XGIVEREF(__pyx_r);
11391  __Pyx_RefNannyFinishContext();
11392  return __pyx_r;
11393  }
11394 
11395  /* "PyClical.pyx":1366
11396  * return clifford(obj).scalar()
11397  *
11398  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11399  * """
11400  * Imaginary part: deprecated (always 0).
11401  */
11402 
11403  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11404  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_imag(CYTHON_UNUSED PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11405  PyObject *__pyx_r = NULL;
11406  __Pyx_RefNannyDeclarations
11407  __Pyx_RefNannySetupContext("imag", 0);
11408 
11409  /* "PyClical.pyx":1375
11410  * 0.0
11411  * """
11412  * return 0.0 # <<<<<<<<<<<<<<
11413  *
11414  * cpdef inline pure(obj):
11415  */
11416  __Pyx_XDECREF(__pyx_r);
11417  __Pyx_INCREF(__pyx_float_0_0);
11418  __pyx_r = __pyx_float_0_0;
11419  goto __pyx_L0;
11420 
11421  /* "PyClical.pyx":1366
11422  * return clifford(obj).scalar()
11423  *
11424  * cpdef inline imag(obj): # <<<<<<<<<<<<<<
11425  * """
11426  * Imaginary part: deprecated (always 0).
11427  */
11428 
11429  /* function exit code */
11430  __pyx_L0:;
11431  __Pyx_XGIVEREF(__pyx_r);
11432  __Pyx_RefNannyFinishContext();
11433  return __pyx_r;
11434  }
11435 
11436  /* Python wrapper */
11437  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11438  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 ";
11439  static PyObject *__pyx_pw_8PyClical_17imag(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11440  PyObject *__pyx_r = 0;
11441  __Pyx_RefNannyDeclarations
11442  __Pyx_RefNannySetupContext("imag (wrapper)", 0);
11443  __pyx_r = __pyx_pf_8PyClical_16imag(__pyx_self, ((PyObject *)__pyx_v_obj));
11444 
11445  /* function exit code */
11446  __Pyx_RefNannyFinishContext();
11447  return __pyx_r;
11448  }
11449 
11450  static PyObject *__pyx_pf_8PyClical_16imag(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11451  PyObject *__pyx_r = NULL;
11452  __Pyx_RefNannyDeclarations
11453  PyObject *__pyx_t_1 = NULL;
11454  __Pyx_RefNannySetupContext("imag", 0);
11455  __Pyx_XDECREF(__pyx_r);
11456  __pyx_t_1 = __pyx_f_8PyClical_imag(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error)
11457  __Pyx_GOTREF(__pyx_t_1);
11458  __pyx_r = __pyx_t_1;
11459  __pyx_t_1 = 0;
11460  goto __pyx_L0;
11461 
11462  /* function exit code */
11463  __pyx_L1_error:;
11464  __Pyx_XDECREF(__pyx_t_1);
11465  __Pyx_AddTraceback("PyClical.imag", __pyx_clineno, __pyx_lineno, __pyx_filename);
11466  __pyx_r = NULL;
11467  __pyx_L0:;
11468  __Pyx_XGIVEREF(__pyx_r);
11469  __Pyx_RefNannyFinishContext();
11470  return __pyx_r;
11471  }
11472 
11473  /* "PyClical.pyx":1377
11474  * return 0.0
11475  *
11476  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11477  * """
11478  * Pure part
11479  */
11480 
11481  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11482  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pure(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11483  PyObject *__pyx_r = NULL;
11484  __Pyx_RefNannyDeclarations
11485  PyObject *__pyx_t_1 = NULL;
11486  PyObject *__pyx_t_2 = NULL;
11487  PyObject *__pyx_t_3 = NULL;
11488  __Pyx_RefNannySetupContext("pure", 0);
11489 
11490  /* "PyClical.pyx":1386
11491  * {1,2}
11492  * """
11493  * return clifford(obj).pure() # <<<<<<<<<<<<<<
11494  *
11495  * cpdef inline even(obj):
11496  */
11497  __Pyx_XDECREF(__pyx_r);
11498  __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)
11499  __Pyx_GOTREF(__pyx_t_2);
11500  __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)
11501  __Pyx_GOTREF(__pyx_t_3);
11502  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11503  __pyx_t_2 = NULL;
11504  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11505  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11506  if (likely(__pyx_t_2)) {
11507  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11508  __Pyx_INCREF(__pyx_t_2);
11509  __Pyx_INCREF(function);
11510  __Pyx_DECREF_SET(__pyx_t_3, function);
11511  }
11512  }
11513  if (__pyx_t_2) {
11514  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11515  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11516  } else {
11517  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
11518  }
11519  __Pyx_GOTREF(__pyx_t_1);
11520  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11521  __pyx_r = __pyx_t_1;
11522  __pyx_t_1 = 0;
11523  goto __pyx_L0;
11524 
11525  /* "PyClical.pyx":1377
11526  * return 0.0
11527  *
11528  * cpdef inline pure(obj): # <<<<<<<<<<<<<<
11529  * """
11530  * Pure part
11531  */
11532 
11533  /* function exit code */
11534  __pyx_L1_error:;
11535  __Pyx_XDECREF(__pyx_t_1);
11536  __Pyx_XDECREF(__pyx_t_2);
11537  __Pyx_XDECREF(__pyx_t_3);
11538  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11539  __pyx_r = 0;
11540  __pyx_L0:;
11541  __Pyx_XGIVEREF(__pyx_r);
11542  __Pyx_RefNannyFinishContext();
11543  return __pyx_r;
11544  }
11545 
11546  /* Python wrapper */
11547  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11548  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 ";
11549  static PyObject *__pyx_pw_8PyClical_19pure(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11550  PyObject *__pyx_r = 0;
11551  __Pyx_RefNannyDeclarations
11552  __Pyx_RefNannySetupContext("pure (wrapper)", 0);
11553  __pyx_r = __pyx_pf_8PyClical_18pure(__pyx_self, ((PyObject *)__pyx_v_obj));
11554 
11555  /* function exit code */
11556  __Pyx_RefNannyFinishContext();
11557  return __pyx_r;
11558  }
11559 
11560  static PyObject *__pyx_pf_8PyClical_18pure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11561  PyObject *__pyx_r = NULL;
11562  __Pyx_RefNannyDeclarations
11563  PyObject *__pyx_t_1 = NULL;
11564  __Pyx_RefNannySetupContext("pure", 0);
11565  __Pyx_XDECREF(__pyx_r);
11566  __pyx_t_1 = __pyx_f_8PyClical_pure(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error)
11567  __Pyx_GOTREF(__pyx_t_1);
11568  __pyx_r = __pyx_t_1;
11569  __pyx_t_1 = 0;
11570  goto __pyx_L0;
11571 
11572  /* function exit code */
11573  __pyx_L1_error:;
11574  __Pyx_XDECREF(__pyx_t_1);
11575  __Pyx_AddTraceback("PyClical.pure", __pyx_clineno, __pyx_lineno, __pyx_filename);
11576  __pyx_r = NULL;
11577  __pyx_L0:;
11578  __Pyx_XGIVEREF(__pyx_r);
11579  __Pyx_RefNannyFinishContext();
11580  return __pyx_r;
11581  }
11582 
11583  /* "PyClical.pyx":1388
11584  * return clifford(obj).pure()
11585  *
11586  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11587  * """
11588  * Even part of multivector, sum of even grade terms.
11589  */
11590 
11591  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11592  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_even(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11593  PyObject *__pyx_r = NULL;
11594  __Pyx_RefNannyDeclarations
11595  PyObject *__pyx_t_1 = NULL;
11596  PyObject *__pyx_t_2 = NULL;
11597  PyObject *__pyx_t_3 = NULL;
11598  __Pyx_RefNannySetupContext("even", 0);
11599 
11600  /* "PyClical.pyx":1395
11601  * 1+{1,2}
11602  * """
11603  * return clifford(obj).even() # <<<<<<<<<<<<<<
11604  *
11605  * cpdef inline odd(obj):
11606  */
11607  __Pyx_XDECREF(__pyx_r);
11608  __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)
11609  __Pyx_GOTREF(__pyx_t_2);
11610  __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)
11611  __Pyx_GOTREF(__pyx_t_3);
11612  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11613  __pyx_t_2 = NULL;
11614  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11615  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11616  if (likely(__pyx_t_2)) {
11617  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11618  __Pyx_INCREF(__pyx_t_2);
11619  __Pyx_INCREF(function);
11620  __Pyx_DECREF_SET(__pyx_t_3, function);
11621  }
11622  }
11623  if (__pyx_t_2) {
11624  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11625  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11626  } else {
11627  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L1_error)
11628  }
11629  __Pyx_GOTREF(__pyx_t_1);
11630  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11631  __pyx_r = __pyx_t_1;
11632  __pyx_t_1 = 0;
11633  goto __pyx_L0;
11634 
11635  /* "PyClical.pyx":1388
11636  * return clifford(obj).pure()
11637  *
11638  * cpdef inline even(obj): # <<<<<<<<<<<<<<
11639  * """
11640  * Even part of multivector, sum of even grade terms.
11641  */
11642 
11643  /* function exit code */
11644  __pyx_L1_error:;
11645  __Pyx_XDECREF(__pyx_t_1);
11646  __Pyx_XDECREF(__pyx_t_2);
11647  __Pyx_XDECREF(__pyx_t_3);
11648  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11649  __pyx_r = 0;
11650  __pyx_L0:;
11651  __Pyx_XGIVEREF(__pyx_r);
11652  __Pyx_RefNannyFinishContext();
11653  return __pyx_r;
11654  }
11655 
11656  /* Python wrapper */
11657  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11658  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 ";
11659  static PyObject *__pyx_pw_8PyClical_21even(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11660  PyObject *__pyx_r = 0;
11661  __Pyx_RefNannyDeclarations
11662  __Pyx_RefNannySetupContext("even (wrapper)", 0);
11663  __pyx_r = __pyx_pf_8PyClical_20even(__pyx_self, ((PyObject *)__pyx_v_obj));
11664 
11665  /* function exit code */
11666  __Pyx_RefNannyFinishContext();
11667  return __pyx_r;
11668  }
11669 
11670  static PyObject *__pyx_pf_8PyClical_20even(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11671  PyObject *__pyx_r = NULL;
11672  __Pyx_RefNannyDeclarations
11673  PyObject *__pyx_t_1 = NULL;
11674  __Pyx_RefNannySetupContext("even", 0);
11675  __Pyx_XDECREF(__pyx_r);
11676  __pyx_t_1 = __pyx_f_8PyClical_even(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
11677  __Pyx_GOTREF(__pyx_t_1);
11678  __pyx_r = __pyx_t_1;
11679  __pyx_t_1 = 0;
11680  goto __pyx_L0;
11681 
11682  /* function exit code */
11683  __pyx_L1_error:;
11684  __Pyx_XDECREF(__pyx_t_1);
11685  __Pyx_AddTraceback("PyClical.even", __pyx_clineno, __pyx_lineno, __pyx_filename);
11686  __pyx_r = NULL;
11687  __pyx_L0:;
11688  __Pyx_XGIVEREF(__pyx_r);
11689  __Pyx_RefNannyFinishContext();
11690  return __pyx_r;
11691  }
11692 
11693  /* "PyClical.pyx":1397
11694  * return clifford(obj).even()
11695  *
11696  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11697  * """
11698  * Odd part of multivector, sum of odd grade terms.
11699  */
11700 
11701  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11702  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_odd(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11703  PyObject *__pyx_r = NULL;
11704  __Pyx_RefNannyDeclarations
11705  PyObject *__pyx_t_1 = NULL;
11706  PyObject *__pyx_t_2 = NULL;
11707  PyObject *__pyx_t_3 = NULL;
11708  __Pyx_RefNannySetupContext("odd", 0);
11709 
11710  /* "PyClical.pyx":1404
11711  * {1}
11712  * """
11713  * return clifford(obj).odd() # <<<<<<<<<<<<<<
11714  *
11715  * cpdef inline involute(obj):
11716  */
11717  __Pyx_XDECREF(__pyx_r);
11718  __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)
11719  __Pyx_GOTREF(__pyx_t_2);
11720  __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)
11721  __Pyx_GOTREF(__pyx_t_3);
11722  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11723  __pyx_t_2 = NULL;
11724  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11725  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11726  if (likely(__pyx_t_2)) {
11727  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11728  __Pyx_INCREF(__pyx_t_2);
11729  __Pyx_INCREF(function);
11730  __Pyx_DECREF_SET(__pyx_t_3, function);
11731  }
11732  }
11733  if (__pyx_t_2) {
11734  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11735  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11736  } else {
11737  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
11738  }
11739  __Pyx_GOTREF(__pyx_t_1);
11740  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11741  __pyx_r = __pyx_t_1;
11742  __pyx_t_1 = 0;
11743  goto __pyx_L0;
11744 
11745  /* "PyClical.pyx":1397
11746  * return clifford(obj).even()
11747  *
11748  * cpdef inline odd(obj): # <<<<<<<<<<<<<<
11749  * """
11750  * Odd part of multivector, sum of odd grade terms.
11751  */
11752 
11753  /* function exit code */
11754  __pyx_L1_error:;
11755  __Pyx_XDECREF(__pyx_t_1);
11756  __Pyx_XDECREF(__pyx_t_2);
11757  __Pyx_XDECREF(__pyx_t_3);
11758  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11759  __pyx_r = 0;
11760  __pyx_L0:;
11761  __Pyx_XGIVEREF(__pyx_r);
11762  __Pyx_RefNannyFinishContext();
11763  return __pyx_r;
11764  }
11765 
11766  /* Python wrapper */
11767  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11768  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 ";
11769  static PyObject *__pyx_pw_8PyClical_23odd(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11770  PyObject *__pyx_r = 0;
11771  __Pyx_RefNannyDeclarations
11772  __Pyx_RefNannySetupContext("odd (wrapper)", 0);
11773  __pyx_r = __pyx_pf_8PyClical_22odd(__pyx_self, ((PyObject *)__pyx_v_obj));
11774 
11775  /* function exit code */
11776  __Pyx_RefNannyFinishContext();
11777  return __pyx_r;
11778  }
11779 
11780  static PyObject *__pyx_pf_8PyClical_22odd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11781  PyObject *__pyx_r = NULL;
11782  __Pyx_RefNannyDeclarations
11783  PyObject *__pyx_t_1 = NULL;
11784  __Pyx_RefNannySetupContext("odd", 0);
11785  __Pyx_XDECREF(__pyx_r);
11786  __pyx_t_1 = __pyx_f_8PyClical_odd(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error)
11787  __Pyx_GOTREF(__pyx_t_1);
11788  __pyx_r = __pyx_t_1;
11789  __pyx_t_1 = 0;
11790  goto __pyx_L0;
11791 
11792  /* function exit code */
11793  __pyx_L1_error:;
11794  __Pyx_XDECREF(__pyx_t_1);
11795  __Pyx_AddTraceback("PyClical.odd", __pyx_clineno, __pyx_lineno, __pyx_filename);
11796  __pyx_r = NULL;
11797  __pyx_L0:;
11798  __Pyx_XGIVEREF(__pyx_r);
11799  __Pyx_RefNannyFinishContext();
11800  return __pyx_r;
11801  }
11802 
11803  /* "PyClical.pyx":1406
11804  * return clifford(obj).odd()
11805  *
11806  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11807  * """
11808  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11809  */
11810 
11811  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11812  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_involute(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11813  PyObject *__pyx_r = NULL;
11814  __Pyx_RefNannyDeclarations
11815  PyObject *__pyx_t_1 = NULL;
11816  PyObject *__pyx_t_2 = NULL;
11817  PyObject *__pyx_t_3 = NULL;
11818  __Pyx_RefNannySetupContext("involute", 0);
11819 
11820  /* "PyClical.pyx":1419
11821  * 1-{1}+{1,2}
11822  * """
11823  * return clifford(obj).involute() # <<<<<<<<<<<<<<
11824  *
11825  * cpdef inline reverse(obj):
11826  */
11827  __Pyx_XDECREF(__pyx_r);
11828  __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)
11829  __Pyx_GOTREF(__pyx_t_2);
11830  __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)
11831  __Pyx_GOTREF(__pyx_t_3);
11832  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11833  __pyx_t_2 = NULL;
11834  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11835  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11836  if (likely(__pyx_t_2)) {
11837  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11838  __Pyx_INCREF(__pyx_t_2);
11839  __Pyx_INCREF(function);
11840  __Pyx_DECREF_SET(__pyx_t_3, function);
11841  }
11842  }
11843  if (__pyx_t_2) {
11844  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11845  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11846  } else {
11847  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
11848  }
11849  __Pyx_GOTREF(__pyx_t_1);
11850  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11851  __pyx_r = __pyx_t_1;
11852  __pyx_t_1 = 0;
11853  goto __pyx_L0;
11854 
11855  /* "PyClical.pyx":1406
11856  * return clifford(obj).odd()
11857  *
11858  * cpdef inline involute(obj): # <<<<<<<<<<<<<<
11859  * """
11860  * Main involution, each {i} is replaced by -{i} in each term, eg. {1}*{2} -> (-{2})*(-{1})
11861  */
11862 
11863  /* function exit code */
11864  __pyx_L1_error:;
11865  __Pyx_XDECREF(__pyx_t_1);
11866  __Pyx_XDECREF(__pyx_t_2);
11867  __Pyx_XDECREF(__pyx_t_3);
11868  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11869  __pyx_r = 0;
11870  __pyx_L0:;
11871  __Pyx_XGIVEREF(__pyx_r);
11872  __Pyx_RefNannyFinishContext();
11873  return __pyx_r;
11874  }
11875 
11876  /* Python wrapper */
11877  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11878  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 ";
11879  static PyObject *__pyx_pw_8PyClical_25involute(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11880  PyObject *__pyx_r = 0;
11881  __Pyx_RefNannyDeclarations
11882  __Pyx_RefNannySetupContext("involute (wrapper)", 0);
11883  __pyx_r = __pyx_pf_8PyClical_24involute(__pyx_self, ((PyObject *)__pyx_v_obj));
11884 
11885  /* function exit code */
11886  __Pyx_RefNannyFinishContext();
11887  return __pyx_r;
11888  }
11889 
11890  static PyObject *__pyx_pf_8PyClical_24involute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11891  PyObject *__pyx_r = NULL;
11892  __Pyx_RefNannyDeclarations
11893  PyObject *__pyx_t_1 = NULL;
11894  __Pyx_RefNannySetupContext("involute", 0);
11895  __Pyx_XDECREF(__pyx_r);
11896  __pyx_t_1 = __pyx_f_8PyClical_involute(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
11897  __Pyx_GOTREF(__pyx_t_1);
11898  __pyx_r = __pyx_t_1;
11899  __pyx_t_1 = 0;
11900  goto __pyx_L0;
11901 
11902  /* function exit code */
11903  __pyx_L1_error:;
11904  __Pyx_XDECREF(__pyx_t_1);
11905  __Pyx_AddTraceback("PyClical.involute", __pyx_clineno, __pyx_lineno, __pyx_filename);
11906  __pyx_r = NULL;
11907  __pyx_L0:;
11908  __Pyx_XGIVEREF(__pyx_r);
11909  __Pyx_RefNannyFinishContext();
11910  return __pyx_r;
11911  }
11912 
11913  /* "PyClical.pyx":1421
11914  * return clifford(obj).involute()
11915  *
11916  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11917  * """
11918  * Reversion, eg. {1}*{2} -> {2}*{1}
11919  */
11920 
11921  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11922  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_reverse(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
11923  PyObject *__pyx_r = NULL;
11924  __Pyx_RefNannyDeclarations
11925  PyObject *__pyx_t_1 = NULL;
11926  PyObject *__pyx_t_2 = NULL;
11927  PyObject *__pyx_t_3 = NULL;
11928  __Pyx_RefNannySetupContext("reverse", 0);
11929 
11930  /* "PyClical.pyx":1434
11931  * 1+{1}-{1,2}
11932  * """
11933  * return clifford(obj).reverse() # <<<<<<<<<<<<<<
11934  *
11935  * cpdef inline conj(obj):
11936  */
11937  __Pyx_XDECREF(__pyx_r);
11938  __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)
11939  __Pyx_GOTREF(__pyx_t_2);
11940  __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)
11941  __Pyx_GOTREF(__pyx_t_3);
11942  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11943  __pyx_t_2 = NULL;
11944  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
11945  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
11946  if (likely(__pyx_t_2)) {
11947  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
11948  __Pyx_INCREF(__pyx_t_2);
11949  __Pyx_INCREF(function);
11950  __Pyx_DECREF_SET(__pyx_t_3, function);
11951  }
11952  }
11953  if (__pyx_t_2) {
11954  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
11955  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11956  } else {
11957  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
11958  }
11959  __Pyx_GOTREF(__pyx_t_1);
11960  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11961  __pyx_r = __pyx_t_1;
11962  __pyx_t_1 = 0;
11963  goto __pyx_L0;
11964 
11965  /* "PyClical.pyx":1421
11966  * return clifford(obj).involute()
11967  *
11968  * cpdef inline reverse(obj): # <<<<<<<<<<<<<<
11969  * """
11970  * Reversion, eg. {1}*{2} -> {2}*{1}
11971  */
11972 
11973  /* function exit code */
11974  __pyx_L1_error:;
11975  __Pyx_XDECREF(__pyx_t_1);
11976  __Pyx_XDECREF(__pyx_t_2);
11977  __Pyx_XDECREF(__pyx_t_3);
11978  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
11979  __pyx_r = 0;
11980  __pyx_L0:;
11981  __Pyx_XGIVEREF(__pyx_r);
11982  __Pyx_RefNannyFinishContext();
11983  return __pyx_r;
11984  }
11985 
11986  /* Python wrapper */
11987  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11988  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 ";
11989  static PyObject *__pyx_pw_8PyClical_27reverse(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11990  PyObject *__pyx_r = 0;
11991  __Pyx_RefNannyDeclarations
11992  __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
11993  __pyx_r = __pyx_pf_8PyClical_26reverse(__pyx_self, ((PyObject *)__pyx_v_obj));
11994 
11995  /* function exit code */
11996  __Pyx_RefNannyFinishContext();
11997  return __pyx_r;
11998  }
11999 
12000  static PyObject *__pyx_pf_8PyClical_26reverse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12001  PyObject *__pyx_r = NULL;
12002  __Pyx_RefNannyDeclarations
12003  PyObject *__pyx_t_1 = NULL;
12004  __Pyx_RefNannySetupContext("reverse", 0);
12005  __Pyx_XDECREF(__pyx_r);
12006  __pyx_t_1 = __pyx_f_8PyClical_reverse(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
12007  __Pyx_GOTREF(__pyx_t_1);
12008  __pyx_r = __pyx_t_1;
12009  __pyx_t_1 = 0;
12010  goto __pyx_L0;
12011 
12012  /* function exit code */
12013  __pyx_L1_error:;
12014  __Pyx_XDECREF(__pyx_t_1);
12015  __Pyx_AddTraceback("PyClical.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
12016  __pyx_r = NULL;
12017  __pyx_L0:;
12018  __Pyx_XGIVEREF(__pyx_r);
12019  __Pyx_RefNannyFinishContext();
12020  return __pyx_r;
12021  }
12022 
12023  /* "PyClical.pyx":1436
12024  * return clifford(obj).reverse()
12025  *
12026  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12027  * """
12028  * Conjugation, reverse o involute == involute o reverse.
12029  */
12030 
12031  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12032  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_conj(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12033  PyObject *__pyx_r = NULL;
12034  __Pyx_RefNannyDeclarations
12035  PyObject *__pyx_t_1 = NULL;
12036  PyObject *__pyx_t_2 = NULL;
12037  PyObject *__pyx_t_3 = NULL;
12038  __Pyx_RefNannySetupContext("conj", 0);
12039 
12040  /* "PyClical.pyx":1449
12041  * 1-{1}-{1,2}
12042  * """
12043  * return clifford(obj).conj() # <<<<<<<<<<<<<<
12044  *
12045  * cpdef inline quad(obj):
12046  */
12047  __Pyx_XDECREF(__pyx_r);
12048  __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)
12049  __Pyx_GOTREF(__pyx_t_2);
12050  __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)
12051  __Pyx_GOTREF(__pyx_t_3);
12052  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12053  __pyx_t_2 = NULL;
12054  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12055  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12056  if (likely(__pyx_t_2)) {
12057  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12058  __Pyx_INCREF(__pyx_t_2);
12059  __Pyx_INCREF(function);
12060  __Pyx_DECREF_SET(__pyx_t_3, function);
12061  }
12062  }
12063  if (__pyx_t_2) {
12064  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12065  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12066  } else {
12067  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
12068  }
12069  __Pyx_GOTREF(__pyx_t_1);
12070  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12071  __pyx_r = __pyx_t_1;
12072  __pyx_t_1 = 0;
12073  goto __pyx_L0;
12074 
12075  /* "PyClical.pyx":1436
12076  * return clifford(obj).reverse()
12077  *
12078  * cpdef inline conj(obj): # <<<<<<<<<<<<<<
12079  * """
12080  * Conjugation, reverse o involute == involute o reverse.
12081  */
12082 
12083  /* function exit code */
12084  __pyx_L1_error:;
12085  __Pyx_XDECREF(__pyx_t_1);
12086  __Pyx_XDECREF(__pyx_t_2);
12087  __Pyx_XDECREF(__pyx_t_3);
12088  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12089  __pyx_r = 0;
12090  __pyx_L0:;
12091  __Pyx_XGIVEREF(__pyx_r);
12092  __Pyx_RefNannyFinishContext();
12093  return __pyx_r;
12094  }
12095 
12096  /* Python wrapper */
12097  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12098  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 ";
12099  static PyObject *__pyx_pw_8PyClical_29conj(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12100  PyObject *__pyx_r = 0;
12101  __Pyx_RefNannyDeclarations
12102  __Pyx_RefNannySetupContext("conj (wrapper)", 0);
12103  __pyx_r = __pyx_pf_8PyClical_28conj(__pyx_self, ((PyObject *)__pyx_v_obj));
12104 
12105  /* function exit code */
12106  __Pyx_RefNannyFinishContext();
12107  return __pyx_r;
12108  }
12109 
12110  static PyObject *__pyx_pf_8PyClical_28conj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12111  PyObject *__pyx_r = NULL;
12112  __Pyx_RefNannyDeclarations
12113  PyObject *__pyx_t_1 = NULL;
12114  __Pyx_RefNannySetupContext("conj", 0);
12115  __Pyx_XDECREF(__pyx_r);
12116  __pyx_t_1 = __pyx_f_8PyClical_conj(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error)
12117  __Pyx_GOTREF(__pyx_t_1);
12118  __pyx_r = __pyx_t_1;
12119  __pyx_t_1 = 0;
12120  goto __pyx_L0;
12121 
12122  /* function exit code */
12123  __pyx_L1_error:;
12124  __Pyx_XDECREF(__pyx_t_1);
12125  __Pyx_AddTraceback("PyClical.conj", __pyx_clineno, __pyx_lineno, __pyx_filename);
12126  __pyx_r = NULL;
12127  __pyx_L0:;
12128  __Pyx_XGIVEREF(__pyx_r);
12129  __Pyx_RefNannyFinishContext();
12130  return __pyx_r;
12131  }
12132 
12133  /* "PyClical.pyx":1451
12134  * return clifford(obj).conj()
12135  *
12136  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12137  * """
12138  * Quadratic form == (rev(x)*x)(0).
12139  */
12140 
12141  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12142  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_quad(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12143  PyObject *__pyx_r = NULL;
12144  __Pyx_RefNannyDeclarations
12145  PyObject *__pyx_t_1 = NULL;
12146  PyObject *__pyx_t_2 = NULL;
12147  PyObject *__pyx_t_3 = NULL;
12148  __Pyx_RefNannySetupContext("quad", 0);
12149 
12150  /* "PyClical.pyx":1460
12151  * 2.0
12152  * """
12153  * return clifford(obj).quad() # <<<<<<<<<<<<<<
12154  *
12155  * cpdef inline norm(obj):
12156  */
12157  __Pyx_XDECREF(__pyx_r);
12158  __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)
12159  __Pyx_GOTREF(__pyx_t_2);
12160  __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)
12161  __Pyx_GOTREF(__pyx_t_3);
12162  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12163  __pyx_t_2 = NULL;
12164  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12165  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12166  if (likely(__pyx_t_2)) {
12167  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12168  __Pyx_INCREF(__pyx_t_2);
12169  __Pyx_INCREF(function);
12170  __Pyx_DECREF_SET(__pyx_t_3, function);
12171  }
12172  }
12173  if (__pyx_t_2) {
12174  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12175  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12176  } else {
12177  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
12178  }
12179  __Pyx_GOTREF(__pyx_t_1);
12180  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12181  __pyx_r = __pyx_t_1;
12182  __pyx_t_1 = 0;
12183  goto __pyx_L0;
12184 
12185  /* "PyClical.pyx":1451
12186  * return clifford(obj).conj()
12187  *
12188  * cpdef inline quad(obj): # <<<<<<<<<<<<<<
12189  * """
12190  * Quadratic form == (rev(x)*x)(0).
12191  */
12192 
12193  /* function exit code */
12194  __pyx_L1_error:;
12195  __Pyx_XDECREF(__pyx_t_1);
12196  __Pyx_XDECREF(__pyx_t_2);
12197  __Pyx_XDECREF(__pyx_t_3);
12198  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12199  __pyx_r = 0;
12200  __pyx_L0:;
12201  __Pyx_XGIVEREF(__pyx_r);
12202  __Pyx_RefNannyFinishContext();
12203  return __pyx_r;
12204  }
12205 
12206  /* Python wrapper */
12207  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12208  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 ";
12209  static PyObject *__pyx_pw_8PyClical_31quad(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12210  PyObject *__pyx_r = 0;
12211  __Pyx_RefNannyDeclarations
12212  __Pyx_RefNannySetupContext("quad (wrapper)", 0);
12213  __pyx_r = __pyx_pf_8PyClical_30quad(__pyx_self, ((PyObject *)__pyx_v_obj));
12214 
12215  /* function exit code */
12216  __Pyx_RefNannyFinishContext();
12217  return __pyx_r;
12218  }
12219 
12220  static PyObject *__pyx_pf_8PyClical_30quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12221  PyObject *__pyx_r = NULL;
12222  __Pyx_RefNannyDeclarations
12223  PyObject *__pyx_t_1 = NULL;
12224  __Pyx_RefNannySetupContext("quad", 0);
12225  __Pyx_XDECREF(__pyx_r);
12226  __pyx_t_1 = __pyx_f_8PyClical_quad(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
12227  __Pyx_GOTREF(__pyx_t_1);
12228  __pyx_r = __pyx_t_1;
12229  __pyx_t_1 = 0;
12230  goto __pyx_L0;
12231 
12232  /* function exit code */
12233  __pyx_L1_error:;
12234  __Pyx_XDECREF(__pyx_t_1);
12235  __Pyx_AddTraceback("PyClical.quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
12236  __pyx_r = NULL;
12237  __pyx_L0:;
12238  __Pyx_XGIVEREF(__pyx_r);
12239  __Pyx_RefNannyFinishContext();
12240  return __pyx_r;
12241  }
12242 
12243  /* "PyClical.pyx":1462
12244  * return clifford(obj).quad()
12245  *
12246  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12247  * """
12248  * norm == sum of squares of coordinates.
12249  */
12250 
12251  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12252  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_norm(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12253  PyObject *__pyx_r = NULL;
12254  __Pyx_RefNannyDeclarations
12255  PyObject *__pyx_t_1 = NULL;
12256  PyObject *__pyx_t_2 = NULL;
12257  PyObject *__pyx_t_3 = NULL;
12258  __Pyx_RefNannySetupContext("norm", 0);
12259 
12260  /* "PyClical.pyx":1471
12261  * 4.0
12262  * """
12263  * return clifford(obj).norm() # <<<<<<<<<<<<<<
12264  *
12265  * cpdef inline abs(obj):
12266  */
12267  __Pyx_XDECREF(__pyx_r);
12268  __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)
12269  __Pyx_GOTREF(__pyx_t_2);
12270  __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)
12271  __Pyx_GOTREF(__pyx_t_3);
12272  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12273  __pyx_t_2 = NULL;
12274  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12275  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12276  if (likely(__pyx_t_2)) {
12277  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12278  __Pyx_INCREF(__pyx_t_2);
12279  __Pyx_INCREF(function);
12280  __Pyx_DECREF_SET(__pyx_t_3, function);
12281  }
12282  }
12283  if (__pyx_t_2) {
12284  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12285  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12286  } else {
12287  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
12288  }
12289  __Pyx_GOTREF(__pyx_t_1);
12290  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12291  __pyx_r = __pyx_t_1;
12292  __pyx_t_1 = 0;
12293  goto __pyx_L0;
12294 
12295  /* "PyClical.pyx":1462
12296  * return clifford(obj).quad()
12297  *
12298  * cpdef inline norm(obj): # <<<<<<<<<<<<<<
12299  * """
12300  * norm == sum of squares of coordinates.
12301  */
12302 
12303  /* function exit code */
12304  __pyx_L1_error:;
12305  __Pyx_XDECREF(__pyx_t_1);
12306  __Pyx_XDECREF(__pyx_t_2);
12307  __Pyx_XDECREF(__pyx_t_3);
12308  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12309  __pyx_r = 0;
12310  __pyx_L0:;
12311  __Pyx_XGIVEREF(__pyx_r);
12312  __Pyx_RefNannyFinishContext();
12313  return __pyx_r;
12314  }
12315 
12316  /* Python wrapper */
12317  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12318  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 ";
12319  static PyObject *__pyx_pw_8PyClical_33norm(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12320  PyObject *__pyx_r = 0;
12321  __Pyx_RefNannyDeclarations
12322  __Pyx_RefNannySetupContext("norm (wrapper)", 0);
12323  __pyx_r = __pyx_pf_8PyClical_32norm(__pyx_self, ((PyObject *)__pyx_v_obj));
12324 
12325  /* function exit code */
12326  __Pyx_RefNannyFinishContext();
12327  return __pyx_r;
12328  }
12329 
12330  static PyObject *__pyx_pf_8PyClical_32norm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12331  PyObject *__pyx_r = NULL;
12332  __Pyx_RefNannyDeclarations
12333  PyObject *__pyx_t_1 = NULL;
12334  __Pyx_RefNannySetupContext("norm", 0);
12335  __Pyx_XDECREF(__pyx_r);
12336  __pyx_t_1 = __pyx_f_8PyClical_norm(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
12337  __Pyx_GOTREF(__pyx_t_1);
12338  __pyx_r = __pyx_t_1;
12339  __pyx_t_1 = 0;
12340  goto __pyx_L0;
12341 
12342  /* function exit code */
12343  __pyx_L1_error:;
12344  __Pyx_XDECREF(__pyx_t_1);
12345  __Pyx_AddTraceback("PyClical.norm", __pyx_clineno, __pyx_lineno, __pyx_filename);
12346  __pyx_r = NULL;
12347  __pyx_L0:;
12348  __Pyx_XGIVEREF(__pyx_r);
12349  __Pyx_RefNannyFinishContext();
12350  return __pyx_r;
12351  }
12352 
12353  /* "PyClical.pyx":1473
12354  * return clifford(obj).norm()
12355  *
12356  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12357  * """
12358  * Absolute value of multivector: multivector 2-norm.
12359  */
12360 
12361  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12362  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12363  PyObject *__pyx_r = NULL;
12364  __Pyx_RefNannyDeclarations
12365  PyObject *__pyx_t_1 = NULL;
12366  __Pyx_RefNannySetupContext("abs", 0);
12367 
12368  /* "PyClical.pyx":1480
12369  * 2.0
12370  * """
12371  * return glucat.abs(toClifford(obj)) # <<<<<<<<<<<<<<
12372  *
12373  * cpdef inline max_abs(obj):
12374  */
12375  __Pyx_XDECREF(__pyx_r);
12376  __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)
12377  __Pyx_GOTREF(__pyx_t_1);
12378  __pyx_r = __pyx_t_1;
12379  __pyx_t_1 = 0;
12380  goto __pyx_L0;
12381 
12382  /* "PyClical.pyx":1473
12383  * return clifford(obj).norm()
12384  *
12385  * cpdef inline abs(obj): # <<<<<<<<<<<<<<
12386  * """
12387  * Absolute value of multivector: multivector 2-norm.
12388  */
12389 
12390  /* function exit code */
12391  __pyx_L1_error:;
12392  __Pyx_XDECREF(__pyx_t_1);
12393  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12394  __pyx_r = 0;
12395  __pyx_L0:;
12396  __Pyx_XGIVEREF(__pyx_r);
12397  __Pyx_RefNannyFinishContext();
12398  return __pyx_r;
12399  }
12400 
12401  /* Python wrapper */
12402  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12403  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 ";
12404  static PyObject *__pyx_pw_8PyClical_35abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12405  PyObject *__pyx_r = 0;
12406  __Pyx_RefNannyDeclarations
12407  __Pyx_RefNannySetupContext("abs (wrapper)", 0);
12408  __pyx_r = __pyx_pf_8PyClical_34abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12409 
12410  /* function exit code */
12411  __Pyx_RefNannyFinishContext();
12412  return __pyx_r;
12413  }
12414 
12415  static PyObject *__pyx_pf_8PyClical_34abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12416  PyObject *__pyx_r = NULL;
12417  __Pyx_RefNannyDeclarations
12418  PyObject *__pyx_t_1 = NULL;
12419  __Pyx_RefNannySetupContext("abs", 0);
12420  __Pyx_XDECREF(__pyx_r);
12421  __pyx_t_1 = __pyx_f_8PyClical_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1473, __pyx_L1_error)
12422  __Pyx_GOTREF(__pyx_t_1);
12423  __pyx_r = __pyx_t_1;
12424  __pyx_t_1 = 0;
12425  goto __pyx_L0;
12426 
12427  /* function exit code */
12428  __pyx_L1_error:;
12429  __Pyx_XDECREF(__pyx_t_1);
12430  __Pyx_AddTraceback("PyClical.abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12431  __pyx_r = NULL;
12432  __pyx_L0:;
12433  __Pyx_XGIVEREF(__pyx_r);
12434  __Pyx_RefNannyFinishContext();
12435  return __pyx_r;
12436  }
12437 
12438  /* "PyClical.pyx":1482
12439  * return glucat.abs(toClifford(obj))
12440  *
12441  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12442  * """
12443  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12444  */
12445 
12446  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12447  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_max_abs(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
12448  PyObject *__pyx_r = NULL;
12449  __Pyx_RefNannyDeclarations
12450  PyObject *__pyx_t_1 = NULL;
12451  __Pyx_RefNannySetupContext("max_abs", 0);
12452 
12453  /* "PyClical.pyx":1492
12454  *
12455  * """
12456  * return glucat.max_abs(toClifford(obj)) # <<<<<<<<<<<<<<
12457  *
12458  * cpdef inline pow(obj, m):
12459  */
12460  __Pyx_XDECREF(__pyx_r);
12461  __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)
12462  __Pyx_GOTREF(__pyx_t_1);
12463  __pyx_r = __pyx_t_1;
12464  __pyx_t_1 = 0;
12465  goto __pyx_L0;
12466 
12467  /* "PyClical.pyx":1482
12468  * return glucat.abs(toClifford(obj))
12469  *
12470  * cpdef inline max_abs(obj): # <<<<<<<<<<<<<<
12471  * """
12472  * Maximum absolute value of coordinates multivector: multivector infinity-norm.
12473  */
12474 
12475  /* function exit code */
12476  __pyx_L1_error:;
12477  __Pyx_XDECREF(__pyx_t_1);
12478  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12479  __pyx_r = 0;
12480  __pyx_L0:;
12481  __Pyx_XGIVEREF(__pyx_r);
12482  __Pyx_RefNannyFinishContext();
12483  return __pyx_r;
12484  }
12485 
12486  /* Python wrapper */
12487  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
12488  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 ";
12489  static PyObject *__pyx_pw_8PyClical_37max_abs(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12490  PyObject *__pyx_r = 0;
12491  __Pyx_RefNannyDeclarations
12492  __Pyx_RefNannySetupContext("max_abs (wrapper)", 0);
12493  __pyx_r = __pyx_pf_8PyClical_36max_abs(__pyx_self, ((PyObject *)__pyx_v_obj));
12494 
12495  /* function exit code */
12496  __Pyx_RefNannyFinishContext();
12497  return __pyx_r;
12498  }
12499 
12500  static PyObject *__pyx_pf_8PyClical_36max_abs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
12501  PyObject *__pyx_r = NULL;
12502  __Pyx_RefNannyDeclarations
12503  PyObject *__pyx_t_1 = NULL;
12504  __Pyx_RefNannySetupContext("max_abs", 0);
12505  __Pyx_XDECREF(__pyx_r);
12506  __pyx_t_1 = __pyx_f_8PyClical_max_abs(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
12507  __Pyx_GOTREF(__pyx_t_1);
12508  __pyx_r = __pyx_t_1;
12509  __pyx_t_1 = 0;
12510  goto __pyx_L0;
12511 
12512  /* function exit code */
12513  __pyx_L1_error:;
12514  __Pyx_XDECREF(__pyx_t_1);
12515  __Pyx_AddTraceback("PyClical.max_abs", __pyx_clineno, __pyx_lineno, __pyx_filename);
12516  __pyx_r = NULL;
12517  __pyx_L0:;
12518  __Pyx_XGIVEREF(__pyx_r);
12519  __Pyx_RefNannyFinishContext();
12520  return __pyx_r;
12521  }
12522 
12523  /* "PyClical.pyx":1494
12524  * return glucat.max_abs(toClifford(obj))
12525  *
12526  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12527  * """
12528  * Integer power of multivector: obj to the m.
12529  */
12530 
12531  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12532  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12533  PyObject *__pyx_r = NULL;
12534  __Pyx_RefNannyDeclarations
12535  PyObject *__pyx_t_1 = NULL;
12536  PyObject *__pyx_t_2 = NULL;
12537  PyObject *__pyx_t_3 = NULL;
12538  PyObject *__pyx_t_4 = NULL;
12539  PyObject *__pyx_t_5 = NULL;
12540  PyObject *__pyx_t_6 = NULL;
12541  int __pyx_t_7;
12542  PyObject *__pyx_t_8 = NULL;
12543  PyObject *__pyx_t_9 = NULL;
12544  PyObject *__pyx_t_10 = NULL;
12545  PyObject *__pyx_t_11 = NULL;
12546  __Pyx_RefNannySetupContext("pow", 0);
12547 
12548  /* "PyClical.pyx":1513
12549  * 1
12550  * """
12551  * try: # <<<<<<<<<<<<<<
12552  * math.pow(obj, m)
12553  * except:
12554  */
12555  {
12556  __Pyx_PyThreadState_declare
12557  __Pyx_PyThreadState_assign
12558  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
12559  __Pyx_XGOTREF(__pyx_t_1);
12560  __Pyx_XGOTREF(__pyx_t_2);
12561  __Pyx_XGOTREF(__pyx_t_3);
12562  /*try:*/ {
12563 
12564  /* "PyClical.pyx":1514
12565  * """
12566  * try:
12567  * math.pow(obj, m) # <<<<<<<<<<<<<<
12568  * except:
12569  * return clifford(obj).pow(m)
12570  */
12571  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L3_error)
12572  __Pyx_GOTREF(__pyx_t_5);
12573  __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)
12574  __Pyx_GOTREF(__pyx_t_6);
12575  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12576  __pyx_t_5 = NULL;
12577  __pyx_t_7 = 0;
12578  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
12579  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
12580  if (likely(__pyx_t_5)) {
12581  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12582  __Pyx_INCREF(__pyx_t_5);
12583  __Pyx_INCREF(function);
12584  __Pyx_DECREF_SET(__pyx_t_6, function);
12585  __pyx_t_7 = 1;
12586  }
12587  }
12588  #if CYTHON_FAST_PYCALL
12589  if (PyFunction_Check(__pyx_t_6)) {
12590  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12591  __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)
12592  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12593  __Pyx_GOTREF(__pyx_t_4);
12594  } else
12595  #endif
12596  #if CYTHON_FAST_PYCCALL
12597  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
12598  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_m};
12599  __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)
12600  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12601  __Pyx_GOTREF(__pyx_t_4);
12602  } else
12603  #endif
12604  {
12605  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1514, __pyx_L3_error)
12606  __Pyx_GOTREF(__pyx_t_8);
12607  if (__pyx_t_5) {
12608  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
12609  }
12610  __Pyx_INCREF(__pyx_v_obj);
12611  __Pyx_GIVEREF(__pyx_v_obj);
12612  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_obj);
12613  __Pyx_INCREF(__pyx_v_m);
12614  __Pyx_GIVEREF(__pyx_v_m);
12615  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_m);
12616  __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)
12617  __Pyx_GOTREF(__pyx_t_4);
12618  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12619  }
12620  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12621  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12622 
12623  /* "PyClical.pyx":1513
12624  * 1
12625  * """
12626  * try: # <<<<<<<<<<<<<<
12627  * math.pow(obj, m)
12628  * except:
12629  */
12630  }
12631  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12632  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12633  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
12634  goto __pyx_L8_try_end;
12635  __pyx_L3_error:;
12636  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12637  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
12638  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12639  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12640 
12641  /* "PyClical.pyx":1515
12642  * try:
12643  * math.pow(obj, m)
12644  * except: # <<<<<<<<<<<<<<
12645  * return clifford(obj).pow(m)
12646  *
12647  */
12648  /*except:*/ {
12649  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12650  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 1515, __pyx_L5_except_error)
12651  __Pyx_GOTREF(__pyx_t_4);
12652  __Pyx_GOTREF(__pyx_t_6);
12653  __Pyx_GOTREF(__pyx_t_8);
12654 
12655  /* "PyClical.pyx":1516
12656  * math.pow(obj, m)
12657  * except:
12658  * return clifford(obj).pow(m) # <<<<<<<<<<<<<<
12659  *
12660  * cpdef inline outer_pow(obj, m):
12661  */
12662  __Pyx_XDECREF(__pyx_r);
12663  __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)
12664  __Pyx_GOTREF(__pyx_t_9);
12665  __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)
12666  __Pyx_GOTREF(__pyx_t_10);
12667  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
12668  __pyx_t_9 = NULL;
12669  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
12670  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
12671  if (likely(__pyx_t_9)) {
12672  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
12673  __Pyx_INCREF(__pyx_t_9);
12674  __Pyx_INCREF(function);
12675  __Pyx_DECREF_SET(__pyx_t_10, function);
12676  }
12677  }
12678  if (!__pyx_t_9) {
12679  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_m); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12680  __Pyx_GOTREF(__pyx_t_5);
12681  } else {
12682  #if CYTHON_FAST_PYCALL
12683  if (PyFunction_Check(__pyx_t_10)) {
12684  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_m};
12685  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12686  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12687  __Pyx_GOTREF(__pyx_t_5);
12688  } else
12689  #endif
12690  #if CYTHON_FAST_PYCCALL
12691  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
12692  PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_m};
12693  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12694  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
12695  __Pyx_GOTREF(__pyx_t_5);
12696  } else
12697  #endif
12698  {
12699  __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12700  __Pyx_GOTREF(__pyx_t_11);
12701  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
12702  __Pyx_INCREF(__pyx_v_m);
12703  __Pyx_GIVEREF(__pyx_v_m);
12704  PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_m);
12705  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L5_except_error)
12706  __Pyx_GOTREF(__pyx_t_5);
12707  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12708  }
12709  }
12710  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
12711  __pyx_r = __pyx_t_5;
12712  __pyx_t_5 = 0;
12713  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12714  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12715  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12716  goto __pyx_L6_except_return;
12717  }
12718  __pyx_L5_except_error:;
12719 
12720  /* "PyClical.pyx":1513
12721  * 1
12722  * """
12723  * try: # <<<<<<<<<<<<<<
12724  * math.pow(obj, m)
12725  * except:
12726  */
12727  __Pyx_XGIVEREF(__pyx_t_1);
12728  __Pyx_XGIVEREF(__pyx_t_2);
12729  __Pyx_XGIVEREF(__pyx_t_3);
12730  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12731  goto __pyx_L1_error;
12732  __pyx_L6_except_return:;
12733  __Pyx_XGIVEREF(__pyx_t_1);
12734  __Pyx_XGIVEREF(__pyx_t_2);
12735  __Pyx_XGIVEREF(__pyx_t_3);
12736  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
12737  goto __pyx_L0;
12738  __pyx_L8_try_end:;
12739  }
12740 
12741  /* "PyClical.pyx":1494
12742  * return glucat.max_abs(toClifford(obj))
12743  *
12744  * cpdef inline pow(obj, m): # <<<<<<<<<<<<<<
12745  * """
12746  * Integer power of multivector: obj to the m.
12747  */
12748 
12749  /* function exit code */
12750  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12751  goto __pyx_L0;
12752  __pyx_L1_error:;
12753  __Pyx_XDECREF(__pyx_t_4);
12754  __Pyx_XDECREF(__pyx_t_5);
12755  __Pyx_XDECREF(__pyx_t_6);
12756  __Pyx_XDECREF(__pyx_t_8);
12757  __Pyx_XDECREF(__pyx_t_9);
12758  __Pyx_XDECREF(__pyx_t_10);
12759  __Pyx_XDECREF(__pyx_t_11);
12760  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12761  __pyx_r = 0;
12762  __pyx_L0:;
12763  __Pyx_XGIVEREF(__pyx_r);
12764  __Pyx_RefNannyFinishContext();
12765  return __pyx_r;
12766  }
12767 
12768  /* Python wrapper */
12769  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12770  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 ";
12771  static PyObject *__pyx_pw_8PyClical_39pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12772  PyObject *__pyx_v_obj = 0;
12773  PyObject *__pyx_v_m = 0;
12774  PyObject *__pyx_r = 0;
12775  __Pyx_RefNannyDeclarations
12776  __Pyx_RefNannySetupContext("pow (wrapper)", 0);
12777  {
12778  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12779  PyObject* values[2] = {0,0};
12780  if (unlikely(__pyx_kwds)) {
12781  Py_ssize_t kw_args;
12782  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12783  switch (pos_args) {
12784  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12785  CYTHON_FALLTHROUGH;
12786  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12787  CYTHON_FALLTHROUGH;
12788  case 0: break;
12789  default: goto __pyx_L5_argtuple_error;
12790  }
12791  kw_args = PyDict_Size(__pyx_kwds);
12792  switch (pos_args) {
12793  case 0:
12794  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12795  else goto __pyx_L5_argtuple_error;
12796  CYTHON_FALLTHROUGH;
12797  case 1:
12798  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12799  else {
12800  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, 1); __PYX_ERR(0, 1494, __pyx_L3_error)
12801  }
12802  }
12803  if (unlikely(kw_args > 0)) {
12804  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pow") < 0)) __PYX_ERR(0, 1494, __pyx_L3_error)
12805  }
12806  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12807  goto __pyx_L5_argtuple_error;
12808  } else {
12809  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12810  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12811  }
12812  __pyx_v_obj = values[0];
12813  __pyx_v_m = values[1];
12814  }
12815  goto __pyx_L4_argument_unpacking_done;
12816  __pyx_L5_argtuple_error:;
12817  __Pyx_RaiseArgtupleInvalid("pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1494, __pyx_L3_error)
12818  __pyx_L3_error:;
12819  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12820  __Pyx_RefNannyFinishContext();
12821  return NULL;
12822  __pyx_L4_argument_unpacking_done:;
12823  __pyx_r = __pyx_pf_8PyClical_38pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
12824 
12825  /* function exit code */
12826  __Pyx_RefNannyFinishContext();
12827  return __pyx_r;
12828  }
12829 
12830  static PyObject *__pyx_pf_8PyClical_38pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
12831  PyObject *__pyx_r = NULL;
12832  __Pyx_RefNannyDeclarations
12833  PyObject *__pyx_t_1 = NULL;
12834  __Pyx_RefNannySetupContext("pow", 0);
12835  __Pyx_XDECREF(__pyx_r);
12836  __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)
12837  __Pyx_GOTREF(__pyx_t_1);
12838  __pyx_r = __pyx_t_1;
12839  __pyx_t_1 = 0;
12840  goto __pyx_L0;
12841 
12842  /* function exit code */
12843  __pyx_L1_error:;
12844  __Pyx_XDECREF(__pyx_t_1);
12845  __Pyx_AddTraceback("PyClical.pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12846  __pyx_r = NULL;
12847  __pyx_L0:;
12848  __Pyx_XGIVEREF(__pyx_r);
12849  __Pyx_RefNannyFinishContext();
12850  return __pyx_r;
12851  }
12852 
12853  /* "PyClical.pyx":1518
12854  * return clifford(obj).pow(m)
12855  *
12856  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12857  * """
12858  * Outer product power of multivector.
12859  */
12860 
12861  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12862  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_outer_pow(PyObject *__pyx_v_obj, PyObject *__pyx_v_m, CYTHON_UNUSED int __pyx_skip_dispatch) {
12863  PyObject *__pyx_r = NULL;
12864  __Pyx_RefNannyDeclarations
12865  PyObject *__pyx_t_1 = NULL;
12866  PyObject *__pyx_t_2 = NULL;
12867  PyObject *__pyx_t_3 = NULL;
12868  PyObject *__pyx_t_4 = NULL;
12869  __Pyx_RefNannySetupContext("outer_pow", 0);
12870 
12871  /* "PyClical.pyx":1525
12872  * 1+3{1}+3{1,2}
12873  * """
12874  * return clifford(obj).outer_pow(m) # <<<<<<<<<<<<<<
12875  *
12876  * cpdef inline complexifier(obj):
12877  */
12878  __Pyx_XDECREF(__pyx_r);
12879  __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)
12880  __Pyx_GOTREF(__pyx_t_2);
12881  __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)
12882  __Pyx_GOTREF(__pyx_t_3);
12883  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12884  __pyx_t_2 = NULL;
12885  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12886  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
12887  if (likely(__pyx_t_2)) {
12888  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12889  __Pyx_INCREF(__pyx_t_2);
12890  __Pyx_INCREF(function);
12891  __Pyx_DECREF_SET(__pyx_t_3, function);
12892  }
12893  }
12894  if (!__pyx_t_2) {
12895  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12896  __Pyx_GOTREF(__pyx_t_1);
12897  } else {
12898  #if CYTHON_FAST_PYCALL
12899  if (PyFunction_Check(__pyx_t_3)) {
12900  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_m};
12901  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12902  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12903  __Pyx_GOTREF(__pyx_t_1);
12904  } else
12905  #endif
12906  #if CYTHON_FAST_PYCCALL
12907  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
12908  PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_m};
12909  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12910  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
12911  __Pyx_GOTREF(__pyx_t_1);
12912  } else
12913  #endif
12914  {
12915  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error)
12916  __Pyx_GOTREF(__pyx_t_4);
12917  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
12918  __Pyx_INCREF(__pyx_v_m);
12919  __Pyx_GIVEREF(__pyx_v_m);
12920  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_m);
12921  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
12922  __Pyx_GOTREF(__pyx_t_1);
12923  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12924  }
12925  }
12926  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12927  __pyx_r = __pyx_t_1;
12928  __pyx_t_1 = 0;
12929  goto __pyx_L0;
12930 
12931  /* "PyClical.pyx":1518
12932  * return clifford(obj).pow(m)
12933  *
12934  * cpdef inline outer_pow(obj, m): # <<<<<<<<<<<<<<
12935  * """
12936  * Outer product power of multivector.
12937  */
12938 
12939  /* function exit code */
12940  __pyx_L1_error:;
12941  __Pyx_XDECREF(__pyx_t_1);
12942  __Pyx_XDECREF(__pyx_t_2);
12943  __Pyx_XDECREF(__pyx_t_3);
12944  __Pyx_XDECREF(__pyx_t_4);
12945  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
12946  __pyx_r = 0;
12947  __pyx_L0:;
12948  __Pyx_XGIVEREF(__pyx_r);
12949  __Pyx_RefNannyFinishContext();
12950  return __pyx_r;
12951  }
12952 
12953  /* Python wrapper */
12954  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12955  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 ";
12956  static PyObject *__pyx_pw_8PyClical_41outer_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12957  PyObject *__pyx_v_obj = 0;
12958  PyObject *__pyx_v_m = 0;
12959  PyObject *__pyx_r = 0;
12960  __Pyx_RefNannyDeclarations
12961  __Pyx_RefNannySetupContext("outer_pow (wrapper)", 0);
12962  {
12963  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_m,0};
12964  PyObject* values[2] = {0,0};
12965  if (unlikely(__pyx_kwds)) {
12966  Py_ssize_t kw_args;
12967  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12968  switch (pos_args) {
12969  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12970  CYTHON_FALLTHROUGH;
12971  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12972  CYTHON_FALLTHROUGH;
12973  case 0: break;
12974  default: goto __pyx_L5_argtuple_error;
12975  }
12976  kw_args = PyDict_Size(__pyx_kwds);
12977  switch (pos_args) {
12978  case 0:
12979  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
12980  else goto __pyx_L5_argtuple_error;
12981  CYTHON_FALLTHROUGH;
12982  case 1:
12983  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
12984  else {
12985  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, 1); __PYX_ERR(0, 1518, __pyx_L3_error)
12986  }
12987  }
12988  if (unlikely(kw_args > 0)) {
12989  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "outer_pow") < 0)) __PYX_ERR(0, 1518, __pyx_L3_error)
12990  }
12991  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12992  goto __pyx_L5_argtuple_error;
12993  } else {
12994  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12995  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12996  }
12997  __pyx_v_obj = values[0];
12998  __pyx_v_m = values[1];
12999  }
13000  goto __pyx_L4_argument_unpacking_done;
13001  __pyx_L5_argtuple_error:;
13002  __Pyx_RaiseArgtupleInvalid("outer_pow", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1518, __pyx_L3_error)
13003  __pyx_L3_error:;
13004  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13005  __Pyx_RefNannyFinishContext();
13006  return NULL;
13007  __pyx_L4_argument_unpacking_done:;
13008  __pyx_r = __pyx_pf_8PyClical_40outer_pow(__pyx_self, __pyx_v_obj, __pyx_v_m);
13009 
13010  /* function exit code */
13011  __Pyx_RefNannyFinishContext();
13012  return __pyx_r;
13013  }
13014 
13015  static PyObject *__pyx_pf_8PyClical_40outer_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_m) {
13016  PyObject *__pyx_r = NULL;
13017  __Pyx_RefNannyDeclarations
13018  PyObject *__pyx_t_1 = NULL;
13019  __Pyx_RefNannySetupContext("outer_pow", 0);
13020  __Pyx_XDECREF(__pyx_r);
13021  __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)
13022  __Pyx_GOTREF(__pyx_t_1);
13023  __pyx_r = __pyx_t_1;
13024  __pyx_t_1 = 0;
13025  goto __pyx_L0;
13026 
13027  /* function exit code */
13028  __pyx_L1_error:;
13029  __Pyx_XDECREF(__pyx_t_1);
13030  __Pyx_AddTraceback("PyClical.outer_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
13031  __pyx_r = NULL;
13032  __pyx_L0:;
13033  __Pyx_XGIVEREF(__pyx_r);
13034  __Pyx_RefNannyFinishContext();
13035  return __pyx_r;
13036  }
13037 
13038  /* "PyClical.pyx":1527
13039  * return clifford(obj).outer_pow(m)
13040  *
13041  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13042  * """
13043  * Square root of -1 which commutes with all members of the frame of the given multivector.
13044  */
13045 
13046  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13047  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_complexifier(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13048  PyObject *__pyx_r = NULL;
13049  __Pyx_RefNannyDeclarations
13050  PyObject *__pyx_t_1 = NULL;
13051  PyObject *__pyx_t_2 = NULL;
13052  __Pyx_RefNannySetupContext("complexifier", 0);
13053 
13054  /* "PyClical.pyx":1540
13055  * {-1}
13056  * """
13057  * return clifford().wrap( glucat.complexifier(toClifford(obj)) ) # <<<<<<<<<<<<<<
13058  *
13059  * cpdef inline sqrt(obj, i = None):
13060  */
13061  __Pyx_XDECREF(__pyx_r);
13062  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error)
13063  __Pyx_GOTREF(__pyx_t_1);
13064  __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)
13065  __Pyx_GOTREF(__pyx_t_2);
13066  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13067  __pyx_r = __pyx_t_2;
13068  __pyx_t_2 = 0;
13069  goto __pyx_L0;
13070 
13071  /* "PyClical.pyx":1527
13072  * return clifford(obj).outer_pow(m)
13073  *
13074  * cpdef inline complexifier(obj): # <<<<<<<<<<<<<<
13075  * """
13076  * Square root of -1 which commutes with all members of the frame of the given multivector.
13077  */
13078 
13079  /* function exit code */
13080  __pyx_L1_error:;
13081  __Pyx_XDECREF(__pyx_t_1);
13082  __Pyx_XDECREF(__pyx_t_2);
13083  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13084  __pyx_r = 0;
13085  __pyx_L0:;
13086  __Pyx_XGIVEREF(__pyx_r);
13087  __Pyx_RefNannyFinishContext();
13088  return __pyx_r;
13089  }
13090 
13091  /* Python wrapper */
13092  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13093  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 ";
13094  static PyObject *__pyx_pw_8PyClical_43complexifier(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13095  PyObject *__pyx_r = 0;
13096  __Pyx_RefNannyDeclarations
13097  __Pyx_RefNannySetupContext("complexifier (wrapper)", 0);
13098  __pyx_r = __pyx_pf_8PyClical_42complexifier(__pyx_self, ((PyObject *)__pyx_v_obj));
13099 
13100  /* function exit code */
13101  __Pyx_RefNannyFinishContext();
13102  return __pyx_r;
13103  }
13104 
13105  static PyObject *__pyx_pf_8PyClical_42complexifier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13106  PyObject *__pyx_r = NULL;
13107  __Pyx_RefNannyDeclarations
13108  PyObject *__pyx_t_1 = NULL;
13109  __Pyx_RefNannySetupContext("complexifier", 0);
13110  __Pyx_XDECREF(__pyx_r);
13111  __pyx_t_1 = __pyx_f_8PyClical_complexifier(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error)
13112  __Pyx_GOTREF(__pyx_t_1);
13113  __pyx_r = __pyx_t_1;
13114  __pyx_t_1 = 0;
13115  goto __pyx_L0;
13116 
13117  /* function exit code */
13118  __pyx_L1_error:;
13119  __Pyx_XDECREF(__pyx_t_1);
13120  __Pyx_AddTraceback("PyClical.complexifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
13121  __pyx_r = NULL;
13122  __pyx_L0:;
13123  __Pyx_XGIVEREF(__pyx_r);
13124  __Pyx_RefNannyFinishContext();
13125  return __pyx_r;
13126  }
13127 
13128  /* "PyClical.pyx":1542
13129  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13130  *
13131  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13132  * """
13133  * Square root of multivector with optional complexifier.
13134  */
13135 
13136  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13137  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) {
13138  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13139  PyObject *__pyx_r = NULL;
13140  __Pyx_RefNannyDeclarations
13141  int __pyx_t_1;
13142  int __pyx_t_2;
13143  PyObject *__pyx_t_3 = NULL;
13144  Clifford __pyx_t_4;
13145  PyObject *__pyx_t_5 = NULL;
13146  PyObject *__pyx_t_6 = NULL;
13147  PyObject *__pyx_t_7 = NULL;
13148  PyObject *__pyx_t_8 = NULL;
13149  PyObject *__pyx_t_9 = NULL;
13150  PyObject *__pyx_t_10 = NULL;
13151  PyObject *__pyx_t_11 = NULL;
13152  __Pyx_RefNannySetupContext("sqrt", 0);
13153  if (__pyx_optional_args) {
13154  if (__pyx_optional_args->__pyx_n > 0) {
13155  __pyx_v_i = __pyx_optional_args->i;
13156  }
13157  }
13158 
13159  /* "PyClical.pyx":1557
13160  * -1
13161  * """
13162  * if not (i is None): # <<<<<<<<<<<<<<
13163  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13164  * else:
13165  */
13166  __pyx_t_1 = (__pyx_v_i != Py_None);
13167  __pyx_t_2 = (__pyx_t_1 != 0);
13168  if (__pyx_t_2) {
13169 
13170  /* "PyClical.pyx":1558
13171  * """
13172  * if not (i is None):
13173  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13174  * else:
13175  * try:
13176  */
13177  __Pyx_XDECREF(__pyx_r);
13178  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
13179  __Pyx_GOTREF(__pyx_t_3);
13180  try {
13181  __pyx_t_4 = sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13182  } catch(...) {
13183  __Pyx_CppExn2PyErr();
13184  __PYX_ERR(0, 1558, __pyx_L1_error)
13185  }
13186  __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)
13187  __Pyx_GOTREF(__pyx_t_5);
13188  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13189  __pyx_r = __pyx_t_5;
13190  __pyx_t_5 = 0;
13191  goto __pyx_L0;
13192 
13193  /* "PyClical.pyx":1557
13194  * -1
13195  * """
13196  * if not (i is None): # <<<<<<<<<<<<<<
13197  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13198  * else:
13199  */
13200  }
13201 
13202  /* "PyClical.pyx":1560
13203  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13204  * else:
13205  * try: # <<<<<<<<<<<<<<
13206  * return math.sqrt(obj)
13207  * except:
13208  */
13209  /*else*/ {
13210  {
13211  __Pyx_PyThreadState_declare
13212  __Pyx_PyThreadState_assign
13213  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13214  __Pyx_XGOTREF(__pyx_t_6);
13215  __Pyx_XGOTREF(__pyx_t_7);
13216  __Pyx_XGOTREF(__pyx_t_8);
13217  /*try:*/ {
13218 
13219  /* "PyClical.pyx":1561
13220  * else:
13221  * try:
13222  * return math.sqrt(obj) # <<<<<<<<<<<<<<
13223  * except:
13224  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13225  */
13226  __Pyx_XDECREF(__pyx_r);
13227  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L4_error)
13228  __Pyx_GOTREF(__pyx_t_3);
13229  __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)
13230  __Pyx_GOTREF(__pyx_t_9);
13231  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13232  __pyx_t_3 = NULL;
13233  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13234  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13235  if (likely(__pyx_t_3)) {
13236  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13237  __Pyx_INCREF(__pyx_t_3);
13238  __Pyx_INCREF(function);
13239  __Pyx_DECREF_SET(__pyx_t_9, function);
13240  }
13241  }
13242  if (!__pyx_t_3) {
13243  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13244  __Pyx_GOTREF(__pyx_t_5);
13245  } else {
13246  #if CYTHON_FAST_PYCALL
13247  if (PyFunction_Check(__pyx_t_9)) {
13248  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13249  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13250  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13251  __Pyx_GOTREF(__pyx_t_5);
13252  } else
13253  #endif
13254  #if CYTHON_FAST_PYCCALL
13255  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13256  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13257  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13258  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13259  __Pyx_GOTREF(__pyx_t_5);
13260  } else
13261  #endif
13262  {
13263  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L4_error)
13264  __Pyx_GOTREF(__pyx_t_10);
13265  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13266  __Pyx_INCREF(__pyx_v_obj);
13267  __Pyx_GIVEREF(__pyx_v_obj);
13268  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13269  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L4_error)
13270  __Pyx_GOTREF(__pyx_t_5);
13271  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13272  }
13273  }
13274  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13275  __pyx_r = __pyx_t_5;
13276  __pyx_t_5 = 0;
13277  goto __pyx_L8_try_return;
13278 
13279  /* "PyClical.pyx":1560
13280  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13281  * else:
13282  * try: # <<<<<<<<<<<<<<
13283  * return math.sqrt(obj)
13284  * except:
13285  */
13286  }
13287  __pyx_L4_error:;
13288  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13289  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13290  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13291  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13292 
13293  /* "PyClical.pyx":1562
13294  * try:
13295  * return math.sqrt(obj)
13296  * except: # <<<<<<<<<<<<<<
13297  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13298  *
13299  */
13300  /*except:*/ {
13301  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13302  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1562, __pyx_L6_except_error)
13303  __Pyx_GOTREF(__pyx_t_5);
13304  __Pyx_GOTREF(__pyx_t_9);
13305  __Pyx_GOTREF(__pyx_t_10);
13306 
13307  /* "PyClical.pyx":1563
13308  * return math.sqrt(obj)
13309  * except:
13310  * return clifford().wrap( glucat.sqrt(toClifford(obj)) ) # <<<<<<<<<<<<<<
13311  *
13312  * cpdef inline exp(obj):
13313  */
13314  __Pyx_XDECREF(__pyx_r);
13315  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13316  __Pyx_GOTREF(__pyx_t_3);
13317  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), sqrt(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1563, __pyx_L6_except_error)
13318  __Pyx_GOTREF(__pyx_t_11);
13319  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13320  __pyx_r = __pyx_t_11;
13321  __pyx_t_11 = 0;
13322  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13323  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13324  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13325  goto __pyx_L7_except_return;
13326  }
13327  __pyx_L6_except_error:;
13328 
13329  /* "PyClical.pyx":1560
13330  * return clifford().wrap( glucat.sqrt(toClifford(obj), toClifford(i)) )
13331  * else:
13332  * try: # <<<<<<<<<<<<<<
13333  * return math.sqrt(obj)
13334  * except:
13335  */
13336  __Pyx_XGIVEREF(__pyx_t_6);
13337  __Pyx_XGIVEREF(__pyx_t_7);
13338  __Pyx_XGIVEREF(__pyx_t_8);
13339  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13340  goto __pyx_L1_error;
13341  __pyx_L8_try_return:;
13342  __Pyx_XGIVEREF(__pyx_t_6);
13343  __Pyx_XGIVEREF(__pyx_t_7);
13344  __Pyx_XGIVEREF(__pyx_t_8);
13345  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13346  goto __pyx_L0;
13347  __pyx_L7_except_return:;
13348  __Pyx_XGIVEREF(__pyx_t_6);
13349  __Pyx_XGIVEREF(__pyx_t_7);
13350  __Pyx_XGIVEREF(__pyx_t_8);
13351  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13352  goto __pyx_L0;
13353  }
13354  }
13355 
13356  /* "PyClical.pyx":1542
13357  * return clifford().wrap( glucat.complexifier(toClifford(obj)) )
13358  *
13359  * cpdef inline sqrt(obj, i = None): # <<<<<<<<<<<<<<
13360  * """
13361  * Square root of multivector with optional complexifier.
13362  */
13363 
13364  /* function exit code */
13365  __pyx_L1_error:;
13366  __Pyx_XDECREF(__pyx_t_3);
13367  __Pyx_XDECREF(__pyx_t_5);
13368  __Pyx_XDECREF(__pyx_t_9);
13369  __Pyx_XDECREF(__pyx_t_10);
13370  __Pyx_XDECREF(__pyx_t_11);
13371  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13372  __pyx_r = 0;
13373  __pyx_L0:;
13374  __Pyx_XGIVEREF(__pyx_r);
13375  __Pyx_RefNannyFinishContext();
13376  return __pyx_r;
13377  }
13378 
13379  /* Python wrapper */
13380  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13381  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 ";
13382  static PyObject *__pyx_pw_8PyClical_45sqrt(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13383  PyObject *__pyx_v_obj = 0;
13384  PyObject *__pyx_v_i = 0;
13385  PyObject *__pyx_r = 0;
13386  __Pyx_RefNannyDeclarations
13387  __Pyx_RefNannySetupContext("sqrt (wrapper)", 0);
13388  {
13389  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13390  PyObject* values[2] = {0,0};
13391  values[1] = ((PyObject *)Py_None);
13392  if (unlikely(__pyx_kwds)) {
13393  Py_ssize_t kw_args;
13394  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13395  switch (pos_args) {
13396  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13397  CYTHON_FALLTHROUGH;
13398  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13399  CYTHON_FALLTHROUGH;
13400  case 0: break;
13401  default: goto __pyx_L5_argtuple_error;
13402  }
13403  kw_args = PyDict_Size(__pyx_kwds);
13404  switch (pos_args) {
13405  case 0:
13406  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13407  else goto __pyx_L5_argtuple_error;
13408  CYTHON_FALLTHROUGH;
13409  case 1:
13410  if (kw_args > 0) {
13411  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13412  if (value) { values[1] = value; kw_args--; }
13413  }
13414  }
13415  if (unlikely(kw_args > 0)) {
13416  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sqrt") < 0)) __PYX_ERR(0, 1542, __pyx_L3_error)
13417  }
13418  } else {
13419  switch (PyTuple_GET_SIZE(__pyx_args)) {
13420  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13421  CYTHON_FALLTHROUGH;
13422  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13423  break;
13424  default: goto __pyx_L5_argtuple_error;
13425  }
13426  }
13427  __pyx_v_obj = values[0];
13428  __pyx_v_i = values[1];
13429  }
13430  goto __pyx_L4_argument_unpacking_done;
13431  __pyx_L5_argtuple_error:;
13432  __Pyx_RaiseArgtupleInvalid("sqrt", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1542, __pyx_L3_error)
13433  __pyx_L3_error:;
13434  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13435  __Pyx_RefNannyFinishContext();
13436  return NULL;
13437  __pyx_L4_argument_unpacking_done:;
13438  __pyx_r = __pyx_pf_8PyClical_44sqrt(__pyx_self, __pyx_v_obj, __pyx_v_i);
13439 
13440  /* function exit code */
13441  __Pyx_RefNannyFinishContext();
13442  return __pyx_r;
13443  }
13444 
13445  static PyObject *__pyx_pf_8PyClical_44sqrt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
13446  PyObject *__pyx_r = NULL;
13447  __Pyx_RefNannyDeclarations
13448  PyObject *__pyx_t_1 = NULL;
13449  struct __pyx_opt_args_8PyClical_sqrt __pyx_t_2;
13450  __Pyx_RefNannySetupContext("sqrt", 0);
13451  __Pyx_XDECREF(__pyx_r);
13452  __pyx_t_2.__pyx_n = 1;
13453  __pyx_t_2.i = __pyx_v_i;
13454  __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)
13455  __Pyx_GOTREF(__pyx_t_1);
13456  __pyx_r = __pyx_t_1;
13457  __pyx_t_1 = 0;
13458  goto __pyx_L0;
13459 
13460  /* function exit code */
13461  __pyx_L1_error:;
13462  __Pyx_XDECREF(__pyx_t_1);
13463  __Pyx_AddTraceback("PyClical.sqrt", __pyx_clineno, __pyx_lineno, __pyx_filename);
13464  __pyx_r = NULL;
13465  __pyx_L0:;
13466  __Pyx_XGIVEREF(__pyx_r);
13467  __Pyx_RefNannyFinishContext();
13468  return __pyx_r;
13469  }
13470 
13471  /* "PyClical.pyx":1565
13472  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13473  *
13474  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13475  * """
13476  * Exponential of multivector.
13477  */
13478 
13479  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13480  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_exp(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
13481  PyObject *__pyx_r = NULL;
13482  __Pyx_RefNannyDeclarations
13483  PyObject *__pyx_t_1 = NULL;
13484  PyObject *__pyx_t_2 = NULL;
13485  PyObject *__pyx_t_3 = NULL;
13486  PyObject *__pyx_t_4 = NULL;
13487  PyObject *__pyx_t_5 = NULL;
13488  PyObject *__pyx_t_6 = NULL;
13489  PyObject *__pyx_t_7 = NULL;
13490  PyObject *__pyx_t_8 = NULL;
13491  __Pyx_RefNannySetupContext("exp", 0);
13492 
13493  /* "PyClical.pyx":1574
13494  * {1,2}
13495  * """
13496  * try: # <<<<<<<<<<<<<<
13497  * return math.exp(obj)
13498  * except:
13499  */
13500  {
13501  __Pyx_PyThreadState_declare
13502  __Pyx_PyThreadState_assign
13503  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
13504  __Pyx_XGOTREF(__pyx_t_1);
13505  __Pyx_XGOTREF(__pyx_t_2);
13506  __Pyx_XGOTREF(__pyx_t_3);
13507  /*try:*/ {
13508 
13509  /* "PyClical.pyx":1575
13510  * """
13511  * try:
13512  * return math.exp(obj) # <<<<<<<<<<<<<<
13513  * except:
13514  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13515  */
13516  __Pyx_XDECREF(__pyx_r);
13517  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L3_error)
13518  __Pyx_GOTREF(__pyx_t_5);
13519  __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)
13520  __Pyx_GOTREF(__pyx_t_6);
13521  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13522  __pyx_t_5 = NULL;
13523  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
13524  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
13525  if (likely(__pyx_t_5)) {
13526  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
13527  __Pyx_INCREF(__pyx_t_5);
13528  __Pyx_INCREF(function);
13529  __Pyx_DECREF_SET(__pyx_t_6, function);
13530  }
13531  }
13532  if (!__pyx_t_5) {
13533  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13534  __Pyx_GOTREF(__pyx_t_4);
13535  } else {
13536  #if CYTHON_FAST_PYCALL
13537  if (PyFunction_Check(__pyx_t_6)) {
13538  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13539  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13540  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13541  __Pyx_GOTREF(__pyx_t_4);
13542  } else
13543  #endif
13544  #if CYTHON_FAST_PYCCALL
13545  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
13546  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
13547  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13548  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13549  __Pyx_GOTREF(__pyx_t_4);
13550  } else
13551  #endif
13552  {
13553  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L3_error)
13554  __Pyx_GOTREF(__pyx_t_7);
13555  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
13556  __Pyx_INCREF(__pyx_v_obj);
13557  __Pyx_GIVEREF(__pyx_v_obj);
13558  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
13559  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L3_error)
13560  __Pyx_GOTREF(__pyx_t_4);
13561  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13562  }
13563  }
13564  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13565  __pyx_r = __pyx_t_4;
13566  __pyx_t_4 = 0;
13567  goto __pyx_L7_try_return;
13568 
13569  /* "PyClical.pyx":1574
13570  * {1,2}
13571  * """
13572  * try: # <<<<<<<<<<<<<<
13573  * return math.exp(obj)
13574  * except:
13575  */
13576  }
13577  __pyx_L3_error:;
13578  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13579  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13580  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13581  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13582 
13583  /* "PyClical.pyx":1576
13584  * try:
13585  * return math.exp(obj)
13586  * except: # <<<<<<<<<<<<<<
13587  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13588  *
13589  */
13590  /*except:*/ {
13591  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13592  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1576, __pyx_L5_except_error)
13593  __Pyx_GOTREF(__pyx_t_4);
13594  __Pyx_GOTREF(__pyx_t_6);
13595  __Pyx_GOTREF(__pyx_t_7);
13596 
13597  /* "PyClical.pyx":1577
13598  * return math.exp(obj)
13599  * except:
13600  * return clifford().wrap( glucat.exp(toClifford(obj)) ) # <<<<<<<<<<<<<<
13601  *
13602  * cpdef inline log(obj,i = None):
13603  */
13604  __Pyx_XDECREF(__pyx_r);
13605  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13606  __Pyx_GOTREF(__pyx_t_5);
13607  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), exp(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1577, __pyx_L5_except_error)
13608  __Pyx_GOTREF(__pyx_t_8);
13609  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13610  __pyx_r = __pyx_t_8;
13611  __pyx_t_8 = 0;
13612  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13613  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13614  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13615  goto __pyx_L6_except_return;
13616  }
13617  __pyx_L5_except_error:;
13618 
13619  /* "PyClical.pyx":1574
13620  * {1,2}
13621  * """
13622  * try: # <<<<<<<<<<<<<<
13623  * return math.exp(obj)
13624  * except:
13625  */
13626  __Pyx_XGIVEREF(__pyx_t_1);
13627  __Pyx_XGIVEREF(__pyx_t_2);
13628  __Pyx_XGIVEREF(__pyx_t_3);
13629  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13630  goto __pyx_L1_error;
13631  __pyx_L7_try_return:;
13632  __Pyx_XGIVEREF(__pyx_t_1);
13633  __Pyx_XGIVEREF(__pyx_t_2);
13634  __Pyx_XGIVEREF(__pyx_t_3);
13635  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13636  goto __pyx_L0;
13637  __pyx_L6_except_return:;
13638  __Pyx_XGIVEREF(__pyx_t_1);
13639  __Pyx_XGIVEREF(__pyx_t_2);
13640  __Pyx_XGIVEREF(__pyx_t_3);
13641  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
13642  goto __pyx_L0;
13643  }
13644 
13645  /* "PyClical.pyx":1565
13646  * return clifford().wrap( glucat.sqrt(toClifford(obj)) )
13647  *
13648  * cpdef inline exp(obj): # <<<<<<<<<<<<<<
13649  * """
13650  * Exponential of multivector.
13651  */
13652 
13653  /* function exit code */
13654  __pyx_L1_error:;
13655  __Pyx_XDECREF(__pyx_t_4);
13656  __Pyx_XDECREF(__pyx_t_5);
13657  __Pyx_XDECREF(__pyx_t_6);
13658  __Pyx_XDECREF(__pyx_t_7);
13659  __Pyx_XDECREF(__pyx_t_8);
13660  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13661  __pyx_r = 0;
13662  __pyx_L0:;
13663  __Pyx_XGIVEREF(__pyx_r);
13664  __Pyx_RefNannyFinishContext();
13665  return __pyx_r;
13666  }
13667 
13668  /* Python wrapper */
13669  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
13670  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 ";
13671  static PyObject *__pyx_pw_8PyClical_47exp(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13672  PyObject *__pyx_r = 0;
13673  __Pyx_RefNannyDeclarations
13674  __Pyx_RefNannySetupContext("exp (wrapper)", 0);
13675  __pyx_r = __pyx_pf_8PyClical_46exp(__pyx_self, ((PyObject *)__pyx_v_obj));
13676 
13677  /* function exit code */
13678  __Pyx_RefNannyFinishContext();
13679  return __pyx_r;
13680  }
13681 
13682  static PyObject *__pyx_pf_8PyClical_46exp(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
13683  PyObject *__pyx_r = NULL;
13684  __Pyx_RefNannyDeclarations
13685  PyObject *__pyx_t_1 = NULL;
13686  __Pyx_RefNannySetupContext("exp", 0);
13687  __Pyx_XDECREF(__pyx_r);
13688  __pyx_t_1 = __pyx_f_8PyClical_exp(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
13689  __Pyx_GOTREF(__pyx_t_1);
13690  __pyx_r = __pyx_t_1;
13691  __pyx_t_1 = 0;
13692  goto __pyx_L0;
13693 
13694  /* function exit code */
13695  __pyx_L1_error:;
13696  __Pyx_XDECREF(__pyx_t_1);
13697  __Pyx_AddTraceback("PyClical.exp", __pyx_clineno, __pyx_lineno, __pyx_filename);
13698  __pyx_r = NULL;
13699  __pyx_L0:;
13700  __Pyx_XGIVEREF(__pyx_r);
13701  __Pyx_RefNannyFinishContext();
13702  return __pyx_r;
13703  }
13704 
13705  /* "PyClical.pyx":1579
13706  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13707  *
13708  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13709  * """
13710  * Natural logarithm of multivector with optional complexifier.
13711  */
13712 
13713  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13714  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) {
13715  PyObject *__pyx_v_i = ((PyObject *)Py_None);
13716  PyObject *__pyx_r = NULL;
13717  __Pyx_RefNannyDeclarations
13718  int __pyx_t_1;
13719  int __pyx_t_2;
13720  PyObject *__pyx_t_3 = NULL;
13721  Clifford __pyx_t_4;
13722  PyObject *__pyx_t_5 = NULL;
13723  PyObject *__pyx_t_6 = NULL;
13724  PyObject *__pyx_t_7 = NULL;
13725  PyObject *__pyx_t_8 = NULL;
13726  PyObject *__pyx_t_9 = NULL;
13727  PyObject *__pyx_t_10 = NULL;
13728  PyObject *__pyx_t_11 = NULL;
13729  __Pyx_RefNannySetupContext("log", 0);
13730  if (__pyx_optional_args) {
13731  if (__pyx_optional_args->__pyx_n > 0) {
13732  __pyx_v_i = __pyx_optional_args->i;
13733  }
13734  }
13735 
13736  /* "PyClical.pyx":1594
13737  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13738  * """
13739  * if not (i is None): # <<<<<<<<<<<<<<
13740  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13741  * else:
13742  */
13743  __pyx_t_1 = (__pyx_v_i != Py_None);
13744  __pyx_t_2 = (__pyx_t_1 != 0);
13745  if (__pyx_t_2) {
13746 
13747  /* "PyClical.pyx":1595
13748  * """
13749  * if not (i is None):
13750  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
13751  * else:
13752  * try:
13753  */
13754  __Pyx_XDECREF(__pyx_r);
13755  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1595, __pyx_L1_error)
13756  __Pyx_GOTREF(__pyx_t_3);
13757  try {
13758  __pyx_t_4 = log(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
13759  } catch(...) {
13760  __Pyx_CppExn2PyErr();
13761  __PYX_ERR(0, 1595, __pyx_L1_error)
13762  }
13763  __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)
13764  __Pyx_GOTREF(__pyx_t_5);
13765  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13766  __pyx_r = __pyx_t_5;
13767  __pyx_t_5 = 0;
13768  goto __pyx_L0;
13769 
13770  /* "PyClical.pyx":1594
13771  * RuntimeError: check_complex(val, i): i is not a valid complexifier for val
13772  * """
13773  * if not (i is None): # <<<<<<<<<<<<<<
13774  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13775  * else:
13776  */
13777  }
13778 
13779  /* "PyClical.pyx":1597
13780  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13781  * else:
13782  * try: # <<<<<<<<<<<<<<
13783  * return math.log(obj)
13784  * except:
13785  */
13786  /*else*/ {
13787  {
13788  __Pyx_PyThreadState_declare
13789  __Pyx_PyThreadState_assign
13790  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
13791  __Pyx_XGOTREF(__pyx_t_6);
13792  __Pyx_XGOTREF(__pyx_t_7);
13793  __Pyx_XGOTREF(__pyx_t_8);
13794  /*try:*/ {
13795 
13796  /* "PyClical.pyx":1598
13797  * else:
13798  * try:
13799  * return math.log(obj) # <<<<<<<<<<<<<<
13800  * except:
13801  * return clifford().wrap( glucat.log(toClifford(obj)) )
13802  */
13803  __Pyx_XDECREF(__pyx_r);
13804  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1598, __pyx_L4_error)
13805  __Pyx_GOTREF(__pyx_t_3);
13806  __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)
13807  __Pyx_GOTREF(__pyx_t_9);
13808  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13809  __pyx_t_3 = NULL;
13810  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
13811  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
13812  if (likely(__pyx_t_3)) {
13813  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
13814  __Pyx_INCREF(__pyx_t_3);
13815  __Pyx_INCREF(function);
13816  __Pyx_DECREF_SET(__pyx_t_9, function);
13817  }
13818  }
13819  if (!__pyx_t_3) {
13820  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13821  __Pyx_GOTREF(__pyx_t_5);
13822  } else {
13823  #if CYTHON_FAST_PYCALL
13824  if (PyFunction_Check(__pyx_t_9)) {
13825  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13826  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13827  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13828  __Pyx_GOTREF(__pyx_t_5);
13829  } else
13830  #endif
13831  #if CYTHON_FAST_PYCCALL
13832  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
13833  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
13834  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13835  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13836  __Pyx_GOTREF(__pyx_t_5);
13837  } else
13838  #endif
13839  {
13840  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1598, __pyx_L4_error)
13841  __Pyx_GOTREF(__pyx_t_10);
13842  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
13843  __Pyx_INCREF(__pyx_v_obj);
13844  __Pyx_GIVEREF(__pyx_v_obj);
13845  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
13846  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L4_error)
13847  __Pyx_GOTREF(__pyx_t_5);
13848  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13849  }
13850  }
13851  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13852  __pyx_r = __pyx_t_5;
13853  __pyx_t_5 = 0;
13854  goto __pyx_L8_try_return;
13855 
13856  /* "PyClical.pyx":1597
13857  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13858  * else:
13859  * try: # <<<<<<<<<<<<<<
13860  * return math.log(obj)
13861  * except:
13862  */
13863  }
13864  __pyx_L4_error:;
13865  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13866  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
13867  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
13868  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13869 
13870  /* "PyClical.pyx":1599
13871  * try:
13872  * return math.log(obj)
13873  * except: # <<<<<<<<<<<<<<
13874  * return clifford().wrap( glucat.log(toClifford(obj)) )
13875  *
13876  */
13877  /*except:*/ {
13878  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13879  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1599, __pyx_L6_except_error)
13880  __Pyx_GOTREF(__pyx_t_5);
13881  __Pyx_GOTREF(__pyx_t_9);
13882  __Pyx_GOTREF(__pyx_t_10);
13883 
13884  /* "PyClical.pyx":1600
13885  * return math.log(obj)
13886  * except:
13887  * return clifford().wrap( glucat.log(toClifford(obj)) ) # <<<<<<<<<<<<<<
13888  *
13889  * cpdef inline cos(obj,i = None):
13890  */
13891  __Pyx_XDECREF(__pyx_r);
13892  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13893  __Pyx_GOTREF(__pyx_t_3);
13894  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), log(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1600, __pyx_L6_except_error)
13895  __Pyx_GOTREF(__pyx_t_11);
13896  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13897  __pyx_r = __pyx_t_11;
13898  __pyx_t_11 = 0;
13899  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13900  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
13901  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
13902  goto __pyx_L7_except_return;
13903  }
13904  __pyx_L6_except_error:;
13905 
13906  /* "PyClical.pyx":1597
13907  * return clifford().wrap( glucat.log(toClifford(obj), toClifford(i)) )
13908  * else:
13909  * try: # <<<<<<<<<<<<<<
13910  * return math.log(obj)
13911  * except:
13912  */
13913  __Pyx_XGIVEREF(__pyx_t_6);
13914  __Pyx_XGIVEREF(__pyx_t_7);
13915  __Pyx_XGIVEREF(__pyx_t_8);
13916  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13917  goto __pyx_L1_error;
13918  __pyx_L8_try_return:;
13919  __Pyx_XGIVEREF(__pyx_t_6);
13920  __Pyx_XGIVEREF(__pyx_t_7);
13921  __Pyx_XGIVEREF(__pyx_t_8);
13922  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13923  goto __pyx_L0;
13924  __pyx_L7_except_return:;
13925  __Pyx_XGIVEREF(__pyx_t_6);
13926  __Pyx_XGIVEREF(__pyx_t_7);
13927  __Pyx_XGIVEREF(__pyx_t_8);
13928  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
13929  goto __pyx_L0;
13930  }
13931  }
13932 
13933  /* "PyClical.pyx":1579
13934  * return clifford().wrap( glucat.exp(toClifford(obj)) )
13935  *
13936  * cpdef inline log(obj,i = None): # <<<<<<<<<<<<<<
13937  * """
13938  * Natural logarithm of multivector with optional complexifier.
13939  */
13940 
13941  /* function exit code */
13942  __pyx_L1_error:;
13943  __Pyx_XDECREF(__pyx_t_3);
13944  __Pyx_XDECREF(__pyx_t_5);
13945  __Pyx_XDECREF(__pyx_t_9);
13946  __Pyx_XDECREF(__pyx_t_10);
13947  __Pyx_XDECREF(__pyx_t_11);
13948  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
13949  __pyx_r = 0;
13950  __pyx_L0:;
13951  __Pyx_XGIVEREF(__pyx_r);
13952  __Pyx_RefNannyFinishContext();
13953  return __pyx_r;
13954  }
13955 
13956  /* Python wrapper */
13957  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13958  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 ";
13959  static PyObject *__pyx_pw_8PyClical_49log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13960  PyObject *__pyx_v_obj = 0;
13961  PyObject *__pyx_v_i = 0;
13962  PyObject *__pyx_r = 0;
13963  __Pyx_RefNannyDeclarations
13964  __Pyx_RefNannySetupContext("log (wrapper)", 0);
13965  {
13966  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
13967  PyObject* values[2] = {0,0};
13968  values[1] = ((PyObject *)Py_None);
13969  if (unlikely(__pyx_kwds)) {
13970  Py_ssize_t kw_args;
13971  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13972  switch (pos_args) {
13973  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13974  CYTHON_FALLTHROUGH;
13975  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13976  CYTHON_FALLTHROUGH;
13977  case 0: break;
13978  default: goto __pyx_L5_argtuple_error;
13979  }
13980  kw_args = PyDict_Size(__pyx_kwds);
13981  switch (pos_args) {
13982  case 0:
13983  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
13984  else goto __pyx_L5_argtuple_error;
13985  CYTHON_FALLTHROUGH;
13986  case 1:
13987  if (kw_args > 0) {
13988  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
13989  if (value) { values[1] = value; kw_args--; }
13990  }
13991  }
13992  if (unlikely(kw_args > 0)) {
13993  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log") < 0)) __PYX_ERR(0, 1579, __pyx_L3_error)
13994  }
13995  } else {
13996  switch (PyTuple_GET_SIZE(__pyx_args)) {
13997  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13998  CYTHON_FALLTHROUGH;
13999  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14000  break;
14001  default: goto __pyx_L5_argtuple_error;
14002  }
14003  }
14004  __pyx_v_obj = values[0];
14005  __pyx_v_i = values[1];
14006  }
14007  goto __pyx_L4_argument_unpacking_done;
14008  __pyx_L5_argtuple_error:;
14009  __Pyx_RaiseArgtupleInvalid("log", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1579, __pyx_L3_error)
14010  __pyx_L3_error:;
14011  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14012  __Pyx_RefNannyFinishContext();
14013  return NULL;
14014  __pyx_L4_argument_unpacking_done:;
14015  __pyx_r = __pyx_pf_8PyClical_48log(__pyx_self, __pyx_v_obj, __pyx_v_i);
14016 
14017  /* function exit code */
14018  __Pyx_RefNannyFinishContext();
14019  return __pyx_r;
14020  }
14021 
14022  static PyObject *__pyx_pf_8PyClical_48log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14023  PyObject *__pyx_r = NULL;
14024  __Pyx_RefNannyDeclarations
14025  PyObject *__pyx_t_1 = NULL;
14026  struct __pyx_opt_args_8PyClical_log __pyx_t_2;
14027  __Pyx_RefNannySetupContext("log", 0);
14028  __Pyx_XDECREF(__pyx_r);
14029  __pyx_t_2.__pyx_n = 1;
14030  __pyx_t_2.i = __pyx_v_i;
14031  __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)
14032  __Pyx_GOTREF(__pyx_t_1);
14033  __pyx_r = __pyx_t_1;
14034  __pyx_t_1 = 0;
14035  goto __pyx_L0;
14036 
14037  /* function exit code */
14038  __pyx_L1_error:;
14039  __Pyx_XDECREF(__pyx_t_1);
14040  __Pyx_AddTraceback("PyClical.log", __pyx_clineno, __pyx_lineno, __pyx_filename);
14041  __pyx_r = NULL;
14042  __pyx_L0:;
14043  __Pyx_XGIVEREF(__pyx_r);
14044  __Pyx_RefNannyFinishContext();
14045  return __pyx_r;
14046  }
14047 
14048  /* "PyClical.pyx":1602
14049  * return clifford().wrap( glucat.log(toClifford(obj)) )
14050  *
14051  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14052  * """
14053  * Cosine of multivector with optional complexifier.
14054  */
14055 
14056  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14057  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) {
14058  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14059  PyObject *__pyx_r = NULL;
14060  __Pyx_RefNannyDeclarations
14061  int __pyx_t_1;
14062  int __pyx_t_2;
14063  PyObject *__pyx_t_3 = NULL;
14064  Clifford __pyx_t_4;
14065  PyObject *__pyx_t_5 = NULL;
14066  PyObject *__pyx_t_6 = NULL;
14067  PyObject *__pyx_t_7 = NULL;
14068  PyObject *__pyx_t_8 = NULL;
14069  PyObject *__pyx_t_9 = NULL;
14070  PyObject *__pyx_t_10 = NULL;
14071  PyObject *__pyx_t_11 = NULL;
14072  __Pyx_RefNannySetupContext("cos", 0);
14073  if (__pyx_optional_args) {
14074  if (__pyx_optional_args->__pyx_n > 0) {
14075  __pyx_v_i = __pyx_optional_args->i;
14076  }
14077  }
14078 
14079  /* "PyClical.pyx":1611
14080  * {1,2}
14081  * """
14082  * if not (i is None): # <<<<<<<<<<<<<<
14083  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14084  * else:
14085  */
14086  __pyx_t_1 = (__pyx_v_i != Py_None);
14087  __pyx_t_2 = (__pyx_t_1 != 0);
14088  if (__pyx_t_2) {
14089 
14090  /* "PyClical.pyx":1612
14091  * """
14092  * if not (i is None):
14093  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14094  * else:
14095  * try:
14096  */
14097  __Pyx_XDECREF(__pyx_r);
14098  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1612, __pyx_L1_error)
14099  __Pyx_GOTREF(__pyx_t_3);
14100  try {
14101  __pyx_t_4 = cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14102  } catch(...) {
14103  __Pyx_CppExn2PyErr();
14104  __PYX_ERR(0, 1612, __pyx_L1_error)
14105  }
14106  __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)
14107  __Pyx_GOTREF(__pyx_t_5);
14108  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14109  __pyx_r = __pyx_t_5;
14110  __pyx_t_5 = 0;
14111  goto __pyx_L0;
14112 
14113  /* "PyClical.pyx":1611
14114  * {1,2}
14115  * """
14116  * if not (i is None): # <<<<<<<<<<<<<<
14117  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14118  * else:
14119  */
14120  }
14121 
14122  /* "PyClical.pyx":1614
14123  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14124  * else:
14125  * try: # <<<<<<<<<<<<<<
14126  * return math.cos(obj)
14127  * except:
14128  */
14129  /*else*/ {
14130  {
14131  __Pyx_PyThreadState_declare
14132  __Pyx_PyThreadState_assign
14133  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14134  __Pyx_XGOTREF(__pyx_t_6);
14135  __Pyx_XGOTREF(__pyx_t_7);
14136  __Pyx_XGOTREF(__pyx_t_8);
14137  /*try:*/ {
14138 
14139  /* "PyClical.pyx":1615
14140  * else:
14141  * try:
14142  * return math.cos(obj) # <<<<<<<<<<<<<<
14143  * except:
14144  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14145  */
14146  __Pyx_XDECREF(__pyx_r);
14147  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1615, __pyx_L4_error)
14148  __Pyx_GOTREF(__pyx_t_3);
14149  __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)
14150  __Pyx_GOTREF(__pyx_t_9);
14151  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14152  __pyx_t_3 = NULL;
14153  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14154  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14155  if (likely(__pyx_t_3)) {
14156  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14157  __Pyx_INCREF(__pyx_t_3);
14158  __Pyx_INCREF(function);
14159  __Pyx_DECREF_SET(__pyx_t_9, function);
14160  }
14161  }
14162  if (!__pyx_t_3) {
14163  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14164  __Pyx_GOTREF(__pyx_t_5);
14165  } else {
14166  #if CYTHON_FAST_PYCALL
14167  if (PyFunction_Check(__pyx_t_9)) {
14168  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14169  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14170  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14171  __Pyx_GOTREF(__pyx_t_5);
14172  } else
14173  #endif
14174  #if CYTHON_FAST_PYCCALL
14175  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14176  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14177  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14178  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14179  __Pyx_GOTREF(__pyx_t_5);
14180  } else
14181  #endif
14182  {
14183  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1615, __pyx_L4_error)
14184  __Pyx_GOTREF(__pyx_t_10);
14185  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14186  __Pyx_INCREF(__pyx_v_obj);
14187  __Pyx_GIVEREF(__pyx_v_obj);
14188  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14189  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1615, __pyx_L4_error)
14190  __Pyx_GOTREF(__pyx_t_5);
14191  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14192  }
14193  }
14194  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14195  __pyx_r = __pyx_t_5;
14196  __pyx_t_5 = 0;
14197  goto __pyx_L8_try_return;
14198 
14199  /* "PyClical.pyx":1614
14200  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14201  * else:
14202  * try: # <<<<<<<<<<<<<<
14203  * return math.cos(obj)
14204  * except:
14205  */
14206  }
14207  __pyx_L4_error:;
14208  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14209  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14210  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14211  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14212 
14213  /* "PyClical.pyx":1616
14214  * try:
14215  * return math.cos(obj)
14216  * except: # <<<<<<<<<<<<<<
14217  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14218  *
14219  */
14220  /*except:*/ {
14221  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14222  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1616, __pyx_L6_except_error)
14223  __Pyx_GOTREF(__pyx_t_5);
14224  __Pyx_GOTREF(__pyx_t_9);
14225  __Pyx_GOTREF(__pyx_t_10);
14226 
14227  /* "PyClical.pyx":1617
14228  * return math.cos(obj)
14229  * except:
14230  * return clifford().wrap( glucat.cos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14231  *
14232  * cpdef inline acos(obj,i = None):
14233  */
14234  __Pyx_XDECREF(__pyx_r);
14235  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14236  __Pyx_GOTREF(__pyx_t_3);
14237  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), cos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1617, __pyx_L6_except_error)
14238  __Pyx_GOTREF(__pyx_t_11);
14239  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14240  __pyx_r = __pyx_t_11;
14241  __pyx_t_11 = 0;
14242  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14243  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14244  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14245  goto __pyx_L7_except_return;
14246  }
14247  __pyx_L6_except_error:;
14248 
14249  /* "PyClical.pyx":1614
14250  * return clifford().wrap( glucat.cos(toClifford(obj), toClifford(i)) )
14251  * else:
14252  * try: # <<<<<<<<<<<<<<
14253  * return math.cos(obj)
14254  * except:
14255  */
14256  __Pyx_XGIVEREF(__pyx_t_6);
14257  __Pyx_XGIVEREF(__pyx_t_7);
14258  __Pyx_XGIVEREF(__pyx_t_8);
14259  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14260  goto __pyx_L1_error;
14261  __pyx_L8_try_return:;
14262  __Pyx_XGIVEREF(__pyx_t_6);
14263  __Pyx_XGIVEREF(__pyx_t_7);
14264  __Pyx_XGIVEREF(__pyx_t_8);
14265  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14266  goto __pyx_L0;
14267  __pyx_L7_except_return:;
14268  __Pyx_XGIVEREF(__pyx_t_6);
14269  __Pyx_XGIVEREF(__pyx_t_7);
14270  __Pyx_XGIVEREF(__pyx_t_8);
14271  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14272  goto __pyx_L0;
14273  }
14274  }
14275 
14276  /* "PyClical.pyx":1602
14277  * return clifford().wrap( glucat.log(toClifford(obj)) )
14278  *
14279  * cpdef inline cos(obj,i = None): # <<<<<<<<<<<<<<
14280  * """
14281  * Cosine of multivector with optional complexifier.
14282  */
14283 
14284  /* function exit code */
14285  __pyx_L1_error:;
14286  __Pyx_XDECREF(__pyx_t_3);
14287  __Pyx_XDECREF(__pyx_t_5);
14288  __Pyx_XDECREF(__pyx_t_9);
14289  __Pyx_XDECREF(__pyx_t_10);
14290  __Pyx_XDECREF(__pyx_t_11);
14291  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14292  __pyx_r = 0;
14293  __pyx_L0:;
14294  __Pyx_XGIVEREF(__pyx_r);
14295  __Pyx_RefNannyFinishContext();
14296  return __pyx_r;
14297  }
14298 
14299  /* Python wrapper */
14300  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14301  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 ";
14302  static PyObject *__pyx_pw_8PyClical_51cos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14303  PyObject *__pyx_v_obj = 0;
14304  PyObject *__pyx_v_i = 0;
14305  PyObject *__pyx_r = 0;
14306  __Pyx_RefNannyDeclarations
14307  __Pyx_RefNannySetupContext("cos (wrapper)", 0);
14308  {
14309  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14310  PyObject* values[2] = {0,0};
14311  values[1] = ((PyObject *)Py_None);
14312  if (unlikely(__pyx_kwds)) {
14313  Py_ssize_t kw_args;
14314  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14315  switch (pos_args) {
14316  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14317  CYTHON_FALLTHROUGH;
14318  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14319  CYTHON_FALLTHROUGH;
14320  case 0: break;
14321  default: goto __pyx_L5_argtuple_error;
14322  }
14323  kw_args = PyDict_Size(__pyx_kwds);
14324  switch (pos_args) {
14325  case 0:
14326  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14327  else goto __pyx_L5_argtuple_error;
14328  CYTHON_FALLTHROUGH;
14329  case 1:
14330  if (kw_args > 0) {
14331  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14332  if (value) { values[1] = value; kw_args--; }
14333  }
14334  }
14335  if (unlikely(kw_args > 0)) {
14336  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cos") < 0)) __PYX_ERR(0, 1602, __pyx_L3_error)
14337  }
14338  } else {
14339  switch (PyTuple_GET_SIZE(__pyx_args)) {
14340  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14341  CYTHON_FALLTHROUGH;
14342  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14343  break;
14344  default: goto __pyx_L5_argtuple_error;
14345  }
14346  }
14347  __pyx_v_obj = values[0];
14348  __pyx_v_i = values[1];
14349  }
14350  goto __pyx_L4_argument_unpacking_done;
14351  __pyx_L5_argtuple_error:;
14352  __Pyx_RaiseArgtupleInvalid("cos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1602, __pyx_L3_error)
14353  __pyx_L3_error:;
14354  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14355  __Pyx_RefNannyFinishContext();
14356  return NULL;
14357  __pyx_L4_argument_unpacking_done:;
14358  __pyx_r = __pyx_pf_8PyClical_50cos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14359 
14360  /* function exit code */
14361  __Pyx_RefNannyFinishContext();
14362  return __pyx_r;
14363  }
14364 
14365  static PyObject *__pyx_pf_8PyClical_50cos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14366  PyObject *__pyx_r = NULL;
14367  __Pyx_RefNannyDeclarations
14368  PyObject *__pyx_t_1 = NULL;
14369  struct __pyx_opt_args_8PyClical_cos __pyx_t_2;
14370  __Pyx_RefNannySetupContext("cos", 0);
14371  __Pyx_XDECREF(__pyx_r);
14372  __pyx_t_2.__pyx_n = 1;
14373  __pyx_t_2.i = __pyx_v_i;
14374  __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)
14375  __Pyx_GOTREF(__pyx_t_1);
14376  __pyx_r = __pyx_t_1;
14377  __pyx_t_1 = 0;
14378  goto __pyx_L0;
14379 
14380  /* function exit code */
14381  __pyx_L1_error:;
14382  __Pyx_XDECREF(__pyx_t_1);
14383  __Pyx_AddTraceback("PyClical.cos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14384  __pyx_r = NULL;
14385  __pyx_L0:;
14386  __Pyx_XGIVEREF(__pyx_r);
14387  __Pyx_RefNannyFinishContext();
14388  return __pyx_r;
14389  }
14390 
14391  /* "PyClical.pyx":1619
14392  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14393  *
14394  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14395  * """
14396  * Inverse cosine of multivector with optional complexifier.
14397  */
14398 
14399  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14400  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) {
14401  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14402  PyObject *__pyx_r = NULL;
14403  __Pyx_RefNannyDeclarations
14404  int __pyx_t_1;
14405  int __pyx_t_2;
14406  PyObject *__pyx_t_3 = NULL;
14407  Clifford __pyx_t_4;
14408  PyObject *__pyx_t_5 = NULL;
14409  PyObject *__pyx_t_6 = NULL;
14410  PyObject *__pyx_t_7 = NULL;
14411  PyObject *__pyx_t_8 = NULL;
14412  PyObject *__pyx_t_9 = NULL;
14413  PyObject *__pyx_t_10 = NULL;
14414  PyObject *__pyx_t_11 = NULL;
14415  __Pyx_RefNannySetupContext("acos", 0);
14416  if (__pyx_optional_args) {
14417  if (__pyx_optional_args->__pyx_n > 0) {
14418  __pyx_v_i = __pyx_optional_args->i;
14419  }
14420  }
14421 
14422  /* "PyClical.pyx":1632
14423  * {1,2}
14424  * """
14425  * if not (i is None): # <<<<<<<<<<<<<<
14426  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14427  * else:
14428  */
14429  __pyx_t_1 = (__pyx_v_i != Py_None);
14430  __pyx_t_2 = (__pyx_t_1 != 0);
14431  if (__pyx_t_2) {
14432 
14433  /* "PyClical.pyx":1633
14434  * """
14435  * if not (i is None):
14436  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
14437  * else:
14438  * try:
14439  */
14440  __Pyx_XDECREF(__pyx_r);
14441  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
14442  __Pyx_GOTREF(__pyx_t_3);
14443  try {
14444  __pyx_t_4 = acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
14445  } catch(...) {
14446  __Pyx_CppExn2PyErr();
14447  __PYX_ERR(0, 1633, __pyx_L1_error)
14448  }
14449  __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)
14450  __Pyx_GOTREF(__pyx_t_5);
14451  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14452  __pyx_r = __pyx_t_5;
14453  __pyx_t_5 = 0;
14454  goto __pyx_L0;
14455 
14456  /* "PyClical.pyx":1632
14457  * {1,2}
14458  * """
14459  * if not (i is None): # <<<<<<<<<<<<<<
14460  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14461  * else:
14462  */
14463  }
14464 
14465  /* "PyClical.pyx":1635
14466  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14467  * else:
14468  * try: # <<<<<<<<<<<<<<
14469  * return math.acos(obj)
14470  * except:
14471  */
14472  /*else*/ {
14473  {
14474  __Pyx_PyThreadState_declare
14475  __Pyx_PyThreadState_assign
14476  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
14477  __Pyx_XGOTREF(__pyx_t_6);
14478  __Pyx_XGOTREF(__pyx_t_7);
14479  __Pyx_XGOTREF(__pyx_t_8);
14480  /*try:*/ {
14481 
14482  /* "PyClical.pyx":1636
14483  * else:
14484  * try:
14485  * return math.acos(obj) # <<<<<<<<<<<<<<
14486  * except:
14487  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14488  */
14489  __Pyx_XDECREF(__pyx_r);
14490  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L4_error)
14491  __Pyx_GOTREF(__pyx_t_3);
14492  __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)
14493  __Pyx_GOTREF(__pyx_t_9);
14494  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14495  __pyx_t_3 = NULL;
14496  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
14497  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
14498  if (likely(__pyx_t_3)) {
14499  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
14500  __Pyx_INCREF(__pyx_t_3);
14501  __Pyx_INCREF(function);
14502  __Pyx_DECREF_SET(__pyx_t_9, function);
14503  }
14504  }
14505  if (!__pyx_t_3) {
14506  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14507  __Pyx_GOTREF(__pyx_t_5);
14508  } else {
14509  #if CYTHON_FAST_PYCALL
14510  if (PyFunction_Check(__pyx_t_9)) {
14511  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14512  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14513  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14514  __Pyx_GOTREF(__pyx_t_5);
14515  } else
14516  #endif
14517  #if CYTHON_FAST_PYCCALL
14518  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
14519  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
14520  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14521  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14522  __Pyx_GOTREF(__pyx_t_5);
14523  } else
14524  #endif
14525  {
14526  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1636, __pyx_L4_error)
14527  __Pyx_GOTREF(__pyx_t_10);
14528  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
14529  __Pyx_INCREF(__pyx_v_obj);
14530  __Pyx_GIVEREF(__pyx_v_obj);
14531  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
14532  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1636, __pyx_L4_error)
14533  __Pyx_GOTREF(__pyx_t_5);
14534  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14535  }
14536  }
14537  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14538  __pyx_r = __pyx_t_5;
14539  __pyx_t_5 = 0;
14540  goto __pyx_L8_try_return;
14541 
14542  /* "PyClical.pyx":1635
14543  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14544  * else:
14545  * try: # <<<<<<<<<<<<<<
14546  * return math.acos(obj)
14547  * except:
14548  */
14549  }
14550  __pyx_L4_error:;
14551  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14552  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
14553  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
14554  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14555 
14556  /* "PyClical.pyx":1637
14557  * try:
14558  * return math.acos(obj)
14559  * except: # <<<<<<<<<<<<<<
14560  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14561  *
14562  */
14563  /*except:*/ {
14564  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14565  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1637, __pyx_L6_except_error)
14566  __Pyx_GOTREF(__pyx_t_5);
14567  __Pyx_GOTREF(__pyx_t_9);
14568  __Pyx_GOTREF(__pyx_t_10);
14569 
14570  /* "PyClical.pyx":1638
14571  * return math.acos(obj)
14572  * except:
14573  * return clifford().wrap( glucat.acos(toClifford(obj)) ) # <<<<<<<<<<<<<<
14574  *
14575  * cpdef inline cosh(obj):
14576  */
14577  __Pyx_XDECREF(__pyx_r);
14578  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14579  __Pyx_GOTREF(__pyx_t_3);
14580  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), acos(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1638, __pyx_L6_except_error)
14581  __Pyx_GOTREF(__pyx_t_11);
14582  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14583  __pyx_r = __pyx_t_11;
14584  __pyx_t_11 = 0;
14585  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14586  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
14587  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
14588  goto __pyx_L7_except_return;
14589  }
14590  __pyx_L6_except_error:;
14591 
14592  /* "PyClical.pyx":1635
14593  * return clifford().wrap( glucat.acos(toClifford(obj), toClifford(i)) )
14594  * else:
14595  * try: # <<<<<<<<<<<<<<
14596  * return math.acos(obj)
14597  * except:
14598  */
14599  __Pyx_XGIVEREF(__pyx_t_6);
14600  __Pyx_XGIVEREF(__pyx_t_7);
14601  __Pyx_XGIVEREF(__pyx_t_8);
14602  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14603  goto __pyx_L1_error;
14604  __pyx_L8_try_return:;
14605  __Pyx_XGIVEREF(__pyx_t_6);
14606  __Pyx_XGIVEREF(__pyx_t_7);
14607  __Pyx_XGIVEREF(__pyx_t_8);
14608  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14609  goto __pyx_L0;
14610  __pyx_L7_except_return:;
14611  __Pyx_XGIVEREF(__pyx_t_6);
14612  __Pyx_XGIVEREF(__pyx_t_7);
14613  __Pyx_XGIVEREF(__pyx_t_8);
14614  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
14615  goto __pyx_L0;
14616  }
14617  }
14618 
14619  /* "PyClical.pyx":1619
14620  * return clifford().wrap( glucat.cos(toClifford(obj)) )
14621  *
14622  * cpdef inline acos(obj,i = None): # <<<<<<<<<<<<<<
14623  * """
14624  * Inverse cosine of multivector with optional complexifier.
14625  */
14626 
14627  /* function exit code */
14628  __pyx_L1_error:;
14629  __Pyx_XDECREF(__pyx_t_3);
14630  __Pyx_XDECREF(__pyx_t_5);
14631  __Pyx_XDECREF(__pyx_t_9);
14632  __Pyx_XDECREF(__pyx_t_10);
14633  __Pyx_XDECREF(__pyx_t_11);
14634  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14635  __pyx_r = 0;
14636  __pyx_L0:;
14637  __Pyx_XGIVEREF(__pyx_r);
14638  __Pyx_RefNannyFinishContext();
14639  return __pyx_r;
14640  }
14641 
14642  /* Python wrapper */
14643  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14644  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 ";
14645  static PyObject *__pyx_pw_8PyClical_53acos(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14646  PyObject *__pyx_v_obj = 0;
14647  PyObject *__pyx_v_i = 0;
14648  PyObject *__pyx_r = 0;
14649  __Pyx_RefNannyDeclarations
14650  __Pyx_RefNannySetupContext("acos (wrapper)", 0);
14651  {
14652  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
14653  PyObject* values[2] = {0,0};
14654  values[1] = ((PyObject *)Py_None);
14655  if (unlikely(__pyx_kwds)) {
14656  Py_ssize_t kw_args;
14657  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14658  switch (pos_args) {
14659  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14660  CYTHON_FALLTHROUGH;
14661  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14662  CYTHON_FALLTHROUGH;
14663  case 0: break;
14664  default: goto __pyx_L5_argtuple_error;
14665  }
14666  kw_args = PyDict_Size(__pyx_kwds);
14667  switch (pos_args) {
14668  case 0:
14669  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
14670  else goto __pyx_L5_argtuple_error;
14671  CYTHON_FALLTHROUGH;
14672  case 1:
14673  if (kw_args > 0) {
14674  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
14675  if (value) { values[1] = value; kw_args--; }
14676  }
14677  }
14678  if (unlikely(kw_args > 0)) {
14679  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acos") < 0)) __PYX_ERR(0, 1619, __pyx_L3_error)
14680  }
14681  } else {
14682  switch (PyTuple_GET_SIZE(__pyx_args)) {
14683  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14684  CYTHON_FALLTHROUGH;
14685  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14686  break;
14687  default: goto __pyx_L5_argtuple_error;
14688  }
14689  }
14690  __pyx_v_obj = values[0];
14691  __pyx_v_i = values[1];
14692  }
14693  goto __pyx_L4_argument_unpacking_done;
14694  __pyx_L5_argtuple_error:;
14695  __Pyx_RaiseArgtupleInvalid("acos", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1619, __pyx_L3_error)
14696  __pyx_L3_error:;
14697  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14698  __Pyx_RefNannyFinishContext();
14699  return NULL;
14700  __pyx_L4_argument_unpacking_done:;
14701  __pyx_r = __pyx_pf_8PyClical_52acos(__pyx_self, __pyx_v_obj, __pyx_v_i);
14702 
14703  /* function exit code */
14704  __Pyx_RefNannyFinishContext();
14705  return __pyx_r;
14706  }
14707 
14708  static PyObject *__pyx_pf_8PyClical_52acos(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
14709  PyObject *__pyx_r = NULL;
14710  __Pyx_RefNannyDeclarations
14711  PyObject *__pyx_t_1 = NULL;
14712  struct __pyx_opt_args_8PyClical_acos __pyx_t_2;
14713  __Pyx_RefNannySetupContext("acos", 0);
14714  __Pyx_XDECREF(__pyx_r);
14715  __pyx_t_2.__pyx_n = 1;
14716  __pyx_t_2.i = __pyx_v_i;
14717  __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)
14718  __Pyx_GOTREF(__pyx_t_1);
14719  __pyx_r = __pyx_t_1;
14720  __pyx_t_1 = 0;
14721  goto __pyx_L0;
14722 
14723  /* function exit code */
14724  __pyx_L1_error:;
14725  __Pyx_XDECREF(__pyx_t_1);
14726  __Pyx_AddTraceback("PyClical.acos", __pyx_clineno, __pyx_lineno, __pyx_filename);
14727  __pyx_r = NULL;
14728  __pyx_L0:;
14729  __Pyx_XGIVEREF(__pyx_r);
14730  __Pyx_RefNannyFinishContext();
14731  return __pyx_r;
14732  }
14733 
14734  /* "PyClical.pyx":1640
14735  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14736  *
14737  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14738  * """
14739  * Hyperbolic cosine of multivector.
14740  */
14741 
14742  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14743  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cosh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
14744  PyObject *__pyx_r = NULL;
14745  __Pyx_RefNannyDeclarations
14746  PyObject *__pyx_t_1 = NULL;
14747  PyObject *__pyx_t_2 = NULL;
14748  PyObject *__pyx_t_3 = NULL;
14749  PyObject *__pyx_t_4 = NULL;
14750  PyObject *__pyx_t_5 = NULL;
14751  PyObject *__pyx_t_6 = NULL;
14752  PyObject *__pyx_t_7 = NULL;
14753  PyObject *__pyx_t_8 = NULL;
14754  __Pyx_RefNannySetupContext("cosh", 0);
14755 
14756  /* "PyClical.pyx":1651
14757  * {1,2}
14758  * """
14759  * try: # <<<<<<<<<<<<<<
14760  * return math.cosh(obj)
14761  * except:
14762  */
14763  {
14764  __Pyx_PyThreadState_declare
14765  __Pyx_PyThreadState_assign
14766  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
14767  __Pyx_XGOTREF(__pyx_t_1);
14768  __Pyx_XGOTREF(__pyx_t_2);
14769  __Pyx_XGOTREF(__pyx_t_3);
14770  /*try:*/ {
14771 
14772  /* "PyClical.pyx":1652
14773  * """
14774  * try:
14775  * return math.cosh(obj) # <<<<<<<<<<<<<<
14776  * except:
14777  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14778  */
14779  __Pyx_XDECREF(__pyx_r);
14780  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1652, __pyx_L3_error)
14781  __Pyx_GOTREF(__pyx_t_5);
14782  __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)
14783  __Pyx_GOTREF(__pyx_t_6);
14784  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14785  __pyx_t_5 = NULL;
14786  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14787  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
14788  if (likely(__pyx_t_5)) {
14789  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14790  __Pyx_INCREF(__pyx_t_5);
14791  __Pyx_INCREF(function);
14792  __Pyx_DECREF_SET(__pyx_t_6, function);
14793  }
14794  }
14795  if (!__pyx_t_5) {
14796  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14797  __Pyx_GOTREF(__pyx_t_4);
14798  } else {
14799  #if CYTHON_FAST_PYCALL
14800  if (PyFunction_Check(__pyx_t_6)) {
14801  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
14802  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14803  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14804  __Pyx_GOTREF(__pyx_t_4);
14805  } else
14806  #endif
14807  #if CYTHON_FAST_PYCCALL
14808  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
14809  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
14810  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14811  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14812  __Pyx_GOTREF(__pyx_t_4);
14813  } else
14814  #endif
14815  {
14816  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1652, __pyx_L3_error)
14817  __Pyx_GOTREF(__pyx_t_7);
14818  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
14819  __Pyx_INCREF(__pyx_v_obj);
14820  __Pyx_GIVEREF(__pyx_v_obj);
14821  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
14822  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L3_error)
14823  __Pyx_GOTREF(__pyx_t_4);
14824  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14825  }
14826  }
14827  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14828  __pyx_r = __pyx_t_4;
14829  __pyx_t_4 = 0;
14830  goto __pyx_L7_try_return;
14831 
14832  /* "PyClical.pyx":1651
14833  * {1,2}
14834  * """
14835  * try: # <<<<<<<<<<<<<<
14836  * return math.cosh(obj)
14837  * except:
14838  */
14839  }
14840  __pyx_L3_error:;
14841  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
14842  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
14843  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14844  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
14845 
14846  /* "PyClical.pyx":1653
14847  * try:
14848  * return math.cosh(obj)
14849  * except: # <<<<<<<<<<<<<<
14850  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14851  *
14852  */
14853  /*except:*/ {
14854  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14855  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1653, __pyx_L5_except_error)
14856  __Pyx_GOTREF(__pyx_t_4);
14857  __Pyx_GOTREF(__pyx_t_6);
14858  __Pyx_GOTREF(__pyx_t_7);
14859 
14860  /* "PyClical.pyx":1654
14861  * return math.cosh(obj)
14862  * except:
14863  * return clifford().wrap( glucat.cosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
14864  *
14865  * cpdef inline acosh(obj,i = None):
14866  */
14867  __Pyx_XDECREF(__pyx_r);
14868  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14869  __Pyx_GOTREF(__pyx_t_5);
14870  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), cosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1654, __pyx_L5_except_error)
14871  __Pyx_GOTREF(__pyx_t_8);
14872  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14873  __pyx_r = __pyx_t_8;
14874  __pyx_t_8 = 0;
14875  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14876  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14878  goto __pyx_L6_except_return;
14879  }
14880  __pyx_L5_except_error:;
14881 
14882  /* "PyClical.pyx":1651
14883  * {1,2}
14884  * """
14885  * try: # <<<<<<<<<<<<<<
14886  * return math.cosh(obj)
14887  * except:
14888  */
14889  __Pyx_XGIVEREF(__pyx_t_1);
14890  __Pyx_XGIVEREF(__pyx_t_2);
14891  __Pyx_XGIVEREF(__pyx_t_3);
14892  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14893  goto __pyx_L1_error;
14894  __pyx_L7_try_return:;
14895  __Pyx_XGIVEREF(__pyx_t_1);
14896  __Pyx_XGIVEREF(__pyx_t_2);
14897  __Pyx_XGIVEREF(__pyx_t_3);
14898  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14899  goto __pyx_L0;
14900  __pyx_L6_except_return:;
14901  __Pyx_XGIVEREF(__pyx_t_1);
14902  __Pyx_XGIVEREF(__pyx_t_2);
14903  __Pyx_XGIVEREF(__pyx_t_3);
14904  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
14905  goto __pyx_L0;
14906  }
14907 
14908  /* "PyClical.pyx":1640
14909  * return clifford().wrap( glucat.acos(toClifford(obj)) )
14910  *
14911  * cpdef inline cosh(obj): # <<<<<<<<<<<<<<
14912  * """
14913  * Hyperbolic cosine of multivector.
14914  */
14915 
14916  /* function exit code */
14917  __pyx_L1_error:;
14918  __Pyx_XDECREF(__pyx_t_4);
14919  __Pyx_XDECREF(__pyx_t_5);
14920  __Pyx_XDECREF(__pyx_t_6);
14921  __Pyx_XDECREF(__pyx_t_7);
14922  __Pyx_XDECREF(__pyx_t_8);
14923  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14924  __pyx_r = 0;
14925  __pyx_L0:;
14926  __Pyx_XGIVEREF(__pyx_r);
14927  __Pyx_RefNannyFinishContext();
14928  return __pyx_r;
14929  }
14930 
14931  /* Python wrapper */
14932  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
14933  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 ";
14934  static PyObject *__pyx_pw_8PyClical_55cosh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14935  PyObject *__pyx_r = 0;
14936  __Pyx_RefNannyDeclarations
14937  __Pyx_RefNannySetupContext("cosh (wrapper)", 0);
14938  __pyx_r = __pyx_pf_8PyClical_54cosh(__pyx_self, ((PyObject *)__pyx_v_obj));
14939 
14940  /* function exit code */
14941  __Pyx_RefNannyFinishContext();
14942  return __pyx_r;
14943  }
14944 
14945  static PyObject *__pyx_pf_8PyClical_54cosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
14946  PyObject *__pyx_r = NULL;
14947  __Pyx_RefNannyDeclarations
14948  PyObject *__pyx_t_1 = NULL;
14949  __Pyx_RefNannySetupContext("cosh", 0);
14950  __Pyx_XDECREF(__pyx_r);
14951  __pyx_t_1 = __pyx_f_8PyClical_cosh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
14952  __Pyx_GOTREF(__pyx_t_1);
14953  __pyx_r = __pyx_t_1;
14954  __pyx_t_1 = 0;
14955  goto __pyx_L0;
14956 
14957  /* function exit code */
14958  __pyx_L1_error:;
14959  __Pyx_XDECREF(__pyx_t_1);
14960  __Pyx_AddTraceback("PyClical.cosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
14961  __pyx_r = NULL;
14962  __pyx_L0:;
14963  __Pyx_XGIVEREF(__pyx_r);
14964  __Pyx_RefNannyFinishContext();
14965  return __pyx_r;
14966  }
14967 
14968  /* "PyClical.pyx":1656
14969  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
14970  *
14971  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
14972  * """
14973  * Inverse hyperbolic cosine of multivector with optional complexifier.
14974  */
14975 
14976  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14977  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) {
14978  PyObject *__pyx_v_i = ((PyObject *)Py_None);
14979  PyObject *__pyx_r = NULL;
14980  __Pyx_RefNannyDeclarations
14981  int __pyx_t_1;
14982  int __pyx_t_2;
14983  PyObject *__pyx_t_3 = NULL;
14984  Clifford __pyx_t_4;
14985  PyObject *__pyx_t_5 = NULL;
14986  PyObject *__pyx_t_6 = NULL;
14987  PyObject *__pyx_t_7 = NULL;
14988  PyObject *__pyx_t_8 = NULL;
14989  PyObject *__pyx_t_9 = NULL;
14990  PyObject *__pyx_t_10 = NULL;
14991  PyObject *__pyx_t_11 = NULL;
14992  __Pyx_RefNannySetupContext("acosh", 0);
14993  if (__pyx_optional_args) {
14994  if (__pyx_optional_args->__pyx_n > 0) {
14995  __pyx_v_i = __pyx_optional_args->i;
14996  }
14997  }
14998 
14999  /* "PyClical.pyx":1671
15000  * {1,2}
15001  * """
15002  * if not (i is None): # <<<<<<<<<<<<<<
15003  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15004  * else:
15005  */
15006  __pyx_t_1 = (__pyx_v_i != Py_None);
15007  __pyx_t_2 = (__pyx_t_1 != 0);
15008  if (__pyx_t_2) {
15009 
15010  /* "PyClical.pyx":1672
15011  * """
15012  * if not (i is None):
15013  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15014  * else:
15015  * try:
15016  */
15017  __Pyx_XDECREF(__pyx_r);
15018  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
15019  __Pyx_GOTREF(__pyx_t_3);
15020  try {
15021  __pyx_t_4 = acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15022  } catch(...) {
15023  __Pyx_CppExn2PyErr();
15024  __PYX_ERR(0, 1672, __pyx_L1_error)
15025  }
15026  __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)
15027  __Pyx_GOTREF(__pyx_t_5);
15028  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15029  __pyx_r = __pyx_t_5;
15030  __pyx_t_5 = 0;
15031  goto __pyx_L0;
15032 
15033  /* "PyClical.pyx":1671
15034  * {1,2}
15035  * """
15036  * if not (i is None): # <<<<<<<<<<<<<<
15037  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15038  * else:
15039  */
15040  }
15041 
15042  /* "PyClical.pyx":1674
15043  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15044  * else:
15045  * try: # <<<<<<<<<<<<<<
15046  * return math.acosh(obj)
15047  * except:
15048  */
15049  /*else*/ {
15050  {
15051  __Pyx_PyThreadState_declare
15052  __Pyx_PyThreadState_assign
15053  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15054  __Pyx_XGOTREF(__pyx_t_6);
15055  __Pyx_XGOTREF(__pyx_t_7);
15056  __Pyx_XGOTREF(__pyx_t_8);
15057  /*try:*/ {
15058 
15059  /* "PyClical.pyx":1675
15060  * else:
15061  * try:
15062  * return math.acosh(obj) # <<<<<<<<<<<<<<
15063  * except:
15064  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15065  */
15066  __Pyx_XDECREF(__pyx_r);
15067  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L4_error)
15068  __Pyx_GOTREF(__pyx_t_3);
15069  __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)
15070  __Pyx_GOTREF(__pyx_t_9);
15071  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15072  __pyx_t_3 = NULL;
15073  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15074  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15075  if (likely(__pyx_t_3)) {
15076  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15077  __Pyx_INCREF(__pyx_t_3);
15078  __Pyx_INCREF(function);
15079  __Pyx_DECREF_SET(__pyx_t_9, function);
15080  }
15081  }
15082  if (!__pyx_t_3) {
15083  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15084  __Pyx_GOTREF(__pyx_t_5);
15085  } else {
15086  #if CYTHON_FAST_PYCALL
15087  if (PyFunction_Check(__pyx_t_9)) {
15088  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15089  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15090  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15091  __Pyx_GOTREF(__pyx_t_5);
15092  } else
15093  #endif
15094  #if CYTHON_FAST_PYCCALL
15095  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15096  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15097  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15098  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15099  __Pyx_GOTREF(__pyx_t_5);
15100  } else
15101  #endif
15102  {
15103  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1675, __pyx_L4_error)
15104  __Pyx_GOTREF(__pyx_t_10);
15105  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15106  __Pyx_INCREF(__pyx_v_obj);
15107  __Pyx_GIVEREF(__pyx_v_obj);
15108  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15109  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L4_error)
15110  __Pyx_GOTREF(__pyx_t_5);
15111  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15112  }
15113  }
15114  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15115  __pyx_r = __pyx_t_5;
15116  __pyx_t_5 = 0;
15117  goto __pyx_L8_try_return;
15118 
15119  /* "PyClical.pyx":1674
15120  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15121  * else:
15122  * try: # <<<<<<<<<<<<<<
15123  * return math.acosh(obj)
15124  * except:
15125  */
15126  }
15127  __pyx_L4_error:;
15128  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15129  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15130  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15131  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15132 
15133  /* "PyClical.pyx":1676
15134  * try:
15135  * return math.acosh(obj)
15136  * except: # <<<<<<<<<<<<<<
15137  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15138  *
15139  */
15140  /*except:*/ {
15141  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15142  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1676, __pyx_L6_except_error)
15143  __Pyx_GOTREF(__pyx_t_5);
15144  __Pyx_GOTREF(__pyx_t_9);
15145  __Pyx_GOTREF(__pyx_t_10);
15146 
15147  /* "PyClical.pyx":1677
15148  * return math.acosh(obj)
15149  * except:
15150  * return clifford().wrap( glucat.acosh(toClifford(obj)) ) # <<<<<<<<<<<<<<
15151  *
15152  * cpdef inline sin(obj,i = None):
15153  */
15154  __Pyx_XDECREF(__pyx_r);
15155  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
15156  __Pyx_GOTREF(__pyx_t_3);
15157  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), acosh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1677, __pyx_L6_except_error)
15158  __Pyx_GOTREF(__pyx_t_11);
15159  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15160  __pyx_r = __pyx_t_11;
15161  __pyx_t_11 = 0;
15162  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15163  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15164  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15165  goto __pyx_L7_except_return;
15166  }
15167  __pyx_L6_except_error:;
15168 
15169  /* "PyClical.pyx":1674
15170  * return clifford().wrap( glucat.acosh(toClifford(obj), toClifford(i)) )
15171  * else:
15172  * try: # <<<<<<<<<<<<<<
15173  * return math.acosh(obj)
15174  * except:
15175  */
15176  __Pyx_XGIVEREF(__pyx_t_6);
15177  __Pyx_XGIVEREF(__pyx_t_7);
15178  __Pyx_XGIVEREF(__pyx_t_8);
15179  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15180  goto __pyx_L1_error;
15181  __pyx_L8_try_return:;
15182  __Pyx_XGIVEREF(__pyx_t_6);
15183  __Pyx_XGIVEREF(__pyx_t_7);
15184  __Pyx_XGIVEREF(__pyx_t_8);
15185  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15186  goto __pyx_L0;
15187  __pyx_L7_except_return:;
15188  __Pyx_XGIVEREF(__pyx_t_6);
15189  __Pyx_XGIVEREF(__pyx_t_7);
15190  __Pyx_XGIVEREF(__pyx_t_8);
15191  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15192  goto __pyx_L0;
15193  }
15194  }
15195 
15196  /* "PyClical.pyx":1656
15197  * return clifford().wrap( glucat.cosh(toClifford(obj)) )
15198  *
15199  * cpdef inline acosh(obj,i = None): # <<<<<<<<<<<<<<
15200  * """
15201  * Inverse hyperbolic cosine of multivector with optional complexifier.
15202  */
15203 
15204  /* function exit code */
15205  __pyx_L1_error:;
15206  __Pyx_XDECREF(__pyx_t_3);
15207  __Pyx_XDECREF(__pyx_t_5);
15208  __Pyx_XDECREF(__pyx_t_9);
15209  __Pyx_XDECREF(__pyx_t_10);
15210  __Pyx_XDECREF(__pyx_t_11);
15211  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15212  __pyx_r = 0;
15213  __pyx_L0:;
15214  __Pyx_XGIVEREF(__pyx_r);
15215  __Pyx_RefNannyFinishContext();
15216  return __pyx_r;
15217  }
15218 
15219  /* Python wrapper */
15220  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15221  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 ";
15222  static PyObject *__pyx_pw_8PyClical_57acosh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15223  PyObject *__pyx_v_obj = 0;
15224  PyObject *__pyx_v_i = 0;
15225  PyObject *__pyx_r = 0;
15226  __Pyx_RefNannyDeclarations
15227  __Pyx_RefNannySetupContext("acosh (wrapper)", 0);
15228  {
15229  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15230  PyObject* values[2] = {0,0};
15231  values[1] = ((PyObject *)Py_None);
15232  if (unlikely(__pyx_kwds)) {
15233  Py_ssize_t kw_args;
15234  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15235  switch (pos_args) {
15236  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15237  CYTHON_FALLTHROUGH;
15238  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15239  CYTHON_FALLTHROUGH;
15240  case 0: break;
15241  default: goto __pyx_L5_argtuple_error;
15242  }
15243  kw_args = PyDict_Size(__pyx_kwds);
15244  switch (pos_args) {
15245  case 0:
15246  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15247  else goto __pyx_L5_argtuple_error;
15248  CYTHON_FALLTHROUGH;
15249  case 1:
15250  if (kw_args > 0) {
15251  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15252  if (value) { values[1] = value; kw_args--; }
15253  }
15254  }
15255  if (unlikely(kw_args > 0)) {
15256  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "acosh") < 0)) __PYX_ERR(0, 1656, __pyx_L3_error)
15257  }
15258  } else {
15259  switch (PyTuple_GET_SIZE(__pyx_args)) {
15260  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15261  CYTHON_FALLTHROUGH;
15262  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15263  break;
15264  default: goto __pyx_L5_argtuple_error;
15265  }
15266  }
15267  __pyx_v_obj = values[0];
15268  __pyx_v_i = values[1];
15269  }
15270  goto __pyx_L4_argument_unpacking_done;
15271  __pyx_L5_argtuple_error:;
15272  __Pyx_RaiseArgtupleInvalid("acosh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1656, __pyx_L3_error)
15273  __pyx_L3_error:;
15274  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15275  __Pyx_RefNannyFinishContext();
15276  return NULL;
15277  __pyx_L4_argument_unpacking_done:;
15278  __pyx_r = __pyx_pf_8PyClical_56acosh(__pyx_self, __pyx_v_obj, __pyx_v_i);
15279 
15280  /* function exit code */
15281  __Pyx_RefNannyFinishContext();
15282  return __pyx_r;
15283  }
15284 
15285  static PyObject *__pyx_pf_8PyClical_56acosh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15286  PyObject *__pyx_r = NULL;
15287  __Pyx_RefNannyDeclarations
15288  PyObject *__pyx_t_1 = NULL;
15289  struct __pyx_opt_args_8PyClical_acosh __pyx_t_2;
15290  __Pyx_RefNannySetupContext("acosh", 0);
15291  __Pyx_XDECREF(__pyx_r);
15292  __pyx_t_2.__pyx_n = 1;
15293  __pyx_t_2.i = __pyx_v_i;
15294  __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)
15295  __Pyx_GOTREF(__pyx_t_1);
15296  __pyx_r = __pyx_t_1;
15297  __pyx_t_1 = 0;
15298  goto __pyx_L0;
15299 
15300  /* function exit code */
15301  __pyx_L1_error:;
15302  __Pyx_XDECREF(__pyx_t_1);
15303  __Pyx_AddTraceback("PyClical.acosh", __pyx_clineno, __pyx_lineno, __pyx_filename);
15304  __pyx_r = NULL;
15305  __pyx_L0:;
15306  __Pyx_XGIVEREF(__pyx_r);
15307  __Pyx_RefNannyFinishContext();
15308  return __pyx_r;
15309  }
15310 
15311  /* "PyClical.pyx":1679
15312  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15313  *
15314  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15315  * """
15316  * Sine of multivector with optional complexifier.
15317  */
15318 
15319  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15320  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) {
15321  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15322  PyObject *__pyx_r = NULL;
15323  __Pyx_RefNannyDeclarations
15324  int __pyx_t_1;
15325  int __pyx_t_2;
15326  PyObject *__pyx_t_3 = NULL;
15327  Clifford __pyx_t_4;
15328  PyObject *__pyx_t_5 = NULL;
15329  PyObject *__pyx_t_6 = NULL;
15330  PyObject *__pyx_t_7 = NULL;
15331  PyObject *__pyx_t_8 = NULL;
15332  PyObject *__pyx_t_9 = NULL;
15333  PyObject *__pyx_t_10 = NULL;
15334  PyObject *__pyx_t_11 = NULL;
15335  __Pyx_RefNannySetupContext("sin", 0);
15336  if (__pyx_optional_args) {
15337  if (__pyx_optional_args->__pyx_n > 0) {
15338  __pyx_v_i = __pyx_optional_args->i;
15339  }
15340  }
15341 
15342  /* "PyClical.pyx":1690
15343  * {1,2,3}
15344  * """
15345  * if not (i is None): # <<<<<<<<<<<<<<
15346  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15347  * else:
15348  */
15349  __pyx_t_1 = (__pyx_v_i != Py_None);
15350  __pyx_t_2 = (__pyx_t_1 != 0);
15351  if (__pyx_t_2) {
15352 
15353  /* "PyClical.pyx":1691
15354  * """
15355  * if not (i is None):
15356  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15357  * else:
15358  * try:
15359  */
15360  __Pyx_XDECREF(__pyx_r);
15361  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error)
15362  __Pyx_GOTREF(__pyx_t_3);
15363  try {
15364  __pyx_t_4 = sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15365  } catch(...) {
15366  __Pyx_CppExn2PyErr();
15367  __PYX_ERR(0, 1691, __pyx_L1_error)
15368  }
15369  __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)
15370  __Pyx_GOTREF(__pyx_t_5);
15371  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15372  __pyx_r = __pyx_t_5;
15373  __pyx_t_5 = 0;
15374  goto __pyx_L0;
15375 
15376  /* "PyClical.pyx":1690
15377  * {1,2,3}
15378  * """
15379  * if not (i is None): # <<<<<<<<<<<<<<
15380  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15381  * else:
15382  */
15383  }
15384 
15385  /* "PyClical.pyx":1693
15386  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15387  * else:
15388  * try: # <<<<<<<<<<<<<<
15389  * return math.sin(obj)
15390  * except:
15391  */
15392  /*else*/ {
15393  {
15394  __Pyx_PyThreadState_declare
15395  __Pyx_PyThreadState_assign
15396  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15397  __Pyx_XGOTREF(__pyx_t_6);
15398  __Pyx_XGOTREF(__pyx_t_7);
15399  __Pyx_XGOTREF(__pyx_t_8);
15400  /*try:*/ {
15401 
15402  /* "PyClical.pyx":1694
15403  * else:
15404  * try:
15405  * return math.sin(obj) # <<<<<<<<<<<<<<
15406  * except:
15407  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15408  */
15409  __Pyx_XDECREF(__pyx_r);
15410  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1694, __pyx_L4_error)
15411  __Pyx_GOTREF(__pyx_t_3);
15412  __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)
15413  __Pyx_GOTREF(__pyx_t_9);
15414  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15415  __pyx_t_3 = NULL;
15416  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15417  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15418  if (likely(__pyx_t_3)) {
15419  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15420  __Pyx_INCREF(__pyx_t_3);
15421  __Pyx_INCREF(function);
15422  __Pyx_DECREF_SET(__pyx_t_9, function);
15423  }
15424  }
15425  if (!__pyx_t_3) {
15426  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15427  __Pyx_GOTREF(__pyx_t_5);
15428  } else {
15429  #if CYTHON_FAST_PYCALL
15430  if (PyFunction_Check(__pyx_t_9)) {
15431  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15432  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15433  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15434  __Pyx_GOTREF(__pyx_t_5);
15435  } else
15436  #endif
15437  #if CYTHON_FAST_PYCCALL
15438  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15439  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15440  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15441  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15442  __Pyx_GOTREF(__pyx_t_5);
15443  } else
15444  #endif
15445  {
15446  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1694, __pyx_L4_error)
15447  __Pyx_GOTREF(__pyx_t_10);
15448  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15449  __Pyx_INCREF(__pyx_v_obj);
15450  __Pyx_GIVEREF(__pyx_v_obj);
15451  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15452  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1694, __pyx_L4_error)
15453  __Pyx_GOTREF(__pyx_t_5);
15454  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15455  }
15456  }
15457  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15458  __pyx_r = __pyx_t_5;
15459  __pyx_t_5 = 0;
15460  goto __pyx_L8_try_return;
15461 
15462  /* "PyClical.pyx":1693
15463  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15464  * else:
15465  * try: # <<<<<<<<<<<<<<
15466  * return math.sin(obj)
15467  * except:
15468  */
15469  }
15470  __pyx_L4_error:;
15471  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15472  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15473  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15474  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15475 
15476  /* "PyClical.pyx":1695
15477  * try:
15478  * return math.sin(obj)
15479  * except: # <<<<<<<<<<<<<<
15480  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15481  *
15482  */
15483  /*except:*/ {
15484  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15485  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1695, __pyx_L6_except_error)
15486  __Pyx_GOTREF(__pyx_t_5);
15487  __Pyx_GOTREF(__pyx_t_9);
15488  __Pyx_GOTREF(__pyx_t_10);
15489 
15490  /* "PyClical.pyx":1696
15491  * return math.sin(obj)
15492  * except:
15493  * return clifford().wrap( glucat.sin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15494  *
15495  * cpdef inline asin(obj,i = None):
15496  */
15497  __Pyx_XDECREF(__pyx_r);
15498  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15499  __Pyx_GOTREF(__pyx_t_3);
15500  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), sin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1696, __pyx_L6_except_error)
15501  __Pyx_GOTREF(__pyx_t_11);
15502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15503  __pyx_r = __pyx_t_11;
15504  __pyx_t_11 = 0;
15505  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15506  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15507  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15508  goto __pyx_L7_except_return;
15509  }
15510  __pyx_L6_except_error:;
15511 
15512  /* "PyClical.pyx":1693
15513  * return clifford().wrap( glucat.sin(toClifford(obj), toClifford(i)) )
15514  * else:
15515  * try: # <<<<<<<<<<<<<<
15516  * return math.sin(obj)
15517  * except:
15518  */
15519  __Pyx_XGIVEREF(__pyx_t_6);
15520  __Pyx_XGIVEREF(__pyx_t_7);
15521  __Pyx_XGIVEREF(__pyx_t_8);
15522  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15523  goto __pyx_L1_error;
15524  __pyx_L8_try_return:;
15525  __Pyx_XGIVEREF(__pyx_t_6);
15526  __Pyx_XGIVEREF(__pyx_t_7);
15527  __Pyx_XGIVEREF(__pyx_t_8);
15528  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15529  goto __pyx_L0;
15530  __pyx_L7_except_return:;
15531  __Pyx_XGIVEREF(__pyx_t_6);
15532  __Pyx_XGIVEREF(__pyx_t_7);
15533  __Pyx_XGIVEREF(__pyx_t_8);
15534  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15535  goto __pyx_L0;
15536  }
15537  }
15538 
15539  /* "PyClical.pyx":1679
15540  * return clifford().wrap( glucat.acosh(toClifford(obj)) )
15541  *
15542  * cpdef inline sin(obj,i = None): # <<<<<<<<<<<<<<
15543  * """
15544  * Sine of multivector with optional complexifier.
15545  */
15546 
15547  /* function exit code */
15548  __pyx_L1_error:;
15549  __Pyx_XDECREF(__pyx_t_3);
15550  __Pyx_XDECREF(__pyx_t_5);
15551  __Pyx_XDECREF(__pyx_t_9);
15552  __Pyx_XDECREF(__pyx_t_10);
15553  __Pyx_XDECREF(__pyx_t_11);
15554  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15555  __pyx_r = 0;
15556  __pyx_L0:;
15557  __Pyx_XGIVEREF(__pyx_r);
15558  __Pyx_RefNannyFinishContext();
15559  return __pyx_r;
15560  }
15561 
15562  /* Python wrapper */
15563  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15564  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 ";
15565  static PyObject *__pyx_pw_8PyClical_59sin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15566  PyObject *__pyx_v_obj = 0;
15567  PyObject *__pyx_v_i = 0;
15568  PyObject *__pyx_r = 0;
15569  __Pyx_RefNannyDeclarations
15570  __Pyx_RefNannySetupContext("sin (wrapper)", 0);
15571  {
15572  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15573  PyObject* values[2] = {0,0};
15574  values[1] = ((PyObject *)Py_None);
15575  if (unlikely(__pyx_kwds)) {
15576  Py_ssize_t kw_args;
15577  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15578  switch (pos_args) {
15579  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15580  CYTHON_FALLTHROUGH;
15581  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15582  CYTHON_FALLTHROUGH;
15583  case 0: break;
15584  default: goto __pyx_L5_argtuple_error;
15585  }
15586  kw_args = PyDict_Size(__pyx_kwds);
15587  switch (pos_args) {
15588  case 0:
15589  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15590  else goto __pyx_L5_argtuple_error;
15591  CYTHON_FALLTHROUGH;
15592  case 1:
15593  if (kw_args > 0) {
15594  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15595  if (value) { values[1] = value; kw_args--; }
15596  }
15597  }
15598  if (unlikely(kw_args > 0)) {
15599  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sin") < 0)) __PYX_ERR(0, 1679, __pyx_L3_error)
15600  }
15601  } else {
15602  switch (PyTuple_GET_SIZE(__pyx_args)) {
15603  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15604  CYTHON_FALLTHROUGH;
15605  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15606  break;
15607  default: goto __pyx_L5_argtuple_error;
15608  }
15609  }
15610  __pyx_v_obj = values[0];
15611  __pyx_v_i = values[1];
15612  }
15613  goto __pyx_L4_argument_unpacking_done;
15614  __pyx_L5_argtuple_error:;
15615  __Pyx_RaiseArgtupleInvalid("sin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1679, __pyx_L3_error)
15616  __pyx_L3_error:;
15617  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15618  __Pyx_RefNannyFinishContext();
15619  return NULL;
15620  __pyx_L4_argument_unpacking_done:;
15621  __pyx_r = __pyx_pf_8PyClical_58sin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15622 
15623  /* function exit code */
15624  __Pyx_RefNannyFinishContext();
15625  return __pyx_r;
15626  }
15627 
15628  static PyObject *__pyx_pf_8PyClical_58sin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15629  PyObject *__pyx_r = NULL;
15630  __Pyx_RefNannyDeclarations
15631  PyObject *__pyx_t_1 = NULL;
15632  struct __pyx_opt_args_8PyClical_sin __pyx_t_2;
15633  __Pyx_RefNannySetupContext("sin", 0);
15634  __Pyx_XDECREF(__pyx_r);
15635  __pyx_t_2.__pyx_n = 1;
15636  __pyx_t_2.i = __pyx_v_i;
15637  __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)
15638  __Pyx_GOTREF(__pyx_t_1);
15639  __pyx_r = __pyx_t_1;
15640  __pyx_t_1 = 0;
15641  goto __pyx_L0;
15642 
15643  /* function exit code */
15644  __pyx_L1_error:;
15645  __Pyx_XDECREF(__pyx_t_1);
15646  __Pyx_AddTraceback("PyClical.sin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15647  __pyx_r = NULL;
15648  __pyx_L0:;
15649  __Pyx_XGIVEREF(__pyx_r);
15650  __Pyx_RefNannyFinishContext();
15651  return __pyx_r;
15652  }
15653 
15654  /* "PyClical.pyx":1698
15655  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15656  *
15657  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15658  * """
15659  * Inverse sine of multivector with optional complexifier.
15660  */
15661 
15662  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15663  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) {
15664  PyObject *__pyx_v_i = ((PyObject *)Py_None);
15665  PyObject *__pyx_r = NULL;
15666  __Pyx_RefNannyDeclarations
15667  int __pyx_t_1;
15668  int __pyx_t_2;
15669  PyObject *__pyx_t_3 = NULL;
15670  Clifford __pyx_t_4;
15671  PyObject *__pyx_t_5 = NULL;
15672  PyObject *__pyx_t_6 = NULL;
15673  PyObject *__pyx_t_7 = NULL;
15674  PyObject *__pyx_t_8 = NULL;
15675  PyObject *__pyx_t_9 = NULL;
15676  PyObject *__pyx_t_10 = NULL;
15677  PyObject *__pyx_t_11 = NULL;
15678  __Pyx_RefNannySetupContext("asin", 0);
15679  if (__pyx_optional_args) {
15680  if (__pyx_optional_args->__pyx_n > 0) {
15681  __pyx_v_i = __pyx_optional_args->i;
15682  }
15683  }
15684 
15685  /* "PyClical.pyx":1711
15686  * {1,2,3}
15687  * """
15688  * if not (i is None): # <<<<<<<<<<<<<<
15689  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15690  * else:
15691  */
15692  __pyx_t_1 = (__pyx_v_i != Py_None);
15693  __pyx_t_2 = (__pyx_t_1 != 0);
15694  if (__pyx_t_2) {
15695 
15696  /* "PyClical.pyx":1712
15697  * """
15698  * if not (i is None):
15699  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
15700  * else:
15701  * try:
15702  */
15703  __Pyx_XDECREF(__pyx_r);
15704  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1712, __pyx_L1_error)
15705  __Pyx_GOTREF(__pyx_t_3);
15706  try {
15707  __pyx_t_4 = asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
15708  } catch(...) {
15709  __Pyx_CppExn2PyErr();
15710  __PYX_ERR(0, 1712, __pyx_L1_error)
15711  }
15712  __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)
15713  __Pyx_GOTREF(__pyx_t_5);
15714  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15715  __pyx_r = __pyx_t_5;
15716  __pyx_t_5 = 0;
15717  goto __pyx_L0;
15718 
15719  /* "PyClical.pyx":1711
15720  * {1,2,3}
15721  * """
15722  * if not (i is None): # <<<<<<<<<<<<<<
15723  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15724  * else:
15725  */
15726  }
15727 
15728  /* "PyClical.pyx":1714
15729  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15730  * else:
15731  * try: # <<<<<<<<<<<<<<
15732  * return math.asin(obj)
15733  * except:
15734  */
15735  /*else*/ {
15736  {
15737  __Pyx_PyThreadState_declare
15738  __Pyx_PyThreadState_assign
15739  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
15740  __Pyx_XGOTREF(__pyx_t_6);
15741  __Pyx_XGOTREF(__pyx_t_7);
15742  __Pyx_XGOTREF(__pyx_t_8);
15743  /*try:*/ {
15744 
15745  /* "PyClical.pyx":1715
15746  * else:
15747  * try:
15748  * return math.asin(obj) # <<<<<<<<<<<<<<
15749  * except:
15750  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15751  */
15752  __Pyx_XDECREF(__pyx_r);
15753  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __pyx_L4_error)
15754  __Pyx_GOTREF(__pyx_t_3);
15755  __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)
15756  __Pyx_GOTREF(__pyx_t_9);
15757  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15758  __pyx_t_3 = NULL;
15759  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
15760  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
15761  if (likely(__pyx_t_3)) {
15762  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
15763  __Pyx_INCREF(__pyx_t_3);
15764  __Pyx_INCREF(function);
15765  __Pyx_DECREF_SET(__pyx_t_9, function);
15766  }
15767  }
15768  if (!__pyx_t_3) {
15769  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15770  __Pyx_GOTREF(__pyx_t_5);
15771  } else {
15772  #if CYTHON_FAST_PYCALL
15773  if (PyFunction_Check(__pyx_t_9)) {
15774  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15775  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15776  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15777  __Pyx_GOTREF(__pyx_t_5);
15778  } else
15779  #endif
15780  #if CYTHON_FAST_PYCCALL
15781  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
15782  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
15783  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15784  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15785  __Pyx_GOTREF(__pyx_t_5);
15786  } else
15787  #endif
15788  {
15789  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1715, __pyx_L4_error)
15790  __Pyx_GOTREF(__pyx_t_10);
15791  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
15792  __Pyx_INCREF(__pyx_v_obj);
15793  __Pyx_GIVEREF(__pyx_v_obj);
15794  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
15795  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1715, __pyx_L4_error)
15796  __Pyx_GOTREF(__pyx_t_5);
15797  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15798  }
15799  }
15800  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15801  __pyx_r = __pyx_t_5;
15802  __pyx_t_5 = 0;
15803  goto __pyx_L8_try_return;
15804 
15805  /* "PyClical.pyx":1714
15806  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15807  * else:
15808  * try: # <<<<<<<<<<<<<<
15809  * return math.asin(obj)
15810  * except:
15811  */
15812  }
15813  __pyx_L4_error:;
15814  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15815  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
15816  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
15817  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15818 
15819  /* "PyClical.pyx":1716
15820  * try:
15821  * return math.asin(obj)
15822  * except: # <<<<<<<<<<<<<<
15823  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15824  *
15825  */
15826  /*except:*/ {
15827  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15828  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1716, __pyx_L6_except_error)
15829  __Pyx_GOTREF(__pyx_t_5);
15830  __Pyx_GOTREF(__pyx_t_9);
15831  __Pyx_GOTREF(__pyx_t_10);
15832 
15833  /* "PyClical.pyx":1717
15834  * return math.asin(obj)
15835  * except:
15836  * return clifford().wrap( glucat.asin(toClifford(obj)) ) # <<<<<<<<<<<<<<
15837  *
15838  * cpdef inline sinh(obj):
15839  */
15840  __Pyx_XDECREF(__pyx_r);
15841  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15842  __Pyx_GOTREF(__pyx_t_3);
15843  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), asin(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1717, __pyx_L6_except_error)
15844  __Pyx_GOTREF(__pyx_t_11);
15845  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15846  __pyx_r = __pyx_t_11;
15847  __pyx_t_11 = 0;
15848  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15849  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
15850  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15851  goto __pyx_L7_except_return;
15852  }
15853  __pyx_L6_except_error:;
15854 
15855  /* "PyClical.pyx":1714
15856  * return clifford().wrap( glucat.asin(toClifford(obj), toClifford(i)) )
15857  * else:
15858  * try: # <<<<<<<<<<<<<<
15859  * return math.asin(obj)
15860  * except:
15861  */
15862  __Pyx_XGIVEREF(__pyx_t_6);
15863  __Pyx_XGIVEREF(__pyx_t_7);
15864  __Pyx_XGIVEREF(__pyx_t_8);
15865  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15866  goto __pyx_L1_error;
15867  __pyx_L8_try_return:;
15868  __Pyx_XGIVEREF(__pyx_t_6);
15869  __Pyx_XGIVEREF(__pyx_t_7);
15870  __Pyx_XGIVEREF(__pyx_t_8);
15871  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15872  goto __pyx_L0;
15873  __pyx_L7_except_return:;
15874  __Pyx_XGIVEREF(__pyx_t_6);
15875  __Pyx_XGIVEREF(__pyx_t_7);
15876  __Pyx_XGIVEREF(__pyx_t_8);
15877  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
15878  goto __pyx_L0;
15879  }
15880  }
15881 
15882  /* "PyClical.pyx":1698
15883  * return clifford().wrap( glucat.sin(toClifford(obj)) )
15884  *
15885  * cpdef inline asin(obj,i = None): # <<<<<<<<<<<<<<
15886  * """
15887  * Inverse sine of multivector with optional complexifier.
15888  */
15889 
15890  /* function exit code */
15891  __pyx_L1_error:;
15892  __Pyx_XDECREF(__pyx_t_3);
15893  __Pyx_XDECREF(__pyx_t_5);
15894  __Pyx_XDECREF(__pyx_t_9);
15895  __Pyx_XDECREF(__pyx_t_10);
15896  __Pyx_XDECREF(__pyx_t_11);
15897  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15898  __pyx_r = 0;
15899  __pyx_L0:;
15900  __Pyx_XGIVEREF(__pyx_r);
15901  __Pyx_RefNannyFinishContext();
15902  return __pyx_r;
15903  }
15904 
15905  /* Python wrapper */
15906  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15907  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 ";
15908  static PyObject *__pyx_pw_8PyClical_61asin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15909  PyObject *__pyx_v_obj = 0;
15910  PyObject *__pyx_v_i = 0;
15911  PyObject *__pyx_r = 0;
15912  __Pyx_RefNannyDeclarations
15913  __Pyx_RefNannySetupContext("asin (wrapper)", 0);
15914  {
15915  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
15916  PyObject* values[2] = {0,0};
15917  values[1] = ((PyObject *)Py_None);
15918  if (unlikely(__pyx_kwds)) {
15919  Py_ssize_t kw_args;
15920  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15921  switch (pos_args) {
15922  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15923  CYTHON_FALLTHROUGH;
15924  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15925  CYTHON_FALLTHROUGH;
15926  case 0: break;
15927  default: goto __pyx_L5_argtuple_error;
15928  }
15929  kw_args = PyDict_Size(__pyx_kwds);
15930  switch (pos_args) {
15931  case 0:
15932  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
15933  else goto __pyx_L5_argtuple_error;
15934  CYTHON_FALLTHROUGH;
15935  case 1:
15936  if (kw_args > 0) {
15937  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
15938  if (value) { values[1] = value; kw_args--; }
15939  }
15940  }
15941  if (unlikely(kw_args > 0)) {
15942  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asin") < 0)) __PYX_ERR(0, 1698, __pyx_L3_error)
15943  }
15944  } else {
15945  switch (PyTuple_GET_SIZE(__pyx_args)) {
15946  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15947  CYTHON_FALLTHROUGH;
15948  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15949  break;
15950  default: goto __pyx_L5_argtuple_error;
15951  }
15952  }
15953  __pyx_v_obj = values[0];
15954  __pyx_v_i = values[1];
15955  }
15956  goto __pyx_L4_argument_unpacking_done;
15957  __pyx_L5_argtuple_error:;
15958  __Pyx_RaiseArgtupleInvalid("asin", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1698, __pyx_L3_error)
15959  __pyx_L3_error:;
15960  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15961  __Pyx_RefNannyFinishContext();
15962  return NULL;
15963  __pyx_L4_argument_unpacking_done:;
15964  __pyx_r = __pyx_pf_8PyClical_60asin(__pyx_self, __pyx_v_obj, __pyx_v_i);
15965 
15966  /* function exit code */
15967  __Pyx_RefNannyFinishContext();
15968  return __pyx_r;
15969  }
15970 
15971  static PyObject *__pyx_pf_8PyClical_60asin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
15972  PyObject *__pyx_r = NULL;
15973  __Pyx_RefNannyDeclarations
15974  PyObject *__pyx_t_1 = NULL;
15975  struct __pyx_opt_args_8PyClical_asin __pyx_t_2;
15976  __Pyx_RefNannySetupContext("asin", 0);
15977  __Pyx_XDECREF(__pyx_r);
15978  __pyx_t_2.__pyx_n = 1;
15979  __pyx_t_2.i = __pyx_v_i;
15980  __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)
15981  __Pyx_GOTREF(__pyx_t_1);
15982  __pyx_r = __pyx_t_1;
15983  __pyx_t_1 = 0;
15984  goto __pyx_L0;
15985 
15986  /* function exit code */
15987  __pyx_L1_error:;
15988  __Pyx_XDECREF(__pyx_t_1);
15989  __Pyx_AddTraceback("PyClical.asin", __pyx_clineno, __pyx_lineno, __pyx_filename);
15990  __pyx_r = NULL;
15991  __pyx_L0:;
15992  __Pyx_XGIVEREF(__pyx_r);
15993  __Pyx_RefNannyFinishContext();
15994  return __pyx_r;
15995  }
15996 
15997  /* "PyClical.pyx":1719
15998  * return clifford().wrap( glucat.asin(toClifford(obj)) )
15999  *
16000  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16001  * """
16002  * Hyperbolic sine of multivector.
16003  */
16004 
16005  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16006  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_sinh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
16007  PyObject *__pyx_r = NULL;
16008  __Pyx_RefNannyDeclarations
16009  PyObject *__pyx_t_1 = NULL;
16010  PyObject *__pyx_t_2 = NULL;
16011  PyObject *__pyx_t_3 = NULL;
16012  PyObject *__pyx_t_4 = NULL;
16013  PyObject *__pyx_t_5 = NULL;
16014  PyObject *__pyx_t_6 = NULL;
16015  PyObject *__pyx_t_7 = NULL;
16016  PyObject *__pyx_t_8 = NULL;
16017  __Pyx_RefNannySetupContext("sinh", 0);
16018 
16019  /* "PyClical.pyx":1728
16020  * 0.5{1,2}
16021  * """
16022  * try: # <<<<<<<<<<<<<<
16023  * return math.sinh(obj)
16024  * except:
16025  */
16026  {
16027  __Pyx_PyThreadState_declare
16028  __Pyx_PyThreadState_assign
16029  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
16030  __Pyx_XGOTREF(__pyx_t_1);
16031  __Pyx_XGOTREF(__pyx_t_2);
16032  __Pyx_XGOTREF(__pyx_t_3);
16033  /*try:*/ {
16034 
16035  /* "PyClical.pyx":1729
16036  * """
16037  * try:
16038  * return math.sinh(obj) # <<<<<<<<<<<<<<
16039  * except:
16040  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16041  */
16042  __Pyx_XDECREF(__pyx_r);
16043  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L3_error)
16044  __Pyx_GOTREF(__pyx_t_5);
16045  __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)
16046  __Pyx_GOTREF(__pyx_t_6);
16047  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16048  __pyx_t_5 = NULL;
16049  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
16050  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
16051  if (likely(__pyx_t_5)) {
16052  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
16053  __Pyx_INCREF(__pyx_t_5);
16054  __Pyx_INCREF(function);
16055  __Pyx_DECREF_SET(__pyx_t_6, function);
16056  }
16057  }
16058  if (!__pyx_t_5) {
16059  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16060  __Pyx_GOTREF(__pyx_t_4);
16061  } else {
16062  #if CYTHON_FAST_PYCALL
16063  if (PyFunction_Check(__pyx_t_6)) {
16064  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16065  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16066  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16067  __Pyx_GOTREF(__pyx_t_4);
16068  } else
16069  #endif
16070  #if CYTHON_FAST_PYCCALL
16071  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
16072  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
16073  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16074  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16075  __Pyx_GOTREF(__pyx_t_4);
16076  } else
16077  #endif
16078  {
16079  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1729, __pyx_L3_error)
16080  __Pyx_GOTREF(__pyx_t_7);
16081  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
16082  __Pyx_INCREF(__pyx_v_obj);
16083  __Pyx_GIVEREF(__pyx_v_obj);
16084  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
16085  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L3_error)
16086  __Pyx_GOTREF(__pyx_t_4);
16087  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16088  }
16089  }
16090  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16091  __pyx_r = __pyx_t_4;
16092  __pyx_t_4 = 0;
16093  goto __pyx_L7_try_return;
16094 
16095  /* "PyClical.pyx":1728
16096  * 0.5{1,2}
16097  * """
16098  * try: # <<<<<<<<<<<<<<
16099  * return math.sinh(obj)
16100  * except:
16101  */
16102  }
16103  __pyx_L3_error:;
16104  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16105  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
16106  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16107  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16108 
16109  /* "PyClical.pyx":1730
16110  * try:
16111  * return math.sinh(obj)
16112  * except: # <<<<<<<<<<<<<<
16113  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16114  *
16115  */
16116  /*except:*/ {
16117  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16118  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1730, __pyx_L5_except_error)
16119  __Pyx_GOTREF(__pyx_t_4);
16120  __Pyx_GOTREF(__pyx_t_6);
16121  __Pyx_GOTREF(__pyx_t_7);
16122 
16123  /* "PyClical.pyx":1731
16124  * return math.sinh(obj)
16125  * except:
16126  * return clifford().wrap( glucat.sinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16127  *
16128  * cpdef inline asinh(obj,i = None):
16129  */
16130  __Pyx_XDECREF(__pyx_r);
16131  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
16132  __Pyx_GOTREF(__pyx_t_5);
16133  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), sinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1731, __pyx_L5_except_error)
16134  __Pyx_GOTREF(__pyx_t_8);
16135  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16136  __pyx_r = __pyx_t_8;
16137  __pyx_t_8 = 0;
16138  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16139  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16140  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
16141  goto __pyx_L6_except_return;
16142  }
16143  __pyx_L5_except_error:;
16144 
16145  /* "PyClical.pyx":1728
16146  * 0.5{1,2}
16147  * """
16148  * try: # <<<<<<<<<<<<<<
16149  * return math.sinh(obj)
16150  * except:
16151  */
16152  __Pyx_XGIVEREF(__pyx_t_1);
16153  __Pyx_XGIVEREF(__pyx_t_2);
16154  __Pyx_XGIVEREF(__pyx_t_3);
16155  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16156  goto __pyx_L1_error;
16157  __pyx_L7_try_return:;
16158  __Pyx_XGIVEREF(__pyx_t_1);
16159  __Pyx_XGIVEREF(__pyx_t_2);
16160  __Pyx_XGIVEREF(__pyx_t_3);
16161  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16162  goto __pyx_L0;
16163  __pyx_L6_except_return:;
16164  __Pyx_XGIVEREF(__pyx_t_1);
16165  __Pyx_XGIVEREF(__pyx_t_2);
16166  __Pyx_XGIVEREF(__pyx_t_3);
16167  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
16168  goto __pyx_L0;
16169  }
16170 
16171  /* "PyClical.pyx":1719
16172  * return clifford().wrap( glucat.asin(toClifford(obj)) )
16173  *
16174  * cpdef inline sinh(obj): # <<<<<<<<<<<<<<
16175  * """
16176  * Hyperbolic sine of multivector.
16177  */
16178 
16179  /* function exit code */
16180  __pyx_L1_error:;
16181  __Pyx_XDECREF(__pyx_t_4);
16182  __Pyx_XDECREF(__pyx_t_5);
16183  __Pyx_XDECREF(__pyx_t_6);
16184  __Pyx_XDECREF(__pyx_t_7);
16185  __Pyx_XDECREF(__pyx_t_8);
16186  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16187  __pyx_r = 0;
16188  __pyx_L0:;
16189  __Pyx_XGIVEREF(__pyx_r);
16190  __Pyx_RefNannyFinishContext();
16191  return __pyx_r;
16192  }
16193 
16194  /* Python wrapper */
16195  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
16196  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 ";
16197  static PyObject *__pyx_pw_8PyClical_63sinh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16198  PyObject *__pyx_r = 0;
16199  __Pyx_RefNannyDeclarations
16200  __Pyx_RefNannySetupContext("sinh (wrapper)", 0);
16201  __pyx_r = __pyx_pf_8PyClical_62sinh(__pyx_self, ((PyObject *)__pyx_v_obj));
16202 
16203  /* function exit code */
16204  __Pyx_RefNannyFinishContext();
16205  return __pyx_r;
16206  }
16207 
16208  static PyObject *__pyx_pf_8PyClical_62sinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
16209  PyObject *__pyx_r = NULL;
16210  __Pyx_RefNannyDeclarations
16211  PyObject *__pyx_t_1 = NULL;
16212  __Pyx_RefNannySetupContext("sinh", 0);
16213  __Pyx_XDECREF(__pyx_r);
16214  __pyx_t_1 = __pyx_f_8PyClical_sinh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error)
16215  __Pyx_GOTREF(__pyx_t_1);
16216  __pyx_r = __pyx_t_1;
16217  __pyx_t_1 = 0;
16218  goto __pyx_L0;
16219 
16220  /* function exit code */
16221  __pyx_L1_error:;
16222  __Pyx_XDECREF(__pyx_t_1);
16223  __Pyx_AddTraceback("PyClical.sinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16224  __pyx_r = NULL;
16225  __pyx_L0:;
16226  __Pyx_XGIVEREF(__pyx_r);
16227  __Pyx_RefNannyFinishContext();
16228  return __pyx_r;
16229  }
16230 
16231  /* "PyClical.pyx":1733
16232  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16233  *
16234  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16235  * """
16236  * Inverse hyperbolic sine of multivector with optional complexifier.
16237  */
16238 
16239  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16240  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) {
16241  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16242  PyObject *__pyx_r = NULL;
16243  __Pyx_RefNannyDeclarations
16244  int __pyx_t_1;
16245  int __pyx_t_2;
16246  PyObject *__pyx_t_3 = NULL;
16247  Clifford __pyx_t_4;
16248  PyObject *__pyx_t_5 = NULL;
16249  PyObject *__pyx_t_6 = NULL;
16250  PyObject *__pyx_t_7 = NULL;
16251  PyObject *__pyx_t_8 = NULL;
16252  PyObject *__pyx_t_9 = NULL;
16253  PyObject *__pyx_t_10 = NULL;
16254  PyObject *__pyx_t_11 = NULL;
16255  __Pyx_RefNannySetupContext("asinh", 0);
16256  if (__pyx_optional_args) {
16257  if (__pyx_optional_args->__pyx_n > 0) {
16258  __pyx_v_i = __pyx_optional_args->i;
16259  }
16260  }
16261 
16262  /* "PyClical.pyx":1744
16263  * {1,2}
16264  * """
16265  * if not (i is None): # <<<<<<<<<<<<<<
16266  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16267  * else:
16268  */
16269  __pyx_t_1 = (__pyx_v_i != Py_None);
16270  __pyx_t_2 = (__pyx_t_1 != 0);
16271  if (__pyx_t_2) {
16272 
16273  /* "PyClical.pyx":1745
16274  * """
16275  * if not (i is None):
16276  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16277  * else:
16278  * try:
16279  */
16280  __Pyx_XDECREF(__pyx_r);
16281  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L1_error)
16282  __Pyx_GOTREF(__pyx_t_3);
16283  try {
16284  __pyx_t_4 = asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16285  } catch(...) {
16286  __Pyx_CppExn2PyErr();
16287  __PYX_ERR(0, 1745, __pyx_L1_error)
16288  }
16289  __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)
16290  __Pyx_GOTREF(__pyx_t_5);
16291  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16292  __pyx_r = __pyx_t_5;
16293  __pyx_t_5 = 0;
16294  goto __pyx_L0;
16295 
16296  /* "PyClical.pyx":1744
16297  * {1,2}
16298  * """
16299  * if not (i is None): # <<<<<<<<<<<<<<
16300  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16301  * else:
16302  */
16303  }
16304 
16305  /* "PyClical.pyx":1747
16306  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16307  * else:
16308  * try: # <<<<<<<<<<<<<<
16309  * return math.asinh(obj)
16310  * except:
16311  */
16312  /*else*/ {
16313  {
16314  __Pyx_PyThreadState_declare
16315  __Pyx_PyThreadState_assign
16316  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16317  __Pyx_XGOTREF(__pyx_t_6);
16318  __Pyx_XGOTREF(__pyx_t_7);
16319  __Pyx_XGOTREF(__pyx_t_8);
16320  /*try:*/ {
16321 
16322  /* "PyClical.pyx":1748
16323  * else:
16324  * try:
16325  * return math.asinh(obj) # <<<<<<<<<<<<<<
16326  * except:
16327  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16328  */
16329  __Pyx_XDECREF(__pyx_r);
16330  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L4_error)
16331  __Pyx_GOTREF(__pyx_t_3);
16332  __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)
16333  __Pyx_GOTREF(__pyx_t_9);
16334  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16335  __pyx_t_3 = NULL;
16336  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16337  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16338  if (likely(__pyx_t_3)) {
16339  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16340  __Pyx_INCREF(__pyx_t_3);
16341  __Pyx_INCREF(function);
16342  __Pyx_DECREF_SET(__pyx_t_9, function);
16343  }
16344  }
16345  if (!__pyx_t_3) {
16346  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16347  __Pyx_GOTREF(__pyx_t_5);
16348  } else {
16349  #if CYTHON_FAST_PYCALL
16350  if (PyFunction_Check(__pyx_t_9)) {
16351  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16352  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16353  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16354  __Pyx_GOTREF(__pyx_t_5);
16355  } else
16356  #endif
16357  #if CYTHON_FAST_PYCCALL
16358  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16359  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16360  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16361  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16362  __Pyx_GOTREF(__pyx_t_5);
16363  } else
16364  #endif
16365  {
16366  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1748, __pyx_L4_error)
16367  __Pyx_GOTREF(__pyx_t_10);
16368  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16369  __Pyx_INCREF(__pyx_v_obj);
16370  __Pyx_GIVEREF(__pyx_v_obj);
16371  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16372  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1748, __pyx_L4_error)
16373  __Pyx_GOTREF(__pyx_t_5);
16374  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16375  }
16376  }
16377  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16378  __pyx_r = __pyx_t_5;
16379  __pyx_t_5 = 0;
16380  goto __pyx_L8_try_return;
16381 
16382  /* "PyClical.pyx":1747
16383  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16384  * else:
16385  * try: # <<<<<<<<<<<<<<
16386  * return math.asinh(obj)
16387  * except:
16388  */
16389  }
16390  __pyx_L4_error:;
16391  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16392  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16393  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16394  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16395 
16396  /* "PyClical.pyx":1749
16397  * try:
16398  * return math.asinh(obj)
16399  * except: # <<<<<<<<<<<<<<
16400  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16401  *
16402  */
16403  /*except:*/ {
16404  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16405  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1749, __pyx_L6_except_error)
16406  __Pyx_GOTREF(__pyx_t_5);
16407  __Pyx_GOTREF(__pyx_t_9);
16408  __Pyx_GOTREF(__pyx_t_10);
16409 
16410  /* "PyClical.pyx":1750
16411  * return math.asinh(obj)
16412  * except:
16413  * return clifford().wrap( glucat.asinh(toClifford(obj)) ) # <<<<<<<<<<<<<<
16414  *
16415  * cpdef inline tan(obj,i = None):
16416  */
16417  __Pyx_XDECREF(__pyx_r);
16418  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16419  __Pyx_GOTREF(__pyx_t_3);
16420  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), asinh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1750, __pyx_L6_except_error)
16421  __Pyx_GOTREF(__pyx_t_11);
16422  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16423  __pyx_r = __pyx_t_11;
16424  __pyx_t_11 = 0;
16425  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16426  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16427  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16428  goto __pyx_L7_except_return;
16429  }
16430  __pyx_L6_except_error:;
16431 
16432  /* "PyClical.pyx":1747
16433  * return clifford().wrap( glucat.asinh(toClifford(obj), toClifford(i)) )
16434  * else:
16435  * try: # <<<<<<<<<<<<<<
16436  * return math.asinh(obj)
16437  * except:
16438  */
16439  __Pyx_XGIVEREF(__pyx_t_6);
16440  __Pyx_XGIVEREF(__pyx_t_7);
16441  __Pyx_XGIVEREF(__pyx_t_8);
16442  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16443  goto __pyx_L1_error;
16444  __pyx_L8_try_return:;
16445  __Pyx_XGIVEREF(__pyx_t_6);
16446  __Pyx_XGIVEREF(__pyx_t_7);
16447  __Pyx_XGIVEREF(__pyx_t_8);
16448  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16449  goto __pyx_L0;
16450  __pyx_L7_except_return:;
16451  __Pyx_XGIVEREF(__pyx_t_6);
16452  __Pyx_XGIVEREF(__pyx_t_7);
16453  __Pyx_XGIVEREF(__pyx_t_8);
16454  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16455  goto __pyx_L0;
16456  }
16457  }
16458 
16459  /* "PyClical.pyx":1733
16460  * return clifford().wrap( glucat.sinh(toClifford(obj)) )
16461  *
16462  * cpdef inline asinh(obj,i = None): # <<<<<<<<<<<<<<
16463  * """
16464  * Inverse hyperbolic sine of multivector with optional complexifier.
16465  */
16466 
16467  /* function exit code */
16468  __pyx_L1_error:;
16469  __Pyx_XDECREF(__pyx_t_3);
16470  __Pyx_XDECREF(__pyx_t_5);
16471  __Pyx_XDECREF(__pyx_t_9);
16472  __Pyx_XDECREF(__pyx_t_10);
16473  __Pyx_XDECREF(__pyx_t_11);
16474  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16475  __pyx_r = 0;
16476  __pyx_L0:;
16477  __Pyx_XGIVEREF(__pyx_r);
16478  __Pyx_RefNannyFinishContext();
16479  return __pyx_r;
16480  }
16481 
16482  /* Python wrapper */
16483  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16484  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 ";
16485  static PyObject *__pyx_pw_8PyClical_65asinh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16486  PyObject *__pyx_v_obj = 0;
16487  PyObject *__pyx_v_i = 0;
16488  PyObject *__pyx_r = 0;
16489  __Pyx_RefNannyDeclarations
16490  __Pyx_RefNannySetupContext("asinh (wrapper)", 0);
16491  {
16492  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16493  PyObject* values[2] = {0,0};
16494  values[1] = ((PyObject *)Py_None);
16495  if (unlikely(__pyx_kwds)) {
16496  Py_ssize_t kw_args;
16497  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16498  switch (pos_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  CYTHON_FALLTHROUGH;
16503  case 0: break;
16504  default: goto __pyx_L5_argtuple_error;
16505  }
16506  kw_args = PyDict_Size(__pyx_kwds);
16507  switch (pos_args) {
16508  case 0:
16509  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16510  else goto __pyx_L5_argtuple_error;
16511  CYTHON_FALLTHROUGH;
16512  case 1:
16513  if (kw_args > 0) {
16514  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16515  if (value) { values[1] = value; kw_args--; }
16516  }
16517  }
16518  if (unlikely(kw_args > 0)) {
16519  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "asinh") < 0)) __PYX_ERR(0, 1733, __pyx_L3_error)
16520  }
16521  } else {
16522  switch (PyTuple_GET_SIZE(__pyx_args)) {
16523  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16524  CYTHON_FALLTHROUGH;
16525  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16526  break;
16527  default: goto __pyx_L5_argtuple_error;
16528  }
16529  }
16530  __pyx_v_obj = values[0];
16531  __pyx_v_i = values[1];
16532  }
16533  goto __pyx_L4_argument_unpacking_done;
16534  __pyx_L5_argtuple_error:;
16535  __Pyx_RaiseArgtupleInvalid("asinh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1733, __pyx_L3_error)
16536  __pyx_L3_error:;
16537  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16538  __Pyx_RefNannyFinishContext();
16539  return NULL;
16540  __pyx_L4_argument_unpacking_done:;
16541  __pyx_r = __pyx_pf_8PyClical_64asinh(__pyx_self, __pyx_v_obj, __pyx_v_i);
16542 
16543  /* function exit code */
16544  __Pyx_RefNannyFinishContext();
16545  return __pyx_r;
16546  }
16547 
16548  static PyObject *__pyx_pf_8PyClical_64asinh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16549  PyObject *__pyx_r = NULL;
16550  __Pyx_RefNannyDeclarations
16551  PyObject *__pyx_t_1 = NULL;
16552  struct __pyx_opt_args_8PyClical_asinh __pyx_t_2;
16553  __Pyx_RefNannySetupContext("asinh", 0);
16554  __Pyx_XDECREF(__pyx_r);
16555  __pyx_t_2.__pyx_n = 1;
16556  __pyx_t_2.i = __pyx_v_i;
16557  __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)
16558  __Pyx_GOTREF(__pyx_t_1);
16559  __pyx_r = __pyx_t_1;
16560  __pyx_t_1 = 0;
16561  goto __pyx_L0;
16562 
16563  /* function exit code */
16564  __pyx_L1_error:;
16565  __Pyx_XDECREF(__pyx_t_1);
16566  __Pyx_AddTraceback("PyClical.asinh", __pyx_clineno, __pyx_lineno, __pyx_filename);
16567  __pyx_r = NULL;
16568  __pyx_L0:;
16569  __Pyx_XGIVEREF(__pyx_r);
16570  __Pyx_RefNannyFinishContext();
16571  return __pyx_r;
16572  }
16573 
16574  /* "PyClical.pyx":1752
16575  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16576  *
16577  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16578  * """
16579  * Tangent of multivector with optional complexifier.
16580  */
16581 
16582  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16583  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) {
16584  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16585  PyObject *__pyx_r = NULL;
16586  __Pyx_RefNannyDeclarations
16587  int __pyx_t_1;
16588  int __pyx_t_2;
16589  PyObject *__pyx_t_3 = NULL;
16590  Clifford __pyx_t_4;
16591  PyObject *__pyx_t_5 = NULL;
16592  PyObject *__pyx_t_6 = NULL;
16593  PyObject *__pyx_t_7 = NULL;
16594  PyObject *__pyx_t_8 = NULL;
16595  PyObject *__pyx_t_9 = NULL;
16596  PyObject *__pyx_t_10 = NULL;
16597  PyObject *__pyx_t_11 = NULL;
16598  __Pyx_RefNannySetupContext("tan", 0);
16599  if (__pyx_optional_args) {
16600  if (__pyx_optional_args->__pyx_n > 0) {
16601  __pyx_v_i = __pyx_optional_args->i;
16602  }
16603  }
16604 
16605  /* "PyClical.pyx":1761
16606  * 0.7616{1,2}
16607  * """
16608  * if not (i is None): # <<<<<<<<<<<<<<
16609  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16610  * else:
16611  */
16612  __pyx_t_1 = (__pyx_v_i != Py_None);
16613  __pyx_t_2 = (__pyx_t_1 != 0);
16614  if (__pyx_t_2) {
16615 
16616  /* "PyClical.pyx":1762
16617  * """
16618  * if not (i is None):
16619  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16620  * else:
16621  * try:
16622  */
16623  __Pyx_XDECREF(__pyx_r);
16624  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error)
16625  __Pyx_GOTREF(__pyx_t_3);
16626  try {
16627  __pyx_t_4 = tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16628  } catch(...) {
16629  __Pyx_CppExn2PyErr();
16630  __PYX_ERR(0, 1762, __pyx_L1_error)
16631  }
16632  __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)
16633  __Pyx_GOTREF(__pyx_t_5);
16634  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16635  __pyx_r = __pyx_t_5;
16636  __pyx_t_5 = 0;
16637  goto __pyx_L0;
16638 
16639  /* "PyClical.pyx":1761
16640  * 0.7616{1,2}
16641  * """
16642  * if not (i is None): # <<<<<<<<<<<<<<
16643  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16644  * else:
16645  */
16646  }
16647 
16648  /* "PyClical.pyx":1764
16649  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16650  * else:
16651  * try: # <<<<<<<<<<<<<<
16652  * return math.tan(obj)
16653  * except:
16654  */
16655  /*else*/ {
16656  {
16657  __Pyx_PyThreadState_declare
16658  __Pyx_PyThreadState_assign
16659  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
16660  __Pyx_XGOTREF(__pyx_t_6);
16661  __Pyx_XGOTREF(__pyx_t_7);
16662  __Pyx_XGOTREF(__pyx_t_8);
16663  /*try:*/ {
16664 
16665  /* "PyClical.pyx":1765
16666  * else:
16667  * try:
16668  * return math.tan(obj) # <<<<<<<<<<<<<<
16669  * except:
16670  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16671  */
16672  __Pyx_XDECREF(__pyx_r);
16673  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L4_error)
16674  __Pyx_GOTREF(__pyx_t_3);
16675  __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)
16676  __Pyx_GOTREF(__pyx_t_9);
16677  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16678  __pyx_t_3 = NULL;
16679  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
16680  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
16681  if (likely(__pyx_t_3)) {
16682  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
16683  __Pyx_INCREF(__pyx_t_3);
16684  __Pyx_INCREF(function);
16685  __Pyx_DECREF_SET(__pyx_t_9, function);
16686  }
16687  }
16688  if (!__pyx_t_3) {
16689  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16690  __Pyx_GOTREF(__pyx_t_5);
16691  } else {
16692  #if CYTHON_FAST_PYCALL
16693  if (PyFunction_Check(__pyx_t_9)) {
16694  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16695  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16696  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16697  __Pyx_GOTREF(__pyx_t_5);
16698  } else
16699  #endif
16700  #if CYTHON_FAST_PYCCALL
16701  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
16702  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
16703  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16704  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16705  __Pyx_GOTREF(__pyx_t_5);
16706  } else
16707  #endif
16708  {
16709  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1765, __pyx_L4_error)
16710  __Pyx_GOTREF(__pyx_t_10);
16711  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
16712  __Pyx_INCREF(__pyx_v_obj);
16713  __Pyx_GIVEREF(__pyx_v_obj);
16714  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
16715  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L4_error)
16716  __Pyx_GOTREF(__pyx_t_5);
16717  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16718  }
16719  }
16720  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16721  __pyx_r = __pyx_t_5;
16722  __pyx_t_5 = 0;
16723  goto __pyx_L8_try_return;
16724 
16725  /* "PyClical.pyx":1764
16726  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16727  * else:
16728  * try: # <<<<<<<<<<<<<<
16729  * return math.tan(obj)
16730  * except:
16731  */
16732  }
16733  __pyx_L4_error:;
16734  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16735  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
16736  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
16737  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16738 
16739  /* "PyClical.pyx":1766
16740  * try:
16741  * return math.tan(obj)
16742  * except: # <<<<<<<<<<<<<<
16743  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16744  *
16745  */
16746  /*except:*/ {
16747  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16748  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1766, __pyx_L6_except_error)
16749  __Pyx_GOTREF(__pyx_t_5);
16750  __Pyx_GOTREF(__pyx_t_9);
16751  __Pyx_GOTREF(__pyx_t_10);
16752 
16753  /* "PyClical.pyx":1767
16754  * return math.tan(obj)
16755  * except:
16756  * return clifford().wrap( glucat.tan(toClifford(obj)) ) # <<<<<<<<<<<<<<
16757  *
16758  * cpdef inline atan(obj,i = None):
16759  */
16760  __Pyx_XDECREF(__pyx_r);
16761  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16762  __Pyx_GOTREF(__pyx_t_3);
16763  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), tan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1767, __pyx_L6_except_error)
16764  __Pyx_GOTREF(__pyx_t_11);
16765  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16766  __pyx_r = __pyx_t_11;
16767  __pyx_t_11 = 0;
16768  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16769  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
16770  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
16771  goto __pyx_L7_except_return;
16772  }
16773  __pyx_L6_except_error:;
16774 
16775  /* "PyClical.pyx":1764
16776  * return clifford().wrap( glucat.tan(toClifford(obj), toClifford(i)) )
16777  * else:
16778  * try: # <<<<<<<<<<<<<<
16779  * return math.tan(obj)
16780  * except:
16781  */
16782  __Pyx_XGIVEREF(__pyx_t_6);
16783  __Pyx_XGIVEREF(__pyx_t_7);
16784  __Pyx_XGIVEREF(__pyx_t_8);
16785  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16786  goto __pyx_L1_error;
16787  __pyx_L8_try_return:;
16788  __Pyx_XGIVEREF(__pyx_t_6);
16789  __Pyx_XGIVEREF(__pyx_t_7);
16790  __Pyx_XGIVEREF(__pyx_t_8);
16791  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16792  goto __pyx_L0;
16793  __pyx_L7_except_return:;
16794  __Pyx_XGIVEREF(__pyx_t_6);
16795  __Pyx_XGIVEREF(__pyx_t_7);
16796  __Pyx_XGIVEREF(__pyx_t_8);
16797  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
16798  goto __pyx_L0;
16799  }
16800  }
16801 
16802  /* "PyClical.pyx":1752
16803  * return clifford().wrap( glucat.asinh(toClifford(obj)) )
16804  *
16805  * cpdef inline tan(obj,i = None): # <<<<<<<<<<<<<<
16806  * """
16807  * Tangent of multivector with optional complexifier.
16808  */
16809 
16810  /* function exit code */
16811  __pyx_L1_error:;
16812  __Pyx_XDECREF(__pyx_t_3);
16813  __Pyx_XDECREF(__pyx_t_5);
16814  __Pyx_XDECREF(__pyx_t_9);
16815  __Pyx_XDECREF(__pyx_t_10);
16816  __Pyx_XDECREF(__pyx_t_11);
16817  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16818  __pyx_r = 0;
16819  __pyx_L0:;
16820  __Pyx_XGIVEREF(__pyx_r);
16821  __Pyx_RefNannyFinishContext();
16822  return __pyx_r;
16823  }
16824 
16825  /* Python wrapper */
16826  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16827  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 ";
16828  static PyObject *__pyx_pw_8PyClical_67tan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16829  PyObject *__pyx_v_obj = 0;
16830  PyObject *__pyx_v_i = 0;
16831  PyObject *__pyx_r = 0;
16832  __Pyx_RefNannyDeclarations
16833  __Pyx_RefNannySetupContext("tan (wrapper)", 0);
16834  {
16835  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
16836  PyObject* values[2] = {0,0};
16837  values[1] = ((PyObject *)Py_None);
16838  if (unlikely(__pyx_kwds)) {
16839  Py_ssize_t kw_args;
16840  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16841  switch (pos_args) {
16842  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16843  CYTHON_FALLTHROUGH;
16844  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16845  CYTHON_FALLTHROUGH;
16846  case 0: break;
16847  default: goto __pyx_L5_argtuple_error;
16848  }
16849  kw_args = PyDict_Size(__pyx_kwds);
16850  switch (pos_args) {
16851  case 0:
16852  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
16853  else goto __pyx_L5_argtuple_error;
16854  CYTHON_FALLTHROUGH;
16855  case 1:
16856  if (kw_args > 0) {
16857  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
16858  if (value) { values[1] = value; kw_args--; }
16859  }
16860  }
16861  if (unlikely(kw_args > 0)) {
16862  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tan") < 0)) __PYX_ERR(0, 1752, __pyx_L3_error)
16863  }
16864  } else {
16865  switch (PyTuple_GET_SIZE(__pyx_args)) {
16866  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16867  CYTHON_FALLTHROUGH;
16868  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16869  break;
16870  default: goto __pyx_L5_argtuple_error;
16871  }
16872  }
16873  __pyx_v_obj = values[0];
16874  __pyx_v_i = values[1];
16875  }
16876  goto __pyx_L4_argument_unpacking_done;
16877  __pyx_L5_argtuple_error:;
16878  __Pyx_RaiseArgtupleInvalid("tan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1752, __pyx_L3_error)
16879  __pyx_L3_error:;
16880  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16881  __Pyx_RefNannyFinishContext();
16882  return NULL;
16883  __pyx_L4_argument_unpacking_done:;
16884  __pyx_r = __pyx_pf_8PyClical_66tan(__pyx_self, __pyx_v_obj, __pyx_v_i);
16885 
16886  /* function exit code */
16887  __Pyx_RefNannyFinishContext();
16888  return __pyx_r;
16889  }
16890 
16891  static PyObject *__pyx_pf_8PyClical_66tan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
16892  PyObject *__pyx_r = NULL;
16893  __Pyx_RefNannyDeclarations
16894  PyObject *__pyx_t_1 = NULL;
16895  struct __pyx_opt_args_8PyClical_tan __pyx_t_2;
16896  __Pyx_RefNannySetupContext("tan", 0);
16897  __Pyx_XDECREF(__pyx_r);
16898  __pyx_t_2.__pyx_n = 1;
16899  __pyx_t_2.i = __pyx_v_i;
16900  __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)
16901  __Pyx_GOTREF(__pyx_t_1);
16902  __pyx_r = __pyx_t_1;
16903  __pyx_t_1 = 0;
16904  goto __pyx_L0;
16905 
16906  /* function exit code */
16907  __pyx_L1_error:;
16908  __Pyx_XDECREF(__pyx_t_1);
16909  __Pyx_AddTraceback("PyClical.tan", __pyx_clineno, __pyx_lineno, __pyx_filename);
16910  __pyx_r = NULL;
16911  __pyx_L0:;
16912  __Pyx_XGIVEREF(__pyx_r);
16913  __Pyx_RefNannyFinishContext();
16914  return __pyx_r;
16915  }
16916 
16917  /* "PyClical.pyx":1769
16918  * return clifford().wrap( glucat.tan(toClifford(obj)) )
16919  *
16920  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
16921  * """
16922  * Inverse tangent of multivector with optional complexifier.
16923  */
16924 
16925  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16926  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) {
16927  PyObject *__pyx_v_i = ((PyObject *)Py_None);
16928  PyObject *__pyx_r = NULL;
16929  __Pyx_RefNannyDeclarations
16930  int __pyx_t_1;
16931  int __pyx_t_2;
16932  PyObject *__pyx_t_3 = NULL;
16933  Clifford __pyx_t_4;
16934  PyObject *__pyx_t_5 = NULL;
16935  PyObject *__pyx_t_6 = NULL;
16936  PyObject *__pyx_t_7 = NULL;
16937  PyObject *__pyx_t_8 = NULL;
16938  PyObject *__pyx_t_9 = NULL;
16939  PyObject *__pyx_t_10 = NULL;
16940  PyObject *__pyx_t_11 = NULL;
16941  __Pyx_RefNannySetupContext("atan", 0);
16942  if (__pyx_optional_args) {
16943  if (__pyx_optional_args->__pyx_n > 0) {
16944  __pyx_v_i = __pyx_optional_args->i;
16945  }
16946  }
16947 
16948  /* "PyClical.pyx":1778
16949  * {1}
16950  * """
16951  * if not (i is None): # <<<<<<<<<<<<<<
16952  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16953  * else:
16954  */
16955  __pyx_t_1 = (__pyx_v_i != Py_None);
16956  __pyx_t_2 = (__pyx_t_1 != 0);
16957  if (__pyx_t_2) {
16958 
16959  /* "PyClical.pyx":1779
16960  * """
16961  * if not (i is None):
16962  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
16963  * else:
16964  * try:
16965  */
16966  __Pyx_XDECREF(__pyx_r);
16967  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error)
16968  __Pyx_GOTREF(__pyx_t_3);
16969  try {
16970  __pyx_t_4 = atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
16971  } catch(...) {
16972  __Pyx_CppExn2PyErr();
16973  __PYX_ERR(0, 1779, __pyx_L1_error)
16974  }
16975  __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)
16976  __Pyx_GOTREF(__pyx_t_5);
16977  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16978  __pyx_r = __pyx_t_5;
16979  __pyx_t_5 = 0;
16980  goto __pyx_L0;
16981 
16982  /* "PyClical.pyx":1778
16983  * {1}
16984  * """
16985  * if not (i is None): # <<<<<<<<<<<<<<
16986  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16987  * else:
16988  */
16989  }
16990 
16991  /* "PyClical.pyx":1781
16992  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
16993  * else:
16994  * try: # <<<<<<<<<<<<<<
16995  * return math.atan(obj)
16996  * except:
16997  */
16998  /*else*/ {
16999  {
17000  __Pyx_PyThreadState_declare
17001  __Pyx_PyThreadState_assign
17002  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17003  __Pyx_XGOTREF(__pyx_t_6);
17004  __Pyx_XGOTREF(__pyx_t_7);
17005  __Pyx_XGOTREF(__pyx_t_8);
17006  /*try:*/ {
17007 
17008  /* "PyClical.pyx":1782
17009  * else:
17010  * try:
17011  * return math.atan(obj) # <<<<<<<<<<<<<<
17012  * except:
17013  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17014  */
17015  __Pyx_XDECREF(__pyx_r);
17016  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1782, __pyx_L4_error)
17017  __Pyx_GOTREF(__pyx_t_3);
17018  __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)
17019  __Pyx_GOTREF(__pyx_t_9);
17020  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17021  __pyx_t_3 = NULL;
17022  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17023  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17024  if (likely(__pyx_t_3)) {
17025  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17026  __Pyx_INCREF(__pyx_t_3);
17027  __Pyx_INCREF(function);
17028  __Pyx_DECREF_SET(__pyx_t_9, function);
17029  }
17030  }
17031  if (!__pyx_t_3) {
17032  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17033  __Pyx_GOTREF(__pyx_t_5);
17034  } else {
17035  #if CYTHON_FAST_PYCALL
17036  if (PyFunction_Check(__pyx_t_9)) {
17037  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17038  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17039  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17040  __Pyx_GOTREF(__pyx_t_5);
17041  } else
17042  #endif
17043  #if CYTHON_FAST_PYCCALL
17044  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17045  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17046  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17047  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17048  __Pyx_GOTREF(__pyx_t_5);
17049  } else
17050  #endif
17051  {
17052  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L4_error)
17053  __Pyx_GOTREF(__pyx_t_10);
17054  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17055  __Pyx_INCREF(__pyx_v_obj);
17056  __Pyx_GIVEREF(__pyx_v_obj);
17057  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17058  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1782, __pyx_L4_error)
17059  __Pyx_GOTREF(__pyx_t_5);
17060  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17061  }
17062  }
17063  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17064  __pyx_r = __pyx_t_5;
17065  __pyx_t_5 = 0;
17066  goto __pyx_L8_try_return;
17067 
17068  /* "PyClical.pyx":1781
17069  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17070  * else:
17071  * try: # <<<<<<<<<<<<<<
17072  * return math.atan(obj)
17073  * except:
17074  */
17075  }
17076  __pyx_L4_error:;
17077  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17078  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17079  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17080  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17081 
17082  /* "PyClical.pyx":1783
17083  * try:
17084  * return math.atan(obj)
17085  * except: # <<<<<<<<<<<<<<
17086  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17087  *
17088  */
17089  /*except:*/ {
17090  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17091  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1783, __pyx_L6_except_error)
17092  __Pyx_GOTREF(__pyx_t_5);
17093  __Pyx_GOTREF(__pyx_t_9);
17094  __Pyx_GOTREF(__pyx_t_10);
17095 
17096  /* "PyClical.pyx":1784
17097  * return math.atan(obj)
17098  * except:
17099  * return clifford().wrap( glucat.atan(toClifford(obj)) ) # <<<<<<<<<<<<<<
17100  *
17101  * cpdef inline tanh(obj):
17102  */
17103  __Pyx_XDECREF(__pyx_r);
17104  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
17105  __Pyx_GOTREF(__pyx_t_3);
17106  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), atan(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1784, __pyx_L6_except_error)
17107  __Pyx_GOTREF(__pyx_t_11);
17108  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17109  __pyx_r = __pyx_t_11;
17110  __pyx_t_11 = 0;
17111  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17112  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17113  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17114  goto __pyx_L7_except_return;
17115  }
17116  __pyx_L6_except_error:;
17117 
17118  /* "PyClical.pyx":1781
17119  * return clifford().wrap( glucat.atan(toClifford(obj), toClifford(i)) )
17120  * else:
17121  * try: # <<<<<<<<<<<<<<
17122  * return math.atan(obj)
17123  * except:
17124  */
17125  __Pyx_XGIVEREF(__pyx_t_6);
17126  __Pyx_XGIVEREF(__pyx_t_7);
17127  __Pyx_XGIVEREF(__pyx_t_8);
17128  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17129  goto __pyx_L1_error;
17130  __pyx_L8_try_return:;
17131  __Pyx_XGIVEREF(__pyx_t_6);
17132  __Pyx_XGIVEREF(__pyx_t_7);
17133  __Pyx_XGIVEREF(__pyx_t_8);
17134  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17135  goto __pyx_L0;
17136  __pyx_L7_except_return:;
17137  __Pyx_XGIVEREF(__pyx_t_6);
17138  __Pyx_XGIVEREF(__pyx_t_7);
17139  __Pyx_XGIVEREF(__pyx_t_8);
17140  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17141  goto __pyx_L0;
17142  }
17143  }
17144 
17145  /* "PyClical.pyx":1769
17146  * return clifford().wrap( glucat.tan(toClifford(obj)) )
17147  *
17148  * cpdef inline atan(obj,i = None): # <<<<<<<<<<<<<<
17149  * """
17150  * Inverse tangent of multivector with optional complexifier.
17151  */
17152 
17153  /* function exit code */
17154  __pyx_L1_error:;
17155  __Pyx_XDECREF(__pyx_t_3);
17156  __Pyx_XDECREF(__pyx_t_5);
17157  __Pyx_XDECREF(__pyx_t_9);
17158  __Pyx_XDECREF(__pyx_t_10);
17159  __Pyx_XDECREF(__pyx_t_11);
17160  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17161  __pyx_r = 0;
17162  __pyx_L0:;
17163  __Pyx_XGIVEREF(__pyx_r);
17164  __Pyx_RefNannyFinishContext();
17165  return __pyx_r;
17166  }
17167 
17168  /* Python wrapper */
17169  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17170  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 ";
17171  static PyObject *__pyx_pw_8PyClical_69atan(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17172  PyObject *__pyx_v_obj = 0;
17173  PyObject *__pyx_v_i = 0;
17174  PyObject *__pyx_r = 0;
17175  __Pyx_RefNannyDeclarations
17176  __Pyx_RefNannySetupContext("atan (wrapper)", 0);
17177  {
17178  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17179  PyObject* values[2] = {0,0};
17180  values[1] = ((PyObject *)Py_None);
17181  if (unlikely(__pyx_kwds)) {
17182  Py_ssize_t kw_args;
17183  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17184  switch (pos_args) {
17185  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17186  CYTHON_FALLTHROUGH;
17187  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17188  CYTHON_FALLTHROUGH;
17189  case 0: break;
17190  default: goto __pyx_L5_argtuple_error;
17191  }
17192  kw_args = PyDict_Size(__pyx_kwds);
17193  switch (pos_args) {
17194  case 0:
17195  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17196  else goto __pyx_L5_argtuple_error;
17197  CYTHON_FALLTHROUGH;
17198  case 1:
17199  if (kw_args > 0) {
17200  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17201  if (value) { values[1] = value; kw_args--; }
17202  }
17203  }
17204  if (unlikely(kw_args > 0)) {
17205  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atan") < 0)) __PYX_ERR(0, 1769, __pyx_L3_error)
17206  }
17207  } else {
17208  switch (PyTuple_GET_SIZE(__pyx_args)) {
17209  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17210  CYTHON_FALLTHROUGH;
17211  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17212  break;
17213  default: goto __pyx_L5_argtuple_error;
17214  }
17215  }
17216  __pyx_v_obj = values[0];
17217  __pyx_v_i = values[1];
17218  }
17219  goto __pyx_L4_argument_unpacking_done;
17220  __pyx_L5_argtuple_error:;
17221  __Pyx_RaiseArgtupleInvalid("atan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1769, __pyx_L3_error)
17222  __pyx_L3_error:;
17223  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17224  __Pyx_RefNannyFinishContext();
17225  return NULL;
17226  __pyx_L4_argument_unpacking_done:;
17227  __pyx_r = __pyx_pf_8PyClical_68atan(__pyx_self, __pyx_v_obj, __pyx_v_i);
17228 
17229  /* function exit code */
17230  __Pyx_RefNannyFinishContext();
17231  return __pyx_r;
17232  }
17233 
17234  static PyObject *__pyx_pf_8PyClical_68atan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17235  PyObject *__pyx_r = NULL;
17236  __Pyx_RefNannyDeclarations
17237  PyObject *__pyx_t_1 = NULL;
17238  struct __pyx_opt_args_8PyClical_atan __pyx_t_2;
17239  __Pyx_RefNannySetupContext("atan", 0);
17240  __Pyx_XDECREF(__pyx_r);
17241  __pyx_t_2.__pyx_n = 1;
17242  __pyx_t_2.i = __pyx_v_i;
17243  __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)
17244  __Pyx_GOTREF(__pyx_t_1);
17245  __pyx_r = __pyx_t_1;
17246  __pyx_t_1 = 0;
17247  goto __pyx_L0;
17248 
17249  /* function exit code */
17250  __pyx_L1_error:;
17251  __Pyx_XDECREF(__pyx_t_1);
17252  __Pyx_AddTraceback("PyClical.atan", __pyx_clineno, __pyx_lineno, __pyx_filename);
17253  __pyx_r = NULL;
17254  __pyx_L0:;
17255  __Pyx_XGIVEREF(__pyx_r);
17256  __Pyx_RefNannyFinishContext();
17257  return __pyx_r;
17258  }
17259 
17260  /* "PyClical.pyx":1786
17261  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17262  *
17263  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17264  * """
17265  * Hyperbolic tangent of multivector.
17266  */
17267 
17268  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17269  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_tanh(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
17270  PyObject *__pyx_r = NULL;
17271  __Pyx_RefNannyDeclarations
17272  PyObject *__pyx_t_1 = NULL;
17273  PyObject *__pyx_t_2 = NULL;
17274  PyObject *__pyx_t_3 = NULL;
17275  PyObject *__pyx_t_4 = NULL;
17276  PyObject *__pyx_t_5 = NULL;
17277  PyObject *__pyx_t_6 = NULL;
17278  PyObject *__pyx_t_7 = NULL;
17279  PyObject *__pyx_t_8 = NULL;
17280  __Pyx_RefNannySetupContext("tanh", 0);
17281 
17282  /* "PyClical.pyx":1793
17283  * {1,2}
17284  * """
17285  * try: # <<<<<<<<<<<<<<
17286  * return math.tanh(obj)
17287  * except:
17288  */
17289  {
17290  __Pyx_PyThreadState_declare
17291  __Pyx_PyThreadState_assign
17292  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
17293  __Pyx_XGOTREF(__pyx_t_1);
17294  __Pyx_XGOTREF(__pyx_t_2);
17295  __Pyx_XGOTREF(__pyx_t_3);
17296  /*try:*/ {
17297 
17298  /* "PyClical.pyx":1794
17299  * """
17300  * try:
17301  * return math.tanh(obj) # <<<<<<<<<<<<<<
17302  * except:
17303  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17304  */
17305  __Pyx_XDECREF(__pyx_r);
17306  __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L3_error)
17307  __Pyx_GOTREF(__pyx_t_5);
17308  __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)
17309  __Pyx_GOTREF(__pyx_t_6);
17310  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17311  __pyx_t_5 = NULL;
17312  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17313  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
17314  if (likely(__pyx_t_5)) {
17315  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17316  __Pyx_INCREF(__pyx_t_5);
17317  __Pyx_INCREF(function);
17318  __Pyx_DECREF_SET(__pyx_t_6, function);
17319  }
17320  }
17321  if (!__pyx_t_5) {
17322  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17323  __Pyx_GOTREF(__pyx_t_4);
17324  } else {
17325  #if CYTHON_FAST_PYCALL
17326  if (PyFunction_Check(__pyx_t_6)) {
17327  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17328  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17329  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17330  __Pyx_GOTREF(__pyx_t_4);
17331  } else
17332  #endif
17333  #if CYTHON_FAST_PYCCALL
17334  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17335  PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
17336  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17337  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17338  __Pyx_GOTREF(__pyx_t_4);
17339  } else
17340  #endif
17341  {
17342  __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1794, __pyx_L3_error)
17343  __Pyx_GOTREF(__pyx_t_7);
17344  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
17345  __Pyx_INCREF(__pyx_v_obj);
17346  __Pyx_GIVEREF(__pyx_v_obj);
17347  PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_obj);
17348  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L3_error)
17349  __Pyx_GOTREF(__pyx_t_4);
17350  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17351  }
17352  }
17353  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17354  __pyx_r = __pyx_t_4;
17355  __pyx_t_4 = 0;
17356  goto __pyx_L7_try_return;
17357 
17358  /* "PyClical.pyx":1793
17359  * {1,2}
17360  * """
17361  * try: # <<<<<<<<<<<<<<
17362  * return math.tanh(obj)
17363  * except:
17364  */
17365  }
17366  __pyx_L3_error:;
17367  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17368  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
17369  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
17370  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
17371 
17372  /* "PyClical.pyx":1795
17373  * try:
17374  * return math.tanh(obj)
17375  * except: # <<<<<<<<<<<<<<
17376  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17377  *
17378  */
17379  /*except:*/ {
17380  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17381  if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1795, __pyx_L5_except_error)
17382  __Pyx_GOTREF(__pyx_t_4);
17383  __Pyx_GOTREF(__pyx_t_6);
17384  __Pyx_GOTREF(__pyx_t_7);
17385 
17386  /* "PyClical.pyx":1796
17387  * return math.tanh(obj)
17388  * except:
17389  * return clifford().wrap( glucat.tanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17390  *
17391  * cpdef inline atanh(obj,i = None):
17392  */
17393  __Pyx_XDECREF(__pyx_r);
17394  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
17395  __Pyx_GOTREF(__pyx_t_5);
17396  __pyx_t_8 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_5), tanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1796, __pyx_L5_except_error)
17397  __Pyx_GOTREF(__pyx_t_8);
17398  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17399  __pyx_r = __pyx_t_8;
17400  __pyx_t_8 = 0;
17401  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17402  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17403  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17404  goto __pyx_L6_except_return;
17405  }
17406  __pyx_L5_except_error:;
17407 
17408  /* "PyClical.pyx":1793
17409  * {1,2}
17410  * """
17411  * try: # <<<<<<<<<<<<<<
17412  * return math.tanh(obj)
17413  * except:
17414  */
17415  __Pyx_XGIVEREF(__pyx_t_1);
17416  __Pyx_XGIVEREF(__pyx_t_2);
17417  __Pyx_XGIVEREF(__pyx_t_3);
17418  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17419  goto __pyx_L1_error;
17420  __pyx_L7_try_return:;
17421  __Pyx_XGIVEREF(__pyx_t_1);
17422  __Pyx_XGIVEREF(__pyx_t_2);
17423  __Pyx_XGIVEREF(__pyx_t_3);
17424  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17425  goto __pyx_L0;
17426  __pyx_L6_except_return:;
17427  __Pyx_XGIVEREF(__pyx_t_1);
17428  __Pyx_XGIVEREF(__pyx_t_2);
17429  __Pyx_XGIVEREF(__pyx_t_3);
17430  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
17431  goto __pyx_L0;
17432  }
17433 
17434  /* "PyClical.pyx":1786
17435  * return clifford().wrap( glucat.atan(toClifford(obj)) )
17436  *
17437  * cpdef inline tanh(obj): # <<<<<<<<<<<<<<
17438  * """
17439  * Hyperbolic tangent of multivector.
17440  */
17441 
17442  /* function exit code */
17443  __pyx_L1_error:;
17444  __Pyx_XDECREF(__pyx_t_4);
17445  __Pyx_XDECREF(__pyx_t_5);
17446  __Pyx_XDECREF(__pyx_t_6);
17447  __Pyx_XDECREF(__pyx_t_7);
17448  __Pyx_XDECREF(__pyx_t_8);
17449  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17450  __pyx_r = 0;
17451  __pyx_L0:;
17452  __Pyx_XGIVEREF(__pyx_r);
17453  __Pyx_RefNannyFinishContext();
17454  return __pyx_r;
17455  }
17456 
17457  /* Python wrapper */
17458  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
17459  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 ";
17460  static PyObject *__pyx_pw_8PyClical_71tanh(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17461  PyObject *__pyx_r = 0;
17462  __Pyx_RefNannyDeclarations
17463  __Pyx_RefNannySetupContext("tanh (wrapper)", 0);
17464  __pyx_r = __pyx_pf_8PyClical_70tanh(__pyx_self, ((PyObject *)__pyx_v_obj));
17465 
17466  /* function exit code */
17467  __Pyx_RefNannyFinishContext();
17468  return __pyx_r;
17469  }
17470 
17471  static PyObject *__pyx_pf_8PyClical_70tanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
17472  PyObject *__pyx_r = NULL;
17473  __Pyx_RefNannyDeclarations
17474  PyObject *__pyx_t_1 = NULL;
17475  __Pyx_RefNannySetupContext("tanh", 0);
17476  __Pyx_XDECREF(__pyx_r);
17477  __pyx_t_1 = __pyx_f_8PyClical_tanh(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error)
17478  __Pyx_GOTREF(__pyx_t_1);
17479  __pyx_r = __pyx_t_1;
17480  __pyx_t_1 = 0;
17481  goto __pyx_L0;
17482 
17483  /* function exit code */
17484  __pyx_L1_error:;
17485  __Pyx_XDECREF(__pyx_t_1);
17486  __Pyx_AddTraceback("PyClical.tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17487  __pyx_r = NULL;
17488  __pyx_L0:;
17489  __Pyx_XGIVEREF(__pyx_r);
17490  __Pyx_RefNannyFinishContext();
17491  return __pyx_r;
17492  }
17493 
17494  /* "PyClical.pyx":1798
17495  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17496  *
17497  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17498  * """
17499  * Inverse hyperbolic tangent of multivector with optional complexifier.
17500  */
17501 
17502  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17503  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) {
17504  PyObject *__pyx_v_i = ((PyObject *)Py_None);
17505  PyObject *__pyx_r = NULL;
17506  __Pyx_RefNannyDeclarations
17507  int __pyx_t_1;
17508  int __pyx_t_2;
17509  PyObject *__pyx_t_3 = NULL;
17510  Clifford __pyx_t_4;
17511  PyObject *__pyx_t_5 = NULL;
17512  PyObject *__pyx_t_6 = NULL;
17513  PyObject *__pyx_t_7 = NULL;
17514  PyObject *__pyx_t_8 = NULL;
17515  PyObject *__pyx_t_9 = NULL;
17516  PyObject *__pyx_t_10 = NULL;
17517  PyObject *__pyx_t_11 = NULL;
17518  __Pyx_RefNannySetupContext("atanh", 0);
17519  if (__pyx_optional_args) {
17520  if (__pyx_optional_args->__pyx_n > 0) {
17521  __pyx_v_i = __pyx_optional_args->i;
17522  }
17523  }
17524 
17525  /* "PyClical.pyx":1807
17526  * {1,2}
17527  * """
17528  * if not (i is None): # <<<<<<<<<<<<<<
17529  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17530  * else:
17531  */
17532  __pyx_t_1 = (__pyx_v_i != Py_None);
17533  __pyx_t_2 = (__pyx_t_1 != 0);
17534  if (__pyx_t_2) {
17535 
17536  /* "PyClical.pyx":1808
17537  * """
17538  * if not (i is None):
17539  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) ) # <<<<<<<<<<<<<<
17540  * else:
17541  * try:
17542  */
17543  __Pyx_XDECREF(__pyx_r);
17544  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error)
17545  __Pyx_GOTREF(__pyx_t_3);
17546  try {
17547  __pyx_t_4 = atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj), __pyx_f_8PyClical_toClifford(__pyx_v_i));
17548  } catch(...) {
17549  __Pyx_CppExn2PyErr();
17550  __PYX_ERR(0, 1808, __pyx_L1_error)
17551  }
17552  __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)
17553  __Pyx_GOTREF(__pyx_t_5);
17554  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17555  __pyx_r = __pyx_t_5;
17556  __pyx_t_5 = 0;
17557  goto __pyx_L0;
17558 
17559  /* "PyClical.pyx":1807
17560  * {1,2}
17561  * """
17562  * if not (i is None): # <<<<<<<<<<<<<<
17563  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17564  * else:
17565  */
17566  }
17567 
17568  /* "PyClical.pyx":1810
17569  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17570  * else:
17571  * try: # <<<<<<<<<<<<<<
17572  * return math.atanh(obj)
17573  * except:
17574  */
17575  /*else*/ {
17576  {
17577  __Pyx_PyThreadState_declare
17578  __Pyx_PyThreadState_assign
17579  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
17580  __Pyx_XGOTREF(__pyx_t_6);
17581  __Pyx_XGOTREF(__pyx_t_7);
17582  __Pyx_XGOTREF(__pyx_t_8);
17583  /*try:*/ {
17584 
17585  /* "PyClical.pyx":1811
17586  * else:
17587  * try:
17588  * return math.atanh(obj) # <<<<<<<<<<<<<<
17589  * except:
17590  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17591  */
17592  __Pyx_XDECREF(__pyx_r);
17593  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L4_error)
17594  __Pyx_GOTREF(__pyx_t_3);
17595  __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)
17596  __Pyx_GOTREF(__pyx_t_9);
17597  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17598  __pyx_t_3 = NULL;
17599  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
17600  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
17601  if (likely(__pyx_t_3)) {
17602  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
17603  __Pyx_INCREF(__pyx_t_3);
17604  __Pyx_INCREF(function);
17605  __Pyx_DECREF_SET(__pyx_t_9, function);
17606  }
17607  }
17608  if (!__pyx_t_3) {
17609  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17610  __Pyx_GOTREF(__pyx_t_5);
17611  } else {
17612  #if CYTHON_FAST_PYCALL
17613  if (PyFunction_Check(__pyx_t_9)) {
17614  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17615  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17616  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17617  __Pyx_GOTREF(__pyx_t_5);
17618  } else
17619  #endif
17620  #if CYTHON_FAST_PYCCALL
17621  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
17622  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_obj};
17623  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17624  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17625  __Pyx_GOTREF(__pyx_t_5);
17626  } else
17627  #endif
17628  {
17629  __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1811, __pyx_L4_error)
17630  __Pyx_GOTREF(__pyx_t_10);
17631  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
17632  __Pyx_INCREF(__pyx_v_obj);
17633  __Pyx_GIVEREF(__pyx_v_obj);
17634  PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_obj);
17635  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1811, __pyx_L4_error)
17636  __Pyx_GOTREF(__pyx_t_5);
17637  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17638  }
17639  }
17640  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17641  __pyx_r = __pyx_t_5;
17642  __pyx_t_5 = 0;
17643  goto __pyx_L8_try_return;
17644 
17645  /* "PyClical.pyx":1810
17646  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17647  * else:
17648  * try: # <<<<<<<<<<<<<<
17649  * return math.atanh(obj)
17650  * except:
17651  */
17652  }
17653  __pyx_L4_error:;
17654  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17655  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
17656  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17657  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
17658 
17659  /* "PyClical.pyx":1812
17660  * try:
17661  * return math.atanh(obj)
17662  * except: # <<<<<<<<<<<<<<
17663  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17664  *
17665  */
17666  /*except:*/ {
17667  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17668  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(0, 1812, __pyx_L6_except_error)
17669  __Pyx_GOTREF(__pyx_t_5);
17670  __Pyx_GOTREF(__pyx_t_9);
17671  __Pyx_GOTREF(__pyx_t_10);
17672 
17673  /* "PyClical.pyx":1813
17674  * return math.atanh(obj)
17675  * except:
17676  * return clifford().wrap( glucat.atanh(toClifford(obj)) ) # <<<<<<<<<<<<<<
17677  *
17678  * cpdef inline random_clifford(index_set ixt, fill = 1.0):
17679  */
17680  __Pyx_XDECREF(__pyx_r);
17681  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17682  __Pyx_GOTREF(__pyx_t_3);
17683  __pyx_t_11 = __pyx_f_8PyClical_8clifford_wrap(((struct __pyx_obj_8PyClical_clifford *)__pyx_t_3), atanh(__pyx_f_8PyClical_toClifford(__pyx_v_obj))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1813, __pyx_L6_except_error)
17684  __Pyx_GOTREF(__pyx_t_11);
17685  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17686  __pyx_r = __pyx_t_11;
17687  __pyx_t_11 = 0;
17688  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17689  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
17690  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
17691  goto __pyx_L7_except_return;
17692  }
17693  __pyx_L6_except_error:;
17694 
17695  /* "PyClical.pyx":1810
17696  * return clifford().wrap( glucat.atanh(toClifford(obj), toClifford(i)) )
17697  * else:
17698  * try: # <<<<<<<<<<<<<<
17699  * return math.atanh(obj)
17700  * except:
17701  */
17702  __Pyx_XGIVEREF(__pyx_t_6);
17703  __Pyx_XGIVEREF(__pyx_t_7);
17704  __Pyx_XGIVEREF(__pyx_t_8);
17705  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17706  goto __pyx_L1_error;
17707  __pyx_L8_try_return:;
17708  __Pyx_XGIVEREF(__pyx_t_6);
17709  __Pyx_XGIVEREF(__pyx_t_7);
17710  __Pyx_XGIVEREF(__pyx_t_8);
17711  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17712  goto __pyx_L0;
17713  __pyx_L7_except_return:;
17714  __Pyx_XGIVEREF(__pyx_t_6);
17715  __Pyx_XGIVEREF(__pyx_t_7);
17716  __Pyx_XGIVEREF(__pyx_t_8);
17717  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
17718  goto __pyx_L0;
17719  }
17720  }
17721 
17722  /* "PyClical.pyx":1798
17723  * return clifford().wrap( glucat.tanh(toClifford(obj)) )
17724  *
17725  * cpdef inline atanh(obj,i = None): # <<<<<<<<<<<<<<
17726  * """
17727  * Inverse hyperbolic tangent of multivector with optional complexifier.
17728  */
17729 
17730  /* function exit code */
17731  __pyx_L1_error:;
17732  __Pyx_XDECREF(__pyx_t_3);
17733  __Pyx_XDECREF(__pyx_t_5);
17734  __Pyx_XDECREF(__pyx_t_9);
17735  __Pyx_XDECREF(__pyx_t_10);
17736  __Pyx_XDECREF(__pyx_t_11);
17737  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17738  __pyx_r = 0;
17739  __pyx_L0:;
17740  __Pyx_XGIVEREF(__pyx_r);
17741  __Pyx_RefNannyFinishContext();
17742  return __pyx_r;
17743  }
17744 
17745  /* Python wrapper */
17746  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17747  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 ";
17748  static PyObject *__pyx_pw_8PyClical_73atanh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17749  PyObject *__pyx_v_obj = 0;
17750  PyObject *__pyx_v_i = 0;
17751  PyObject *__pyx_r = 0;
17752  __Pyx_RefNannyDeclarations
17753  __Pyx_RefNannySetupContext("atanh (wrapper)", 0);
17754  {
17755  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_i,0};
17756  PyObject* values[2] = {0,0};
17757  values[1] = ((PyObject *)Py_None);
17758  if (unlikely(__pyx_kwds)) {
17759  Py_ssize_t kw_args;
17760  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17761  switch (pos_args) {
17762  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17763  CYTHON_FALLTHROUGH;
17764  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17765  CYTHON_FALLTHROUGH;
17766  case 0: break;
17767  default: goto __pyx_L5_argtuple_error;
17768  }
17769  kw_args = PyDict_Size(__pyx_kwds);
17770  switch (pos_args) {
17771  case 0:
17772  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
17773  else goto __pyx_L5_argtuple_error;
17774  CYTHON_FALLTHROUGH;
17775  case 1:
17776  if (kw_args > 0) {
17777  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
17778  if (value) { values[1] = value; kw_args--; }
17779  }
17780  }
17781  if (unlikely(kw_args > 0)) {
17782  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "atanh") < 0)) __PYX_ERR(0, 1798, __pyx_L3_error)
17783  }
17784  } else {
17785  switch (PyTuple_GET_SIZE(__pyx_args)) {
17786  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17787  CYTHON_FALLTHROUGH;
17788  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17789  break;
17790  default: goto __pyx_L5_argtuple_error;
17791  }
17792  }
17793  __pyx_v_obj = values[0];
17794  __pyx_v_i = values[1];
17795  }
17796  goto __pyx_L4_argument_unpacking_done;
17797  __pyx_L5_argtuple_error:;
17798  __Pyx_RaiseArgtupleInvalid("atanh", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1798, __pyx_L3_error)
17799  __pyx_L3_error:;
17800  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17801  __Pyx_RefNannyFinishContext();
17802  return NULL;
17803  __pyx_L4_argument_unpacking_done:;
17804  __pyx_r = __pyx_pf_8PyClical_72atanh(__pyx_self, __pyx_v_obj, __pyx_v_i);
17805 
17806  /* function exit code */
17807  __Pyx_RefNannyFinishContext();
17808  return __pyx_r;
17809  }
17810 
17811  static PyObject *__pyx_pf_8PyClical_72atanh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_i) {
17812  PyObject *__pyx_r = NULL;
17813  __Pyx_RefNannyDeclarations
17814  PyObject *__pyx_t_1 = NULL;
17815  struct __pyx_opt_args_8PyClical_atanh __pyx_t_2;
17816  __Pyx_RefNannySetupContext("atanh", 0);
17817  __Pyx_XDECREF(__pyx_r);
17818  __pyx_t_2.__pyx_n = 1;
17819  __pyx_t_2.i = __pyx_v_i;
17820  __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)
17821  __Pyx_GOTREF(__pyx_t_1);
17822  __pyx_r = __pyx_t_1;
17823  __pyx_t_1 = 0;
17824  goto __pyx_L0;
17825 
17826  /* function exit code */
17827  __pyx_L1_error:;
17828  __Pyx_XDECREF(__pyx_t_1);
17829  __Pyx_AddTraceback("PyClical.atanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17830  __pyx_r = NULL;
17831  __pyx_L0:;
17832  __Pyx_XGIVEREF(__pyx_r);
17833  __Pyx_RefNannyFinishContext();
17834  return __pyx_r;
17835  }
17836 
17837  /* "PyClical.pyx":1815
17838  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17839  *
17840  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17841  * """
17842  * Random multivector within a frame.
17843  */
17844 
17845  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17846  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) {
17847  PyObject *__pyx_v_fill = ((PyObject *)__pyx_float_1_0);
17848  PyObject *__pyx_r = NULL;
17849  __Pyx_RefNannyDeclarations
17850  PyObject *__pyx_t_1 = NULL;
17851  PyObject *__pyx_t_2 = NULL;
17852  scalar_t __pyx_t_3;
17853  PyObject *__pyx_t_4 = NULL;
17854  __Pyx_RefNannySetupContext("random_clifford", 0);
17855  if (__pyx_optional_args) {
17856  if (__pyx_optional_args->__pyx_n > 0) {
17857  __pyx_v_fill = __pyx_optional_args->fill;
17858  }
17859  }
17860 
17861  /* "PyClical.pyx":1822
17862  * {-3,-1,2}
17863  * """
17864  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) ) # <<<<<<<<<<<<<<
17865  *
17866  * cpdef inline cga3(obj):
17867  */
17868  __Pyx_XDECREF(__pyx_r);
17869  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
17870  __Pyx_GOTREF(__pyx_t_1);
17871  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
17872  __Pyx_GOTREF(__pyx_t_2);
17873  __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)
17874  __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)
17875  __Pyx_GOTREF(__pyx_t_4);
17876  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17877  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17878  __pyx_r = __pyx_t_4;
17879  __pyx_t_4 = 0;
17880  goto __pyx_L0;
17881 
17882  /* "PyClical.pyx":1815
17883  * return clifford().wrap( glucat.atanh(toClifford(obj)) )
17884  *
17885  * cpdef inline random_clifford(index_set ixt, fill = 1.0): # <<<<<<<<<<<<<<
17886  * """
17887  * Random multivector within a frame.
17888  */
17889 
17890  /* function exit code */
17891  __pyx_L1_error:;
17892  __Pyx_XDECREF(__pyx_t_1);
17893  __Pyx_XDECREF(__pyx_t_2);
17894  __Pyx_XDECREF(__pyx_t_4);
17895  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17896  __pyx_r = 0;
17897  __pyx_L0:;
17898  __Pyx_XGIVEREF(__pyx_r);
17899  __Pyx_RefNannyFinishContext();
17900  return __pyx_r;
17901  }
17902 
17903  /* Python wrapper */
17904  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17905  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 ";
17906  static PyObject *__pyx_pw_8PyClical_75random_clifford(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17907  struct __pyx_obj_8PyClical_index_set *__pyx_v_ixt = 0;
17908  PyObject *__pyx_v_fill = 0;
17909  PyObject *__pyx_r = 0;
17910  __Pyx_RefNannyDeclarations
17911  __Pyx_RefNannySetupContext("random_clifford (wrapper)", 0);
17912  {
17913  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ixt,&__pyx_n_s_fill,0};
17914  PyObject* values[2] = {0,0};
17915  values[1] = ((PyObject *)__pyx_float_1_0);
17916  if (unlikely(__pyx_kwds)) {
17917  Py_ssize_t kw_args;
17918  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17919  switch (pos_args) {
17920  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17921  CYTHON_FALLTHROUGH;
17922  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17923  CYTHON_FALLTHROUGH;
17924  case 0: break;
17925  default: goto __pyx_L5_argtuple_error;
17926  }
17927  kw_args = PyDict_Size(__pyx_kwds);
17928  switch (pos_args) {
17929  case 0:
17930  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ixt)) != 0)) kw_args--;
17931  else goto __pyx_L5_argtuple_error;
17932  CYTHON_FALLTHROUGH;
17933  case 1:
17934  if (kw_args > 0) {
17935  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fill);
17936  if (value) { values[1] = value; kw_args--; }
17937  }
17938  }
17939  if (unlikely(kw_args > 0)) {
17940  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_clifford") < 0)) __PYX_ERR(0, 1815, __pyx_L3_error)
17941  }
17942  } else {
17943  switch (PyTuple_GET_SIZE(__pyx_args)) {
17944  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17945  CYTHON_FALLTHROUGH;
17946  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17947  break;
17948  default: goto __pyx_L5_argtuple_error;
17949  }
17950  }
17951  __pyx_v_ixt = ((struct __pyx_obj_8PyClical_index_set *)values[0]);
17952  __pyx_v_fill = values[1];
17953  }
17954  goto __pyx_L4_argument_unpacking_done;
17955  __pyx_L5_argtuple_error:;
17956  __Pyx_RaiseArgtupleInvalid("random_clifford", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1815, __pyx_L3_error)
17957  __pyx_L3_error:;
17958  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17959  __Pyx_RefNannyFinishContext();
17960  return NULL;
17961  __pyx_L4_argument_unpacking_done:;
17962  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ixt), __pyx_ptype_8PyClical_index_set, 1, "ixt", 0))) __PYX_ERR(0, 1815, __pyx_L1_error)
17963  __pyx_r = __pyx_pf_8PyClical_74random_clifford(__pyx_self, __pyx_v_ixt, __pyx_v_fill);
17964 
17965  /* function exit code */
17966  goto __pyx_L0;
17967  __pyx_L1_error:;
17968  __pyx_r = NULL;
17969  __pyx_L0:;
17970  __Pyx_RefNannyFinishContext();
17971  return __pyx_r;
17972  }
17973 
17974  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) {
17975  PyObject *__pyx_r = NULL;
17976  __Pyx_RefNannyDeclarations
17977  PyObject *__pyx_t_1 = NULL;
17978  struct __pyx_opt_args_8PyClical_random_clifford __pyx_t_2;
17979  __Pyx_RefNannySetupContext("random_clifford", 0);
17980  __Pyx_XDECREF(__pyx_r);
17981  __pyx_t_2.__pyx_n = 1;
17982  __pyx_t_2.fill = __pyx_v_fill;
17983  __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)
17984  __Pyx_GOTREF(__pyx_t_1);
17985  __pyx_r = __pyx_t_1;
17986  __pyx_t_1 = 0;
17987  goto __pyx_L0;
17988 
17989  /* function exit code */
17990  __pyx_L1_error:;
17991  __Pyx_XDECREF(__pyx_t_1);
17992  __Pyx_AddTraceback("PyClical.random_clifford", __pyx_clineno, __pyx_lineno, __pyx_filename);
17993  __pyx_r = NULL;
17994  __pyx_L0:;
17995  __Pyx_XGIVEREF(__pyx_r);
17996  __Pyx_RefNannyFinishContext();
17997  return __pyx_r;
17998  }
17999 
18000  /* "PyClical.pyx":1824
18001  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18002  *
18003  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18004  * """
18005  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18006  */
18007 
18008  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18009  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18010  PyObject *__pyx_r = NULL;
18011  __Pyx_RefNannyDeclarations
18012  PyObject *__pyx_t_1 = NULL;
18013  PyObject *__pyx_t_2 = NULL;
18014  __Pyx_RefNannySetupContext("cga3", 0);
18015 
18016  /* "PyClical.pyx":1831
18017  * 87{-1}+4{1}+18{2}+2{3}+85{4}
18018  * """
18019  * return clifford().wrap( glucat.cga3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18020  *
18021  * cpdef inline cga3std(obj):
18022  */
18023  __Pyx_XDECREF(__pyx_r);
18024  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
18025  __Pyx_GOTREF(__pyx_t_1);
18026  __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)
18027  __Pyx_GOTREF(__pyx_t_2);
18028  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18029  __pyx_r = __pyx_t_2;
18030  __pyx_t_2 = 0;
18031  goto __pyx_L0;
18032 
18033  /* "PyClical.pyx":1824
18034  * return clifford().wrap( clifford().instance.random(ixt.unwrap(), <scalar_t>fill) )
18035  *
18036  * cpdef inline cga3(obj): # <<<<<<<<<<<<<<
18037  * """
18038  * Convert Euclidean 3D multivector to Conformal Geometric Algebra using Doran and Lasenby definition.
18039  */
18040 
18041  /* function exit code */
18042  __pyx_L1_error:;
18043  __Pyx_XDECREF(__pyx_t_1);
18044  __Pyx_XDECREF(__pyx_t_2);
18045  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18046  __pyx_r = 0;
18047  __pyx_L0:;
18048  __Pyx_XGIVEREF(__pyx_r);
18049  __Pyx_RefNannyFinishContext();
18050  return __pyx_r;
18051  }
18052 
18053  /* Python wrapper */
18054  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18055  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 ";
18056  static PyObject *__pyx_pw_8PyClical_77cga3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18057  PyObject *__pyx_r = 0;
18058  __Pyx_RefNannyDeclarations
18059  __Pyx_RefNannySetupContext("cga3 (wrapper)", 0);
18060  __pyx_r = __pyx_pf_8PyClical_76cga3(__pyx_self, ((PyObject *)__pyx_v_obj));
18061 
18062  /* function exit code */
18063  __Pyx_RefNannyFinishContext();
18064  return __pyx_r;
18065  }
18066 
18067  static PyObject *__pyx_pf_8PyClical_76cga3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18068  PyObject *__pyx_r = NULL;
18069  __Pyx_RefNannyDeclarations
18070  PyObject *__pyx_t_1 = NULL;
18071  __Pyx_RefNannySetupContext("cga3", 0);
18072  __Pyx_XDECREF(__pyx_r);
18073  __pyx_t_1 = __pyx_f_8PyClical_cga3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
18074  __Pyx_GOTREF(__pyx_t_1);
18075  __pyx_r = __pyx_t_1;
18076  __pyx_t_1 = 0;
18077  goto __pyx_L0;
18078 
18079  /* function exit code */
18080  __pyx_L1_error:;
18081  __Pyx_XDECREF(__pyx_t_1);
18082  __Pyx_AddTraceback("PyClical.cga3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18083  __pyx_r = NULL;
18084  __pyx_L0:;
18085  __Pyx_XGIVEREF(__pyx_r);
18086  __Pyx_RefNannyFinishContext();
18087  return __pyx_r;
18088  }
18089 
18090  /* "PyClical.pyx":1833
18091  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18092  *
18093  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18094  * """
18095  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18096  */
18097 
18098  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18099  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_cga3std(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18100  PyObject *__pyx_r = NULL;
18101  __Pyx_RefNannyDeclarations
18102  PyObject *__pyx_t_1 = NULL;
18103  PyObject *__pyx_t_2 = NULL;
18104  __Pyx_RefNannySetupContext("cga3std", 0);
18105 
18106  /* "PyClical.pyx":1842
18107  * 0
18108  * """
18109  * return clifford().wrap( glucat.cga3std(toClifford(obj)) ) # <<<<<<<<<<<<<<
18110  *
18111  * cpdef inline agc3(obj):
18112  */
18113  __Pyx_XDECREF(__pyx_r);
18114  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
18115  __Pyx_GOTREF(__pyx_t_1);
18116  __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)
18117  __Pyx_GOTREF(__pyx_t_2);
18118  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18119  __pyx_r = __pyx_t_2;
18120  __pyx_t_2 = 0;
18121  goto __pyx_L0;
18122 
18123  /* "PyClical.pyx":1833
18124  * return clifford().wrap( glucat.cga3(toClifford(obj)) )
18125  *
18126  * cpdef inline cga3std(obj): # <<<<<<<<<<<<<<
18127  * """
18128  * Convert CGA3 null vector to standard conformal null vector using Doran and Lasenby definition.
18129  */
18130 
18131  /* function exit code */
18132  __pyx_L1_error:;
18133  __Pyx_XDECREF(__pyx_t_1);
18134  __Pyx_XDECREF(__pyx_t_2);
18135  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18136  __pyx_r = 0;
18137  __pyx_L0:;
18138  __Pyx_XGIVEREF(__pyx_r);
18139  __Pyx_RefNannyFinishContext();
18140  return __pyx_r;
18141  }
18142 
18143  /* Python wrapper */
18144  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18145  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 ";
18146  static PyObject *__pyx_pw_8PyClical_79cga3std(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18147  PyObject *__pyx_r = 0;
18148  __Pyx_RefNannyDeclarations
18149  __Pyx_RefNannySetupContext("cga3std (wrapper)", 0);
18150  __pyx_r = __pyx_pf_8PyClical_78cga3std(__pyx_self, ((PyObject *)__pyx_v_obj));
18151 
18152  /* function exit code */
18153  __Pyx_RefNannyFinishContext();
18154  return __pyx_r;
18155  }
18156 
18157  static PyObject *__pyx_pf_8PyClical_78cga3std(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18158  PyObject *__pyx_r = NULL;
18159  __Pyx_RefNannyDeclarations
18160  PyObject *__pyx_t_1 = NULL;
18161  __Pyx_RefNannySetupContext("cga3std", 0);
18162  __Pyx_XDECREF(__pyx_r);
18163  __pyx_t_1 = __pyx_f_8PyClical_cga3std(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1833, __pyx_L1_error)
18164  __Pyx_GOTREF(__pyx_t_1);
18165  __pyx_r = __pyx_t_1;
18166  __pyx_t_1 = 0;
18167  goto __pyx_L0;
18168 
18169  /* function exit code */
18170  __pyx_L1_error:;
18171  __Pyx_XDECREF(__pyx_t_1);
18172  __Pyx_AddTraceback("PyClical.cga3std", __pyx_clineno, __pyx_lineno, __pyx_filename);
18173  __pyx_r = NULL;
18174  __pyx_L0:;
18175  __Pyx_XGIVEREF(__pyx_r);
18176  __Pyx_RefNannyFinishContext();
18177  return __pyx_r;
18178  }
18179 
18180  /* "PyClical.pyx":1844
18181  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18182  *
18183  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18184  * """
18185  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18186  */
18187 
18188  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18189  static CYTHON_INLINE PyObject *__pyx_f_8PyClical_agc3(PyObject *__pyx_v_obj, CYTHON_UNUSED int __pyx_skip_dispatch) {
18190  PyObject *__pyx_r = NULL;
18191  __Pyx_RefNannyDeclarations
18192  PyObject *__pyx_t_1 = NULL;
18193  PyObject *__pyx_t_2 = NULL;
18194  __Pyx_RefNannySetupContext("agc3", 0);
18195 
18196  /* "PyClical.pyx":1853
18197  * 0
18198  * """
18199  * return clifford().wrap( glucat.agc3(toClifford(obj)) ) # <<<<<<<<<<<<<<
18200  *
18201  * # Some abbreviations.
18202  */
18203  __Pyx_XDECREF(__pyx_r);
18204  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8PyClical_clifford)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error)
18205  __Pyx_GOTREF(__pyx_t_1);
18206  __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)
18207  __Pyx_GOTREF(__pyx_t_2);
18208  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18209  __pyx_r = __pyx_t_2;
18210  __pyx_t_2 = 0;
18211  goto __pyx_L0;
18212 
18213  /* "PyClical.pyx":1844
18214  * return clifford().wrap( glucat.cga3std(toClifford(obj)) )
18215  *
18216  * cpdef inline agc3(obj): # <<<<<<<<<<<<<<
18217  * """
18218  * Convert CGA3 null vector to Euclidean 3D vector using Doran and Lasenby definition.
18219  */
18220 
18221  /* function exit code */
18222  __pyx_L1_error:;
18223  __Pyx_XDECREF(__pyx_t_1);
18224  __Pyx_XDECREF(__pyx_t_2);
18225  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18226  __pyx_r = 0;
18227  __pyx_L0:;
18228  __Pyx_XGIVEREF(__pyx_r);
18229  __Pyx_RefNannyFinishContext();
18230  return __pyx_r;
18231  }
18232 
18233  /* Python wrapper */
18234  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18235  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 ";
18236  static PyObject *__pyx_pw_8PyClical_81agc3(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18237  PyObject *__pyx_r = 0;
18238  __Pyx_RefNannyDeclarations
18239  __Pyx_RefNannySetupContext("agc3 (wrapper)", 0);
18240  __pyx_r = __pyx_pf_8PyClical_80agc3(__pyx_self, ((PyObject *)__pyx_v_obj));
18241 
18242  /* function exit code */
18243  __Pyx_RefNannyFinishContext();
18244  return __pyx_r;
18245  }
18246 
18247  static PyObject *__pyx_pf_8PyClical_80agc3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18248  PyObject *__pyx_r = NULL;
18249  __Pyx_RefNannyDeclarations
18250  PyObject *__pyx_t_1 = NULL;
18251  __Pyx_RefNannySetupContext("agc3", 0);
18252  __Pyx_XDECREF(__pyx_r);
18253  __pyx_t_1 = __pyx_f_8PyClical_agc3(__pyx_v_obj, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
18254  __Pyx_GOTREF(__pyx_t_1);
18255  __pyx_r = __pyx_t_1;
18256  __pyx_t_1 = 0;
18257  goto __pyx_L0;
18258 
18259  /* function exit code */
18260  __pyx_L1_error:;
18261  __Pyx_XDECREF(__pyx_t_1);
18262  __Pyx_AddTraceback("PyClical.agc3", __pyx_clineno, __pyx_lineno, __pyx_filename);
18263  __pyx_r = NULL;
18264  __pyx_L0:;
18265  __Pyx_XGIVEREF(__pyx_r);
18266  __Pyx_RefNannyFinishContext();
18267  return __pyx_r;
18268  }
18269 
18270  /* "PyClical.pyx":1887
18271  * """
18272  *
18273  * def e(obj): # <<<<<<<<<<<<<<
18274  * """
18275  * Abbreviation for clifford(index_set(obj)).
18276  */
18277 
18278  /* Python wrapper */
18279  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
18280  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 ";
18281  static PyMethodDef __pyx_mdef_8PyClical_83e = {"e", (PyCFunction)__pyx_pw_8PyClical_83e, METH_O, __pyx_doc_8PyClical_82e};
18282  static PyObject *__pyx_pw_8PyClical_83e(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18283  PyObject *__pyx_r = 0;
18284  __Pyx_RefNannyDeclarations
18285  __Pyx_RefNannySetupContext("e (wrapper)", 0);
18286  __pyx_r = __pyx_pf_8PyClical_82e(__pyx_self, ((PyObject *)__pyx_v_obj));
18287 
18288  /* function exit code */
18289  __Pyx_RefNannyFinishContext();
18290  return __pyx_r;
18291  }
18292 
18293  static PyObject *__pyx_pf_8PyClical_82e(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
18294  PyObject *__pyx_r = NULL;
18295  __Pyx_RefNannyDeclarations
18296  PyObject *__pyx_t_1 = NULL;
18297  PyObject *__pyx_t_2 = NULL;
18298  __Pyx_RefNannySetupContext("e", 0);
18299 
18300  /* "PyClical.pyx":1898
18301  * 1
18302  * """
18303  * return clifford(index_set(obj)) # <<<<<<<<<<<<<<
18304  *
18305  * def istpq(p, q):
18306  */
18307  __Pyx_XDECREF(__pyx_r);
18308  __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)
18309  __Pyx_GOTREF(__pyx_t_1);
18310  __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)
18311  __Pyx_GOTREF(__pyx_t_2);
18312  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18313  __pyx_r = __pyx_t_2;
18314  __pyx_t_2 = 0;
18315  goto __pyx_L0;
18316 
18317  /* "PyClical.pyx":1887
18318  * """
18319  *
18320  * def e(obj): # <<<<<<<<<<<<<<
18321  * """
18322  * Abbreviation for clifford(index_set(obj)).
18323  */
18324 
18325  /* function exit code */
18326  __pyx_L1_error:;
18327  __Pyx_XDECREF(__pyx_t_1);
18328  __Pyx_XDECREF(__pyx_t_2);
18329  __Pyx_AddTraceback("PyClical.e", __pyx_clineno, __pyx_lineno, __pyx_filename);
18330  __pyx_r = NULL;
18331  __pyx_L0:;
18332  __Pyx_XGIVEREF(__pyx_r);
18333  __Pyx_RefNannyFinishContext();
18334  return __pyx_r;
18335  }
18336 
18337  /* "PyClical.pyx":1900
18338  * return clifford(index_set(obj))
18339  *
18340  * def istpq(p, q): # <<<<<<<<<<<<<<
18341  * """
18342  * Abbreviation for index_set({-q,...p}).
18343  */
18344 
18345  /* Python wrapper */
18346  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18347  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 ";
18348  static PyMethodDef __pyx_mdef_8PyClical_85istpq = {"istpq", (PyCFunction)__pyx_pw_8PyClical_85istpq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_84istpq};
18349  static PyObject *__pyx_pw_8PyClical_85istpq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18350  PyObject *__pyx_v_p = 0;
18351  PyObject *__pyx_v_q = 0;
18352  PyObject *__pyx_r = 0;
18353  __Pyx_RefNannyDeclarations
18354  __Pyx_RefNannySetupContext("istpq (wrapper)", 0);
18355  {
18356  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_q,0};
18357  PyObject* values[2] = {0,0};
18358  if (unlikely(__pyx_kwds)) {
18359  Py_ssize_t kw_args;
18360  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18361  switch (pos_args) {
18362  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18363  CYTHON_FALLTHROUGH;
18364  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18365  CYTHON_FALLTHROUGH;
18366  case 0: break;
18367  default: goto __pyx_L5_argtuple_error;
18368  }
18369  kw_args = PyDict_Size(__pyx_kwds);
18370  switch (pos_args) {
18371  case 0:
18372  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--;
18373  else goto __pyx_L5_argtuple_error;
18374  CYTHON_FALLTHROUGH;
18375  case 1:
18376  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_q)) != 0)) kw_args--;
18377  else {
18378  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, 1); __PYX_ERR(0, 1900, __pyx_L3_error)
18379  }
18380  }
18381  if (unlikely(kw_args > 0)) {
18382  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "istpq") < 0)) __PYX_ERR(0, 1900, __pyx_L3_error)
18383  }
18384  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18385  goto __pyx_L5_argtuple_error;
18386  } else {
18387  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18388  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18389  }
18390  __pyx_v_p = values[0];
18391  __pyx_v_q = values[1];
18392  }
18393  goto __pyx_L4_argument_unpacking_done;
18394  __pyx_L5_argtuple_error:;
18395  __Pyx_RaiseArgtupleInvalid("istpq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1900, __pyx_L3_error)
18396  __pyx_L3_error:;
18397  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18398  __Pyx_RefNannyFinishContext();
18399  return NULL;
18400  __pyx_L4_argument_unpacking_done:;
18401  __pyx_r = __pyx_pf_8PyClical_84istpq(__pyx_self, __pyx_v_p, __pyx_v_q);
18402 
18403  /* function exit code */
18404  __Pyx_RefNannyFinishContext();
18405  return __pyx_r;
18406  }
18407 
18408  static PyObject *__pyx_pf_8PyClical_84istpq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_p, PyObject *__pyx_v_q) {
18409  PyObject *__pyx_r = NULL;
18410  __Pyx_RefNannyDeclarations
18411  PyObject *__pyx_t_1 = NULL;
18412  PyObject *__pyx_t_2 = NULL;
18413  PyObject *__pyx_t_3 = NULL;
18414  __Pyx_RefNannySetupContext("istpq", 0);
18415 
18416  /* "PyClical.pyx":1907
18417  * {-3,-2,-1,1,2}
18418  * """
18419  * return index_set(set(range(-q,p+1))) # <<<<<<<<<<<<<<
18420  *
18421  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
18422  */
18423  __Pyx_XDECREF(__pyx_r);
18424  __pyx_t_1 = PyNumber_Negative(__pyx_v_q); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __pyx_L1_error)
18425  __Pyx_GOTREF(__pyx_t_1);
18426  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_p, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1907, __pyx_L1_error)
18427  __Pyx_GOTREF(__pyx_t_2);
18428  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18429  __Pyx_GOTREF(__pyx_t_3);
18430  __Pyx_GIVEREF(__pyx_t_1);
18431  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
18432  __Pyx_GIVEREF(__pyx_t_2);
18433  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
18434  __pyx_t_1 = 0;
18435  __pyx_t_2 = 0;
18436  __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)
18437  __Pyx_GOTREF(__pyx_t_2);
18438  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18439  __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error)
18440  __Pyx_GOTREF(__pyx_t_3);
18441  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18442  __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)
18443  __Pyx_GOTREF(__pyx_t_2);
18444  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18445  __pyx_r = __pyx_t_2;
18446  __pyx_t_2 = 0;
18447  goto __pyx_L0;
18448 
18449  /* "PyClical.pyx":1900
18450  * return clifford(index_set(obj))
18451  *
18452  * def istpq(p, q): # <<<<<<<<<<<<<<
18453  * """
18454  * Abbreviation for index_set({-q,...p}).
18455  */
18456 
18457  /* function exit code */
18458  __pyx_L1_error:;
18459  __Pyx_XDECREF(__pyx_t_1);
18460  __Pyx_XDECREF(__pyx_t_2);
18461  __Pyx_XDECREF(__pyx_t_3);
18462  __Pyx_AddTraceback("PyClical.istpq", __pyx_clineno, __pyx_lineno, __pyx_filename);
18463  __pyx_r = NULL;
18464  __pyx_L0:;
18465  __Pyx_XGIVEREF(__pyx_r);
18466  __Pyx_RefNannyFinishContext();
18467  return __pyx_r;
18468  }
18469 
18470  /* "PyClical.pyx":1913
18471  *
18472  * # Doctest interface.
18473  * def _test(): # <<<<<<<<<<<<<<
18474  * import PyClical, doctest
18475  * return doctest.testmod(PyClical)
18476  */
18477 
18478  /* Python wrapper */
18479  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18480  static PyMethodDef __pyx_mdef_8PyClical_87_test = {"_test", (PyCFunction)__pyx_pw_8PyClical_87_test, METH_NOARGS, 0};
18481  static PyObject *__pyx_pw_8PyClical_87_test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
18482  PyObject *__pyx_r = 0;
18483  __Pyx_RefNannyDeclarations
18484  __Pyx_RefNannySetupContext("_test (wrapper)", 0);
18485  __pyx_r = __pyx_pf_8PyClical_86_test(__pyx_self);
18486 
18487  /* function exit code */
18488  __Pyx_RefNannyFinishContext();
18489  return __pyx_r;
18490  }
18491 
18492  static PyObject *__pyx_pf_8PyClical_86_test(CYTHON_UNUSED PyObject *__pyx_self) {
18493  PyObject *__pyx_v_PyClical = NULL;
18494  PyObject *__pyx_v_doctest = NULL;
18495  PyObject *__pyx_r = NULL;
18496  __Pyx_RefNannyDeclarations
18497  PyObject *__pyx_t_1 = NULL;
18498  PyObject *__pyx_t_2 = NULL;
18499  PyObject *__pyx_t_3 = NULL;
18500  PyObject *__pyx_t_4 = NULL;
18501  __Pyx_RefNannySetupContext("_test", 0);
18502 
18503  /* "PyClical.pyx":1914
18504  * # Doctest interface.
18505  * def _test():
18506  * import PyClical, doctest # <<<<<<<<<<<<<<
18507  * return doctest.testmod(PyClical)
18508  *
18509  */
18510  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PyClical, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18511  __Pyx_GOTREF(__pyx_t_1);
18512  __pyx_v_PyClical = __pyx_t_1;
18513  __pyx_t_1 = 0;
18514  __pyx_t_1 = __Pyx_Import(__pyx_n_s_doctest, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1914, __pyx_L1_error)
18515  __Pyx_GOTREF(__pyx_t_1);
18516  __pyx_v_doctest = __pyx_t_1;
18517  __pyx_t_1 = 0;
18518 
18519  /* "PyClical.pyx":1915
18520  * def _test():
18521  * import PyClical, doctest
18522  * return doctest.testmod(PyClical) # <<<<<<<<<<<<<<
18523  *
18524  * if __name__ == "__main__":
18525  */
18526  __Pyx_XDECREF(__pyx_r);
18527  __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)
18528  __Pyx_GOTREF(__pyx_t_2);
18529  __pyx_t_3 = NULL;
18530  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18531  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18532  if (likely(__pyx_t_3)) {
18533  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18534  __Pyx_INCREF(__pyx_t_3);
18535  __Pyx_INCREF(function);
18536  __Pyx_DECREF_SET(__pyx_t_2, function);
18537  }
18538  }
18539  if (!__pyx_t_3) {
18540  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_PyClical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18541  __Pyx_GOTREF(__pyx_t_1);
18542  } else {
18543  #if CYTHON_FAST_PYCALL
18544  if (PyFunction_Check(__pyx_t_2)) {
18545  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18546  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18547  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18548  __Pyx_GOTREF(__pyx_t_1);
18549  } else
18550  #endif
18551  #if CYTHON_FAST_PYCCALL
18552  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
18553  PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_PyClical};
18554  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18555  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18556  __Pyx_GOTREF(__pyx_t_1);
18557  } else
18558  #endif
18559  {
18560  __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error)
18561  __Pyx_GOTREF(__pyx_t_4);
18562  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
18563  __Pyx_INCREF(__pyx_v_PyClical);
18564  __Pyx_GIVEREF(__pyx_v_PyClical);
18565  PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_PyClical);
18566  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
18567  __Pyx_GOTREF(__pyx_t_1);
18568  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18569  }
18570  }
18571  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18572  __pyx_r = __pyx_t_1;
18573  __pyx_t_1 = 0;
18574  goto __pyx_L0;
18575 
18576  /* "PyClical.pyx":1913
18577  *
18578  * # Doctest interface.
18579  * def _test(): # <<<<<<<<<<<<<<
18580  * import PyClical, doctest
18581  * return doctest.testmod(PyClical)
18582  */
18583 
18584  /* function exit code */
18585  __pyx_L1_error:;
18586  __Pyx_XDECREF(__pyx_t_1);
18587  __Pyx_XDECREF(__pyx_t_2);
18588  __Pyx_XDECREF(__pyx_t_3);
18589  __Pyx_XDECREF(__pyx_t_4);
18590  __Pyx_AddTraceback("PyClical._test", __pyx_clineno, __pyx_lineno, __pyx_filename);
18591  __pyx_r = NULL;
18592  __pyx_L0:;
18593  __Pyx_XDECREF(__pyx_v_PyClical);
18594  __Pyx_XDECREF(__pyx_v_doctest);
18595  __Pyx_XGIVEREF(__pyx_r);
18596  __Pyx_RefNannyFinishContext();
18597  return __pyx_r;
18598  }
18599  static struct __pyx_vtabstruct_8PyClical_index_set __pyx_vtable_8PyClical_index_set;
18600 
18601  static PyObject *__pyx_tp_new_8PyClical_index_set(PyTypeObject *t, PyObject *a, PyObject *k) {
18602  struct __pyx_obj_8PyClical_index_set *p;
18603  PyObject *o;
18604  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18605  o = (*t->tp_alloc)(t, 0);
18606  } else {
18607  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18608  }
18609  if (unlikely(!o)) return 0;
18610  p = ((struct __pyx_obj_8PyClical_index_set *)o);
18611  p->__pyx_vtab = __pyx_vtabptr_8PyClical_index_set;
18612  if (unlikely(__pyx_pw_8PyClical_9index_set_3__cinit__(o, a, k) < 0)) goto bad;
18613  return o;
18614  bad:
18615  Py_DECREF(o); o = 0;
18616  return NULL;
18617  }
18618 
18619  static void __pyx_tp_dealloc_8PyClical_index_set(PyObject *o) {
18620  #if CYTHON_USE_TP_FINALIZE
18621  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))) {
18622  if (PyObject_CallFinalizerFromDealloc(o)) return;
18623  }
18624  #endif
18625  {
18626  PyObject *etype, *eval, *etb;
18627  PyErr_Fetch(&etype, &eval, &etb);
18628  ++Py_REFCNT(o);
18629  __pyx_pw_8PyClical_9index_set_5__dealloc__(o);
18630  --Py_REFCNT(o);
18631  PyErr_Restore(etype, eval, etb);
18632  }
18633  (*Py_TYPE(o)->tp_free)(o);
18634  }
18635  static PyObject *__pyx_sq_item_8PyClical_index_set(PyObject *o, Py_ssize_t i) {
18636  PyObject *r;
18637  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18638  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18639  Py_DECREF(x);
18640  return r;
18641  }
18642 
18643  static int __pyx_mp_ass_subscript_8PyClical_index_set(PyObject *o, PyObject *i, PyObject *v) {
18644  if (v) {
18645  return __pyx_pw_8PyClical_9index_set_9__setitem__(o, i, v);
18646  }
18647  else {
18648  PyErr_Format(PyExc_NotImplementedError,
18649  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
18650  return -1;
18651  }
18652  }
18653 
18654  static PyMethodDef __pyx_methods_8PyClical_index_set[] = {
18655  {"copy", (PyCFunction)__pyx_pw_8PyClical_9index_set_1copy, METH_NOARGS, __pyx_doc_8PyClical_9index_set_copy},
18656  {"count", (PyCFunction)__pyx_pw_8PyClical_9index_set_32count, METH_NOARGS, __pyx_doc_8PyClical_9index_set_31count},
18657  {"count_neg", (PyCFunction)__pyx_pw_8PyClical_9index_set_34count_neg, METH_NOARGS, __pyx_doc_8PyClical_9index_set_33count_neg},
18658  {"count_pos", (PyCFunction)__pyx_pw_8PyClical_9index_set_36count_pos, METH_NOARGS, __pyx_doc_8PyClical_9index_set_35count_pos},
18659  {"min", (PyCFunction)__pyx_pw_8PyClical_9index_set_38min, METH_NOARGS, __pyx_doc_8PyClical_9index_set_37min},
18660  {"max", (PyCFunction)__pyx_pw_8PyClical_9index_set_40max, METH_NOARGS, __pyx_doc_8PyClical_9index_set_39max},
18661  {"hash_fn", (PyCFunction)__pyx_pw_8PyClical_9index_set_42hash_fn, METH_NOARGS, __pyx_doc_8PyClical_9index_set_41hash_fn},
18662  {"sign_of_mult", (PyCFunction)__pyx_pw_8PyClical_9index_set_44sign_of_mult, METH_O, __pyx_doc_8PyClical_9index_set_43sign_of_mult},
18663  {"sign_of_square", (PyCFunction)__pyx_pw_8PyClical_9index_set_46sign_of_square, METH_NOARGS, __pyx_doc_8PyClical_9index_set_45sign_of_square},
18664  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_52__reduce_cython__, METH_NOARGS, 0},
18665  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_9index_set_54__setstate_cython__, METH_O, 0},
18666  {0, 0, 0, 0}
18667  };
18668 
18669  static PyNumberMethods __pyx_tp_as_number_index_set = {
18670  0, /*nb_add*/
18671  0, /*nb_subtract*/
18672  0, /*nb_multiply*/
18673  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18674  0, /*nb_divide*/
18675  #endif
18676  0, /*nb_remainder*/
18677  0, /*nb_divmod*/
18678  0, /*nb_power*/
18679  0, /*nb_negative*/
18680  0, /*nb_positive*/
18681  0, /*nb_absolute*/
18682  0, /*nb_nonzero*/
18683  __pyx_pw_8PyClical_9index_set_18__invert__, /*nb_invert*/
18684  0, /*nb_lshift*/
18685  0, /*nb_rshift*/
18686  __pyx_pw_8PyClical_9index_set_24__and__, /*nb_and*/
18687  __pyx_pw_8PyClical_9index_set_20__xor__, /*nb_xor*/
18688  __pyx_pw_8PyClical_9index_set_28__or__, /*nb_or*/
18689  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18690  0, /*nb_coerce*/
18691  #endif
18692  0, /*nb_int*/
18693  #if PY_MAJOR_VERSION < 3
18694  0, /*nb_long*/
18695  #else
18696  0, /*reserved*/
18697  #endif
18698  0, /*nb_float*/
18699  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18700  0, /*nb_oct*/
18701  #endif
18702  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18703  0, /*nb_hex*/
18704  #endif
18705  0, /*nb_inplace_add*/
18706  0, /*nb_inplace_subtract*/
18707  0, /*nb_inplace_multiply*/
18708  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18709  0, /*nb_inplace_divide*/
18710  #endif
18711  0, /*nb_inplace_remainder*/
18712  0, /*nb_inplace_power*/
18713  0, /*nb_inplace_lshift*/
18714  0, /*nb_inplace_rshift*/
18715  __pyx_pw_8PyClical_9index_set_26__iand__, /*nb_inplace_and*/
18716  __pyx_pw_8PyClical_9index_set_22__ixor__, /*nb_inplace_xor*/
18717  __pyx_pw_8PyClical_9index_set_30__ior__, /*nb_inplace_or*/
18718  0, /*nb_floor_divide*/
18719  0, /*nb_true_divide*/
18720  0, /*nb_inplace_floor_divide*/
18721  0, /*nb_inplace_true_divide*/
18722  0, /*nb_index*/
18723  #if PY_VERSION_HEX >= 0x03050000
18724  0, /*nb_matrix_multiply*/
18725  #endif
18726  #if PY_VERSION_HEX >= 0x03050000
18727  0, /*nb_inplace_matrix_multiply*/
18728  #endif
18729  };
18730 
18731  static PySequenceMethods __pyx_tp_as_sequence_index_set = {
18732  0, /*sq_length*/
18733  0, /*sq_concat*/
18734  0, /*sq_repeat*/
18735  __pyx_sq_item_8PyClical_index_set, /*sq_item*/
18736  0, /*sq_slice*/
18737  0, /*sq_ass_item*/
18738  0, /*sq_ass_slice*/
18739  __pyx_pw_8PyClical_9index_set_13__contains__, /*sq_contains*/
18740  0, /*sq_inplace_concat*/
18741  0, /*sq_inplace_repeat*/
18742  };
18743 
18744  static PyMappingMethods __pyx_tp_as_mapping_index_set = {
18745  0, /*mp_length*/
18746  __pyx_pw_8PyClical_9index_set_11__getitem__, /*mp_subscript*/
18747  __pyx_mp_ass_subscript_8PyClical_index_set, /*mp_ass_subscript*/
18748  };
18749 
18750  static PyTypeObject __pyx_type_8PyClical_index_set = {
18751  PyVarObject_HEAD_INIT(0, 0)
18752  "PyClical.index_set", /*tp_name*/
18753  sizeof(struct __pyx_obj_8PyClical_index_set), /*tp_basicsize*/
18754  0, /*tp_itemsize*/
18755  __pyx_tp_dealloc_8PyClical_index_set, /*tp_dealloc*/
18756  0, /*tp_print*/
18757  0, /*tp_getattr*/
18758  0, /*tp_setattr*/
18759  #if PY_MAJOR_VERSION < 3
18760  0, /*tp_compare*/
18761  #endif
18762  #if PY_MAJOR_VERSION >= 3
18763  0, /*tp_as_async*/
18764  #endif
18765  __pyx_pw_8PyClical_9index_set_48__repr__, /*tp_repr*/
18766  &__pyx_tp_as_number_index_set, /*tp_as_number*/
18767  &__pyx_tp_as_sequence_index_set, /*tp_as_sequence*/
18768  &__pyx_tp_as_mapping_index_set, /*tp_as_mapping*/
18769  0, /*tp_hash*/
18770  0, /*tp_call*/
18771  __pyx_pw_8PyClical_9index_set_50__str__, /*tp_str*/
18772  0, /*tp_getattro*/
18773  0, /*tp_setattro*/
18774  0, /*tp_as_buffer*/
18775  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18776  "\n Python class index_set wraps C++ class IndexSet.\n ", /*tp_doc*/
18777  0, /*tp_traverse*/
18778  0, /*tp_clear*/
18779  __pyx_pw_8PyClical_9index_set_7__richcmp__, /*tp_richcompare*/
18780  0, /*tp_weaklistoffset*/
18781  __pyx_pw_8PyClical_9index_set_15__iter__, /*tp_iter*/
18782  0, /*tp_iternext*/
18783  __pyx_methods_8PyClical_index_set, /*tp_methods*/
18784  0, /*tp_members*/
18785  0, /*tp_getset*/
18786  0, /*tp_base*/
18787  0, /*tp_dict*/
18788  0, /*tp_descr_get*/
18789  0, /*tp_descr_set*/
18790  0, /*tp_dictoffset*/
18791  0, /*tp_init*/
18792  0, /*tp_alloc*/
18793  __pyx_tp_new_8PyClical_index_set, /*tp_new*/
18794  0, /*tp_free*/
18795  0, /*tp_is_gc*/
18796  0, /*tp_bases*/
18797  0, /*tp_mro*/
18798  0, /*tp_cache*/
18799  0, /*tp_subclasses*/
18800  0, /*tp_weaklist*/
18801  0, /*tp_del*/
18802  0, /*tp_version_tag*/
18803  #if PY_VERSION_HEX >= 0x030400a1
18804  0, /*tp_finalize*/
18805  #endif
18806  };
18807  static struct __pyx_vtabstruct_8PyClical_clifford __pyx_vtable_8PyClical_clifford;
18808 
18809  static PyObject *__pyx_tp_new_8PyClical_clifford(PyTypeObject *t, PyObject *a, PyObject *k) {
18810  struct __pyx_obj_8PyClical_clifford *p;
18811  PyObject *o;
18812  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
18813  o = (*t->tp_alloc)(t, 0);
18814  } else {
18815  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
18816  }
18817  if (unlikely(!o)) return 0;
18818  p = ((struct __pyx_obj_8PyClical_clifford *)o);
18819  p->__pyx_vtab = __pyx_vtabptr_8PyClical_clifford;
18820  if (unlikely(__pyx_pw_8PyClical_8clifford_3__cinit__(o, a, k) < 0)) goto bad;
18821  return o;
18822  bad:
18823  Py_DECREF(o); o = 0;
18824  return NULL;
18825  }
18826 
18827  static void __pyx_tp_dealloc_8PyClical_clifford(PyObject *o) {
18828  #if CYTHON_USE_TP_FINALIZE
18829  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))) {
18830  if (PyObject_CallFinalizerFromDealloc(o)) return;
18831  }
18832  #endif
18833  {
18834  PyObject *etype, *eval, *etb;
18835  PyErr_Fetch(&etype, &eval, &etb);
18836  ++Py_REFCNT(o);
18837  __pyx_pw_8PyClical_8clifford_5__dealloc__(o);
18838  --Py_REFCNT(o);
18839  PyErr_Restore(etype, eval, etb);
18840  }
18841  (*Py_TYPE(o)->tp_free)(o);
18842  }
18843  static PyObject *__pyx_sq_item_8PyClical_clifford(PyObject *o, Py_ssize_t i) {
18844  PyObject *r;
18845  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
18846  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
18847  Py_DECREF(x);
18848  return r;
18849  }
18850 
18851  static PyMethodDef __pyx_methods_8PyClical_clifford[] = {
18852  {"copy", (PyCFunction)__pyx_pw_8PyClical_8clifford_1copy, METH_NOARGS, __pyx_doc_8PyClical_8clifford_copy},
18853  {"reframe", (PyCFunction)__pyx_pw_8PyClical_8clifford_11reframe, METH_O, __pyx_doc_8PyClical_8clifford_10reframe},
18854  {"inv", (PyCFunction)__pyx_pw_8PyClical_8clifford_49inv, METH_NOARGS, __pyx_doc_8PyClical_8clifford_48inv},
18855  {"pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_57pow, METH_O, __pyx_doc_8PyClical_8clifford_56pow},
18856  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_8clifford_59outer_pow, METH_O, __pyx_doc_8PyClical_8clifford_58outer_pow},
18857  {"scalar", (PyCFunction)__pyx_pw_8PyClical_8clifford_63scalar, METH_NOARGS, __pyx_doc_8PyClical_8clifford_62scalar},
18858  {"pure", (PyCFunction)__pyx_pw_8PyClical_8clifford_65pure, METH_NOARGS, __pyx_doc_8PyClical_8clifford_64pure},
18859  {"even", (PyCFunction)__pyx_pw_8PyClical_8clifford_67even, METH_NOARGS, __pyx_doc_8PyClical_8clifford_66even},
18860  {"odd", (PyCFunction)__pyx_pw_8PyClical_8clifford_69odd, METH_NOARGS, __pyx_doc_8PyClical_8clifford_68odd},
18861  {"vector_part", (PyCFunction)__pyx_pw_8PyClical_8clifford_71vector_part, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_8clifford_70vector_part},
18862  {"involute", (PyCFunction)__pyx_pw_8PyClical_8clifford_73involute, METH_NOARGS, __pyx_doc_8PyClical_8clifford_72involute},
18863  {"reverse", (PyCFunction)__pyx_pw_8PyClical_8clifford_75reverse, METH_NOARGS, __pyx_doc_8PyClical_8clifford_74reverse},
18864  {"conj", (PyCFunction)__pyx_pw_8PyClical_8clifford_77conj, METH_NOARGS, __pyx_doc_8PyClical_8clifford_76conj},
18865  {"quad", (PyCFunction)__pyx_pw_8PyClical_8clifford_79quad, METH_NOARGS, __pyx_doc_8PyClical_8clifford_78quad},
18866  {"norm", (PyCFunction)__pyx_pw_8PyClical_8clifford_81norm, METH_NOARGS, __pyx_doc_8PyClical_8clifford_80norm},
18867  {"abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_83abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_82abs},
18868  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_8clifford_85max_abs, METH_NOARGS, __pyx_doc_8PyClical_8clifford_84max_abs},
18869  {"truncated", (PyCFunction)__pyx_pw_8PyClical_8clifford_87truncated, METH_O, __pyx_doc_8PyClical_8clifford_86truncated},
18870  {"isnan", (PyCFunction)__pyx_pw_8PyClical_8clifford_89isnan, METH_NOARGS, __pyx_doc_8PyClical_8clifford_88isnan},
18871  {"frame", (PyCFunction)__pyx_pw_8PyClical_8clifford_91frame, METH_NOARGS, __pyx_doc_8PyClical_8clifford_90frame},
18872  {"__reduce_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_97__reduce_cython__, METH_NOARGS, 0},
18873  {"__setstate_cython__", (PyCFunction)__pyx_pw_8PyClical_8clifford_99__setstate_cython__, METH_O, 0},
18874  {0, 0, 0, 0}
18875  };
18876 
18877  static PyNumberMethods __pyx_tp_as_number_clifford = {
18878  __pyx_pw_8PyClical_8clifford_21__add__, /*nb_add*/
18879  __pyx_pw_8PyClical_8clifford_25__sub__, /*nb_subtract*/
18880  __pyx_pw_8PyClical_8clifford_29__mul__, /*nb_multiply*/
18881  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18882  __pyx_pw_8PyClical_8clifford_45__div__, /*nb_divide*/
18883  #endif
18884  __pyx_pw_8PyClical_8clifford_33__mod__, /*nb_remainder*/
18885  0, /*nb_divmod*/
18886  __pyx_pw_8PyClical_8clifford_55__pow__, /*nb_power*/
18887  __pyx_pw_8PyClical_8clifford_17__neg__, /*nb_negative*/
18888  __pyx_pw_8PyClical_8clifford_19__pos__, /*nb_positive*/
18889  0, /*nb_absolute*/
18890  0, /*nb_nonzero*/
18891  0, /*nb_invert*/
18892  0, /*nb_lshift*/
18893  0, /*nb_rshift*/
18894  __pyx_pw_8PyClical_8clifford_37__and__, /*nb_and*/
18895  __pyx_pw_8PyClical_8clifford_41__xor__, /*nb_xor*/
18896  __pyx_pw_8PyClical_8clifford_51__or__, /*nb_or*/
18897  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18898  0, /*nb_coerce*/
18899  #endif
18900  0, /*nb_int*/
18901  #if PY_MAJOR_VERSION < 3
18902  0, /*nb_long*/
18903  #else
18904  0, /*reserved*/
18905  #endif
18906  0, /*nb_float*/
18907  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18908  0, /*nb_oct*/
18909  #endif
18910  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18911  0, /*nb_hex*/
18912  #endif
18913  __pyx_pw_8PyClical_8clifford_23__iadd__, /*nb_inplace_add*/
18914  __pyx_pw_8PyClical_8clifford_27__isub__, /*nb_inplace_subtract*/
18915  __pyx_pw_8PyClical_8clifford_31__imul__, /*nb_inplace_multiply*/
18916  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
18917  __pyx_pw_8PyClical_8clifford_47__idiv__, /*nb_inplace_divide*/
18918  #endif
18919  __pyx_pw_8PyClical_8clifford_35__imod__, /*nb_inplace_remainder*/
18920  0, /*nb_inplace_power*/
18921  0, /*nb_inplace_lshift*/
18922  0, /*nb_inplace_rshift*/
18923  __pyx_pw_8PyClical_8clifford_39__iand__, /*nb_inplace_and*/
18924  __pyx_pw_8PyClical_8clifford_43__ixor__, /*nb_inplace_xor*/
18925  __pyx_pw_8PyClical_8clifford_53__ior__, /*nb_inplace_or*/
18926  0, /*nb_floor_divide*/
18927  0, /*nb_true_divide*/
18928  0, /*nb_inplace_floor_divide*/
18929  0, /*nb_inplace_true_divide*/
18930  0, /*nb_index*/
18931  #if PY_VERSION_HEX >= 0x03050000
18932  0, /*nb_matrix_multiply*/
18933  #endif
18934  #if PY_VERSION_HEX >= 0x03050000
18935  0, /*nb_inplace_matrix_multiply*/
18936  #endif
18937  };
18938 
18939  static PySequenceMethods __pyx_tp_as_sequence_clifford = {
18940  0, /*sq_length*/
18941  0, /*sq_concat*/
18942  0, /*sq_repeat*/
18943  __pyx_sq_item_8PyClical_clifford, /*sq_item*/
18944  0, /*sq_slice*/
18945  0, /*sq_ass_item*/
18946  0, /*sq_ass_slice*/
18947  __pyx_pw_8PyClical_8clifford_7__contains__, /*sq_contains*/
18948  0, /*sq_inplace_concat*/
18949  0, /*sq_inplace_repeat*/
18950  };
18951 
18952  static PyMappingMethods __pyx_tp_as_mapping_clifford = {
18953  0, /*mp_length*/
18954  __pyx_pw_8PyClical_8clifford_15__getitem__, /*mp_subscript*/
18955  0, /*mp_ass_subscript*/
18956  };
18957 
18958  static PyTypeObject __pyx_type_8PyClical_clifford = {
18959  PyVarObject_HEAD_INIT(0, 0)
18960  "PyClical.clifford", /*tp_name*/
18961  sizeof(struct __pyx_obj_8PyClical_clifford), /*tp_basicsize*/
18962  0, /*tp_itemsize*/
18963  __pyx_tp_dealloc_8PyClical_clifford, /*tp_dealloc*/
18964  0, /*tp_print*/
18965  0, /*tp_getattr*/
18966  0, /*tp_setattr*/
18967  #if PY_MAJOR_VERSION < 3
18968  0, /*tp_compare*/
18969  #endif
18970  #if PY_MAJOR_VERSION >= 3
18971  0, /*tp_as_async*/
18972  #endif
18973  __pyx_pw_8PyClical_8clifford_93__repr__, /*tp_repr*/
18974  &__pyx_tp_as_number_clifford, /*tp_as_number*/
18975  &__pyx_tp_as_sequence_clifford, /*tp_as_sequence*/
18976  &__pyx_tp_as_mapping_clifford, /*tp_as_mapping*/
18977  0, /*tp_hash*/
18978  __pyx_pw_8PyClical_8clifford_61__call__, /*tp_call*/
18979  __pyx_pw_8PyClical_8clifford_95__str__, /*tp_str*/
18980  0, /*tp_getattro*/
18981  0, /*tp_setattro*/
18982  0, /*tp_as_buffer*/
18983  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
18984  "\n Python class clifford wraps C++ class Clifford.\n ", /*tp_doc*/
18985  0, /*tp_traverse*/
18986  0, /*tp_clear*/
18987  __pyx_pw_8PyClical_8clifford_13__richcmp__, /*tp_richcompare*/
18988  0, /*tp_weaklistoffset*/
18989  __pyx_pw_8PyClical_8clifford_9__iter__, /*tp_iter*/
18990  0, /*tp_iternext*/
18991  __pyx_methods_8PyClical_clifford, /*tp_methods*/
18992  0, /*tp_members*/
18993  0, /*tp_getset*/
18994  0, /*tp_base*/
18995  0, /*tp_dict*/
18996  0, /*tp_descr_get*/
18997  0, /*tp_descr_set*/
18998  0, /*tp_dictoffset*/
18999  0, /*tp_init*/
19000  0, /*tp_alloc*/
19001  __pyx_tp_new_8PyClical_clifford, /*tp_new*/
19002  0, /*tp_free*/
19003  0, /*tp_is_gc*/
19004  0, /*tp_bases*/
19005  0, /*tp_mro*/
19006  0, /*tp_cache*/
19007  0, /*tp_subclasses*/
19008  0, /*tp_weaklist*/
19009  0, /*tp_del*/
19010  0, /*tp_version_tag*/
19011  #if PY_VERSION_HEX >= 0x030400a1
19012  0, /*tp_finalize*/
19013  #endif
19014  };
19015 
19016  static struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *__pyx_freelist_8PyClical___pyx_scope_struct____iter__[8];
19017  static int __pyx_freecount_8PyClical___pyx_scope_struct____iter__ = 0;
19018 
19019  static PyObject *__pyx_tp_new_8PyClical___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
19020  PyObject *o;
19021  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__)))) {
19022  o = (PyObject*)__pyx_freelist_8PyClical___pyx_scope_struct____iter__[--__pyx_freecount_8PyClical___pyx_scope_struct____iter__];
19023  memset(o, 0, sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__));
19024  (void) PyObject_INIT(o, t);
19025  PyObject_GC_Track(o);
19026  } else {
19027  o = (*t->tp_alloc)(t, 0);
19028  if (unlikely(!o)) return 0;
19029  }
19030  return o;
19031  }
19032 
19033  static void __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__(PyObject *o) {
19034  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19035  PyObject_GC_UnTrack(o);
19036  Py_CLEAR(p->__pyx_v_idx);
19037  Py_CLEAR(p->__pyx_v_self);
19038  Py_CLEAR(p->__pyx_t_0);
19039  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__)))) {
19040  __pyx_freelist_8PyClical___pyx_scope_struct____iter__[__pyx_freecount_8PyClical___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o);
19041  } else {
19042  (*Py_TYPE(o)->tp_free)(o);
19043  }
19044  }
19045 
19046  static int __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
19047  int e;
19048  struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8PyClical___pyx_scope_struct____iter__ *)o;
19049  if (p->__pyx_v_idx) {
19050  e = (*v)(p->__pyx_v_idx, a); if (e) return e;
19051  }
19052  if (p->__pyx_v_self) {
19053  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
19054  }
19055  if (p->__pyx_t_0) {
19056  e = (*v)(p->__pyx_t_0, a); if (e) return e;
19057  }
19058  return 0;
19059  }
19060 
19061  static PyTypeObject __pyx_type_8PyClical___pyx_scope_struct____iter__ = {
19062  PyVarObject_HEAD_INIT(0, 0)
19063  "PyClical.__pyx_scope_struct____iter__", /*tp_name*/
19064  sizeof(struct __pyx_obj_8PyClical___pyx_scope_struct____iter__), /*tp_basicsize*/
19065  0, /*tp_itemsize*/
19066  __pyx_tp_dealloc_8PyClical___pyx_scope_struct____iter__, /*tp_dealloc*/
19067  0, /*tp_print*/
19068  0, /*tp_getattr*/
19069  0, /*tp_setattr*/
19070  #if PY_MAJOR_VERSION < 3
19071  0, /*tp_compare*/
19072  #endif
19073  #if PY_MAJOR_VERSION >= 3
19074  0, /*tp_as_async*/
19075  #endif
19076  0, /*tp_repr*/
19077  0, /*tp_as_number*/
19078  0, /*tp_as_sequence*/
19079  0, /*tp_as_mapping*/
19080  0, /*tp_hash*/
19081  0, /*tp_call*/
19082  0, /*tp_str*/
19083  0, /*tp_getattro*/
19084  0, /*tp_setattro*/
19085  0, /*tp_as_buffer*/
19086  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
19087  0, /*tp_doc*/
19088  __pyx_tp_traverse_8PyClical___pyx_scope_struct____iter__, /*tp_traverse*/
19089  0, /*tp_clear*/
19090  0, /*tp_richcompare*/
19091  0, /*tp_weaklistoffset*/
19092  0, /*tp_iter*/
19093  0, /*tp_iternext*/
19094  0, /*tp_methods*/
19095  0, /*tp_members*/
19096  0, /*tp_getset*/
19097  0, /*tp_base*/
19098  0, /*tp_dict*/
19099  0, /*tp_descr_get*/
19100  0, /*tp_descr_set*/
19101  0, /*tp_dictoffset*/
19102  0, /*tp_init*/
19103  0, /*tp_alloc*/
19104  __pyx_tp_new_8PyClical___pyx_scope_struct____iter__, /*tp_new*/
19105  0, /*tp_free*/
19106  0, /*tp_is_gc*/
19107  0, /*tp_bases*/
19108  0, /*tp_mro*/
19109  0, /*tp_cache*/
19110  0, /*tp_subclasses*/
19111  0, /*tp_weaklist*/
19112  0, /*tp_del*/
19113  0, /*tp_version_tag*/
19114  #if PY_VERSION_HEX >= 0x030400a1
19115  0, /*tp_finalize*/
19116  #endif
19117  };
19118 
19119  static PyMethodDef __pyx_methods[] = {
19120  {"compare", (PyCFunction)__pyx_pw_8PyClical_3compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_2compare},
19121  {"min_neg", (PyCFunction)__pyx_pw_8PyClical_5min_neg, METH_O, __pyx_doc_8PyClical_4min_neg},
19122  {"max_pos", (PyCFunction)__pyx_pw_8PyClical_7max_pos, METH_O, __pyx_doc_8PyClical_6max_pos},
19123  {"inv", (PyCFunction)__pyx_pw_8PyClical_11inv, METH_O, __pyx_doc_8PyClical_10inv},
19124  {"scalar", (PyCFunction)__pyx_pw_8PyClical_13scalar, METH_O, __pyx_doc_8PyClical_12scalar},
19125  {"real", (PyCFunction)__pyx_pw_8PyClical_15real, METH_O, __pyx_doc_8PyClical_14real},
19126  {"imag", (PyCFunction)__pyx_pw_8PyClical_17imag, METH_O, __pyx_doc_8PyClical_16imag},
19127  {"pure", (PyCFunction)__pyx_pw_8PyClical_19pure, METH_O, __pyx_doc_8PyClical_18pure},
19128  {"even", (PyCFunction)__pyx_pw_8PyClical_21even, METH_O, __pyx_doc_8PyClical_20even},
19129  {"odd", (PyCFunction)__pyx_pw_8PyClical_23odd, METH_O, __pyx_doc_8PyClical_22odd},
19130  {"involute", (PyCFunction)__pyx_pw_8PyClical_25involute, METH_O, __pyx_doc_8PyClical_24involute},
19131  {"reverse", (PyCFunction)__pyx_pw_8PyClical_27reverse, METH_O, __pyx_doc_8PyClical_26reverse},
19132  {"conj", (PyCFunction)__pyx_pw_8PyClical_29conj, METH_O, __pyx_doc_8PyClical_28conj},
19133  {"quad", (PyCFunction)__pyx_pw_8PyClical_31quad, METH_O, __pyx_doc_8PyClical_30quad},
19134  {"norm", (PyCFunction)__pyx_pw_8PyClical_33norm, METH_O, __pyx_doc_8PyClical_32norm},
19135  {"abs", (PyCFunction)__pyx_pw_8PyClical_35abs, METH_O, __pyx_doc_8PyClical_34abs},
19136  {"max_abs", (PyCFunction)__pyx_pw_8PyClical_37max_abs, METH_O, __pyx_doc_8PyClical_36max_abs},
19137  {"pow", (PyCFunction)__pyx_pw_8PyClical_39pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_38pow},
19138  {"outer_pow", (PyCFunction)__pyx_pw_8PyClical_41outer_pow, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_40outer_pow},
19139  {"complexifier", (PyCFunction)__pyx_pw_8PyClical_43complexifier, METH_O, __pyx_doc_8PyClical_42complexifier},
19140  {"sqrt", (PyCFunction)__pyx_pw_8PyClical_45sqrt, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_44sqrt},
19141  {"exp", (PyCFunction)__pyx_pw_8PyClical_47exp, METH_O, __pyx_doc_8PyClical_46exp},
19142  {"log", (PyCFunction)__pyx_pw_8PyClical_49log, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_48log},
19143  {"cos", (PyCFunction)__pyx_pw_8PyClical_51cos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_50cos},
19144  {"acos", (PyCFunction)__pyx_pw_8PyClical_53acos, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_52acos},
19145  {"cosh", (PyCFunction)__pyx_pw_8PyClical_55cosh, METH_O, __pyx_doc_8PyClical_54cosh},
19146  {"acosh", (PyCFunction)__pyx_pw_8PyClical_57acosh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_56acosh},
19147  {"sin", (PyCFunction)__pyx_pw_8PyClical_59sin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_58sin},
19148  {"asin", (PyCFunction)__pyx_pw_8PyClical_61asin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_60asin},
19149  {"sinh", (PyCFunction)__pyx_pw_8PyClical_63sinh, METH_O, __pyx_doc_8PyClical_62sinh},
19150  {"asinh", (PyCFunction)__pyx_pw_8PyClical_65asinh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_64asinh},
19151  {"tan", (PyCFunction)__pyx_pw_8PyClical_67tan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_66tan},
19152  {"atan", (PyCFunction)__pyx_pw_8PyClical_69atan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_68atan},
19153  {"tanh", (PyCFunction)__pyx_pw_8PyClical_71tanh, METH_O, __pyx_doc_8PyClical_70tanh},
19154  {"atanh", (PyCFunction)__pyx_pw_8PyClical_73atanh, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_72atanh},
19155  {"random_clifford", (PyCFunction)__pyx_pw_8PyClical_75random_clifford, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8PyClical_74random_clifford},
19156  {"cga3", (PyCFunction)__pyx_pw_8PyClical_77cga3, METH_O, __pyx_doc_8PyClical_76cga3},
19157  {"cga3std", (PyCFunction)__pyx_pw_8PyClical_79cga3std, METH_O, __pyx_doc_8PyClical_78cga3std},
19158  {"agc3", (PyCFunction)__pyx_pw_8PyClical_81agc3, METH_O, __pyx_doc_8PyClical_80agc3},
19159  {0, 0, 0, 0}
19160  };
19161 
19162  #if PY_MAJOR_VERSION >= 3
19163  #if CYTHON_PEP489_MULTI_PHASE_INIT
19164  static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
19165  static int __pyx_pymod_exec_PyClical(PyObject* module); /*proto*/
19166  static PyModuleDef_Slot __pyx_moduledef_slots[] = {
19167  {Py_mod_create, (void*)__pyx_pymod_create},
19168  {Py_mod_exec, (void*)__pyx_pymod_exec_PyClical},
19169  {0, NULL}
19170  };
19171  #endif
19172 
19173  static struct PyModuleDef __pyx_moduledef = {
19174  PyModuleDef_HEAD_INIT,
19175  "PyClical",
19176  0, /* m_doc */
19177  #if CYTHON_PEP489_MULTI_PHASE_INIT
19178  0, /* m_size */
19179  #else
19180  -1, /* m_size */
19181  #endif
19182  __pyx_methods /* m_methods */,
19183  #if CYTHON_PEP489_MULTI_PHASE_INIT
19184  __pyx_moduledef_slots, /* m_slots */
19185  #else
19186  NULL, /* m_reload */
19187  #endif
19188  NULL, /* m_traverse */
19189  NULL, /* m_clear */
19190  NULL /* m_free */
19191  };
19192  #endif
19193 
19194 static __Pyx_StringTabEntry __pyx_string_tab[] = {
19195  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
19196  {&__pyx_kp_s_0_8_2, __pyx_k_0_8_2, sizeof(__pyx_k_0_8_2), 0, 0, 1, 0},
19197  {&__pyx_kp_u_Abbreviation_for_clifford_index, __pyx_k_Abbreviation_for_clifford_index, sizeof(__pyx_k_Abbreviation_for_clifford_index), 0, 1, 0, 0},
19198  {&__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},
19199  {&__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},
19200  {&__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},
19201  {&__pyx_kp_s_Cannot_initialize_clifford_objec, __pyx_k_Cannot_initialize_clifford_objec, sizeof(__pyx_k_Cannot_initialize_clifford_objec), 0, 0, 1, 0},
19202  {&__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},
19203  {&__pyx_kp_s_Cannot_reframe, __pyx_k_Cannot_reframe, sizeof(__pyx_k_Cannot_reframe), 0, 0, 1, 0},
19204  {&__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},
19205  {&__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},
19206  {&__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},
19207  {&__pyx_kp_u_Conjugation_reverse_o_involute, __pyx_k_Conjugation_reverse_o_involute, sizeof(__pyx_k_Conjugation_reverse_o_involute), 0, 1, 0, 0},
19208  {&__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},
19209  {&__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},
19210  {&__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},
19211  {&__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},
19212  {&__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},
19213  {&__pyx_kp_u_Convert_Euclidean_3D_multivecto, __pyx_k_Convert_Euclidean_3D_multivecto, sizeof(__pyx_k_Convert_Euclidean_3D_multivecto), 0, 1, 0, 0},
19214  {&__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},
19215  {&__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},
19216  {&__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},
19217  {&__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},
19218  {&__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},
19219  {&__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},
19220  {&__pyx_kp_u_Geometric_difference_print_clif, __pyx_k_Geometric_difference_print_clif, sizeof(__pyx_k_Geometric_difference_print_clif), 0, 1, 0, 0},
19221  {&__pyx_kp_u_Geometric_difference_x_clifford, __pyx_k_Geometric_difference_x_clifford, sizeof(__pyx_k_Geometric_difference_x_clifford), 0, 1, 0, 0},
19222  {&__pyx_kp_u_Geometric_multiplicative_invers, __pyx_k_Geometric_multiplicative_invers, sizeof(__pyx_k_Geometric_multiplicative_invers), 0, 1, 0, 0},
19223  {&__pyx_kp_u_Geometric_multiplicative_invers_2, __pyx_k_Geometric_multiplicative_invers_2, sizeof(__pyx_k_Geometric_multiplicative_invers_2), 0, 1, 0, 0},
19224  {&__pyx_kp_u_Geometric_product_print_cliffor, __pyx_k_Geometric_product_print_cliffor, sizeof(__pyx_k_Geometric_product_print_cliffor), 0, 1, 0, 0},
19225  {&__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},
19226  {&__pyx_kp_u_Geometric_quotient_print_cliffo, __pyx_k_Geometric_quotient_print_cliffo, sizeof(__pyx_k_Geometric_quotient_print_cliffo), 0, 1, 0, 0},
19227  {&__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},
19228  {&__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},
19229  {&__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},
19230  {&__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},
19231  {&__pyx_kp_u_Hyperbolic_cosine_of_multivecto, __pyx_k_Hyperbolic_cosine_of_multivecto, sizeof(__pyx_k_Hyperbolic_cosine_of_multivecto), 0, 1, 0, 0},
19232  {&__pyx_kp_u_Hyperbolic_sine_of_multivector, __pyx_k_Hyperbolic_sine_of_multivector, sizeof(__pyx_k_Hyperbolic_sine_of_multivector), 0, 1, 0, 0},
19233  {&__pyx_kp_u_Hyperbolic_tangent_of_multivect, __pyx_k_Hyperbolic_tangent_of_multivect, sizeof(__pyx_k_Hyperbolic_tangent_of_multivect), 0, 1, 0, 0},
19234  {&__pyx_kp_u_Imaginary_part_deprecated_alway, __pyx_k_Imaginary_part_deprecated_alway, sizeof(__pyx_k_Imaginary_part_deprecated_alway), 0, 1, 0, 0},
19235  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
19236  {&__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},
19237  {&__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},
19238  {&__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},
19239  {&__pyx_n_s_Integral, __pyx_k_Integral, sizeof(__pyx_k_Integral), 0, 0, 1, 1},
19240  {&__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},
19241  {&__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},
19242  {&__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},
19243  {&__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},
19244  {&__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},
19245  {&__pyx_kp_u_Inverse_tangent_of_multivector, __pyx_k_Inverse_tangent_of_multivector, sizeof(__pyx_k_Inverse_tangent_of_multivector), 0, 1, 0, 0},
19246  {&__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},
19247  {&__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},
19248  {&__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},
19249  {&__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},
19250  {&__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},
19251  {&__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},
19252  {&__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},
19253  {&__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},
19254  {&__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},
19255  {&__pyx_kp_u_Natural_logarithm_of_multivecto, __pyx_k_Natural_logarithm_of_multivecto, sizeof(__pyx_k_Natural_logarithm_of_multivecto), 0, 1, 0, 0},
19256  {&__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},
19257  {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
19258  {&__pyx_kp_s_Not_applicable, __pyx_k_Not_applicable, sizeof(__pyx_k_Not_applicable), 0, 0, 1, 0},
19259  {&__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},
19260  {&__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},
19261  {&__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},
19262  {&__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},
19263  {&__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},
19264  {&__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},
19265  {&__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},
19266  {&__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},
19267  {&__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},
19268  {&__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},
19269  {&__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},
19270  {&__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},
19271  {&__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},
19272  {&__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},
19273  {&__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},
19274  {&__pyx_n_s_PyClical, __pyx_k_PyClical, sizeof(__pyx_k_PyClical), 0, 0, 1, 1},
19275  {&__pyx_kp_s_PyClical_pyx, __pyx_k_PyClical_pyx, sizeof(__pyx_k_PyClical_pyx), 0, 0, 1, 0},
19276  {&__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},
19277  {&__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},
19278  {&__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},
19279  {&__pyx_n_s_Real, __pyx_k_Real, sizeof(__pyx_k_Real), 0, 0, 1, 1},
19280  {&__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},
19281  {&__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},
19282  {&__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},
19283  {&__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},
19284  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
19285  {&__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},
19286  {&__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},
19287  {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
19288  {&__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},
19289  {&__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},
19290  {&__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},
19291  {&__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},
19292  {&__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},
19293  {&__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},
19294  {&__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},
19295  {&__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},
19296  {&__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},
19297  {&__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},
19298  {&__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},
19299  {&__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},
19300  {&__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},
19301  {&__pyx_kp_u_Symmetric_set_difference_exclus, __pyx_k_Symmetric_set_difference_exclus, sizeof(__pyx_k_Symmetric_set_difference_exclus), 0, 1, 0, 0},
19302  {&__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},
19303  {&__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},
19304  {&__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},
19305  {&__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},
19306  {&__pyx_kp_u_The_informal_string_representat, __pyx_k_The_informal_string_representat, sizeof(__pyx_k_The_informal_string_representat), 0, 1, 0, 0},
19307  {&__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},
19308  {&__pyx_kp_u_The_official_string_representat, __pyx_k_The_official_string_representat, sizeof(__pyx_k_The_official_string_representat), 0, 1, 0, 0},
19309  {&__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},
19310  {&__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},
19311  {&__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},
19312  {&__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},
19313  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
19314  {&__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},
19315  {&__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},
19316  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
19317  {&__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},
19318  {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
19319  {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0},
19320  {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0},
19321  {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
19322  {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
19323  {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
19324  {&__pyx_kp_u_abs_line_1473, __pyx_k_abs_line_1473, sizeof(__pyx_k_abs_line_1473), 0, 1, 0, 0},
19325  {&__pyx_n_s_acos, __pyx_k_acos, sizeof(__pyx_k_acos), 0, 0, 1, 1},
19326  {&__pyx_kp_u_acos_line_1619, __pyx_k_acos_line_1619, sizeof(__pyx_k_acos_line_1619), 0, 1, 0, 0},
19327  {&__pyx_n_s_acosh, __pyx_k_acosh, sizeof(__pyx_k_acosh), 0, 0, 1, 1},
19328  {&__pyx_kp_u_acosh_line_1656, __pyx_k_acosh_line_1656, sizeof(__pyx_k_acosh_line_1656), 0, 1, 0, 0},
19329  {&__pyx_kp_u_agc3_line_1844, __pyx_k_agc3_line_1844, sizeof(__pyx_k_agc3_line_1844), 0, 1, 0, 0},
19330  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
19331  {&__pyx_kp_s_as_frame, __pyx_k_as_frame, sizeof(__pyx_k_as_frame), 0, 0, 1, 0},
19332  {&__pyx_n_s_asin, __pyx_k_asin, sizeof(__pyx_k_asin), 0, 0, 1, 1},
19333  {&__pyx_kp_u_asin_line_1698, __pyx_k_asin_line_1698, sizeof(__pyx_k_asin_line_1698), 0, 1, 0, 0},
19334  {&__pyx_n_s_asinh, __pyx_k_asinh, sizeof(__pyx_k_asinh), 0, 0, 1, 1},
19335  {&__pyx_kp_u_asinh_line_1733, __pyx_k_asinh_line_1733, sizeof(__pyx_k_asinh_line_1733), 0, 1, 0, 0},
19336  {&__pyx_n_s_atan, __pyx_k_atan, sizeof(__pyx_k_atan), 0, 0, 1, 1},
19337  {&__pyx_kp_u_atan_line_1769, __pyx_k_atan_line_1769, sizeof(__pyx_k_atan_line_1769), 0, 1, 0, 0},
19338  {&__pyx_n_s_atanh, __pyx_k_atanh, sizeof(__pyx_k_atanh), 0, 0, 1, 1},
19339  {&__pyx_kp_u_atanh_line_1798, __pyx_k_atanh_line_1798, sizeof(__pyx_k_atanh_line_1798), 0, 1, 0, 0},
19340  {&__pyx_kp_u_cga3_line_1824, __pyx_k_cga3_line_1824, sizeof(__pyx_k_cga3_line_1824), 0, 1, 0, 0},
19341  {&__pyx_kp_u_cga3std_line_1833, __pyx_k_cga3std_line_1833, sizeof(__pyx_k_cga3std_line_1833), 0, 1, 0, 0},
19342  {&__pyx_n_s_cl, __pyx_k_cl, sizeof(__pyx_k_cl), 0, 0, 1, 1},
19343  {&__pyx_kp_u_clifford___add___line_739, __pyx_k_clifford___add___line_739, sizeof(__pyx_k_clifford___add___line_739), 0, 1, 0, 0},
19344  {&__pyx_kp_u_clifford___and___line_835, __pyx_k_clifford___and___line_835, sizeof(__pyx_k_clifford___and___line_835), 0, 1, 0, 0},
19345  {&__pyx_kp_u_clifford___call___line_1019, __pyx_k_clifford___call___line_1019, sizeof(__pyx_k_clifford___call___line_1019), 0, 1, 0, 0},
19346  {&__pyx_kp_u_clifford___div___line_895, __pyx_k_clifford___div___line_895, sizeof(__pyx_k_clifford___div___line_895), 0, 1, 0, 0},
19347  {&__pyx_kp_u_clifford___getitem___line_706, __pyx_k_clifford___getitem___line_706, sizeof(__pyx_k_clifford___getitem___line_706), 0, 1, 0, 0},
19348  {&__pyx_kp_u_clifford___iadd___line_750, __pyx_k_clifford___iadd___line_750, sizeof(__pyx_k_clifford___iadd___line_750), 0, 1, 0, 0},
19349  {&__pyx_kp_u_clifford___iand___line_850, __pyx_k_clifford___iand___line_850, sizeof(__pyx_k_clifford___iand___line_850), 0, 1, 0, 0},
19350  {&__pyx_kp_u_clifford___idiv___line_910, __pyx_k_clifford___idiv___line_910, sizeof(__pyx_k_clifford___idiv___line_910), 0, 1, 0, 0},
19351  {&__pyx_kp_u_clifford___imod___line_820, __pyx_k_clifford___imod___line_820, sizeof(__pyx_k_clifford___imod___line_820), 0, 1, 0, 0},
19352  {&__pyx_kp_u_clifford___imul___line_792, __pyx_k_clifford___imul___line_792, sizeof(__pyx_k_clifford___imul___line_792), 0, 1, 0, 0},
19353  {&__pyx_kp_u_clifford___ior___line_949, __pyx_k_clifford___ior___line_949, sizeof(__pyx_k_clifford___ior___line_949), 0, 1, 0, 0},
19354  {&__pyx_kp_u_clifford___isub___line_770, __pyx_k_clifford___isub___line_770, sizeof(__pyx_k_clifford___isub___line_770), 0, 1, 0, 0},
19355  {&__pyx_kp_u_clifford___iter___line_637, __pyx_k_clifford___iter___line_637, sizeof(__pyx_k_clifford___iter___line_637), 0, 1, 0, 0},
19356  {&__pyx_kp_u_clifford___ixor___line_880, __pyx_k_clifford___ixor___line_880, sizeof(__pyx_k_clifford___ixor___line_880), 0, 1, 0, 0},
19357  {&__pyx_kp_u_clifford___mod___line_805, __pyx_k_clifford___mod___line_805, sizeof(__pyx_k_clifford___mod___line_805), 0, 1, 0, 0},
19358  {&__pyx_kp_u_clifford___mul___line_779, __pyx_k_clifford___mul___line_779, sizeof(__pyx_k_clifford___mul___line_779), 0, 1, 0, 0},
19359  {&__pyx_kp_u_clifford___neg___line_721, __pyx_k_clifford___neg___line_721, sizeof(__pyx_k_clifford___neg___line_721), 0, 1, 0, 0},
19360  {&__pyx_kp_u_clifford___or___line_938, __pyx_k_clifford___or___line_938, sizeof(__pyx_k_clifford___or___line_938), 0, 1, 0, 0},
19361  {&__pyx_kp_u_clifford___pos___line_730, __pyx_k_clifford___pos___line_730, sizeof(__pyx_k_clifford___pos___line_730), 0, 1, 0, 0},
19362  {&__pyx_kp_u_clifford___pow___line_960, __pyx_k_clifford___pow___line_960, sizeof(__pyx_k_clifford___pow___line_960), 0, 1, 0, 0},
19363  {&__pyx_kp_u_clifford___repr___line_1225, __pyx_k_clifford___repr___line_1225, sizeof(__pyx_k_clifford___repr___line_1225), 0, 1, 0, 0},
19364  {&__pyx_kp_u_clifford___str___line_1234, __pyx_k_clifford___str___line_1234, sizeof(__pyx_k_clifford___str___line_1234), 0, 1, 0, 0},
19365  {&__pyx_kp_u_clifford___sub___line_759, __pyx_k_clifford___sub___line_759, sizeof(__pyx_k_clifford___sub___line_759), 0, 1, 0, 0},
19366  {&__pyx_kp_u_clifford___xor___line_865, __pyx_k_clifford___xor___line_865, sizeof(__pyx_k_clifford___xor___line_865), 0, 1, 0, 0},
19367  {&__pyx_kp_u_clifford_abs_line_1174, __pyx_k_clifford_abs_line_1174, sizeof(__pyx_k_clifford_abs_line_1174), 0, 1, 0, 0},
19368  {&__pyx_kp_u_clifford_conj_line_1137, __pyx_k_clifford_conj_line_1137, sizeof(__pyx_k_clifford_conj_line_1137), 0, 1, 0, 0},
19369  {&__pyx_kp_u_clifford_copy_line_554, __pyx_k_clifford_copy_line_554, sizeof(__pyx_k_clifford_copy_line_554), 0, 1, 0, 0},
19370  {&__pyx_kp_u_clifford_even_line_1060, __pyx_k_clifford_even_line_1060, sizeof(__pyx_k_clifford_even_line_1060), 0, 1, 0, 0},
19371  {&__pyx_kp_u_clifford_frame_line_1214, __pyx_k_clifford_frame_line_1214, sizeof(__pyx_k_clifford_frame_line_1214), 0, 1, 0, 0},
19372  {&__pyx_n_s_clifford_hidden_doctests, __pyx_k_clifford_hidden_doctests, sizeof(__pyx_k_clifford_hidden_doctests), 0, 0, 1, 1},
19373  {&__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},
19374  {&__pyx_kp_u_clifford_inv_line_925, __pyx_k_clifford_inv_line_925, sizeof(__pyx_k_clifford_inv_line_925), 0, 1, 0, 0},
19375  {&__pyx_kp_u_clifford_involute_line_1106, __pyx_k_clifford_involute_line_1106, sizeof(__pyx_k_clifford_involute_line_1106), 0, 1, 0, 0},
19376  {&__pyx_kp_u_clifford_isnan_line_1205, __pyx_k_clifford_isnan_line_1205, sizeof(__pyx_k_clifford_isnan_line_1205), 0, 1, 0, 0},
19377  {&__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},
19378  {&__pyx_kp_u_clifford_norm_line_1163, __pyx_k_clifford_norm_line_1163, sizeof(__pyx_k_clifford_norm_line_1163), 0, 1, 0, 0},
19379  {&__pyx_kp_u_clifford_odd_line_1069, __pyx_k_clifford_odd_line_1069, sizeof(__pyx_k_clifford_odd_line_1069), 0, 1, 0, 0},
19380  {&__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},
19381  {&__pyx_kp_u_clifford_pow_line_979, __pyx_k_clifford_pow_line_979, sizeof(__pyx_k_clifford_pow_line_979), 0, 1, 0, 0},
19382  {&__pyx_kp_u_clifford_pure_line_1049, __pyx_k_clifford_pure_line_1049, sizeof(__pyx_k_clifford_pure_line_1049), 0, 1, 0, 0},
19383  {&__pyx_kp_u_clifford_quad_line_1152, __pyx_k_clifford_quad_line_1152, sizeof(__pyx_k_clifford_quad_line_1152), 0, 1, 0, 0},
19384  {&__pyx_kp_u_clifford_reframe_line_648, __pyx_k_clifford_reframe_line_648, sizeof(__pyx_k_clifford_reframe_line_648), 0, 1, 0, 0},
19385  {&__pyx_kp_u_clifford_reverse_line_1122, __pyx_k_clifford_reverse_line_1122, sizeof(__pyx_k_clifford_reverse_line_1122), 0, 1, 0, 0},
19386  {&__pyx_kp_u_clifford_scalar_line_1038, __pyx_k_clifford_scalar_line_1038, sizeof(__pyx_k_clifford_scalar_line_1038), 0, 1, 0, 0},
19387  {&__pyx_kp_u_clifford_truncated_line_1194, __pyx_k_clifford_truncated_line_1194, sizeof(__pyx_k_clifford_truncated_line_1194), 0, 1, 0, 0},
19388  {&__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},
19389  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
19390  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
19391  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
19392  {&__pyx_kp_u_compare_line_490, __pyx_k_compare_line_490, sizeof(__pyx_k_compare_line_490), 0, 1, 0, 0},
19393  {&__pyx_kp_u_complexifier_line_1527, __pyx_k_complexifier_line_1527, sizeof(__pyx_k_complexifier_line_1527), 0, 1, 0, 0},
19394  {&__pyx_n_s_conj, __pyx_k_conj, sizeof(__pyx_k_conj), 0, 0, 1, 1},
19395  {&__pyx_kp_u_conj_line_1436, __pyx_k_conj_line_1436, sizeof(__pyx_k_conj_line_1436), 0, 1, 0, 0},
19396  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
19397  {&__pyx_n_s_cos, __pyx_k_cos, sizeof(__pyx_k_cos), 0, 0, 1, 1},
19398  {&__pyx_kp_u_cos_line_1602, __pyx_k_cos_line_1602, sizeof(__pyx_k_cos_line_1602), 0, 1, 0, 0},
19399  {&__pyx_n_s_cosh, __pyx_k_cosh, sizeof(__pyx_k_cosh), 0, 0, 1, 1},
19400  {&__pyx_kp_u_cosh_line_1640, __pyx_k_cosh_line_1640, sizeof(__pyx_k_cosh_line_1640), 0, 1, 0, 0},
19401  {&__pyx_n_s_doctest, __pyx_k_doctest, sizeof(__pyx_k_doctest), 0, 0, 1, 1},
19402  {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
19403  {&__pyx_kp_u_e_line_1887, __pyx_k_e_line_1887, sizeof(__pyx_k_e_line_1887), 0, 1, 0, 0},
19404  {&__pyx_n_s_even, __pyx_k_even, sizeof(__pyx_k_even), 0, 0, 1, 1},
19405  {&__pyx_kp_u_even_line_1388, __pyx_k_even_line_1388, sizeof(__pyx_k_even_line_1388), 0, 1, 0, 0},
19406  {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
19407  {&__pyx_kp_u_exp_line_1565, __pyx_k_exp_line_1565, sizeof(__pyx_k_exp_line_1565), 0, 1, 0, 0},
19408  {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
19409  {&__pyx_n_s_frm, __pyx_k_frm, sizeof(__pyx_k_frm), 0, 0, 1, 1},
19410  {&__pyx_kp_s_from, __pyx_k_from, sizeof(__pyx_k_from), 0, 0, 1, 0},
19411  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
19412  {&__pyx_n_s_grade, __pyx_k_grade, sizeof(__pyx_k_grade), 0, 0, 1, 1},
19413  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
19414  {&__pyx_kp_u_imag_line_1366, __pyx_k_imag_line_1366, sizeof(__pyx_k_imag_line_1366), 0, 1, 0, 0},
19415  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
19416  {&__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},
19417  {&__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},
19418  {&__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},
19419  {&__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},
19420  {&__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},
19421  {&__pyx_n_s_index_set___iter, __pyx_k_index_set___iter, sizeof(__pyx_k_index_set___iter), 0, 0, 1, 1},
19422  {&__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},
19423  {&__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},
19424  {&__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},
19425  {&__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},
19426  {&__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},
19427  {&__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},
19428  {&__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},
19429  {&__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},
19430  {&__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},
19431  {&__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},
19432  {&__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},
19433  {&__pyx_n_s_index_set_hidden_doctests, __pyx_k_index_set_hidden_doctests, sizeof(__pyx_k_index_set_hidden_doctests), 0, 0, 1, 1},
19434  {&__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},
19435  {&__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},
19436  {&__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},
19437  {&__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},
19438  {&__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},
19439  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
19440  {&__pyx_kp_u_inv_line_1329, __pyx_k_inv_line_1329, sizeof(__pyx_k_inv_line_1329), 0, 1, 0, 0},
19441  {&__pyx_kp_s_invalid, __pyx_k_invalid, sizeof(__pyx_k_invalid), 0, 0, 1, 0},
19442  {&__pyx_kp_s_invalid_string, __pyx_k_invalid_string, sizeof(__pyx_k_invalid_string), 0, 0, 1, 0},
19443  {&__pyx_n_s_involute, __pyx_k_involute, sizeof(__pyx_k_involute), 0, 0, 1, 1},
19444  {&__pyx_kp_u_involute_line_1406, __pyx_k_involute_line_1406, sizeof(__pyx_k_involute_line_1406), 0, 1, 0, 0},
19445  {&__pyx_n_s_ist, __pyx_k_ist, sizeof(__pyx_k_ist), 0, 0, 1, 1},
19446  {&__pyx_n_s_istpq, __pyx_k_istpq, sizeof(__pyx_k_istpq), 0, 0, 1, 1},
19447  {&__pyx_kp_u_istpq_line_1900, __pyx_k_istpq_line_1900, sizeof(__pyx_k_istpq_line_1900), 0, 1, 0, 0},
19448  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
19449  {&__pyx_n_s_ixt, __pyx_k_ixt, sizeof(__pyx_k_ixt), 0, 0, 1, 1},
19450  {&__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},
19451  {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
19452  {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
19453  {&__pyx_kp_u_log_line_1579, __pyx_k_log_line_1579, sizeof(__pyx_k_log_line_1579), 0, 1, 0, 0},
19454  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
19455  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
19456  {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
19457  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
19458  {&__pyx_kp_u_max_abs_line_1482, __pyx_k_max_abs_line_1482, sizeof(__pyx_k_max_abs_line_1482), 0, 1, 0, 0},
19459  {&__pyx_kp_u_max_pos_line_511, __pyx_k_max_pos_line_511, sizeof(__pyx_k_max_pos_line_511), 0, 1, 0, 0},
19460  {&__pyx_n_s_min, __pyx_k_min, sizeof(__pyx_k_min), 0, 0, 1, 1},
19461  {&__pyx_kp_u_min_neg_line_502, __pyx_k_min_neg_line_502, sizeof(__pyx_k_min_neg_line_502), 0, 1, 0, 0},
19462  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
19463  {&__pyx_n_s_nbar3, __pyx_k_nbar3, sizeof(__pyx_k_nbar3), 0, 0, 1, 1},
19464  {&__pyx_n_s_ninf3, __pyx_k_ninf3, sizeof(__pyx_k_ninf3), 0, 0, 1, 1},
19465  {&__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},
19466  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
19467  {&__pyx_kp_u_norm_line_1462, __pyx_k_norm_line_1462, sizeof(__pyx_k_norm_line_1462), 0, 1, 0, 0},
19468  {&__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},
19469  {&__pyx_n_s_numbers, __pyx_k_numbers, sizeof(__pyx_k_numbers), 0, 0, 1, 1},
19470  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
19471  {&__pyx_n_s_odd, __pyx_k_odd, sizeof(__pyx_k_odd), 0, 0, 1, 1},
19472  {&__pyx_kp_u_odd_line_1397, __pyx_k_odd_line_1397, sizeof(__pyx_k_odd_line_1397), 0, 1, 0, 0},
19473  {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
19474  {&__pyx_n_s_outer_pow, __pyx_k_outer_pow, sizeof(__pyx_k_outer_pow), 0, 0, 1, 1},
19475  {&__pyx_kp_u_outer_pow_line_1518, __pyx_k_outer_pow_line_1518, sizeof(__pyx_k_outer_pow_line_1518), 0, 1, 0, 0},
19476  {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
19477  {&__pyx_n_s_pi, __pyx_k_pi, sizeof(__pyx_k_pi), 0, 0, 1, 1},
19478  {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
19479  {&__pyx_kp_u_pow_line_1494, __pyx_k_pow_line_1494, sizeof(__pyx_k_pow_line_1494), 0, 1, 0, 0},
19480  {&__pyx_n_s_pure, __pyx_k_pure, sizeof(__pyx_k_pure), 0, 0, 1, 1},
19481  {&__pyx_kp_u_pure_line_1377, __pyx_k_pure_line_1377, sizeof(__pyx_k_pure_line_1377), 0, 1, 0, 0},
19482  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
19483  {&__pyx_n_s_q, __pyx_k_q, sizeof(__pyx_k_q), 0, 0, 1, 1},
19484  {&__pyx_n_s_quad, __pyx_k_quad, sizeof(__pyx_k_quad), 0, 0, 1, 1},
19485  {&__pyx_kp_u_quad_line_1451, __pyx_k_quad_line_1451, sizeof(__pyx_k_quad_line_1451), 0, 1, 0, 0},
19486  {&__pyx_kp_u_random_clifford_line_1815, __pyx_k_random_clifford_line_1815, sizeof(__pyx_k_random_clifford_line_1815), 0, 1, 0, 0},
19487  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
19488  {&__pyx_kp_u_real_line_1355, __pyx_k_real_line_1355, sizeof(__pyx_k_real_line_1355), 0, 1, 0, 0},
19489  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
19490  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
19491  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
19492  {&__pyx_n_s_reverse, __pyx_k_reverse, sizeof(__pyx_k_reverse), 0, 0, 1, 1},
19493  {&__pyx_kp_u_reverse_line_1421, __pyx_k_reverse_line_1421, sizeof(__pyx_k_reverse_line_1421), 0, 1, 0, 0},
19494  {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
19495  {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
19496  {&__pyx_kp_u_scalar_line_1344, __pyx_k_scalar_line_1344, sizeof(__pyx_k_scalar_line_1344), 0, 1, 0, 0},
19497  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
19498  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
19499  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
19500  {&__pyx_n_s_sin, __pyx_k_sin, sizeof(__pyx_k_sin), 0, 0, 1, 1},
19501  {&__pyx_kp_u_sin_line_1679, __pyx_k_sin_line_1679, sizeof(__pyx_k_sin_line_1679), 0, 1, 0, 0},
19502  {&__pyx_n_s_sinh, __pyx_k_sinh, sizeof(__pyx_k_sinh), 0, 0, 1, 1},
19503  {&__pyx_kp_u_sinh_line_1719, __pyx_k_sinh_line_1719, sizeof(__pyx_k_sinh_line_1719), 0, 1, 0, 0},
19504  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
19505  {&__pyx_kp_u_sqrt_line_1542, __pyx_k_sqrt_line_1542, sizeof(__pyx_k_sqrt_line_1542), 0, 1, 0, 0},
19506  {&__pyx_n_s_tan, __pyx_k_tan, sizeof(__pyx_k_tan), 0, 0, 1, 1},
19507  {&__pyx_kp_u_tan_line_1752, __pyx_k_tan_line_1752, sizeof(__pyx_k_tan_line_1752), 0, 1, 0, 0},
19508  {&__pyx_n_s_tanh, __pyx_k_tanh, sizeof(__pyx_k_tanh), 0, 0, 1, 1},
19509  {&__pyx_kp_u_tanh_line_1786, __pyx_k_tanh_line_1786, sizeof(__pyx_k_tanh_line_1786), 0, 1, 0, 0},
19510  {&__pyx_n_s_tau, __pyx_k_tau, sizeof(__pyx_k_tau), 0, 0, 1, 1},
19511  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
19512  {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
19513  {&__pyx_n_s_testmod, __pyx_k_testmod, sizeof(__pyx_k_testmod), 0, 0, 1, 1},
19514  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
19515  {&__pyx_kp_s_to_frame, __pyx_k_to_frame, sizeof(__pyx_k_to_frame), 0, 0, 1, 0},
19516  {&__pyx_kp_s_using, __pyx_k_using, sizeof(__pyx_k_using), 0, 0, 1, 0},
19517  {&__pyx_kp_s_using_invalid, __pyx_k_using_invalid, sizeof(__pyx_k_using_invalid), 0, 0, 1, 0},
19518  {&__pyx_kp_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 0},
19519  {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
19520  {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
19521  {0, 0, 0, 0, 0, 0, 0}
19522 };
19523 static int __Pyx_InitCachedBuiltins(void) {
19524  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 102, __pyx_L1_error)
19525  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 104, __pyx_L1_error)
19526  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
19527  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 105, __pyx_L1_error)
19528  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 157, __pyx_L1_error)
19529  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 234, __pyx_L1_error)
19530  #if PY_MAJOR_VERSION >= 3
19531  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19532  #else
19533  __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 1098, __pyx_L1_error)
19534  #endif
19535  return 0;
19536  __pyx_L1_error:;
19537  return -1;
19538 }
19539 
19540 static int __Pyx_InitCachedConstants(void) {
19541  __Pyx_RefNannyDeclarations
19542  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
19543 
19544  /* "(tree fragment)":2
19545  * def __reduce_cython__(self):
19546  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19547  * def __setstate_cython__(self, __pyx_state):
19548  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19549  */
19550  __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)
19551  __Pyx_GOTREF(__pyx_tuple__3);
19552  __Pyx_GIVEREF(__pyx_tuple__3);
19553 
19554  /* "(tree fragment)":4
19555  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19556  * def __setstate_cython__(self, __pyx_state):
19557  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19558  */
19559  __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)
19560  __Pyx_GOTREF(__pyx_tuple__4);
19561  __Pyx_GIVEREF(__pyx_tuple__4);
19562 
19563  /* "PyClical.pyx":635
19564  * TypeError: Not applicable.
19565  * """
19566  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19567  *
19568  * def __iter__(self):
19569  */
19570  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 635, __pyx_L1_error)
19571  __Pyx_GOTREF(__pyx_tuple__10);
19572  __Pyx_GIVEREF(__pyx_tuple__10);
19573 
19574  /* "PyClical.pyx":646
19575  * TypeError: Not applicable.
19576  * """
19577  * raise TypeError("Not applicable.") # <<<<<<<<<<<<<<
19578  *
19579  * def reframe(self, ixt):
19580  */
19581  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Not_applicable); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 646, __pyx_L1_error)
19582  __Pyx_GOTREF(__pyx_tuple__11);
19583  __Pyx_GIVEREF(__pyx_tuple__11);
19584 
19585  /* "(tree fragment)":2
19586  * def __reduce_cython__(self):
19587  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19588  * def __setstate_cython__(self, __pyx_state):
19589  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19590  */
19591  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 2, __pyx_L1_error)
19592  __Pyx_GOTREF(__pyx_tuple__12);
19593  __Pyx_GIVEREF(__pyx_tuple__12);
19594 
19595  /* "(tree fragment)":4
19596  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
19597  * def __setstate_cython__(self, __pyx_state):
19598  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
19599  */
19600  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 4, __pyx_L1_error)
19601  __Pyx_GOTREF(__pyx_tuple__13);
19602  __Pyx_GIVEREF(__pyx_tuple__13);
19603 
19604  /* "PyClical.pyx":404
19605  * return index_set_to_str( self.unwrap() ).c_str()
19606  *
19607  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
19608  * """
19609  * Tests for functions that Doctest cannot see.
19610  */
19611  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_index_set_hidden_doctests, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 404, __pyx_L1_error)
19612 
19613  /* "PyClical.pyx":1243
19614  * return clifford_to_str( self.unwrap() ).c_str()
19615  *
19616  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
19617  * """
19618  * Tests for functions that Doctest cannot see.
19619  */
19620  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_clifford_hidden_doctests, 1243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 1243, __pyx_L1_error)
19621 
19622  /* "PyClical.pyx":1856
19623  *
19624  * # Some abbreviations.
19625  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
19626  * pi = tau / 2.0
19627  *
19628  */
19629  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_float_1_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1856, __pyx_L1_error)
19630  __Pyx_GOTREF(__pyx_tuple__16);
19631  __Pyx_GIVEREF(__pyx_tuple__16);
19632 
19633  /* "PyClical.pyx":1887
19634  * """
19635  *
19636  * def e(obj): # <<<<<<<<<<<<<<
19637  * """
19638  * Abbreviation for clifford(index_set(obj)).
19639  */
19640  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1887, __pyx_L1_error)
19641  __Pyx_GOTREF(__pyx_tuple__17);
19642  __Pyx_GIVEREF(__pyx_tuple__17);
19643  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_e, 1887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 1887, __pyx_L1_error)
19644 
19645  /* "PyClical.pyx":1900
19646  * return clifford(index_set(obj))
19647  *
19648  * def istpq(p, q): # <<<<<<<<<<<<<<
19649  * """
19650  * Abbreviation for index_set({-q,...p}).
19651  */
19652  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_n_s_p, __pyx_n_s_q); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1900, __pyx_L1_error)
19653  __Pyx_GOTREF(__pyx_tuple__19);
19654  __Pyx_GIVEREF(__pyx_tuple__19);
19655  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_istpq, 1900, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 1900, __pyx_L1_error)
19656 
19657  /* "PyClical.pyx":1909
19658  * return index_set(set(range(-q,p+1)))
19659  *
19660  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19661  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
19662  *
19663  */
19664  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1909, __pyx_L1_error)
19665  __Pyx_GOTREF(__pyx_tuple__21);
19666  __Pyx_GIVEREF(__pyx_tuple__21);
19667  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1909, __pyx_L1_error)
19668  __Pyx_GOTREF(__pyx_tuple__22);
19669  __Pyx_GIVEREF(__pyx_tuple__22);
19670 
19671  /* "PyClical.pyx":1910
19672  *
19673  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
19674  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
19675  *
19676  * # Doctest interface.
19677  */
19678  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_int_4); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1910, __pyx_L1_error)
19679  __Pyx_GOTREF(__pyx_tuple__23);
19680  __Pyx_GIVEREF(__pyx_tuple__23);
19681  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1910, __pyx_L1_error)
19682  __Pyx_GOTREF(__pyx_tuple__24);
19683  __Pyx_GIVEREF(__pyx_tuple__24);
19684 
19685  /* "PyClical.pyx":1913
19686  *
19687  * # Doctest interface.
19688  * def _test(): # <<<<<<<<<<<<<<
19689  * import PyClical, doctest
19690  * return doctest.testmod(PyClical)
19691  */
19692  __pyx_tuple__25 = PyTuple_Pack(2, __pyx_n_s_PyClical, __pyx_n_s_doctest); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1913, __pyx_L1_error)
19693  __Pyx_GOTREF(__pyx_tuple__25);
19694  __Pyx_GIVEREF(__pyx_tuple__25);
19695  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_PyClical_pyx, __pyx_n_s_test, 1913, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 1913, __pyx_L1_error)
19696  __Pyx_RefNannyFinishContext();
19697  return 0;
19698  __pyx_L1_error:;
19699  __Pyx_RefNannyFinishContext();
19700  return -1;
19701 }
19702 
19703 static int __Pyx_InitGlobals(void) {
19704  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
19705  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19706  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19707  __pyx_float_2_0 = PyFloat_FromDouble(2.0); if (unlikely(!__pyx_float_2_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19708  __pyx_float_8_0 = PyFloat_FromDouble(8.0); if (unlikely(!__pyx_float_8_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19709  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
19710  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19711  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
19712  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
19713  return 0;
19714  __pyx_L1_error:;
19715  return -1;
19716 }
19717 
19718 static int __Pyx_modinit_global_init_code(void); /*proto*/
19719 static int __Pyx_modinit_variable_export_code(void); /*proto*/
19720 static int __Pyx_modinit_function_export_code(void); /*proto*/
19721 static int __Pyx_modinit_type_init_code(void); /*proto*/
19722 static int __Pyx_modinit_type_import_code(void); /*proto*/
19723 static int __Pyx_modinit_variable_import_code(void); /*proto*/
19724 static int __Pyx_modinit_function_import_code(void); /*proto*/
19725 
19726 static int __Pyx_modinit_global_init_code(void) {
19727  __Pyx_RefNannyDeclarations
19728  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
19729  /*--- Global init code ---*/
19730  __Pyx_RefNannyFinishContext();
19731  return 0;
19732 }
19733 
19734 static int __Pyx_modinit_variable_export_code(void) {
19735  __Pyx_RefNannyDeclarations
19736  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
19737  /*--- Variable export code ---*/
19738  __Pyx_RefNannyFinishContext();
19739  return 0;
19740 }
19741 
19742 static int __Pyx_modinit_function_export_code(void) {
19743  __Pyx_RefNannyDeclarations
19744  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
19745  /*--- Function export code ---*/
19746  __Pyx_RefNannyFinishContext();
19747  return 0;
19748 }
19749 
19750 static int __Pyx_modinit_type_init_code(void) {
19751  __Pyx_RefNannyDeclarations
19752  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
19753  /*--- Type init code ---*/
19754  __pyx_vtabptr_8PyClical_index_set = &__pyx_vtable_8PyClical_index_set;
19755  __pyx_vtable_8PyClical_index_set.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, IndexSet))__pyx_f_8PyClical_9index_set_wrap;
19756  __pyx_vtable_8PyClical_index_set.unwrap = (IndexSet (*)(struct __pyx_obj_8PyClical_index_set *))__pyx_f_8PyClical_9index_set_unwrap;
19757  __pyx_vtable_8PyClical_index_set.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_index_set *, int __pyx_skip_dispatch))__pyx_f_8PyClical_9index_set_copy;
19758  if (PyType_Ready(&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19759  __pyx_type_8PyClical_index_set.tp_print = 0;
19760  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)) {
19761  __pyx_type_8PyClical_index_set.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19762  }
19763  #if CYTHON_COMPILING_IN_CPYTHON
19764  {
19765  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19766  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19767  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19768  __pyx_wrapperbase_8PyClical_9index_set_8__setitem__.doc = __pyx_doc_8PyClical_9index_set_8__setitem__;
19769  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_8__setitem__;
19770  }
19771  }
19772  #endif
19773  #if CYTHON_COMPILING_IN_CPYTHON
19774  {
19775  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19776  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19777  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19778  __pyx_wrapperbase_8PyClical_9index_set_10__getitem__.doc = __pyx_doc_8PyClical_9index_set_10__getitem__;
19779  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_10__getitem__;
19780  }
19781  }
19782  #endif
19783  #if CYTHON_COMPILING_IN_CPYTHON
19784  {
19785  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19786  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19787  __pyx_wrapperbase_8PyClical_9index_set_12__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19788  __pyx_wrapperbase_8PyClical_9index_set_12__contains__.doc = __pyx_doc_8PyClical_9index_set_12__contains__;
19789  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_12__contains__;
19790  }
19791  }
19792  #endif
19793  #if CYTHON_COMPILING_IN_CPYTHON
19794  {
19795  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19796  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19797  __pyx_wrapperbase_8PyClical_9index_set_14__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19798  __pyx_wrapperbase_8PyClical_9index_set_14__iter__.doc = __pyx_doc_8PyClical_9index_set_14__iter__;
19799  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_14__iter__;
19800  }
19801  }
19802  #endif
19803  #if CYTHON_COMPILING_IN_CPYTHON
19804  {
19805  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__invert__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19806  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19807  __pyx_wrapperbase_8PyClical_9index_set_17__invert__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19808  __pyx_wrapperbase_8PyClical_9index_set_17__invert__.doc = __pyx_doc_8PyClical_9index_set_17__invert__;
19809  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_17__invert__;
19810  }
19811  }
19812  #endif
19813  #if CYTHON_COMPILING_IN_CPYTHON
19814  {
19815  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19816  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19817  __pyx_wrapperbase_8PyClical_9index_set_19__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19818  __pyx_wrapperbase_8PyClical_9index_set_19__xor__.doc = __pyx_doc_8PyClical_9index_set_19__xor__;
19819  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_19__xor__;
19820  }
19821  }
19822  #endif
19823  #if CYTHON_COMPILING_IN_CPYTHON
19824  {
19825  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19826  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19827  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19828  __pyx_wrapperbase_8PyClical_9index_set_21__ixor__.doc = __pyx_doc_8PyClical_9index_set_21__ixor__;
19829  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_21__ixor__;
19830  }
19831  }
19832  #endif
19833  #if CYTHON_COMPILING_IN_CPYTHON
19834  {
19835  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19836  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19837  __pyx_wrapperbase_8PyClical_9index_set_23__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19838  __pyx_wrapperbase_8PyClical_9index_set_23__and__.doc = __pyx_doc_8PyClical_9index_set_23__and__;
19839  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_23__and__;
19840  }
19841  }
19842  #endif
19843  #if CYTHON_COMPILING_IN_CPYTHON
19844  {
19845  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19846  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19847  __pyx_wrapperbase_8PyClical_9index_set_25__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19848  __pyx_wrapperbase_8PyClical_9index_set_25__iand__.doc = __pyx_doc_8PyClical_9index_set_25__iand__;
19849  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_25__iand__;
19850  }
19851  }
19852  #endif
19853  #if CYTHON_COMPILING_IN_CPYTHON
19854  {
19855  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19856  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19857  __pyx_wrapperbase_8PyClical_9index_set_27__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19858  __pyx_wrapperbase_8PyClical_9index_set_27__or__.doc = __pyx_doc_8PyClical_9index_set_27__or__;
19859  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_27__or__;
19860  }
19861  }
19862  #endif
19863  #if CYTHON_COMPILING_IN_CPYTHON
19864  {
19865  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19866  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19867  __pyx_wrapperbase_8PyClical_9index_set_29__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19868  __pyx_wrapperbase_8PyClical_9index_set_29__ior__.doc = __pyx_doc_8PyClical_9index_set_29__ior__;
19869  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_29__ior__;
19870  }
19871  }
19872  #endif
19873  #if CYTHON_COMPILING_IN_CPYTHON
19874  {
19875  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19876  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19877  __pyx_wrapperbase_8PyClical_9index_set_47__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19878  __pyx_wrapperbase_8PyClical_9index_set_47__repr__.doc = __pyx_doc_8PyClical_9index_set_47__repr__;
19879  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_47__repr__;
19880  }
19881  }
19882  #endif
19883  #if CYTHON_COMPILING_IN_CPYTHON
19884  {
19885  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_index_set, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 45, __pyx_L1_error)
19886  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19887  __pyx_wrapperbase_8PyClical_9index_set_49__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19888  __pyx_wrapperbase_8PyClical_9index_set_49__str__.doc = __pyx_doc_8PyClical_9index_set_49__str__;
19889  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_9index_set_49__str__;
19890  }
19891  }
19892  #endif
19893  if (__Pyx_SetVtable(__pyx_type_8PyClical_index_set.tp_dict, __pyx_vtabptr_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19894  if (PyObject_SetAttrString(__pyx_m, "index_set", (PyObject *)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19895  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_index_set) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
19896  __pyx_ptype_8PyClical_index_set = &__pyx_type_8PyClical_index_set;
19897  __pyx_vtabptr_8PyClical_clifford = &__pyx_vtable_8PyClical_clifford;
19898  __pyx_vtable_8PyClical_clifford.wrap = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, Clifford))__pyx_f_8PyClical_8clifford_wrap;
19899  __pyx_vtable_8PyClical_clifford.unwrap = (Clifford (*)(struct __pyx_obj_8PyClical_clifford *))__pyx_f_8PyClical_8clifford_unwrap;
19900  __pyx_vtable_8PyClical_clifford.copy = (PyObject *(*)(struct __pyx_obj_8PyClical_clifford *, int __pyx_skip_dispatch))__pyx_f_8PyClical_8clifford_copy;
19901  if (PyType_Ready(&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
19902  __pyx_type_8PyClical_clifford.tp_print = 0;
19903  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8PyClical_clifford.tp_dictoffset && __pyx_type_8PyClical_clifford.tp_getattro == PyObject_GenericGetAttr)) {
19904  __pyx_type_8PyClical_clifford.tp_getattro = __Pyx_PyObject_GenericGetAttr;
19905  }
19906  #if CYTHON_COMPILING_IN_CPYTHON
19907  {
19908  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19909  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19910  __pyx_wrapperbase_8PyClical_8clifford_6__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19911  __pyx_wrapperbase_8PyClical_8clifford_6__contains__.doc = __pyx_doc_8PyClical_8clifford_6__contains__;
19912  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_6__contains__;
19913  }
19914  }
19915  #endif
19916  #if CYTHON_COMPILING_IN_CPYTHON
19917  {
19918  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iter__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19919  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19920  __pyx_wrapperbase_8PyClical_8clifford_8__iter__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19921  __pyx_wrapperbase_8PyClical_8clifford_8__iter__.doc = __pyx_doc_8PyClical_8clifford_8__iter__;
19922  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_8__iter__;
19923  }
19924  }
19925  #endif
19926  #if CYTHON_COMPILING_IN_CPYTHON
19927  {
19928  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19929  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19930  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19931  __pyx_wrapperbase_8PyClical_8clifford_14__getitem__.doc = __pyx_doc_8PyClical_8clifford_14__getitem__;
19932  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_14__getitem__;
19933  }
19934  }
19935  #endif
19936  #if CYTHON_COMPILING_IN_CPYTHON
19937  {
19938  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__neg__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19939  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19940  __pyx_wrapperbase_8PyClical_8clifford_16__neg__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19941  __pyx_wrapperbase_8PyClical_8clifford_16__neg__.doc = __pyx_doc_8PyClical_8clifford_16__neg__;
19942  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_16__neg__;
19943  }
19944  }
19945  #endif
19946  #if CYTHON_COMPILING_IN_CPYTHON
19947  {
19948  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pos__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19949  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19950  __pyx_wrapperbase_8PyClical_8clifford_18__pos__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19951  __pyx_wrapperbase_8PyClical_8clifford_18__pos__.doc = __pyx_doc_8PyClical_8clifford_18__pos__;
19952  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_18__pos__;
19953  }
19954  }
19955  #endif
19956  #if CYTHON_COMPILING_IN_CPYTHON
19957  {
19958  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__add__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19959  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19960  __pyx_wrapperbase_8PyClical_8clifford_20__add__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19961  __pyx_wrapperbase_8PyClical_8clifford_20__add__.doc = __pyx_doc_8PyClical_8clifford_20__add__;
19962  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_20__add__;
19963  }
19964  }
19965  #endif
19966  #if CYTHON_COMPILING_IN_CPYTHON
19967  {
19968  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iadd__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19969  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19970  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19971  __pyx_wrapperbase_8PyClical_8clifford_22__iadd__.doc = __pyx_doc_8PyClical_8clifford_22__iadd__;
19972  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_22__iadd__;
19973  }
19974  }
19975  #endif
19976  #if CYTHON_COMPILING_IN_CPYTHON
19977  {
19978  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__sub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19979  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19980  __pyx_wrapperbase_8PyClical_8clifford_24__sub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19981  __pyx_wrapperbase_8PyClical_8clifford_24__sub__.doc = __pyx_doc_8PyClical_8clifford_24__sub__;
19982  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_24__sub__;
19983  }
19984  }
19985  #endif
19986  #if CYTHON_COMPILING_IN_CPYTHON
19987  {
19988  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__isub__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19989  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
19990  __pyx_wrapperbase_8PyClical_8clifford_26__isub__ = *((PyWrapperDescrObject *)wrapper)->d_base;
19991  __pyx_wrapperbase_8PyClical_8clifford_26__isub__.doc = __pyx_doc_8PyClical_8clifford_26__isub__;
19992  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_26__isub__;
19993  }
19994  }
19995  #endif
19996  #if CYTHON_COMPILING_IN_CPYTHON
19997  {
19998  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
19999  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20000  __pyx_wrapperbase_8PyClical_8clifford_28__mul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20001  __pyx_wrapperbase_8PyClical_8clifford_28__mul__.doc = __pyx_doc_8PyClical_8clifford_28__mul__;
20002  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_28__mul__;
20003  }
20004  }
20005  #endif
20006  #if CYTHON_COMPILING_IN_CPYTHON
20007  {
20008  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imul__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20009  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20010  __pyx_wrapperbase_8PyClical_8clifford_30__imul__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20011  __pyx_wrapperbase_8PyClical_8clifford_30__imul__.doc = __pyx_doc_8PyClical_8clifford_30__imul__;
20012  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_30__imul__;
20013  }
20014  }
20015  #endif
20016  #if CYTHON_COMPILING_IN_CPYTHON
20017  {
20018  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__mod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20019  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20020  __pyx_wrapperbase_8PyClical_8clifford_32__mod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20021  __pyx_wrapperbase_8PyClical_8clifford_32__mod__.doc = __pyx_doc_8PyClical_8clifford_32__mod__;
20022  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_32__mod__;
20023  }
20024  }
20025  #endif
20026  #if CYTHON_COMPILING_IN_CPYTHON
20027  {
20028  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__imod__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20029  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20030  __pyx_wrapperbase_8PyClical_8clifford_34__imod__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20031  __pyx_wrapperbase_8PyClical_8clifford_34__imod__.doc = __pyx_doc_8PyClical_8clifford_34__imod__;
20032  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_34__imod__;
20033  }
20034  }
20035  #endif
20036  #if CYTHON_COMPILING_IN_CPYTHON
20037  {
20038  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__and__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20039  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20040  __pyx_wrapperbase_8PyClical_8clifford_36__and__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20041  __pyx_wrapperbase_8PyClical_8clifford_36__and__.doc = __pyx_doc_8PyClical_8clifford_36__and__;
20042  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_36__and__;
20043  }
20044  }
20045  #endif
20046  #if CYTHON_COMPILING_IN_CPYTHON
20047  {
20048  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__iand__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20049  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20050  __pyx_wrapperbase_8PyClical_8clifford_38__iand__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20051  __pyx_wrapperbase_8PyClical_8clifford_38__iand__.doc = __pyx_doc_8PyClical_8clifford_38__iand__;
20052  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_38__iand__;
20053  }
20054  }
20055  #endif
20056  #if CYTHON_COMPILING_IN_CPYTHON
20057  {
20058  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__xor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20059  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20060  __pyx_wrapperbase_8PyClical_8clifford_40__xor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20061  __pyx_wrapperbase_8PyClical_8clifford_40__xor__.doc = __pyx_doc_8PyClical_8clifford_40__xor__;
20062  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_40__xor__;
20063  }
20064  }
20065  #endif
20066  #if CYTHON_COMPILING_IN_CPYTHON
20067  {
20068  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ixor__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20069  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20070  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20071  __pyx_wrapperbase_8PyClical_8clifford_42__ixor__.doc = __pyx_doc_8PyClical_8clifford_42__ixor__;
20072  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_42__ixor__;
20073  }
20074  }
20075  #endif
20076  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20077  #if CYTHON_COMPILING_IN_CPYTHON
20078  {
20079  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__div__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20080  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20081  __pyx_wrapperbase_8PyClical_8clifford_44__div__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20082  __pyx_wrapperbase_8PyClical_8clifford_44__div__.doc = __pyx_doc_8PyClical_8clifford_44__div__;
20083  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_44__div__;
20084  }
20085  }
20086  #endif
20087  #endif
20088  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
20089  #if CYTHON_COMPILING_IN_CPYTHON
20090  {
20091  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__idiv__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20092  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20093  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20094  __pyx_wrapperbase_8PyClical_8clifford_46__idiv__.doc = __pyx_doc_8PyClical_8clifford_46__idiv__;
20095  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_46__idiv__;
20096  }
20097  }
20098  #endif
20099  #endif
20100  #if CYTHON_COMPILING_IN_CPYTHON
20101  {
20102  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__or__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20103  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20104  __pyx_wrapperbase_8PyClical_8clifford_50__or__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20105  __pyx_wrapperbase_8PyClical_8clifford_50__or__.doc = __pyx_doc_8PyClical_8clifford_50__or__;
20106  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_50__or__;
20107  }
20108  }
20109  #endif
20110  #if CYTHON_COMPILING_IN_CPYTHON
20111  {
20112  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__ior__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20113  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20114  __pyx_wrapperbase_8PyClical_8clifford_52__ior__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20115  __pyx_wrapperbase_8PyClical_8clifford_52__ior__.doc = __pyx_doc_8PyClical_8clifford_52__ior__;
20116  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_52__ior__;
20117  }
20118  }
20119  #endif
20120  #if CYTHON_COMPILING_IN_CPYTHON
20121  {
20122  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__pow__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20123  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20124  __pyx_wrapperbase_8PyClical_8clifford_54__pow__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20125  __pyx_wrapperbase_8PyClical_8clifford_54__pow__.doc = __pyx_doc_8PyClical_8clifford_54__pow__;
20126  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_54__pow__;
20127  }
20128  }
20129  #endif
20130  #if CYTHON_COMPILING_IN_CPYTHON
20131  {
20132  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20133  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20134  __pyx_wrapperbase_8PyClical_8clifford_60__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20135  __pyx_wrapperbase_8PyClical_8clifford_60__call__.doc = __pyx_doc_8PyClical_8clifford_60__call__;
20136  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_60__call__;
20137  }
20138  }
20139  #endif
20140  #if CYTHON_COMPILING_IN_CPYTHON
20141  {
20142  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20143  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20144  __pyx_wrapperbase_8PyClical_8clifford_92__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20145  __pyx_wrapperbase_8PyClical_8clifford_92__repr__.doc = __pyx_doc_8PyClical_8clifford_92__repr__;
20146  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_92__repr__;
20147  }
20148  }
20149  #endif
20150  #if CYTHON_COMPILING_IN_CPYTHON
20151  {
20152  PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8PyClical_clifford, "__str__"); if (unlikely(!wrapper)) __PYX_ERR(0, 535, __pyx_L1_error)
20153  if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
20154  __pyx_wrapperbase_8PyClical_8clifford_94__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
20155  __pyx_wrapperbase_8PyClical_8clifford_94__str__.doc = __pyx_doc_8PyClical_8clifford_94__str__;
20156  ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8PyClical_8clifford_94__str__;
20157  }
20158  }
20159  #endif
20160  if (__Pyx_SetVtable(__pyx_type_8PyClical_clifford.tp_dict, __pyx_vtabptr_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20161  if (PyObject_SetAttrString(__pyx_m, "clifford", (PyObject *)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20162  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8PyClical_clifford) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
20163  __pyx_ptype_8PyClical_clifford = &__pyx_type_8PyClical_clifford;
20164  if (PyType_Ready(&__pyx_type_8PyClical___pyx_scope_struct____iter__) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
20165  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_print = 0;
20166  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)) {
20167  __pyx_type_8PyClical___pyx_scope_struct____iter__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
20168  }
20169  __pyx_ptype_8PyClical___pyx_scope_struct____iter__ = &__pyx_type_8PyClical___pyx_scope_struct____iter__;
20170  __Pyx_RefNannyFinishContext();
20171  return 0;
20172  __pyx_L1_error:;
20173  __Pyx_RefNannyFinishContext();
20174  return -1;
20175 }
20176 
20177 static int __Pyx_modinit_type_import_code(void) {
20178  __Pyx_RefNannyDeclarations
20179  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
20180  /*--- Type import code ---*/
20181  __Pyx_RefNannyFinishContext();
20182  return 0;
20183 }
20184 
20185 static int __Pyx_modinit_variable_import_code(void) {
20186  __Pyx_RefNannyDeclarations
20187  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
20188  /*--- Variable import code ---*/
20189  __Pyx_RefNannyFinishContext();
20190  return 0;
20191 }
20192 
20193 static int __Pyx_modinit_function_import_code(void) {
20194  __Pyx_RefNannyDeclarations
20195  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
20196  /*--- Function import code ---*/
20197  __Pyx_RefNannyFinishContext();
20198  return 0;
20199 }
20200 
20201 
20202 #if PY_MAJOR_VERSION < 3
20203 #ifdef CYTHON_NO_PYINIT_EXPORT
20204 #define __Pyx_PyMODINIT_FUNC void
20205 #else
20206 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20207 #endif
20208 #else
20209 #ifdef CYTHON_NO_PYINIT_EXPORT
20210 #define __Pyx_PyMODINIT_FUNC PyObject *
20211 #else
20212 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
20213 #endif
20214 #endif
20215 #ifndef CYTHON_SMALL_CODE
20216 #if defined(__clang__)
20217  #define CYTHON_SMALL_CODE
20218 #elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
20219  #define CYTHON_SMALL_CODE __attribute__((cold))
20220 #else
20221  #define CYTHON_SMALL_CODE
20222 #endif
20223 #endif
20224 
20225 
20226 #if PY_MAJOR_VERSION < 3
20227 __Pyx_PyMODINIT_FUNC initPyClical(void) CYTHON_SMALL_CODE; /*proto*/
20228 __Pyx_PyMODINIT_FUNC initPyClical(void)
20229 #else
20230 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void) CYTHON_SMALL_CODE; /*proto*/
20231 __Pyx_PyMODINIT_FUNC PyInit_PyClical(void)
20232 #if CYTHON_PEP489_MULTI_PHASE_INIT
20233 {
20234  return PyModuleDef_Init(&__pyx_moduledef);
20235 }
20236 static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
20237  PyObject *value = PyObject_GetAttrString(spec, from_name);
20238  int result = 0;
20239  if (likely(value)) {
20240  result = PyDict_SetItemString(moddict, to_name, value);
20241  Py_DECREF(value);
20242  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
20243  PyErr_Clear();
20244  } else {
20245  result = -1;
20246  }
20247  return result;
20248 }
20249 static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
20250  PyObject *module = NULL, *moddict, *modname;
20251  if (__pyx_m)
20252  return __Pyx_NewRef(__pyx_m);
20253  modname = PyObject_GetAttrString(spec, "name");
20254  if (unlikely(!modname)) goto bad;
20255  module = PyModule_NewObject(modname);
20256  Py_DECREF(modname);
20257  if (unlikely(!module)) goto bad;
20258  moddict = PyModule_GetDict(module);
20259  if (unlikely(!moddict)) goto bad;
20260  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
20261  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
20262  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
20263  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
20264  return module;
20265 bad:
20266  Py_XDECREF(module);
20267  return NULL;
20268 }
20269 
20270 
20271 static int __pyx_pymod_exec_PyClical(PyObject *__pyx_pyinit_module)
20272 #endif
20273 #endif
20274 {
20275  PyObject *__pyx_t_1 = NULL;
20276  PyObject *__pyx_t_2 = NULL;
20277  PyObject *__pyx_t_3 = NULL;
20278  int __pyx_t_4;
20279  __Pyx_RefNannyDeclarations
20280  #if CYTHON_PEP489_MULTI_PHASE_INIT
20281  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
20282  #elif PY_MAJOR_VERSION >= 3
20283  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
20284  #endif
20285  #if CYTHON_REFNANNY
20286 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
20287 if (!__Pyx_RefNanny) {
20288  PyErr_Clear();
20289  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
20290  if (!__Pyx_RefNanny)
20291  Py_FatalError("failed to import 'refnanny' module");
20292 }
20293 #endif
20294  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_PyClical(void)", 0);
20295  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20296  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
20297  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
20298  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
20299  #ifdef __Pyx_CyFunction_USED
20300  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20301  #endif
20302  #ifdef __Pyx_FusedFunction_USED
20303  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20304  #endif
20305  #ifdef __Pyx_Coroutine_USED
20306  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20307  #endif
20308  #ifdef __Pyx_Generator_USED
20309  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20310  #endif
20311  #ifdef __Pyx_AsyncGen_USED
20312  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20313  #endif
20314  #ifdef __Pyx_StopAsyncIteration_USED
20315  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20316  #endif
20317  /*--- Library function declarations ---*/
20318  /*--- Threads initialization code ---*/
20319  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
20320  #ifdef WITH_THREAD /* Python build with threading support? */
20321  PyEval_InitThreads();
20322  #endif
20323  #endif
20324  /*--- Module creation code ---*/
20325  #if CYTHON_PEP489_MULTI_PHASE_INIT
20326  __pyx_m = __pyx_pyinit_module;
20327  Py_INCREF(__pyx_m);
20328  #else
20329  #if PY_MAJOR_VERSION < 3
20330  __pyx_m = Py_InitModule4("PyClical", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
20331  #else
20332  __pyx_m = PyModule_Create(&__pyx_moduledef);
20333  #endif
20334  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
20335  #endif
20336  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
20337  Py_INCREF(__pyx_d);
20338  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
20339  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
20340  #if CYTHON_COMPILING_IN_PYPY
20341  Py_INCREF(__pyx_b);
20342  #endif
20343  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
20344  /*--- Initialize various global constants etc. ---*/
20345  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20346  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
20347  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20348  #endif
20349  if (__pyx_module_is_main_PyClical) {
20350  if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20351  }
20352  #if PY_MAJOR_VERSION >= 3
20353  {
20354  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
20355  if (!PyDict_GetItemString(modules, "PyClical")) {
20356  if (unlikely(PyDict_SetItemString(modules, "PyClical", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
20357  }
20358  }
20359  #endif
20360  /*--- Builtin init code ---*/
20361  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20362  /*--- Constants init code ---*/
20363  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20364  /*--- Global type/function init code ---*/
20365  (void)__Pyx_modinit_global_init_code();
20366  (void)__Pyx_modinit_variable_export_code();
20367  (void)__Pyx_modinit_function_export_code();
20368  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
20369  (void)__Pyx_modinit_type_import_code();
20370  (void)__Pyx_modinit_variable_import_code();
20371  (void)__Pyx_modinit_function_import_code();
20372  /*--- Execution code ---*/
20373  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
20374  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20375  #endif
20376 
20377  /* "PyClical.pyx":28
20378  * # C. Doran and A. Lasenby, "Geometric algebra for physicists", Cambridge, 2003.
20379  *
20380  * import math # <<<<<<<<<<<<<<
20381  * import numbers
20382  * import collections
20383  */
20384  __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
20385  __Pyx_GOTREF(__pyx_t_1);
20386  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
20387  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20388 
20389  /* "PyClical.pyx":29
20390  *
20391  * import math
20392  * import numbers # <<<<<<<<<<<<<<
20393  * import collections
20394  *
20395  */
20396  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numbers, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
20397  __Pyx_GOTREF(__pyx_t_1);
20398  if (PyDict_SetItem(__pyx_d, __pyx_n_s_numbers, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
20399  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20400 
20401  /* "PyClical.pyx":30
20402  * import math
20403  * import numbers
20404  * import collections # <<<<<<<<<<<<<<
20405  *
20406  * __version__ = "0.8.2"
20407  */
20408  __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
20409  __Pyx_GOTREF(__pyx_t_1);
20410  if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
20411  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20412 
20413  /* "PyClical.pyx":32
20414  * import collections
20415  *
20416  * __version__ = "0.8.2" # <<<<<<<<<<<<<<
20417  *
20418  * from PyClical cimport *
20419  */
20420  if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_s_0_8_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
20421 
20422  /* "PyClical.pyx":404
20423  * return index_set_to_str( self.unwrap() ).c_str()
20424  *
20425  * def index_set_hidden_doctests(): # <<<<<<<<<<<<<<
20426  * """
20427  * Tests for functions that Doctest cannot see.
20428  */
20429  __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)
20430  __Pyx_GOTREF(__pyx_t_1);
20431  if (PyDict_SetItem(__pyx_d, __pyx_n_s_index_set_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
20432  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20433 
20434  /* "PyClical.pyx":1243
20435  * return clifford_to_str( self.unwrap() ).c_str()
20436  *
20437  * def clifford_hidden_doctests(): # <<<<<<<<<<<<<<
20438  * """
20439  * Tests for functions that Doctest cannot see.
20440  */
20441  __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)
20442  __Pyx_GOTREF(__pyx_t_1);
20443  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clifford_hidden_doctests, __pyx_t_1) < 0) __PYX_ERR(0, 1243, __pyx_L1_error)
20444  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20445 
20446  /* "PyClical.pyx":1856
20447  *
20448  * # Some abbreviations.
20449  * tau = atan(clifford(1.0)) * 8.0 # <<<<<<<<<<<<<<
20450  * pi = tau / 2.0
20451  *
20452  */
20453  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8PyClical_clifford), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20454  __Pyx_GOTREF(__pyx_t_1);
20455  __pyx_t_2 = __pyx_f_8PyClical_atan(__pyx_t_1, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
20456  __Pyx_GOTREF(__pyx_t_2);
20457  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20458  __pyx_t_1 = PyNumber_Multiply(__pyx_t_2, __pyx_float_8_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error)
20459  __Pyx_GOTREF(__pyx_t_1);
20460  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20461  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tau, __pyx_t_1) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
20462  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20463 
20464  /* "PyClical.pyx":1857
20465  * # Some abbreviations.
20466  * tau = atan(clifford(1.0)) * 8.0
20467  * pi = tau / 2.0 # <<<<<<<<<<<<<<
20468  *
20469  * cl = clifford
20470  */
20471  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_tau); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
20472  __Pyx_GOTREF(__pyx_t_1);
20473  __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_2_0, 2.0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
20474  __Pyx_GOTREF(__pyx_t_2);
20475  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20476  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pi, __pyx_t_2) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)
20477  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20478 
20479  /* "PyClical.pyx":1859
20480  * pi = tau / 2.0
20481  *
20482  * cl = clifford # <<<<<<<<<<<<<<
20483  * """
20484  * Abbreviation for clifford.
20485  */
20486  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cl, ((PyObject *)__pyx_ptype_8PyClical_clifford)) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
20487 
20488  /* "PyClical.pyx":1879
20489  * """
20490  *
20491  * ist = index_set # <<<<<<<<<<<<<<
20492  * """
20493  * Abbreviation for index_set.
20494  */
20495  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ist, ((PyObject *)__pyx_ptype_8PyClical_index_set)) < 0) __PYX_ERR(0, 1879, __pyx_L1_error)
20496 
20497  /* "PyClical.pyx":1887
20498  * """
20499  *
20500  * def e(obj): # <<<<<<<<<<<<<<
20501  * """
20502  * Abbreviation for clifford(index_set(obj)).
20503  */
20504  __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)
20505  __Pyx_GOTREF(__pyx_t_2);
20506  if (PyDict_SetItem(__pyx_d, __pyx_n_s_e, __pyx_t_2) < 0) __PYX_ERR(0, 1887, __pyx_L1_error)
20507  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20508 
20509  /* "PyClical.pyx":1900
20510  * return clifford(index_set(obj))
20511  *
20512  * def istpq(p, q): # <<<<<<<<<<<<<<
20513  * """
20514  * Abbreviation for index_set({-q,...p}).
20515  */
20516  __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)
20517  __Pyx_GOTREF(__pyx_t_2);
20518  if (PyDict_SetItem(__pyx_d, __pyx_n_s_istpq, __pyx_t_2) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
20519  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20520 
20521  /* "PyClical.pyx":1909
20522  * return index_set(set(range(-q,p+1)))
20523  *
20524  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20525  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL].
20526  *
20527  */
20528  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20529  __Pyx_GOTREF(__pyx_t_2);
20530  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L1_error)
20531  __Pyx_GOTREF(__pyx_t_1);
20532  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20533  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20534  __Pyx_GOTREF(__pyx_t_2);
20535  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error)
20536  __Pyx_GOTREF(__pyx_t_3);
20537  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20538  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
20539  __Pyx_GOTREF(__pyx_t_2);
20540  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20541  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20542  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ninf3, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
20543  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20544 
20545  /* "PyClical.pyx":1910
20546  *
20547  * ninf3 = e(4) + e(-1) # Null infinity point in 3D Conformal Geometric Algebra [DL].
20548  * nbar3 = e(4) - e(-1) # Null bar point in 3D Conformal Geometric Algebra [DL]. # <<<<<<<<<<<<<<
20549  *
20550  * # Doctest interface.
20551  */
20552  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20553  __Pyx_GOTREF(__pyx_t_2);
20554  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L1_error)
20555  __Pyx_GOTREF(__pyx_t_3);
20556  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20557  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20558  __Pyx_GOTREF(__pyx_t_2);
20559  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error)
20560  __Pyx_GOTREF(__pyx_t_1);
20561  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20562  __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1910, __pyx_L1_error)
20563  __Pyx_GOTREF(__pyx_t_2);
20564  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20565  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20566  if (PyDict_SetItem(__pyx_d, __pyx_n_s_nbar3, __pyx_t_2) < 0) __PYX_ERR(0, 1910, __pyx_L1_error)
20567  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20568 
20569  /* "PyClical.pyx":1913
20570  *
20571  * # Doctest interface.
20572  * def _test(): # <<<<<<<<<<<<<<
20573  * import PyClical, doctest
20574  * return doctest.testmod(PyClical)
20575  */
20576  __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)
20577  __Pyx_GOTREF(__pyx_t_2);
20578  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
20579  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20580 
20581  /* "PyClical.pyx":1917
20582  * return doctest.testmod(PyClical)
20583  *
20584  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20585  * _test()
20586  */
20587  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error)
20588  __Pyx_GOTREF(__pyx_t_2);
20589  __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)
20590  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20591  if (__pyx_t_4) {
20592 
20593  /* "PyClical.pyx":1918
20594  *
20595  * if __name__ == "__main__":
20596  * _test() # <<<<<<<<<<<<<<
20597  */
20598  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_test); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
20599  __Pyx_GOTREF(__pyx_t_2);
20600  __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
20601  __Pyx_GOTREF(__pyx_t_1);
20602  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20603  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20604 
20605  /* "PyClical.pyx":1917
20606  * return doctest.testmod(PyClical)
20607  *
20608  * if __name__ == "__main__": # <<<<<<<<<<<<<<
20609  * _test()
20610  */
20611  }
20612 
20613  /* "PyClical.pyx":1
20614  * # -*- coding: utf-8 -*- # <<<<<<<<<<<<<<
20615  * # distutils: language = c++
20616  * #
20617  */
20618  __pyx_t_1 = __Pyx_PyDict_NewPresized(107); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
20619  __Pyx_GOTREF(__pyx_t_1);
20620  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)
20621  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)
20622  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)
20623  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)
20624  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)
20625  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)
20626  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)
20627  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)
20628  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)
20629  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)
20630  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)
20631  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)
20632  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)
20633  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)
20634  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)
20635  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)
20636  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)
20637  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)
20638  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)
20639  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)
20640  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)
20641  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)
20642  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)
20643  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)
20644  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)
20645  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)
20646  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)
20647  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)
20648  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)
20649  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)
20650  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)
20651  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)
20652  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)
20653  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)
20654  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)
20655  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)
20656  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)
20657  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)
20658  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)
20659  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)
20660  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)
20661  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)
20662  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)
20663  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)
20664  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)
20665  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)
20666  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)
20667  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)
20668  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)
20669  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)
20670  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)
20671  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)
20672  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)
20673  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)
20674  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)
20675  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)
20676  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)
20677  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)
20678  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)
20679  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)
20680  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)
20681  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)
20682  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)
20683  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)
20684  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)
20685  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)
20686  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)
20687  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)
20688  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)
20689  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)
20690  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)
20691  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)
20692  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)
20693  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)
20694  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)
20695  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)
20696  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)
20697  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)
20698  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)
20699  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)
20700  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)
20701  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)
20702  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)
20703  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)
20704  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)
20705  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)
20706  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)
20707  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)
20708  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)
20709  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)
20710  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)
20711  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)
20712  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)
20713  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)
20714  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)
20715  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)
20716  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)
20717  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)
20718  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)
20719  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)
20720  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)
20721  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)
20722  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)
20723  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)
20724  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)
20725  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)
20726  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)
20727  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
20728  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20729 
20730  /*--- Wrapped vars code ---*/
20731 
20732  goto __pyx_L0;
20733  __pyx_L1_error:;
20734  __Pyx_XDECREF(__pyx_t_1);
20735  __Pyx_XDECREF(__pyx_t_2);
20736  __Pyx_XDECREF(__pyx_t_3);
20737  if (__pyx_m) {
20738  if (__pyx_d) {
20739  __Pyx_AddTraceback("init PyClical", 0, __pyx_lineno, __pyx_filename);
20740  }
20741  Py_DECREF(__pyx_m); __pyx_m = 0;
20742  } else if (!PyErr_Occurred()) {
20743  PyErr_SetString(PyExc_ImportError, "init PyClical");
20744  }
20745  __pyx_L0:;
20746  __Pyx_RefNannyFinishContext();
20747  #if CYTHON_PEP489_MULTI_PHASE_INIT
20748  return (__pyx_m != NULL) ? 0 : -1;
20749  #elif PY_MAJOR_VERSION >= 3
20750  return __pyx_m;
20751  #else
20752  return;
20753  #endif
20754 }
20755 
20756 /* --- Runtime support code --- */
20757 /* Refnanny */
20758 #if CYTHON_REFNANNY
20759 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
20760  PyObject *m = NULL, *p = NULL;
20761  void *r = NULL;
20762  m = PyImport_ImportModule((char *)modname);
20763  if (!m) goto end;
20764  p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
20765  if (!p) goto end;
20766  r = PyLong_AsVoidPtr(p);
20767 end:
20768  Py_XDECREF(p);
20769  Py_XDECREF(m);
20770  return (__Pyx_RefNannyAPIStruct *)r;
20771 }
20772 #endif
20773 
20774 /* PyObjectGetAttrStr */
20775 #if CYTHON_USE_TYPE_SLOTS
20776 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
20777  PyTypeObject* tp = Py_TYPE(obj);
20778  if (likely(tp->tp_getattro))
20779  return tp->tp_getattro(obj, attr_name);
20780 #if PY_MAJOR_VERSION < 3
20781  if (likely(tp->tp_getattr))
20782  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
20783 #endif
20784  return PyObject_GetAttr(obj, attr_name);
20785 }
20786 #endif
20787 
20788 /* GetBuiltinName */
20789 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
20790  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
20791  if (unlikely(!result)) {
20792  PyErr_Format(PyExc_NameError,
20793 #if PY_MAJOR_VERSION >= 3
20794  "name '%U' is not defined", name);
20795 #else
20796  "name '%.200s' is not defined", PyString_AS_STRING(name));
20797 #endif
20798  }
20799  return result;
20800 }
20801 
20802 /* PyCFunctionFastCall */
20803 #if CYTHON_FAST_PYCCALL
20804 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
20805  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
20806  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
20807  PyObject *self = PyCFunction_GET_SELF(func);
20808  int flags = PyCFunction_GET_FLAGS(func);
20809  assert(PyCFunction_Check(func));
20810  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
20811  assert(nargs >= 0);
20812  assert(nargs == 0 || args != NULL);
20813  /* _PyCFunction_FastCallDict() must not be called with an exception set,
20814  because it may clear it (directly or indirectly) and so the
20815  caller loses its exception */
20816  assert(!PyErr_Occurred());
20817  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
20818  return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
20819  } else {
20820  return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
20821  }
20822 }
20823 #endif
20824 
20825 /* PyFunctionFastCall */
20826 #if CYTHON_FAST_PYCALL
20827 #include "frameobject.h"
20828 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
20829  PyObject *globals) {
20830  PyFrameObject *f;
20831  PyThreadState *tstate = __Pyx_PyThreadState_Current;
20832  PyObject **fastlocals;
20833  Py_ssize_t i;
20834  PyObject *result;
20835  assert(globals != NULL);
20836  /* XXX Perhaps we should create a specialized
20837  PyFrame_New() that doesn't take locals, but does
20838  take builtins without sanity checking them.
20839  */
20840  assert(tstate != NULL);
20841  f = PyFrame_New(tstate, co, globals, NULL);
20842  if (f == NULL) {
20843  return NULL;
20844  }
20845  fastlocals = f->f_localsplus;
20846  for (i = 0; i < na; i++) {
20847  Py_INCREF(*args);
20848  fastlocals[i] = *args++;
20849  }
20850  result = PyEval_EvalFrameEx(f,0);
20851  ++tstate->recursion_depth;
20852  Py_DECREF(f);
20853  --tstate->recursion_depth;
20854  return result;
20855 }
20856 #if 1 || PY_VERSION_HEX < 0x030600B1
20857 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
20858  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
20859  PyObject *globals = PyFunction_GET_GLOBALS(func);
20860  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
20861  PyObject *closure;
20862 #if PY_MAJOR_VERSION >= 3
20863  PyObject *kwdefs;
20864 #endif
20865  PyObject *kwtuple, **k;
20866  PyObject **d;
20867  Py_ssize_t nd;
20868  Py_ssize_t nk;
20869  PyObject *result;
20870  assert(kwargs == NULL || PyDict_Check(kwargs));
20871  nk = kwargs ? PyDict_Size(kwargs) : 0;
20872  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
20873  return NULL;
20874  }
20875  if (
20876 #if PY_MAJOR_VERSION >= 3
20877  co->co_kwonlyargcount == 0 &&
20878 #endif
20879  likely(kwargs == NULL || nk == 0) &&
20880  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
20881  if (argdefs == NULL && co->co_argcount == nargs) {
20882  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
20883  goto done;
20884  }
20885  else if (nargs == 0 && argdefs != NULL
20886  && co->co_argcount == Py_SIZE(argdefs)) {
20887  /* function called with no arguments, but all parameters have
20888  a default value: use default values as arguments .*/
20889  args = &PyTuple_GET_ITEM(argdefs, 0);
20890  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
20891  goto done;
20892  }
20893  }
20894  if (kwargs != NULL) {
20895  Py_ssize_t pos, i;
20896  kwtuple = PyTuple_New(2 * nk);
20897  if (kwtuple == NULL) {
20898  result = NULL;
20899  goto done;
20900  }
20901  k = &PyTuple_GET_ITEM(kwtuple, 0);
20902  pos = i = 0;
20903  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
20904  Py_INCREF(k[i]);
20905  Py_INCREF(k[i+1]);
20906  i += 2;
20907  }
20908  nk = i / 2;
20909  }
20910  else {
20911  kwtuple = NULL;
20912  k = NULL;
20913  }
20914  closure = PyFunction_GET_CLOSURE(func);
20915 #if PY_MAJOR_VERSION >= 3
20916  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
20917 #endif
20918  if (argdefs != NULL) {
20919  d = &PyTuple_GET_ITEM(argdefs, 0);
20920  nd = Py_SIZE(argdefs);
20921  }
20922  else {
20923  d = NULL;
20924  nd = 0;
20925  }
20926 #if PY_MAJOR_VERSION >= 3
20927  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
20928  args, nargs,
20929  k, (int)nk,
20930  d, (int)nd, kwdefs, closure);
20931 #else
20932  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
20933  args, nargs,
20934  k, (int)nk,
20935  d, (int)nd, closure);
20936 #endif
20937  Py_XDECREF(kwtuple);
20938 done:
20939  Py_LeaveRecursiveCall();
20940  return result;
20941 }
20942 #endif
20943 #endif
20944 
20945 /* PyObjectCall */
20946 #if CYTHON_COMPILING_IN_CPYTHON
20947 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
20948  PyObject *result;
20949  ternaryfunc call = func->ob_type->tp_call;
20950  if (unlikely(!call))
20951  return PyObject_Call(func, arg, kw);
20952  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20953  return NULL;
20954  result = (*call)(func, arg, kw);
20955  Py_LeaveRecursiveCall();
20956  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20957  PyErr_SetString(
20958  PyExc_SystemError,
20959  "NULL result without error in PyObject_Call");
20960  }
20961  return result;
20962 }
20963 #endif
20964 
20965 /* PyObjectCallMethO */
20966 #if CYTHON_COMPILING_IN_CPYTHON
20967 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
20968  PyObject *self, *result;
20969  PyCFunction cfunc;
20970  cfunc = PyCFunction_GET_FUNCTION(func);
20971  self = PyCFunction_GET_SELF(func);
20972  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
20973  return NULL;
20974  result = cfunc(self, arg);
20975  Py_LeaveRecursiveCall();
20976  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
20977  PyErr_SetString(
20978  PyExc_SystemError,
20979  "NULL result without error in PyObject_Call");
20980  }
20981  return result;
20982 }
20983 #endif
20984 
20985 /* PyObjectCallOneArg */
20986 #if CYTHON_COMPILING_IN_CPYTHON
20987 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20988  PyObject *result;
20989  PyObject *args = PyTuple_New(1);
20990  if (unlikely(!args)) return NULL;
20991  Py_INCREF(arg);
20992  PyTuple_SET_ITEM(args, 0, arg);
20993  result = __Pyx_PyObject_Call(func, args, NULL);
20994  Py_DECREF(args);
20995  return result;
20996 }
20997 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
20998 #if CYTHON_FAST_PYCALL
20999  if (PyFunction_Check(func)) {
21000  return __Pyx_PyFunction_FastCall(func, &arg, 1);
21001  }
21002 #endif
21003  if (likely(PyCFunction_Check(func))) {
21004  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
21005  return __Pyx_PyObject_CallMethO(func, arg);
21006 #if CYTHON_FAST_PYCCALL
21007  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
21008  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
21009 #endif
21010  }
21011  }
21012  return __Pyx__PyObject_CallOneArg(func, arg);
21013 }
21014 #else
21015 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
21016  PyObject *result;
21017  PyObject *args = PyTuple_Pack(1, arg);
21018  if (unlikely(!args)) return NULL;
21019  result = __Pyx_PyObject_Call(func, args, NULL);
21020  Py_DECREF(args);
21021  return result;
21022 }
21023 #endif
21024 
21025 /* PyErrFetchRestore */
21026 #if CYTHON_FAST_THREAD_STATE
21027 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21028  PyObject *tmp_type, *tmp_value, *tmp_tb;
21029  tmp_type = tstate->curexc_type;
21030  tmp_value = tstate->curexc_value;
21031  tmp_tb = tstate->curexc_traceback;
21032  tstate->curexc_type = type;
21033  tstate->curexc_value = value;
21034  tstate->curexc_traceback = tb;
21035  Py_XDECREF(tmp_type);
21036  Py_XDECREF(tmp_value);
21037  Py_XDECREF(tmp_tb);
21038 }
21039 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21040  *type = tstate->curexc_type;
21041  *value = tstate->curexc_value;
21042  *tb = tstate->curexc_traceback;
21043  tstate->curexc_type = 0;
21044  tstate->curexc_value = 0;
21045  tstate->curexc_traceback = 0;
21046 }
21047 #endif
21048 
21049 /* WriteUnraisableException */
21050 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
21051  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
21052  int full_traceback, CYTHON_UNUSED int nogil) {
21053  PyObject *old_exc, *old_val, *old_tb;
21054  PyObject *ctx;
21055  __Pyx_PyThreadState_declare
21056 #ifdef WITH_THREAD
21057  PyGILState_STATE state;
21058  if (nogil)
21059  state = PyGILState_Ensure();
21060 #ifdef _MSC_VER
21061  else state = (PyGILState_STATE)-1;
21062 #endif
21063 #endif
21064  __Pyx_PyThreadState_assign
21065  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
21066  if (full_traceback) {
21067  Py_XINCREF(old_exc);
21068  Py_XINCREF(old_val);
21069  Py_XINCREF(old_tb);
21070  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21071  PyErr_PrintEx(1);
21072  }
21073  #if PY_MAJOR_VERSION < 3
21074  ctx = PyString_FromString(name);
21075  #else
21076  ctx = PyUnicode_FromString(name);
21077  #endif
21078  __Pyx_ErrRestore(old_exc, old_val, old_tb);
21079  if (!ctx) {
21080  PyErr_WriteUnraisable(Py_None);
21081  } else {
21082  PyErr_WriteUnraisable(ctx);
21083  Py_DECREF(ctx);
21084  }
21085 #ifdef WITH_THREAD
21086  if (nogil)
21087  PyGILState_Release(state);
21088 #endif
21089 }
21090 
21091 /* PyObjectCallNoArg */
21092 #if CYTHON_COMPILING_IN_CPYTHON
21093 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
21094 #if CYTHON_FAST_PYCALL
21095  if (PyFunction_Check(func)) {
21096  return __Pyx_PyFunction_FastCall(func, NULL, 0);
21097  }
21098 #endif
21099 #ifdef __Pyx_CyFunction_USED
21100  if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
21101 #else
21102  if (likely(PyCFunction_Check(func))) {
21103 #endif
21104  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
21105  return __Pyx_PyObject_CallMethO(func, NULL);
21106  }
21107  }
21108  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
21109 }
21110 #endif
21111 
21112 /* RaiseDoubleKeywords */
21113  static void __Pyx_RaiseDoubleKeywordsError(
21114  const char* func_name,
21115  PyObject* kw_name)
21116 {
21117  PyErr_Format(PyExc_TypeError,
21118  #if PY_MAJOR_VERSION >= 3
21119  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
21120  #else
21121  "%s() got multiple values for keyword argument '%s'", func_name,
21122  PyString_AsString(kw_name));
21123  #endif
21124 }
21125 
21126 /* ParseKeywords */
21127  static int __Pyx_ParseOptionalKeywords(
21128  PyObject *kwds,
21129  PyObject **argnames[],
21130  PyObject *kwds2,
21131  PyObject *values[],
21132  Py_ssize_t num_pos_args,
21133  const char* function_name)
21134 {
21135  PyObject *key = 0, *value = 0;
21136  Py_ssize_t pos = 0;
21137  PyObject*** name;
21138  PyObject*** first_kw_arg = argnames + num_pos_args;
21139  while (PyDict_Next(kwds, &pos, &key, &value)) {
21140  name = first_kw_arg;
21141  while (*name && (**name != key)) name++;
21142  if (*name) {
21143  values[name-argnames] = value;
21144  continue;
21145  }
21146  name = first_kw_arg;
21147  #if PY_MAJOR_VERSION < 3
21148  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
21149  while (*name) {
21150  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
21151  && _PyString_Eq(**name, key)) {
21152  values[name-argnames] = value;
21153  break;
21154  }
21155  name++;
21156  }
21157  if (*name) continue;
21158  else {
21159  PyObject*** argname = argnames;
21160  while (argname != first_kw_arg) {
21161  if ((**argname == key) || (
21162  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
21163  && _PyString_Eq(**argname, key))) {
21164  goto arg_passed_twice;
21165  }
21166  argname++;
21167  }
21168  }
21169  } else
21170  #endif
21171  if (likely(PyUnicode_Check(key))) {
21172  while (*name) {
21173  int cmp = (**name == key) ? 0 :
21174  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21175  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
21176  #endif
21177  PyUnicode_Compare(**name, key);
21178  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21179  if (cmp == 0) {
21180  values[name-argnames] = value;
21181  break;
21182  }
21183  name++;
21184  }
21185  if (*name) continue;
21186  else {
21187  PyObject*** argname = argnames;
21188  while (argname != first_kw_arg) {
21189  int cmp = (**argname == key) ? 0 :
21190  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
21191  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
21192  #endif
21193  PyUnicode_Compare(**argname, key);
21194  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
21195  if (cmp == 0) goto arg_passed_twice;
21196  argname++;
21197  }
21198  }
21199  } else
21200  goto invalid_keyword_type;
21201  if (kwds2) {
21202  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
21203  } else {
21204  goto invalid_keyword;
21205  }
21206  }
21207  return 0;
21208 arg_passed_twice:
21209  __Pyx_RaiseDoubleKeywordsError(function_name, key);
21210  goto bad;
21211 invalid_keyword_type:
21212  PyErr_Format(PyExc_TypeError,
21213  "%.200s() keywords must be strings", function_name);
21214  goto bad;
21215 invalid_keyword:
21216  PyErr_Format(PyExc_TypeError,
21217  #if PY_MAJOR_VERSION < 3
21218  "%.200s() got an unexpected keyword argument '%.200s'",
21219  function_name, PyString_AsString(key));
21220  #else
21221  "%s() got an unexpected keyword argument '%U'",
21222  function_name, key);
21223  #endif
21224 bad:
21225  return -1;
21226 }
21227 
21228 /* RaiseArgTupleInvalid */
21229  static void __Pyx_RaiseArgtupleInvalid(
21230  const char* func_name,
21231  int exact,
21232  Py_ssize_t num_min,
21233  Py_ssize_t num_max,
21234  Py_ssize_t num_found)
21235 {
21236  Py_ssize_t num_expected;
21237  const char *more_or_less;
21238  if (num_found < num_min) {
21239  num_expected = num_min;
21240  more_or_less = "at least";
21241  } else {
21242  num_expected = num_max;
21243  more_or_less = "at most";
21244  }
21245  if (exact) {
21246  more_or_less = "exactly";
21247  }
21248  PyErr_Format(PyExc_TypeError,
21249  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
21250  func_name, more_or_less, num_expected,
21251  (num_expected == 1) ? "" : "s", num_found);
21252 }
21253 
21254 /* GetModuleGlobalName */
21255  static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
21256  PyObject *result;
21257 #if !CYTHON_AVOID_BORROWED_REFS
21258 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
21259  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
21260  if (likely(result)) {
21261  Py_INCREF(result);
21262  } else if (unlikely(PyErr_Occurred())) {
21263  result = NULL;
21264  } else {
21265 #else
21266  result = PyDict_GetItem(__pyx_d, name);
21267  if (likely(result)) {
21268  Py_INCREF(result);
21269  } else {
21270 #endif
21271 #else
21272  result = PyObject_GetItem(__pyx_d, name);
21273  if (!result) {
21274  PyErr_Clear();
21275 #endif
21276  result = __Pyx_GetBuiltinName(name);
21277  }
21278  return result;
21279 }
21280 
21281 /* SaveResetException */
21282  #if CYTHON_FAST_THREAD_STATE
21283 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21284  #if PY_VERSION_HEX >= 0x030700A3
21285  *type = tstate->exc_state.exc_type;
21286  *value = tstate->exc_state.exc_value;
21287  *tb = tstate->exc_state.exc_traceback;
21288  #else
21289  *type = tstate->exc_type;
21290  *value = tstate->exc_value;
21291  *tb = tstate->exc_traceback;
21292  #endif
21293  Py_XINCREF(*type);
21294  Py_XINCREF(*value);
21295  Py_XINCREF(*tb);
21296 }
21297 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
21298  PyObject *tmp_type, *tmp_value, *tmp_tb;
21299  #if PY_VERSION_HEX >= 0x030700A3
21300  tmp_type = tstate->exc_state.exc_type;
21301  tmp_value = tstate->exc_state.exc_value;
21302  tmp_tb = tstate->exc_state.exc_traceback;
21303  tstate->exc_state.exc_type = type;
21304  tstate->exc_state.exc_value = value;
21305  tstate->exc_state.exc_traceback = tb;
21306  #else
21307  tmp_type = tstate->exc_type;
21308  tmp_value = tstate->exc_value;
21309  tmp_tb = tstate->exc_traceback;
21310  tstate->exc_type = type;
21311  tstate->exc_value = value;
21312  tstate->exc_traceback = tb;
21313  #endif
21314  Py_XDECREF(tmp_type);
21315  Py_XDECREF(tmp_value);
21316  Py_XDECREF(tmp_tb);
21317 }
21318 #endif
21319 
21320 /* PyErrExceptionMatches */
21321  #if CYTHON_FAST_THREAD_STATE
21322 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
21323  Py_ssize_t i, n;
21324  n = PyTuple_GET_SIZE(tuple);
21325 #if PY_MAJOR_VERSION >= 3
21326  for (i=0; i<n; i++) {
21327  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
21328  }
21329 #endif
21330  for (i=0; i<n; i++) {
21331  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
21332  }
21333  return 0;
21334 }
21335 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
21336  PyObject *exc_type = tstate->curexc_type;
21337  if (exc_type == err) return 1;
21338  if (unlikely(!exc_type)) return 0;
21339  if (unlikely(PyTuple_Check(err)))
21340  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
21341  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
21342 }
21343 #endif
21344 
21345 /* GetException */
21346  #if CYTHON_FAST_THREAD_STATE
21347 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
21348 #else
21349 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
21350 #endif
21351  PyObject *local_type, *local_value, *local_tb;
21352 #if CYTHON_FAST_THREAD_STATE
21353  PyObject *tmp_type, *tmp_value, *tmp_tb;
21354  local_type = tstate->curexc_type;
21355  local_value = tstate->curexc_value;
21356  local_tb = tstate->curexc_traceback;
21357  tstate->curexc_type = 0;
21358  tstate->curexc_value = 0;
21359  tstate->curexc_traceback = 0;
21360 #else
21361  PyErr_Fetch(&local_type, &local_value, &local_tb);
21362 #endif
21363  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
21364 #if CYTHON_FAST_THREAD_STATE
21365  if (unlikely(tstate->curexc_type))
21366 #else
21367  if (unlikely(PyErr_Occurred()))
21368 #endif
21369  goto bad;
21370  #if PY_MAJOR_VERSION >= 3
21371  if (local_tb) {
21372  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
21373  goto bad;
21374  }
21375  #endif
21376  Py_XINCREF(local_tb);
21377  Py_XINCREF(local_type);
21378  Py_XINCREF(local_value);
21379  *type = local_type;
21380  *value = local_value;
21381  *tb = local_tb;
21382 #if CYTHON_FAST_THREAD_STATE
21383  #if PY_VERSION_HEX >= 0x030700A3
21384  tmp_type = tstate->exc_state.exc_type;
21385  tmp_value = tstate->exc_state.exc_value;
21386  tmp_tb = tstate->exc_state.exc_traceback;
21387  tstate->exc_state.exc_type = local_type;
21388  tstate->exc_state.exc_value = local_value;
21389  tstate->exc_state.exc_traceback = local_tb;
21390  #else
21391  tmp_type = tstate->exc_type;
21392  tmp_value = tstate->exc_value;
21393  tmp_tb = tstate->exc_traceback;
21394  tstate->exc_type = local_type;
21395  tstate->exc_value = local_value;
21396  tstate->exc_traceback = local_tb;
21397  #endif
21398  Py_XDECREF(tmp_type);
21399  Py_XDECREF(tmp_value);
21400  Py_XDECREF(tmp_tb);
21401 #else
21402  PyErr_SetExcInfo(local_type, local_value, local_tb);
21403 #endif
21404  return 0;
21405 bad:
21406  *type = 0;
21407  *value = 0;
21408  *tb = 0;
21409  Py_XDECREF(local_type);
21410  Py_XDECREF(local_value);
21411  Py_XDECREF(local_tb);
21412  return -1;
21413 }
21414 
21415 /* RaiseException */
21416  #if PY_MAJOR_VERSION < 3
21417 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
21418  CYTHON_UNUSED PyObject *cause) {
21419  __Pyx_PyThreadState_declare
21420  Py_XINCREF(type);
21421  if (!value || value == Py_None)
21422  value = NULL;
21423  else
21424  Py_INCREF(value);
21425  if (!tb || tb == Py_None)
21426  tb = NULL;
21427  else {
21428  Py_INCREF(tb);
21429  if (!PyTraceBack_Check(tb)) {
21430  PyErr_SetString(PyExc_TypeError,
21431  "raise: arg 3 must be a traceback or None");
21432  goto raise_error;
21433  }
21434  }
21435  if (PyType_Check(type)) {
21436 #if CYTHON_COMPILING_IN_PYPY
21437  if (!value) {
21438  Py_INCREF(Py_None);
21439  value = Py_None;
21440  }
21441 #endif
21442  PyErr_NormalizeException(&type, &value, &tb);
21443  } else {
21444  if (value) {
21445  PyErr_SetString(PyExc_TypeError,
21446  "instance exception may not have a separate value");
21447  goto raise_error;
21448  }
21449  value = type;
21450  type = (PyObject*) Py_TYPE(type);
21451  Py_INCREF(type);
21452  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
21453  PyErr_SetString(PyExc_TypeError,
21454  "raise: exception class must be a subclass of BaseException");
21455  goto raise_error;
21456  }
21457  }
21458  __Pyx_PyThreadState_assign
21459  __Pyx_ErrRestore(type, value, tb);
21460  return;
21461 raise_error:
21462  Py_XDECREF(value);
21463  Py_XDECREF(type);
21464  Py_XDECREF(tb);
21465  return;
21466 }
21467 #else
21468 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
21469  PyObject* owned_instance = NULL;
21470  if (tb == Py_None) {
21471  tb = 0;
21472  } else if (tb && !PyTraceBack_Check(tb)) {
21473  PyErr_SetString(PyExc_TypeError,
21474  "raise: arg 3 must be a traceback or None");
21475  goto bad;
21476  }
21477  if (value == Py_None)
21478  value = 0;
21479  if (PyExceptionInstance_Check(type)) {
21480  if (value) {
21481  PyErr_SetString(PyExc_TypeError,
21482  "instance exception may not have a separate value");
21483  goto bad;
21484  }
21485  value = type;
21486  type = (PyObject*) Py_TYPE(value);
21487  } else if (PyExceptionClass_Check(type)) {
21488  PyObject *instance_class = NULL;
21489  if (value && PyExceptionInstance_Check(value)) {
21490  instance_class = (PyObject*) Py_TYPE(value);
21491  if (instance_class != type) {
21492  int is_subclass = PyObject_IsSubclass(instance_class, type);
21493  if (!is_subclass) {
21494  instance_class = NULL;
21495  } else if (unlikely(is_subclass == -1)) {
21496  goto bad;
21497  } else {
21498  type = instance_class;
21499  }
21500  }
21501  }
21502  if (!instance_class) {
21503  PyObject *args;
21504  if (!value)
21505  args = PyTuple_New(0);
21506  else if (PyTuple_Check(value)) {
21507  Py_INCREF(value);
21508  args = value;
21509  } else
21510  args = PyTuple_Pack(1, value);
21511  if (!args)
21512  goto bad;
21513  owned_instance = PyObject_Call(type, args, NULL);
21514  Py_DECREF(args);
21515  if (!owned_instance)
21516  goto bad;
21517  value = owned_instance;
21518  if (!PyExceptionInstance_Check(value)) {
21519  PyErr_Format(PyExc_TypeError,
21520  "calling %R should have returned an instance of "
21521  "BaseException, not %R",
21522  type, Py_TYPE(value));
21523  goto bad;
21524  }
21525  }
21526  } else {
21527  PyErr_SetString(PyExc_TypeError,
21528  "raise: exception class must be a subclass of BaseException");
21529  goto bad;
21530  }
21531  if (cause) {
21532  PyObject *fixed_cause;
21533  if (cause == Py_None) {
21534  fixed_cause = NULL;
21535  } else if (PyExceptionClass_Check(cause)) {
21536  fixed_cause = PyObject_CallObject(cause, NULL);
21537  if (fixed_cause == NULL)
21538  goto bad;
21539  } else if (PyExceptionInstance_Check(cause)) {
21540  fixed_cause = cause;
21541  Py_INCREF(fixed_cause);
21542  } else {
21543  PyErr_SetString(PyExc_TypeError,
21544  "exception causes must derive from "
21545  "BaseException");
21546  goto bad;
21547  }
21548  PyException_SetCause(value, fixed_cause);
21549  }
21550  PyErr_SetObject(type, value);
21551  if (tb) {
21552 #if CYTHON_COMPILING_IN_PYPY
21553  PyObject *tmp_type, *tmp_value, *tmp_tb;
21554  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
21555  Py_INCREF(tb);
21556  PyErr_Restore(tmp_type, tmp_value, tb);
21557  Py_XDECREF(tmp_tb);
21558 #else
21559  PyThreadState *tstate = __Pyx_PyThreadState_Current;
21560  PyObject* tmp_tb = tstate->curexc_traceback;
21561  if (tb != tmp_tb) {
21562  Py_INCREF(tb);
21563  tstate->curexc_traceback = tb;
21564  Py_XDECREF(tmp_tb);
21565  }
21566 #endif
21567  }
21568 bad:
21569  Py_XDECREF(owned_instance);
21570  return;
21571 }
21572 #endif
21573 
21574 /* PyIntBinop */
21575  #if !CYTHON_COMPILING_IN_PYPY
21576 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
21577  #if PY_MAJOR_VERSION < 3
21578  if (likely(PyInt_CheckExact(op1))) {
21579  const long b = intval;
21580  long x;
21581  long a = PyInt_AS_LONG(op1);
21582  x = (long)((unsigned long)a + b);
21583  if (likely((x^a) >= 0 || (x^b) >= 0))
21584  return PyInt_FromLong(x);
21585  return PyLong_Type.tp_as_number->nb_add(op1, op2);
21586  }
21587  #endif
21588  #if CYTHON_USE_PYLONG_INTERNALS
21589  if (likely(PyLong_CheckExact(op1))) {
21590  const long b = intval;
21591  long a, x;
21592 #ifdef HAVE_LONG_LONG
21593  const PY_LONG_LONG llb = intval;
21594  PY_LONG_LONG lla, llx;
21595 #endif
21596  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21597  const Py_ssize_t size = Py_SIZE(op1);
21598  if (likely(__Pyx_sst_abs(size) <= 1)) {
21599  a = likely(size) ? digits[0] : 0;
21600  if (size == -1) a = -a;
21601  } else {
21602  switch (size) {
21603  case -2:
21604  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21605  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21606  break;
21607 #ifdef HAVE_LONG_LONG
21608  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21609  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21610  goto long_long;
21611 #endif
21612  }
21613  CYTHON_FALLTHROUGH;
21614  case 2:
21615  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
21616  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21617  break;
21618 #ifdef HAVE_LONG_LONG
21619  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
21620  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
21621  goto long_long;
21622 #endif
21623  }
21624  CYTHON_FALLTHROUGH;
21625  case -3:
21626  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21627  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21628  break;
21629 #ifdef HAVE_LONG_LONG
21630  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21631  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]));
21632  goto long_long;
21633 #endif
21634  }
21635  CYTHON_FALLTHROUGH;
21636  case 3:
21637  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
21638  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21639  break;
21640 #ifdef HAVE_LONG_LONG
21641  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
21642  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]));
21643  goto long_long;
21644 #endif
21645  }
21646  CYTHON_FALLTHROUGH;
21647  case -4:
21648  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21649  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21650  break;
21651 #ifdef HAVE_LONG_LONG
21652  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21653  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]));
21654  goto long_long;
21655 #endif
21656  }
21657  CYTHON_FALLTHROUGH;
21658  case 4:
21659  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
21660  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21661  break;
21662 #ifdef HAVE_LONG_LONG
21663  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
21664  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]));
21665  goto long_long;
21666 #endif
21667  }
21668  CYTHON_FALLTHROUGH;
21669  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
21670  }
21671  }
21672  x = a + b;
21673  return PyLong_FromLong(x);
21674 #ifdef HAVE_LONG_LONG
21675  long_long:
21676  llx = lla + llb;
21677  return PyLong_FromLongLong(llx);
21678 #endif
21679 
21680 
21681  }
21682  #endif
21683  if (PyFloat_CheckExact(op1)) {
21684  const long b = intval;
21685  double a = PyFloat_AS_DOUBLE(op1);
21686  double result;
21687  PyFPE_START_PROTECT("add", return NULL)
21688  result = ((double)a) + (double)b;
21689  PyFPE_END_PROTECT(result)
21690  return PyFloat_FromDouble(result);
21691  }
21692  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
21693 }
21694 #endif
21695 
21696 /* SetItemInt */
21697  static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
21698  int r;
21699  if (!j) return -1;
21700  r = PyObject_SetItem(o, j, v);
21701  Py_DECREF(j);
21702  return r;
21703 }
21704 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
21705  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
21706 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
21707  if (is_list || PyList_CheckExact(o)) {
21708  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
21709  if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
21710  PyObject* old = PyList_GET_ITEM(o, n);
21711  Py_INCREF(v);
21712  PyList_SET_ITEM(o, n, v);
21713  Py_DECREF(old);
21714  return 1;
21715  }
21716  } else {
21717  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
21718  if (likely(m && m->sq_ass_item)) {
21719  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
21720  Py_ssize_t l = m->sq_length(o);
21721  if (likely(l >= 0)) {
21722  i += l;
21723  } else {
21724  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
21725  return -1;
21726  PyErr_Clear();
21727  }
21728  }
21729  return m->sq_ass_item(o, i, v);
21730  }
21731  }
21732 #else
21733 #if CYTHON_COMPILING_IN_PYPY
21734  if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
21735 #else
21736  if (is_list || PySequence_Check(o)) {
21737 #endif
21738  return PySequence_SetItem(o, i, v);
21739  }
21740 #endif
21741  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
21742 }
21743 
21744 /* ArgTypeTest */
21745  static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
21746 {
21747  if (unlikely(!type)) {
21748  PyErr_SetString(PyExc_SystemError, "Missing type object");
21749  return 0;
21750  }
21751  else if (exact) {
21752  #if PY_MAJOR_VERSION == 2
21753  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
21754  #endif
21755  }
21756  else {
21757  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
21758  }
21759  PyErr_Format(PyExc_TypeError,
21760  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
21761  name, type->tp_name, Py_TYPE(obj)->tp_name);
21762  return 0;
21763 }
21764 
21765 /* Import */
21766  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
21767  PyObject *empty_list = 0;
21768  PyObject *module = 0;
21769  PyObject *global_dict = 0;
21770  PyObject *empty_dict = 0;
21771  PyObject *list;
21772  #if PY_MAJOR_VERSION < 3
21773  PyObject *py_import;
21774  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
21775  if (!py_import)
21776  goto bad;
21777  #endif
21778  if (from_list)
21779  list = from_list;
21780  else {
21781  empty_list = PyList_New(0);
21782  if (!empty_list)
21783  goto bad;
21784  list = empty_list;
21785  }
21786  global_dict = PyModule_GetDict(__pyx_m);
21787  if (!global_dict)
21788  goto bad;
21789  empty_dict = PyDict_New();
21790  if (!empty_dict)
21791  goto bad;
21792  {
21793  #if PY_MAJOR_VERSION >= 3
21794  if (level == -1) {
21795  if (strchr(__Pyx_MODULE_NAME, '.')) {
21796  module = PyImport_ImportModuleLevelObject(
21797  name, global_dict, empty_dict, list, 1);
21798  if (!module) {
21799  if (!PyErr_ExceptionMatches(PyExc_ImportError))
21800  goto bad;
21801  PyErr_Clear();
21802  }
21803  }
21804  level = 0;
21805  }
21806  #endif
21807  if (!module) {
21808  #if PY_MAJOR_VERSION < 3
21809  PyObject *py_level = PyInt_FromLong(level);
21810  if (!py_level)
21811  goto bad;
21812  module = PyObject_CallFunctionObjArgs(py_import,
21813  name, global_dict, empty_dict, list, py_level, NULL);
21814  Py_DECREF(py_level);
21815  #else
21816  module = PyImport_ImportModuleLevelObject(
21817  name, global_dict, empty_dict, list, level);
21818  #endif
21819  }
21820  }
21821 bad:
21822  #if PY_MAJOR_VERSION < 3
21823  Py_XDECREF(py_import);
21824  #endif
21825  Py_XDECREF(empty_list);
21826  Py_XDECREF(empty_dict);
21827  return module;
21828 }
21829 
21830 /* PyObject_GenericGetAttrNoDict */
21831  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21832 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
21833  PyErr_Format(PyExc_AttributeError,
21834 #if PY_MAJOR_VERSION >= 3
21835  "'%.50s' object has no attribute '%U'",
21836  tp->tp_name, attr_name);
21837 #else
21838  "'%.50s' object has no attribute '%.400s'",
21839  tp->tp_name, PyString_AS_STRING(attr_name));
21840 #endif
21841  return NULL;
21842 }
21843 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
21844  PyObject *descr;
21845  PyTypeObject *tp = Py_TYPE(obj);
21846  if (unlikely(!PyString_Check(attr_name))) {
21847  return PyObject_GenericGetAttr(obj, attr_name);
21848  }
21849  assert(!tp->tp_dictoffset);
21850  descr = _PyType_Lookup(tp, attr_name);
21851  if (unlikely(!descr)) {
21852  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
21853  }
21854  Py_INCREF(descr);
21855  #if PY_MAJOR_VERSION < 3
21856  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
21857  #endif
21858  {
21859  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
21860  if (unlikely(f)) {
21861  PyObject *res = f(descr, obj, (PyObject *)tp);
21862  Py_DECREF(descr);
21863  return res;
21864  }
21865  }
21866  return descr;
21867 }
21868 #endif
21869 
21870 /* PyObject_GenericGetAttr */
21871  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
21872 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
21873  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
21874  return PyObject_GenericGetAttr(obj, attr_name);
21875  }
21876  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
21877 }
21878 #endif
21879 
21880 /* SetVTable */
21881  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
21882 #if PY_VERSION_HEX >= 0x02070000
21883  PyObject *ob = PyCapsule_New(vtable, 0, 0);
21884 #else
21885  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
21886 #endif
21887  if (!ob)
21888  goto bad;
21889  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
21890  goto bad;
21891  Py_DECREF(ob);
21892  return 0;
21893 bad:
21894  Py_XDECREF(ob);
21895  return -1;
21896 }
21897 
21898 /* SetupReduce */
21899  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
21900  int ret;
21901  PyObject *name_attr;
21902  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
21903  if (likely(name_attr)) {
21904  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
21905  } else {
21906  ret = -1;
21907  }
21908  if (unlikely(ret < 0)) {
21909  PyErr_Clear();
21910  ret = 0;
21911  }
21912  Py_XDECREF(name_attr);
21913  return ret;
21914 }
21915 static int __Pyx_setup_reduce(PyObject* type_obj) {
21916  int ret = 0;
21917  PyObject *object_reduce = NULL;
21918  PyObject *object_reduce_ex = NULL;
21919  PyObject *reduce = NULL;
21920  PyObject *reduce_ex = NULL;
21921  PyObject *reduce_cython = NULL;
21922  PyObject *setstate = NULL;
21923  PyObject *setstate_cython = NULL;
21924 #if CYTHON_USE_PYTYPE_LOOKUP
21925  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
21926 #else
21927  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
21928 #endif
21929 #if CYTHON_USE_PYTYPE_LOOKUP
21930  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21931 #else
21932  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
21933 #endif
21934  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
21935  if (reduce_ex == object_reduce_ex) {
21936 #if CYTHON_USE_PYTYPE_LOOKUP
21937  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21938 #else
21939  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
21940 #endif
21941  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
21942  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
21943  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
21944  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
21945  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
21946  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
21947  if (!setstate) PyErr_Clear();
21948  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
21949  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
21950  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
21951  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
21952  }
21953  PyType_Modified((PyTypeObject*)type_obj);
21954  }
21955  }
21956  goto GOOD;
21957 BAD:
21958  if (!PyErr_Occurred())
21959  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
21960  ret = -1;
21961 GOOD:
21962 #if !CYTHON_USE_PYTYPE_LOOKUP
21963  Py_XDECREF(object_reduce);
21964  Py_XDECREF(object_reduce_ex);
21965 #endif
21966  Py_XDECREF(reduce);
21967  Py_XDECREF(reduce_ex);
21968  Py_XDECREF(reduce_cython);
21969  Py_XDECREF(setstate);
21970  Py_XDECREF(setstate_cython);
21971  return ret;
21972 }
21973 
21974 /* PyFloatBinop */
21975  #if !CYTHON_COMPILING_IN_PYPY
21976 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, CYTHON_UNUSED int inplace) {
21977  const double b = floatval;
21978  double a, result;
21979  if (likely(PyFloat_CheckExact(op1))) {
21980  a = PyFloat_AS_DOUBLE(op1);
21981  } else
21982  #if PY_MAJOR_VERSION < 3
21983  if (likely(PyInt_CheckExact(op1))) {
21984  a = (double) PyInt_AS_LONG(op1);
21985  } else
21986  #endif
21987  if (likely(PyLong_CheckExact(op1))) {
21988  #if CYTHON_USE_PYLONG_INTERNALS
21989  const digit* digits = ((PyLongObject*)op1)->ob_digit;
21990  const Py_ssize_t size = Py_SIZE(op1);
21991  switch (size) {
21992  case 0: a = 0.0; break;
21993  case -1: a = -(double) digits[0]; break;
21994  case 1: a = (double) digits[0]; break;
21995  case -2:
21996  case 2:
21997  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
21998  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
21999  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22000  if (size == -2)
22001  a = -a;
22002  break;
22003  }
22004  }
22005  CYTHON_FALLTHROUGH;
22006  case -3:
22007  case 3:
22008  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
22009  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22010  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22011  if (size == -3)
22012  a = -a;
22013  break;
22014  }
22015  }
22016  CYTHON_FALLTHROUGH;
22017  case -4:
22018  case 4:
22019  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
22020  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
22021  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
22022  if (size == -4)
22023  a = -a;
22024  break;
22025  }
22026  }
22027  CYTHON_FALLTHROUGH;
22028  default:
22029  #else
22030  {
22031  #endif
22032  a = PyLong_AsDouble(op1);
22033  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
22034  }
22035  } else {
22036  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
22037  }
22038  PyFPE_START_PROTECT("divide", return NULL)
22039  result = a / b;
22040  PyFPE_END_PROTECT(result)
22041  return PyFloat_FromDouble(result);
22042 }
22043 #endif
22044 
22045 /* BytesEquals */
22046  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
22047 #if CYTHON_COMPILING_IN_PYPY
22048  return PyObject_RichCompareBool(s1, s2, equals);
22049 #else
22050  if (s1 == s2) {
22051  return (equals == Py_EQ);
22052  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
22053  const char *ps1, *ps2;
22054  Py_ssize_t length = PyBytes_GET_SIZE(s1);
22055  if (length != PyBytes_GET_SIZE(s2))
22056  return (equals == Py_NE);
22057  ps1 = PyBytes_AS_STRING(s1);
22058  ps2 = PyBytes_AS_STRING(s2);
22059  if (ps1[0] != ps2[0]) {
22060  return (equals == Py_NE);
22061  } else if (length == 1) {
22062  return (equals == Py_EQ);
22063  } else {
22064  int result;
22065 #if CYTHON_USE_UNICODE_INTERNALS
22066  Py_hash_t hash1, hash2;
22067  hash1 = ((PyBytesObject*)s1)->ob_shash;
22068  hash2 = ((PyBytesObject*)s2)->ob_shash;
22069  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22070  return (equals == Py_NE);
22071  }
22072 #endif
22073  result = memcmp(ps1, ps2, (size_t)length);
22074  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22075  }
22076  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
22077  return (equals == Py_NE);
22078  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
22079  return (equals == Py_NE);
22080  } else {
22081  int result;
22082  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22083  if (!py_result)
22084  return -1;
22085  result = __Pyx_PyObject_IsTrue(py_result);
22086  Py_DECREF(py_result);
22087  return result;
22088  }
22089 #endif
22090 }
22091 
22092 /* UnicodeEquals */
22093  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
22094 #if CYTHON_COMPILING_IN_PYPY
22095  return PyObject_RichCompareBool(s1, s2, equals);
22096 #else
22097 #if PY_MAJOR_VERSION < 3
22098  PyObject* owned_ref = NULL;
22099 #endif
22100  int s1_is_unicode, s2_is_unicode;
22101  if (s1 == s2) {
22102  goto return_eq;
22103  }
22104  s1_is_unicode = PyUnicode_CheckExact(s1);
22105  s2_is_unicode = PyUnicode_CheckExact(s2);
22106 #if PY_MAJOR_VERSION < 3
22107  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
22108  owned_ref = PyUnicode_FromObject(s2);
22109  if (unlikely(!owned_ref))
22110  return -1;
22111  s2 = owned_ref;
22112  s2_is_unicode = 1;
22113  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
22114  owned_ref = PyUnicode_FromObject(s1);
22115  if (unlikely(!owned_ref))
22116  return -1;
22117  s1 = owned_ref;
22118  s1_is_unicode = 1;
22119  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
22120  return __Pyx_PyBytes_Equals(s1, s2, equals);
22121  }
22122 #endif
22123  if (s1_is_unicode & s2_is_unicode) {
22124  Py_ssize_t length;
22125  int kind;
22126  void *data1, *data2;
22127  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
22128  return -1;
22129  length = __Pyx_PyUnicode_GET_LENGTH(s1);
22130  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
22131  goto return_ne;
22132  }
22133 #if CYTHON_USE_UNICODE_INTERNALS
22134  {
22135  Py_hash_t hash1, hash2;
22136  #if CYTHON_PEP393_ENABLED
22137  hash1 = ((PyASCIIObject*)s1)->hash;
22138  hash2 = ((PyASCIIObject*)s2)->hash;
22139  #else
22140  hash1 = ((PyUnicodeObject*)s1)->hash;
22141  hash2 = ((PyUnicodeObject*)s2)->hash;
22142  #endif
22143  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
22144  goto return_ne;
22145  }
22146  }
22147 #endif
22148  kind = __Pyx_PyUnicode_KIND(s1);
22149  if (kind != __Pyx_PyUnicode_KIND(s2)) {
22150  goto return_ne;
22151  }
22152  data1 = __Pyx_PyUnicode_DATA(s1);
22153  data2 = __Pyx_PyUnicode_DATA(s2);
22154  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
22155  goto return_ne;
22156  } else if (length == 1) {
22157  goto return_eq;
22158  } else {
22159  int result = memcmp(data1, data2, (size_t)(length * kind));
22160  #if PY_MAJOR_VERSION < 3
22161  Py_XDECREF(owned_ref);
22162  #endif
22163  return (equals == Py_EQ) ? (result == 0) : (result != 0);
22164  }
22165  } else if ((s1 == Py_None) & s2_is_unicode) {
22166  goto return_ne;
22167  } else if ((s2 == Py_None) & s1_is_unicode) {
22168  goto return_ne;
22169  } else {
22170  int result;
22171  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
22172  #if PY_MAJOR_VERSION < 3
22173  Py_XDECREF(owned_ref);
22174  #endif
22175  if (!py_result)
22176  return -1;
22177  result = __Pyx_PyObject_IsTrue(py_result);
22178  Py_DECREF(py_result);
22179  return result;
22180  }
22181 return_eq:
22182  #if PY_MAJOR_VERSION < 3
22183  Py_XDECREF(owned_ref);
22184  #endif
22185  return (equals == Py_EQ);
22186 return_ne:
22187  #if PY_MAJOR_VERSION < 3
22188  Py_XDECREF(owned_ref);
22189  #endif
22190  return (equals == Py_NE);
22191 #endif
22192 }
22193 
22194 /* CLineInTraceback */
22195  #ifndef CYTHON_CLINE_IN_TRACEBACK
22196 static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
22197  PyObject *use_cline;
22198  PyObject *ptype, *pvalue, *ptraceback;
22199 #if CYTHON_COMPILING_IN_CPYTHON
22200  PyObject **cython_runtime_dict;
22201 #endif
22202  if (unlikely(!__pyx_cython_runtime)) {
22203  return c_line;
22204  }
22205  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
22206 #if CYTHON_COMPILING_IN_CPYTHON
22207  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
22208  if (likely(cython_runtime_dict)) {
22209  use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
22210  } else
22211 #endif
22212  {
22213  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
22214  if (use_cline_obj) {
22215  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
22216  Py_DECREF(use_cline_obj);
22217  } else {
22218  PyErr_Clear();
22219  use_cline = NULL;
22220  }
22221  }
22222  if (!use_cline) {
22223  c_line = 0;
22224  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
22225  }
22226  else if (PyObject_Not(use_cline) != 0) {
22227  c_line = 0;
22228  }
22229  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
22230  return c_line;
22231 }
22232 #endif
22233 
22234 /* CodeObjectCache */
22235  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
22236  int start = 0, mid = 0, end = count - 1;
22237  if (end >= 0 && code_line > entries[end].code_line) {
22238  return count;
22239  }
22240  while (start < end) {
22241  mid = start + (end - start) / 2;
22242  if (code_line < entries[mid].code_line) {
22243  end = mid;
22244  } else if (code_line > entries[mid].code_line) {
22245  start = mid + 1;
22246  } else {
22247  return mid;
22248  }
22249  }
22250  if (code_line <= entries[mid].code_line) {
22251  return mid;
22252  } else {
22253  return mid + 1;
22254  }
22255 }
22256 static PyCodeObject *__pyx_find_code_object(int code_line) {
22257  PyCodeObject* code_object;
22258  int pos;
22259  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
22260  return NULL;
22261  }
22262  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22263  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
22264  return NULL;
22265  }
22266  code_object = __pyx_code_cache.entries[pos].code_object;
22267  Py_INCREF(code_object);
22268  return code_object;
22269 }
22270 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
22271  int pos, i;
22272  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
22273  if (unlikely(!code_line)) {
22274  return;
22275  }
22276  if (unlikely(!entries)) {
22277  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
22278  if (likely(entries)) {
22279  __pyx_code_cache.entries = entries;
22280  __pyx_code_cache.max_count = 64;
22281  __pyx_code_cache.count = 1;
22282  entries[0].code_line = code_line;
22283  entries[0].code_object = code_object;
22284  Py_INCREF(code_object);
22285  }
22286  return;
22287  }
22288  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
22289  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
22290  PyCodeObject* tmp = entries[pos].code_object;
22291  entries[pos].code_object = code_object;
22292  Py_DECREF(tmp);
22293  return;
22294  }
22295  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
22296  int new_max = __pyx_code_cache.max_count + 64;
22297  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
22298  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
22299  if (unlikely(!entries)) {
22300  return;
22301  }
22302  __pyx_code_cache.entries = entries;
22303  __pyx_code_cache.max_count = new_max;
22304  }
22305  for (i=__pyx_code_cache.count; i>pos; i--) {
22306  entries[i] = entries[i-1];
22307  }
22308  entries[pos].code_line = code_line;
22309  entries[pos].code_object = code_object;
22310  __pyx_code_cache.count++;
22311  Py_INCREF(code_object);
22312 }
22313 
22314 /* AddTraceback */
22315  #include "compile.h"
22316 #include "frameobject.h"
22317 #include "traceback.h"
22318 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
22319  const char *funcname, int c_line,
22320  int py_line, const char *filename) {
22321  PyCodeObject *py_code = 0;
22322  PyObject *py_srcfile = 0;
22323  PyObject *py_funcname = 0;
22324  #if PY_MAJOR_VERSION < 3
22325  py_srcfile = PyString_FromString(filename);
22326  #else
22327  py_srcfile = PyUnicode_FromString(filename);
22328  #endif
22329  if (!py_srcfile) goto bad;
22330  if (c_line) {
22331  #if PY_MAJOR_VERSION < 3
22332  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22333  #else
22334  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
22335  #endif
22336  }
22337  else {
22338  #if PY_MAJOR_VERSION < 3
22339  py_funcname = PyString_FromString(funcname);
22340  #else
22341  py_funcname = PyUnicode_FromString(funcname);
22342  #endif
22343  }
22344  if (!py_funcname) goto bad;
22345  py_code = __Pyx_PyCode_New(
22346  0,
22347  0,
22348  0,
22349  0,
22350  0,
22351  __pyx_empty_bytes, /*PyObject *code,*/
22352  __pyx_empty_tuple, /*PyObject *consts,*/
22353  __pyx_empty_tuple, /*PyObject *names,*/
22354  __pyx_empty_tuple, /*PyObject *varnames,*/
22355  __pyx_empty_tuple, /*PyObject *freevars,*/
22356  __pyx_empty_tuple, /*PyObject *cellvars,*/
22357  py_srcfile, /*PyObject *filename,*/
22358  py_funcname, /*PyObject *name,*/
22359  py_line,
22360  __pyx_empty_bytes /*PyObject *lnotab*/
22361  );
22362  Py_DECREF(py_srcfile);
22363  Py_DECREF(py_funcname);
22364  return py_code;
22365 bad:
22366  Py_XDECREF(py_srcfile);
22367  Py_XDECREF(py_funcname);
22368  return NULL;
22369 }
22370 static void __Pyx_AddTraceback(const char *funcname, int c_line,
22371  int py_line, const char *filename) {
22372  PyCodeObject *py_code = 0;
22373  PyFrameObject *py_frame = 0;
22374  PyThreadState *tstate = __Pyx_PyThreadState_Current;
22375  if (c_line) {
22376  c_line = __Pyx_CLineForTraceback(tstate, c_line);
22377  }
22378  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
22379  if (!py_code) {
22380  py_code = __Pyx_CreateCodeObjectForTraceback(
22381  funcname, c_line, py_line, filename);
22382  if (!py_code) goto bad;
22383  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
22384  }
22385  py_frame = PyFrame_New(
22386  tstate, /*PyThreadState *tstate,*/
22387  py_code, /*PyCodeObject *code,*/
22388  __pyx_d, /*PyObject *globals,*/
22389  0 /*PyObject *locals*/
22390  );
22391  if (!py_frame) goto bad;
22392  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
22393  PyTraceBack_Here(py_frame);
22394 bad:
22395  Py_XDECREF(py_code);
22396  Py_XDECREF(py_frame);
22397 }
22398 
22399 /* CIntFromPyVerify */
22400  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
22401  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
22402 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
22403  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
22404 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
22405  {\
22406  func_type value = func_value;\
22407  if (sizeof(target_type) < sizeof(func_type)) {\
22408  if (unlikely(value != (func_type) (target_type) value)) {\
22409  func_type zero = 0;\
22410  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
22411  return (target_type) -1;\
22412  if (is_unsigned && unlikely(value < zero))\
22413  goto raise_neg_overflow;\
22414  else\
22415  goto raise_overflow;\
22416  }\
22417  }\
22418  return (target_type) value;\
22419  }
22420 
22421 /* CIntToPy */
22422  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
22423  const int neg_one = (int) -1, const_zero = (int) 0;
22424  const int is_unsigned = neg_one > const_zero;
22425  if (is_unsigned) {
22426  if (sizeof(int) < sizeof(long)) {
22427  return PyInt_FromLong((long) value);
22428  } else if (sizeof(int) <= sizeof(unsigned long)) {
22429  return PyLong_FromUnsignedLong((unsigned long) value);
22430 #ifdef HAVE_LONG_LONG
22431  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22432  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22433 #endif
22434  }
22435  } else {
22436  if (sizeof(int) <= sizeof(long)) {
22437  return PyInt_FromLong((long) value);
22438 #ifdef HAVE_LONG_LONG
22439  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22440  return PyLong_FromLongLong((PY_LONG_LONG) value);
22441 #endif
22442  }
22443  }
22444  {
22445  int one = 1; int little = (int)*(unsigned char *)&one;
22446  unsigned char *bytes = (unsigned char *)&value;
22447  return _PyLong_FromByteArray(bytes, sizeof(int),
22448  little, !is_unsigned);
22449  }
22450 }
22451 
22452 /* CIntFromPy */
22453  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
22454  const int neg_one = (int) -1, const_zero = (int) 0;
22455  const int is_unsigned = neg_one > const_zero;
22456 #if PY_MAJOR_VERSION < 3
22457  if (likely(PyInt_Check(x))) {
22458  if (sizeof(int) < sizeof(long)) {
22459  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
22460  } else {
22461  long val = PyInt_AS_LONG(x);
22462  if (is_unsigned && unlikely(val < 0)) {
22463  goto raise_neg_overflow;
22464  }
22465  return (int) val;
22466  }
22467  } else
22468 #endif
22469  if (likely(PyLong_Check(x))) {
22470  if (is_unsigned) {
22471 #if CYTHON_USE_PYLONG_INTERNALS
22472  const digit* digits = ((PyLongObject*)x)->ob_digit;
22473  switch (Py_SIZE(x)) {
22474  case 0: return (int) 0;
22475  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
22476  case 2:
22477  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22478  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22479  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22480  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
22481  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22482  }
22483  }
22484  break;
22485  case 3:
22486  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22487  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22488  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22489  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
22490  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22491  }
22492  }
22493  break;
22494  case 4:
22495  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22496  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22497  __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])))
22498  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
22499  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
22500  }
22501  }
22502  break;
22503  }
22504 #endif
22505 #if CYTHON_COMPILING_IN_CPYTHON
22506  if (unlikely(Py_SIZE(x) < 0)) {
22507  goto raise_neg_overflow;
22508  }
22509 #else
22510  {
22511  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22512  if (unlikely(result < 0))
22513  return (int) -1;
22514  if (unlikely(result == 1))
22515  goto raise_neg_overflow;
22516  }
22517 #endif
22518  if (sizeof(int) <= sizeof(unsigned long)) {
22519  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
22520 #ifdef HAVE_LONG_LONG
22521  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
22522  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22523 #endif
22524  }
22525  } else {
22526 #if CYTHON_USE_PYLONG_INTERNALS
22527  const digit* digits = ((PyLongObject*)x)->ob_digit;
22528  switch (Py_SIZE(x)) {
22529  case 0: return (int) 0;
22530  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
22531  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
22532  case -2:
22533  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
22534  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22535  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22536  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22537  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22538  }
22539  }
22540  break;
22541  case 2:
22542  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
22543  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22544  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22545  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22546  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22547  }
22548  }
22549  break;
22550  case -3:
22551  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
22552  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22553  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22554  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22555  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22556  }
22557  }
22558  break;
22559  case 3:
22560  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
22561  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22562  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22563  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22564  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22565  }
22566  }
22567  break;
22568  case -4:
22569  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
22570  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22571  __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])))
22572  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22573  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22574  }
22575  }
22576  break;
22577  case 4:
22578  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
22579  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22580  __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])))
22581  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
22582  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
22583  }
22584  }
22585  break;
22586  }
22587 #endif
22588  if (sizeof(int) <= sizeof(long)) {
22589  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
22590 #ifdef HAVE_LONG_LONG
22591  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
22592  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
22593 #endif
22594  }
22595  }
22596  {
22597 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22598  PyErr_SetString(PyExc_RuntimeError,
22599  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22600 #else
22601  int val;
22602  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22603  #if PY_MAJOR_VERSION < 3
22604  if (likely(v) && !PyLong_Check(v)) {
22605  PyObject *tmp = v;
22606  v = PyNumber_Long(tmp);
22607  Py_DECREF(tmp);
22608  }
22609  #endif
22610  if (likely(v)) {
22611  int one = 1; int is_little = (int)*(unsigned char *)&one;
22612  unsigned char *bytes = (unsigned char *)&val;
22613  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22614  bytes, sizeof(val),
22615  is_little, !is_unsigned);
22616  Py_DECREF(v);
22617  if (likely(!ret))
22618  return val;
22619  }
22620 #endif
22621  return (int) -1;
22622  }
22623  } else {
22624  int val;
22625  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22626  if (!tmp) return (int) -1;
22627  val = __Pyx_PyInt_As_int(tmp);
22628  Py_DECREF(tmp);
22629  return val;
22630  }
22631 raise_overflow:
22632  PyErr_SetString(PyExc_OverflowError,
22633  "value too large to convert to int");
22634  return (int) -1;
22635 raise_neg_overflow:
22636  PyErr_SetString(PyExc_OverflowError,
22637  "can't convert negative value to int");
22638  return (int) -1;
22639 }
22640 
22641 /* CIntToPy */
22642  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
22643  const long neg_one = (long) -1, const_zero = (long) 0;
22644  const int is_unsigned = neg_one > const_zero;
22645  if (is_unsigned) {
22646  if (sizeof(long) < sizeof(long)) {
22647  return PyInt_FromLong((long) value);
22648  } else if (sizeof(long) <= sizeof(unsigned long)) {
22649  return PyLong_FromUnsignedLong((unsigned long) value);
22650 #ifdef HAVE_LONG_LONG
22651  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22652  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
22653 #endif
22654  }
22655  } else {
22656  if (sizeof(long) <= sizeof(long)) {
22657  return PyInt_FromLong((long) value);
22658 #ifdef HAVE_LONG_LONG
22659  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22660  return PyLong_FromLongLong((PY_LONG_LONG) value);
22661 #endif
22662  }
22663  }
22664  {
22665  int one = 1; int little = (int)*(unsigned char *)&one;
22666  unsigned char *bytes = (unsigned char *)&value;
22667  return _PyLong_FromByteArray(bytes, sizeof(long),
22668  little, !is_unsigned);
22669  }
22670 }
22671 
22672 /* CIntFromPy */
22673  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
22674  const long neg_one = (long) -1, const_zero = (long) 0;
22675  const int is_unsigned = neg_one > const_zero;
22676 #if PY_MAJOR_VERSION < 3
22677  if (likely(PyInt_Check(x))) {
22678  if (sizeof(long) < sizeof(long)) {
22679  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
22680  } else {
22681  long val = PyInt_AS_LONG(x);
22682  if (is_unsigned && unlikely(val < 0)) {
22683  goto raise_neg_overflow;
22684  }
22685  return (long) val;
22686  }
22687  } else
22688 #endif
22689  if (likely(PyLong_Check(x))) {
22690  if (is_unsigned) {
22691 #if CYTHON_USE_PYLONG_INTERNALS
22692  const digit* digits = ((PyLongObject*)x)->ob_digit;
22693  switch (Py_SIZE(x)) {
22694  case 0: return (long) 0;
22695  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
22696  case 2:
22697  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22698  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22699  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22700  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
22701  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22702  }
22703  }
22704  break;
22705  case 3:
22706  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22707  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22708  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22709  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
22710  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22711  }
22712  }
22713  break;
22714  case 4:
22715  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22716  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22717  __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])))
22718  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
22719  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
22720  }
22721  }
22722  break;
22723  }
22724 #endif
22725 #if CYTHON_COMPILING_IN_CPYTHON
22726  if (unlikely(Py_SIZE(x) < 0)) {
22727  goto raise_neg_overflow;
22728  }
22729 #else
22730  {
22731  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
22732  if (unlikely(result < 0))
22733  return (long) -1;
22734  if (unlikely(result == 1))
22735  goto raise_neg_overflow;
22736  }
22737 #endif
22738  if (sizeof(long) <= sizeof(unsigned long)) {
22739  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
22740 #ifdef HAVE_LONG_LONG
22741  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
22742  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
22743 #endif
22744  }
22745  } else {
22746 #if CYTHON_USE_PYLONG_INTERNALS
22747  const digit* digits = ((PyLongObject*)x)->ob_digit;
22748  switch (Py_SIZE(x)) {
22749  case 0: return (long) 0;
22750  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
22751  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
22752  case -2:
22753  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
22754  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22755  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22756  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22757  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22758  }
22759  }
22760  break;
22761  case 2:
22762  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
22763  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
22764  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22765  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22766  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22767  }
22768  }
22769  break;
22770  case -3:
22771  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
22772  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22773  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22774  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22775  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22776  }
22777  }
22778  break;
22779  case 3:
22780  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
22781  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
22782  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
22783  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22784  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22785  }
22786  }
22787  break;
22788  case -4:
22789  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
22790  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22791  __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])))
22792  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22793  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22794  }
22795  }
22796  break;
22797  case 4:
22798  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
22799  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
22800  __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])))
22801  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
22802  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
22803  }
22804  }
22805  break;
22806  }
22807 #endif
22808  if (sizeof(long) <= sizeof(long)) {
22809  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
22810 #ifdef HAVE_LONG_LONG
22811  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
22812  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
22813 #endif
22814  }
22815  }
22816  {
22817 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
22818  PyErr_SetString(PyExc_RuntimeError,
22819  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
22820 #else
22821  long val;
22822  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
22823  #if PY_MAJOR_VERSION < 3
22824  if (likely(v) && !PyLong_Check(v)) {
22825  PyObject *tmp = v;
22826  v = PyNumber_Long(tmp);
22827  Py_DECREF(tmp);
22828  }
22829  #endif
22830  if (likely(v)) {
22831  int one = 1; int is_little = (int)*(unsigned char *)&one;
22832  unsigned char *bytes = (unsigned char *)&val;
22833  int ret = _PyLong_AsByteArray((PyLongObject *)v,
22834  bytes, sizeof(val),
22835  is_little, !is_unsigned);
22836  Py_DECREF(v);
22837  if (likely(!ret))
22838  return val;
22839  }
22840 #endif
22841  return (long) -1;
22842  }
22843  } else {
22844  long val;
22845  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
22846  if (!tmp) return (long) -1;
22847  val = __Pyx_PyInt_As_long(tmp);
22848  Py_DECREF(tmp);
22849  return val;
22850  }
22851 raise_overflow:
22852  PyErr_SetString(PyExc_OverflowError,
22853  "value too large to convert to long");
22854  return (long) -1;
22855 raise_neg_overflow:
22856  PyErr_SetString(PyExc_OverflowError,
22857  "can't convert negative value to long");
22858  return (long) -1;
22859 }
22860 
22861 /* FastTypeChecks */
22862  #if CYTHON_COMPILING_IN_CPYTHON
22863 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
22864  while (a) {
22865  a = a->tp_base;
22866  if (a == b)
22867  return 1;
22868  }
22869  return b == &PyBaseObject_Type;
22870 }
22871 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
22872  PyObject *mro;
22873  if (a == b) return 1;
22874  mro = a->tp_mro;
22875  if (likely(mro)) {
22876  Py_ssize_t i, n;
22877  n = PyTuple_GET_SIZE(mro);
22878  for (i = 0; i < n; i++) {
22879  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
22880  return 1;
22881  }
22882  return 0;
22883  }
22884  return __Pyx_InBases(a, b);
22885 }
22886 #if PY_MAJOR_VERSION == 2
22887 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
22888  PyObject *exception, *value, *tb;
22889  int res;
22890  __Pyx_PyThreadState_declare
22891  __Pyx_PyThreadState_assign
22892  __Pyx_ErrFetch(&exception, &value, &tb);
22893  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
22894  if (unlikely(res == -1)) {
22895  PyErr_WriteUnraisable(err);
22896  res = 0;
22897  }
22898  if (!res) {
22899  res = PyObject_IsSubclass(err, exc_type2);
22900  if (unlikely(res == -1)) {
22901  PyErr_WriteUnraisable(err);
22902  res = 0;
22903  }
22904  }
22905  __Pyx_ErrRestore(exception, value, tb);
22906  return res;
22907 }
22908 #else
22909 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
22910  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
22911  if (!res) {
22912  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
22913  }
22914  return res;
22915 }
22916 #endif
22917 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
22918  Py_ssize_t i, n;
22919  assert(PyExceptionClass_Check(exc_type));
22920  n = PyTuple_GET_SIZE(tuple);
22921 #if PY_MAJOR_VERSION >= 3
22922  for (i=0; i<n; i++) {
22923  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
22924  }
22925 #endif
22926  for (i=0; i<n; i++) {
22927  PyObject *t = PyTuple_GET_ITEM(tuple, i);
22928  #if PY_MAJOR_VERSION < 3
22929  if (likely(exc_type == t)) return 1;
22930  #endif
22931  if (likely(PyExceptionClass_Check(t))) {
22932  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
22933  } else {
22934  }
22935  }
22936  return 0;
22937 }
22938 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
22939  if (likely(err == exc_type)) return 1;
22940  if (likely(PyExceptionClass_Check(err))) {
22941  if (likely(PyExceptionClass_Check(exc_type))) {
22942  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
22943  } else if (likely(PyTuple_Check(exc_type))) {
22944  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
22945  } else {
22946  }
22947  }
22948  return PyErr_GivenExceptionMatches(err, exc_type);
22949 }
22950 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
22951  assert(PyExceptionClass_Check(exc_type1));
22952  assert(PyExceptionClass_Check(exc_type2));
22953  if (likely(err == exc_type1 || err == exc_type2)) return 1;
22954  if (likely(PyExceptionClass_Check(err))) {
22955  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
22956  }
22957  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
22958 }
22959 #endif
22960 
22961 /* FetchCommonType */
22962  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
22963  PyObject* fake_module;
22964  PyTypeObject* cached_type = NULL;
22965  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
22966  if (!fake_module) return NULL;
22967  Py_INCREF(fake_module);
22968  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
22969  if (cached_type) {
22970  if (!PyType_Check((PyObject*)cached_type)) {
22971  PyErr_Format(PyExc_TypeError,
22972  "Shared Cython type %.200s is not a type object",
22973  type->tp_name);
22974  goto bad;
22975  }
22976  if (cached_type->tp_basicsize != type->tp_basicsize) {
22977  PyErr_Format(PyExc_TypeError,
22978  "Shared Cython type %.200s has the wrong size, try recompiling",
22979  type->tp_name);
22980  goto bad;
22981  }
22982  } else {
22983  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
22984  PyErr_Clear();
22985  if (PyType_Ready(type) < 0) goto bad;
22986  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
22987  goto bad;
22988  Py_INCREF(type);
22989  cached_type = type;
22990  }
22991 done:
22992  Py_DECREF(fake_module);
22993  return cached_type;
22994 bad:
22995  Py_XDECREF(cached_type);
22996  cached_type = NULL;
22997  goto done;
22998 }
22999 
23000 /* SwapException */
23001  #if CYTHON_FAST_THREAD_STATE
23002 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
23003  PyObject *tmp_type, *tmp_value, *tmp_tb;
23004  #if PY_VERSION_HEX >= 0x030700A3
23005  tmp_type = tstate->exc_state.exc_type;
23006  tmp_value = tstate->exc_state.exc_value;
23007  tmp_tb = tstate->exc_state.exc_traceback;
23008  tstate->exc_state.exc_type = *type;
23009  tstate->exc_state.exc_value = *value;
23010  tstate->exc_state.exc_traceback = *tb;
23011  #else
23012  tmp_type = tstate->exc_type;
23013  tmp_value = tstate->exc_value;
23014  tmp_tb = tstate->exc_traceback;
23015  tstate->exc_type = *type;
23016  tstate->exc_value = *value;
23017  tstate->exc_traceback = *tb;
23018  #endif
23019  *type = tmp_type;
23020  *value = tmp_value;
23021  *tb = tmp_tb;
23022 }
23023 #else
23024 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
23025  PyObject *tmp_type, *tmp_value, *tmp_tb;
23026  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
23027  PyErr_SetExcInfo(*type, *value, *tb);
23028  *type = tmp_type;
23029  *value = tmp_value;
23030  *tb = tmp_tb;
23031 }
23032 #endif
23033 
23034 /* PyObjectCallMethod1 */
23035  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
23036  PyObject *result = NULL;
23037 #if CYTHON_UNPACK_METHODS
23038  if (likely(PyMethod_Check(method))) {
23039  PyObject *self = PyMethod_GET_SELF(method);
23040  if (likely(self)) {
23041  PyObject *args;
23042  PyObject *function = PyMethod_GET_FUNCTION(method);
23043  #if CYTHON_FAST_PYCALL
23044  if (PyFunction_Check(function)) {
23045  PyObject *args[2] = {self, arg};
23046  result = __Pyx_PyFunction_FastCall(function, args, 2);
23047  goto done;
23048  }
23049  #endif
23050  #if CYTHON_FAST_PYCCALL
23051  if (__Pyx_PyFastCFunction_Check(function)) {
23052  PyObject *args[2] = {self, arg};
23053  result = __Pyx_PyCFunction_FastCall(function, args, 2);
23054  goto done;
23055  }
23056  #endif
23057  args = PyTuple_New(2);
23058  if (unlikely(!args)) goto done;
23059  Py_INCREF(self);
23060  PyTuple_SET_ITEM(args, 0, self);
23061  Py_INCREF(arg);
23062  PyTuple_SET_ITEM(args, 1, arg);
23063  Py_INCREF(function);
23064  result = __Pyx_PyObject_Call(function, args, NULL);
23065  Py_DECREF(args);
23066  Py_DECREF(function);
23067  return result;
23068  }
23069  }
23070 #endif
23071  result = __Pyx_PyObject_CallOneArg(method, arg);
23072  goto done;
23073 done:
23074  return result;
23075 }
23076 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
23077  PyObject *method, *result;
23078  method = __Pyx_PyObject_GetAttrStr(obj, method_name);
23079  if (unlikely(!method)) return NULL;
23080  result = __Pyx__PyObject_CallMethod1(method, arg);
23081  Py_DECREF(method);
23082  return result;
23083 }
23084 
23085 /* CoroutineBase */
23086  #include <structmember.h>
23087 #include <frameobject.h>
23088 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
23089 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
23090  PyObject *et, *ev, *tb;
23091  PyObject *value = NULL;
23092  __Pyx_ErrFetch(&et, &ev, &tb);
23093  if (!et) {
23094  Py_XDECREF(tb);
23095  Py_XDECREF(ev);
23096  Py_INCREF(Py_None);
23097  *pvalue = Py_None;
23098  return 0;
23099  }
23100  if (likely(et == PyExc_StopIteration)) {
23101  if (!ev) {
23102  Py_INCREF(Py_None);
23103  value = Py_None;
23104  }
23105 #if PY_VERSION_HEX >= 0x030300A0
23106  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
23107  value = ((PyStopIterationObject *)ev)->value;
23108  Py_INCREF(value);
23109  Py_DECREF(ev);
23110  }
23111 #endif
23112  else if (unlikely(PyTuple_Check(ev))) {
23113  if (PyTuple_GET_SIZE(ev) >= 1) {
23114 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23115  value = PyTuple_GET_ITEM(ev, 0);
23116  Py_INCREF(value);
23117 #else
23118  value = PySequence_ITEM(ev, 0);
23119 #endif
23120  } else {
23121  Py_INCREF(Py_None);
23122  value = Py_None;
23123  }
23124  Py_DECREF(ev);
23125  }
23126  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
23127  value = ev;
23128  }
23129  if (likely(value)) {
23130  Py_XDECREF(tb);
23131  Py_DECREF(et);
23132  *pvalue = value;
23133  return 0;
23134  }
23135  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
23136  __Pyx_ErrRestore(et, ev, tb);
23137  return -1;
23138  }
23139  PyErr_NormalizeException(&et, &ev, &tb);
23140  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
23141  __Pyx_ErrRestore(et, ev, tb);
23142  return -1;
23143  }
23144  Py_XDECREF(tb);
23145  Py_DECREF(et);
23146 #if PY_VERSION_HEX >= 0x030300A0
23147  value = ((PyStopIterationObject *)ev)->value;
23148  Py_INCREF(value);
23149  Py_DECREF(ev);
23150 #else
23151  {
23152  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
23153  Py_DECREF(ev);
23154  if (likely(args)) {
23155  value = PySequence_GetItem(args, 0);
23156  Py_DECREF(args);
23157  }
23158  if (unlikely(!value)) {
23159  __Pyx_ErrRestore(NULL, NULL, NULL);
23160  Py_INCREF(Py_None);
23161  value = Py_None;
23162  }
23163  }
23164 #endif
23165  *pvalue = value;
23166  return 0;
23167 }
23168 static CYTHON_INLINE
23169 void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
23170  PyObject *exc_type = self->exc_type;
23171  PyObject *exc_value = self->exc_value;
23172  PyObject *exc_traceback = self->exc_traceback;
23173  self->exc_type = NULL;
23174  self->exc_value = NULL;
23175  self->exc_traceback = NULL;
23176  Py_XDECREF(exc_type);
23177  Py_XDECREF(exc_value);
23178  Py_XDECREF(exc_traceback);
23179 }
23180 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
23181 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
23182  const char *msg;
23183  if (0) {
23184  #ifdef __Pyx_Coroutine_USED
23185  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
23186  msg = "coroutine already executing";
23187  #endif
23188  #ifdef __Pyx_AsyncGen_USED
23189  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
23190  msg = "async generator already executing";
23191  #endif
23192  } else {
23193  msg = "generator already executing";
23194  }
23195  PyErr_SetString(PyExc_ValueError, msg);
23196 }
23197 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
23198 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
23199  const char *msg;
23200  if (0) {
23201  #ifdef __Pyx_Coroutine_USED
23202  } else if (__Pyx_Coroutine_Check(gen)) {
23203  msg = "can't send non-None value to a just-started coroutine";
23204  #endif
23205  #ifdef __Pyx_AsyncGen_USED
23206  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
23207  msg = "can't send non-None value to a just-started async generator";
23208  #endif
23209  } else {
23210  msg = "can't send non-None value to a just-started generator";
23211  }
23212  PyErr_SetString(PyExc_TypeError, msg);
23213 }
23214 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
23215 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
23216  #ifdef __Pyx_Coroutine_USED
23217  if (!closing && __Pyx_Coroutine_Check(gen)) {
23218  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
23219  } else
23220  #endif
23221  if (value) {
23222  #ifdef __Pyx_AsyncGen_USED
23223  if (__Pyx_AsyncGen_CheckExact(gen))
23224  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
23225  else
23226  #endif
23227  PyErr_SetNone(PyExc_StopIteration);
23228  }
23229 }
23230 static
23231 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
23232  __Pyx_PyThreadState_declare
23233  PyThreadState *tstate;
23234  PyObject *retval;
23235  assert(!self->is_running);
23236  if (unlikely(self->resume_label == 0)) {
23237  if (unlikely(value && value != Py_None)) {
23238  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
23239  }
23240  }
23241  if (unlikely(self->resume_label == -1)) {
23242  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
23243  }
23244 #if CYTHON_FAST_THREAD_STATE
23245  __Pyx_PyThreadState_assign
23246  tstate = __pyx_tstate;
23247 #else
23248  tstate = __Pyx_PyThreadState_Current;
23249 #endif
23250  if (self->exc_type) {
23251 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23252 #else
23253  if (self->exc_traceback) {
23254  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23255  PyFrameObject *f = tb->tb_frame;
23256  Py_XINCREF(tstate->frame);
23257  assert(f->f_back == NULL);
23258  f->f_back = tstate->frame;
23259  }
23260 #endif
23261  __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
23262  &self->exc_traceback);
23263  } else {
23264  __Pyx_Coroutine_ExceptionClear(self);
23265  __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
23266  }
23267  self->is_running = 1;
23268  retval = self->body((PyObject *) self, tstate, value);
23269  self->is_running = 0;
23270  return retval;
23271 }
23272 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
23273  if (likely(self->exc_traceback)) {
23274 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
23275 #else
23276  PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
23277  PyFrameObject *f = tb->tb_frame;
23278  Py_CLEAR(f->f_back);
23279 #endif
23280  }
23281 }
23282 static CYTHON_INLINE
23283 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
23284  if (unlikely(!retval)) {
23285  __Pyx_PyThreadState_declare
23286  __Pyx_PyThreadState_assign
23287  if (!__Pyx_PyErr_Occurred()) {
23288  PyObject *exc = PyExc_StopIteration;
23289  #ifdef __Pyx_AsyncGen_USED
23290  if (__Pyx_AsyncGen_CheckExact(gen))
23291  exc = __Pyx_PyExc_StopAsyncIteration;
23292  #endif
23293  __Pyx_PyErr_SetNone(exc);
23294  }
23295  }
23296  return retval;
23297 }
23298 static CYTHON_INLINE
23299 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
23300  PyObject *ret;
23301  PyObject *val = NULL;
23302  __Pyx_Coroutine_Undelegate(gen);
23303  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
23304  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
23305  Py_XDECREF(val);
23306  return ret;
23307 }
23308 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
23309  PyObject *retval;
23310  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23311  PyObject *yf = gen->yieldfrom;
23312  if (unlikely(gen->is_running))
23313  return __Pyx_Coroutine_AlreadyRunningError(gen);
23314  if (yf) {
23315  PyObject *ret;
23316  gen->is_running = 1;
23317  #ifdef __Pyx_Generator_USED
23318  if (__Pyx_Generator_CheckExact(yf)) {
23319  ret = __Pyx_Coroutine_Send(yf, value);
23320  } else
23321  #endif
23322  #ifdef __Pyx_Coroutine_USED
23323  if (__Pyx_Coroutine_Check(yf)) {
23324  ret = __Pyx_Coroutine_Send(yf, value);
23325  } else
23326  #endif
23327  #ifdef __Pyx_AsyncGen_USED
23328  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23329  ret = __Pyx_async_gen_asend_send(yf, value);
23330  } else
23331  #endif
23332  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23333  if (PyGen_CheckExact(yf)) {
23334  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23335  } else
23336  #endif
23337  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23338  if (PyCoro_CheckExact(yf)) {
23339  ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
23340  } else
23341  #endif
23342  {
23343  if (value == Py_None)
23344  ret = Py_TYPE(yf)->tp_iternext(yf);
23345  else
23346  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
23347  }
23348  gen->is_running = 0;
23349  if (likely(ret)) {
23350  return ret;
23351  }
23352  retval = __Pyx_Coroutine_FinishDelegation(gen);
23353  } else {
23354  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
23355  }
23356  return __Pyx_Coroutine_MethodReturn(self, retval);
23357 }
23358 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
23359  PyObject *retval = NULL;
23360  int err = 0;
23361  #ifdef __Pyx_Generator_USED
23362  if (__Pyx_Generator_CheckExact(yf)) {
23363  retval = __Pyx_Coroutine_Close(yf);
23364  if (!retval)
23365  return -1;
23366  } else
23367  #endif
23368  #ifdef __Pyx_Coroutine_USED
23369  if (__Pyx_Coroutine_Check(yf)) {
23370  retval = __Pyx_Coroutine_Close(yf);
23371  if (!retval)
23372  return -1;
23373  } else
23374  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23375  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
23376  if (!retval)
23377  return -1;
23378  } else
23379  #endif
23380  #ifdef __Pyx_AsyncGen_USED
23381  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
23382  retval = __Pyx_async_gen_asend_close(yf, NULL);
23383  } else
23384  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
23385  retval = __Pyx_async_gen_athrow_close(yf, NULL);
23386  } else
23387  #endif
23388  {
23389  PyObject *meth;
23390  gen->is_running = 1;
23391  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
23392  if (unlikely(!meth)) {
23393  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23394  PyErr_WriteUnraisable(yf);
23395  }
23396  PyErr_Clear();
23397  } else {
23398  retval = PyObject_CallFunction(meth, NULL);
23399  Py_DECREF(meth);
23400  if (!retval)
23401  err = -1;
23402  }
23403  gen->is_running = 0;
23404  }
23405  Py_XDECREF(retval);
23406  return err;
23407 }
23408 static PyObject *__Pyx_Generator_Next(PyObject *self) {
23409  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
23410  PyObject *yf = gen->yieldfrom;
23411  if (unlikely(gen->is_running))
23412  return __Pyx_Coroutine_AlreadyRunningError(gen);
23413  if (yf) {
23414  PyObject *ret;
23415  gen->is_running = 1;
23416  #ifdef __Pyx_Generator_USED
23417  if (__Pyx_Generator_CheckExact(yf)) {
23418  ret = __Pyx_Generator_Next(yf);
23419  } else
23420  #endif
23421  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
23422  if (PyGen_CheckExact(yf)) {
23423  ret = _PyGen_Send((PyGenObject*)yf, NULL);
23424  } else
23425  #endif
23426  #ifdef __Pyx_Coroutine_USED
23427  if (__Pyx_Coroutine_Check(yf)) {
23428  ret = __Pyx_Coroutine_Send(yf, Py_None);
23429  } else
23430  #endif
23431  ret = Py_TYPE(yf)->tp_iternext(yf);
23432  gen->is_running = 0;
23433  if (likely(ret)) {
23434  return ret;
23435  }
23436  return __Pyx_Coroutine_FinishDelegation(gen);
23437  }
23438  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
23439 }
23440 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
23441  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23442  PyObject *retval, *raised_exception;
23443  PyObject *yf = gen->yieldfrom;
23444  int err = 0;
23445  if (unlikely(gen->is_running))
23446  return __Pyx_Coroutine_AlreadyRunningError(gen);
23447  if (yf) {
23448  Py_INCREF(yf);
23449  err = __Pyx_Coroutine_CloseIter(gen, yf);
23450  __Pyx_Coroutine_Undelegate(gen);
23451  Py_DECREF(yf);
23452  }
23453  if (err == 0)
23454  PyErr_SetNone(PyExc_GeneratorExit);
23455  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
23456  if (unlikely(retval)) {
23457  const char *msg;
23458  Py_DECREF(retval);
23459  if ((0)) {
23460  #ifdef __Pyx_Coroutine_USED
23461  } else if (__Pyx_Coroutine_Check(self)) {
23462  msg = "coroutine ignored GeneratorExit";
23463  #endif
23464  #ifdef __Pyx_AsyncGen_USED
23465  } else if (__Pyx_AsyncGen_CheckExact(self)) {
23466 #if PY_VERSION_HEX < 0x03060000
23467  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
23468 #else
23469  msg = "async generator ignored GeneratorExit";
23470 #endif
23471  #endif
23472  } else {
23473  msg = "generator ignored GeneratorExit";
23474  }
23475  PyErr_SetString(PyExc_RuntimeError, msg);
23476  return NULL;
23477  }
23478  raised_exception = PyErr_Occurred();
23479  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
23480  if (raised_exception) PyErr_Clear();
23481  Py_INCREF(Py_None);
23482  return Py_None;
23483  }
23484  return NULL;
23485 }
23486 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
23487  PyObject *args, int close_on_genexit) {
23488  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23489  PyObject *yf = gen->yieldfrom;
23490  if (unlikely(gen->is_running))
23491  return __Pyx_Coroutine_AlreadyRunningError(gen);
23492  if (yf) {
23493  PyObject *ret;
23494  Py_INCREF(yf);
23495  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
23496  int err = __Pyx_Coroutine_CloseIter(gen, yf);
23497  Py_DECREF(yf);
23498  __Pyx_Coroutine_Undelegate(gen);
23499  if (err < 0)
23500  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23501  goto throw_here;
23502  }
23503  gen->is_running = 1;
23504  if (0
23505  #ifdef __Pyx_Generator_USED
23506  || __Pyx_Generator_CheckExact(yf)
23507  #endif
23508  #ifdef __Pyx_Coroutine_USED
23509  || __Pyx_Coroutine_Check(yf)
23510  #endif
23511  ) {
23512  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
23513  #ifdef __Pyx_Coroutine_USED
23514  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
23515  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
23516  #endif
23517  } else {
23518  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
23519  if (unlikely(!meth)) {
23520  Py_DECREF(yf);
23521  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
23522  gen->is_running = 0;
23523  return NULL;
23524  }
23525  PyErr_Clear();
23526  __Pyx_Coroutine_Undelegate(gen);
23527  gen->is_running = 0;
23528  goto throw_here;
23529  }
23530  if (likely(args)) {
23531  ret = PyObject_CallObject(meth, args);
23532  } else {
23533  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
23534  }
23535  Py_DECREF(meth);
23536  }
23537  gen->is_running = 0;
23538  Py_DECREF(yf);
23539  if (!ret) {
23540  ret = __Pyx_Coroutine_FinishDelegation(gen);
23541  }
23542  return __Pyx_Coroutine_MethodReturn(self, ret);
23543  }
23544 throw_here:
23545  __Pyx_Raise(typ, val, tb, NULL);
23546  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
23547 }
23548 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
23549  PyObject *typ;
23550  PyObject *val = NULL;
23551  PyObject *tb = NULL;
23552  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
23553  return NULL;
23554  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
23555 }
23556 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
23557  Py_VISIT(gen->closure);
23558  Py_VISIT(gen->classobj);
23559  Py_VISIT(gen->yieldfrom);
23560  Py_VISIT(gen->exc_type);
23561  Py_VISIT(gen->exc_value);
23562  Py_VISIT(gen->exc_traceback);
23563  return 0;
23564 }
23565 static int __Pyx_Coroutine_clear(PyObject *self) {
23566  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23567  Py_CLEAR(gen->closure);
23568  Py_CLEAR(gen->classobj);
23569  Py_CLEAR(gen->yieldfrom);
23570  Py_CLEAR(gen->exc_type);
23571  Py_CLEAR(gen->exc_value);
23572  Py_CLEAR(gen->exc_traceback);
23573 #ifdef __Pyx_AsyncGen_USED
23574  if (__Pyx_AsyncGen_CheckExact(self)) {
23575  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
23576  }
23577 #endif
23578  Py_CLEAR(gen->gi_code);
23579  Py_CLEAR(gen->gi_name);
23580  Py_CLEAR(gen->gi_qualname);
23581  Py_CLEAR(gen->gi_modulename);
23582  return 0;
23583 }
23584 static void __Pyx_Coroutine_dealloc(PyObject *self) {
23585  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23586  PyObject_GC_UnTrack(gen);
23587  if (gen->gi_weakreflist != NULL)
23588  PyObject_ClearWeakRefs(self);
23589  if (gen->resume_label >= 0) {
23590  PyObject_GC_Track(self);
23591 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
23592  if (PyObject_CallFinalizerFromDealloc(self))
23593 #else
23594  Py_TYPE(gen)->tp_del(self);
23595  if (self->ob_refcnt > 0)
23596 #endif
23597  {
23598  return;
23599  }
23600  PyObject_GC_UnTrack(self);
23601  }
23602 #ifdef __Pyx_AsyncGen_USED
23603  if (__Pyx_AsyncGen_CheckExact(self)) {
23604  /* We have to handle this case for asynchronous generators
23605  right here, because this code has to be between UNTRACK
23606  and GC_Del. */
23607  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
23608  }
23609 #endif
23610  __Pyx_Coroutine_clear(self);
23611  PyObject_GC_Del(gen);
23612 }
23613 static void __Pyx_Coroutine_del(PyObject *self) {
23614  PyObject *error_type, *error_value, *error_traceback;
23615  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
23616  __Pyx_PyThreadState_declare
23617  if (gen->resume_label < 0) {
23618  return;
23619  }
23620 #if !CYTHON_USE_TP_FINALIZE
23621  assert(self->ob_refcnt == 0);
23622  self->ob_refcnt = 1;
23623 #endif
23624  __Pyx_PyThreadState_assign
23625  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
23626 #ifdef __Pyx_AsyncGen_USED
23627  if (__Pyx_AsyncGen_CheckExact(self)) {
23628  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
23629  PyObject *finalizer = agen->ag_finalizer;
23630  if (finalizer && !agen->ag_closed) {
23631  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
23632  if (unlikely(!res)) {
23633  PyErr_WriteUnraisable(self);
23634  } else {
23635  Py_DECREF(res);
23636  }
23637  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23638  return;
23639  }
23640  }
23641 #endif
23642  if (unlikely(gen->resume_label == 0 && !error_value)) {
23643 #ifdef __Pyx_Coroutine_USED
23644 #ifdef __Pyx_Generator_USED
23645  if (!__Pyx_Generator_CheckExact(self))
23646 #endif
23647  {
23648  PyObject_GC_UnTrack(self);
23649 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
23650  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
23651  PyErr_WriteUnraisable(self);
23652 #else
23653  {PyObject *msg;
23654  char *cmsg;
23655  #if CYTHON_COMPILING_IN_PYPY
23656  msg = NULL;
23657  cmsg = (char*) "coroutine was never awaited";
23658  #else
23659  char *cname;
23660  PyObject *qualname;
23661  qualname = gen->gi_qualname;
23662  cname = PyString_AS_STRING(qualname);
23663  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
23664  if (unlikely(!msg)) {
23665  PyErr_Clear();
23666  cmsg = (char*) "coroutine was never awaited";
23667  } else {
23668  cmsg = PyString_AS_STRING(msg);
23669  }
23670  #endif
23671  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
23672  PyErr_WriteUnraisable(self);
23673  Py_XDECREF(msg);}
23674 #endif
23675  PyObject_GC_Track(self);
23676  }
23677 #endif
23678  } else {
23679  PyObject *res = __Pyx_Coroutine_Close(self);
23680  if (unlikely(!res)) {
23681  if (PyErr_Occurred())
23682  PyErr_WriteUnraisable(self);
23683  } else {
23684  Py_DECREF(res);
23685  }
23686  }
23687  __Pyx_ErrRestore(error_type, error_value, error_traceback);
23688 #if !CYTHON_USE_TP_FINALIZE
23689  assert(self->ob_refcnt > 0);
23690  if (--self->ob_refcnt == 0) {
23691  return;
23692  }
23693  {
23694  Py_ssize_t refcnt = self->ob_refcnt;
23695  _Py_NewReference(self);
23696  self->ob_refcnt = refcnt;
23697  }
23698 #if CYTHON_COMPILING_IN_CPYTHON
23699  assert(PyType_IS_GC(self->ob_type) &&
23700  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
23701  _Py_DEC_REFTOTAL;
23702 #endif
23703 #ifdef COUNT_ALLOCS
23704  --Py_TYPE(self)->tp_frees;
23705  --Py_TYPE(self)->tp_allocs;
23706 #endif
23707 #endif
23708 }
23709 static PyObject *
23710 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
23711 {
23712  PyObject *name = self->gi_name;
23713  if (unlikely(!name)) name = Py_None;
23714  Py_INCREF(name);
23715  return name;
23716 }
23717 static int
23718 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
23719 {
23720  PyObject *tmp;
23721 #if PY_MAJOR_VERSION >= 3
23722  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23723 #else
23724  if (unlikely(value == NULL || !PyString_Check(value))) {
23725 #endif
23726  PyErr_SetString(PyExc_TypeError,
23727  "__name__ must be set to a string object");
23728  return -1;
23729  }
23730  tmp = self->gi_name;
23731  Py_INCREF(value);
23732  self->gi_name = value;
23733  Py_XDECREF(tmp);
23734  return 0;
23735 }
23736 static PyObject *
23737 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
23738 {
23739  PyObject *name = self->gi_qualname;
23740  if (unlikely(!name)) name = Py_None;
23741  Py_INCREF(name);
23742  return name;
23743 }
23744 static int
23745 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
23746 {
23747  PyObject *tmp;
23748 #if PY_MAJOR_VERSION >= 3
23749  if (unlikely(value == NULL || !PyUnicode_Check(value))) {
23750 #else
23751  if (unlikely(value == NULL || !PyString_Check(value))) {
23752 #endif
23753  PyErr_SetString(PyExc_TypeError,
23754  "__qualname__ must be set to a string object");
23755  return -1;
23756  }
23757  tmp = self->gi_qualname;
23758  Py_INCREF(value);
23759  self->gi_qualname = value;
23760  Py_XDECREF(tmp);
23761  return 0;
23762 }
23763 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
23764  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23765  PyObject *name, PyObject *qualname, PyObject *module_name) {
23766  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
23767  if (unlikely(!gen))
23768  return NULL;
23769  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
23770 }
23771 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
23772  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
23773  PyObject *name, PyObject *qualname, PyObject *module_name) {
23774  gen->body = body;
23775  gen->closure = closure;
23776  Py_XINCREF(closure);
23777  gen->is_running = 0;
23778  gen->resume_label = 0;
23779  gen->classobj = NULL;
23780  gen->yieldfrom = NULL;
23781  gen->exc_type = NULL;
23782  gen->exc_value = NULL;
23783  gen->exc_traceback = NULL;
23784  gen->gi_weakreflist = NULL;
23785  Py_XINCREF(qualname);
23786  gen->gi_qualname = qualname;
23787  Py_XINCREF(name);
23788  gen->gi_name = name;
23789  Py_XINCREF(module_name);
23790  gen->gi_modulename = module_name;
23791  Py_XINCREF(code);
23792  gen->gi_code = code;
23793  PyObject_GC_Track(gen);
23794  return gen;
23795 }
23796 
23797 /* PatchModuleWithCoroutine */
23798  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
23799 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23800  int result;
23801  PyObject *globals, *result_obj;
23802  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
23803  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
23804  #ifdef __Pyx_Coroutine_USED
23805  (PyObject*)__pyx_CoroutineType);
23806  #else
23807  Py_None);
23808  #endif
23809  if (unlikely(result < 0)) goto ignore;
23810  result = PyDict_SetItemString(globals, "_cython_generator_type",
23811  #ifdef __Pyx_Generator_USED
23812  (PyObject*)__pyx_GeneratorType);
23813  #else
23814  Py_None);
23815  #endif
23816  if (unlikely(result < 0)) goto ignore;
23817  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
23818  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
23819  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
23820  if (unlikely(!result_obj)) goto ignore;
23821  Py_DECREF(result_obj);
23822  Py_DECREF(globals);
23823  return module;
23824 ignore:
23825  Py_XDECREF(globals);
23826  PyErr_WriteUnraisable(module);
23827  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
23828  Py_DECREF(module);
23829  module = NULL;
23830  }
23831 #else
23832  py_code++;
23833 #endif
23834  return module;
23835 }
23836 
23837 /* PatchGeneratorABC */
23838  #ifndef CYTHON_REGISTER_ABCS
23839 #define CYTHON_REGISTER_ABCS 1
23840 #endif
23841 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23842 static PyObject* __Pyx_patch_abc_module(PyObject *module);
23843 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
23844  module = __Pyx_Coroutine_patch_module(
23845  module, ""
23846 "if _cython_generator_type is not None:\n"
23847 " try: Generator = _module.Generator\n"
23848 " except AttributeError: pass\n"
23849 " else: Generator.register(_cython_generator_type)\n"
23850 "if _cython_coroutine_type is not None:\n"
23851 " try: Coroutine = _module.Coroutine\n"
23852 " except AttributeError: pass\n"
23853 " else: Coroutine.register(_cython_coroutine_type)\n"
23854  );
23855  return module;
23856 }
23857 #endif
23858 static int __Pyx_patch_abc(void) {
23859 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
23860  static int abc_patched = 0;
23861  if (CYTHON_REGISTER_ABCS && !abc_patched) {
23862  PyObject *module;
23863  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
23864  if (!module) {
23865  PyErr_WriteUnraisable(NULL);
23866  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
23867  ((PY_MAJOR_VERSION >= 3) ?
23868  "Cython module failed to register with collections.abc module" :
23869  "Cython module failed to register with collections module"), 1) < 0)) {
23870  return -1;
23871  }
23872  } else {
23873  module = __Pyx_patch_abc_module(module);
23874  abc_patched = 1;
23875  if (unlikely(!module))
23876  return -1;
23877  Py_DECREF(module);
23878  }
23879  module = PyImport_ImportModule("backports_abc");
23880  if (module) {
23881  module = __Pyx_patch_abc_module(module);
23882  Py_XDECREF(module);
23883  }
23884  if (!module) {
23885  PyErr_Clear();
23886  }
23887  }
23888 #else
23889  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
23890 #endif
23891  return 0;
23892 }
23893 
23894 /* Generator */
23895  static PyMethodDef __pyx_Generator_methods[] = {
23896  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
23897  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
23898  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
23899  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
23900  {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
23901  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
23902  {0, 0, 0, 0}
23903 };
23904 static PyMemberDef __pyx_Generator_memberlist[] = {
23905  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
23906  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
23907  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
23908  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
23909  {0, 0, 0, 0, 0}
23910 };
23911 static PyGetSetDef __pyx_Generator_getsets[] = {
23912  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
23913  (char*) PyDoc_STR("name of the generator"), 0},
23914  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
23915  (char*) PyDoc_STR("qualified name of the generator"), 0},
23916  {0, 0, 0, 0, 0}
23917 };
23918 static PyTypeObject __pyx_GeneratorType_type = {
23919  PyVarObject_HEAD_INIT(0, 0)
23920  "generator",
23921  sizeof(__pyx_CoroutineObject),
23922  0,
23923  (destructor) __Pyx_Coroutine_dealloc,
23924  0,
23925  0,
23926  0,
23927  0,
23928  0,
23929  0,
23930  0,
23931  0,
23932  0,
23933  0,
23934  0,
23935  0,
23936  0,
23937  0,
23938  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
23939  0,
23940  (traverseproc) __Pyx_Coroutine_traverse,
23941  0,
23942  0,
23943  offsetof(__pyx_CoroutineObject, gi_weakreflist),
23944  0,
23945  (iternextfunc) __Pyx_Generator_Next,
23946  __pyx_Generator_methods,
23947  __pyx_Generator_memberlist,
23948  __pyx_Generator_getsets,
23949  0,
23950  0,
23951  0,
23952  0,
23953  0,
23954  0,
23955  0,
23956  0,
23957  0,
23958  0,
23959  0,
23960  0,
23961  0,
23962  0,
23963  0,
23964 #if CYTHON_USE_TP_FINALIZE
23965  0,
23966 #else
23967  __Pyx_Coroutine_del,
23968 #endif
23969  0,
23970 #if CYTHON_USE_TP_FINALIZE
23971  __Pyx_Coroutine_del,
23972 #elif PY_VERSION_HEX >= 0x030400a1
23973  0,
23974 #endif
23975 };
23976 static int __pyx_Generator_init(void) {
23977  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
23978  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
23979  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
23980  if (unlikely(!__pyx_GeneratorType)) {
23981  return -1;
23982  }
23983  return 0;
23984 }
23985 
23986 /* CheckBinaryVersion */
23987  static int __Pyx_check_binary_version(void) {
23988  char ctversion[4], rtversion[4];
23989  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
23990  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
23991  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
23992  char message[200];
23993  PyOS_snprintf(message, sizeof(message),
23994  "compiletime version %s of module '%.100s' "
23995  "does not match runtime version %s",
23996  ctversion, __Pyx_MODULE_NAME, rtversion);
23997  return PyErr_WarnEx(NULL, message, 1);
23998  }
23999  return 0;
24000 }
24001 
24002 /* InitStrings */
24003  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
24004  while (t->p) {
24005  #if PY_MAJOR_VERSION < 3
24006  if (t->is_unicode) {
24007  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
24008  } else if (t->intern) {
24009  *t->p = PyString_InternFromString(t->s);
24010  } else {
24011  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
24012  }
24013  #else
24014  if (t->is_unicode | t->is_str) {
24015  if (t->intern) {
24016  *t->p = PyUnicode_InternFromString(t->s);
24017  } else if (t->encoding) {
24018  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
24019  } else {
24020  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
24021  }
24022  } else {
24023  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
24024  }
24025  #endif
24026  if (!*t->p)
24027  return -1;
24028  if (PyObject_Hash(*t->p) == -1)
24029  return -1;
24030  ++t;
24031  }
24032  return 0;
24033 }
24034 
24035 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
24036  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
24037 }
24038 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
24039  Py_ssize_t ignore;
24040  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
24041 }
24042 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24043 #if !CYTHON_PEP393_ENABLED
24044 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24045  char* defenc_c;
24046  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
24047  if (!defenc) return NULL;
24048  defenc_c = PyBytes_AS_STRING(defenc);
24049 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24050  {
24051  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
24052  char* c;
24053  for (c = defenc_c; c < end; c++) {
24054  if ((unsigned char) (*c) >= 128) {
24055  PyUnicode_AsASCIIString(o);
24056  return NULL;
24057  }
24058  }
24059  }
24060 #endif
24061  *length = PyBytes_GET_SIZE(defenc);
24062  return defenc_c;
24063 }
24064 #else
24065 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24066  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
24067 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24068  if (likely(PyUnicode_IS_ASCII(o))) {
24069  *length = PyUnicode_GET_LENGTH(o);
24070  return PyUnicode_AsUTF8(o);
24071  } else {
24072  PyUnicode_AsASCIIString(o);
24073  return NULL;
24074  }
24075 #else
24076  return PyUnicode_AsUTF8AndSize(o, length);
24077 #endif
24078 }
24079 #endif
24080 #endif
24081 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
24082 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
24083  if (
24084 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
24085  __Pyx_sys_getdefaultencoding_not_ascii &&
24086 #endif
24087  PyUnicode_Check(o)) {
24088  return __Pyx_PyUnicode_AsStringAndSize(o, length);
24089  } else
24090 #endif
24091 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
24092  if (PyByteArray_Check(o)) {
24093  *length = PyByteArray_GET_SIZE(o);
24094  return PyByteArray_AS_STRING(o);
24095  } else
24096 #endif
24097  {
24098  char* result;
24099  int r = PyBytes_AsStringAndSize(o, &result, length);
24100  if (unlikely(r < 0)) {
24101  return NULL;
24102  } else {
24103  return result;
24104  }
24105  }
24106 }
24107 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
24108  int is_true = x == Py_True;
24109  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
24110  else return PyObject_IsTrue(x);
24111 }
24112 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
24113 #if PY_MAJOR_VERSION >= 3
24114  if (PyLong_Check(result)) {
24115  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
24116  "__int__ returned non-int (type %.200s). "
24117  "The ability to return an instance of a strict subclass of int "
24118  "is deprecated, and may be removed in a future version of Python.",
24119  Py_TYPE(result)->tp_name)) {
24120  Py_DECREF(result);
24121  return NULL;
24122  }
24123  return result;
24124  }
24125 #endif
24126  PyErr_Format(PyExc_TypeError,
24127  "__%.4s__ returned non-%.4s (type %.200s)",
24128  type_name, type_name, Py_TYPE(result)->tp_name);
24129  Py_DECREF(result);
24130  return NULL;
24131 }
24132 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
24133 #if CYTHON_USE_TYPE_SLOTS
24134  PyNumberMethods *m;
24135 #endif
24136  const char *name = NULL;
24137  PyObject *res = NULL;
24138 #if PY_MAJOR_VERSION < 3
24139  if (likely(PyInt_Check(x) || PyLong_Check(x)))
24140 #else
24141  if (likely(PyLong_Check(x)))
24142 #endif
24143  return __Pyx_NewRef(x);
24144 #if CYTHON_USE_TYPE_SLOTS
24145  m = Py_TYPE(x)->tp_as_number;
24146  #if PY_MAJOR_VERSION < 3
24147  if (m && m->nb_int) {
24148  name = "int";
24149  res = m->nb_int(x);
24150  }
24151  else if (m && m->nb_long) {
24152  name = "long";
24153  res = m->nb_long(x);
24154  }
24155  #else
24156  if (likely(m && m->nb_int)) {
24157  name = "int";
24158  res = m->nb_int(x);
24159  }
24160  #endif
24161 #else
24162  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
24163  res = PyNumber_Int(x);
24164  }
24165 #endif
24166  if (likely(res)) {
24167 #if PY_MAJOR_VERSION < 3
24168  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
24169 #else
24170  if (unlikely(!PyLong_CheckExact(res))) {
24171 #endif
24172  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
24173  }
24174  }
24175  else if (!PyErr_Occurred()) {
24176  PyErr_SetString(PyExc_TypeError,
24177  "an integer is required");
24178  }
24179  return res;
24180 }
24181 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
24182  Py_ssize_t ival;
24183  PyObject *x;
24184 #if PY_MAJOR_VERSION < 3
24185  if (likely(PyInt_CheckExact(b))) {
24186  if (sizeof(Py_ssize_t) >= sizeof(long))
24187  return PyInt_AS_LONG(b);
24188  else
24189  return PyInt_AsSsize_t(x);
24190  }
24191 #endif
24192  if (likely(PyLong_CheckExact(b))) {
24193  #if CYTHON_USE_PYLONG_INTERNALS
24194  const digit* digits = ((PyLongObject*)b)->ob_digit;
24195  const Py_ssize_t size = Py_SIZE(b);
24196  if (likely(__Pyx_sst_abs(size) <= 1)) {
24197  ival = likely(size) ? digits[0] : 0;
24198  if (size == -1) ival = -ival;
24199  return ival;
24200  } else {
24201  switch (size) {
24202  case 2:
24203  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24204  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24205  }
24206  break;
24207  case -2:
24208  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
24209  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24210  }
24211  break;
24212  case 3:
24213  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24214  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24215  }
24216  break;
24217  case -3:
24218  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
24219  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
24220  }
24221  break;
24222  case 4:
24223  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24224  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]));
24225  }
24226  break;
24227  case -4:
24228  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
24229  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]));
24230  }
24231  break;
24232  }
24233  }
24234  #endif
24235  return PyLong_AsSsize_t(b);
24236  }
24237  x = PyNumber_Index(b);
24238  if (!x) return -1;
24239  ival = PyInt_AsSsize_t(x);
24240  Py_DECREF(x);
24241  return ival;
24242 }
24243 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
24244  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
24245 }
24246 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
24247  return PyInt_FromSize_t(ival);
24248 }
24249 
24250 
24251 #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